proteus  1.8.1
C/C++/Fortran libraries
CouplingFSI.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.30 */
2 
3 #ifndef PY_SSIZE_T_CLEAN
4 #define PY_SSIZE_T_CLEAN
5 #endif /* PY_SSIZE_T_CLEAN */
6 #include "Python.h"
7 #ifndef Py_PYTHON_H
8  #error Python headers needed to compile C extensions, please install development version of Python.
9 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
10  #error Cython requires Python 2.6+ or Python 3.3+.
11 #else
12 #define CYTHON_ABI "0_29_30"
13 #define CYTHON_HEX_VERSION 0x001D1EF0
14 #define CYTHON_FUTURE_DIVISION 0
15 #include <stddef.h>
16 #ifndef offsetof
17  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
18 #endif
19 #if !defined(WIN32) && !defined(MS_WINDOWS)
20  #ifndef __stdcall
21  #define __stdcall
22  #endif
23  #ifndef __cdecl
24  #define __cdecl
25  #endif
26  #ifndef __fastcall
27  #define __fastcall
28  #endif
29 #endif
30 #ifndef DL_IMPORT
31  #define DL_IMPORT(t) t
32 #endif
33 #ifndef DL_EXPORT
34  #define DL_EXPORT(t) t
35 #endif
36 #define __PYX_COMMA ,
37 #ifndef HAVE_LONG_LONG
38  #if PY_VERSION_HEX >= 0x02070000
39  #define HAVE_LONG_LONG
40  #endif
41 #endif
42 #ifndef PY_LONG_LONG
43  #define PY_LONG_LONG LONG_LONG
44 #endif
45 #ifndef Py_HUGE_VAL
46  #define Py_HUGE_VAL HUGE_VAL
47 #endif
48 #ifdef PYPY_VERSION
49  #define CYTHON_COMPILING_IN_PYPY 1
50  #define CYTHON_COMPILING_IN_PYSTON 0
51  #define CYTHON_COMPILING_IN_CPYTHON 0
52  #undef CYTHON_USE_TYPE_SLOTS
53  #define CYTHON_USE_TYPE_SLOTS 0
54  #undef CYTHON_USE_PYTYPE_LOOKUP
55  #define CYTHON_USE_PYTYPE_LOOKUP 0
56  #if PY_VERSION_HEX < 0x03050000
57  #undef CYTHON_USE_ASYNC_SLOTS
58  #define CYTHON_USE_ASYNC_SLOTS 0
59  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
60  #define CYTHON_USE_ASYNC_SLOTS 1
61  #endif
62  #undef CYTHON_USE_PYLIST_INTERNALS
63  #define CYTHON_USE_PYLIST_INTERNALS 0
64  #undef CYTHON_USE_UNICODE_INTERNALS
65  #define CYTHON_USE_UNICODE_INTERNALS 0
66  #undef CYTHON_USE_UNICODE_WRITER
67  #define CYTHON_USE_UNICODE_WRITER 0
68  #undef CYTHON_USE_PYLONG_INTERNALS
69  #define CYTHON_USE_PYLONG_INTERNALS 0
70  #undef CYTHON_AVOID_BORROWED_REFS
71  #define CYTHON_AVOID_BORROWED_REFS 1
72  #undef CYTHON_ASSUME_SAFE_MACROS
73  #define CYTHON_ASSUME_SAFE_MACROS 0
74  #undef CYTHON_UNPACK_METHODS
75  #define CYTHON_UNPACK_METHODS 0
76  #undef CYTHON_FAST_THREAD_STATE
77  #define CYTHON_FAST_THREAD_STATE 0
78  #undef CYTHON_FAST_PYCALL
79  #define CYTHON_FAST_PYCALL 0
80  #undef CYTHON_PEP489_MULTI_PHASE_INIT
81  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
82  #undef CYTHON_USE_TP_FINALIZE
83  #define CYTHON_USE_TP_FINALIZE 0
84  #undef CYTHON_USE_DICT_VERSIONS
85  #define CYTHON_USE_DICT_VERSIONS 0
86  #undef CYTHON_USE_EXC_INFO_STACK
87  #define CYTHON_USE_EXC_INFO_STACK 0
88  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
89  #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
90  #endif
91 #elif defined(PYSTON_VERSION)
92  #define CYTHON_COMPILING_IN_PYPY 0
93  #define CYTHON_COMPILING_IN_PYSTON 1
94  #define CYTHON_COMPILING_IN_CPYTHON 0
95  #ifndef CYTHON_USE_TYPE_SLOTS
96  #define CYTHON_USE_TYPE_SLOTS 1
97  #endif
98  #undef CYTHON_USE_PYTYPE_LOOKUP
99  #define CYTHON_USE_PYTYPE_LOOKUP 0
100  #undef CYTHON_USE_ASYNC_SLOTS
101  #define CYTHON_USE_ASYNC_SLOTS 0
102  #undef CYTHON_USE_PYLIST_INTERNALS
103  #define CYTHON_USE_PYLIST_INTERNALS 0
104  #ifndef CYTHON_USE_UNICODE_INTERNALS
105  #define CYTHON_USE_UNICODE_INTERNALS 1
106  #endif
107  #undef CYTHON_USE_UNICODE_WRITER
108  #define CYTHON_USE_UNICODE_WRITER 0
109  #undef CYTHON_USE_PYLONG_INTERNALS
110  #define CYTHON_USE_PYLONG_INTERNALS 0
111  #ifndef CYTHON_AVOID_BORROWED_REFS
112  #define CYTHON_AVOID_BORROWED_REFS 0
113  #endif
114  #ifndef CYTHON_ASSUME_SAFE_MACROS
115  #define CYTHON_ASSUME_SAFE_MACROS 1
116  #endif
117  #ifndef CYTHON_UNPACK_METHODS
118  #define CYTHON_UNPACK_METHODS 1
119  #endif
120  #undef CYTHON_FAST_THREAD_STATE
121  #define CYTHON_FAST_THREAD_STATE 0
122  #undef CYTHON_FAST_PYCALL
123  #define CYTHON_FAST_PYCALL 0
124  #undef CYTHON_PEP489_MULTI_PHASE_INIT
125  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
126  #undef CYTHON_USE_TP_FINALIZE
127  #define CYTHON_USE_TP_FINALIZE 0
128  #undef CYTHON_USE_DICT_VERSIONS
129  #define CYTHON_USE_DICT_VERSIONS 0
130  #undef CYTHON_USE_EXC_INFO_STACK
131  #define CYTHON_USE_EXC_INFO_STACK 0
132  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
133  #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
134  #endif
135 #else
136  #define CYTHON_COMPILING_IN_PYPY 0
137  #define CYTHON_COMPILING_IN_PYSTON 0
138  #define CYTHON_COMPILING_IN_CPYTHON 1
139  #ifndef CYTHON_USE_TYPE_SLOTS
140  #define CYTHON_USE_TYPE_SLOTS 1
141  #endif
142  #if PY_VERSION_HEX < 0x02070000
143  #undef CYTHON_USE_PYTYPE_LOOKUP
144  #define CYTHON_USE_PYTYPE_LOOKUP 0
145  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
146  #define CYTHON_USE_PYTYPE_LOOKUP 1
147  #endif
148  #if PY_MAJOR_VERSION < 3
149  #undef CYTHON_USE_ASYNC_SLOTS
150  #define CYTHON_USE_ASYNC_SLOTS 0
151  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
152  #define CYTHON_USE_ASYNC_SLOTS 1
153  #endif
154  #if PY_VERSION_HEX < 0x02070000
155  #undef CYTHON_USE_PYLONG_INTERNALS
156  #define CYTHON_USE_PYLONG_INTERNALS 0
157  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
158  #define CYTHON_USE_PYLONG_INTERNALS 1
159  #endif
160  #ifndef CYTHON_USE_PYLIST_INTERNALS
161  #define CYTHON_USE_PYLIST_INTERNALS 1
162  #endif
163  #ifndef CYTHON_USE_UNICODE_INTERNALS
164  #define CYTHON_USE_UNICODE_INTERNALS 1
165  #endif
166  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
167  #undef CYTHON_USE_UNICODE_WRITER
168  #define CYTHON_USE_UNICODE_WRITER 0
169  #elif !defined(CYTHON_USE_UNICODE_WRITER)
170  #define CYTHON_USE_UNICODE_WRITER 1
171  #endif
172  #ifndef CYTHON_AVOID_BORROWED_REFS
173  #define CYTHON_AVOID_BORROWED_REFS 0
174  #endif
175  #ifndef CYTHON_ASSUME_SAFE_MACROS
176  #define CYTHON_ASSUME_SAFE_MACROS 1
177  #endif
178  #ifndef CYTHON_UNPACK_METHODS
179  #define CYTHON_UNPACK_METHODS 1
180  #endif
181  #if PY_VERSION_HEX >= 0x030B00A4
182  #undef CYTHON_FAST_THREAD_STATE
183  #define CYTHON_FAST_THREAD_STATE 0
184  #elif !defined(CYTHON_FAST_THREAD_STATE)
185  #define CYTHON_FAST_THREAD_STATE 1
186  #endif
187  #ifndef CYTHON_FAST_PYCALL
188  #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
189  #endif
190  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
191  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
192  #endif
193  #ifndef CYTHON_USE_TP_FINALIZE
194  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
195  #endif
196  #ifndef CYTHON_USE_DICT_VERSIONS
197  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
198  #endif
199  #if PY_VERSION_HEX >= 0x030B00A4
200  #undef CYTHON_USE_EXC_INFO_STACK
201  #define CYTHON_USE_EXC_INFO_STACK 0
202  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
203  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
204  #endif
205  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
206  #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
207  #endif
208 #endif
209 #if !defined(CYTHON_FAST_PYCCALL)
210 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
211 #endif
212 #if CYTHON_USE_PYLONG_INTERNALS
213  #if PY_MAJOR_VERSION < 3
214  #include "longintrepr.h"
215  #endif
216  #undef SHIFT
217  #undef BASE
218  #undef MASK
219  #ifdef SIZEOF_VOID_P
220  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
221  #endif
222 #endif
223 #ifndef __has_attribute
224  #define __has_attribute(x) 0
225 #endif
226 #ifndef __has_cpp_attribute
227  #define __has_cpp_attribute(x) 0
228 #endif
229 #ifndef CYTHON_RESTRICT
230  #if defined(__GNUC__)
231  #define CYTHON_RESTRICT __restrict__
232  #elif defined(_MSC_VER) && _MSC_VER >= 1400
233  #define CYTHON_RESTRICT __restrict
234  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
235  #define CYTHON_RESTRICT restrict
236  #else
237  #define CYTHON_RESTRICT
238  #endif
239 #endif
240 #ifndef CYTHON_UNUSED
241 # if defined(__GNUC__)
242 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
243 # define CYTHON_UNUSED __attribute__ ((__unused__))
244 # else
245 # define CYTHON_UNUSED
246 # endif
247 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
248 # define CYTHON_UNUSED __attribute__ ((__unused__))
249 # else
250 # define CYTHON_UNUSED
251 # endif
252 #endif
253 #ifndef CYTHON_MAYBE_UNUSED_VAR
254 # if defined(__cplusplus)
255  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
256 # else
257 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
258 # endif
259 #endif
260 #ifndef CYTHON_NCP_UNUSED
261 # if CYTHON_COMPILING_IN_CPYTHON
262 # define CYTHON_NCP_UNUSED
263 # else
264 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
265 # endif
266 #endif
267 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
268 #ifdef _MSC_VER
269  #ifndef _MSC_STDINT_H_
270  #if _MSC_VER < 1300
271  typedef unsigned char uint8_t;
272  typedef unsigned int uint32_t;
273  #else
274  typedef unsigned __int8 uint8_t;
275  typedef unsigned __int32 uint32_t;
276  #endif
277  #endif
278 #else
279  #include <stdint.h>
280 #endif
281 #ifndef CYTHON_FALLTHROUGH
282  #if defined(__cplusplus) && __cplusplus >= 201103L
283  #if __has_cpp_attribute(fallthrough)
284  #define CYTHON_FALLTHROUGH [[fallthrough]]
285  #elif __has_cpp_attribute(clang::fallthrough)
286  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
287  #elif __has_cpp_attribute(gnu::fallthrough)
288  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
289  #endif
290  #endif
291  #ifndef CYTHON_FALLTHROUGH
292  #if __has_attribute(fallthrough)
293  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
294  #else
295  #define CYTHON_FALLTHROUGH
296  #endif
297  #endif
298  #if defined(__clang__ ) && defined(__apple_build_version__)
299  #if __apple_build_version__ < 7000000
300  #undef CYTHON_FALLTHROUGH
301  #define CYTHON_FALLTHROUGH
302  #endif
303  #endif
304 #endif
305 
306 #ifndef __cplusplus
307  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
308 #endif
309 #ifndef CYTHON_INLINE
310  #if defined(__clang__)
311  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
312  #else
313  #define CYTHON_INLINE inline
314  #endif
315 #endif
316 template<typename T>
317 void __Pyx_call_destructor(T& x) {
318  x.~T();
319 }
320 template<typename T>
321 class __Pyx_FakeReference {
322  public:
323  __Pyx_FakeReference() : ptr(NULL) { }
324  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
325  T *operator->() { return ptr; }
326  T *operator&() { return ptr; }
327  operator T&() { return *ptr; }
328  template<typename U> bool operator ==(U other) { return *ptr == other; }
329  template<typename U> bool operator !=(U other) { return *ptr != other; }
330  private:
331  T *ptr;
332 };
333 
334 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
335  #define Py_OptimizeFlag 0
336 #endif
337 #define __PYX_BUILD_PY_SSIZE_T "n"
338 #define CYTHON_FORMAT_SSIZE_T "z"
339 #if PY_MAJOR_VERSION < 3
340  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
341  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
342  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
343  #define __Pyx_DefaultClassType PyClass_Type
344 #else
345  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
346  #define __Pyx_DefaultClassType PyType_Type
347 #if PY_VERSION_HEX >= 0x030B00A1
348  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
349  PyObject *code, PyObject *c, PyObject* n, PyObject *v,
350  PyObject *fv, PyObject *cell, PyObject* fn,
351  PyObject *name, int fline, PyObject *lnos) {
352  PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
353  PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
354  const char *fn_cstr=NULL;
355  const char *name_cstr=NULL;
356  PyCodeObject* co=NULL;
357  PyObject *type, *value, *traceback;
358  PyErr_Fetch(&type, &value, &traceback);
359  if (!(kwds=PyDict_New())) goto end;
360  if (!(argcount=PyLong_FromLong(a))) goto end;
361  if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
362  if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
363  if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
364  if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
365  if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
366  if (!(nlocals=PyLong_FromLong(l))) goto end;
367  if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
368  if (!(stacksize=PyLong_FromLong(s))) goto end;
369  if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
370  if (!(flags=PyLong_FromLong(f))) goto end;
371  if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
372  if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
373  if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
374  if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
375  if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
376  if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
377  if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
378  if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
379  if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
380  if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
381  if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
382  if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
383  if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
384  if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
385  Py_XDECREF((PyObject*)co);
386  co = (PyCodeObject*)call_result;
387  call_result = NULL;
388  if (0) {
389  cleanup_code_too:
390  Py_XDECREF((PyObject*)co);
391  co = NULL;
392  }
393  end:
394  Py_XDECREF(kwds);
395  Py_XDECREF(argcount);
396  Py_XDECREF(posonlyargcount);
397  Py_XDECREF(kwonlyargcount);
398  Py_XDECREF(nlocals);
399  Py_XDECREF(stacksize);
400  Py_XDECREF(replace);
401  Py_XDECREF(call_result);
402  Py_XDECREF(empty);
403  if (type) {
404  PyErr_Restore(type, value, traceback);
405  }
406  return co;
407  }
408 #else
409  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
410  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
411 #endif
412  #define __Pyx_DefaultClassType PyType_Type
413 #endif
414 #ifndef Py_TPFLAGS_CHECKTYPES
415  #define Py_TPFLAGS_CHECKTYPES 0
416 #endif
417 #ifndef Py_TPFLAGS_HAVE_INDEX
418  #define Py_TPFLAGS_HAVE_INDEX 0
419 #endif
420 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
421  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
422 #endif
423 #ifndef Py_TPFLAGS_HAVE_FINALIZE
424  #define Py_TPFLAGS_HAVE_FINALIZE 0
425 #endif
426 #ifndef METH_STACKLESS
427  #define METH_STACKLESS 0
428 #endif
429 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
430  #ifndef METH_FASTCALL
431  #define METH_FASTCALL 0x80
432  #endif
433  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
434  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
435  Py_ssize_t nargs, PyObject *kwnames);
436 #else
437  #define __Pyx_PyCFunctionFast _PyCFunctionFast
438  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
439 #endif
440 #if CYTHON_FAST_PYCCALL
441 #define __Pyx_PyFastCFunction_Check(func)\
442  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
443 #else
444 #define __Pyx_PyFastCFunction_Check(func) 0
445 #endif
446 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
447  #define PyObject_Malloc(s) PyMem_Malloc(s)
448  #define PyObject_Free(p) PyMem_Free(p)
449  #define PyObject_Realloc(p) PyMem_Realloc(p)
450 #endif
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
452  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
453  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
454  #define PyMem_RawFree(p) PyMem_Free(p)
455 #endif
456 #if CYTHON_COMPILING_IN_PYSTON
457  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
458  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
459 #else
460  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
461  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
462 #endif
463 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
464  #define __Pyx_PyThreadState_Current PyThreadState_GET()
465 #elif PY_VERSION_HEX >= 0x03060000
466  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
467 #elif PY_VERSION_HEX >= 0x03000000
468  #define __Pyx_PyThreadState_Current PyThreadState_GET()
469 #else
470  #define __Pyx_PyThreadState_Current _PyThreadState_Current
471 #endif
472 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
473 #include "pythread.h"
474 #define Py_tss_NEEDS_INIT 0
475 typedef int Py_tss_t;
476 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
477  *key = PyThread_create_key();
478  return 0;
479 }
480 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
481  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
482  *key = Py_tss_NEEDS_INIT;
483  return key;
484 }
485 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
486  PyObject_Free(key);
487 }
488 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
489  return *key != Py_tss_NEEDS_INIT;
490 }
491 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
492  PyThread_delete_key(*key);
493  *key = Py_tss_NEEDS_INIT;
494 }
495 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
496  return PyThread_set_key_value(*key, value);
497 }
498 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
499  return PyThread_get_key_value(*key);
500 }
501 #endif
502 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
503 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
504 #else
505 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
506 #endif
507 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
508  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
509  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
510 #else
511  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
512  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
513 #endif
514 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
515 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
516 #else
517 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
518 #endif
519 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
520  #define CYTHON_PEP393_ENABLED 1
521  #if defined(PyUnicode_IS_READY)
522  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
523  0 : _PyUnicode_Ready((PyObject *)(op)))
524  #else
525  #define __Pyx_PyUnicode_READY(op) (0)
526  #endif
527  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
528  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
529  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
530  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
531  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
532  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
533  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
534  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
535  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
536  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
537  #else
538  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
539  #endif
540  #else
541  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
542  #endif
543 #else
544  #define CYTHON_PEP393_ENABLED 0
545  #define PyUnicode_1BYTE_KIND 1
546  #define PyUnicode_2BYTE_KIND 2
547  #define PyUnicode_4BYTE_KIND 4
548  #define __Pyx_PyUnicode_READY(op) (0)
549  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
550  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
551  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
552  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
553  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
554  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
555  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
556  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
557 #endif
558 #if CYTHON_COMPILING_IN_PYPY
559  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
560  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
561 #else
562  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
563  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
564  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
565 #endif
566 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
567  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
568 #endif
569 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
570  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
571 #endif
572 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
573  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
574 #endif
575 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
576 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
577 #if PY_MAJOR_VERSION >= 3
578  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
579 #else
580  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
581 #endif
582 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
583  #define PyObject_ASCII(o) PyObject_Repr(o)
584 #endif
585 #if PY_MAJOR_VERSION >= 3
586  #define PyBaseString_Type PyUnicode_Type
587  #define PyStringObject PyUnicodeObject
588  #define PyString_Type PyUnicode_Type
589  #define PyString_Check PyUnicode_Check
590  #define PyString_CheckExact PyUnicode_CheckExact
591 #ifndef PyObject_Unicode
592  #define PyObject_Unicode PyObject_Str
593 #endif
594 #endif
595 #if PY_MAJOR_VERSION >= 3
596  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
597  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
598 #else
599  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
600  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
601 #endif
602 #ifndef PySet_CheckExact
603  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
604 #endif
605 #if PY_VERSION_HEX >= 0x030900A4
606  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
607  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
608 #else
609  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
610  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
611 #endif
612 #if CYTHON_ASSUME_SAFE_MACROS
613  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
614 #else
615  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
616 #endif
617 #if PY_MAJOR_VERSION >= 3
618  #define PyIntObject PyLongObject
619  #define PyInt_Type PyLong_Type
620  #define PyInt_Check(op) PyLong_Check(op)
621  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
622  #define PyInt_FromString PyLong_FromString
623  #define PyInt_FromUnicode PyLong_FromUnicode
624  #define PyInt_FromLong PyLong_FromLong
625  #define PyInt_FromSize_t PyLong_FromSize_t
626  #define PyInt_FromSsize_t PyLong_FromSsize_t
627  #define PyInt_AsLong PyLong_AsLong
628  #define PyInt_AS_LONG PyLong_AS_LONG
629  #define PyInt_AsSsize_t PyLong_AsSsize_t
630  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
631  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
632  #define PyNumber_Int PyNumber_Long
633 #endif
634 #if PY_MAJOR_VERSION >= 3
635  #define PyBoolObject PyLongObject
636 #endif
637 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
638  #ifndef PyUnicode_InternFromString
639  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
640  #endif
641 #endif
642 #if PY_VERSION_HEX < 0x030200A4
643  typedef long Py_hash_t;
644  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
645  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
646 #else
647  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
648  #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
649 #endif
650 #if PY_MAJOR_VERSION >= 3
651  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
652 #else
653  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
654 #endif
655 #if CYTHON_USE_ASYNC_SLOTS
656  #if PY_VERSION_HEX >= 0x030500B1
657  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
658  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
659  #else
660  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
661  #endif
662 #else
663  #define __Pyx_PyType_AsAsync(obj) NULL
664 #endif
665 #ifndef __Pyx_PyAsyncMethodsStruct
666  typedef struct {
667  unaryfunc am_await;
668  unaryfunc am_aiter;
669  unaryfunc am_anext;
670  } __Pyx_PyAsyncMethodsStruct;
671 #endif
672 
673 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
674  #if !defined(_USE_MATH_DEFINES)
675  #define _USE_MATH_DEFINES
676  #endif
677 #endif
678 #include <math.h>
679 #ifdef NAN
680 #define __PYX_NAN() ((float) NAN)
681 #else
682 static CYTHON_INLINE float __PYX_NAN() {
683  float value;
684  memset(&value, 0xFF, sizeof(value));
685  return value;
686 }
687 #endif
688 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
689 #define __Pyx_truncl trunc
690 #else
691 #define __Pyx_truncl truncl
692 #endif
693 
694 #define __PYX_MARK_ERR_POS(f_index, lineno) \
695  { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
696 #define __PYX_ERR(f_index, lineno, Ln_error) \
697  { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
698 
699 #ifndef __PYX_EXTERN_C
700  #ifdef __cplusplus
701  #define __PYX_EXTERN_C extern "C"
702  #else
703  #define __PYX_EXTERN_C extern
704  #endif
705 #endif
706 
707 #define __PYX_HAVE__mbd__CouplingFSI
708 #define __PYX_HAVE_API__mbd__CouplingFSI
709 /* Early includes */
710 #include <string.h>
711 #include <stdio.h>
712 #include "numpy/arrayobject.h"
713 #include "numpy/ndarrayobject.h"
714 #include "numpy/ndarraytypes.h"
715 #include "numpy/arrayscalars.h"
716 #include "numpy/ufuncobject.h"
717 
718  /* NumPy API declarations from "numpy/__init__.pxd" */
719 
720 #include <string>
721 #include "ios"
722 #include "new"
723 #include "stdexcept"
724 #include "typeinfo"
725 #include <vector>
726 #include <memory>
727 #include "ProtChMoorings.h"
728 #include "ChBodyAddedMass.h"
729 #include "swigpyobject.h"
730 #include "ProtChBody.h"
731 #include "pythread.h"
732 #include <stdlib.h>
733 #include "pystate.h"
734 #ifdef _OPENMP
735 #include <omp.h>
736 #endif /* _OPENMP */
737 
738 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
739 #define CYTHON_WITHOUT_ASSERTIONS
740 #endif
741 
742 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
743  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
744 
745 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
746 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
747 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
748 #define __PYX_DEFAULT_STRING_ENCODING ""
749 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
750 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
751 #define __Pyx_uchar_cast(c) ((unsigned char)c)
752 #define __Pyx_long_cast(x) ((long)x)
753 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
754  (sizeof(type) < sizeof(Py_ssize_t)) ||\
755  (sizeof(type) > sizeof(Py_ssize_t) &&\
756  likely(v < (type)PY_SSIZE_T_MAX ||\
757  v == (type)PY_SSIZE_T_MAX) &&\
758  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
759  v == (type)PY_SSIZE_T_MIN))) ||\
760  (sizeof(type) == sizeof(Py_ssize_t) &&\
761  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
762  v == (type)PY_SSIZE_T_MAX))) )
763 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
764  return (size_t) i < (size_t) limit;
765 }
766 #if defined (__cplusplus) && __cplusplus >= 201103L
767  #include <cstdlib>
768  #define __Pyx_sst_abs(value) std::abs(value)
769 #elif SIZEOF_INT >= SIZEOF_SIZE_T
770  #define __Pyx_sst_abs(value) abs(value)
771 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
772  #define __Pyx_sst_abs(value) labs(value)
773 #elif defined (_MSC_VER)
774  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
775 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
776  #define __Pyx_sst_abs(value) llabs(value)
777 #elif defined (__GNUC__)
778  #define __Pyx_sst_abs(value) __builtin_llabs(value)
779 #else
780  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
781 #endif
782 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
783 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
784 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
785 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
786 #define __Pyx_PyBytes_FromString PyBytes_FromString
787 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
788 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
789 #if PY_MAJOR_VERSION < 3
790  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
791  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
792 #else
793  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
794  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
795 #endif
796 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
797 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
798 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
799 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
800 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
801 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
802 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
803 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
804 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
805 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
806 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
807 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
808 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
809 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
810 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
811 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
812 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
813  const Py_UNICODE *u_end = u;
814  while (*u_end++) ;
815  return (size_t)(u_end - u - 1);
816 }
817 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
818 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
819 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
820 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
821 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
822 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
823 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
824 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
825 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
826 #define __Pyx_PySequence_Tuple(obj)\
827  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
828 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
829 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
830 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
831 #if CYTHON_ASSUME_SAFE_MACROS
832 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
833 #else
834 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
835 #endif
836 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
837 #if PY_MAJOR_VERSION >= 3
838 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
839 #else
840 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
841 #endif
842 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
843 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
844 static int __Pyx_sys_getdefaultencoding_not_ascii;
845 static int __Pyx_init_sys_getdefaultencoding_params(void) {
846  PyObject* sys;
847  PyObject* default_encoding = NULL;
848  PyObject* ascii_chars_u = NULL;
849  PyObject* ascii_chars_b = NULL;
850  const char* default_encoding_c;
851  sys = PyImport_ImportModule("sys");
852  if (!sys) goto bad;
853  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
854  Py_DECREF(sys);
855  if (!default_encoding) goto bad;
856  default_encoding_c = PyBytes_AsString(default_encoding);
857  if (!default_encoding_c) goto bad;
858  if (strcmp(default_encoding_c, "ascii") == 0) {
859  __Pyx_sys_getdefaultencoding_not_ascii = 0;
860  } else {
861  char ascii_chars[128];
862  int c;
863  for (c = 0; c < 128; c++) {
864  ascii_chars[c] = c;
865  }
866  __Pyx_sys_getdefaultencoding_not_ascii = 1;
867  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
868  if (!ascii_chars_u) goto bad;
869  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
870  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
871  PyErr_Format(
872  PyExc_ValueError,
873  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
874  default_encoding_c);
875  goto bad;
876  }
877  Py_DECREF(ascii_chars_u);
878  Py_DECREF(ascii_chars_b);
879  }
880  Py_DECREF(default_encoding);
881  return 0;
882 bad:
883  Py_XDECREF(default_encoding);
884  Py_XDECREF(ascii_chars_u);
885  Py_XDECREF(ascii_chars_b);
886  return -1;
887 }
888 #endif
889 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
890 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
891 #else
892 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
893 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
894 static char* __PYX_DEFAULT_STRING_ENCODING;
895 static int __Pyx_init_sys_getdefaultencoding_params(void) {
896  PyObject* sys;
897  PyObject* default_encoding = NULL;
898  char* default_encoding_c;
899  sys = PyImport_ImportModule("sys");
900  if (!sys) goto bad;
901  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
902  Py_DECREF(sys);
903  if (!default_encoding) goto bad;
904  default_encoding_c = PyBytes_AsString(default_encoding);
905  if (!default_encoding_c) goto bad;
906  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
907  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
908  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
909  Py_DECREF(default_encoding);
910  return 0;
911 bad:
912  Py_XDECREF(default_encoding);
913  return -1;
914 }
915 #endif
916 #endif
917 
918 
919 /* Test for GCC > 2.95 */
920 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
921  #define likely(x) __builtin_expect(!!(x), 1)
922  #define unlikely(x) __builtin_expect(!!(x), 0)
923 #else /* !__GNUC__ or GCC < 2.95 */
924  #define likely(x) (x)
925  #define unlikely(x) (x)
926 #endif /* __GNUC__ */
927 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
928 
929 static PyObject *__pyx_m = NULL;
930 static PyObject *__pyx_d;
931 static PyObject *__pyx_b;
932 static PyObject *__pyx_cython_runtime = NULL;
933 static PyObject *__pyx_empty_tuple;
934 static PyObject *__pyx_empty_bytes;
935 static PyObject *__pyx_empty_unicode;
936 static int __pyx_lineno;
937 static int __pyx_clineno = 0;
938 static const char * __pyx_cfilenm= __FILE__;
939 static const char *__pyx_filename;
940 
941 /* Header.proto */
942 #if !defined(CYTHON_CCOMPLEX)
943  #if defined(__cplusplus)
944  #define CYTHON_CCOMPLEX 1
945  #elif defined(_Complex_I)
946  #define CYTHON_CCOMPLEX 1
947  #else
948  #define CYTHON_CCOMPLEX 0
949  #endif
950 #endif
951 #if CYTHON_CCOMPLEX
952  #ifdef __cplusplus
953  #include <complex>
954  #else
955  #include <complex.h>
956  #endif
957 #endif
958 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
959  #undef _Complex_I
960  #define _Complex_I 1.0fj
961 #endif
962 
963 
964 static const char *__pyx_f[] = {
965  "proteus/mbd/CouplingFSI.pyx",
966  "stringsource",
967  "proteus/mbd/CouplingFSI.pxd",
968  "__init__.pxd",
969  "type.pxd",
970 };
971 /* MemviewSliceStruct.proto */
972 struct __pyx_memoryview_obj;
973 typedef struct {
974  struct __pyx_memoryview_obj *memview;
975  char *data;
976  Py_ssize_t shape[8];
977  Py_ssize_t strides[8];
978  Py_ssize_t suboffsets[8];
979 } __Pyx_memviewslice;
980 #define __Pyx_MemoryView_Len(m) (m.shape[0])
981 
982 /* Atomics.proto */
983 #include <pythread.h>
984 #ifndef CYTHON_ATOMICS
985  #define CYTHON_ATOMICS 1
986 #endif
987 #define __pyx_atomic_int_type int
988 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
989  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
990  !defined(__i386__)
991  #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
992  #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
993  #ifdef __PYX_DEBUG_ATOMICS
994  #warning "Using GNU atomics"
995  #endif
996 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
997  #include <Windows.h>
998  #undef __pyx_atomic_int_type
999  #define __pyx_atomic_int_type LONG
1000  #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
1001  #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
1002  #ifdef __PYX_DEBUG_ATOMICS
1003  #pragma message ("Using MSVC atomics")
1004  #endif
1005 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
1006  #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
1007  #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
1008  #ifdef __PYX_DEBUG_ATOMICS
1009  #warning "Using Intel atomics"
1010  #endif
1011 #else
1012  #undef CYTHON_ATOMICS
1013  #define CYTHON_ATOMICS 0
1014  #ifdef __PYX_DEBUG_ATOMICS
1015  #warning "Not using atomics"
1016  #endif
1017 #endif
1018 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
1019 #if CYTHON_ATOMICS
1020  #define __pyx_add_acquisition_count(memview)\
1021  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1022  #define __pyx_sub_acquisition_count(memview)\
1023  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
1024 #else
1025  #define __pyx_add_acquisition_count(memview)\
1026  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1027  #define __pyx_sub_acquisition_count(memview)\
1028  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
1029 #endif
1030 
1031 /* ForceInitThreads.proto */
1032 #ifndef __PYX_FORCE_INIT_THREADS
1033  #define __PYX_FORCE_INIT_THREADS 0
1034 #endif
1035 
1036 /* NoFastGil.proto */
1037 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
1038 #define __Pyx_PyGILState_Release PyGILState_Release
1039 #define __Pyx_FastGIL_Remember()
1040 #define __Pyx_FastGIL_Forget()
1041 #define __Pyx_FastGilFuncInit()
1042 
1043 /* BufferFormatStructs.proto */
1044 #define IS_UNSIGNED(type) (((type) -1) > 0)
1045 struct __Pyx_StructField_;
1046 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
1047 typedef struct {
1048  const char* name;
1049  struct __Pyx_StructField_* fields;
1050  size_t size;
1051  size_t arraysize[8];
1052  int ndim;
1053  char typegroup;
1054  char is_unsigned;
1055  int flags;
1056 } __Pyx_TypeInfo;
1057 typedef struct __Pyx_StructField_ {
1058  __Pyx_TypeInfo* type;
1059  const char* name;
1060  size_t offset;
1061 } __Pyx_StructField;
1062 typedef struct {
1063  __Pyx_StructField* field;
1064  size_t parent_offset;
1065 } __Pyx_BufFmt_StackElem;
1066 typedef struct {
1067  __Pyx_StructField root;
1068  __Pyx_BufFmt_StackElem* head;
1069  size_t fmt_offset;
1070  size_t new_count, enc_count;
1071  size_t struct_alignment;
1072  int is_complex;
1073  char enc_type;
1074  char new_packmode;
1075  char enc_packmode;
1076  char is_valid_array;
1077 } __Pyx_BufFmt_Context;
1078 
1079 
1080 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":690
1081  * # in Cython to enable them only on the right systems.
1082  *
1083  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
1084  * ctypedef npy_int16 int16_t
1085  * ctypedef npy_int32 int32_t
1086  */
1087 typedef npy_int8 __pyx_t_5numpy_int8_t;
1088 
1089 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":691
1090  *
1091  * ctypedef npy_int8 int8_t
1092  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
1093  * ctypedef npy_int32 int32_t
1094  * ctypedef npy_int64 int64_t
1095  */
1096 typedef npy_int16 __pyx_t_5numpy_int16_t;
1097 
1098 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":692
1099  * ctypedef npy_int8 int8_t
1100  * ctypedef npy_int16 int16_t
1101  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
1102  * ctypedef npy_int64 int64_t
1103  * #ctypedef npy_int96 int96_t
1104  */
1105 typedef npy_int32 __pyx_t_5numpy_int32_t;
1106 
1107 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":693
1108  * ctypedef npy_int16 int16_t
1109  * ctypedef npy_int32 int32_t
1110  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1111  * #ctypedef npy_int96 int96_t
1112  * #ctypedef npy_int128 int128_t
1113  */
1114 typedef npy_int64 __pyx_t_5numpy_int64_t;
1115 
1116 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":697
1117  * #ctypedef npy_int128 int128_t
1118  *
1119  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1120  * ctypedef npy_uint16 uint16_t
1121  * ctypedef npy_uint32 uint32_t
1122  */
1123 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1124 
1125 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":698
1126  *
1127  * ctypedef npy_uint8 uint8_t
1128  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1129  * ctypedef npy_uint32 uint32_t
1130  * ctypedef npy_uint64 uint64_t
1131  */
1132 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1133 
1134 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":699
1135  * ctypedef npy_uint8 uint8_t
1136  * ctypedef npy_uint16 uint16_t
1137  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1138  * ctypedef npy_uint64 uint64_t
1139  * #ctypedef npy_uint96 uint96_t
1140  */
1141 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1142 
1143 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":700
1144  * ctypedef npy_uint16 uint16_t
1145  * ctypedef npy_uint32 uint32_t
1146  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1147  * #ctypedef npy_uint96 uint96_t
1148  * #ctypedef npy_uint128 uint128_t
1149  */
1150 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1151 
1152 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":704
1153  * #ctypedef npy_uint128 uint128_t
1154  *
1155  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1156  * ctypedef npy_float64 float64_t
1157  * #ctypedef npy_float80 float80_t
1158  */
1159 typedef npy_float32 __pyx_t_5numpy_float32_t;
1160 
1161 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":705
1162  *
1163  * ctypedef npy_float32 float32_t
1164  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1165  * #ctypedef npy_float80 float80_t
1166  * #ctypedef npy_float128 float128_t
1167  */
1168 typedef npy_float64 __pyx_t_5numpy_float64_t;
1169 
1170 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":714
1171  * # The int types are mapped a bit surprising --
1172  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1173  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1174  * ctypedef npy_longlong long_t
1175  * ctypedef npy_longlong longlong_t
1176  */
1177 typedef npy_long __pyx_t_5numpy_int_t;
1178 
1179 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":715
1180  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1181  * ctypedef npy_long int_t
1182  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1183  * ctypedef npy_longlong longlong_t
1184  *
1185  */
1186 typedef npy_longlong __pyx_t_5numpy_long_t;
1187 
1188 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":716
1189  * ctypedef npy_long int_t
1190  * ctypedef npy_longlong long_t
1191  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1192  *
1193  * ctypedef npy_ulong uint_t
1194  */
1195 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1196 
1197 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":718
1198  * ctypedef npy_longlong longlong_t
1199  *
1200  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1201  * ctypedef npy_ulonglong ulong_t
1202  * ctypedef npy_ulonglong ulonglong_t
1203  */
1204 typedef npy_ulong __pyx_t_5numpy_uint_t;
1205 
1206 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":719
1207  *
1208  * ctypedef npy_ulong uint_t
1209  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1210  * ctypedef npy_ulonglong ulonglong_t
1211  *
1212  */
1213 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1214 
1215 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":720
1216  * ctypedef npy_ulong uint_t
1217  * ctypedef npy_ulonglong ulong_t
1218  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1219  *
1220  * ctypedef npy_intp intp_t
1221  */
1222 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1223 
1224 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":722
1225  * ctypedef npy_ulonglong ulonglong_t
1226  *
1227  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1228  * ctypedef npy_uintp uintp_t
1229  *
1230  */
1231 typedef npy_intp __pyx_t_5numpy_intp_t;
1232 
1233 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":723
1234  *
1235  * ctypedef npy_intp intp_t
1236  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1237  *
1238  * ctypedef npy_double float_t
1239  */
1240 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1241 
1242 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":725
1243  * ctypedef npy_uintp uintp_t
1244  *
1245  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1246  * ctypedef npy_double double_t
1247  * ctypedef npy_longdouble longdouble_t
1248  */
1249 typedef npy_double __pyx_t_5numpy_float_t;
1250 
1251 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":726
1252  *
1253  * ctypedef npy_double float_t
1254  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1255  * ctypedef npy_longdouble longdouble_t
1256  *
1257  */
1258 typedef npy_double __pyx_t_5numpy_double_t;
1259 
1260 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":727
1261  * ctypedef npy_double float_t
1262  * ctypedef npy_double double_t
1263  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1264  *
1265  * ctypedef npy_cfloat cfloat_t
1266  */
1267 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1268 /* Declarations.proto */
1269 #if CYTHON_CCOMPLEX
1270  #ifdef __cplusplus
1271  typedef ::std::complex< float > __pyx_t_float_complex;
1272  #else
1273  typedef float _Complex __pyx_t_float_complex;
1274  #endif
1275 #else
1276  typedef struct { float real, imag; } __pyx_t_float_complex;
1277 #endif
1278 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1279 
1280 /* Declarations.proto */
1281 #if CYTHON_CCOMPLEX
1282  #ifdef __cplusplus
1283  typedef ::std::complex< double > __pyx_t_double_complex;
1284  #else
1285  typedef double _Complex __pyx_t_double_complex;
1286  #endif
1287 #else
1288  typedef struct { double real, imag; } __pyx_t_double_complex;
1289 #endif
1290 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1291 
1292 
1293 /*--- Type declarations ---*/
1294 struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody;
1295 struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem;
1296 struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh;
1297 struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings;
1298 struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass;
1299 struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass;
1300 struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM;
1301 struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__;
1302 struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr;
1303 struct __pyx_array_obj;
1304 struct __pyx_MemviewEnum_obj;
1305 struct __pyx_memoryview_obj;
1306 struct __pyx_memoryviewslice_obj;
1307 
1308 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":729
1309  * ctypedef npy_longdouble longdouble_t
1310  *
1311  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1312  * ctypedef npy_cdouble cdouble_t
1313  * ctypedef npy_clongdouble clongdouble_t
1314  */
1315 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1316 
1317 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":730
1318  *
1319  * ctypedef npy_cfloat cfloat_t
1320  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1321  * ctypedef npy_clongdouble clongdouble_t
1322  *
1323  */
1324 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1325 
1326 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":731
1327  * ctypedef npy_cfloat cfloat_t
1328  * ctypedef npy_cdouble cdouble_t
1329  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1330  *
1331  * ctypedef npy_cdouble complex_t
1332  */
1333 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1334 
1335 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":733
1336  * ctypedef npy_clongdouble clongdouble_t
1337  *
1338  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1339  *
1340  * cdef inline object PyArray_MultiIterNew1(a):
1341  */
1342 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1343 
1344 /* "mbd/CouplingFSI.pxd":179
1345  *
1346  *
1347  * cdef class ProtChBody: # <<<<<<<<<<<<<<
1348  * cdef cppRigidBody * thisptr
1349  * cdef ch.ChQuaternion rotation
1350  */
1351 struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody {
1352  PyObject_HEAD
1353  struct __pyx_vtabstruct_3mbd_11CouplingFSI_ProtChBody *__pyx_vtab;
1354  cppRigidBody *thisptr;
1355  ChQuaternion<double> rotation;
1356  ChQuaternion<double> rotation_last;
1357  std::vector<ChVector<double> > trimesh_nodes;
1358  std::vector<ChTriangle> trimesh_triangles;
1359  PyObject *record_file;
1360  PyObject *model;
1361  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *ProtChSystem;
1362  PyObject *Shape;
1363  int nd;
1364  double dt;
1365  double width_2D;
1366  PyObject *record_dict;
1367  PyObject *prescribed_motion_function;
1368  PyObject *ChBody;
1369  struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *ChBodyAddedMass;
1370  PyArrayObject *position;
1371  PyArrayObject *position_last;
1372  PyArrayObject *F;
1373  PyArrayObject *M;
1374  PyArrayObject *F_last;
1375  PyArrayObject *M_last;
1376  PyArrayObject *F_prot;
1377  PyArrayObject *M_prot;
1378  PyArrayObject *F_prot_last;
1379  PyArrayObject *M_prot_last;
1380  PyArrayObject *F_applied;
1381  PyArrayObject *M_applied;
1382  PyArrayObject *F_applied_last;
1383  PyArrayObject *M_applied_last;
1384  PyArrayObject *F_Aij;
1385  PyArrayObject *M_Aij;
1386  PyArrayObject *F_Aij_last;
1387  PyArrayObject *M_Aij_last;
1388  PyArrayObject *acceleration;
1389  PyArrayObject *acceleration_last;
1390  PyArrayObject *velocity;
1391  PyArrayObject *velocity_last;
1392  PyArrayObject *ang_acceleration_last;
1393  PyArrayObject *ang_acceleration;
1394  PyArrayObject *ang_velocity_last;
1395  PyArrayObject *ang_velocity;
1396  double ang_vel_norm;
1397  double ang_vel_norm_last;
1398  PyArrayObject *barycenter0;
1399  PyArrayObject *rotation_init;
1400  PyArrayObject *rotm;
1401  PyArrayObject *rotm_last;
1402  PyArrayObject *rotq;
1403  PyArrayObject *rotq_last;
1404  PyArrayObject *adams_vel;
1405  std::string name;
1406  bool predicted;
1407  double dt_predict;
1408  PyArrayObject *h_predict;
1409  double h_ang_predict;
1410  PyArrayObject *h_ang_vel_predict;
1411  PyArrayObject *h_predict_last;
1412  double h_ang_predict_last;
1413  PyArrayObject *h_ang_vel_predict_last;
1414  PyArrayObject *Aij;
1415  bool applyAddedMass;
1416  bool Aij_updated_global;
1417  bool Aij_transform_local;
1418  bool useIBM;
1419  double radiusIBM;
1420  PyObject *sdfIBM;
1421  std::string hdfFileName;
1422  double Aij_factor;
1423  PyArrayObject *boundaryFlags;
1424 };
1425 
1426 
1427 /* "mbd/CouplingFSI.pxd":254
1428  *
1429  *
1430  * cdef class ProtChSystem: # <<<<<<<<<<<<<<
1431  * cdef cppSystem * thisptr
1432  * cdef double proteus_dt
1433  */
1434 struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem {
1435  PyObject_HEAD
1436  cppSystem *thisptr;
1437  double proteus_dt;
1438  double proteus_dt_last;
1439  double proteus_dt_next;
1440  std::string directory;
1441  PyObject *u;
1442  int nd;
1443  PyObject *femSpace_velocity;
1444  PyObject *femSpace_pressure;
1445  PyObject *nodes_kdtree;
1446  int min_nb_steps;
1447  double dt_fluid_next;
1448  double dt;
1449  double dt_last;
1450  double t;
1451  std::vector<std::shared_ptr<ChPhysicsItem> > myphysicsitem;
1452  std::vector<std::shared_ptr<ChBody> > mybodies;
1453  PyObject *ChSystemSMC;
1454  PyObject *ChSystem;
1455  PyObject *model;
1456  PyObject *model_module;
1457  double dt_init;
1458  double dt_fluid;
1459  double dt_fluid_last;
1460  PyObject *subcomponents;
1461  double chrono_dt;
1462  bool build_kdtree;
1463  bool dist_search;
1464  bool first_step;
1465  std::string scheme;
1466  std::string prediction;
1467  int step_nb;
1468  int step_start;
1469  double sampleRate;
1470  double next_sample;
1471  bool record_values;
1472  PyObject *model_mesh;
1473  PyObject *model_addedmass;
1474  struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *ProtChAddedMass;
1475  int tCount;
1476  bool initialized;
1477  bool update_substeps;
1478  int nBodiesIBM;
1479  PyObject *log_chrono_bodies;
1480  PyObject *log_chrono_springs;
1481  PyObject *log_chrono_residuals;
1482  std::string log_chrono_format;
1483 };
1484 
1485 
1486 /* "mbd/CouplingFSI.pxd":305
1487  *
1488  *
1489  * cdef class ProtChMesh: # <<<<<<<<<<<<<<
1490  * cdef shared_ptr[ch.ChMesh] mesh
1491  * cdef public:
1492  */
1493 struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh {
1494  PyObject_HEAD
1495  std::shared_ptr<ChMesh> mesh;
1496  PyObject *ChMeshh;
1497  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *ProtChSystem;
1498 };
1499 
1500 
1501 /* "mbd/CouplingFSI.pxd":312
1502  *
1503  *
1504  * cdef class ProtChMoorings: # <<<<<<<<<<<<<<
1505  * cdef cppMultiSegmentedCable * thisptr
1506  * cdef public:
1507  */
1508 struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings {
1509  PyObject_HEAD
1510  cppMultiSegmentedCable *thisptr;
1511  PyObject *record_file;
1512  PyObject *model;
1513  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *ProtChSystem;
1514  PyObject *Mesh;
1515  int nd;
1516  PyObject *nodes_function;
1517  PyObject *nodes_function_tangent;
1518  PyObject *fluid_velocity_function;
1519  struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *body_front;
1520  struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *body_back;
1521  bool front_body;
1522  bool back_body;
1523  bool nodes_built;
1524  bool external_forces_from_ns;
1525  bool external_forces_manual;
1526  PyArrayObject *fluid_density_array;
1527  PyArrayObject *fluid_velocity_array;
1528  PyArrayObject *fluid_velocity_array_previous;
1529  PyArrayObject *fluid_acceleration_array;
1530  std::string name;
1531  std::string beam_type;
1532  int nodes_nb;
1533  PyArrayObject *nb_elems;
1534  __Pyx_memviewslice _record_etas;
1535  PyObject *_record_names;
1536  PyObject *_record_etas_names;
1537  bool initialized;
1538  __Pyx_memviewslice nearest_node_array;
1539  __Pyx_memviewslice containing_element_array;
1540  __Pyx_memviewslice owning_rank;
1541  std::string hdfFileName;
1542  __Pyx_memviewslice tCount_value;
1543  int tCount;
1544  PyObject *nodes;
1545  PyObject *elements;
1546 };
1547 
1548 
1549 /* "mbd/CouplingFSI.pxd":355
1550  *
1551  *
1552  * cdef class ProtChAddedMass: # <<<<<<<<<<<<<<
1553  * cdef public:
1554  * object model
1555  */
1556 struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass {
1557  PyObject_HEAD
1558  PyObject *model;
1559  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *ProtChSystem;
1560 };
1561 
1562 
1563 /* "mbd/CouplingFSI.pxd":361
1564  *
1565  *
1566  * cdef class ChBodyAddedMass: # <<<<<<<<<<<<<<
1567  * cdef shared_ptr[ch.ChBodyAddedMass] sharedptr
1568  * cdef shared_ptr[ch.ChBody] sharedptr_chbody
1569  */
1570 struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass {
1571  PyObject_HEAD
1572  struct __pyx_vtabstruct_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_vtab;
1573  std::shared_ptr<ChBodyAddedMass> sharedptr;
1574  std::shared_ptr<ChBody> sharedptr_chbody;
1575  ChBodyAddedMass *thisptr;
1576  ChBody *bodyptr;
1577  PyObject *ChBodySWIG;
1578 };
1579 
1580 
1581 /* "mbd/CouplingFSI.pyx":828
1582  * self.updateIBM()
1583  *
1584  * def updateIBM(self): # <<<<<<<<<<<<<<
1585  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
1586  * if c.use_ball_as_particle:
1587  */
1588 struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM {
1589  PyObject_HEAD
1590  struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self;
1591 };
1592 
1593 
1594 /* "mbd/CouplingFSI.pyx":2465
1595  * """
1596  *
1597  * def __cinit__(self, # <<<<<<<<<<<<<<
1598  * ProtChSystem system,
1599  * ProtChMesh mesh,
1600  */
1601 struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ {
1602  PyObject_HEAD
1603  PyObject *__pyx_v_check_arrays;
1604  __Pyx_memviewslice __pyx_v_length;
1605 };
1606 
1607 
1608 /* "mbd/CouplingFSI.pyx":2475
1609  * string beam_type="CableANCF"):
1610  * check_arrays = [len(length), len(nb_elems), len(d), len(rho), len(E)]
1611  * assert all(v == len(length) for v in check_arrays), 'arrays are not of same length' # <<<<<<<<<<<<<<
1612  * self.ProtChSystem = system
1613  * self.ProtChSystem.addSubcomponent(self)
1614  */
1615 struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr {
1616  PyObject_HEAD
1617  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *__pyx_outer_scope;
1618  PyObject *__pyx_v_v;
1619 };
1620 
1621 
1622 /* "View.MemoryView":105
1623  *
1624  * @cname("__pyx_array")
1625  * cdef class array: # <<<<<<<<<<<<<<
1626  *
1627  * cdef:
1628  */
1629 struct __pyx_array_obj {
1630  PyObject_HEAD
1631  struct __pyx_vtabstruct_array *__pyx_vtab;
1632  char *data;
1633  Py_ssize_t len;
1634  char *format;
1635  int ndim;
1636  Py_ssize_t *_shape;
1637  Py_ssize_t *_strides;
1638  Py_ssize_t itemsize;
1639  PyObject *mode;
1640  PyObject *_format;
1641  void (*callback_free_data)(void *);
1642  int free_data;
1643  int dtype_is_object;
1644 };
1645 
1646 
1647 /* "View.MemoryView":279
1648  *
1649  * @cname('__pyx_MemviewEnum')
1650  * cdef class Enum(object): # <<<<<<<<<<<<<<
1651  * cdef object name
1652  * def __init__(self, name):
1653  */
1654 struct __pyx_MemviewEnum_obj {
1655  PyObject_HEAD
1656  PyObject *name;
1657 };
1658 
1659 
1660 /* "View.MemoryView":330
1661  *
1662  * @cname('__pyx_memoryview')
1663  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1664  *
1665  * cdef object obj
1666  */
1667 struct __pyx_memoryview_obj {
1668  PyObject_HEAD
1669  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1670  PyObject *obj;
1671  PyObject *_size;
1672  PyObject *_array_interface;
1673  PyThread_type_lock lock;
1674  __pyx_atomic_int acquisition_count[2];
1675  __pyx_atomic_int *acquisition_count_aligned_p;
1676  Py_buffer view;
1677  int flags;
1678  int dtype_is_object;
1679  __Pyx_TypeInfo *typeinfo;
1680 };
1681 
1682 
1683 /* "View.MemoryView":965
1684  *
1685  * @cname('__pyx_memoryviewslice')
1686  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1687  * "Internal class for passing memoryview slices to Python"
1688  *
1689  */
1690 struct __pyx_memoryviewslice_obj {
1691  struct __pyx_memoryview_obj __pyx_base;
1692  __Pyx_memviewslice from_slice;
1693  PyObject *from_object;
1694  PyObject *(*to_object_func)(char *);
1695  int (*to_dtype_func)(char *, PyObject *);
1696 };
1697 
1698 
1699 
1700 /* "mbd/CouplingFSI.pyx":65
1701  *
1702  *
1703  * cdef class ProtChBody: # <<<<<<<<<<<<<<
1704  *
1705  * def __cinit__(self,
1706  */
1707 
1708 struct __pyx_vtabstruct_3mbd_11CouplingFSI_ProtChBody {
1709  PyArrayObject *(*callPrescribedMotion)(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *, double);
1710 };
1711 static struct __pyx_vtabstruct_3mbd_11CouplingFSI_ProtChBody *__pyx_vtabptr_3mbd_11CouplingFSI_ProtChBody;
1712 
1713 
1714 /* "mbd/CouplingFSI.pyx":3607
1715  * # limit_Rz)
1716  *
1717  * cdef class ChBodyAddedMass: # <<<<<<<<<<<<<<
1718  * """Cython class for ChBodyAddedMass
1719  * (!) Uses shared_ptr
1720  */
1721 
1722 struct __pyx_vtabstruct_3mbd_11CouplingFSI_ChBodyAddedMass {
1723  void (*SetMfullmass)(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *, ChMatrixDynamic<double> );
1724 };
1725 static struct __pyx_vtabstruct_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_vtabptr_3mbd_11CouplingFSI_ChBodyAddedMass;
1726 
1727 
1728 /* "View.MemoryView":105
1729  *
1730  * @cname("__pyx_array")
1731  * cdef class array: # <<<<<<<<<<<<<<
1732  *
1733  * cdef:
1734  */
1735 
1736 struct __pyx_vtabstruct_array {
1737  PyObject *(*get_memview)(struct __pyx_array_obj *);
1738 };
1739 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1740 
1741 
1742 /* "View.MemoryView":330
1743  *
1744  * @cname('__pyx_memoryview')
1745  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1746  *
1747  * cdef object obj
1748  */
1749 
1750 struct __pyx_vtabstruct_memoryview {
1751  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1752  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1753  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1754  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1755  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1756  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1757  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1758 };
1759 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1760 
1761 
1762 /* "View.MemoryView":965
1763  *
1764  * @cname('__pyx_memoryviewslice')
1765  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1766  * "Internal class for passing memoryview slices to Python"
1767  *
1768  */
1769 
1770 struct __pyx_vtabstruct__memoryviewslice {
1771  struct __pyx_vtabstruct_memoryview __pyx_base;
1772 };
1773 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1774 
1775 /* --- Runtime support code (head) --- */
1776 /* Refnanny.proto */
1777 #ifndef CYTHON_REFNANNY
1778  #define CYTHON_REFNANNY 0
1779 #endif
1780 #if CYTHON_REFNANNY
1781  typedef struct {
1782  void (*INCREF)(void*, PyObject*, int);
1783  void (*DECREF)(void*, PyObject*, int);
1784  void (*GOTREF)(void*, PyObject*, int);
1785  void (*GIVEREF)(void*, PyObject*, int);
1786  void* (*SetupContext)(const char*, int, const char*);
1787  void (*FinishContext)(void**);
1788  } __Pyx_RefNannyAPIStruct;
1789  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1790  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1791  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1792 #ifdef WITH_THREAD
1793  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1794  if (acquire_gil) {\
1795  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1796  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1797  PyGILState_Release(__pyx_gilstate_save);\
1798  } else {\
1799  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1800  }
1801 #else
1802  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1803  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1804 #endif
1805  #define __Pyx_RefNannyFinishContext()\
1806  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1807  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1808  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1809  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1810  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1811  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1812  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1813  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1814  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1815 #else
1816  #define __Pyx_RefNannyDeclarations
1817  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1818  #define __Pyx_RefNannyFinishContext()
1819  #define __Pyx_INCREF(r) Py_INCREF(r)
1820  #define __Pyx_DECREF(r) Py_DECREF(r)
1821  #define __Pyx_GOTREF(r)
1822  #define __Pyx_GIVEREF(r)
1823  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1824  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1825  #define __Pyx_XGOTREF(r)
1826  #define __Pyx_XGIVEREF(r)
1827 #endif
1828 #define __Pyx_XDECREF_SET(r, v) do {\
1829  PyObject *tmp = (PyObject *) r;\
1830  r = v; __Pyx_XDECREF(tmp);\
1831  } while (0)
1832 #define __Pyx_DECREF_SET(r, v) do {\
1833  PyObject *tmp = (PyObject *) r;\
1834  r = v; __Pyx_DECREF(tmp);\
1835  } while (0)
1836 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1837 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1838 
1839 /* PyObjectGetAttrStr.proto */
1840 #if CYTHON_USE_TYPE_SLOTS
1841 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1842 #else
1843 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1844 #endif
1845 
1846 /* GetBuiltinName.proto */
1847 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1848 
1849 /* RaiseDoubleKeywords.proto */
1850 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1851 
1852 /* ParseKeywords.proto */
1853 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1854  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1855  const char* function_name);
1856 
1857 /* RaiseArgTupleInvalid.proto */
1858 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1859  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1860 
1861 /* ArgTypeTest.proto */
1862 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1863  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1864  __Pyx__ArgTypeTest(obj, type, name, exact))
1865 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1866 
1867 /* PyThreadStateGet.proto */
1868 #if CYTHON_FAST_THREAD_STATE
1869 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1870 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1871 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1872 #else
1873 #define __Pyx_PyThreadState_declare
1874 #define __Pyx_PyThreadState_assign
1875 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1876 #endif
1877 
1878 /* PyErrFetchRestore.proto */
1879 #if CYTHON_FAST_THREAD_STATE
1880 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1881 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1882 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1883 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1884 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1885 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1886 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1887 #if CYTHON_COMPILING_IN_CPYTHON
1888 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1889 #else
1890 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1891 #endif
1892 #else
1893 #define __Pyx_PyErr_Clear() PyErr_Clear()
1894 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1895 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1896 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1897 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1898 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1899 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1900 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1901 #endif
1902 
1903 /* Profile.proto */
1904 #ifndef CYTHON_PROFILE
1905 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
1906  #define CYTHON_PROFILE 0
1907 #else
1908  #define CYTHON_PROFILE 1
1909 #endif
1910 #endif
1911 #ifndef CYTHON_TRACE_NOGIL
1912  #define CYTHON_TRACE_NOGIL 0
1913 #else
1914  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
1915  #define CYTHON_TRACE 1
1916  #endif
1917 #endif
1918 #ifndef CYTHON_TRACE
1919  #define CYTHON_TRACE 0
1920 #endif
1921 #if CYTHON_TRACE
1922  #undef CYTHON_PROFILE_REUSE_FRAME
1923 #endif
1924 #ifndef CYTHON_PROFILE_REUSE_FRAME
1925  #define CYTHON_PROFILE_REUSE_FRAME 0
1926 #endif
1927 #if CYTHON_PROFILE || CYTHON_TRACE
1928  #include "compile.h"
1929  #include "frameobject.h"
1930  #include "traceback.h"
1931 #if PY_VERSION_HEX >= 0x030b00a6
1932  #ifndef Py_BUILD_CORE
1933  #define Py_BUILD_CORE 1
1934  #endif
1935  #include "internal/pycore_frame.h"
1936 #endif
1937  #if CYTHON_PROFILE_REUSE_FRAME
1938  #define CYTHON_FRAME_MODIFIER static
1939  #define CYTHON_FRAME_DEL(frame)
1940  #else
1941  #define CYTHON_FRAME_MODIFIER
1942  #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
1943  #endif
1944  #define __Pyx_TraceDeclarations\
1945  static PyCodeObject *__pyx_frame_code = NULL;\
1946  CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
1947  int __Pyx_use_tracing = 0;
1948  #define __Pyx_TraceFrameInit(codeobj)\
1949  if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
1950 #if PY_VERSION_HEX >= 0x030b00a2
1951  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1952  (unlikely((tstate)->cframe->use_tracing) &&\
1953  (!(check_tracing) || !(tstate)->tracing) &&\
1954  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1955  #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
1956  #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
1957 #elif PY_VERSION_HEX >= 0x030a00b1
1958  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1959  (unlikely((tstate)->cframe->use_tracing) &&\
1960  (!(check_tracing) || !(tstate)->tracing) &&\
1961  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1962  #define __Pyx_EnterTracing(tstate)\
1963  do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
1964  #define __Pyx_LeaveTracing(tstate)\
1965  do {\
1966  tstate->tracing--;\
1967  tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1968  || tstate->c_profilefunc != NULL);\
1969  } while (0)
1970 #else
1971  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
1972  (unlikely((tstate)->use_tracing) &&\
1973  (!(check_tracing) || !(tstate)->tracing) &&\
1974  (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
1975  #define __Pyx_EnterTracing(tstate)\
1976  do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
1977  #define __Pyx_LeaveTracing(tstate)\
1978  do {\
1979  tstate->tracing--;\
1980  tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
1981  || tstate->c_profilefunc != NULL);\
1982  } while (0)
1983 #endif
1984  #ifdef WITH_THREAD
1985  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
1986  if (nogil) {\
1987  if (CYTHON_TRACE_NOGIL) {\
1988  PyThreadState *tstate;\
1989  PyGILState_STATE state = PyGILState_Ensure();\
1990  tstate = __Pyx_PyThreadState_Current;\
1991  if (__Pyx_IsTracing(tstate, 1, 1)) {\
1992  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
1993  }\
1994  PyGILState_Release(state);\
1995  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
1996  }\
1997  } else {\
1998  PyThreadState* tstate = PyThreadState_GET();\
1999  if (__Pyx_IsTracing(tstate, 1, 1)) {\
2000  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
2001  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
2002  }\
2003  }
2004  #else
2005  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
2006  { PyThreadState* tstate = PyThreadState_GET();\
2007  if (__Pyx_IsTracing(tstate, 1, 1)) {\
2008  __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
2009  if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
2010  }\
2011  }
2012  #endif
2013  #define __Pyx_TraceException()\
2014  if (likely(!__Pyx_use_tracing)); else {\
2015  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
2016  if (__Pyx_IsTracing(tstate, 0, 1)) {\
2017  __Pyx_EnterTracing(tstate);\
2018  PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
2019  if (exc_info) {\
2020  if (CYTHON_TRACE && tstate->c_tracefunc)\
2021  tstate->c_tracefunc(\
2022  tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
2023  tstate->c_profilefunc(\
2024  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
2025  Py_DECREF(exc_info);\
2026  }\
2027  __Pyx_LeaveTracing(tstate);\
2028  }\
2029  }
2030  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
2031  PyObject *type, *value, *traceback;
2032  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
2033  __Pyx_EnterTracing(tstate);
2034  if (CYTHON_TRACE && tstate->c_tracefunc)
2035  tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
2036  if (tstate->c_profilefunc)
2037  tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
2038  CYTHON_FRAME_DEL(frame);
2039  __Pyx_LeaveTracing(tstate);
2040  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
2041  }
2042  #ifdef WITH_THREAD
2043  #define __Pyx_TraceReturn(result, nogil)\
2044  if (likely(!__Pyx_use_tracing)); else {\
2045  if (nogil) {\
2046  if (CYTHON_TRACE_NOGIL) {\
2047  PyThreadState *tstate;\
2048  PyGILState_STATE state = PyGILState_Ensure();\
2049  tstate = __Pyx_PyThreadState_Current;\
2050  if (__Pyx_IsTracing(tstate, 0, 0)) {\
2051  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
2052  }\
2053  PyGILState_Release(state);\
2054  }\
2055  } else {\
2056  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
2057  if (__Pyx_IsTracing(tstate, 0, 0)) {\
2058  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
2059  }\
2060  }\
2061  }
2062  #else
2063  #define __Pyx_TraceReturn(result, nogil)\
2064  if (likely(!__Pyx_use_tracing)); else {\
2065  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
2066  if (__Pyx_IsTracing(tstate, 0, 0)) {\
2067  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
2068  }\
2069  }
2070  #endif
2071  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
2072  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
2073 #else
2074  #define __Pyx_TraceDeclarations
2075  #define __Pyx_TraceFrameInit(codeobj)
2076  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
2077  #define __Pyx_TraceException()
2078  #define __Pyx_TraceReturn(result, nogil)
2079 #endif
2080 #if CYTHON_TRACE
2081  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
2082  int ret;
2083  PyObject *type, *value, *traceback;
2084  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
2085  __Pyx_PyFrame_SetLineNumber(frame, lineno);
2086  __Pyx_EnterTracing(tstate);
2087  ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
2088  __Pyx_LeaveTracing(tstate);
2089  if (likely(!ret)) {
2090  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
2091  } else {
2092  Py_XDECREF(type);
2093  Py_XDECREF(value);
2094  Py_XDECREF(traceback);
2095  }
2096  return ret;
2097  }
2098  #ifdef WITH_THREAD
2099  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
2100  if (likely(!__Pyx_use_tracing)); else {\
2101  if (nogil) {\
2102  if (CYTHON_TRACE_NOGIL) {\
2103  int ret = 0;\
2104  PyThreadState *tstate;\
2105  PyGILState_STATE state = PyGILState_Ensure();\
2106  tstate = __Pyx_PyThreadState_Current;\
2107  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
2108  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
2109  }\
2110  PyGILState_Release(state);\
2111  if (unlikely(ret)) goto_error;\
2112  }\
2113  } else {\
2114  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
2115  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
2116  int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
2117  if (unlikely(ret)) goto_error;\
2118  }\
2119  }\
2120  }
2121  #else
2122  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
2123  if (likely(!__Pyx_use_tracing)); else {\
2124  PyThreadState* tstate = __Pyx_PyThreadState_Current;\
2125  if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
2126  int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
2127  if (unlikely(ret)) goto_error;\
2128  }\
2129  }
2130  #endif
2131 #else
2132  #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
2133 #endif
2134 
2135 /* PyFunctionFastCall.proto */
2136 #if CYTHON_FAST_PYCALL
2137 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
2138  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
2139 #if 1 || PY_VERSION_HEX < 0x030600B1
2140 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
2141 #else
2142 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
2143 #endif
2144 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
2145  (sizeof(char [1 - 2*!(cond)]) - 1)
2146 #ifndef Py_MEMBER_SIZE
2147 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
2148 #endif
2149 #if CYTHON_FAST_PYCALL
2150  static size_t __pyx_pyframe_localsplus_offset = 0;
2151  #include "frameobject.h"
2152 #if PY_VERSION_HEX >= 0x030b00a6
2153  #ifndef Py_BUILD_CORE
2154  #define Py_BUILD_CORE 1
2155  #endif
2156  #include "internal/pycore_frame.h"
2157 #endif
2158  #define __Pxy_PyFrame_Initialize_Offsets()\
2159  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
2160  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
2161  #define __Pyx_PyFrame_GetLocalsplus(frame)\
2162  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
2163 #endif // CYTHON_FAST_PYCALL
2164 #endif
2165 
2166 /* PyObjectCall.proto */
2167 #if CYTHON_COMPILING_IN_CPYTHON
2168 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
2169 #else
2170 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
2171 #endif
2172 
2173 /* PyObjectCallMethO.proto */
2174 #if CYTHON_COMPILING_IN_CPYTHON
2175 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
2176 #endif
2177 
2178 /* PyObjectCallNoArg.proto */
2179 #if CYTHON_COMPILING_IN_CPYTHON
2180 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
2181 #else
2182 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
2183 #endif
2184 
2185 /* PyCFunctionFastCall.proto */
2186 #if CYTHON_FAST_PYCCALL
2187 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
2188 #else
2189 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
2190 #endif
2191 
2192 /* PyObjectCall2Args.proto */
2193 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
2194 
2195 /* PyObjectCallOneArg.proto */
2196 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
2197 
2198 /* PyDictVersioning.proto */
2199 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
2200 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
2201 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
2202 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
2203  (version_var) = __PYX_GET_DICT_VERSION(dict);\
2204  (cache_var) = (value);
2205 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
2206  static PY_UINT64_T __pyx_dict_version = 0;\
2207  static PyObject *__pyx_dict_cached_value = NULL;\
2208  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
2209  (VAR) = __pyx_dict_cached_value;\
2210  } else {\
2211  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
2212  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
2213  }\
2214 }
2215 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
2216 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
2217 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
2218 #else
2219 #define __PYX_GET_DICT_VERSION(dict) (0)
2220 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
2221 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
2222 #endif
2223 
2224 /* GetModuleGlobalName.proto */
2225 #if CYTHON_USE_DICT_VERSIONS
2226 #define __Pyx_GetModuleGlobalName(var, name) {\
2227  static PY_UINT64_T __pyx_dict_version = 0;\
2228  static PyObject *__pyx_dict_cached_value = NULL;\
2229  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
2230  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
2231  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2232 }
2233 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
2234  PY_UINT64_T __pyx_dict_version;\
2235  PyObject *__pyx_dict_cached_value;\
2236  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
2237 }
2238 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
2239 #else
2240 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2241 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
2242 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
2243 #endif
2244 
2245 /* ExtTypeTest.proto */
2246 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
2247 
2248 /* PySequenceContains.proto */
2249 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
2250  int result = PySequence_Contains(seq, item);
2251  return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
2252 }
2253 
2254 /* GetItemInt.proto */
2255 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2256  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2257  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
2258  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
2259  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
2260 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2261  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2262  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2263  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
2264 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
2265  int wraparound, int boundscheck);
2266 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2267  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2268  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
2269  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
2270 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
2271  int wraparound, int boundscheck);
2272 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
2273 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
2274  int is_list, int wraparound, int boundscheck);
2275 
2276 /* MemviewSliceInit.proto */
2277 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2278 #define __Pyx_MEMVIEW_DIRECT 1
2279 #define __Pyx_MEMVIEW_PTR 2
2280 #define __Pyx_MEMVIEW_FULL 4
2281 #define __Pyx_MEMVIEW_CONTIG 8
2282 #define __Pyx_MEMVIEW_STRIDED 16
2283 #define __Pyx_MEMVIEW_FOLLOW 32
2284 #define __Pyx_IS_C_CONTIG 1
2285 #define __Pyx_IS_F_CONTIG 2
2286 static int __Pyx_init_memviewslice(
2287  struct __pyx_memoryview_obj *memview,
2288  int ndim,
2289  __Pyx_memviewslice *memviewslice,
2290  int memview_is_new_reference);
2291 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2292  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2293 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2294  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2295 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2296 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2297 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2298 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2299 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2300 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2301 
2302 /* PyIntBinop.proto */
2303 #if !CYTHON_COMPILING_IN_PYPY
2304 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2305 #else
2306 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
2307  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
2308 #endif
2309 
2310 /* BufferIndexError.proto */
2311 static void __Pyx_RaiseBufferIndexError(int axis);
2312 
2313 /* SliceObject.proto */
2314 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
2315  PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
2316  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
2317  int has_cstart, int has_cstop, int wraparound);
2318 
2319 /* SliceObject.proto */
2320 #define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)\
2321  __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound)
2322 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(
2323  PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop,
2324  PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
2325  int has_cstart, int has_cstop, int wraparound);
2326 
2327 /* PyIntBinop.proto */
2328 #if !CYTHON_COMPILING_IN_PYPY
2329 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
2330 #else
2331 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace, zerodivision_check)\
2332  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
2333 #endif
2334 
2335 /* ObjectGetItem.proto */
2336 #if CYTHON_USE_TYPE_SLOTS
2337 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
2338 #else
2339 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
2340 #endif
2341 
2342 /* RaiseTooManyValuesToUnpack.proto */
2343 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
2344 
2345 /* RaiseNeedMoreValuesToUnpack.proto */
2346 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
2347 
2348 /* IterFinish.proto */
2349 static CYTHON_INLINE int __Pyx_IterFinish(void);
2350 
2351 /* UnpackItemEndCheck.proto */
2352 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
2353 
2354 /* PyFloatBinop.proto */
2355 #if !CYTHON_COMPILING_IN_PYPY
2356 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
2357 #else
2358 #define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
2359  ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
2360  #endif
2361 
2362 /* PyIntCompare.proto */
2363 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
2364 
2365 /* None.proto */
2366 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
2367 
2368 /* None.proto */
2369 static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
2370 
2371 /* FetchCommonType.proto */
2372 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
2373 
2374 /* CythonFunctionShared.proto */
2375 #define __Pyx_CyFunction_USED 1
2376 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
2377 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
2378 #define __Pyx_CYFUNCTION_CCLASS 0x04
2379 #define __Pyx_CyFunction_GetClosure(f)\
2380  (((__pyx_CyFunctionObject *) (f))->func_closure)
2381 #define __Pyx_CyFunction_GetClassObj(f)\
2382  (((__pyx_CyFunctionObject *) (f))->func_classobj)
2383 #define __Pyx_CyFunction_Defaults(type, f)\
2384  ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
2385 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
2386  ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
2387 typedef struct {
2388  PyCFunctionObject func;
2389 #if PY_VERSION_HEX < 0x030500A0
2390  PyObject *func_weakreflist;
2391 #endif
2392  PyObject *func_dict;
2393  PyObject *func_name;
2394  PyObject *func_qualname;
2395  PyObject *func_doc;
2396  PyObject *func_globals;
2397  PyObject *func_code;
2398  PyObject *func_closure;
2399  PyObject *func_classobj;
2400  void *defaults;
2401  int defaults_pyobjects;
2402  size_t defaults_size; // used by FusedFunction for copying defaults
2403  int flags;
2404  PyObject *defaults_tuple;
2405  PyObject *defaults_kwdict;
2406  PyObject *(*defaults_getter)(PyObject *);
2407  PyObject *func_annotations;
2408 } __pyx_CyFunctionObject;
2409 static PyTypeObject *__pyx_CyFunctionType = 0;
2410 #define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType))
2411 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
2412  int flags, PyObject* qualname,
2413  PyObject *self,
2414  PyObject *module, PyObject *globals,
2415  PyObject* code);
2416 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
2417  size_t size,
2418  int pyobjects);
2419 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
2420  PyObject *tuple);
2421 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
2422  PyObject *dict);
2423 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
2424  PyObject *dict);
2425 static int __pyx_CyFunction_init(void);
2426 
2427 /* CythonFunction.proto */
2428 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
2429  int flags, PyObject* qualname,
2430  PyObject *closure,
2431  PyObject *module, PyObject *globals,
2432  PyObject* code);
2433 
2434 /* GetTopmostException.proto */
2435 #if CYTHON_USE_EXC_INFO_STACK
2436 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
2437 #endif
2438 
2439 /* SaveResetException.proto */
2440 #if CYTHON_FAST_THREAD_STATE
2441 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
2442 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2443 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
2444 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
2445 #else
2446 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
2447 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
2448 #endif
2449 
2450 /* GetException.proto */
2451 #if CYTHON_FAST_THREAD_STATE
2452 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
2453 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2454 #else
2455 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
2456 #endif
2457 
2458 /* PyObjectLookupSpecial.proto */
2459 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
2460 static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
2461  PyObject *res;
2462  PyTypeObject *tp = Py_TYPE(obj);
2463 #if PY_MAJOR_VERSION < 3
2464  if (unlikely(PyInstance_Check(obj)))
2465  return __Pyx_PyObject_GetAttrStr(obj, attr_name);
2466 #endif
2467  res = _PyType_Lookup(tp, attr_name);
2468  if (likely(res)) {
2469  descrgetfunc f = Py_TYPE(res)->tp_descr_get;
2470  if (!f) {
2471  Py_INCREF(res);
2472  } else {
2473  res = f(res, obj, (PyObject *)tp);
2474  }
2475  } else {
2476  PyErr_SetObject(PyExc_AttributeError, attr_name);
2477  }
2478  return res;
2479 }
2480 #else
2481 #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
2482 #endif
2483 
2484 /* GetAttr.proto */
2485 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
2486 
2487 /* PyObjectSetAttrStr.proto */
2488 #if CYTHON_USE_TYPE_SLOTS
2489 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
2490 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
2491 #else
2492 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
2493 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
2494 #endif
2495 
2496 /* SetItemInt.proto */
2497 #define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
2498  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
2499  __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
2500  (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
2501  __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
2502 static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
2503 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
2504  int is_list, int wraparound, int boundscheck);
2505 
2506 /* RaiseException.proto */
2507 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
2508 
2509 /* Import.proto */
2510 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
2511 
2512 /* ListCompAppend.proto */
2513 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2514 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
2515  PyListObject* L = (PyListObject*) list;
2516  Py_ssize_t len = Py_SIZE(list);
2517  if (likely(L->allocated > len)) {
2518  Py_INCREF(x);
2519  PyList_SET_ITEM(list, len, x);
2520  __Pyx_SET_SIZE(list, len + 1);
2521  return 0;
2522  }
2523  return PyList_Append(list, x);
2524 }
2525 #else
2526 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
2527 #endif
2528 
2529 /* IncludeStringH.proto */
2530 #include <string.h>
2531 
2532 /* BytesEquals.proto */
2533 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
2534 
2535 /* UnicodeEquals.proto */
2536 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
2537 
2538 /* StrEquals.proto */
2539 #if PY_MAJOR_VERSION >= 3
2540 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
2541 #else
2542 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
2543 #endif
2544 
2545 /* ListAppend.proto */
2546 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
2547 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
2548  PyListObject* L = (PyListObject*) list;
2549  Py_ssize_t len = Py_SIZE(list);
2550  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
2551  Py_INCREF(x);
2552  PyList_SET_ITEM(list, len, x);
2553  __Pyx_SET_SIZE(list, len + 1);
2554  return 0;
2555  }
2556  return PyList_Append(list, x);
2557 }
2558 #else
2559 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
2560 #endif
2561 
2562 /* DictGetItem.proto */
2563 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
2564 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
2565 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
2566  (likely(PyDict_CheckExact(obj)) ?\
2567  __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
2568 #else
2569 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
2570 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
2571 #endif
2572 
2573 /* set_iter.proto */
2574 static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
2575  Py_ssize_t* p_orig_length, int* p_source_is_set);
2576 static CYTHON_INLINE int __Pyx_set_iter_next(
2577  PyObject* iter_obj, Py_ssize_t orig_length,
2578  Py_ssize_t* ppos, PyObject **value,
2579  int source_is_set);
2580 
2581 /* WriteUnraisableException.proto */
2582 static void __Pyx_WriteUnraisable(const char *name, int clineno,
2583  int lineno, const char *filename,
2584  int full_traceback, int nogil);
2585 
2586 /* KeywordStringCheck.proto */
2587 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
2588 
2589 /* PyErrExceptionMatches.proto */
2590 #if CYTHON_FAST_THREAD_STATE
2591 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
2592 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
2593 #else
2594 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
2595 #endif
2596 
2597 /* DivInt[Py_ssize_t].proto */
2598 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
2599 
2600 /* UnaryNegOverflows.proto */
2601 #define UNARY_NEG_WOULD_OVERFLOW(x)\
2602  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
2603 
2604 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2605 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
2606 /* decode_c_string_utf16.proto */
2607 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
2608  int byteorder = 0;
2609  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2610 }
2611 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
2612  int byteorder = -1;
2613  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2614 }
2615 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
2616  int byteorder = 1;
2617  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
2618 }
2619 
2620 /* decode_c_string.proto */
2621 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
2622  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
2623  const char* encoding, const char* errors,
2624  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
2625 
2626 /* GetAttr3.proto */
2627 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
2628 
2629 /* RaiseNoneIterError.proto */
2630 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
2631 
2632 /* SwapException.proto */
2633 #if CYTHON_FAST_THREAD_STATE
2634 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
2635 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
2636 #else
2637 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
2638 #endif
2639 
2640 /* FastTypeChecks.proto */
2641 #if CYTHON_COMPILING_IN_CPYTHON
2642 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
2643 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
2644 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
2645 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
2646 #else
2647 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
2648 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
2649 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
2650 #endif
2651 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
2652 
2653 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
2654 /* ListExtend.proto */
2655 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
2656 #if CYTHON_COMPILING_IN_CPYTHON
2657  PyObject* none = _PyList_Extend((PyListObject*)L, v);
2658  if (unlikely(!none))
2659  return -1;
2660  Py_DECREF(none);
2661  return 0;
2662 #else
2663  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
2664 #endif
2665 }
2666 
2667 /* DivInt[long].proto */
2668 static CYTHON_INLINE long __Pyx_div_long(long, long);
2669 
2670 /* ImportFrom.proto */
2671 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
2672 
2673 /* HasAttr.proto */
2674 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
2675 
2676 /* PyObject_GenericGetAttrNoDict.proto */
2677 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2678 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
2679 #else
2680 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
2681 #endif
2682 
2683 /* PyObject_GenericGetAttr.proto */
2684 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
2685 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
2686 #else
2687 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
2688 #endif
2689 
2690 /* SetVTable.proto */
2691 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
2692 
2693 /* PyObjectGetAttrStrNoError.proto */
2694 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
2695 
2696 /* SetupReduce.proto */
2697 static int __Pyx_setup_reduce(PyObject* type_obj);
2698 
2699 /* TypeImport.proto */
2700 #ifndef __PYX_HAVE_RT_ImportType_proto
2701 #define __PYX_HAVE_RT_ImportType_proto
2702 enum __Pyx_ImportType_CheckSize {
2703  __Pyx_ImportType_CheckSize_Error = 0,
2704  __Pyx_ImportType_CheckSize_Warn = 1,
2705  __Pyx_ImportType_CheckSize_Ignore = 2
2706 };
2707 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
2708 #endif
2709 
2710 /* CLineInTraceback.proto */
2711 #ifdef CYTHON_CLINE_IN_TRACEBACK
2712 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
2713 #else
2714 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
2715 #endif
2716 
2717 /* CodeObjectCache.proto */
2718 typedef struct {
2719  PyCodeObject* code_object;
2720  int code_line;
2721 } __Pyx_CodeObjectCacheEntry;
2722 struct __Pyx_CodeObjectCache {
2723  int count;
2724  int max_count;
2725  __Pyx_CodeObjectCacheEntry* entries;
2726 };
2727 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
2728 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
2729 static PyCodeObject *__pyx_find_code_object(int code_line);
2730 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
2731 
2732 /* AddTraceback.proto */
2733 static void __Pyx_AddTraceback(const char *funcname, int c_line,
2734  int py_line, const char *filename);
2735 
2736 /* None.proto */
2737 #include <new>
2738 
2739 #if PY_MAJOR_VERSION < 3
2740  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2741  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2742 #else
2743  #define __Pyx_GetBuffer PyObject_GetBuffer
2744  #define __Pyx_ReleaseBuffer PyBuffer_Release
2745 #endif
2746 
2747 
2748 /* BufferStructDeclare.proto */
2749 typedef struct {
2750  Py_ssize_t shape, strides, suboffsets;
2751 } __Pyx_Buf_DimInfo;
2752 typedef struct {
2753  size_t refcount;
2754  Py_buffer pybuffer;
2755 } __Pyx_Buffer;
2756 typedef struct {
2757  __Pyx_Buffer *rcbuffer;
2758  char *data;
2759  __Pyx_Buf_DimInfo diminfo[8];
2760 } __Pyx_LocalBuf_ND;
2761 
2762 /* MemviewSliceIsContig.proto */
2763 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2764 
2765 /* OverlappingSlices.proto */
2766 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2767  __Pyx_memviewslice *slice2,
2768  int ndim, size_t itemsize);
2769 
2770 /* Capsule.proto */
2771 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2772 
2773 /* IsLittleEndian.proto */
2774 static CYTHON_INLINE int __Pyx_Is_Little_Endian(void);
2775 
2776 /* BufferFormatCheck.proto */
2777 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts);
2778 static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
2779  __Pyx_BufFmt_StackElem* stack,
2780  __Pyx_TypeInfo* type);
2781 
2782 /* TypeInfoCompare.proto */
2783 static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b);
2784 
2785 /* MemviewSliceValidateAndInit.proto */
2786 static int __Pyx_ValidateAndInit_memviewslice(
2787  int *axes_specs,
2788  int c_or_f_flag,
2789  int buf_flags,
2790  int ndim,
2791  __Pyx_TypeInfo *dtype,
2792  __Pyx_BufFmt_StackElem stack[],
2793  __Pyx_memviewslice *memviewslice,
2794  PyObject *original_obj);
2795 
2796 /* ObjectToMemviewSlice.proto */
2797 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *, int writable_flag);
2798 
2799 /* ObjectToMemviewSlice.proto */
2800 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_double(PyObject *, int writable_flag);
2801 
2802 /* GCCDiagnostics.proto */
2803 #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
2804 #define __Pyx_HAS_GCC_DIAGNOSTIC
2805 #endif
2806 
2807 /* ObjectToMemviewSlice.proto */
2808 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(PyObject *, int writable_flag);
2809 
2810 /* MemviewDtypeToObject.proto */
2811 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
2812 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
2813 
2814 /* CppExceptionConversion.proto */
2815 #ifndef __Pyx_CppExn2PyErr
2816 #include <new>
2817 #include <typeinfo>
2818 #include <stdexcept>
2819 #include <ios>
2820 static void __Pyx_CppExn2PyErr() {
2821  try {
2822  if (PyErr_Occurred())
2823  ; // let the latest Python exn pass through and ignore the current one
2824  else
2825  throw;
2826  } catch (const std::bad_alloc& exn) {
2827  PyErr_SetString(PyExc_MemoryError, exn.what());
2828  } catch (const std::bad_cast& exn) {
2829  PyErr_SetString(PyExc_TypeError, exn.what());
2830  } catch (const std::bad_typeid& exn) {
2831  PyErr_SetString(PyExc_TypeError, exn.what());
2832  } catch (const std::domain_error& exn) {
2833  PyErr_SetString(PyExc_ValueError, exn.what());
2834  } catch (const std::invalid_argument& exn) {
2835  PyErr_SetString(PyExc_ValueError, exn.what());
2836  } catch (const std::ios_base::failure& exn) {
2837  PyErr_SetString(PyExc_IOError, exn.what());
2838  } catch (const std::out_of_range& exn) {
2839  PyErr_SetString(PyExc_IndexError, exn.what());
2840  } catch (const std::overflow_error& exn) {
2841  PyErr_SetString(PyExc_OverflowError, exn.what());
2842  } catch (const std::range_error& exn) {
2843  PyErr_SetString(PyExc_ArithmeticError, exn.what());
2844  } catch (const std::underflow_error& exn) {
2845  PyErr_SetString(PyExc_ArithmeticError, exn.what());
2846  } catch (const std::exception& exn) {
2847  PyErr_SetString(PyExc_RuntimeError, exn.what());
2848  }
2849  catch (...)
2850  {
2851  PyErr_SetString(PyExc_RuntimeError, "Unknown exception");
2852  }
2853 }
2854 #endif
2855 
2856 /* ObjectToMemviewSlice.proto */
2857 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_int(PyObject *, int writable_flag);
2858 
2859 /* MemviewDtypeToObject.proto */
2860 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
2861 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
2862 
2863 /* Print.proto */
2864 static int __Pyx_Print(PyObject*, PyObject *, int);
2865 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
2866 static PyObject* __pyx_print = 0;
2867 static PyObject* __pyx_print_kwargs = 0;
2868 #endif
2869 
2870 /* ObjectToMemviewSlice.proto */
2871 static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *, int writable_flag);
2872 
2873 /* RealImag.proto */
2874 #if CYTHON_CCOMPLEX
2875  #ifdef __cplusplus
2876  #define __Pyx_CREAL(z) ((z).real())
2877  #define __Pyx_CIMAG(z) ((z).imag())
2878  #else
2879  #define __Pyx_CREAL(z) (__real__(z))
2880  #define __Pyx_CIMAG(z) (__imag__(z))
2881  #endif
2882 #else
2883  #define __Pyx_CREAL(z) ((z).real)
2884  #define __Pyx_CIMAG(z) ((z).imag)
2885 #endif
2886 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2887  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2888  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2889  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2890 #else
2891  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2892  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2893 #endif
2894 
2895 /* Arithmetic.proto */
2896 #if CYTHON_CCOMPLEX
2897  #define __Pyx_c_eq_float(a, b) ((a)==(b))
2898  #define __Pyx_c_sum_float(a, b) ((a)+(b))
2899  #define __Pyx_c_diff_float(a, b) ((a)-(b))
2900  #define __Pyx_c_prod_float(a, b) ((a)*(b))
2901  #define __Pyx_c_quot_float(a, b) ((a)/(b))
2902  #define __Pyx_c_neg_float(a) (-(a))
2903  #ifdef __cplusplus
2904  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2905  #define __Pyx_c_conj_float(z) (::std::conj(z))
2906  #if 1
2907  #define __Pyx_c_abs_float(z) (::std::abs(z))
2908  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2909  #endif
2910  #else
2911  #define __Pyx_c_is_zero_float(z) ((z)==0)
2912  #define __Pyx_c_conj_float(z) (conjf(z))
2913  #if 1
2914  #define __Pyx_c_abs_float(z) (cabsf(z))
2915  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2916  #endif
2917  #endif
2918 #else
2919  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2920  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2921  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2922  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2923  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2924  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2925  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2926  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2927  #if 1
2928  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2929  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2930  #endif
2931 #endif
2932 
2933 /* Arithmetic.proto */
2934 #if CYTHON_CCOMPLEX
2935  #define __Pyx_c_eq_double(a, b) ((a)==(b))
2936  #define __Pyx_c_sum_double(a, b) ((a)+(b))
2937  #define __Pyx_c_diff_double(a, b) ((a)-(b))
2938  #define __Pyx_c_prod_double(a, b) ((a)*(b))
2939  #define __Pyx_c_quot_double(a, b) ((a)/(b))
2940  #define __Pyx_c_neg_double(a) (-(a))
2941  #ifdef __cplusplus
2942  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2943  #define __Pyx_c_conj_double(z) (::std::conj(z))
2944  #if 1
2945  #define __Pyx_c_abs_double(z) (::std::abs(z))
2946  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2947  #endif
2948  #else
2949  #define __Pyx_c_is_zero_double(z) ((z)==0)
2950  #define __Pyx_c_conj_double(z) (conj(z))
2951  #if 1
2952  #define __Pyx_c_abs_double(z) (cabs(z))
2953  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2954  #endif
2955  #endif
2956 #else
2957  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2958  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2959  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2960  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2961  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2962  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2963  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2964  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2965  #if 1
2966  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2967  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2968  #endif
2969 #endif
2970 
2971 /* MemviewSliceCopyTemplate.proto */
2972 static __Pyx_memviewslice
2973 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2974  const char *mode, int ndim,
2975  size_t sizeof_dtype, int contig_flag,
2976  int dtype_is_object);
2977 
2978 /* CIntFromPy.proto */
2979 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2980 
2981 /* CIntToPy.proto */
2982 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2983 
2984 /* CIntFromPy.proto */
2985 static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);
2986 
2987 /* CIntToPy.proto */
2988 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
2989 
2990 /* CIntFromPy.proto */
2991 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2992 
2993 /* PrintOne.proto */
2994 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
2995 
2996 /* CIntFromPy.proto */
2997 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2998 
2999 /* PyObjectGetMethod.proto */
3000 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
3001 
3002 /* PyObjectCallMethod1.proto */
3003 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
3004 
3005 /* CoroutineBase.proto */
3006 typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
3007 #if CYTHON_USE_EXC_INFO_STACK
3008 #define __Pyx_ExcInfoStruct _PyErr_StackItem
3009 #else
3010 typedef struct {
3011  PyObject *exc_type;
3012  PyObject *exc_value;
3013  PyObject *exc_traceback;
3014 } __Pyx_ExcInfoStruct;
3015 #endif
3016 typedef struct {
3017  PyObject_HEAD
3018  __pyx_coroutine_body_t body;
3019  PyObject *closure;
3020  __Pyx_ExcInfoStruct gi_exc_state;
3021  PyObject *gi_weakreflist;
3022  PyObject *classobj;
3023  PyObject *yieldfrom;
3024  PyObject *gi_name;
3025  PyObject *gi_qualname;
3026  PyObject *gi_modulename;
3027  PyObject *gi_code;
3028  PyObject *gi_frame;
3029  int resume_label;
3030  char is_running;
3031 } __pyx_CoroutineObject;
3032 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
3033  PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
3034  PyObject *name, PyObject *qualname, PyObject *module_name);
3035 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
3036  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
3037  PyObject *name, PyObject *qualname, PyObject *module_name);
3038 static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self);
3039 static int __Pyx_Coroutine_clear(PyObject *self);
3040 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
3041 static PyObject *__Pyx_Coroutine_Close(PyObject *self);
3042 static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
3043 #if CYTHON_USE_EXC_INFO_STACK
3044 #define __Pyx_Coroutine_SwapException(self)
3045 #define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state)
3046 #else
3047 #define __Pyx_Coroutine_SwapException(self) {\
3048  __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback);\
3049  __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state);\
3050  }
3051 #define __Pyx_Coroutine_ResetAndClearException(self) {\
3052  __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback);\
3053  (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL;\
3054  }
3055 #endif
3056 #if CYTHON_FAST_THREAD_STATE
3057 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
3058  __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
3059 #else
3060 #define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
3061  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
3062 #endif
3063 static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
3064 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state);
3065 
3066 /* PatchModuleWithCoroutine.proto */
3067 static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
3068 
3069 /* PatchGeneratorABC.proto */
3070 static int __Pyx_patch_abc(void);
3071 
3072 /* Generator.proto */
3073 #define __Pyx_Generator_USED
3074 static PyTypeObject *__pyx_GeneratorType = 0;
3075 #define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
3076 #define __Pyx_Generator_New(body, code, closure, name, qualname, module_name)\
3077  __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name)
3078 static PyObject *__Pyx_Generator_Next(PyObject *self);
3079 static int __pyx_Generator_init(void);
3080 
3081 /* CheckBinaryVersion.proto */
3082 static int __Pyx_check_binary_version(void);
3083 
3084 /* InitStrings.proto */
3085 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
3086 
3087 static PyArrayObject *__pyx_f_3mbd_11CouplingFSI_10ProtChBody_callPrescribedMotion(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_t); /* proto*/
3088 static void __pyx_f_3mbd_11CouplingFSI_15ChBodyAddedMass_SetMfullmass(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self, ChMatrixDynamic<double> __pyx_v_Mfullmass_in); /* proto*/
3089 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
3090 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
3091 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
3092 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
3093 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
3094 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
3095 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
3096 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
3097 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
3098 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
3099 
3100 /* Module declarations from 'cpython.buffer' */
3101 
3102 /* Module declarations from 'libc.string' */
3103 
3104 /* Module declarations from 'libc.stdio' */
3105 
3106 /* Module declarations from '__builtin__' */
3107 
3108 /* Module declarations from 'cpython.type' */
3109 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
3110 
3111 /* Module declarations from 'cpython' */
3112 
3113 /* Module declarations from 'cpython.object' */
3114 
3115 /* Module declarations from 'cpython.ref' */
3116 
3117 /* Module declarations from 'cpython.mem' */
3118 
3119 /* Module declarations from 'numpy' */
3120 
3121 /* Module declarations from 'numpy' */
3122 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
3123 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
3124 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
3125 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
3126 static PyTypeObject *__pyx_ptype_5numpy_generic = 0;
3127 static PyTypeObject *__pyx_ptype_5numpy_number = 0;
3128 static PyTypeObject *__pyx_ptype_5numpy_integer = 0;
3129 static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0;
3130 static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0;
3131 static PyTypeObject *__pyx_ptype_5numpy_inexact = 0;
3132 static PyTypeObject *__pyx_ptype_5numpy_floating = 0;
3133 static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0;
3134 static PyTypeObject *__pyx_ptype_5numpy_flexible = 0;
3135 static PyTypeObject *__pyx_ptype_5numpy_character = 0;
3136 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
3137 
3138 /* Module declarations from 'libcpp.string' */
3139 
3140 /* Module declarations from 'libcpp.vector' */
3141 
3142 /* Module declarations from 'libcpp' */
3143 
3144 /* Module declarations from 'libcpp.memory' */
3145 
3146 /* Module declarations from 'mbd.ChronoHeaders' */
3147 
3148 /* Module declarations from 'mbd.CouplingFSI' */
3149 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI_ProtChBody = 0;
3150 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem = 0;
3151 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI_ProtChMesh = 0;
3152 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings = 0;
3153 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass = 0;
3154 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI_ChBodyAddedMass = 0;
3155 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM = 0;
3156 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ = 0;
3157 static PyTypeObject *__pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr = 0;
3158 static PyTypeObject *__pyx_array_type = 0;
3159 static PyTypeObject *__pyx_MemviewEnum_type = 0;
3160 static PyTypeObject *__pyx_memoryview_type = 0;
3161 static PyTypeObject *__pyx_memoryviewslice_type = 0;
3162 static PyObject *generic = 0;
3163 static PyObject *strided = 0;
3164 static PyObject *indirect = 0;
3165 static PyObject *contiguous = 0;
3166 static PyObject *indirect_contiguous = 0;
3167 static int __pyx_memoryview_thread_locks_used;
3168 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
3169 static PyObject *__pyx_f_3mbd_11CouplingFSI_pyxGetLocalNearestNode(__Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, __Pyx_memviewslice, int, int); /*proto*/
3170 static void __pyx_f_3mbd_11CouplingFSI_attachNodeToNode(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *, int, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *, int, int __pyx_skip_dispatch); /*proto*/
3171 static std::string __pyx_convert_string_from_py_std__in_string(PyObject *); /*proto*/
3172 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &); /*proto*/
3173 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &); /*proto*/
3174 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &); /*proto*/
3175 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &); /*proto*/
3176 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &); /*proto*/
3177 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
3178 static void *__pyx_align_pointer(void *, size_t); /*proto*/
3179 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
3180 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
3181 static PyObject *_unellipsify(PyObject *, int); /*proto*/
3182 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
3183 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
3184 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
3185 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
3186 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
3187 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
3188 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3189 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3190 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
3191 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
3192 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
3193 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
3194 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
3195 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
3196 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
3197 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
3198 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
3199 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
3200 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
3201 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
3202 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
3203 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
3204 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
3205 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3206 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
3207 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
3208 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
3209 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
3210 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
3211 static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
3212 #define __Pyx_MODULE_NAME "mbd.CouplingFSI"
3213 extern int __pyx_module_is_main_mbd__CouplingFSI;
3214 int __pyx_module_is_main_mbd__CouplingFSI = 0;
3215 
3216 /* Implementation of 'mbd.CouplingFSI' */
3217 static PyObject *__pyx_builtin_enumerate;
3218 static PyObject *__pyx_builtin_range;
3219 static PyObject *__pyx_builtin_open;
3220 static PyObject *__pyx_builtin_TypeError;
3221 static PyObject *__pyx_builtin_NotImplementedError;
3222 static PyObject *__pyx_builtin_ImportError;
3223 static PyObject *__pyx_builtin_ValueError;
3224 static PyObject *__pyx_builtin_MemoryError;
3225 static PyObject *__pyx_builtin_Ellipsis;
3226 static PyObject *__pyx_builtin_id;
3227 static PyObject *__pyx_builtin_IndexError;
3228 static const char __pyx_k_8[] = "8";
3229 static const char __pyx_k_A[] = "A";
3230 static const char __pyx_k_E[] = "E";
3231 static const char __pyx_k_F[] = "F";
3232 static const char __pyx_k_L[] = "L";
3233 static const char __pyx_k_M[] = "M";
3234 static const char __pyx_k_O[] = "O";
3235 static const char __pyx_k_T[] = "T";
3236 static const char __pyx_k_a[] = "a";
3237 static const char __pyx_k_c[] = "c";
3238 static const char __pyx_k_d[] = "d";
3239 static const char __pyx_k_f[] = "f";
3240 static const char __pyx_k_g[] = "g";
3241 static const char __pyx_k_h[] = "h";
3242 static const char __pyx_k_i[] = "i";
3243 static const char __pyx_k_j[] = "j";
3244 static const char __pyx_k_s[] = "s";
3245 static const char __pyx_k_t[] = "t";
3246 static const char __pyx_k_u[] = "u";
3247 static const char __pyx_k_v[] = "v";
3248 static const char __pyx_k_w[] = "w";
3249 static const char __pyx_k_x[] = "x";
3250 static const char __pyx_k_y[] = "y";
3251 static const char __pyx_k_z[] = "z";
3252 static const char __pyx_k_ET[] = "ET";
3253 static const char __pyx_k_FM[] = "FM";
3254 static const char __pyx_k_Fd[] = "Fd";
3255 static const char __pyx_k_Fx[] = "Fx";
3256 static const char __pyx_k_Fy[] = "Fy";
3257 static const char __pyx_k_Fz[] = "Fz";
3258 static const char __pyx_k_L0[] = "L0";
3259 static const char __pyx_k_MM[] = "MM";
3260 static const char __pyx_k_Mp[] = "Mp";
3261 static const char __pyx_k_Mx[] = "Mx";
3262 static const char __pyx_k_My[] = "My";
3263 static const char __pyx_k_Mz[] = "Mz";
3264 static const char __pyx_k_Tb[] = "Tb";
3265 static const char __pyx_k_Tf[] = "Tf";
3266 static const char __pyx_k_aa[] = "aa";
3267 static const char __pyx_k_am[] = "am";
3268 static const char __pyx_k_ar[] = "ar";
3269 static const char __pyx_k_ax[] = "ax";
3270 static const char __pyx_k_ay[] = "ay";
3271 static const char __pyx_k_az[] = "az";
3272 static const char __pyx_k_bd[] = "bd";
3273 static const char __pyx_k_ds[] = "ds";
3274 static const char __pyx_k_dt[] = "dt";
3275 static const char __pyx_k_e0[] = "e0";
3276 static const char __pyx_k_e1[] = "e1";
3277 static const char __pyx_k_e2[] = "e2";
3278 static const char __pyx_k_e3[] = "e3";
3279 static const char __pyx_k_eN[] = "eN";
3280 static const char __pyx_k_el[] = "el";
3281 static const char __pyx_k_h5[] = ".h5";
3282 static const char __pyx_k_hx[] = "hx";
3283 static const char __pyx_k_hy[] = "hy";
3284 static const char __pyx_k_hz[] = "hz";
3285 static const char __pyx_k_i8[] = "i8";
3286 static const char __pyx_k_id[] = "id";
3287 static const char __pyx_k_mg[] = "mg";
3288 static const char __pyx_k_mm[] = "mm";
3289 static const char __pyx_k_nB[] = "nB";
3290 static const char __pyx_k_nP[] = "nP";
3291 static const char __pyx_k_nb[] = "nb";
3292 static const char __pyx_k_nd[] = "nd";
3293 static const char __pyx_k_np[] = "np";
3294 static const char __pyx_k_op[] = "op";
3295 static const char __pyx_k_os[] = "os";
3296 static const char __pyx_k_rx[] = "rx";
3297 static const char __pyx_k_ry[] = "ry";
3298 static const char __pyx_k_rz[] = "rz";
3299 static const char __pyx_k_st[] = "st";
3300 static const char __pyx_k_sx[] = "sx";
3301 static const char __pyx_k_sy[] = "sy";
3302 static const char __pyx_k_sz[] = "sz";
3303 static const char __pyx_k_tt[] = "tt";
3304 static const char __pyx_k_ux[] = "ux";
3305 static const char __pyx_k_uy[] = "uy";
3306 static const char __pyx_k_uz[] = "uz";
3307 static const char __pyx_k_wb[] = "wb";
3308 static const char __pyx_k_x0[] = "x0";
3309 static const char __pyx_k_x1[] = "x1";
3310 static const char __pyx_k_x2[] = "x2";
3311 static const char __pyx_k_xi[] = "xi";
3312 static const char __pyx_k_xx[] = "xx";
3313 static const char __pyx_k_y0[] = "y0";
3314 static const char __pyx_k_y1[] = "y1";
3315 static const char __pyx_k_y2[] = "y2";
3316 static const char __pyx_k_yy[] = "yy";
3317 static const char __pyx_k_z0[] = "z0";
3318 static const char __pyx_k_z1[] = "z1";
3319 static const char __pyx_k_z2[] = "z2";
3320 static const char __pyx_k_zz[] = "zz";
3321 static const char __pyx_k_0_d[] = "{0:d}";
3322 static const char __pyx_k_0_e[] = "{0:e}";
3323 static const char __pyx_k_2_0[] = "2.0";
3324 static const char __pyx_k_Add[] = "Add";
3325 static const char __pyx_k_Aij[] = "Aij";
3326 static const char __pyx_k_CSS[] = "CSS";
3327 static const char __pyx_k_F_p[] = "F_p";
3328 static const char __pyx_k_F_v[] = "F_v";
3329 static const char __pyx_k_HDF[] = "HDF";
3330 static const char __pyx_k_HHT[] = "HHT";
3331 static const char __pyx_k_Int[] = "Int";
3332 static const char __pyx_k_Iyy[] = "Iyy";
3333 static const char __pyx_k_MPI[] = "MPI";
3334 static const char __pyx_k_Tb0[] = "Tb0";
3335 static const char __pyx_k_Tb1[] = "Tb1";
3336 static const char __pyx_k_Tb2[] = "Tb2";
3337 static const char __pyx_k_Tf0[] = "Tf0";
3338 static const char __pyx_k_Tf1[] = "Tf1";
3339 static const char __pyx_k_Tf2[] = "Tf2";
3340 static const char __pyx_k_XYZ[] = "XYZ";
3341 static const char __pyx_k__17[] = "$$$$$$$$$$$$$$$$$$";
3342 static const char __pyx_k__87[] = ",";
3343 static const char __pyx_k_a_2[] = "a+";
3344 static const char __pyx_k_acc[] = "acc";
3345 static const char __pyx_k_all[] = "__all__";
3346 static const char __pyx_k_amx[] = "amx";
3347 static const char __pyx_k_amy[] = "amy";
3348 static const char __pyx_k_amz[] = "amz";
3349 static const char __pyx_k_ang[] = "ang";
3350 static const char __pyx_k_csv[] = ".csv";
3351 static const char __pyx_k_dot[] = "dot";
3352 static const char __pyx_k_end[] = "end";
3353 static const char __pyx_k_eta[] = "eta";
3354 static const char __pyx_k_f_i[] = "f_i";
3355 static const char __pyx_k_fea[] = "fea";
3356 static const char __pyx_k_get[] = "get";
3357 static const char __pyx_k_i_i[] = "%i %i";
3358 static const char __pyx_k_inv[] = "inv";
3359 static const char __pyx_k_key[] = "key";
3360 static const char __pyx_k_mat[] = "mat";
3361 static const char __pyx_k_new[] = "__new__";
3362 static const char __pyx_k_obj[] = "obj";
3363 static const char __pyx_k_pos[] = "pos";
3364 static const char __pyx_k_rho[] = "rho";
3365 static const char __pyx_k_rot[] = "rot";
3366 static const char __pyx_k_row[] = "row";
3367 static const char __pyx_k_sum[] = "sum";
3368 static const char __pyx_k_sys[] = "sys";
3369 static const char __pyx_k_t_2[] = "_t";
3370 static const char __pyx_k_t_t[] = "t_t";
3371 static const char __pyx_k_txt[] = ".txt";
3372 static const char __pyx_k_val[] = "val";
3373 static const char __pyx_k_vec[] = "vec";
3374 static const char __pyx_k_vel[] = "vel";
3375 static const char __pyx_k_x_2[] = "x: ";
3376 static const char __pyx_k_xmf[] = ".xmf";
3377 static const char __pyx_k_Aija[] = "Aija";
3378 static const char __pyx_k_Comm[] = "Comm";
3379 static const char __pyx_k_File[] = "File";
3380 static const char __pyx_k_GetC[] = "GetC";
3381 static const char __pyx_k_Grid[] = "Grid";
3382 static const char __pyx_k_Mesh[] = "Mesh";
3383 static const char __pyx_k_Name[] = "Name";
3384 static const char __pyx_k_Node[] = "Node";
3385 static const char __pyx_k_Time[] = "Time";
3386 static const char __pyx_k_Type[] = "Type";
3387 static const char __pyx_k_UInt[] = "UInt";
3388 static const char __pyx_k_Xdmf[] = "Xdmf";
3389 static const char __pyx_k__112[] = "(";
3390 static const char __pyx_k__115[] = "/";
3391 static const char __pyx_k__125[] = "\t";
3392 static const char __pyx_k__126[] = "\n";
3393 static const char __pyx_k__240[] = "*";
3394 static const char __pyx_k__316[] = "_";
3395 static const char __pyx_k_am_t[] = "am_t";
3396 static const char __pyx_k_ang2[] = "ang2";
3397 static const char __pyx_k_ang3[] = "ang3";
3398 static const char __pyx_k_args[] = "args";
3399 static const char __pyx_k_attr[] = "attr";
3400 static const char __pyx_k_ax_t[] = "ax_t";
3401 static const char __pyx_k_axis[] = "axis";
3402 static const char __pyx_k_ay_t[] = "ay_t";
3403 static const char __pyx_k_az_t[] = "az_t";
3404 static const char __pyx_k_base[] = "base";
3405 static const char __pyx_k_body[] = "body";
3406 static const char __pyx_k_chFM[] = "chFM";
3407 static const char __pyx_k_comm[] = "comm";
3408 static const char __pyx_k_copy[] = "copy";
3409 static const char __pyx_k_data[] = "data";
3410 static const char __pyx_k_dens[] = "dens";
3411 static const char __pyx_k_dict[] = "__dict__";
3412 static const char __pyx_k_dire[] = "dire";
3413 static const char __pyx_k_dist[] = "dist";
3414 static const char __pyx_k_drag[] = "drag";
3415 static const char __pyx_k_dset[] = "dset";
3416 static const char __pyx_k_elem[] = "elem";
3417 static const char __pyx_k_etas[] = "etas";
3418 static const char __pyx_k_exit[] = "__exit__";
3419 static const char __pyx_k_file[] = "file";
3420 static const char __pyx_k_flag[] = "flag";
3421 static const char __pyx_k_gzip[] = "gzip";
3422 static const char __pyx_k_h5_2[] = "h5";
3423 static const char __pyx_k_h5py[] = "h5py";
3424 static const char __pyx_k_hxyz[] = "hxyz";
3425 static const char __pyx_k_iner[] = "iner";
3426 static const char __pyx_k_join[] = "join";
3427 static const char __pyx_k_main[] = "__main__";
3428 static const char __pyx_k_mass[] = "mass";
3429 static const char __pyx_k_matp[] = "matp";
3430 static const char __pyx_k_mesh[] = "mesh";
3431 static const char __pyx_k_mode[] = "mode";
3432 static const char __pyx_k_name[] = "name";
3433 static const char __pyx_k_ndim[] = "ndim";
3434 static const char __pyx_k_node[] = "node";
3435 static const char __pyx_k_norm[] = "norm";
3436 static const char __pyx_k_open[] = "open";
3437 static const char __pyx_k_pack[] = "pack";
3438 static const char __pyx_k_path[] = "path";
3439 static const char __pyx_k_poss[] = "poss";
3440 static const char __pyx_k_posx[] = "posx";
3441 static const char __pyx_k_posy[] = "posy";
3442 static const char __pyx_k_posz[] = "posz";
3443 static const char __pyx_k_quat[] = "quat";
3444 static const char __pyx_k_rank[] = "rank";
3445 static const char __pyx_k_root[] = "root";
3446 static const char __pyx_k_rotq[] = "rotq";
3447 static const char __pyx_k_self[] = "self";
3448 static const char __pyx_k_send[] = "send";
3449 static const char __pyx_k_size[] = "size";
3450 static const char __pyx_k_sqrt[] = "sqrt";
3451 static const char __pyx_k_step[] = "step";
3452 static const char __pyx_k_stop[] = "stop";
3453 static const char __pyx_k_t_ch[] = "t_ch";
3454 static const char __pyx_k_test[] = "__test__";
3455 static const char __pyx_k_text[] = "text";
3456 static const char __pyx_k_this[] = "this";
3457 static const char __pyx_k_time[] = "time";
3458 static const char __pyx_k_tree[] = "tree";
3459 static const char __pyx_k_ux_t[] = "ux_t";
3460 static const char __pyx_k_uy_t[] = "uy_t";
3461 static const char __pyx_k_uz_t[] = "uz_t";
3462 static const char __pyx_k_vlen[] = "vlen";
3463 static const char __pyx_k_ASCII[] = "ASCII";
3464 static const char __pyx_k_Euler[] = "Euler";
3465 static const char __pyx_k_F_Aij[] = "F_Aij";
3466 static const char __pyx_k_F_bar[] = "F_bar";
3467 static const char __pyx_k_Float[] = "Float";
3468 static const char __pyx_k_M_bar[] = "M_bar";
3469 static const char __pyx_k_Setup[] = "Setup";
3470 static const char __pyx_k_Shape[] = "Shape ";
3471 static const char __pyx_k_Value[] = "Value";
3472 static const char __pyx_k_amx_t[] = "amx_t";
3473 static const char __pyx_k_amy_t[] = "amy_t";
3474 static const char __pyx_k_amz_t[] = "amz_t";
3475 static const char __pyx_k_array[] = "array";
3476 static const char __pyx_k_bcast[] = "bcast";
3477 static const char __pyx_k_chpos[] = "chpos";
3478 static const char __pyx_k_chvec[] = "chvec";
3479 static const char __pyx_k_chvel[] = "chvel";
3480 static const char __pyx_k_class[] = "__class__";
3481 static const char __pyx_k_close[] = "close";
3482 static const char __pyx_k_csv_2[] = "csv";
3483 static const char __pyx_k_d_rot[] = "d_rot";
3484 static const char __pyx_k_d_tra[] = "d_tra";
3485 static const char __pyx_k_datav[] = "datav";
3486 static const char __pyx_k_debug[] = "debug";
3487 static const char __pyx_k_dragx[] = "dragx";
3488 static const char __pyx_k_dragy[] = "dragy";
3489 static const char __pyx_k_dragz[] = "dragz";
3490 static const char __pyx_k_dtype[] = "dtype";
3491 static const char __pyx_k_elemN[] = "elemN";
3492 static const char __pyx_k_empty[] = "empty";
3493 static const char __pyx_k_enter[] = "__enter__";
3494 static const char __pyx_k_error[] = "error";
3495 static const char __pyx_k_facet[] = "facet";
3496 static const char __pyx_k_fixed[] = "fixed";
3497 static const char __pyx_k_flags[] = "flags";
3498 static const char __pyx_k_force[] = "force";
3499 static const char __pyx_k_int32[] = "int32";
3500 static const char __pyx_k_items[] = "items";
3501 static const char __pyx_k_model[] = "model";
3502 static const char __pyx_k_new_x[] = "new_x";
3503 static const char __pyx_k_node1[] = "node1";
3504 static const char __pyx_k_node2[] = "node2";
3505 static const char __pyx_k_nodeN[] = "nodeN";
3506 static const char __pyx_k_nodes[] = "nodes";
3507 static const char __pyx_k_numpy[] = "numpy";
3508 static const char __pyx_k_pivot[] = "pivot";
3509 static const char __pyx_k_print[] = "print";
3510 static const char __pyx_k_pris1[] = "pris1";
3511 static const char __pyx_k_pris2[] = "pris2";
3512 static const char __pyx_k_query[] = "query";
3513 static const char __pyx_k_range[] = "range";
3514 static const char __pyx_k_rotch[] = "rotch";
3515 static const char __pyx_k_scipy[] = "scipy";
3516 static const char __pyx_k_shape[] = "shape";
3517 static const char __pyx_k_start[] = "start";
3518 static const char __pyx_k_t_csv[] = "_t.csv";
3519 static const char __pyx_k_t_max[] = "t_max";
3520 static const char __pyx_k_t_sim[] = "t_sim";
3521 static const char __pyx_k_t_vec[] = "t_vec";
3522 static const char __pyx_k_throw[] = "throw";
3523 static const char __pyx_k_utf_8[] = "utf-8";
3524 static const char __pyx_k_width[] = "width";
3525 static const char __pyx_k_write[] = "write";
3526 static const char __pyx_k_x_old[] = "x_old: ";
3527 static const char __pyx_k_x_vec[] = "x_vec";
3528 static const char __pyx_k_y_vec[] = "y_vec";
3529 static const char __pyx_k_z_vec[] = "z_vec";
3530 static const char __pyx_k_zeros[] = "zeros";
3531 static const char __pyx_k_Center[] = "Center";
3532 static const char __pyx_k_ChBody[] = "ChBody";
3533 static const char __pyx_k_ChMesh[] = "ChMesh";
3534 static const char __pyx_k_Domain[] = "Domain";
3535 static const char __pyx_k_F_body[] = "F_body";
3536 static const char __pyx_k_F_prot[] = "F_prot";
3537 static const char __pyx_k_Format[] = "Format";
3538 static const char __pyx_k_Fx_Aij[] = "Fx_Aij";
3539 static const char __pyx_k_Fy_Aij[] = "Fy_Aij";
3540 static const char __pyx_k_Fz_Aij[] = "Fz_Aij";
3541 static const char __pyx_k_GetPos[] = "GetPos";
3542 static const char __pyx_k_GetRot[] = "GetRot";
3543 static const char __pyx_k_MAXLOC[] = "MAXLOC";
3544 static const char __pyx_k_MINLOC[] = "MINLOC";
3545 static const char __pyx_k_M_body[] = "M_body";
3546 static const char __pyx_k_M_prot[] = "M_prot";
3547 static const char __pyx_k_Scalar[] = "Scalar";
3548 static const char __pyx_k_SetPos[] = "SetPos";
3549 static const char __pyx_k_SetRot[] = "SetRot";
3550 static const char __pyx_k_anchor[] = "anchor";
3551 static const char __pyx_k_ang_ax[] = "ang_ax";
3552 static const char __pyx_k_ang_ay[] = "ang_ay";
3553 static const char __pyx_k_ang_az[] = "ang_az";
3554 static const char __pyx_k_ang_ux[] = "ang_ux";
3555 static const char __pyx_k_ang_uy[] = "ang_uy";
3556 static const char __pyx_k_ang_uz[] = "ang_uz";
3557 static const char __pyx_k_angang[] = "angang";
3558 static const char __pyx_k_append[] = "append";
3559 static const char __pyx_k_arGrid[] = "arGrid";
3560 static const char __pyx_k_arTime[] = "arTime";
3561 static const char __pyx_k_avDict[] = "avDict";
3562 static const char __pyx_k_cable1[] = "cable1";
3563 static const char __pyx_k_cable2[] = "cable2";
3564 static const char __pyx_k_chrono[] = "chrono";
3565 static const char __pyx_k_coeff1[] = "coeff1";
3566 static const char __pyx_k_coords[] = "coords";
3567 static const char __pyx_k_d_time[] = "d_time";
3568 static const char __pyx_k_disown[] = "disown";
3569 static const char __pyx_k_domain[] = "domain";
3570 static const char __pyx_k_drag_t[] = "drag_t";
3571 static const char __pyx_k_encode[] = "encode";
3572 static const char __pyx_k_exit_2[] = "exit";
3573 static const char __pyx_k_facets[] = "facets";
3574 static const char __pyx_k_forces[] = "forces";
3575 static const char __pyx_k_format[] = "format";
3576 static const char __pyx_k_free_r[] = "free_r";
3577 static const char __pyx_k_free_x[] = "free_x";
3578 static const char __pyx_k_h_body[] = "h_body";
3579 static const char __pyx_k_import[] = "__import__";
3580 static const char __pyx_k_inv_FM[] = "inv_FM";
3581 static const char __pyx_k_kdtree[] = "kdtree";
3582 static const char __pyx_k_latest[] = "latest";
3583 static const char __pyx_k_length[] = "length";
3584 static const char __pyx_k_libver[] = "libver";
3585 static const char __pyx_k_linalg[] = "linalg";
3586 static const char __pyx_k_logDir[] = "logDir";
3587 static const char __pyx_k_margin[] = "margin";
3588 static const char __pyx_k_mpi4py[] = "mpi4py";
3589 static const char __pyx_k_name_2[] = "__name__";
3590 static const char __pyx_k_normal[] = "normal";
3591 static const char __pyx_k_o_body[] = "o_body";
3592 static const char __pyx_k_o_file[] = "o_file";
3593 static const char __pyx_k_pickle[] = "pickle";
3594 static const char __pyx_k_points[] = "points";
3595 static const char __pyx_k_record[] = "record";
3596 static const char __pyx_k_reduce[] = "__reduce__";
3597 static const char __pyx_k_resize[] = "resize";
3598 static const char __pyx_k_scheme[] = "scheme";
3599 static const char __pyx_k_sdfIBM[] = "sdfIBM";
3600 static const char __pyx_k_setIBM[] = "setIBM";
3601 static const char __pyx_k_setIyy[] = "setIyy";
3602 static const char __pyx_k_struct[] = "struct";
3603 static const char __pyx_k_system[] = "system";
3604 static const char __pyx_k_tCount[] = "tCount";
3605 static const char __pyx_k_t_last[] = "t_last";
3606 static const char __pyx_k_torque[] = "torque";
3607 static const char __pyx_k_tstype[] = "tstype";
3608 static const char __pyx_k_u_grad[] = "u_grad";
3609 static const char __pyx_k_unpack[] = "unpack";
3610 static const char __pyx_k_update[] = "update";
3611 static const char __pyx_k_useIBM[] = "useIBM";
3612 static const char __pyx_k_v_grad[] = "v_grad";
3613 static const char __pyx_k_w_grad[] = "w_grad";
3614 static const char __pyx_k_writer[] = "writer";
3615 static const char __pyx_k_x_body[] = "x_body: ";
3616 static const char __pyx_k_0_d_1_d[] = "{0:d} {1:d}";
3617 static const char __pyx_k_Aij_csv[] = "_Aij.csv";
3618 static const char __pyx_k_Element[] = "Element";
3619 static const char __pyx_k_Fx_prot[] = "Fx_prot";
3620 static const char __pyx_k_Fy_prot[] = "Fy_prot";
3621 static const char __pyx_k_Fz_prot[] = "Fz_prot";
3622 static const char __pyx_k_GetMass[] = "GetMass";
3623 static const char __pyx_k_Mx_prot[] = "Mx_prot";
3624 static const char __pyx_k_My_prot[] = "My_prot";
3625 static const char __pyx_k_Mz_prot[] = "Mz_prot";
3626 static const char __pyx_k_SetMass[] = "SetMass";
3627 static const char __pyx_k_Uniform[] = "Uniform";
3628 static const char __pyx_k_Version[] = "Version";
3629 static const char __pyx_k_ang_acc[] = "ang_acc";
3630 static const char __pyx_k_ang_vec[] = "ang_vec";
3631 static const char __pyx_k_ang_vel[] = "ang_vel";
3632 static const char __pyx_k_barrier[] = "barrier";
3633 static const char __pyx_k_boolval[] = "boolval";
3634 static const char __pyx_k_cKDTree[] = "cKDTree";
3635 static const char __pyx_k_collide[] = "collide";
3636 static const char __pyx_k_csvfile[] = "csvfile";
3637 static const char __pyx_k_damping[] = "damping";
3638 static const char __pyx_k_dm_time[] = "dm_time";
3639 static const char __pyx_k_dragx_t[] = "dragx_t";
3640 static const char __pyx_k_dragy_t[] = "dragy_t";
3641 static const char __pyx_k_dragz_t[] = "dragz_t";
3642 static const char __pyx_k_dt_init[] = "dt_init";
3643 static const char __pyx_k_dt_last[] = "dt_last";
3644 static const char __pyx_k_dt_next[] = "dt_next";
3645 static const char __pyx_k_e0_last[] = "e0_last";
3646 static const char __pyx_k_e1_last[] = "e1_last";
3647 static const char __pyx_k_e2_last[] = "e2_last";
3648 static const char __pyx_k_e3_last[] = "e3_last";
3649 static const char __pyx_k_eOffset[] = "eOffset";
3650 static const char __pyx_k_element[] = "element";
3651 static const char __pyx_k_fortran[] = "fortran";
3652 static const char __pyx_k_genexpr[] = "genexpr";
3653 static const char __pyx_k_getMass[] = "getMass";
3654 static const char __pyx_k_getitem[] = "getitem";
3655 static const char __pyx_k_getroot[] = "getroot";
3656 static const char __pyx_k_headers[] = "headers";
3657 static const char __pyx_k_i_index[] = "i_index";
3658 static const char __pyx_k_inertia[] = "inertia";
3659 static const char __pyx_k_l_force[] = "l_force";
3660 static const char __pyx_k_memview[] = "memview";
3661 static const char __pyx_k_moments[] = "moments";
3662 static const char __pyx_k_mooring[] = "mooring";
3663 static const char __pyx_k_new_vec[] = "new_vec";
3664 static const char __pyx_k_nodes_t[] = "nodes_t";
3665 static const char __pyx_k_prestep[] = "prestep";
3666 static const char __pyx_k_proteus[] = "proteus";
3667 static const char __pyx_k_rotq_e0[] = "rotq_e0";
3668 static const char __pyx_k_rotq_e1[] = "rotq_e1";
3669 static const char __pyx_k_rotq_e2[] = "rotq_e2";
3670 static const char __pyx_k_rotq_e3[] = "rotq_e3";
3671 static const char __pyx_k_setMass[] = "setMass";
3672 static const char __pyx_k_setName[] = "setName";
3673 static const char __pyx_k_setitem[] = "setitem";
3674 static const char __pyx_k_spatial[] = "spatial";
3675 static const char __pyx_k_springs[] = "springs";
3676 static const char __pyx_k_tstypes[] = "tstypes";
3677 static const char __pyx_k_vel_arr[] = "vel_arr";
3678 static const char __pyx_k_verbose[] = "verbose";
3679 static const char __pyx_k_with_dt[] = " with dt=";
3680 static const char __pyx_k_xmlFile[] = "xmlFile";
3681 static const char __pyx_k_Aij_last[] = "Aij_last";
3682 static const char __pyx_k_Archiver[] = "Archiver";
3683 static const char __pyx_k_DataItem[] = "DataItem";
3684 static const char __pyx_k_DataType[] = "DataType";
3685 static const char __pyx_k_Ellipsis[] = "Ellipsis";
3686 static const char __pyx_k_Geometry[] = "Geometry";
3687 static const char __pyx_k_GridType[] = "GridType";
3688 static const char __pyx_k_Polyline[] = "Polyline";
3689 static const char __pyx_k_Temporal[] = "Temporal";
3690 static const char __pyx_k_Topology[] = "Topology";
3691 static const char __pyx_k_Triangle[] = "Triangle";
3692 static const char __pyx_k_ang2_vec[] = "ang2_vec";
3693 static const char __pyx_k_ang2ang2[] = "ang2ang2";
3694 static const char __pyx_k_ang3_vec[] = "ang3_vec";
3695 static const char __pyx_k_ang3ang3[] = "ang3ang3";
3696 static const char __pyx_k_ang_disp[] = "ang_disp";
3697 static const char __pyx_k_ang_last[] = "ang_last";
3698 static const char __pyx_k_cable_nb[] = "cable_nb";
3699 static const char __pyx_k_chrono_2[] = "chrono_";
3700 static const char __pyx_k_deepcopy[] = "deepcopy";
3701 static const char __pyx_k_distance[] = "distance";
3702 static const char __pyx_k_dm_force[] = "dm_force";
3703 static const char __pyx_k_eN_guess[] = "eN_guess";
3704 static const char __pyx_k_elements[] = "elements";
3705 static const char __pyx_k_envelope[] = "envelope";
3706 static const char __pyx_k_fairlead[] = "fairlead";
3707 static const char __pyx_k_femSpace[] = "femSpace";
3708 static const char __pyx_k_fluid_ax[] = "fluid_ax";
3709 static const char __pyx_k_fluid_ay[] = "fluid_ay";
3710 static const char __pyx_k_fluid_az[] = "fluid_az";
3711 static const char __pyx_k_fluid_ux[] = "fluid_ux";
3712 static const char __pyx_k_fluid_uy[] = "fluid_uy";
3713 static const char __pyx_k_fluid_uz[] = "fluid_uz";
3714 static const char __pyx_k_function[] = "function";
3715 static const char __pyx_k_geometry[] = "geometry";
3716 static const char __pyx_k_getValue[] = "getValue";
3717 static const char __pyx_k_getstate[] = "__getstate__";
3718 static const char __pyx_k_header_x[] = "header_x";
3719 static const char __pyx_k_intertia[] = "intertia";
3720 static const char __pyx_k_inv_chFM[] = "inv_chFM";
3721 static const char __pyx_k_itemsize[] = "itemsize";
3722 static const char __pyx_k_l_torque[] = "l_torque";
3723 static const char __pyx_k_logEvent[] = "logEvent";
3724 static const char __pyx_k_maxshape[] = "maxshape";
3725 static const char __pyx_k_nb_elems[] = "nb_elems";
3726 static const char __pyx_k_nb_nodes[] = "nb_nodes";
3727 static const char __pyx_k_nb_steps[] = "nb_steps";
3728 static const char __pyx_k_new_quat[] = "new_quat";
3729 static const char __pyx_k_new_rank[] = "new_rank";
3730 static const char __pyx_k_pos_body[] = "pos_body: ";
3731 static const char __pyx_k_pos_last[] = "pos_last";
3732 static const char __pyx_k_position[] = "position";
3733 static const char __pyx_k_poststep[] = "poststep";
3734 static const char __pyx_k_pychrono[] = "pychrono";
3735 static const char __pyx_k_pyx_type[] = "__pyx_type";
3736 static const char __pyx_k_recordH5[] = "_recordH5";
3737 static const char __pyx_k_rotation[] = "rotation";
3738 static const char __pyx_k_setstate[] = "__setstate__";
3739 static const char __pyx_k_substeps[] = " substeps)";
3740 static const char __pyx_k_swig_obj[] = "swig_obj";
3741 static const char __pyx_k_t_chrono[] = "t_chrono";
3742 static const char __pyx_k_tangents[] = "tangents";
3743 static const char __pyx_k_tens_csv[] = "_tens.csv";
3744 static const char __pyx_k_tensions[] = "tensions";
3745 static const char __pyx_k_tompi4py[] = "tompi4py";
3746 static const char __pyx_k_topology[] = "topology";
3747 static const char __pyx_k_tostring[] = "tostring";
3748 static const char __pyx_k_velocity[] = "velocity";
3749 static const char __pyx_k_vertices[] = "vertices";
3750 static const char __pyx_k_writerow[] = "writerow";
3751 static const char __pyx_k_xmlns_xi[] = "xmlns:xi";
3752 static const char __pyx_k_Attribute[] = "Attribute";
3753 static const char __pyx_k_CableANCF[] = "CableANCF";
3754 static const char __pyx_k_ChVectorD[] = "ChVectorD";
3755 static const char __pyx_k_F_applied[] = "F_applied: ";
3756 static const char __pyx_k_GetChTime[] = "GetChTime";
3757 static const char __pyx_k_GetPos_dt[] = "GetPos_dt";
3758 static const char __pyx_k_Get_G_acc[] = "Get_G_acc";
3759 static const char __pyx_k_M_applied[] = "M_applied";
3760 static const char __pyx_k_Precision[] = "Precision";
3761 static const char __pyx_k_Profiling[] = "Profiling";
3762 static const char __pyx_k_SetPos_dt[] = "SetPos_dt";
3763 static const char __pyx_k_Set_G_acc[] = "Set_G_acc";
3764 static const char __pyx_k_TypeError[] = "TypeError";
3765 static const char __pyx_k_addSpring[] = "addSpring";
3766 static const char __pyx_k_all_names[] = "all_names";
3767 static const char __pyx_k_allreduce[] = "allreduce";
3768 static const char __pyx_k_beam_type[] = "beam_type";
3769 static const char __pyx_k_calculate[] = "calculate";
3770 static const char __pyx_k_chvel_ang[] = "chvel_ang";
3771 static const char __pyx_k_delimiter[] = "delimiter";
3772 static const char __pyx_k_dm_torque[] = "dm_torque";
3773 static const char __pyx_k_enumerate[] = "enumerate";
3774 static const char __pyx_k_file_name[] = "file_name";
3775 static const char __pyx_k_getNodesD[] = "getNodesD";
3776 static const char __pyx_k_getValues[] = "getValues";
3777 static const char __pyx_k_h_predict[] = "h_predict: ";
3778 static const char __pyx_k_indentXML[] = "indentXML";
3779 static const char __pyx_k_is_convex[] = "is_convex";
3780 static const char __pyx_k_is_static[] = "is_static";
3781 static const char __pyx_k_l_springs[] = "l_springs";
3782 static const char __pyx_k_mycpp_ptr[] = "mycpp_ptr";
3783 static const char __pyx_k_nodeArray[] = "nodeArray";
3784 static const char __pyx_k_onElement[] = "onElement";
3785 static const char __pyx_k_positions[] = "positions";
3786 static const char __pyx_k_posx_last[] = "posx_last";
3787 static const char __pyx_k_posy_last[] = "posy_last";
3788 static const char __pyx_k_posz_last[] = "posz_last";
3789 static const char __pyx_k_pt_to_shp[] = "pt_to_shp";
3790 static const char __pyx_k_pyx_state[] = "__pyx_state";
3791 static const char __pyx_k_radiusIBM[] = "radiusIBM";
3792 static const char __pyx_k_recordXML[] = "_recordXML";
3793 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
3794 static const char __pyx_k_residuals[] = "residuals";
3795 static const char __pyx_k_rigidbody[] = "rigidbody";
3796 static const char __pyx_k_rotq_last[] = "rotq_last";
3797 static const char __pyx_k_startTime[] = "startTime";
3798 static const char __pyx_k_stiffness[] = "stiffness";
3799 static const char __pyx_k_updateIBM[] = "updateIBM";
3800 static const char __pyx_k_vec2array[] = "vec2array";
3801 static const char __pyx_k_x_new_rot[] = "x_new_rot: ";
3802 static const char __pyx_k_xmlHeader[] = "xmlHeader";
3803 static const char __pyx_k_Aij_global[] = "Aij_global";
3804 static const char __pyx_k_Collection[] = "Collection";
3805 static const char __pyx_k_Dimensions[] = "Dimensions";
3806 static const char __pyx_k_Fx_applied[] = "Fx_applied";
3807 static const char __pyx_k_Fy_applied[] = "Fy_applied";
3808 static const char __pyx_k_Fz_applied[] = "Fz_applied";
3809 static const char __pyx_k_GetElement[] = "GetElement";
3810 static const char __pyx_k_GetInertia[] = "GetInertia";
3811 static const char __pyx_k_Get_XForce[] = "Get_XForce";
3812 static const char __pyx_k_IndexError[] = "IndexError";
3813 static const char __pyx_k_Mx_applied[] = "Mx_applied";
3814 static const char __pyx_k_My_applied[] = "My_applied";
3815 static const char __pyx_k_Mz_applied[] = "Mz_applied";
3816 static const char __pyx_k_ProtChBody[] = "ProtChBody";
3817 static const char __pyx_k_ProtChMesh[] = "ProtChMesh";
3818 static const char __pyx_k_SubElement[] = "SubElement";
3819 static const char __pyx_k_ValueError[] = "ValueError";
3820 static const char __pyx_k_all_values[] = "all_values";
3821 static const char __pyx_k_barycenter[] = "barycenter";
3822 static const char __pyx_k_buildNodes[] = "buildNodes";
3823 static const char __pyx_k_chrono_fea[] = "chrono_fea";
3824 static const char __pyx_k_d_rot_last[] = "d_rot_last";
3825 static const char __pyx_k_d_tra_last[] = "d_tra_last";
3826 static const char __pyx_k_dm_springs[] = "dm_springs";
3827 static const char __pyx_k_dt_substep[] = "dt_substep";
3828 static const char __pyx_k_el_connect[] = "el_connect";
3829 static const char __pyx_k_elements_t[] = "elements_t";
3830 static const char __pyx_k_fluid_ax_t[] = "fluid_ax_t";
3831 static const char __pyx_k_fluid_ay_t[] = "fluid_ay_t";
3832 static const char __pyx_k_fluid_az_t[] = "fluid_az_t";
3833 static const char __pyx_k_fluid_ux_t[] = "fluid_ux_t";
3834 static const char __pyx_k_fluid_uy_t[] = "fluid_uy_t";
3835 static const char __pyx_k_fluid_uz_t[] = "fluid_uz_t";
3836 static const char __pyx_k_getInertia[] = "getInertia";
3837 static const char __pyx_k_getMoments[] = "getMoments";
3838 static const char __pyx_k_globalMesh[] = "globalMesh";
3839 static const char __pyx_k_h_body_vec[] = "h_body_vec";
3840 static const char __pyx_k_l_position[] = "l_position";
3841 static const char __pyx_k_l_rotation[] = "l_rotation";
3842 static const char __pyx_k_nParticles[] = "nParticles";
3843 static const char __pyx_k_netMoments[] = "netMoments";
3844 static const char __pyx_k_node_guess[] = "node_guess";
3845 static const char __pyx_k_prediction[] = "prediction";
3846 static const char __pyx_k_proteus_dt[] = "proteus_dt";
3847 static const char __pyx_k_pyx_result[] = "__pyx_result";
3848 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
3849 static const char __pyx_k_quat2array[] = "quat2array";
3850 static const char __pyx_k_rank_guess[] = "rank_guess";
3851 static const char __pyx_k_relative_x[] = "relative_x";
3852 static const char __pyx_k_rotation3D[] = "rotation3D";
3853 static const char __pyx_k_s_filename[] = "s_filename";
3854 static const char __pyx_k_sampleRate[] = "sampleRate";
3855 static const char __pyx_k_segment_nb[] = "segment_nb";
3856 static const char __pyx_k_setWidth2D[] = "setWidth2D";
3857 static const char __pyx_k_tangential[] = "tangential";
3858 static const char __pyx_k_velocity_t[] = "velocity_t";
3859 static const char __pyx_k_zeros_like[] = "zeros_like";
3860 static const char __pyx_k_ChMatrix33D[] = "ChMatrix33D";
3861 static const char __pyx_k_ChRigidBody[] = "ChRigidBody";
3862 static const char __pyx_k_ChSystemSMC[] = "ChSystemSMC";
3863 static const char __pyx_k_ElementTree[] = "ElementTree";
3864 static const char __pyx_k_F_applied_2[] = "F_applied";
3865 static const char __pyx_k_GetPos_dtdt[] = "GetPos_dtdt";
3866 static const char __pyx_k_GetWacc_loc[] = "GetWacc_loc";
3867 static const char __pyx_k_GetWacc_par[] = "GetWacc_par";
3868 static const char __pyx_k_GetWvel_loc[] = "GetWvel_loc";
3869 static const char __pyx_k_Get_A_Xaxis[] = "Get_A_Xaxis";
3870 static const char __pyx_k_Get_A_Yaxis[] = "Get_A_Yaxis";
3871 static const char __pyx_k_Get_A_Zaxis[] = "Get_A_Zaxis";
3872 static const char __pyx_k_Get_Xtorque[] = "Get_Xtorque";
3873 static const char __pyx_k_ImportError[] = "ImportError";
3874 static const char __pyx_k_Mass_Matrix[] = "Mass Matrix:\n";
3875 static const char __pyx_k_MemoryError[] = "MemoryError";
3876 static const char __pyx_k_OrderedDict[] = "OrderedDict";
3877 static const char __pyx_k_PickleError[] = "PickleError";
3878 static const char __pyx_k_Trapezoidal[] = "Trapezoidal";
3879 static const char __pyx_k_attachModel[] = "attachModel";
3880 static const char __pyx_k_attachShape[] = "attachShape";
3881 static const char __pyx_k_ball_center[] = "ball_center";
3882 static const char __pyx_k_ball_radius[] = "ball_radius";
3883 static const char __pyx_k_barycenters[] = "barycenters";
3884 static const char __pyx_k_collections[] = "collections";
3885 static const char __pyx_k_compression[] = "compression";
3886 static const char __pyx_k_dist_search[] = "dist_search";
3887 static const char __pyx_k_dm_position[] = "dm_position";
3888 static const char __pyx_k_dm_rotation[] = "dm_rotation";
3889 static const char __pyx_k_elementMaps[] = "elementMaps";
3890 static const char __pyx_k_fixBackNode[] = "fixBackNode";
3891 static const char __pyx_k_getPosition[] = "getPosition";
3892 static const char __pyx_k_getVelocity[] = "getVelocity";
3893 static const char __pyx_k_h_predict_2[] = "h_predict";
3894 static const char __pyx_k_hdfFileName[] = "hdfFileName";
3895 static const char __pyx_k_hx_rotation[] = "hx_rotation";
3896 static const char __pyx_k_hy_rotation[] = "hy_rotation";
3897 static const char __pyx_k_hz_rotation[] = "hz_rotation";
3898 static const char __pyx_k_l_linklocks[] = "l_linklocks";
3899 static const char __pyx_k_mat332array[] = "mat332array";
3900 static const char __pyx_k_mesh_search[] = "mesh_search";
3901 static const char __pyx_k_my_instance[] = "my_instance";
3902 static const char __pyx_k_netForces_p[] = "netForces_p";
3903 static const char __pyx_k_netForces_v[] = "netForces_v";
3904 static const char __pyx_k_owning_proc[] = "owning_proc";
3905 static const char __pyx_k_owning_rank[] = "owning_rank";
3906 static const char __pyx_k_pyvec2array[] = "pyvec2array";
3907 static const char __pyx_k_rank_owning[] = "rank_owning";
3908 static const char __pyx_k_record_file[] = "record_file";
3909 static const char __pyx_k_rest_length[] = "rest_length";
3910 static const char __pyx_k_rotMarr_big[] = "rotMarr_big";
3911 static const char __pyx_k_s_residuals[] = "s_residuals";
3912 static const char __pyx_k_setPosition[] = "setPosition";
3913 static const char __pyx_k_setTimeStep[] = "setTimeStep";
3914 static const char __pyx_k_setVelocity[] = "setVelocity";
3915 static const char __pyx_k_storeValues[] = "storeValues";
3916 static const char __pyx_k_BodyDynamics[] = "BodyDynamics";
3917 static const char __pyx_k_F_solid_type[] = "F_solid_type";
3918 static const char __pyx_k_ProtChSystem[] = "ProtChSystem";
3919 static const char __pyx_k_SetInertiaXX[] = "SetInertiaXX";
3920 static const char __pyx_k_SetInertiaXY[] = "SetInertiaXY";
3921 static const char __pyx_k_SpatialTools[] = "SpatialTools";
3922 static const char __pyx_k_acceleration[] = "acceleration";
3923 static const char __pyx_k_ang_velocity[] = "ang_velocity";
3924 static const char __pyx_k_chel_connect[] = "chel_connect";
3925 static const char __pyx_k_coefficients[] = "coefficients";
3926 static const char __pyx_k_dm_residuals[] = "dm_residuals";
3927 static const char __pyx_k_fixFrontNode[] = "fixFrontNode";
3928 static const char __pyx_k_i_entry_body[] = "i_entry_body";
3929 static const char __pyx_k_length_array[] = "length_array";
3930 static const char __pyx_k_log_times_h5[] = "log_times_h5";
3931 static const char __pyx_k_nNodes_owned[] = "nNodes_owned";
3932 static const char __pyx_k_nearest_node[] = "nearest_node";
3933 static const char __pyx_k_o_body_force[] = "o_body_force";
3934 static const char __pyx_k_particle_Aij[] = "particle_Aij";
3935 static const char __pyx_k_pyquat2array[] = "pyquat2array";
3936 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
3937 static const char __pyx_k_recordValues[] = "_recordValues";
3938 static const char __pyx_k_rotMarrT_big[] = "rotMarrT_big";
3939 static const char __pyx_k_setAddedMass[] = "setAddedMass";
3940 static const char __pyx_k_setApplyDrag[] = "setApplyDrag";
3941 static const char __pyx_k_setInertiaXX[] = "setInertiaXX";
3942 static const char __pyx_k_setInertiaXY[] = "setInertiaXY";
3943 static const char __pyx_k_stringsource[] = "stringsource";
3944 static const char __pyx_k_subcomponent[] = "subcomponent";
3945 static const char __pyx_k_t_model_last[] = "t_model_last";
3946 static const char __pyx_k_updateForces[] = "updateForces";
3947 static const char __pyx_k_vel_grad_arr[] = "vel_grad_arr";
3948 static const char __pyx_k_x_new_trarot[] = "x_new_trarot: ";
3949 static const char __pyx_k_0_h5_1__t_2_d[] = "{0}.h5:/{1}_t{2:d}";
3950 static const char __pyx_k_AttributeType[] = "AttributeType";
3951 static const char __pyx_k_ChNodeFEAxyzD[] = "ChNodeFEAxyzD";
3952 static const char __pyx_k_ChQuaternionD[] = "ChQuaternionD";
3953 static const char __pyx_k_Finished_init[] = "Finished init";
3954 static const char __pyx_k_ProtChBody_hx[] = "ProtChBody.hx";
3955 static const char __pyx_k_ProtChBody_hy[] = "ProtChBody.hy";
3956 static const char __pyx_k_ProtChBody_hz[] = "ProtChBody.hz";
3957 static const char __pyx_k_Setup_initial[] = "Setup initial";
3958 static const char __pyx_k_Starting_init[] = "Starting init";
3959 static const char __pyx_k_addProtChBody[] = "addProtChBody";
3960 static const char __pyx_k_addProtChMesh[] = "addProtChMesh";
3961 static const char __pyx_k_backwardEuler[] = "backwardEuler";
3962 static const char __pyx_k_ball_velocity[] = "ball_velocity";
3963 static const char __pyx_k_chrono_log_h5[] = "chrono_log.h5";
3964 static const char __pyx_k_density_array[] = "density_array";
3965 static const char __pyx_k_fluid_density[] = "fluid_density";
3966 static const char __pyx_k_getDragForces[] = "getDragForces";
3967 static const char __pyx_k_getDynamicSDF[] = "getDynamicSDF";
3968 static const char __pyx_k_h_ang_predict[] = "h_ang_predict: ";
3969 static const char __pyx_k_l_spring_data[] = "l_spring_data";
3970 static const char __pyx_k_local_element[] = "local_element";
3971 static const char __pyx_k_log_bodies_h5[] = "log_bodies_h5";
3972 static const char __pyx_k_nodeStarArray[] = "nodeStarArray";
3973 static const char __pyx_k_o_body_torque[] = "o_body_torque";
3974 static const char __pyx_k_pymat332array[] = "pymat332array";
3975 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
3976 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
3977 static const char __pyx_k_setInitialRot[] = "setInitialRot";
3978 static const char __pyx_k_setSampleRate[] = "setSampleRate";
3979 static const char __pyx_k_special_dtype[] = "special_dtype";
3980 static const char __pyx_k_Chrono_prestep[] = "Chrono prestep";
3981 static const char __pyx_k_CollectionType[] = "CollectionType";
3982 static const char __pyx_k_GetSpringReact[] = "GetSpringReact";
3983 static const char __pyx_k_ProtChMoorings[] = "ProtChMoorings";
3984 static const char __pyx_k_Spatial_Domain[] = " Spatial_Domain";
3985 static const char __pyx_k_acceleration_t[] = "acceleration_t";
3986 static const char __pyx_k_calculate_init[] = "calculate_init";
3987 static const char __pyx_k_coords_outside[] = "coords_outside";
3988 static const char __pyx_k_create_dataset[] = "create_dataset";
3989 static const char __pyx_k_dataItemFormat[] = "dataItemFormat";
3990 static const char __pyx_k_fluid_velocity[] = "fluid_velocity";
3991 static const char __pyx_k_getShearForces[] = "getShearForces";
3992 static const char __pyx_k_getTensionBack[] = "getTensionBack";
3993 static const char __pyx_k_h_predict_last[] = "h_predict_last: ";
3994 static const char __pyx_k_hx_translation[] = "hx_translation";
3995 static const char __pyx_k_hy_translation[] = "hy_translation";
3996 static const char __pyx_k_hz_translation[] = "hz_translation";
3997 static const char __pyx_k_i_entry_spring[] = "i_entry_spring";
3998 static const char __pyx_k_l_logging_info[] = "l_logging_info";
3999 static const char __pyx_k_levelModelList[] = "levelModelList";
4000 static const char __pyx_k_log_springs_h5[] = "log_springs_h5";
4001 static const char __pyx_k_node_nb_global[] = "node_nb_global";
4002 static const char __pyx_k_proteus_mprans[] = "proteus.mprans";
4003 static const char __pyx_k_setConstraints[] = "setConstraints";
4004 static const char __pyx_k_stepController[] = "stepController";
4005 static const char __pyx_k_updated_global[] = "updated_global";
4006 static const char __pyx_k_values_towrite[] = "values_towrite";
4007 static const char __pyx_k_velocity_array[] = "velocity_array";
4008 static const char __pyx_k_ChBodyAddedMass[] = "ChBodyAddedMass";
4009 static const char __pyx_k_ChNodeFEAxyzrot[] = "ChNodeFEAxyzrot";
4010 static const char __pyx_k_Chrono_poststep[] = "Chrono poststep";
4011 static const char __pyx_k_GetSpringLength[] = "GetSpringLength";
4012 static const char __pyx_k_NodesPerElement[] = "NodesPerElement";
4013 static const char __pyx_k_ProtChAddedMass[] = "ProtChAddedMass";
4014 static const char __pyx_k_ProtChBody_hxyz[] = "ProtChBody.hxyz";
4015 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
4016 static const char __pyx_k_addSubcomponent[] = "addSubcomponent";
4017 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
4018 static const char __pyx_k_checkedElements[] = "checkedElements";
4019 static const char __pyx_k_d_spring_length[] = "d_spring_length";
4020 static const char __pyx_k_dm_residuals_h5[] = "dm_residuals_h5";
4021 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
4022 static const char __pyx_k_getChronoObject[] = "getChronoObject";
4023 static const char __pyx_k_getInverseValue[] = "getInverseValue";
4024 static const char __pyx_k_getLocalElement[] = "getLocalElement";
4025 static const char __pyx_k_getNodesTension[] = "getNodesTension";
4026 static const char __pyx_k_getTensionFront[] = "getTensionFront";
4027 static const char __pyx_k_i_entry_linkage[] = "i_entry_linkage";
4028 static const char __pyx_k_log_bodies_text[] = "log_bodies_text";
4029 static const char __pyx_k_mbd_CouplingFSI[] = "mbd.CouplingFSI";
4030 static const char __pyx_k_nodeStarOffsets[] = "nodeStarOffsets";
4031 static const char __pyx_k_o_body_position[] = "o_body_position";
4032 static const char __pyx_k_o_body_rotation[] = "o_body_rotation";
4033 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
4034 static const char __pyx_k_recordStrainEta[] = "recordStrainEta";
4035 static const char __pyx_k_setRecordValues[] = "setRecordValues";
4036 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
4037 static const char __pyx_k_take_shape_name[] = "take_shape_name";
4038 static const char __pyx_k_ChMatrixDynamicD[] = "ChMatrixDynamicD";
4039 static const char __pyx_k_Full_Mass_Matrix[] = "Full Mass Matrix:\n";
4040 static const char __pyx_k_NumberOfElements[] = "NumberOfElements";
4041 static const char __pyx_k_ang_acceleration[] = "ang_acceleration";
4042 static const char __pyx_k_arGridCollection[] = "arGridCollection";
4043 static const char __pyx_k_attachNodeToNode[] = "attachNodeToNode";
4044 static const char __pyx_k_d_internal_force[] = "d_internal_force";
4045 static const char __pyx_k_fluid_velocity_t[] = "fluid_velocity_t";
4046 static const char __pyx_k_function_tangent[] = "function_tangent";
4047 static const char __pyx_k_getGradientValue[] = "getGradientValue";
4048 static const char __pyx_k_getNodesPosition[] = "getNodesPosition";
4049 static const char __pyx_k_getNodesVelocity[] = "getNodesVelocity";
4050 static const char __pyx_k_i_entry_residual[] = "i_entry_residual";
4051 static const char __pyx_k_log_residuals_h5[] = "log_residuals_h5";
4052 static const char __pyx_k_log_springs_text[] = "log_springs_text";
4053 static const char __pyx_k_nElements_global[] = "nElements_global";
4054 static const char __pyx_k_particle_sdfList[] = "particle_sdfList";
4055 static const char __pyx_k_proteus_Archiver[] = "proteus.Archiver";
4056 static const char __pyx_k_referenceElement[] = "referenceElement";
4057 static const char __pyx_k_setApplyBuoyancy[] = "setApplyBuoyancy";
4058 static const char __pyx_k_setBoundaryFlags[] = "setBoundaryFlags";
4059 static const char __pyx_k_setNodesPosition[] = "setNodesPosition";
4060 static const char __pyx_k_set_element_type[] = "set element type";
4061 static const char __pyx_k_Added_Mass_Matrix[] = "Added Mass Matrix:\n";
4062 static const char __pyx_k_GetSpringVelocity[] = "GetSpringVelocity";
4063 static const char __pyx_k_ProtChBody_setIBM[] = "ProtChBody.setIBM";
4064 static const char __pyx_k_ProtChSystem_step[] = "ProtChSystem.step";
4065 static const char __pyx_k_addPrismaticLinkX[] = "addPrismaticLinkX";
4066 static const char __pyx_k_d_spring_velocity[] = "d_spring_velocity";
4067 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
4068 static const char __pyx_k_function_position[] = "function_position";
4069 static const char __pyx_k_getPressureForces[] = "getPressureForces";
4070 static const char __pyx_k_getRotationMatrix[] = "getRotationMatrix";
4071 static const char __pyx_k_getTensionElement[] = "getTensionElement";
4072 static const char __pyx_k_h_ang_vel_predict[] = "h_ang_vel_predict: ";
4073 static const char __pyx_k_nodeElementsArray[] = "nodeElementsArray";
4074 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
4075 static const char __pyx_k_setApplyAddedMass[] = "setApplyAddedMass";
4076 static const char __pyx_k_setCouplingScheme[] = "setCouplingScheme";
4077 static const char __pyx_k_setExternalForces[] = "setExternalForces";
4078 static const char __pyx_k_AuxiliaryVariables[] = "AuxiliaryVariables";
4079 static const char __pyx_k_ChElementBeamEuler[] = "ChElementBeamEuler";
4080 static const char __pyx_k_ChElementCableANCF[] = "ChElementCableANCF";
4081 static const char __pyx_k_Chrono_system_to_t[] = "Chrono system to t=";
4082 static const char __pyx_k_ProtChBody_getMass[] = "ProtChBody.getMass";
4083 static const char __pyx_k_ProtChBody_prestep[] = "ProtChBody.prestep";
4084 static const char __pyx_k_ProtChBody_setMass[] = "ProtChBody.setMass";
4085 static const char __pyx_k_ProtChBody_setName[] = "ProtChBody.setName";
4086 static const char __pyx_k_acceleration_array[] = "acceleration_array";
4087 static const char __pyx_k_auxiliaryVariables[] = "auxiliaryVariables";
4088 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
4089 static const char __pyx_k_element_connection[] = "element_connection";
4090 static const char __pyx_k_fluid_acceleration[] = "fluid_acceleration";
4091 static const char __pyx_k_getAddedMassForces[] = "getAddedMassForces";
4092 static const char __pyx_k_h_ang_predict_last[] = "h_ang_predict_last: ";
4093 static const char __pyx_k_is_not_of_length_3[] = " is not of length 3";
4094 static const char __pyx_k_log_residuals_text[] = "log_residuals_text";
4095 static const char __pyx_k_nodeElementOffsets[] = "nodeElementOffsets";
4096 static const char __pyx_k_not_a_valid_choice[] = " not a valid choice.";
4097 static const char __pyx_k_o_linkage_residual[] = "o_linkage_residual";
4098 static const char __pyx_k_particle_netForces[] = "particle_netForces";
4099 static const char __pyx_k_patchBoundaryNodes[] = "patchBoundaryNodes";
4100 static const char __pyx_k_setContactMaterial[] = "setContactMaterial";
4101 static const char __pyx_k_setMinimumSubsteps[] = "setMinimumSubsteps";
4102 static const char __pyx_k_setTimestepperType[] = "setTimestepperType";
4103 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
4104 static const char __pyx_k_Mesh_Spatial_Domain[] = "Mesh_Spatial_Domain_";
4105 static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
4106 static const char __pyx_k_ProtChBody_poststep[] = "ProtChBody.poststep";
4107 static const char __pyx_k_chrono_log_body_txt[] = "chrono_log_body.txt";
4108 static const char __pyx_k_fluid_density_array[] = "fluid_density_array";
4109 static const char __pyx_k_getLocalNearestNode[] = "getLocalNearestNode";
4110 static const char __pyx_k_getTriangleMeshInfo[] = "getTriangleMeshInfo";
4111 static const char __pyx_k_nodesSpatial_Domain[] = "nodesSpatial_Domain";
4112 static const char __pyx_k_particle_netMoments[] = "particle_netMoments";
4113 static const char __pyx_k_setCollisionOptions[] = "setCollisionOptions";
4114 static const char __pyx_k_setDragCoefficients[] = "setDragCoefficients";
4115 static const char __pyx_k_setPrescribedMotion[] = "setPrescribedMotion";
4116 static const char __pyx_k_ProtChBody__recordH5[] = "ProtChBody._recordH5";
4117 static const char __pyx_k_ProtChBody_addSpring[] = "ProtChBody.addSpring";
4118 static const char __pyx_k_ProtChBody_calculate[] = "ProtChBody.calculate";
4119 static const char __pyx_k_ProtChBody_getValues[] = "ProtChBody.getValues";
4120 static const char __pyx_k_ProtChBody_updateIBM[] = "ProtChBody.updateIBM";
4121 static const char __pyx_k_Xdmf_ElementTopology[] = "Xdmf_ElementTopology";
4122 static const char __pyx_k_Xdmf_NodesPerElement[] = "Xdmf_NodesPerElement";
4123 static const char __pyx_k_attachBackNodeToBody[] = "attachBackNodeToBody";
4124 static const char __pyx_k_fluid_acceleration_t[] = "fluid_acceleration_t";
4125 static const char __pyx_k_fluid_velocity_array[] = "fluid_velocity_array";
4126 static const char __pyx_k_getNodesAcceleration[] = "getNodesAcceleration";
4127 static const char __pyx_k_rank_owning_previous[] = "rank_owning_previous";
4128 static const char __pyx_k_recording_h5_file_of[] = "recording h5 file of ";
4129 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
4130 static const char __pyx_k_use_ball_as_particle[] = "use_ball_as_particle";
4131 static const char __pyx_k_was_already_attached[] = " was already attached";
4132 static const char __pyx_k_ProtChBody__recordXML[] = "ProtChBody._recordXML";
4133 static const char __pyx_k_ProtChBody_getInertia[] = "ProtChBody.getInertia";
4134 static const char __pyx_k_ProtChBody_getMoments[] = "ProtChBody.getMoments";
4135 static const char __pyx_k_ProtChBody_prediction[] = "ProtChBody.prediction";
4136 static const char __pyx_k_ProtChBody_setWidth2D[] = "ProtChBody.setWidth2D";
4137 static const char __pyx_k_ProtChMoorings_setIyy[] = "ProtChMoorings.setIyy";
4138 static const char __pyx_k_Xdmf_NumberOfElements[] = "Xdmf_NumberOfElements";
4139 static const char __pyx_k_attachFrontNodeToBody[] = "attachFrontNodeToBody";
4140 static const char __pyx_k_ball_angular_velocity[] = "ball_angular_velocity";
4141 static const char __pyx_k_chrono_log_spring_txt[] = "chrono_log_spring.txt";
4142 static const char __pyx_k_cinit___locals_lambda[] = "__cinit__.<locals>.<lambda>";
4143 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
4144 static const char __pyx_k_nearest_node_distance[] = "nearest_node_distance";
4145 static const char __pyx_k_particle_velocityList[] = "particle_velocityList";
4146 static const char __pyx_k_recording_xml_file_of[] = "recording xml file of ";
4147 static const char __pyx_k_sphereswept_thickness[] = "sphereswept_thickness";
4148 static const char __pyx_k_xml_etree_ElementTree[] = "xml.etree.ElementTree";
4149 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
4150 static const char __pyx_k_ProtChBody_attachShape[] = "ProtChBody.attachShape";
4151 static const char __pyx_k_ProtChBody_getPosition[] = "ProtChBody.getPosition";
4152 static const char __pyx_k_ProtChBody_getVelocity[] = "ProtChBody.getVelocity";
4153 static const char __pyx_k_ProtChBody_hx_rotation[] = "ProtChBody.hx_rotation";
4154 static const char __pyx_k_ProtChBody_hy_rotation[] = "ProtChBody.hy_rotation";
4155 static const char __pyx_k_ProtChBody_hz_rotation[] = "ProtChBody.hz_rotation";
4156 static const char __pyx_k_ProtChBody_setPosition[] = "ProtChBody.setPosition";
4157 static const char __pyx_k_ProtChBody_setVelocity[] = "ProtChBody.setVelocity";
4158 static const char __pyx_k_ProtChBody_storeValues[] = "ProtChBody.storeValues";
4159 static const char __pyx_k_ProtChMoorings_prestep[] = "ProtChMoorings.prestep";
4160 static const char __pyx_k_ProtChMoorings_setName[] = "ProtChMoorings.setName";
4161 static const char __pyx_k_ProtChSystem_calculate[] = "ProtChSystem.calculate";
4162 static const char __pyx_k_cinit___locals_genexpr[] = "__cinit__.<locals>.genexpr";
4163 static const char __pyx_k_elementsSpatial_Domain[] = "elementsSpatial_Domain";
4164 static const char __pyx_k_h5_nodesSpatial_Domain[] = ".h5:/nodesSpatial_Domain";
4165 static const char __pyx_k_h_ang_vel_predict_last[] = "h_ang_vel_predict_last: ";
4166 static const char __pyx_k_setFluidDensityAtNodes[] = "setFluidDensityAtNodes";
4167 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
4168 static const char __pyx_k_ProtChBody_setAddedMass[] = "ProtChBody.setAddedMass";
4169 static const char __pyx_k_ProtChBody_setInertiaXX[] = "ProtChBody.setInertiaXX";
4170 static const char __pyx_k_ProtChBody_setInertiaXY[] = "ProtChBody.setInertiaXY";
4171 static const char __pyx_k_ProtChMoorings_poststep[] = "ProtChMoorings.poststep";
4172 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
4173 static const char __pyx_k_setFluidVelocityAtNodes[] = "setFluidVelocityAtNodes";
4174 static const char __pyx_k_setPrescribedMotionPoly[] = "setPrescribedMotionPoly";
4175 static const char __pyx_k_setPrescribedMotionSine[] = "setPrescribedMotionSine";
4176 static const char __pyx_k_setRestLengthPerElement[] = "setRestLengthPerElement";
4177 static const char __pyx_k_updateIBM_locals_lambda[] = "updateIBM.<locals>.<lambda>";
4178 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
4179 static const char __pyx_k_Chrono_poststep_finished[] = "Chrono poststep finished";
4180 static const char __pyx_k_Mesh_Spatial_Domain__0_d[] = "Mesh_Spatial_Domain_{0:d}";
4181 static const char __pyx_k_ProtChBody__recordValues[] = "ProtChBody._recordValues";
4182 static const char __pyx_k_ProtChBody_getDynamicSDF[] = "ProtChBody.getDynamicSDF";
4183 static const char __pyx_k_ProtChBody_setInitialRot[] = "ProtChBody.setInitialRot";
4184 static const char __pyx_k_ProtChMoorings__recordH5[] = "ProtChMoorings._recordH5";
4185 static const char __pyx_k_ProtChMoorings_getNodesD[] = "ProtChMoorings.getNodesD";
4186 static const char __pyx_k_ProtChSystem_attachModel[] = "ProtChSystem.attachModel";
4187 static const char __pyx_k_ProtChSystem_setTimeStep[] = "ProtChSystem.setTimeStep";
4188 static const char __pyx_k_addTriangleMeshFromShape[] = "addTriangleMeshFromShape";
4189 static const char __pyx_k_attachAuxiliaryVariables[] = "attachAuxiliaryVariables";
4190 static const char __pyx_k_fluid_acceleration_array[] = "fluid_acceleration_array";
4191 static const char __pyx_k_recording_values_file_of[] = "recording values file of ";
4192 static const char __pyx_k_setAddedMassCoefficients[] = "setAddedMassCoefficients";
4193 static const char __pyx_k_setFluidVelocityFunction[] = "setFluidVelocityFunction";
4194 static const char __pyx_k_setNodesPositionFunction[] = "setNodesPositionFunction";
4195 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
4196 static const char __pyx_k_ProtChAddedMass_calculate[] = "ProtChAddedMass.calculate";
4197 static const char __pyx_k_ProtChBody_calculate_init[] = "ProtChBody.calculate_init";
4198 static const char __pyx_k_ProtChBody_getShearForces[] = "ProtChBody.getShearForces";
4199 static const char __pyx_k_ProtChBody_hx_translation[] = "ProtChBody.hx_translation";
4200 static const char __pyx_k_ProtChBody_hy_translation[] = "ProtChBody.hy_translation";
4201 static const char __pyx_k_ProtChBody_hz_translation[] = "ProtChBody.hz_translation";
4202 static const char __pyx_k_ProtChBody_setConstraints[] = "ProtChBody.setConstraints";
4203 static const char __pyx_k_ProtChMoorings__recordXML[] = "ProtChMoorings._recordXML";
4204 static const char __pyx_k_ProtChMoorings_buildNodes[] = "ProtChMoorings.buildNodes";
4205 static const char __pyx_k_ProtChSystem_log_times_h5[] = "ProtChSystem.log_times_h5";
4206 static const char __pyx_k_Solved_Chrono_system_to_t[] = "Solved Chrono system to t=";
4207 static const char __pyx_k_h5_elementsSpatial_Domain[] = ".h5:/elementsSpatial_Domain";
4208 static const char __pyx_k_setPrescribedMotionCustom[] = "setPrescribedMotionCustom";
4209 static const char __pyx_k_ProtChBody___reduce_cython[] = "ProtChBody.__reduce_cython__";
4210 static const char __pyx_k_ProtChBody_getChronoObject[] = "ProtChBody.getChronoObject";
4211 static const char __pyx_k_ProtChBody_setRecordValues[] = "ProtChBody.setRecordValues";
4212 static const char __pyx_k_ProtChMesh___reduce_cython[] = "ProtChMesh.__reduce_cython__";
4213 static const char __pyx_k_ProtChMesh_getChronoObject[] = "ProtChMesh.getChronoObject";
4214 static const char __pyx_k_ProtChMoorings_fixBackNode[] = "ProtChMoorings.fixBackNode";
4215 static const char __pyx_k_ProtChSystem_addProtChBody[] = "ProtChSystem.addProtChBody";
4216 static const char __pyx_k_ProtChSystem_addProtChMesh[] = "ProtChSystem.addProtChMesh";
4217 static const char __pyx_k_ProtChSystem_log_bodies_h5[] = "ProtChSystem.log_bodies_h5";
4218 static const char __pyx_k_ProtChSystem_setSampleRate[] = "ProtChSystem.setSampleRate";
4219 static const char __pyx_k_recordValues_locals_record[] = "_recordValues.<locals>.record";
4220 static const char __pyx_k_setCollisionEnvelopeMargin[] = "setCollisionEnvelopeMargin";
4221 static const char __pyx_k_ProtChAddedMass_attachModel[] = "ProtChAddedMass.attachModel";
4222 static const char __pyx_k_ProtChBody_setBoundaryFlags[] = "ProtChBody.setBoundaryFlags";
4223 static const char __pyx_k_ProtChMoorings_fixFrontNode[] = "ProtChMoorings.fixFrontNode";
4224 static const char __pyx_k_ProtChMoorings_setApplyDrag[] = "ProtChMoorings.setApplyDrag";
4225 static const char __pyx_k_ProtChMoorings_updateForces[] = "ProtChMoorings.updateForces";
4226 static const char __pyx_k_ProtChSystem_calculate_init[] = "ProtChSystem.calculate_init";
4227 static const char __pyx_k_ProtChSystem_log_springs_h5[] = "ProtChSystem.log_springs_h5";
4228 static const char __pyx_k_addPrismaticLinksWithSpring[] = "addPrismaticLinksWithSpring";
4229 static const char __pyx_k_getFluidVelocityLocalCoords[] = "getFluidVelocityLocalCoords";
4230 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
4231 static const char __pyx_k_nodeOffsets_subdomain_owned[] = "nodeOffsets_subdomain_owned";
4232 static const char __pyx_k_proteus_mbd_CouplingFSI_pyx[] = "proteus/mbd/CouplingFSI.pyx";
4233 static const char __pyx_k_setFluidAccelerationAtNodes[] = "setFluidAccelerationAtNodes";
4234 static const char __pyx_k_0_h5_nodesSpatial_Domain_1_d[] = "{0}.h5:/nodesSpatial_Domain{1:d}";
4235 static const char __pyx_k_Prediction_requested_unknown[] = "Prediction requested unknown";
4236 static const char __pyx_k_ProtChBody___setstate_cython[] = "ProtChBody.__setstate_cython__";
4237 static const char __pyx_k_ProtChBody_addPrismaticLinkX[] = "ProtChBody.addPrismaticLinkX";
4238 static const char __pyx_k_ProtChBody_getPressureForces[] = "ProtChBody.getPressureForces";
4239 static const char __pyx_k_ProtChBody_getRotationMatrix[] = "ProtChBody.getRotationMatrix";
4240 static const char __pyx_k_ProtChBody_setExternalForces[] = "ProtChBody.setExternalForces";
4241 static const char __pyx_k_ProtChMesh___setstate_cython[] = "ProtChMesh.__setstate_cython__";
4242 static const char __pyx_k_ProtChMoorings__recordValues[] = "ProtChMoorings._recordValues";
4243 static const char __pyx_k_ProtChMoorings_getDragForces[] = "ProtChMoorings.getDragForces";
4244 static const char __pyx_k_ProtChSystem___reduce_cython[] = "ProtChSystem.__reduce_cython__";
4245 static const char __pyx_k_ProtChSystem_addSubcomponent[] = "ProtChSystem.addSubcomponent";
4246 static const char __pyx_k_ProtChSystem_getChronoObject[] = "ProtChSystem.getChronoObject";
4247 static const char __pyx_k_ProtChSystem_log_bodies_text[] = "ProtChSystem.log_bodies_text";
4248 static const char __pyx_k_Solving_Chrono_system_from_t[] = "Solving Chrono system from t=";
4249 static const char __pyx_k_getGravitationalAcceleration[] = "getGravitationalAcceleration";
4250 static const char __pyx_k_setGravitationalAcceleration[] = "setGravitationalAcceleration";
4251 static const char __pyx_k_ProtChMoorings_calculate_init[] = "ProtChMoorings.calculate_init";
4252 static const char __pyx_k_ProtChMoorings_getTensionBack[] = "ProtChMoorings.getTensionBack";
4253 static const char __pyx_k_ProtChSystem_log_residuals_h5[] = "ProtChSystem.log_residuals_h5";
4254 static const char __pyx_k_ProtChSystem_log_springs_text[] = "ProtChSystem.log_springs_text";
4255 static const char __pyx_k_arrays_are_not_of_same_length[] = "arrays are not of same length";
4256 static const char __pyx_k_findElementContainingCoordsKD[] = "findElementContainingCoordsKD";
4257 static const char __pyx_k_finished_recording_h5_file_of[] = "finished recording h5 file of ";
4258 static const char __pyx_k_http_www_w3_org_2001_XInclude[] = "http://www.w3.org/2001/XInclude";
4259 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
4260 static const char __pyx_k_Chrono_body_log_not_understood[] = "Chrono body log not understood.";
4261 static const char __pyx_k_ProtChAddedMass_calculate_init[] = "ProtChAddedMass.calculate_init";
4262 static const char __pyx_k_ProtChBody_getTriangleMeshInfo[] = "ProtChBody.getTriangleMeshInfo";
4263 static const char __pyx_k_ProtChBody_setCollisionOptions[] = "ProtChBody.setCollisionOptions";
4264 static const char __pyx_k_ProtChBody_setPrescribedMotion[] = "ProtChBody.setPrescribedMotion";
4265 static const char __pyx_k_ProtChMoorings___reduce_cython[] = "ProtChMoorings.__reduce_cython__";
4266 static const char __pyx_k_ProtChMoorings_getNodesTension[] = "ProtChMoorings.getNodesTension";
4267 static const char __pyx_k_ProtChMoorings_getTensionFront[] = "ProtChMoorings.getTensionFront";
4268 static const char __pyx_k_ProtChMoorings_recordStrainEta[] = "ProtChMoorings.recordStrainEta";
4269 static const char __pyx_k_ProtChSystem___setstate_cython[] = "ProtChSystem.__setstate_cython__";
4270 static const char __pyx_k_ProtChSystem_setCouplingScheme[] = "ProtChSystem.setCouplingScheme";
4271 static const char __pyx_k_finished_recording_xmf_file_of[] = "finished recording xmf file of ";
4272 static const char __pyx_k_finished_recording_xml_file_of[] = "finished recording xml file of ";
4273 static const char __pyx_k_nodeNumbering_subdomain2global[] = "nodeNumbering_subdomain2global";
4274 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
4275 static const char __pyx_k_0_h5_elementsSpatial_Domain_1_d[] = "{0}.h5:/elementsSpatial_Domain{1:d}";
4276 static const char __pyx_k_ChBodyAddedMass___reduce_cython[] = "ChBodyAddedMass.__reduce_cython__";
4277 static const char __pyx_k_Coupling_between_Chrono_and_Pro[] = "\nCoupling between Chrono and Proteus is done in this file.\n\nObjects (classes) starting with 'ProtCh' (e.g. ProtChBody) are objects that\nhave logic specifically developed for communication between Proteus and Chrono.\n\nObjects starting with 'Ch' (e.g. ChBody) are objects that only have Chrono\nlogic associated to them.\n\nSome ProtCh objects give access to the Chrono object:\nmy_protchsystem = ProtChSystem()\nmy_protchbody = ProtChBody(system=my_protchsystem)\nmy_chbody = my_protchbody.ChBody\nmy_chbody.SetPos(...)\nmy_chbody.SetRot(...)\n\n# pass the index of the boundaries (or particle index) where forces must be integrated\nmy_protchbody.setIndexBoundary([0, 1, 2, 3])\n# alternatively, if you use a Shape instance from proteus.SpatialTools\n# the boundaries indice will be set automatically after calling SpatialTools.assembleDomain()\nmy_protchbody.setShape(my_shape)\n";
4278 static const char __pyx_k_Finished_search_for_cable_nodes[] = "Finished search for cable nodes";
4279 static const char __pyx_k_ProtChAddedMass___reduce_cython[] = "ProtChAddedMass.__reduce_cython__";
4280 static const char __pyx_k_ProtChMoorings_getNodesPosition[] = "ProtChMoorings.getNodesPosition";
4281 static const char __pyx_k_ProtChMoorings_getNodesVelocity[] = "ProtChMoorings.getNodesVelocity";
4282 static const char __pyx_k_ProtChMoorings_setApplyBuoyancy[] = "ProtChMoorings.setApplyBuoyancy";
4283 static const char __pyx_k_ProtChMoorings_setNodesPosition[] = "ProtChMoorings.setNodesPosition";
4284 static const char __pyx_k_ProtChSystem_log_residuals_text[] = "ProtChSystem.log_residuals_text";
4285 static const char __pyx_k_ProtChSystem_setMinimumSubsteps[] = "ProtChSystem.setMinimumSubsteps";
4286 static const char __pyx_k_ProtChSystem_setTimestepperType[] = "ProtChSystem.setTimestepperType";
4287 static const char __pyx_k_ang2_and_t_should_have_the_same[] = "ang2 and t should have the same length";
4288 static const char __pyx_k_ang3_and_t_should_have_the_same[] = "ang3 and t should have the same length";
4289 static const char __pyx_k_array_of_length_of_elements_not[] = "array of length of elements not matching number of elements";
4290 static const char __pyx_k_findElementContainingCoordsDist[] = "findElementContainingCoordsDist";
4291 static const char __pyx_k_no_Shape_was_defined_for_making[] = "no Shape was defined for making a triangle mesh";
4292 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
4293 static const char __pyx_k_xml_version_1_0_DOCTYPE_Xdmf_SY[] = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n";
4294 static const char __pyx_k_Added_mass_matrix_must_be_6x6_np[] = "Added mass matrix must be 6x6 (np)";
4295 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
4296 static const char __pyx_k_Building_k_d_tree_for_mooring_no[] = "Building k-d tree for mooring nodes lookup";
4297 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
4298 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
4299 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
4300 static const char __pyx_k_ChBodyAddedMass___setstate_cytho[] = "ChBodyAddedMass.__setstate_cython__";
4301 static const char __pyx_k_Coupling_scheme_requested_unknow[] = "Coupling scheme requested unknown";
4302 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
4303 static const char __pyx_k_Facets_must_be_triangles_for_tri[] = "Facets must be triangles for triangle mesh but facet ";
4304 static const char __pyx_k_IBM_set_to_be_used_in_bodies_but[] = "IBM set to be used in bodies but model is not attached. Attach rans model BEFORE calling calculate_init() on chrono system";
4305 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))";
4306 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
4307 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
4308 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
4309 static const char __pyx_k_ProtChAddedMass___setstate_cytho[] = "ProtChAddedMass.__setstate_cython__";
4310 static const char __pyx_k_ProtChAddedMass_attachAuxiliaryV[] = "ProtChAddedMass.attachAuxiliaryVariables";
4311 static const char __pyx_k_ProtChBody_addPrismaticLinksWith[] = "ProtChBody.addPrismaticLinksWithSpring";
4312 static const char __pyx_k_ProtChBody_addTriangleMeshFromSh[] = "ProtChBody.addTriangleMeshFromShape";
4313 static const char __pyx_k_ProtChBody_attachAuxiliaryVariab[] = "ProtChBody.attachAuxiliaryVariables";
4314 static const char __pyx_k_ProtChBody_setPrescribedMotionCu[] = "ProtChBody.setPrescribedMotionCustom";
4315 static const char __pyx_k_ProtChBody_setPrescribedMotionPo[] = "ProtChBody.setPrescribedMotionPoly";
4316 static const char __pyx_k_ProtChBody_setPrescribedMotionSi[] = "ProtChBody.setPrescribedMotionSine";
4317 static const char __pyx_k_ProtChMoorings___setstate_cython[] = "ProtChMoorings.__setstate_cython__";
4318 static const char __pyx_k_ProtChMoorings_attachBackNodeToB[] = "ProtChMoorings.attachBackNodeToBody";
4319 static const char __pyx_k_ProtChMoorings_attachFrontNodeTo[] = "ProtChMoorings.attachFrontNodeToBody";
4320 static const char __pyx_k_ProtChMoorings_getAddedMassForce[] = "ProtChMoorings.getAddedMassForces";
4321 static const char __pyx_k_ProtChMoorings_getNodesAccelerat[] = "ProtChMoorings.getNodesAcceleration";
4322 static const char __pyx_k_ProtChMoorings_getTensionElement[] = "ProtChMoorings.getTensionElement";
4323 static const char __pyx_k_ProtChMoorings_setAddedMassCoeff[] = "ProtChMoorings.setAddedMassCoefficients";
4324 static const char __pyx_k_ProtChMoorings_setApplyAddedMass[] = "ProtChMoorings.setApplyAddedMass";
4325 static const char __pyx_k_ProtChMoorings_setContactMateria[] = "ProtChMoorings.setContactMaterial";
4326 static const char __pyx_k_ProtChMoorings_setDragCoefficien[] = "ProtChMoorings.setDragCoefficients";
4327 static const char __pyx_k_ProtChMoorings_setExternalForces[] = "ProtChMoorings.setExternalForces";
4328 static const char __pyx_k_ProtChMoorings_setFluidAccelerat[] = "ProtChMoorings.setFluidAccelerationAtNodes";
4329 static const char __pyx_k_ProtChMoorings_setFluidDensityAt[] = "ProtChMoorings.setFluidDensityAtNodes";
4330 static const char __pyx_k_ProtChMoorings_setFluidVelocityA[] = "ProtChMoorings.setFluidVelocityAtNodes";
4331 static const char __pyx_k_ProtChMoorings_setFluidVelocityF[] = "ProtChMoorings.setFluidVelocityFunction";
4332 static const char __pyx_k_ProtChMoorings_setNodesPositionF[] = "ProtChMoorings.setNodesPositionFunction";
4333 static const char __pyx_k_ProtChMoorings_setRestLengthPerE[] = "ProtChMoorings.setRestLengthPerElement";
4334 static const char __pyx_k_ProtChSystem_attachAuxiliaryVari[] = "ProtChSystem.attachAuxiliaryVariables";
4335 static const char __pyx_k_ProtChSystem_findElementContaini[] = "ProtChSystem.findElementContainingCoordsKD";
4336 static const char __pyx_k_ProtChSystem_getFluidVelocityGra[] = "ProtChSystem.getFluidVelocityGradientLocalCoords";
4337 static const char __pyx_k_ProtChSystem_getFluidVelocityLoc[] = "ProtChSystem.getFluidVelocityLocalCoords";
4338 static const char __pyx_k_ProtChSystem_getGravitationalAcc[] = "ProtChSystem.getGravitationalAcceleration";
4339 static const char __pyx_k_ProtChSystem_no_time_step_set_in[] = "ProtChSystem: no time step set in calculate()";
4340 static const char __pyx_k_ProtChSystem_setCollisionEnvelop[] = "ProtChSystem.setCollisionEnvelopeMargin";
4341 static const char __pyx_k_ProtChSystem_setGravitationalAcc[] = "ProtChSystem.setGravitationalAcceleration";
4342 static const char __pyx_k_Starting_distance_search_for_cab[] = "Starting distance search for cable nodes";
4343 static const char __pyx_k_Starting_k_d_tree_search_for_cab[] = "Starting k-d tree search for cable nodes";
4344 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
4345 static const char __pyx_k_Warning_Chrono_system_was_alread[] = "Warning: Chrono system was already initialized";
4346 static const char __pyx_k_addTriangleMeshFromVerticesFaces[] = "addTriangleMeshFromVerticesFaces";
4347 static const char __pyx_k_ang_and_t_should_have_the_same_l[] = "ang and t should have the same length";
4348 static const char __pyx_k_call_buildNodes_before_calling_t[] = "call buildNodes() before calling this function";
4349 static const char __pyx_k_finished_recording_values_file_o[] = "finished recording values file of ";
4350 static const char __pyx_k_getFluidVelocityGradientLocalCoo[] = "getFluidVelocityGradientLocalCoords";
4351 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
4352 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
4353 static const char __pyx_k_number_of_RANS_particles_nP_numb[] = "number of RANS particles {nP} != number of IBM bodies {nB}";
4354 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
4355 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
4356 static const char __pyx_k_x_and_t_should_have_the_same_len[] = "x and t should have the same length";
4357 static const char __pyx_k_y_and_t_should_have_the_same_len[] = "y and t should have the same length";
4358 static const char __pyx_k_z_and_t_should_have_the_same_len[] = "z and t should have the same length";
4359 static const char __pyx_k_Building_k_d_tree_for_mooring_no_2[] = "Building k-d tree for mooring nodes lookup on first time step";
4360 static const char __pyx_k_ProtChSystem_findElementContaini_2[] = "ProtChSystem.findElementContainingCoordsDist";
4361 static PyObject *__pyx_kp_s_0_d;
4362 static PyObject *__pyx_kp_s_0_d_1_d;
4363 static PyObject *__pyx_kp_s_0_e;
4364 static PyObject *__pyx_kp_s_0_h5_1__t_2_d;
4365 static PyObject *__pyx_kp_s_0_h5_elementsSpatial_Domain_1_d;
4366 static PyObject *__pyx_kp_s_0_h5_nodesSpatial_Domain_1_d;
4367 static PyObject *__pyx_kp_s_2_0;
4368 static PyObject *__pyx_kp_s_8;
4369 static PyObject *__pyx_n_s_A;
4370 static PyObject *__pyx_n_s_ASCII;
4371 static PyObject *__pyx_n_s_Add;
4372 static PyObject *__pyx_kp_s_Added_Mass_Matrix;
4373 static PyObject *__pyx_kp_s_Added_mass_matrix_must_be_6x6_np;
4374 static PyObject *__pyx_n_s_Aij;
4375 static PyObject *__pyx_kp_s_Aij_csv;
4376 static PyObject *__pyx_n_s_Aij_global;
4377 static PyObject *__pyx_n_s_Aij_last;
4378 static PyObject *__pyx_n_s_Aija;
4379 static PyObject *__pyx_n_s_Archiver;
4380 static PyObject *__pyx_n_s_Attribute;
4381 static PyObject *__pyx_n_s_AttributeType;
4382 static PyObject *__pyx_n_s_AuxiliaryVariables;
4383 static PyObject *__pyx_n_s_BodyDynamics;
4384 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
4385 static PyObject *__pyx_kp_s_Building_k_d_tree_for_mooring_no;
4386 static PyObject *__pyx_kp_s_Building_k_d_tree_for_mooring_no_2;
4387 static PyObject *__pyx_n_b_CSS;
4388 static PyObject *__pyx_n_b_CableANCF;
4389 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
4390 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
4391 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
4392 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
4393 static PyObject *__pyx_n_s_Center;
4394 static PyObject *__pyx_n_s_ChBody;
4395 static PyObject *__pyx_n_s_ChBodyAddedMass;
4396 static PyObject *__pyx_n_s_ChBodyAddedMass___reduce_cython;
4397 static PyObject *__pyx_n_s_ChBodyAddedMass___setstate_cytho;
4398 static PyObject *__pyx_n_s_ChElementBeamEuler;
4399 static PyObject *__pyx_n_s_ChElementCableANCF;
4400 static PyObject *__pyx_n_s_ChMatrix33D;
4401 static PyObject *__pyx_n_s_ChMatrixDynamicD;
4402 static PyObject *__pyx_n_s_ChMesh;
4403 static PyObject *__pyx_n_s_ChNodeFEAxyzD;
4404 static PyObject *__pyx_n_s_ChNodeFEAxyzrot;
4405 static PyObject *__pyx_n_s_ChQuaternionD;
4406 static PyObject *__pyx_n_s_ChRigidBody;
4407 static PyObject *__pyx_n_s_ChSystemSMC;
4408 static PyObject *__pyx_n_s_ChVectorD;
4409 static PyObject *__pyx_kp_s_Chrono_body_log_not_understood;
4410 static PyObject *__pyx_kp_s_Chrono_poststep;
4411 static PyObject *__pyx_kp_s_Chrono_poststep_finished;
4412 static PyObject *__pyx_kp_s_Chrono_prestep;
4413 static PyObject *__pyx_kp_s_Chrono_system_to_t;
4414 static PyObject *__pyx_n_s_Collection;
4415 static PyObject *__pyx_n_s_CollectionType;
4416 static PyObject *__pyx_n_s_Comm;
4417 static PyObject *__pyx_kp_s_Coupling_scheme_requested_unknow;
4418 static PyObject *__pyx_n_s_DataItem;
4419 static PyObject *__pyx_n_s_DataType;
4420 static PyObject *__pyx_n_s_Dimensions;
4421 static PyObject *__pyx_n_s_Domain;
4422 static PyObject *__pyx_n_s_E;
4423 static PyObject *__pyx_n_s_ET;
4424 static PyObject *__pyx_n_s_Element;
4425 static PyObject *__pyx_n_s_ElementTree;
4426 static PyObject *__pyx_n_s_Ellipsis;
4427 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
4428 static PyObject *__pyx_n_s_Euler;
4429 static PyObject *__pyx_n_s_F;
4430 static PyObject *__pyx_n_s_FM;
4431 static PyObject *__pyx_n_s_F_Aij;
4432 static PyObject *__pyx_kp_s_F_applied;
4433 static PyObject *__pyx_n_s_F_applied_2;
4434 static PyObject *__pyx_n_s_F_bar;
4435 static PyObject *__pyx_n_s_F_body;
4436 static PyObject *__pyx_n_s_F_p;
4437 static PyObject *__pyx_n_s_F_prot;
4438 static PyObject *__pyx_n_s_F_solid_type;
4439 static PyObject *__pyx_n_s_F_v;
4440 static PyObject *__pyx_kp_s_Facets_must_be_triangles_for_tri;
4441 static PyObject *__pyx_n_s_Fd;
4442 static PyObject *__pyx_n_s_File;
4443 static PyObject *__pyx_kp_s_Finished_init;
4444 static PyObject *__pyx_kp_s_Finished_search_for_cable_nodes;
4445 static PyObject *__pyx_n_s_Float;
4446 static PyObject *__pyx_n_s_Format;
4447 static PyObject *__pyx_kp_s_Full_Mass_Matrix;
4448 static PyObject *__pyx_n_s_Fx;
4449 static PyObject *__pyx_n_s_Fx_Aij;
4450 static PyObject *__pyx_n_s_Fx_applied;
4451 static PyObject *__pyx_n_s_Fx_prot;
4452 static PyObject *__pyx_n_s_Fy;
4453 static PyObject *__pyx_n_s_Fy_Aij;
4454 static PyObject *__pyx_n_s_Fy_applied;
4455 static PyObject *__pyx_n_s_Fy_prot;
4456 static PyObject *__pyx_n_s_Fz;
4457 static PyObject *__pyx_n_s_Fz_Aij;
4458 static PyObject *__pyx_n_s_Fz_applied;
4459 static PyObject *__pyx_n_s_Fz_prot;
4460 static PyObject *__pyx_n_s_Geometry;
4461 static PyObject *__pyx_n_s_GetC;
4462 static PyObject *__pyx_n_s_GetChTime;
4463 static PyObject *__pyx_n_s_GetElement;
4464 static PyObject *__pyx_n_s_GetInertia;
4465 static PyObject *__pyx_n_s_GetMass;
4466 static PyObject *__pyx_n_s_GetPos;
4467 static PyObject *__pyx_n_s_GetPos_dt;
4468 static PyObject *__pyx_n_s_GetPos_dtdt;
4469 static PyObject *__pyx_n_s_GetRot;
4470 static PyObject *__pyx_n_s_GetSpringLength;
4471 static PyObject *__pyx_n_s_GetSpringReact;
4472 static PyObject *__pyx_n_s_GetSpringVelocity;
4473 static PyObject *__pyx_n_s_GetWacc_loc;
4474 static PyObject *__pyx_n_s_GetWacc_par;
4475 static PyObject *__pyx_n_s_GetWvel_loc;
4476 static PyObject *__pyx_n_s_Get_A_Xaxis;
4477 static PyObject *__pyx_n_s_Get_A_Yaxis;
4478 static PyObject *__pyx_n_s_Get_A_Zaxis;
4479 static PyObject *__pyx_n_s_Get_G_acc;
4480 static PyObject *__pyx_n_s_Get_XForce;
4481 static PyObject *__pyx_n_s_Get_Xtorque;
4482 static PyObject *__pyx_n_s_Grid;
4483 static PyObject *__pyx_n_s_GridType;
4484 static PyObject *__pyx_n_s_HDF;
4485 static PyObject *__pyx_n_s_HHT;
4486 static PyObject *__pyx_kp_s_IBM_set_to_be_used_in_bodies_but;
4487 static PyObject *__pyx_n_s_ImportError;
4488 static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
4489 static PyObject *__pyx_n_s_IndexError;
4490 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
4491 static PyObject *__pyx_n_s_Int;
4492 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
4493 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
4494 static PyObject *__pyx_n_s_Iyy;
4495 static PyObject *__pyx_n_s_L;
4496 static PyObject *__pyx_n_s_L0;
4497 static PyObject *__pyx_n_s_M;
4498 static PyObject *__pyx_n_s_MAXLOC;
4499 static PyObject *__pyx_n_s_MINLOC;
4500 static PyObject *__pyx_n_s_MM;
4501 static PyObject *__pyx_n_s_MPI;
4502 static PyObject *__pyx_n_s_M_applied;
4503 static PyObject *__pyx_n_s_M_bar;
4504 static PyObject *__pyx_n_s_M_body;
4505 static PyObject *__pyx_n_s_M_prot;
4506 static PyObject *__pyx_kp_s_Mass_Matrix;
4507 static PyObject *__pyx_n_s_MemoryError;
4508 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
4509 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
4510 static PyObject *__pyx_n_s_Mesh;
4511 static PyObject *__pyx_n_s_Mesh_Spatial_Domain;
4512 static PyObject *__pyx_kp_s_Mesh_Spatial_Domain__0_d;
4513 static PyObject *__pyx_n_s_Mp;
4514 static PyObject *__pyx_n_s_Mx;
4515 static PyObject *__pyx_n_s_Mx_applied;
4516 static PyObject *__pyx_n_s_Mx_prot;
4517 static PyObject *__pyx_n_s_My;
4518 static PyObject *__pyx_n_s_My_applied;
4519 static PyObject *__pyx_n_s_My_prot;
4520 static PyObject *__pyx_n_s_Mz;
4521 static PyObject *__pyx_n_s_Mz_applied;
4522 static PyObject *__pyx_n_s_Mz_prot;
4523 static PyObject *__pyx_n_s_Name;
4524 static PyObject *__pyx_n_s_Node;
4525 static PyObject *__pyx_n_s_NodesPerElement;
4526 static PyObject *__pyx_n_s_NotImplementedError;
4527 static PyObject *__pyx_n_s_NumberOfElements;
4528 static PyObject *__pyx_n_b_O;
4529 static PyObject *__pyx_n_s_OrderedDict;
4530 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
4531 static PyObject *__pyx_n_s_PickleError;
4532 static PyObject *__pyx_n_s_Polyline;
4533 static PyObject *__pyx_n_s_Precision;
4534 static PyObject *__pyx_kp_s_Prediction_requested_unknown;
4535 static PyObject *__pyx_n_s_Profiling;
4536 static PyObject *__pyx_n_s_ProtChAddedMass;
4537 static PyObject *__pyx_n_s_ProtChAddedMass___reduce_cython;
4538 static PyObject *__pyx_n_s_ProtChAddedMass___setstate_cytho;
4539 static PyObject *__pyx_n_s_ProtChAddedMass_attachAuxiliaryV;
4540 static PyObject *__pyx_n_s_ProtChAddedMass_attachModel;
4541 static PyObject *__pyx_n_s_ProtChAddedMass_calculate;
4542 static PyObject *__pyx_n_s_ProtChAddedMass_calculate_init;
4543 static PyObject *__pyx_n_s_ProtChBody;
4544 static PyObject *__pyx_n_s_ProtChBody___reduce_cython;
4545 static PyObject *__pyx_n_s_ProtChBody___setstate_cython;
4546 static PyObject *__pyx_n_s_ProtChBody__recordH5;
4547 static PyObject *__pyx_n_s_ProtChBody__recordValues;
4548 static PyObject *__pyx_n_s_ProtChBody__recordXML;
4549 static PyObject *__pyx_n_s_ProtChBody_addPrismaticLinkX;
4550 static PyObject *__pyx_n_s_ProtChBody_addPrismaticLinksWith;
4551 static PyObject *__pyx_n_s_ProtChBody_addSpring;
4552 static PyObject *__pyx_n_s_ProtChBody_addTriangleMeshFromSh;
4553 static PyObject *__pyx_n_s_ProtChBody_attachAuxiliaryVariab;
4554 static PyObject *__pyx_n_s_ProtChBody_attachShape;
4555 static PyObject *__pyx_n_s_ProtChBody_calculate;
4556 static PyObject *__pyx_n_s_ProtChBody_calculate_init;
4557 static PyObject *__pyx_n_s_ProtChBody_getChronoObject;
4558 static PyObject *__pyx_n_s_ProtChBody_getDynamicSDF;
4559 static PyObject *__pyx_n_s_ProtChBody_getInertia;
4560 static PyObject *__pyx_n_s_ProtChBody_getMass;
4561 static PyObject *__pyx_n_s_ProtChBody_getMoments;
4562 static PyObject *__pyx_n_s_ProtChBody_getPosition;
4563 static PyObject *__pyx_n_s_ProtChBody_getPressureForces;
4564 static PyObject *__pyx_n_s_ProtChBody_getRotationMatrix;
4565 static PyObject *__pyx_n_s_ProtChBody_getShearForces;
4566 static PyObject *__pyx_n_s_ProtChBody_getTriangleMeshInfo;
4567 static PyObject *__pyx_n_s_ProtChBody_getValues;
4568 static PyObject *__pyx_n_s_ProtChBody_getVelocity;
4569 static PyObject *__pyx_n_s_ProtChBody_hx;
4570 static PyObject *__pyx_n_s_ProtChBody_hx_rotation;
4571 static PyObject *__pyx_n_s_ProtChBody_hx_translation;
4572 static PyObject *__pyx_n_s_ProtChBody_hxyz;
4573 static PyObject *__pyx_n_s_ProtChBody_hy;
4574 static PyObject *__pyx_n_s_ProtChBody_hy_rotation;
4575 static PyObject *__pyx_n_s_ProtChBody_hy_translation;
4576 static PyObject *__pyx_n_s_ProtChBody_hz;
4577 static PyObject *__pyx_n_s_ProtChBody_hz_rotation;
4578 static PyObject *__pyx_n_s_ProtChBody_hz_translation;
4579 static PyObject *__pyx_n_s_ProtChBody_poststep;
4580 static PyObject *__pyx_n_s_ProtChBody_prediction;
4581 static PyObject *__pyx_n_s_ProtChBody_prestep;
4582 static PyObject *__pyx_n_s_ProtChBody_setAddedMass;
4583 static PyObject *__pyx_n_s_ProtChBody_setBoundaryFlags;
4584 static PyObject *__pyx_n_s_ProtChBody_setCollisionOptions;
4585 static PyObject *__pyx_n_s_ProtChBody_setConstraints;
4586 static PyObject *__pyx_n_s_ProtChBody_setExternalForces;
4587 static PyObject *__pyx_n_s_ProtChBody_setIBM;
4588 static PyObject *__pyx_n_s_ProtChBody_setInertiaXX;
4589 static PyObject *__pyx_n_s_ProtChBody_setInertiaXY;
4590 static PyObject *__pyx_n_s_ProtChBody_setInitialRot;
4591 static PyObject *__pyx_n_s_ProtChBody_setMass;
4592 static PyObject *__pyx_n_s_ProtChBody_setName;
4593 static PyObject *__pyx_n_s_ProtChBody_setPosition;
4594 static PyObject *__pyx_n_s_ProtChBody_setPrescribedMotion;
4595 static PyObject *__pyx_n_s_ProtChBody_setPrescribedMotionCu;
4596 static PyObject *__pyx_n_s_ProtChBody_setPrescribedMotionPo;
4597 static PyObject *__pyx_n_s_ProtChBody_setPrescribedMotionSi;
4598 static PyObject *__pyx_n_s_ProtChBody_setRecordValues;
4599 static PyObject *__pyx_n_s_ProtChBody_setVelocity;
4600 static PyObject *__pyx_n_s_ProtChBody_setWidth2D;
4601 static PyObject *__pyx_n_s_ProtChBody_storeValues;
4602 static PyObject *__pyx_n_s_ProtChBody_updateIBM;
4603 static PyObject *__pyx_n_s_ProtChMesh;
4604 static PyObject *__pyx_n_s_ProtChMesh___reduce_cython;
4605 static PyObject *__pyx_n_s_ProtChMesh___setstate_cython;
4606 static PyObject *__pyx_n_s_ProtChMesh_getChronoObject;
4607 static PyObject *__pyx_n_s_ProtChMoorings;
4608 static PyObject *__pyx_n_s_ProtChMoorings___reduce_cython;
4609 static PyObject *__pyx_n_s_ProtChMoorings___setstate_cython;
4610 static PyObject *__pyx_n_s_ProtChMoorings__recordH5;
4611 static PyObject *__pyx_n_s_ProtChMoorings__recordValues;
4612 static PyObject *__pyx_n_s_ProtChMoorings__recordXML;
4613 static PyObject *__pyx_n_s_ProtChMoorings_attachBackNodeToB;
4614 static PyObject *__pyx_n_s_ProtChMoorings_attachFrontNodeTo;
4615 static PyObject *__pyx_n_s_ProtChMoorings_buildNodes;
4616 static PyObject *__pyx_n_s_ProtChMoorings_calculate_init;
4617 static PyObject *__pyx_n_s_ProtChMoorings_fixBackNode;
4618 static PyObject *__pyx_n_s_ProtChMoorings_fixFrontNode;
4619 static PyObject *__pyx_n_s_ProtChMoorings_getAddedMassForce;
4620 static PyObject *__pyx_n_s_ProtChMoorings_getDragForces;
4621 static PyObject *__pyx_n_s_ProtChMoorings_getNodesAccelerat;
4622 static PyObject *__pyx_n_s_ProtChMoorings_getNodesD;
4623 static PyObject *__pyx_n_s_ProtChMoorings_getNodesPosition;
4624 static PyObject *__pyx_n_s_ProtChMoorings_getNodesTension;
4625 static PyObject *__pyx_n_s_ProtChMoorings_getNodesVelocity;
4626 static PyObject *__pyx_n_s_ProtChMoorings_getTensionBack;
4627 static PyObject *__pyx_n_s_ProtChMoorings_getTensionElement;
4628 static PyObject *__pyx_n_s_ProtChMoorings_getTensionFront;
4629 static PyObject *__pyx_n_s_ProtChMoorings_poststep;
4630 static PyObject *__pyx_n_s_ProtChMoorings_prestep;
4631 static PyObject *__pyx_n_s_ProtChMoorings_recordStrainEta;
4632 static PyObject *__pyx_n_s_ProtChMoorings_setAddedMassCoeff;
4633 static PyObject *__pyx_n_s_ProtChMoorings_setApplyAddedMass;
4634 static PyObject *__pyx_n_s_ProtChMoorings_setApplyBuoyancy;
4635 static PyObject *__pyx_n_s_ProtChMoorings_setApplyDrag;
4636 static PyObject *__pyx_n_s_ProtChMoorings_setContactMateria;
4637 static PyObject *__pyx_n_s_ProtChMoorings_setDragCoefficien;
4638 static PyObject *__pyx_n_s_ProtChMoorings_setExternalForces;
4639 static PyObject *__pyx_n_s_ProtChMoorings_setFluidAccelerat;
4640 static PyObject *__pyx_n_s_ProtChMoorings_setFluidDensityAt;
4641 static PyObject *__pyx_n_s_ProtChMoorings_setFluidVelocityA;
4642 static PyObject *__pyx_n_s_ProtChMoorings_setFluidVelocityF;
4643 static PyObject *__pyx_n_s_ProtChMoorings_setIyy;
4644 static PyObject *__pyx_n_s_ProtChMoorings_setName;
4645 static PyObject *__pyx_n_s_ProtChMoorings_setNodesPosition;
4646 static PyObject *__pyx_n_s_ProtChMoorings_setNodesPositionF;
4647 static PyObject *__pyx_n_s_ProtChMoorings_setRestLengthPerE;
4648 static PyObject *__pyx_n_s_ProtChMoorings_updateForces;
4649 static PyObject *__pyx_n_s_ProtChSystem;
4650 static PyObject *__pyx_n_s_ProtChSystem___reduce_cython;
4651 static PyObject *__pyx_n_s_ProtChSystem___setstate_cython;
4652 static PyObject *__pyx_n_s_ProtChSystem_addProtChBody;
4653 static PyObject *__pyx_n_s_ProtChSystem_addProtChMesh;
4654 static PyObject *__pyx_n_s_ProtChSystem_addSubcomponent;
4655 static PyObject *__pyx_n_s_ProtChSystem_attachAuxiliaryVari;
4656 static PyObject *__pyx_n_s_ProtChSystem_attachModel;
4657 static PyObject *__pyx_n_s_ProtChSystem_calculate;
4658 static PyObject *__pyx_n_s_ProtChSystem_calculate_init;
4659 static PyObject *__pyx_n_s_ProtChSystem_findElementContaini;
4660 static PyObject *__pyx_n_s_ProtChSystem_findElementContaini_2;
4661 static PyObject *__pyx_n_s_ProtChSystem_getChronoObject;
4662 static PyObject *__pyx_n_s_ProtChSystem_getFluidVelocityGra;
4663 static PyObject *__pyx_n_s_ProtChSystem_getFluidVelocityLoc;
4664 static PyObject *__pyx_n_s_ProtChSystem_getGravitationalAcc;
4665 static PyObject *__pyx_n_s_ProtChSystem_log_bodies_h5;
4666 static PyObject *__pyx_n_s_ProtChSystem_log_bodies_text;
4667 static PyObject *__pyx_n_s_ProtChSystem_log_residuals_h5;
4668 static PyObject *__pyx_n_s_ProtChSystem_log_residuals_text;
4669 static PyObject *__pyx_n_s_ProtChSystem_log_springs_h5;
4670 static PyObject *__pyx_n_s_ProtChSystem_log_springs_text;
4671 static PyObject *__pyx_n_s_ProtChSystem_log_times_h5;
4672 static PyObject *__pyx_kp_s_ProtChSystem_no_time_step_set_in;
4673 static PyObject *__pyx_n_s_ProtChSystem_setCollisionEnvelop;
4674 static PyObject *__pyx_n_s_ProtChSystem_setCouplingScheme;
4675 static PyObject *__pyx_n_s_ProtChSystem_setGravitationalAcc;
4676 static PyObject *__pyx_n_s_ProtChSystem_setMinimumSubsteps;
4677 static PyObject *__pyx_n_s_ProtChSystem_setSampleRate;
4678 static PyObject *__pyx_n_s_ProtChSystem_setTimeStep;
4679 static PyObject *__pyx_n_s_ProtChSystem_setTimestepperType;
4680 static PyObject *__pyx_n_s_ProtChSystem_step;
4681 static PyObject *__pyx_n_s_Scalar;
4682 static PyObject *__pyx_n_s_SetInertiaXX;
4683 static PyObject *__pyx_n_s_SetInertiaXY;
4684 static PyObject *__pyx_n_s_SetMass;
4685 static PyObject *__pyx_n_s_SetPos;
4686 static PyObject *__pyx_n_s_SetPos_dt;
4687 static PyObject *__pyx_n_s_SetRot;
4688 static PyObject *__pyx_n_s_Set_G_acc;
4689 static PyObject *__pyx_n_s_Setup;
4690 static PyObject *__pyx_kp_s_Setup_initial;
4691 static PyObject *__pyx_kp_s_Shape;
4692 static PyObject *__pyx_kp_s_Solved_Chrono_system_to_t;
4693 static PyObject *__pyx_kp_s_Solving_Chrono_system_from_t;
4694 static PyObject *__pyx_n_s_SpatialTools;
4695 static PyObject *__pyx_kp_s_Spatial_Domain;
4696 static PyObject *__pyx_kp_s_Starting_distance_search_for_cab;
4697 static PyObject *__pyx_kp_s_Starting_init;
4698 static PyObject *__pyx_kp_s_Starting_k_d_tree_search_for_cab;
4699 static PyObject *__pyx_n_s_SubElement;
4700 static PyObject *__pyx_n_s_T;
4701 static PyObject *__pyx_n_s_Tb;
4702 static PyObject *__pyx_n_s_Tb0;
4703 static PyObject *__pyx_n_s_Tb1;
4704 static PyObject *__pyx_n_s_Tb2;
4705 static PyObject *__pyx_n_s_Temporal;
4706 static PyObject *__pyx_n_s_Tf;
4707 static PyObject *__pyx_n_s_Tf0;
4708 static PyObject *__pyx_n_s_Tf1;
4709 static PyObject *__pyx_n_s_Tf2;
4710 static PyObject *__pyx_n_s_Time;
4711 static PyObject *__pyx_n_s_Topology;
4712 static PyObject *__pyx_n_s_Trapezoidal;
4713 static PyObject *__pyx_n_s_Triangle;
4714 static PyObject *__pyx_n_s_Type;
4715 static PyObject *__pyx_n_s_TypeError;
4716 static PyObject *__pyx_n_s_UInt;
4717 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
4718 static PyObject *__pyx_n_s_Uniform;
4719 static PyObject *__pyx_n_s_Value;
4720 static PyObject *__pyx_n_s_ValueError;
4721 static PyObject *__pyx_n_s_Version;
4722 static PyObject *__pyx_n_s_View_MemoryView;
4723 static PyObject *__pyx_kp_s_Warning_Chrono_system_was_alread;
4724 static PyObject *__pyx_n_s_XYZ;
4725 static PyObject *__pyx_n_s_Xdmf;
4726 static PyObject *__pyx_n_s_Xdmf_ElementTopology;
4727 static PyObject *__pyx_n_s_Xdmf_NodesPerElement;
4728 static PyObject *__pyx_n_s_Xdmf_NumberOfElements;
4729 static PyObject *__pyx_kp_s__112;
4730 static PyObject *__pyx_kp_s__115;
4731 static PyObject *__pyx_kp_s__125;
4732 static PyObject *__pyx_kp_s__126;
4733 static PyObject *__pyx_kp_s__17;
4734 static PyObject *__pyx_n_s__240;
4735 static PyObject *__pyx_n_s__316;
4736 static PyObject *__pyx_kp_s__87;
4737 static PyObject *__pyx_n_s_a;
4738 static PyObject *__pyx_kp_s_a_2;
4739 static PyObject *__pyx_n_s_aa;
4740 static PyObject *__pyx_n_s_acc;
4741 static PyObject *__pyx_n_s_acceleration;
4742 static PyObject *__pyx_n_s_acceleration_array;
4743 static PyObject *__pyx_n_s_acceleration_t;
4744 static PyObject *__pyx_n_s_addPrismaticLinkX;
4745 static PyObject *__pyx_n_s_addPrismaticLinksWithSpring;
4746 static PyObject *__pyx_n_s_addProtChBody;
4747 static PyObject *__pyx_n_s_addProtChMesh;
4748 static PyObject *__pyx_n_s_addSpring;
4749 static PyObject *__pyx_n_s_addSubcomponent;
4750 static PyObject *__pyx_n_s_addTriangleMeshFromShape;
4751 static PyObject *__pyx_n_s_addTriangleMeshFromVerticesFaces;
4752 static PyObject *__pyx_n_s_all;
4753 static PyObject *__pyx_n_s_all_names;
4754 static PyObject *__pyx_n_s_all_values;
4755 static PyObject *__pyx_n_s_allocate_buffer;
4756 static PyObject *__pyx_n_s_allreduce;
4757 static PyObject *__pyx_n_s_am;
4758 static PyObject *__pyx_n_s_am_t;
4759 static PyObject *__pyx_n_s_amx;
4760 static PyObject *__pyx_n_s_amx_t;
4761 static PyObject *__pyx_n_s_amy;
4762 static PyObject *__pyx_n_s_amy_t;
4763 static PyObject *__pyx_n_s_amz;
4764 static PyObject *__pyx_n_s_amz_t;
4765 static PyObject *__pyx_n_s_anchor;
4766 static PyObject *__pyx_n_s_ang;
4767 static PyObject *__pyx_n_s_ang2;
4768 static PyObject *__pyx_kp_s_ang2_and_t_should_have_the_same;
4769 static PyObject *__pyx_n_s_ang2_vec;
4770 static PyObject *__pyx_n_s_ang2ang2;
4771 static PyObject *__pyx_n_s_ang3;
4772 static PyObject *__pyx_kp_s_ang3_and_t_should_have_the_same;
4773 static PyObject *__pyx_n_s_ang3_vec;
4774 static PyObject *__pyx_n_s_ang3ang3;
4775 static PyObject *__pyx_n_s_ang_acc;
4776 static PyObject *__pyx_n_s_ang_acceleration;
4777 static PyObject *__pyx_kp_s_ang_and_t_should_have_the_same_l;
4778 static PyObject *__pyx_n_s_ang_ax;
4779 static PyObject *__pyx_n_s_ang_ay;
4780 static PyObject *__pyx_n_s_ang_az;
4781 static PyObject *__pyx_n_s_ang_disp;
4782 static PyObject *__pyx_n_s_ang_last;
4783 static PyObject *__pyx_n_s_ang_ux;
4784 static PyObject *__pyx_n_s_ang_uy;
4785 static PyObject *__pyx_n_s_ang_uz;
4786 static PyObject *__pyx_n_s_ang_vec;
4787 static PyObject *__pyx_n_s_ang_vel;
4788 static PyObject *__pyx_n_s_ang_velocity;
4789 static PyObject *__pyx_n_s_angang;
4790 static PyObject *__pyx_n_s_append;
4791 static PyObject *__pyx_n_s_ar;
4792 static PyObject *__pyx_n_s_arGrid;
4793 static PyObject *__pyx_n_s_arGridCollection;
4794 static PyObject *__pyx_n_s_arTime;
4795 static PyObject *__pyx_n_s_args;
4796 static PyObject *__pyx_n_s_array;
4797 static PyObject *__pyx_kp_s_array_of_length_of_elements_not;
4798 static PyObject *__pyx_kp_s_arrays_are_not_of_same_length;
4799 static PyObject *__pyx_n_s_attachAuxiliaryVariables;
4800 static PyObject *__pyx_n_s_attachBackNodeToBody;
4801 static PyObject *__pyx_n_s_attachFrontNodeToBody;
4802 static PyObject *__pyx_n_s_attachModel;
4803 static PyObject *__pyx_n_s_attachNodeToNode;
4804 static PyObject *__pyx_n_s_attachShape;
4805 static PyObject *__pyx_n_s_attr;
4806 static PyObject *__pyx_n_s_auxiliaryVariables;
4807 static PyObject *__pyx_n_s_avDict;
4808 static PyObject *__pyx_n_s_ax;
4809 static PyObject *__pyx_n_s_ax_t;
4810 static PyObject *__pyx_n_s_axis;
4811 static PyObject *__pyx_n_s_ay;
4812 static PyObject *__pyx_n_s_ay_t;
4813 static PyObject *__pyx_n_s_az;
4814 static PyObject *__pyx_n_s_az_t;
4815 static PyObject *__pyx_n_b_backwardEuler;
4816 static PyObject *__pyx_n_s_ball_angular_velocity;
4817 static PyObject *__pyx_n_s_ball_center;
4818 static PyObject *__pyx_n_s_ball_radius;
4819 static PyObject *__pyx_n_s_ball_velocity;
4820 static PyObject *__pyx_n_s_barrier;
4821 static PyObject *__pyx_n_s_barycenter;
4822 static PyObject *__pyx_n_s_barycenters;
4823 static PyObject *__pyx_n_s_base;
4824 static PyObject *__pyx_n_s_bcast;
4825 static PyObject *__pyx_n_s_bd;
4826 static PyObject *__pyx_n_s_beam_type;
4827 static PyObject *__pyx_n_s_body;
4828 static PyObject *__pyx_n_s_boolval;
4829 static PyObject *__pyx_n_s_buildNodes;
4830 static PyObject *__pyx_n_s_c;
4831 static PyObject *__pyx_n_u_c;
4832 static PyObject *__pyx_n_s_cKDTree;
4833 static PyObject *__pyx_n_s_cable1;
4834 static PyObject *__pyx_n_s_cable2;
4835 static PyObject *__pyx_n_s_cable_nb;
4836 static PyObject *__pyx_n_s_calculate;
4837 static PyObject *__pyx_n_s_calculate_init;
4838 static PyObject *__pyx_kp_s_call_buildNodes_before_calling_t;
4839 static PyObject *__pyx_n_s_chFM;
4840 static PyObject *__pyx_n_s_checkedElements;
4841 static PyObject *__pyx_n_s_chel_connect;
4842 static PyObject *__pyx_n_s_chpos;
4843 static PyObject *__pyx_n_s_chrono;
4844 static PyObject *__pyx_n_s_chrono_2;
4845 static PyObject *__pyx_n_s_chrono_fea;
4846 static PyObject *__pyx_kp_s_chrono_log_body_txt;
4847 static PyObject *__pyx_kp_s_chrono_log_h5;
4848 static PyObject *__pyx_kp_s_chrono_log_spring_txt;
4849 static PyObject *__pyx_n_s_chvec;
4850 static PyObject *__pyx_n_s_chvel;
4851 static PyObject *__pyx_n_s_chvel_ang;
4852 static PyObject *__pyx_n_s_cinit___locals_genexpr;
4853 static PyObject *__pyx_n_s_cinit___locals_lambda;
4854 static PyObject *__pyx_n_s_class;
4855 static PyObject *__pyx_n_s_cline_in_traceback;
4856 static PyObject *__pyx_n_s_close;
4857 static PyObject *__pyx_n_s_coeff1;
4858 static PyObject *__pyx_n_s_coefficients;
4859 static PyObject *__pyx_n_s_collections;
4860 static PyObject *__pyx_n_s_collide;
4861 static PyObject *__pyx_n_s_comm;
4862 static PyObject *__pyx_n_s_compression;
4863 static PyObject *__pyx_kp_s_contiguous_and_direct;
4864 static PyObject *__pyx_kp_s_contiguous_and_indirect;
4865 static PyObject *__pyx_n_s_coords;
4866 static PyObject *__pyx_n_s_coords_outside;
4867 static PyObject *__pyx_n_s_copy;
4868 static PyObject *__pyx_n_s_create_dataset;
4869 static PyObject *__pyx_kp_s_csv;
4870 static PyObject *__pyx_n_s_csv_2;
4871 static PyObject *__pyx_n_s_csvfile;
4872 static PyObject *__pyx_n_s_d;
4873 static PyObject *__pyx_n_s_d_internal_force;
4874 static PyObject *__pyx_n_s_d_rot;
4875 static PyObject *__pyx_n_s_d_rot_last;
4876 static PyObject *__pyx_n_s_d_spring_length;
4877 static PyObject *__pyx_n_s_d_spring_velocity;
4878 static PyObject *__pyx_n_s_d_time;
4879 static PyObject *__pyx_n_s_d_tra;
4880 static PyObject *__pyx_n_s_d_tra_last;
4881 static PyObject *__pyx_n_s_damping;
4882 static PyObject *__pyx_n_s_data;
4883 static PyObject *__pyx_n_s_dataItemFormat;
4884 static PyObject *__pyx_n_s_datav;
4885 static PyObject *__pyx_n_s_debug;
4886 static PyObject *__pyx_n_s_deepcopy;
4887 static PyObject *__pyx_n_s_delimiter;
4888 static PyObject *__pyx_n_s_dens;
4889 static PyObject *__pyx_n_s_density_array;
4890 static PyObject *__pyx_n_s_dict;
4891 static PyObject *__pyx_n_s_dire;
4892 static PyObject *__pyx_n_s_disown;
4893 static PyObject *__pyx_n_s_dist;
4894 static PyObject *__pyx_n_s_dist_search;
4895 static PyObject *__pyx_n_s_distance;
4896 static PyObject *__pyx_n_s_dm_force;
4897 static PyObject *__pyx_n_s_dm_position;
4898 static PyObject *__pyx_n_s_dm_residuals;
4899 static PyObject *__pyx_n_s_dm_residuals_h5;
4900 static PyObject *__pyx_n_s_dm_rotation;
4901 static PyObject *__pyx_n_s_dm_springs;
4902 static PyObject *__pyx_n_s_dm_time;
4903 static PyObject *__pyx_n_s_dm_torque;
4904 static PyObject *__pyx_n_s_domain;
4905 static PyObject *__pyx_n_s_dot;
4906 static PyObject *__pyx_n_s_drag;
4907 static PyObject *__pyx_n_s_drag_t;
4908 static PyObject *__pyx_n_s_dragx;
4909 static PyObject *__pyx_n_s_dragx_t;
4910 static PyObject *__pyx_n_s_dragy;
4911 static PyObject *__pyx_n_s_dragy_t;
4912 static PyObject *__pyx_n_s_dragz;
4913 static PyObject *__pyx_n_s_dragz_t;
4914 static PyObject *__pyx_n_s_ds;
4915 static PyObject *__pyx_n_s_dset;
4916 static PyObject *__pyx_n_s_dt;
4917 static PyObject *__pyx_n_s_dt_init;
4918 static PyObject *__pyx_n_s_dt_last;
4919 static PyObject *__pyx_n_s_dt_next;
4920 static PyObject *__pyx_n_s_dt_substep;
4921 static PyObject *__pyx_n_s_dtype;
4922 static PyObject *__pyx_n_s_dtype_is_object;
4923 static PyObject *__pyx_n_s_e0;
4924 static PyObject *__pyx_n_s_e0_last;
4925 static PyObject *__pyx_n_s_e1;
4926 static PyObject *__pyx_n_s_e1_last;
4927 static PyObject *__pyx_n_s_e2;
4928 static PyObject *__pyx_n_s_e2_last;
4929 static PyObject *__pyx_n_s_e3;
4930 static PyObject *__pyx_n_s_e3_last;
4931 static PyObject *__pyx_n_s_eN;
4932 static PyObject *__pyx_n_s_eN_guess;
4933 static PyObject *__pyx_n_s_eOffset;
4934 static PyObject *__pyx_n_s_el;
4935 static PyObject *__pyx_n_s_el_connect;
4936 static PyObject *__pyx_n_s_elem;
4937 static PyObject *__pyx_n_s_elemN;
4938 static PyObject *__pyx_n_s_element;
4939 static PyObject *__pyx_n_s_elementMaps;
4940 static PyObject *__pyx_n_s_elementNodesArray;
4941 static PyObject *__pyx_n_s_element_connection;
4942 static PyObject *__pyx_n_s_elements;
4943 static PyObject *__pyx_n_s_elementsSpatial_Domain;
4944 static PyObject *__pyx_n_s_elements_t;
4945 static PyObject *__pyx_n_s_empty;
4946 static PyObject *__pyx_n_s_encode;
4947 static PyObject *__pyx_n_s_end;
4948 static PyObject *__pyx_n_s_enter;
4949 static PyObject *__pyx_n_s_enumerate;
4950 static PyObject *__pyx_n_s_envelope;
4951 static PyObject *__pyx_n_s_error;
4952 static PyObject *__pyx_n_s_eta;
4953 static PyObject *__pyx_n_s_etas;
4954 static PyObject *__pyx_n_s_exit;
4955 static PyObject *__pyx_n_s_exit_2;
4956 static PyObject *__pyx_n_s_f;
4957 static PyObject *__pyx_n_s_f_i;
4958 static PyObject *__pyx_n_s_facet;
4959 static PyObject *__pyx_n_s_facets;
4960 static PyObject *__pyx_n_s_fairlead;
4961 static PyObject *__pyx_n_s_fea;
4962 static PyObject *__pyx_n_s_femSpace;
4963 static PyObject *__pyx_n_s_file;
4964 static PyObject *__pyx_n_s_file_name;
4965 static PyObject *__pyx_n_s_findElementContainingCoordsDist;
4966 static PyObject *__pyx_n_s_findElementContainingCoordsKD;
4967 static PyObject *__pyx_kp_s_finished_recording_h5_file_of;
4968 static PyObject *__pyx_kp_s_finished_recording_values_file_o;
4969 static PyObject *__pyx_kp_s_finished_recording_xmf_file_of;
4970 static PyObject *__pyx_kp_s_finished_recording_xml_file_of;
4971 static PyObject *__pyx_n_s_fixBackNode;
4972 static PyObject *__pyx_n_s_fixFrontNode;
4973 static PyObject *__pyx_n_s_fixed;
4974 static PyObject *__pyx_n_s_flag;
4975 static PyObject *__pyx_n_s_flags;
4976 static PyObject *__pyx_n_s_fluid_acceleration;
4977 static PyObject *__pyx_n_s_fluid_acceleration_array;
4978 static PyObject *__pyx_n_s_fluid_acceleration_t;
4979 static PyObject *__pyx_n_s_fluid_ax;
4980 static PyObject *__pyx_n_s_fluid_ax_t;
4981 static PyObject *__pyx_n_s_fluid_ay;
4982 static PyObject *__pyx_n_s_fluid_ay_t;
4983 static PyObject *__pyx_n_s_fluid_az;
4984 static PyObject *__pyx_n_s_fluid_az_t;
4985 static PyObject *__pyx_n_s_fluid_density;
4986 static PyObject *__pyx_n_s_fluid_density_array;
4987 static PyObject *__pyx_n_s_fluid_ux;
4988 static PyObject *__pyx_n_s_fluid_ux_t;
4989 static PyObject *__pyx_n_s_fluid_uy;
4990 static PyObject *__pyx_n_s_fluid_uy_t;
4991 static PyObject *__pyx_n_s_fluid_uz;
4992 static PyObject *__pyx_n_s_fluid_uz_t;
4993 static PyObject *__pyx_n_s_fluid_velocity;
4994 static PyObject *__pyx_n_s_fluid_velocity_array;
4995 static PyObject *__pyx_n_s_fluid_velocity_t;
4996 static PyObject *__pyx_n_s_force;
4997 static PyObject *__pyx_n_s_forces;
4998 static PyObject *__pyx_n_s_format;
4999 static PyObject *__pyx_n_s_fortran;
5000 static PyObject *__pyx_n_u_fortran;
5001 static PyObject *__pyx_n_s_free_r;
5002 static PyObject *__pyx_n_s_free_x;
5003 static PyObject *__pyx_n_s_function;
5004 static PyObject *__pyx_n_s_function_position;
5005 static PyObject *__pyx_n_s_function_tangent;
5006 static PyObject *__pyx_n_s_g;
5007 static PyObject *__pyx_n_s_genexpr;
5008 static PyObject *__pyx_n_s_geometry;
5009 static PyObject *__pyx_n_s_get;
5010 static PyObject *__pyx_n_s_getAddedMassForces;
5011 static PyObject *__pyx_n_s_getChronoObject;
5012 static PyObject *__pyx_n_s_getDragForces;
5013 static PyObject *__pyx_n_s_getDynamicSDF;
5014 static PyObject *__pyx_n_s_getFluidVelocityGradientLocalCoo;
5015 static PyObject *__pyx_n_s_getFluidVelocityLocalCoords;
5016 static PyObject *__pyx_n_s_getGradientValue;
5017 static PyObject *__pyx_n_s_getGravitationalAcceleration;
5018 static PyObject *__pyx_n_s_getInertia;
5019 static PyObject *__pyx_n_s_getInverseValue;
5020 static PyObject *__pyx_n_s_getLocalElement;
5021 static PyObject *__pyx_n_s_getLocalNearestNode;
5022 static PyObject *__pyx_n_s_getMass;
5023 static PyObject *__pyx_n_s_getMoments;
5024 static PyObject *__pyx_n_s_getNodesAcceleration;
5025 static PyObject *__pyx_n_s_getNodesD;
5026 static PyObject *__pyx_n_s_getNodesPosition;
5027 static PyObject *__pyx_n_s_getNodesTension;
5028 static PyObject *__pyx_n_s_getNodesVelocity;
5029 static PyObject *__pyx_n_s_getPosition;
5030 static PyObject *__pyx_n_s_getPressureForces;
5031 static PyObject *__pyx_n_s_getRotationMatrix;
5032 static PyObject *__pyx_n_s_getShearForces;
5033 static PyObject *__pyx_n_s_getTensionBack;
5034 static PyObject *__pyx_n_s_getTensionElement;
5035 static PyObject *__pyx_n_s_getTensionFront;
5036 static PyObject *__pyx_n_s_getTriangleMeshInfo;
5037 static PyObject *__pyx_n_s_getValue;
5038 static PyObject *__pyx_n_s_getValues;
5039 static PyObject *__pyx_n_s_getVelocity;
5040 static PyObject *__pyx_n_s_getitem;
5041 static PyObject *__pyx_n_s_getroot;
5042 static PyObject *__pyx_n_s_getstate;
5043 static PyObject *__pyx_n_s_globalMesh;
5044 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
5045 static PyObject *__pyx_n_s_gzip;
5046 static PyObject *__pyx_n_s_h;
5047 static PyObject *__pyx_kp_b_h5;
5048 static PyObject *__pyx_n_b_h5_2;
5049 static PyObject *__pyx_kp_s_h5_elementsSpatial_Domain;
5050 static PyObject *__pyx_kp_s_h5_nodesSpatial_Domain;
5051 static PyObject *__pyx_n_s_h5py;
5052 static PyObject *__pyx_kp_s_h_ang_predict;
5053 static PyObject *__pyx_kp_s_h_ang_predict_last;
5054 static PyObject *__pyx_kp_s_h_ang_vel_predict;
5055 static PyObject *__pyx_kp_s_h_ang_vel_predict_last;
5056 static PyObject *__pyx_n_s_h_body;
5057 static PyObject *__pyx_n_s_h_body_vec;
5058 static PyObject *__pyx_kp_s_h_predict;
5059 static PyObject *__pyx_n_s_h_predict_2;
5060 static PyObject *__pyx_kp_s_h_predict_last;
5061 static PyObject *__pyx_n_s_hdfFileName;
5062 static PyObject *__pyx_n_s_header_x;
5063 static PyObject *__pyx_n_s_headers;
5064 static PyObject *__pyx_kp_s_http_www_w3_org_2001_XInclude;
5065 static PyObject *__pyx_n_s_hx;
5066 static PyObject *__pyx_n_s_hx_rotation;
5067 static PyObject *__pyx_n_s_hx_translation;
5068 static PyObject *__pyx_n_s_hxyz;
5069 static PyObject *__pyx_n_s_hy;
5070 static PyObject *__pyx_n_s_hy_rotation;
5071 static PyObject *__pyx_n_s_hy_translation;
5072 static PyObject *__pyx_n_s_hz;
5073 static PyObject *__pyx_n_s_hz_rotation;
5074 static PyObject *__pyx_n_s_hz_translation;
5075 static PyObject *__pyx_n_s_i;
5076 static PyObject *__pyx_n_s_i8;
5077 static PyObject *__pyx_n_s_i_entry_body;
5078 static PyObject *__pyx_n_s_i_entry_linkage;
5079 static PyObject *__pyx_n_s_i_entry_residual;
5080 static PyObject *__pyx_n_s_i_entry_spring;
5081 static PyObject *__pyx_kp_s_i_i;
5082 static PyObject *__pyx_n_s_i_index;
5083 static PyObject *__pyx_n_s_id;
5084 static PyObject *__pyx_n_s_import;
5085 static PyObject *__pyx_n_s_indentXML;
5086 static PyObject *__pyx_n_s_iner;
5087 static PyObject *__pyx_n_s_inertia;
5088 static PyObject *__pyx_n_s_int32;
5089 static PyObject *__pyx_n_s_intertia;
5090 static PyObject *__pyx_n_s_inv;
5091 static PyObject *__pyx_n_s_inv_FM;
5092 static PyObject *__pyx_n_s_inv_chFM;
5093 static PyObject *__pyx_n_s_is_convex;
5094 static PyObject *__pyx_kp_s_is_not_of_length_3;
5095 static PyObject *__pyx_n_s_is_static;
5096 static PyObject *__pyx_n_s_items;
5097 static PyObject *__pyx_n_s_itemsize;
5098 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
5099 static PyObject *__pyx_n_s_j;
5100 static PyObject *__pyx_n_s_join;
5101 static PyObject *__pyx_n_s_kdtree;
5102 static PyObject *__pyx_n_s_key;
5103 static PyObject *__pyx_n_s_l_force;
5104 static PyObject *__pyx_n_s_l_linklocks;
5105 static PyObject *__pyx_n_s_l_logging_info;
5106 static PyObject *__pyx_n_s_l_position;
5107 static PyObject *__pyx_n_s_l_rotation;
5108 static PyObject *__pyx_n_s_l_spring_data;
5109 static PyObject *__pyx_n_s_l_springs;
5110 static PyObject *__pyx_n_s_l_torque;
5111 static PyObject *__pyx_n_s_latest;
5112 static PyObject *__pyx_n_s_length;
5113 static PyObject *__pyx_n_s_length_array;
5114 static PyObject *__pyx_n_s_levelModelList;
5115 static PyObject *__pyx_n_s_libver;
5116 static PyObject *__pyx_n_s_linalg;
5117 static PyObject *__pyx_n_s_local_element;
5118 static PyObject *__pyx_n_s_logDir;
5119 static PyObject *__pyx_n_s_logEvent;
5120 static PyObject *__pyx_n_s_log_bodies_h5;
5121 static PyObject *__pyx_n_s_log_bodies_text;
5122 static PyObject *__pyx_n_s_log_residuals_h5;
5123 static PyObject *__pyx_n_s_log_residuals_text;
5124 static PyObject *__pyx_n_s_log_springs_h5;
5125 static PyObject *__pyx_n_s_log_springs_text;
5126 static PyObject *__pyx_n_s_log_times_h5;
5127 static PyObject *__pyx_n_s_main;
5128 static PyObject *__pyx_n_s_margin;
5129 static PyObject *__pyx_n_s_mass;
5130 static PyObject *__pyx_n_s_mat;
5131 static PyObject *__pyx_n_s_mat332array;
5132 static PyObject *__pyx_n_s_matp;
5133 static PyObject *__pyx_n_s_maxshape;
5134 static PyObject *__pyx_n_s_mbd_CouplingFSI;
5135 static PyObject *__pyx_n_s_memview;
5136 static PyObject *__pyx_n_s_mesh;
5137 static PyObject *__pyx_n_s_mesh_search;
5138 static PyObject *__pyx_n_s_mg;
5139 static PyObject *__pyx_n_s_mm;
5140 static PyObject *__pyx_n_s_mode;
5141 static PyObject *__pyx_n_s_model;
5142 static PyObject *__pyx_n_s_moments;
5143 static PyObject *__pyx_n_b_mooring;
5144 static PyObject *__pyx_n_s_mpi4py;
5145 static PyObject *__pyx_n_s_my_instance;
5146 static PyObject *__pyx_n_s_mycpp_ptr;
5147 static PyObject *__pyx_n_s_nB;
5148 static PyObject *__pyx_n_s_nElements_global;
5149 static PyObject *__pyx_n_s_nNodes_owned;
5150 static PyObject *__pyx_n_s_nP;
5151 static PyObject *__pyx_n_s_nParticles;
5152 static PyObject *__pyx_n_s_name;
5153 static PyObject *__pyx_n_s_name_2;
5154 static PyObject *__pyx_n_s_nb;
5155 static PyObject *__pyx_n_s_nb_elems;
5156 static PyObject *__pyx_n_s_nb_nodes;
5157 static PyObject *__pyx_n_s_nb_steps;
5158 static PyObject *__pyx_n_s_nd;
5159 static PyObject *__pyx_n_s_ndim;
5160 static PyObject *__pyx_n_s_nearest_node;
5161 static PyObject *__pyx_n_s_nearest_node_distance;
5162 static PyObject *__pyx_n_s_netForces_p;
5163 static PyObject *__pyx_n_s_netForces_v;
5164 static PyObject *__pyx_n_s_netMoments;
5165 static PyObject *__pyx_n_s_new;
5166 static PyObject *__pyx_n_s_new_quat;
5167 static PyObject *__pyx_n_s_new_rank;
5168 static PyObject *__pyx_n_s_new_vec;
5169 static PyObject *__pyx_n_s_new_x;
5170 static PyObject *__pyx_kp_s_no_Shape_was_defined_for_making;
5171 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
5172 static PyObject *__pyx_n_s_node;
5173 static PyObject *__pyx_n_s_node1;
5174 static PyObject *__pyx_n_s_node2;
5175 static PyObject *__pyx_n_s_nodeArray;
5176 static PyObject *__pyx_n_s_nodeElementOffsets;
5177 static PyObject *__pyx_n_s_nodeElementsArray;
5178 static PyObject *__pyx_n_s_nodeN;
5179 static PyObject *__pyx_n_s_nodeNumbering_subdomain2global;
5180 static PyObject *__pyx_n_s_nodeOffsets_subdomain_owned;
5181 static PyObject *__pyx_n_s_nodeStarArray;
5182 static PyObject *__pyx_n_s_nodeStarOffsets;
5183 static PyObject *__pyx_n_s_node_guess;
5184 static PyObject *__pyx_n_s_node_nb_global;
5185 static PyObject *__pyx_n_s_nodes;
5186 static PyObject *__pyx_n_s_nodesSpatial_Domain;
5187 static PyObject *__pyx_n_s_nodes_t;
5188 static PyObject *__pyx_n_s_norm;
5189 static PyObject *__pyx_n_s_normal;
5190 static PyObject *__pyx_kp_s_not_a_valid_choice;
5191 static PyObject *__pyx_n_s_np;
5192 static PyObject *__pyx_kp_s_number_of_RANS_particles_nP_numb;
5193 static PyObject *__pyx_n_s_numpy;
5194 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
5195 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
5196 static PyObject *__pyx_n_s_o_body;
5197 static PyObject *__pyx_n_s_o_body_force;
5198 static PyObject *__pyx_n_s_o_body_position;
5199 static PyObject *__pyx_n_s_o_body_rotation;
5200 static PyObject *__pyx_n_s_o_body_torque;
5201 static PyObject *__pyx_n_s_o_file;
5202 static PyObject *__pyx_n_s_o_linkage_residual;
5203 static PyObject *__pyx_n_s_obj;
5204 static PyObject *__pyx_n_s_onElement;
5205 static PyObject *__pyx_n_s_op;
5206 static PyObject *__pyx_n_s_open;
5207 static PyObject *__pyx_n_s_os;
5208 static PyObject *__pyx_n_s_owning_proc;
5209 static PyObject *__pyx_n_s_owning_rank;
5210 static PyObject *__pyx_n_s_pack;
5211 static PyObject *__pyx_n_s_particle_Aij;
5212 static PyObject *__pyx_n_s_particle_netForces;
5213 static PyObject *__pyx_n_s_particle_netMoments;
5214 static PyObject *__pyx_n_s_particle_sdfList;
5215 static PyObject *__pyx_n_s_particle_velocityList;
5216 static PyObject *__pyx_n_s_patchBoundaryNodes;
5217 static PyObject *__pyx_n_s_path;
5218 static PyObject *__pyx_n_s_pickle;
5219 static PyObject *__pyx_n_s_pivot;
5220 static PyObject *__pyx_n_s_points;
5221 static PyObject *__pyx_n_s_pos;
5222 static PyObject *__pyx_kp_s_pos_body;
5223 static PyObject *__pyx_n_s_pos_last;
5224 static PyObject *__pyx_n_s_position;
5225 static PyObject *__pyx_n_s_positions;
5226 static PyObject *__pyx_n_s_poss;
5227 static PyObject *__pyx_n_s_poststep;
5228 static PyObject *__pyx_n_s_posx;
5229 static PyObject *__pyx_n_s_posx_last;
5230 static PyObject *__pyx_n_s_posy;
5231 static PyObject *__pyx_n_s_posy_last;
5232 static PyObject *__pyx_n_s_posz;
5233 static PyObject *__pyx_n_s_posz_last;
5234 static PyObject *__pyx_n_s_prediction;
5235 static PyObject *__pyx_n_s_prestep;
5236 static PyObject *__pyx_n_s_print;
5237 static PyObject *__pyx_n_s_pris1;
5238 static PyObject *__pyx_n_s_pris2;
5239 static PyObject *__pyx_n_s_proteus;
5240 static PyObject *__pyx_n_s_proteus_Archiver;
5241 static PyObject *__pyx_n_s_proteus_dt;
5242 static PyObject *__pyx_kp_s_proteus_mbd_CouplingFSI_pyx;
5243 static PyObject *__pyx_n_s_proteus_mprans;
5244 static PyObject *__pyx_n_s_pt_to_shp;
5245 static PyObject *__pyx_n_s_pychrono;
5246 static PyObject *__pyx_n_s_pymat332array;
5247 static PyObject *__pyx_n_s_pyquat2array;
5248 static PyObject *__pyx_n_s_pyvec2array;
5249 static PyObject *__pyx_n_s_pyx_PickleError;
5250 static PyObject *__pyx_n_s_pyx_checksum;
5251 static PyObject *__pyx_n_s_pyx_getbuffer;
5252 static PyObject *__pyx_n_s_pyx_result;
5253 static PyObject *__pyx_n_s_pyx_state;
5254 static PyObject *__pyx_n_s_pyx_type;
5255 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
5256 static PyObject *__pyx_n_s_pyx_vtable;
5257 static PyObject *__pyx_n_s_quat;
5258 static PyObject *__pyx_n_s_quat2array;
5259 static PyObject *__pyx_n_s_query;
5260 static PyObject *__pyx_n_s_radiusIBM;
5261 static PyObject *__pyx_n_s_range;
5262 static PyObject *__pyx_n_s_rank;
5263 static PyObject *__pyx_n_s_rank_guess;
5264 static PyObject *__pyx_n_s_rank_owning;
5265 static PyObject *__pyx_n_s_rank_owning_previous;
5266 static PyObject *__pyx_n_s_record;
5267 static PyObject *__pyx_n_s_recordH5;
5268 static PyObject *__pyx_n_s_recordStrainEta;
5269 static PyObject *__pyx_n_s_recordValues;
5270 static PyObject *__pyx_n_s_recordValues_locals_record;
5271 static PyObject *__pyx_n_s_recordXML;
5272 static PyObject *__pyx_n_s_record_file;
5273 static PyObject *__pyx_kp_s_recording_h5_file_of;
5274 static PyObject *__pyx_kp_s_recording_values_file_of;
5275 static PyObject *__pyx_kp_s_recording_xml_file_of;
5276 static PyObject *__pyx_n_s_reduce;
5277 static PyObject *__pyx_n_s_reduce_cython;
5278 static PyObject *__pyx_n_s_reduce_ex;
5279 static PyObject *__pyx_n_s_referenceElement;
5280 static PyObject *__pyx_n_s_relative_x;
5281 static PyObject *__pyx_n_s_residuals;
5282 static PyObject *__pyx_n_s_resize;
5283 static PyObject *__pyx_n_s_rest_length;
5284 static PyObject *__pyx_n_s_rho;
5285 static PyObject *__pyx_n_b_rigidbody;
5286 static PyObject *__pyx_n_s_root;
5287 static PyObject *__pyx_n_s_rot;
5288 static PyObject *__pyx_n_s_rotMarrT_big;
5289 static PyObject *__pyx_n_s_rotMarr_big;
5290 static PyObject *__pyx_n_s_rotation;
5291 static PyObject *__pyx_n_s_rotation3D;
5292 static PyObject *__pyx_n_s_rotch;
5293 static PyObject *__pyx_n_s_rotq;
5294 static PyObject *__pyx_n_s_rotq_e0;
5295 static PyObject *__pyx_n_s_rotq_e1;
5296 static PyObject *__pyx_n_s_rotq_e2;
5297 static PyObject *__pyx_n_s_rotq_e3;
5298 static PyObject *__pyx_n_s_rotq_last;
5299 static PyObject *__pyx_n_s_row;
5300 static PyObject *__pyx_n_s_rx;
5301 static PyObject *__pyx_n_s_ry;
5302 static PyObject *__pyx_n_s_rz;
5303 static PyObject *__pyx_n_s_s;
5304 static PyObject *__pyx_n_s_s_filename;
5305 static PyObject *__pyx_n_s_s_residuals;
5306 static PyObject *__pyx_n_s_sampleRate;
5307 static PyObject *__pyx_n_s_scheme;
5308 static PyObject *__pyx_n_s_scipy;
5309 static PyObject *__pyx_n_s_sdfIBM;
5310 static PyObject *__pyx_n_s_segment_nb;
5311 static PyObject *__pyx_n_s_self;
5312 static PyObject *__pyx_n_s_send;
5313 static PyObject *__pyx_n_s_setAddedMass;
5314 static PyObject *__pyx_n_s_setAddedMassCoefficients;
5315 static PyObject *__pyx_n_s_setApplyAddedMass;
5316 static PyObject *__pyx_n_s_setApplyBuoyancy;
5317 static PyObject *__pyx_n_s_setApplyDrag;
5318 static PyObject *__pyx_n_s_setBoundaryFlags;
5319 static PyObject *__pyx_n_s_setCollisionEnvelopeMargin;
5320 static PyObject *__pyx_n_s_setCollisionOptions;
5321 static PyObject *__pyx_n_s_setConstraints;
5322 static PyObject *__pyx_n_s_setContactMaterial;
5323 static PyObject *__pyx_n_s_setCouplingScheme;
5324 static PyObject *__pyx_n_s_setDragCoefficients;
5325 static PyObject *__pyx_n_s_setExternalForces;
5326 static PyObject *__pyx_n_s_setFluidAccelerationAtNodes;
5327 static PyObject *__pyx_n_s_setFluidDensityAtNodes;
5328 static PyObject *__pyx_n_s_setFluidVelocityAtNodes;
5329 static PyObject *__pyx_n_s_setFluidVelocityFunction;
5330 static PyObject *__pyx_n_s_setGravitationalAcceleration;
5331 static PyObject *__pyx_n_s_setIBM;
5332 static PyObject *__pyx_n_s_setInertiaXX;
5333 static PyObject *__pyx_n_s_setInertiaXY;
5334 static PyObject *__pyx_n_s_setInitialRot;
5335 static PyObject *__pyx_n_s_setIyy;
5336 static PyObject *__pyx_n_s_setMass;
5337 static PyObject *__pyx_n_s_setMinimumSubsteps;
5338 static PyObject *__pyx_n_s_setName;
5339 static PyObject *__pyx_n_s_setNodesPosition;
5340 static PyObject *__pyx_n_s_setNodesPositionFunction;
5341 static PyObject *__pyx_n_s_setPosition;
5342 static PyObject *__pyx_n_s_setPrescribedMotion;
5343 static PyObject *__pyx_n_s_setPrescribedMotionCustom;
5344 static PyObject *__pyx_n_s_setPrescribedMotionPoly;
5345 static PyObject *__pyx_n_s_setPrescribedMotionSine;
5346 static PyObject *__pyx_n_s_setRecordValues;
5347 static PyObject *__pyx_n_s_setRestLengthPerElement;
5348 static PyObject *__pyx_n_s_setSampleRate;
5349 static PyObject *__pyx_n_s_setTimeStep;
5350 static PyObject *__pyx_n_s_setTimestepperType;
5351 static PyObject *__pyx_n_s_setVelocity;
5352 static PyObject *__pyx_n_s_setWidth2D;
5353 static PyObject *__pyx_kp_s_set_element_type;
5354 static PyObject *__pyx_n_s_setitem;
5355 static PyObject *__pyx_n_s_setstate;
5356 static PyObject *__pyx_n_s_setstate_cython;
5357 static PyObject *__pyx_n_s_shape;
5358 static PyObject *__pyx_n_s_size;
5359 static PyObject *__pyx_n_s_spatial;
5360 static PyObject *__pyx_n_s_special_dtype;
5361 static PyObject *__pyx_n_s_sphereswept_thickness;
5362 static PyObject *__pyx_n_s_springs;
5363 static PyObject *__pyx_n_s_sqrt;
5364 static PyObject *__pyx_n_s_st;
5365 static PyObject *__pyx_n_s_start;
5366 static PyObject *__pyx_n_s_startTime;
5367 static PyObject *__pyx_n_s_step;
5368 static PyObject *__pyx_n_s_stepController;
5369 static PyObject *__pyx_n_s_stiffness;
5370 static PyObject *__pyx_n_s_stop;
5371 static PyObject *__pyx_n_s_storeValues;
5372 static PyObject *__pyx_kp_s_strided_and_direct;
5373 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
5374 static PyObject *__pyx_kp_s_strided_and_indirect;
5375 static PyObject *__pyx_kp_s_stringsource;
5376 static PyObject *__pyx_n_s_struct;
5377 static PyObject *__pyx_n_s_subcomponent;
5378 static PyObject *__pyx_kp_s_substeps;
5379 static PyObject *__pyx_n_s_sum;
5380 static PyObject *__pyx_n_s_swig_obj;
5381 static PyObject *__pyx_n_s_sx;
5382 static PyObject *__pyx_n_s_sy;
5383 static PyObject *__pyx_n_s_sys;
5384 static PyObject *__pyx_n_s_system;
5385 static PyObject *__pyx_n_s_sz;
5386 static PyObject *__pyx_n_s_t;
5387 static PyObject *__pyx_n_s_tCount;
5388 static PyObject *__pyx_n_s_t_2;
5389 static PyObject *__pyx_n_s_t_ch;
5390 static PyObject *__pyx_n_s_t_chrono;
5391 static PyObject *__pyx_kp_s_t_csv;
5392 static PyObject *__pyx_n_s_t_last;
5393 static PyObject *__pyx_n_s_t_max;
5394 static PyObject *__pyx_n_s_t_model_last;
5395 static PyObject *__pyx_n_s_t_sim;
5396 static PyObject *__pyx_n_s_t_t;
5397 static PyObject *__pyx_n_s_t_vec;
5398 static PyObject *__pyx_n_s_take_shape_name;
5399 static PyObject *__pyx_n_s_tangential;
5400 static PyObject *__pyx_n_s_tangents;
5401 static PyObject *__pyx_kp_s_tens_csv;
5402 static PyObject *__pyx_n_s_tensions;
5403 static PyObject *__pyx_n_s_test;
5404 static PyObject *__pyx_n_s_text;
5405 static PyObject *__pyx_n_s_this;
5406 static PyObject *__pyx_n_s_throw;
5407 static PyObject *__pyx_n_s_time;
5408 static PyObject *__pyx_n_s_tompi4py;
5409 static PyObject *__pyx_n_s_topology;
5410 static PyObject *__pyx_n_s_torque;
5411 static PyObject *__pyx_n_s_tostring;
5412 static PyObject *__pyx_n_s_tree;
5413 static PyObject *__pyx_n_s_tstype;
5414 static PyObject *__pyx_n_s_tstypes;
5415 static PyObject *__pyx_n_s_tt;
5416 static PyObject *__pyx_kp_s_txt;
5417 static PyObject *__pyx_n_s_u;
5418 static PyObject *__pyx_n_s_u_grad;
5419 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
5420 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
5421 static PyObject *__pyx_n_s_unpack;
5422 static PyObject *__pyx_n_s_update;
5423 static PyObject *__pyx_n_s_updateForces;
5424 static PyObject *__pyx_n_s_updateIBM;
5425 static PyObject *__pyx_n_s_updateIBM_locals_lambda;
5426 static PyObject *__pyx_n_s_updated_global;
5427 static PyObject *__pyx_n_s_useIBM;
5428 static PyObject *__pyx_n_s_use_ball_as_particle;
5429 static PyObject *__pyx_kp_s_utf_8;
5430 static PyObject *__pyx_n_s_ux;
5431 static PyObject *__pyx_n_s_ux_t;
5432 static PyObject *__pyx_n_s_uy;
5433 static PyObject *__pyx_n_s_uy_t;
5434 static PyObject *__pyx_n_s_uz;
5435 static PyObject *__pyx_n_s_uz_t;
5436 static PyObject *__pyx_n_s_v;
5437 static PyObject *__pyx_n_s_v_grad;
5438 static PyObject *__pyx_n_s_val;
5439 static PyObject *__pyx_n_s_values_towrite;
5440 static PyObject *__pyx_n_s_vec;
5441 static PyObject *__pyx_n_s_vec2array;
5442 static PyObject *__pyx_n_s_vel;
5443 static PyObject *__pyx_n_s_vel_arr;
5444 static PyObject *__pyx_n_s_vel_grad_arr;
5445 static PyObject *__pyx_n_s_velocity;
5446 static PyObject *__pyx_n_s_velocity_array;
5447 static PyObject *__pyx_n_s_velocity_t;
5448 static PyObject *__pyx_n_s_verbose;
5449 static PyObject *__pyx_n_s_vertices;
5450 static PyObject *__pyx_n_s_vlen;
5451 static PyObject *__pyx_n_s_w;
5452 static PyObject *__pyx_n_s_w_grad;
5453 static PyObject *__pyx_kp_s_was_already_attached;
5454 static PyObject *__pyx_n_s_wb;
5455 static PyObject *__pyx_n_s_width;
5456 static PyObject *__pyx_kp_s_with_dt;
5457 static PyObject *__pyx_n_s_write;
5458 static PyObject *__pyx_n_s_writer;
5459 static PyObject *__pyx_n_s_writerow;
5460 static PyObject *__pyx_n_s_x;
5461 static PyObject *__pyx_n_s_x0;
5462 static PyObject *__pyx_n_s_x1;
5463 static PyObject *__pyx_n_s_x2;
5464 static PyObject *__pyx_kp_s_x_2;
5465 static PyObject *__pyx_kp_s_x_and_t_should_have_the_same_len;
5466 static PyObject *__pyx_kp_s_x_body;
5467 static PyObject *__pyx_kp_s_x_new_rot;
5468 static PyObject *__pyx_kp_s_x_new_trarot;
5469 static PyObject *__pyx_kp_s_x_old;
5470 static PyObject *__pyx_n_s_x_vec;
5471 static PyObject *__pyx_n_s_xi;
5472 static PyObject *__pyx_kp_b_xmf;
5473 static PyObject *__pyx_kp_s_xmf;
5474 static PyObject *__pyx_n_s_xmlFile;
5475 static PyObject *__pyx_n_s_xmlHeader;
5476 static PyObject *__pyx_n_s_xml_etree_ElementTree;
5477 static PyObject *__pyx_kp_s_xml_version_1_0_DOCTYPE_Xdmf_SY;
5478 static PyObject *__pyx_kp_s_xmlns_xi;
5479 static PyObject *__pyx_n_s_xx;
5480 static PyObject *__pyx_n_s_y;
5481 static PyObject *__pyx_n_s_y0;
5482 static PyObject *__pyx_n_s_y1;
5483 static PyObject *__pyx_n_s_y2;
5484 static PyObject *__pyx_kp_s_y_and_t_should_have_the_same_len;
5485 static PyObject *__pyx_n_s_y_vec;
5486 static PyObject *__pyx_n_s_yy;
5487 static PyObject *__pyx_n_s_z;
5488 static PyObject *__pyx_n_s_z0;
5489 static PyObject *__pyx_n_s_z1;
5490 static PyObject *__pyx_n_s_z2;
5491 static PyObject *__pyx_kp_s_z_and_t_should_have_the_same_len;
5492 static PyObject *__pyx_n_s_z_vec;
5493 static PyObject *__pyx_n_s_zeros;
5494 static PyObject *__pyx_n_s_zeros_like;
5495 static PyObject *__pyx_n_s_zz;
5496 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system); /* proto */
5497 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2getChronoObject(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5498 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4attachShape(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_take_shape_name); /* proto */
5499 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6addTriangleMeshFromShape(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_shape, __Pyx_memviewslice __pyx_v_pos, __Pyx_memviewslice __pyx_v_rot, bool __pyx_v_is_static, bool __pyx_v_is_convex, double __pyx_v_sphereswept_thickness); /* proto */
5500 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8getTriangleMeshInfo(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5501 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10setCollisionOptions(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_envelope, double __pyx_v_margin, bool __pyx_v_collide); /* proto */
5502 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12setBoundaryFlags(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_flags); /* proto */
5503 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14setIBM(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_useIBM, PyObject *__pyx_v_radiusIBM, PyObject *__pyx_v_sdfIBM); /* proto */
5504 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16setWidth2D(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_width); /* proto */
5505 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18attachAuxiliaryVariables(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_avDict); /* proto */
5506 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_20setInitialRot(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_rot); /* proto */
5507 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22hxyz(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t, PyObject *__pyx_v_debug); /* proto */
5508 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_24hx(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t); /* proto */
5509 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26hy(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t); /* proto */
5510 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_28hz(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t); /* proto */
5511 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_30hx_translation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_x, CYTHON_UNUSED double __pyx_v_t); /* proto */
5512 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_32hy_translation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_x, CYTHON_UNUSED double __pyx_v_t); /* proto */
5513 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_34hz_translation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_x, CYTHON_UNUSED double __pyx_v_t); /* proto */
5514 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_36hx_rotation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t); /* proto */
5515 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_38hy_rotation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t); /* proto */
5516 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_40hz_rotation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t); /* proto */
5517 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_42addSpring(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_stiffness, double __pyx_v_damping, PyArrayObject *__pyx_v_fairlead, PyArrayObject *__pyx_v_anchor, double __pyx_v_rest_length); /* proto */
5518 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_44setConstraints(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_free_x, PyArrayObject *__pyx_v_free_r); /* proto */
5519 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_46setAddedMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_Aij); /* proto */
5520 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_48getPressureForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5521 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_50getShearForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5522 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_52getMoments(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5523 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_54getRotationMatrix(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5524 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_56prestep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5525 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_58setExternalForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_forces, PyArrayObject *__pyx_v_moments); /* proto */
5526 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_60poststep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5527 static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t); /* proto */
5528 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_62updateIBM(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5529 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_64getDynamicSDF(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_t, PyObject *__pyx_v_x); /* proto */
5530 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_66setPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_pos); /* proto */
5531 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_68getPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5532 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_70setMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_mass); /* proto */
5533 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_72getMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5534 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_74setInertiaXX(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_inertia); /* proto */
5535 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_76setInertiaXY(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_inertia); /* proto */
5536 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_78getInertia(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5537 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_80getVelocity(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5538 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_82setVelocity(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_vel); /* proto */
5539 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_84prediction(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5540 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_86calculate_init(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5541 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_88calculate(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5542 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_90setPrescribedMotionCustom(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, __Pyx_memviewslice __pyx_v_t, __Pyx_memviewslice __pyx_v_x, __Pyx_memviewslice __pyx_v_y, __Pyx_memviewslice __pyx_v_z, __Pyx_memviewslice __pyx_v_ang, __Pyx_memviewslice __pyx_v_ang2, __Pyx_memviewslice __pyx_v_ang3, double __pyx_v_t_max); /* proto */
5543 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_92setPrescribedMotionSine(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_a, double __pyx_v_f); /* proto */
5544 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_94setPrescribedMotionPoly(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_coeff1); /* proto */
5545 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_96setPrescribedMotion(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_function); /* proto */
5546 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_98storeValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5547 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_100getValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5548 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_102setRecordValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_all_values, PyObject *__pyx_v_pos, PyObject *__pyx_v_rot, CYTHON_UNUSED PyObject *__pyx_v_ang_disp, PyObject *__pyx_v_F, PyObject *__pyx_v_M, PyObject *__pyx_v_inertia, PyObject *__pyx_v_vel, PyObject *__pyx_v_acc, PyObject *__pyx_v_ang_vel, PyObject *__pyx_v_ang_acc, PyObject *__pyx_v_h_predict); /* proto */
5549 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_104_recordValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5550 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_106_recordH5(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5551 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_108_recordXML(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5552 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_110addPrismaticLinksWithSpring(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_pris1, PyArrayObject *__pyx_v_pris2, double __pyx_v_stiffness, double __pyx_v_damping, double __pyx_v_rest_length); /* proto */
5553 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_112addPrismaticLinkX(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, __Pyx_memviewslice __pyx_v_pris1); /* proto */
5554 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_114setName(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, std::string __pyx_v_name); /* proto */
5555 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5556 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5557 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5558 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5559 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5560 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5561 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5562 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5563 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5564 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5565 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5566 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5567 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2nd___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5568 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2nd_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5569 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2dt___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5570 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2dt_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5571 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8width_2D___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5572 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8width_2D_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5573 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5574 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5575 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5576 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5577 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5578 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5579 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5580 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5581 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5582 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5583 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5584 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5585 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5586 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5587 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5588 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5589 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5590 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5591 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5592 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5593 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5594 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5595 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5596 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5597 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5598 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5599 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5600 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5601 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5602 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5603 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5604 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5605 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5606 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5607 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5608 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5609 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5610 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5611 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5612 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5613 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5614 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5615 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5616 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5617 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5618 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5619 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5620 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5621 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5622 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5623 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5624 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5625 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5626 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5627 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5628 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5629 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5630 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5631 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5632 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5633 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5634 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5635 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5636 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5637 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5638 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5639 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5640 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5641 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5642 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5643 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5644 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5645 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5646 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5647 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5648 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5649 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5650 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5651 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5652 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5653 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5654 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5655 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5656 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5657 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5658 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5659 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5660 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5661 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5662 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5663 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5664 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5665 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5666 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5667 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5668 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5669 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5670 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5671 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5672 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5673 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5674 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5675 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5676 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5677 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5678 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5679 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5680 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5681 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5682 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5683 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5684 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5685 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5686 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5687 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5688 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4name___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5689 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4name_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5690 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9predicted___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5691 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9predicted_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5692 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10dt_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5693 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5694 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5695 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5696 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5697 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5698 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5699 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5700 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5701 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5702 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5703 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5704 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5705 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5706 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5707 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5708 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5709 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5710 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5711 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5712 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5713 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5714 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5715 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5716 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5717 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5718 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5719 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6useIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5720 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6useIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5721 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5722 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5723 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5724 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5725 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5726 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5727 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5728 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5729 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5730 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5731 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5732 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5733 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_116__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self); /* proto */
5734 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_118__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5735 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, int __pyx_v_nd, PyObject *__pyx_v_dt_init, PyObject *__pyx_v_sampleRate); /* proto */
5736 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_2getChronoObject(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5737 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_4setTimeStep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, double __pyx_v_dt); /* proto */
5738 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6setSampleRate(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_sampleRate); /* proto */
5739 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8addProtChBody(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_body); /* proto */
5740 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10addProtChMesh(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_mesh); /* proto */
5741 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12setGravitationalAcceleration(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_g); /* proto */
5742 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_14getGravitationalAcceleration(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5743 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_16setCouplingScheme(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, std::string __pyx_v_scheme, std::string __pyx_v_prediction); /* proto */
5744 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18attachModel(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_model, CYTHON_UNUSED PyObject *__pyx_v_ar); /* proto */
5745 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20attachAuxiliaryVariables(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_avDict); /* proto */
5746 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_22setMinimumSubsteps(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, int __pyx_v_nb); /* proto */
5747 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_24step(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_dt); /* proto */
5748 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_26calculate(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_proteus_dt); /* proto */
5749 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_28calculate_init(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5750 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_30setTimestepperType(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, std::string __pyx_v_tstype, bool __pyx_v_verbose); /* proto */
5751 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_32addSubcomponent(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_subcomponent); /* proto */
5752 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_34findElementContainingCoordsKD(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_coords); /* proto */
5753 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_36findElementContainingCoordsDist(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_coords, PyObject *__pyx_v_node_guess, PyObject *__pyx_v_eN_guess, PyObject *__pyx_v_rank_guess); /* proto */
5754 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_38getFluidVelocityLocalCoords(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_xi, PyObject *__pyx_v_element, PyObject *__pyx_v_rank); /* proto */
5755 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_40getFluidVelocityGradientLocalCoords(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_xi, PyObject *__pyx_v_element, PyObject *__pyx_v_rank); /* proto */
5756 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_42setCollisionEnvelopeMargin(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, double __pyx_v_envelope, double __pyx_v_margin); /* proto */
5757 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_44log_bodies_text(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time, PyObject *__pyx_v_l_logging_info); /* proto */
5758 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_46log_bodies_h5(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_l_logging_info); /* proto */
5759 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_48log_springs_text(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time, PyObject *__pyx_v_l_springs); /* proto */
5760 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_50log_springs_h5(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_l_springs); /* proto */
5761 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_52log_residuals_text(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time, PyObject *__pyx_v_l_linklocks); /* proto */
5762 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_54log_residuals_h5(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_l_linklocks); /* proto */
5763 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_56log_times_h5(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time); /* proto */
5764 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5765 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5766 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5767 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5768 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5769 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5770 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5771 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5772 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5773 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5774 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5775 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5776 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7dt_init___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5777 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5778 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5779 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5780 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5781 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5782 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5783 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5784 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5785 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5786 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5787 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5788 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5789 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11dist_search___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5790 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5791 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10first_step___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5792 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10first_step_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5793 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6scheme___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5794 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6scheme_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5795 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10prediction___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5796 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10prediction_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5797 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7step_nb___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5798 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5799 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10step_start___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5800 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10step_start_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5801 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5802 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5803 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11next_sample___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5804 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5805 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13record_values___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5806 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13record_values_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5807 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5808 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5809 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5810 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5811 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5812 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5813 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5814 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5815 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5816 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6tCount___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5817 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6tCount_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5818 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11initialized___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5819 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11initialized_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5820 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5821 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5822 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5823 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5824 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5825 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5826 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5827 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5828 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5829 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5830 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5831 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5832 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5833 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5834 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5835 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self); /* proto */
5836 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5837 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system); /* proto */
5838 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_2getChronoObject(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self); /* proto */
5839 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self); /* proto */
5840 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5841 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self); /* proto */
5842 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self); /* proto */
5843 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5844 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self); /* proto */
5845 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self); /* proto */
5846 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5847 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___genexpr(PyObject *__pyx_self); /* proto */
5848 static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s); /* proto */
5849 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_mesh, __Pyx_memviewslice __pyx_v_length, PyArrayObject *__pyx_v_nb_elems, __Pyx_memviewslice __pyx_v_d, __Pyx_memviewslice __pyx_v_rho, __Pyx_memviewslice __pyx_v_E, std::string __pyx_v_beam_type); /* proto */
5850 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2setName(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, std::string __pyx_v_name); /* proto */
5851 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4recordStrainEta(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, __Pyx_memviewslice __pyx_v_etas); /* proto */
5852 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6_recordH5(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5853 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8_recordXML(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5854 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_record(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_record_file, PyObject *__pyx_v_row, PyObject *__pyx_v_mode); /* proto */
5855 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10_recordValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5856 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12getTensionBack(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5857 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14getTensionFront(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5858 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_16calculate_init(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5859 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18prestep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5860 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20poststep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5861 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22setApplyDrag(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_boolval); /* proto */
5862 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24setApplyAddedMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_boolval); /* proto */
5863 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_26setApplyBuoyancy(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_boolval); /* proto */
5864 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_28setNodesPositionFunction(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_function_position, PyObject *__pyx_v_function_tangent); /* proto */
5865 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_30setFluidVelocityFunction(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_function); /* proto */
5866 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_32fixFrontNode(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_fixed); /* proto */
5867 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_34fixBackNode(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_fixed); /* proto */
5868 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_36attachBackNodeToBody(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_body); /* proto */
5869 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_38attachFrontNodeToBody(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_body); /* proto */
5870 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_40getTensionElement(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_eta); /* proto */
5871 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_42getNodesTension(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_eta); /* proto */
5872 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_44setDragCoefficients(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, double __pyx_v_tangential, double __pyx_v_normal, int __pyx_v_segment_nb); /* proto */
5873 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_46setAddedMassCoefficients(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, double __pyx_v_tangential, double __pyx_v_normal, int __pyx_v_segment_nb); /* proto */
5874 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_48setRestLengthPerElement(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, __Pyx_memviewslice __pyx_v_length_array, int __pyx_v_segment_nb); /* proto */
5875 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_50setNodesPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, __Pyx_memviewslice __pyx_v_positions, PyObject *__pyx_v_tangents); /* proto */
5876 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_52buildNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5877 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_54getNodesPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5878 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_56getNodesVelocity(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5879 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_58getNodesAcceleration(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5880 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_60getDragForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5881 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_62getAddedMassForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5882 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_64setIyy(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, double __pyx_v_Iyy, int __pyx_v_cable_nb); /* proto */
5883 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_66getNodesD(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5884 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_68setContactMaterial(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_mat); /* proto */
5885 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_70setExternalForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_fluid_velocity_array, PyObject *__pyx_v_fluid_density_array, PyObject *__pyx_v_fluid_acceleration_array); /* proto */
5886 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_72updateForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5887 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_74setFluidDensityAtNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyArrayObject *__pyx_v_density_array); /* proto */
5888 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_76setFluidVelocityAtNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyArrayObject *__pyx_v_velocity_array); /* proto */
5889 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_78setFluidAccelerationAtNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyArrayObject *__pyx_v_acceleration_array); /* proto */
5890 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5891 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5892 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5893 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5894 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5895 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5896 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5897 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5898 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5899 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5900 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5901 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5902 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2nd___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5903 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2nd_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5904 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5905 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5906 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5907 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5908 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5909 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5910 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5911 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5912 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5913 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5914 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5915 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5916 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5917 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5918 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5919 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10front_body___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5920 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5921 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9back_body___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5922 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5923 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5924 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5925 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5926 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5927 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5928 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5929 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5930 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5931 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5932 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5933 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5934 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5935 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5936 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5937 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5938 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5939 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5940 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5941 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4name___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5942 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4name_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5943 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5944 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5945 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5946 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5947 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5948 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5949 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5950 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5951 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5952 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5953 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5954 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5955 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5956 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5957 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5958 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11initialized___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5959 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5960 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5961 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5962 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5963 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5964 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5965 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5966 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5967 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5968 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5969 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5970 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6tCount___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5971 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5972 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5973 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5974 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5975 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5976 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5977 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5978 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_80__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self); /* proto */
5979 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_82__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5980 static PyObject *__pyx_pf_3mbd_11CouplingFSI_getLocalNearestNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_coords, PyObject *__pyx_v_kdtree); /* proto */
5981 static PyObject *__pyx_pf_3mbd_11CouplingFSI_2getLocalElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_femSpace, PyObject *__pyx_v_coords, PyObject *__pyx_v_node); /* proto */
5982 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_system); /* proto */
5983 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_2attachModel(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_model, CYTHON_UNUSED PyObject *__pyx_v_ar); /* proto */
5984 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_4attachAuxiliaryVariables(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_avDict); /* proto */
5985 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_6calculate_init(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self); /* proto */
5986 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_8calculate(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self); /* proto */
5987 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self); /* proto */
5988 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5989 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self); /* proto */
5990 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self); /* proto */
5991 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5992 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self); /* proto */
5993 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self); /* proto */
5994 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
5995 static PyObject *__pyx_pf_3mbd_11CouplingFSI_4attachNodeToNode(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable1, int __pyx_v_node1, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable2, int __pyx_v_node2); /* proto */
5996 static int __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self); /* proto */
5997 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG___get__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self); /* proto */
5998 static int __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
5999 static int __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self); /* proto */
6000 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self); /* proto */
6001 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
6002 static PyObject *__pyx_pf_3mbd_11CouplingFSI_6vec2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec); /* proto */
6003 static PyObject *__pyx_pf_3mbd_11CouplingFSI_8pyvec2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec); /* proto */
6004 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10mat332array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mat); /* proto */
6005 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12pymat332array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mat); /* proto */
6006 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14quat2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_quat); /* proto */
6007 static PyObject *__pyx_pf_3mbd_11CouplingFSI_16pyquat2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_quat); /* proto */
6008 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
6009 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
6010 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
6011 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
6012 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
6013 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
6014 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
6015 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
6016 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
6017 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
6018 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
6019 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
6020 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
6021 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
6022 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
6023 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6024 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
6025 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
6026 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
6027 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6028 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6029 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6030 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6031 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6032 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6033 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6034 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6035 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6036 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6037 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6038 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6039 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6040 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6041 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6042 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6043 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
6044 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
6045 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
6046 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
6047 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
6048 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
6049 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
6050 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChBody(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6051 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChSystem(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6052 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChMesh(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6053 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChMoorings(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6054 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChAddedMass(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6055 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ChBodyAddedMass(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6056 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6057 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6058 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6059 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6060 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6061 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6062 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
6063 static PyObject *__pyx_float_0_;
6064 static PyObject *__pyx_float_2_;
6065 static PyObject *__pyx_float_0_000;
6066 static PyObject *__pyx_int_0;
6067 static PyObject *__pyx_int_1;
6068 static PyObject *__pyx_int_2;
6069 static PyObject *__pyx_int_3;
6070 static PyObject *__pyx_int_4;
6071 static PyObject *__pyx_int_5;
6072 static PyObject *__pyx_int_6;
6073 static PyObject *__pyx_int_112105877;
6074 static PyObject *__pyx_int_136983863;
6075 static PyObject *__pyx_int_184977713;
6076 static PyObject *__pyx_int_neg_1;
6077 static __Pyx_memviewslice __pyx_k__6;
6078 static __Pyx_memviewslice __pyx_k__7;
6079 static __Pyx_memviewslice __pyx_k__73;
6080 static __Pyx_memviewslice __pyx_k__74;
6081 static __Pyx_memviewslice __pyx_k__75;
6082 static __Pyx_memviewslice __pyx_k__76;
6083 static __Pyx_memviewslice __pyx_k__77;
6084 static __Pyx_memviewslice __pyx_k__78;
6085 static std::string __pyx_k__106;
6086 static std::string __pyx_k__147;
6087 static __Pyx_memviewslice __pyx_k__178;
6088 static PyObject *__pyx_tuple_;
6089 static PyObject *__pyx_tuple__2;
6090 static PyObject *__pyx_tuple__3;
6091 static PyObject *__pyx_slice__30;
6092 static PyObject *__pyx_slice__31;
6093 static PyObject *__pyx_slice__34;
6094 static PyObject *__pyx_slice__36;
6095 static PyObject *__pyx_slice__38;
6096 static PyObject *__pyx_slice__40;
6097 static PyObject *__pyx_slice__42;
6098 static PyObject *__pyx_slice__44;
6099 static PyObject *__pyx_slice__47;
6100 static PyObject *__pyx_tuple__32;
6101 static PyObject *__pyx_tuple__33;
6102 static PyObject *__pyx_tuple__35;
6103 static PyObject *__pyx_tuple__37;
6104 static PyObject *__pyx_tuple__39;
6105 static PyObject *__pyx_tuple__41;
6106 static PyObject *__pyx_tuple__43;
6107 static PyObject *__pyx_tuple__45;
6108 static PyObject *__pyx_tuple__46;
6109 static PyObject *__pyx_tuple__48;
6110 static PyObject *__pyx_tuple__49;
6111 static PyObject *__pyx_tuple__50;
6112 static PyObject *__pyx_tuple__51;
6113 static PyObject *__pyx_tuple__88;
6114 static PyObject *__pyx_tuple__91;
6115 static PyObject *__pyx_tuple__96;
6116 static PyObject *__pyx_tuple__98;
6117 static PyObject *__pyx_codeobj__4;
6118 static PyObject *__pyx_codeobj__5;
6119 static PyObject *__pyx_codeobj__8;
6120 static PyObject *__pyx_codeobj__9;
6121 static PyObject *__pyx_tuple__116;
6122 static PyObject *__pyx_tuple__127;
6123 static PyObject *__pyx_tuple__129;
6124 static PyObject *__pyx_tuple__133;
6125 static PyObject *__pyx_tuple__136;
6126 static PyObject *__pyx_tuple__137;
6127 static PyObject *__pyx_tuple__139;
6128 static PyObject *__pyx_tuple__141;
6129 static PyObject *__pyx_tuple__144;
6130 static PyObject *__pyx_tuple__146;
6131 static PyObject *__pyx_tuple__151;
6132 static PyObject *__pyx_tuple__152;
6133 static PyObject *__pyx_tuple__153;
6134 static PyObject *__pyx_tuple__156;
6135 static PyObject *__pyx_tuple__158;
6136 static PyObject *__pyx_tuple__195;
6137 static PyObject *__pyx_tuple__197;
6138 static PyObject *__pyx_tuple__205;
6139 static PyObject *__pyx_tuple__207;
6140 static PyObject *__pyx_tuple__210;
6141 static PyObject *__pyx_tuple__212;
6142 static PyObject *__pyx_tuple__219;
6143 static PyObject *__pyx_tuple__220;
6144 static PyObject *__pyx_tuple__221;
6145 static PyObject *__pyx_tuple__222;
6146 static PyObject *__pyx_tuple__223;
6147 static PyObject *__pyx_tuple__224;
6148 static PyObject *__pyx_tuple__225;
6149 static PyObject *__pyx_tuple__226;
6150 static PyObject *__pyx_tuple__227;
6151 static PyObject *__pyx_tuple__228;
6152 static PyObject *__pyx_tuple__229;
6153 static PyObject *__pyx_tuple__230;
6154 static PyObject *__pyx_tuple__231;
6155 static PyObject *__pyx_tuple__232;
6156 static PyObject *__pyx_tuple__233;
6157 static PyObject *__pyx_tuple__234;
6158 static PyObject *__pyx_tuple__235;
6159 static PyObject *__pyx_tuple__236;
6160 static PyObject *__pyx_tuple__237;
6161 static PyObject *__pyx_tuple__239;
6162 static PyObject *__pyx_tuple__241;
6163 static PyObject *__pyx_tuple__242;
6164 static PyObject *__pyx_tuple__243;
6165 static PyObject *__pyx_tuple__244;
6166 static PyObject *__pyx_tuple__245;
6167 static PyObject *__pyx_tuple__246;
6168 static PyObject *__pyx_tuple__247;
6169 static PyObject *__pyx_tuple__248;
6170 static PyObject *__pyx_tuple__249;
6171 static PyObject *__pyx_tuple__250;
6172 static PyObject *__pyx_tuple__251;
6173 static PyObject *__pyx_tuple__252;
6174 static PyObject *__pyx_tuple__253;
6175 static PyObject *__pyx_tuple__254;
6176 static PyObject *__pyx_tuple__255;
6177 static PyObject *__pyx_tuple__256;
6178 static PyObject *__pyx_tuple__257;
6179 static PyObject *__pyx_tuple__258;
6180 static PyObject *__pyx_tuple__259;
6181 static PyObject *__pyx_tuple__260;
6182 static PyObject *__pyx_tuple__261;
6183 static PyObject *__pyx_tuple__262;
6184 static PyObject *__pyx_tuple__263;
6185 static PyObject *__pyx_tuple__264;
6186 static PyObject *__pyx_tuple__265;
6187 static PyObject *__pyx_tuple__266;
6188 static PyObject *__pyx_tuple__267;
6189 static PyObject *__pyx_tuple__268;
6190 static PyObject *__pyx_tuple__269;
6191 static PyObject *__pyx_tuple__270;
6192 static PyObject *__pyx_tuple__271;
6193 static PyObject *__pyx_tuple__272;
6194 static PyObject *__pyx_tuple__273;
6195 static PyObject *__pyx_tuple__274;
6196 static PyObject *__pyx_tuple__275;
6197 static PyObject *__pyx_tuple__276;
6198 static PyObject *__pyx_tuple__277;
6199 static PyObject *__pyx_tuple__278;
6200 static PyObject *__pyx_tuple__279;
6201 static PyObject *__pyx_tuple__280;
6202 static PyObject *__pyx_tuple__281;
6203 static PyObject *__pyx_tuple__282;
6204 static PyObject *__pyx_tuple__283;
6205 static PyObject *__pyx_tuple__284;
6206 static PyObject *__pyx_tuple__285;
6207 static PyObject *__pyx_tuple__286;
6208 static PyObject *__pyx_tuple__287;
6209 static PyObject *__pyx_tuple__288;
6210 static PyObject *__pyx_tuple__289;
6211 static PyObject *__pyx_tuple__290;
6212 static PyObject *__pyx_tuple__291;
6213 static PyObject *__pyx_tuple__292;
6214 static PyObject *__pyx_tuple__293;
6215 static PyObject *__pyx_tuple__294;
6216 static PyObject *__pyx_tuple__295;
6217 static PyObject *__pyx_tuple__296;
6218 static PyObject *__pyx_tuple__297;
6219 static PyObject *__pyx_tuple__298;
6220 static PyObject *__pyx_tuple__299;
6221 static PyObject *__pyx_tuple__300;
6222 static PyObject *__pyx_tuple__301;
6223 static PyObject *__pyx_tuple__302;
6224 static PyObject *__pyx_tuple__303;
6225 static PyObject *__pyx_tuple__304;
6226 static PyObject *__pyx_tuple__305;
6227 static PyObject *__pyx_tuple__306;
6228 static PyObject *__pyx_tuple__307;
6229 static PyObject *__pyx_tuple__308;
6230 static PyObject *__pyx_tuple__309;
6231 static PyObject *__pyx_tuple__310;
6232 static PyObject *__pyx_tuple__311;
6233 static PyObject *__pyx_tuple__312;
6234 static PyObject *__pyx_tuple__313;
6235 static PyObject *__pyx_tuple__314;
6236 static PyObject *__pyx_tuple__315;
6237 static PyObject *__pyx_tuple__317;
6238 static PyObject *__pyx_tuple__318;
6239 static PyObject *__pyx_tuple__319;
6240 static PyObject *__pyx_tuple__320;
6241 static PyObject *__pyx_tuple__321;
6242 static PyObject *__pyx_tuple__322;
6243 static PyObject *__pyx_tuple__323;
6244 static PyObject *__pyx_tuple__324;
6245 static PyObject *__pyx_tuple__325;
6246 static PyObject *__pyx_tuple__326;
6247 static PyObject *__pyx_tuple__327;
6248 static PyObject *__pyx_tuple__328;
6249 static PyObject *__pyx_tuple__329;
6250 static PyObject *__pyx_tuple__330;
6251 static PyObject *__pyx_tuple__331;
6252 static PyObject *__pyx_tuple__332;
6253 static PyObject *__pyx_tuple__333;
6254 static PyObject *__pyx_tuple__334;
6255 static PyObject *__pyx_tuple__335;
6256 static PyObject *__pyx_tuple__336;
6257 static PyObject *__pyx_tuple__337;
6258 static PyObject *__pyx_tuple__338;
6259 static PyObject *__pyx_tuple__339;
6260 static PyObject *__pyx_tuple__340;
6261 static PyObject *__pyx_tuple__341;
6262 static PyObject *__pyx_tuple__342;
6263 static PyObject *__pyx_tuple__343;
6264 static PyObject *__pyx_tuple__344;
6265 static PyObject *__pyx_tuple__345;
6266 static PyObject *__pyx_tuple__346;
6267 static PyObject *__pyx_tuple__347;
6268 static PyObject *__pyx_tuple__348;
6269 static PyObject *__pyx_tuple__349;
6270 static PyObject *__pyx_tuple__350;
6271 static PyObject *__pyx_tuple__351;
6272 static PyObject *__pyx_tuple__352;
6273 static PyObject *__pyx_tuple__353;
6274 static PyObject *__pyx_tuple__354;
6275 static PyObject *__pyx_tuple__355;
6276 static PyObject *__pyx_tuple__356;
6277 static PyObject *__pyx_tuple__357;
6278 static PyObject *__pyx_tuple__358;
6279 static PyObject *__pyx_tuple__359;
6280 static PyObject *__pyx_tuple__360;
6281 static PyObject *__pyx_tuple__361;
6282 static PyObject *__pyx_tuple__362;
6283 static PyObject *__pyx_tuple__363;
6284 static PyObject *__pyx_tuple__364;
6285 static PyObject *__pyx_tuple__365;
6286 static PyObject *__pyx_tuple__366;
6287 static PyObject *__pyx_tuple__367;
6288 static PyObject *__pyx_tuple__368;
6289 static PyObject *__pyx_tuple__369;
6290 static PyObject *__pyx_tuple__370;
6291 static PyObject *__pyx_tuple__371;
6292 static PyObject *__pyx_tuple__372;
6293 static PyObject *__pyx_tuple__373;
6294 static PyObject *__pyx_tuple__374;
6295 static PyObject *__pyx_tuple__375;
6296 static PyObject *__pyx_tuple__376;
6297 static PyObject *__pyx_tuple__377;
6298 static PyObject *__pyx_tuple__378;
6299 static PyObject *__pyx_tuple__379;
6300 static PyObject *__pyx_tuple__380;
6301 static PyObject *__pyx_tuple__381;
6302 static PyObject *__pyx_tuple__382;
6303 static PyObject *__pyx_tuple__383;
6304 static PyObject *__pyx_tuple__384;
6305 static PyObject *__pyx_tuple__385;
6306 static PyObject *__pyx_tuple__386;
6307 static PyObject *__pyx_tuple__387;
6308 static PyObject *__pyx_tuple__388;
6309 static PyObject *__pyx_tuple__389;
6310 static PyObject *__pyx_tuple__390;
6311 static PyObject *__pyx_tuple__391;
6312 static PyObject *__pyx_tuple__392;
6313 static PyObject *__pyx_tuple__393;
6314 static PyObject *__pyx_tuple__394;
6315 static PyObject *__pyx_tuple__395;
6316 static PyObject *__pyx_tuple__396;
6317 static PyObject *__pyx_tuple__397;
6318 static PyObject *__pyx_codeobj__10;
6319 static PyObject *__pyx_codeobj__11;
6320 static PyObject *__pyx_codeobj__12;
6321 static PyObject *__pyx_codeobj__13;
6322 static PyObject *__pyx_codeobj__14;
6323 static PyObject *__pyx_codeobj__15;
6324 static PyObject *__pyx_codeobj__16;
6325 static PyObject *__pyx_codeobj__18;
6326 static PyObject *__pyx_codeobj__19;
6327 static PyObject *__pyx_codeobj__20;
6328 static PyObject *__pyx_codeobj__21;
6329 static PyObject *__pyx_codeobj__22;
6330 static PyObject *__pyx_codeobj__23;
6331 static PyObject *__pyx_codeobj__24;
6332 static PyObject *__pyx_codeobj__25;
6333 static PyObject *__pyx_codeobj__26;
6334 static PyObject *__pyx_codeobj__27;
6335 static PyObject *__pyx_codeobj__28;
6336 static PyObject *__pyx_codeobj__29;
6337 static PyObject *__pyx_codeobj__52;
6338 static PyObject *__pyx_codeobj__53;
6339 static PyObject *__pyx_codeobj__54;
6340 static PyObject *__pyx_codeobj__55;
6341 static PyObject *__pyx_codeobj__56;
6342 static PyObject *__pyx_codeobj__57;
6343 static PyObject *__pyx_codeobj__58;
6344 static PyObject *__pyx_codeobj__59;
6345 static PyObject *__pyx_codeobj__60;
6346 static PyObject *__pyx_codeobj__61;
6347 static PyObject *__pyx_codeobj__62;
6348 static PyObject *__pyx_codeobj__63;
6349 static PyObject *__pyx_codeobj__64;
6350 static PyObject *__pyx_codeobj__65;
6351 static PyObject *__pyx_codeobj__66;
6352 static PyObject *__pyx_codeobj__67;
6353 static PyObject *__pyx_codeobj__68;
6354 static PyObject *__pyx_codeobj__69;
6355 static PyObject *__pyx_codeobj__70;
6356 static PyObject *__pyx_codeobj__71;
6357 static PyObject *__pyx_codeobj__72;
6358 static PyObject *__pyx_codeobj__79;
6359 static PyObject *__pyx_codeobj__80;
6360 static PyObject *__pyx_codeobj__81;
6361 static PyObject *__pyx_codeobj__82;
6362 static PyObject *__pyx_codeobj__83;
6363 static PyObject *__pyx_codeobj__84;
6364 static PyObject *__pyx_codeobj__85;
6365 static PyObject *__pyx_codeobj__86;
6366 static PyObject *__pyx_codeobj__89;
6367 static PyObject *__pyx_codeobj__90;
6368 static PyObject *__pyx_codeobj__92;
6369 static PyObject *__pyx_codeobj__93;
6370 static PyObject *__pyx_codeobj__94;
6371 static PyObject *__pyx_codeobj__95;
6372 static PyObject *__pyx_codeobj__97;
6373 static PyObject *__pyx_codeobj__99;
6374 static PyObject *__pyx_codeobj__100;
6375 static PyObject *__pyx_codeobj__101;
6376 static PyObject *__pyx_codeobj__102;
6377 static PyObject *__pyx_codeobj__103;
6378 static PyObject *__pyx_codeobj__104;
6379 static PyObject *__pyx_codeobj__105;
6380 static PyObject *__pyx_codeobj__107;
6381 static PyObject *__pyx_codeobj__108;
6382 static PyObject *__pyx_codeobj__109;
6383 static PyObject *__pyx_codeobj__110;
6384 static PyObject *__pyx_codeobj__111;
6385 static PyObject *__pyx_codeobj__113;
6386 static PyObject *__pyx_codeobj__114;
6387 static PyObject *__pyx_codeobj__117;
6388 static PyObject *__pyx_codeobj__118;
6389 static PyObject *__pyx_codeobj__119;
6390 static PyObject *__pyx_codeobj__120;
6391 static PyObject *__pyx_codeobj__121;
6392 static PyObject *__pyx_codeobj__122;
6393 static PyObject *__pyx_codeobj__123;
6394 static PyObject *__pyx_codeobj__124;
6395 static PyObject *__pyx_codeobj__128;
6396 static PyObject *__pyx_codeobj__130;
6397 static PyObject *__pyx_codeobj__131;
6398 static PyObject *__pyx_codeobj__132;
6399 static PyObject *__pyx_codeobj__134;
6400 static PyObject *__pyx_codeobj__135;
6401 static PyObject *__pyx_codeobj__138;
6402 static PyObject *__pyx_codeobj__140;
6403 static PyObject *__pyx_codeobj__142;
6404 static PyObject *__pyx_codeobj__143;
6405 static PyObject *__pyx_codeobj__145;
6406 static PyObject *__pyx_codeobj__148;
6407 static PyObject *__pyx_codeobj__149;
6408 static PyObject *__pyx_codeobj__150;
6409 static PyObject *__pyx_codeobj__154;
6410 static PyObject *__pyx_codeobj__155;
6411 static PyObject *__pyx_codeobj__157;
6412 static PyObject *__pyx_codeobj__159;
6413 static PyObject *__pyx_codeobj__160;
6414 static PyObject *__pyx_codeobj__161;
6415 static PyObject *__pyx_codeobj__162;
6416 static PyObject *__pyx_codeobj__163;
6417 static PyObject *__pyx_codeobj__164;
6418 static PyObject *__pyx_codeobj__165;
6419 static PyObject *__pyx_codeobj__166;
6420 static PyObject *__pyx_codeobj__167;
6421 static PyObject *__pyx_codeobj__168;
6422 static PyObject *__pyx_codeobj__169;
6423 static PyObject *__pyx_codeobj__170;
6424 static PyObject *__pyx_codeobj__171;
6425 static PyObject *__pyx_codeobj__172;
6426 static PyObject *__pyx_codeobj__173;
6427 static PyObject *__pyx_codeobj__174;
6428 static PyObject *__pyx_codeobj__175;
6429 static PyObject *__pyx_codeobj__176;
6430 static PyObject *__pyx_codeobj__177;
6431 static PyObject *__pyx_codeobj__179;
6432 static PyObject *__pyx_codeobj__180;
6433 static PyObject *__pyx_codeobj__181;
6434 static PyObject *__pyx_codeobj__182;
6435 static PyObject *__pyx_codeobj__183;
6436 static PyObject *__pyx_codeobj__184;
6437 static PyObject *__pyx_codeobj__185;
6438 static PyObject *__pyx_codeobj__186;
6439 static PyObject *__pyx_codeobj__187;
6440 static PyObject *__pyx_codeobj__188;
6441 static PyObject *__pyx_codeobj__189;
6442 static PyObject *__pyx_codeobj__190;
6443 static PyObject *__pyx_codeobj__191;
6444 static PyObject *__pyx_codeobj__192;
6445 static PyObject *__pyx_codeobj__193;
6446 static PyObject *__pyx_codeobj__194;
6447 static PyObject *__pyx_codeobj__196;
6448 static PyObject *__pyx_codeobj__198;
6449 static PyObject *__pyx_codeobj__199;
6450 static PyObject *__pyx_codeobj__200;
6451 static PyObject *__pyx_codeobj__201;
6452 static PyObject *__pyx_codeobj__202;
6453 static PyObject *__pyx_codeobj__203;
6454 static PyObject *__pyx_codeobj__204;
6455 static PyObject *__pyx_codeobj__206;
6456 static PyObject *__pyx_codeobj__208;
6457 static PyObject *__pyx_codeobj__209;
6458 static PyObject *__pyx_codeobj__211;
6459 static PyObject *__pyx_codeobj__213;
6460 static PyObject *__pyx_codeobj__214;
6461 static PyObject *__pyx_codeobj__215;
6462 static PyObject *__pyx_codeobj__216;
6463 static PyObject *__pyx_codeobj__217;
6464 static PyObject *__pyx_codeobj__218;
6465 static PyObject *__pyx_codeobj__238;
6466 /* Late includes */
6467 
6468 /* "mbd/CouplingFSI.pyx":67
6469  * cdef class ProtChBody:
6470  *
6471  * def __cinit__(self, # <<<<<<<<<<<<<<
6472  * ProtChSystem system=None):
6473  * self.ProtChSystem = system
6474  */
6475 
6476 /* Python wrapper */
6477 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6478 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6479  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system = 0;
6480  int __pyx_lineno = 0;
6481  const char *__pyx_filename = NULL;
6482  int __pyx_clineno = 0;
6483  int __pyx_r;
6484  __Pyx_RefNannyDeclarations
6485  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
6486  {
6487  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_system,0};
6488  PyObject* values[1] = {0};
6489 
6490  /* "mbd/CouplingFSI.pyx":68
6491  *
6492  * def __cinit__(self,
6493  * ProtChSystem system=None): # <<<<<<<<<<<<<<
6494  * self.ProtChSystem = system
6495  * # create new cppRigidBody
6496  */
6497  values[0] = (PyObject *)((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None);
6498  if (unlikely(__pyx_kwds)) {
6499  Py_ssize_t kw_args;
6500  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
6501  switch (pos_args) {
6502  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6503  CYTHON_FALLTHROUGH;
6504  case 0: break;
6505  default: goto __pyx_L5_argtuple_error;
6506  }
6507  kw_args = PyDict_Size(__pyx_kwds);
6508  switch (pos_args) {
6509  case 0:
6510  if (kw_args > 0) {
6511  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_system);
6512  if (value) { values[0] = value; kw_args--; }
6513  }
6514  }
6515  if (unlikely(kw_args > 0)) {
6516  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 67, __pyx_L3_error)
6517  }
6518  } else {
6519  switch (PyTuple_GET_SIZE(__pyx_args)) {
6520  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
6521  CYTHON_FALLTHROUGH;
6522  case 0: break;
6523  default: goto __pyx_L5_argtuple_error;
6524  }
6525  }
6526  __pyx_v_system = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)values[0]);
6527  }
6528  goto __pyx_L4_argument_unpacking_done;
6529  __pyx_L5_argtuple_error:;
6530  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 67, __pyx_L3_error)
6531  __pyx_L3_error:;
6532  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6533  __Pyx_RefNannyFinishContext();
6534  return -1;
6535  __pyx_L4_argument_unpacking_done:;
6536  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_system), __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem, 1, "system", 0))) __PYX_ERR(0, 68, __pyx_L1_error)
6537  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody___cinit__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_system);
6538 
6539  /* "mbd/CouplingFSI.pyx":67
6540  * cdef class ProtChBody:
6541  *
6542  * def __cinit__(self, # <<<<<<<<<<<<<<
6543  * ProtChSystem system=None):
6544  * self.ProtChSystem = system
6545  */
6546 
6547  /* function exit code */
6548  goto __pyx_L0;
6549  __pyx_L1_error:;
6550  __pyx_r = -1;
6551  __pyx_L0:;
6552  __Pyx_RefNannyFinishContext();
6553  return __pyx_r;
6554 }
6555 
6556 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system) {
6557  int __pyx_r;
6558  __Pyx_TraceDeclarations
6559  __Pyx_RefNannyDeclarations
6560  PyObject *__pyx_t_1 = NULL;
6561  std::shared_ptr<ChBody> __pyx_t_2;
6562  int __pyx_t_3;
6563  int __pyx_t_4;
6564  PyObject *__pyx_t_5 = NULL;
6565  PyObject *__pyx_t_6 = NULL;
6566  int __pyx_lineno = 0;
6567  const char *__pyx_filename = NULL;
6568  int __pyx_clineno = 0;
6569  __Pyx_RefNannySetupContext("__cinit__", 0);
6570  __Pyx_TraceCall("__cinit__", __pyx_f[0], 67, 0, __PYX_ERR(0, 67, __pyx_L1_error));
6571 
6572  /* "mbd/CouplingFSI.pyx":69
6573  * def __cinit__(self,
6574  * ProtChSystem system=None):
6575  * self.ProtChSystem = system # <<<<<<<<<<<<<<
6576  * # create new cppRigidBody
6577  * self.thisptr = newRigidBody(system.thisptr)
6578  */
6579  __Pyx_INCREF(((PyObject *)__pyx_v_system));
6580  __Pyx_GIVEREF(((PyObject *)__pyx_v_system));
6581  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
6582  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
6583  __pyx_v_self->ProtChSystem = __pyx_v_system;
6584 
6585  /* "mbd/CouplingFSI.pyx":71
6586  * self.ProtChSystem = system
6587  * # create new cppRigidBody
6588  * self.thisptr = newRigidBody(system.thisptr) # <<<<<<<<<<<<<<
6589  * self.ChBodyAddedMass = ChBodyAddedMass()
6590  * self.ChBody = self.ChBodyAddedMass.ChBodySWIG
6591  */
6592  __pyx_v_self->thisptr = newRigidBody(__pyx_v_system->thisptr);
6593 
6594  /* "mbd/CouplingFSI.pyx":72
6595  * # create new cppRigidBody
6596  * self.thisptr = newRigidBody(system.thisptr)
6597  * self.ChBodyAddedMass = ChBodyAddedMass() # <<<<<<<<<<<<<<
6598  * self.ChBody = self.ChBodyAddedMass.ChBodySWIG
6599  * self.thisptr.body = self.ChBodyAddedMass.sharedptr_chbody # give pointer to cpp class
6600  */
6601  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ChBodyAddedMass)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
6602  __Pyx_GOTREF(__pyx_t_1);
6603  __Pyx_GIVEREF(__pyx_t_1);
6604  __Pyx_GOTREF(__pyx_v_self->ChBodyAddedMass);
6605  __Pyx_DECREF(((PyObject *)__pyx_v_self->ChBodyAddedMass));
6606  __pyx_v_self->ChBodyAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_t_1);
6607  __pyx_t_1 = 0;
6608 
6609  /* "mbd/CouplingFSI.pyx":73
6610  * self.thisptr = newRigidBody(system.thisptr)
6611  * self.ChBodyAddedMass = ChBodyAddedMass()
6612  * self.ChBody = self.ChBodyAddedMass.ChBodySWIG # <<<<<<<<<<<<<<
6613  * self.thisptr.body = self.ChBodyAddedMass.sharedptr_chbody # give pointer to cpp class
6614  * # # add body to system
6615  */
6616  __pyx_t_1 = __pyx_v_self->ChBodyAddedMass->ChBodySWIG;
6617  __Pyx_INCREF(__pyx_t_1);
6618  __Pyx_GIVEREF(__pyx_t_1);
6619  __Pyx_GOTREF(__pyx_v_self->ChBody);
6620  __Pyx_DECREF(__pyx_v_self->ChBody);
6621  __pyx_v_self->ChBody = __pyx_t_1;
6622  __pyx_t_1 = 0;
6623 
6624  /* "mbd/CouplingFSI.pyx":74
6625  * self.ChBodyAddedMass = ChBodyAddedMass()
6626  * self.ChBody = self.ChBodyAddedMass.ChBodySWIG
6627  * self.thisptr.body = self.ChBodyAddedMass.sharedptr_chbody # give pointer to cpp class # <<<<<<<<<<<<<<
6628  * # # add body to system
6629  * if system is not None:
6630  */
6631  __pyx_t_2 = __pyx_v_self->ChBodyAddedMass->sharedptr_chbody;
6632  __pyx_v_self->thisptr->body = __pyx_t_2;
6633 
6634  /* "mbd/CouplingFSI.pyx":76
6635  * self.thisptr.body = self.ChBodyAddedMass.sharedptr_chbody # give pointer to cpp class
6636  * # # add body to system
6637  * if system is not None: # <<<<<<<<<<<<<<
6638  * self.ProtChSystem.addProtChBody(self)
6639  * # initialise values
6640  */
6641  __pyx_t_3 = (((PyObject *)__pyx_v_system) != Py_None);
6642  __pyx_t_4 = (__pyx_t_3 != 0);
6643  if (__pyx_t_4) {
6644 
6645  /* "mbd/CouplingFSI.pyx":77
6646  * # # add body to system
6647  * if system is not None:
6648  * self.ProtChSystem.addProtChBody(self) # <<<<<<<<<<<<<<
6649  * # initialise values
6650  * self.record_dict = OrderedDict()
6651  */
6652  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ProtChSystem), __pyx_n_s_addProtChBody); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error)
6653  __Pyx_GOTREF(__pyx_t_5);
6654  __pyx_t_6 = NULL;
6655  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
6656  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6657  if (likely(__pyx_t_6)) {
6658  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6659  __Pyx_INCREF(__pyx_t_6);
6660  __Pyx_INCREF(function);
6661  __Pyx_DECREF_SET(__pyx_t_5, function);
6662  }
6663  }
6664  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_5, ((PyObject *)__pyx_v_self));
6665  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6666  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
6667  __Pyx_GOTREF(__pyx_t_1);
6668  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6669  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6670 
6671  /* "mbd/CouplingFSI.pyx":76
6672  * self.thisptr.body = self.ChBodyAddedMass.sharedptr_chbody # give pointer to cpp class
6673  * # # add body to system
6674  * if system is not None: # <<<<<<<<<<<<<<
6675  * self.ProtChSystem.addProtChBody(self)
6676  * # initialise values
6677  */
6678  }
6679 
6680  /* "mbd/CouplingFSI.pyx":79
6681  * self.ProtChSystem.addProtChBody(self)
6682  * # initialise values
6683  * self.record_dict = OrderedDict() # <<<<<<<<<<<<<<
6684  * self.F_prot = np.zeros(3) # initialise empty Proteus force
6685  * self.M_prot = np.zeros(3) # initialise empty Proteus moment
6686  */
6687  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 79, __pyx_L1_error)
6688  __Pyx_GOTREF(__pyx_t_5);
6689  __pyx_t_6 = NULL;
6690  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6691  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6692  if (likely(__pyx_t_6)) {
6693  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6694  __Pyx_INCREF(__pyx_t_6);
6695  __Pyx_INCREF(function);
6696  __Pyx_DECREF_SET(__pyx_t_5, function);
6697  }
6698  }
6699  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
6700  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6701  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
6702  __Pyx_GOTREF(__pyx_t_1);
6703  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6704  __Pyx_GIVEREF(__pyx_t_1);
6705  __Pyx_GOTREF(__pyx_v_self->record_dict);
6706  __Pyx_DECREF(__pyx_v_self->record_dict);
6707  __pyx_v_self->record_dict = __pyx_t_1;
6708  __pyx_t_1 = 0;
6709 
6710  /* "mbd/CouplingFSI.pyx":80
6711  * # initialise values
6712  * self.record_dict = OrderedDict()
6713  * self.F_prot = np.zeros(3) # initialise empty Proteus force # <<<<<<<<<<<<<<
6714  * self.M_prot = np.zeros(3) # initialise empty Proteus moment
6715  * self.F_applied = np.zeros(3) # initialise empty Applied force
6716  */
6717  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)
6718  __Pyx_GOTREF(__pyx_t_5);
6719  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
6720  __Pyx_GOTREF(__pyx_t_6);
6721  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6722  __pyx_t_5 = NULL;
6723  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
6724  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
6725  if (likely(__pyx_t_5)) {
6726  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
6727  __Pyx_INCREF(__pyx_t_5);
6728  __Pyx_INCREF(function);
6729  __Pyx_DECREF_SET(__pyx_t_6, function);
6730  }
6731  }
6732  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
6733  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6734  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
6735  __Pyx_GOTREF(__pyx_t_1);
6736  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6737  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 80, __pyx_L1_error)
6738  __Pyx_GIVEREF(__pyx_t_1);
6739  __Pyx_GOTREF(__pyx_v_self->F_prot);
6740  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot));
6741  __pyx_v_self->F_prot = ((PyArrayObject *)__pyx_t_1);
6742  __pyx_t_1 = 0;
6743 
6744  /* "mbd/CouplingFSI.pyx":81
6745  * self.record_dict = OrderedDict()
6746  * self.F_prot = np.zeros(3) # initialise empty Proteus force
6747  * self.M_prot = np.zeros(3) # initialise empty Proteus moment # <<<<<<<<<<<<<<
6748  * self.F_applied = np.zeros(3) # initialise empty Applied force
6749  * self.M_applied = np.zeros(3) # initialise empty Applied moment
6750  */
6751  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 81, __pyx_L1_error)
6752  __Pyx_GOTREF(__pyx_t_6);
6753  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 81, __pyx_L1_error)
6754  __Pyx_GOTREF(__pyx_t_5);
6755  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6756  __pyx_t_6 = NULL;
6757  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6758  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6759  if (likely(__pyx_t_6)) {
6760  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6761  __Pyx_INCREF(__pyx_t_6);
6762  __Pyx_INCREF(function);
6763  __Pyx_DECREF_SET(__pyx_t_5, function);
6764  }
6765  }
6766  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
6767  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6768  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
6769  __Pyx_GOTREF(__pyx_t_1);
6770  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6771  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 81, __pyx_L1_error)
6772  __Pyx_GIVEREF(__pyx_t_1);
6773  __Pyx_GOTREF(__pyx_v_self->M_prot);
6774  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot));
6775  __pyx_v_self->M_prot = ((PyArrayObject *)__pyx_t_1);
6776  __pyx_t_1 = 0;
6777 
6778  /* "mbd/CouplingFSI.pyx":82
6779  * self.F_prot = np.zeros(3) # initialise empty Proteus force
6780  * self.M_prot = np.zeros(3) # initialise empty Proteus moment
6781  * self.F_applied = np.zeros(3) # initialise empty Applied force # <<<<<<<<<<<<<<
6782  * self.M_applied = np.zeros(3) # initialise empty Applied moment
6783  * self.F_Aij = np.zeros(3) # initialise empty added mass force
6784  */
6785  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 82, __pyx_L1_error)
6786  __Pyx_GOTREF(__pyx_t_5);
6787  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L1_error)
6788  __Pyx_GOTREF(__pyx_t_6);
6789  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6790  __pyx_t_5 = NULL;
6791  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
6792  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
6793  if (likely(__pyx_t_5)) {
6794  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
6795  __Pyx_INCREF(__pyx_t_5);
6796  __Pyx_INCREF(function);
6797  __Pyx_DECREF_SET(__pyx_t_6, function);
6798  }
6799  }
6800  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
6801  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6802  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
6803  __Pyx_GOTREF(__pyx_t_1);
6804  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6805  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 82, __pyx_L1_error)
6806  __Pyx_GIVEREF(__pyx_t_1);
6807  __Pyx_GOTREF(__pyx_v_self->F_applied);
6808  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_applied));
6809  __pyx_v_self->F_applied = ((PyArrayObject *)__pyx_t_1);
6810  __pyx_t_1 = 0;
6811 
6812  /* "mbd/CouplingFSI.pyx":83
6813  * self.M_prot = np.zeros(3) # initialise empty Proteus moment
6814  * self.F_applied = np.zeros(3) # initialise empty Applied force
6815  * self.M_applied = np.zeros(3) # initialise empty Applied moment # <<<<<<<<<<<<<<
6816  * self.F_Aij = np.zeros(3) # initialise empty added mass force
6817  * self.M_Aij = np.zeros(3) # initialise empty added mass moment
6818  */
6819  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L1_error)
6820  __Pyx_GOTREF(__pyx_t_6);
6821  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 83, __pyx_L1_error)
6822  __Pyx_GOTREF(__pyx_t_5);
6823  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6824  __pyx_t_6 = NULL;
6825  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6826  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6827  if (likely(__pyx_t_6)) {
6828  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6829  __Pyx_INCREF(__pyx_t_6);
6830  __Pyx_INCREF(function);
6831  __Pyx_DECREF_SET(__pyx_t_5, function);
6832  }
6833  }
6834  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
6835  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6836  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
6837  __Pyx_GOTREF(__pyx_t_1);
6838  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6839  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 83, __pyx_L1_error)
6840  __Pyx_GIVEREF(__pyx_t_1);
6841  __Pyx_GOTREF(__pyx_v_self->M_applied);
6842  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_applied));
6843  __pyx_v_self->M_applied = ((PyArrayObject *)__pyx_t_1);
6844  __pyx_t_1 = 0;
6845 
6846  /* "mbd/CouplingFSI.pyx":84
6847  * self.F_applied = np.zeros(3) # initialise empty Applied force
6848  * self.M_applied = np.zeros(3) # initialise empty Applied moment
6849  * self.F_Aij = np.zeros(3) # initialise empty added mass force # <<<<<<<<<<<<<<
6850  * self.M_Aij = np.zeros(3) # initialise empty added mass moment
6851  * self.prescribed_motion_function = None
6852  */
6853  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 84, __pyx_L1_error)
6854  __Pyx_GOTREF(__pyx_t_5);
6855  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L1_error)
6856  __Pyx_GOTREF(__pyx_t_6);
6857  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6858  __pyx_t_5 = NULL;
6859  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
6860  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
6861  if (likely(__pyx_t_5)) {
6862  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
6863  __Pyx_INCREF(__pyx_t_5);
6864  __Pyx_INCREF(function);
6865  __Pyx_DECREF_SET(__pyx_t_6, function);
6866  }
6867  }
6868  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
6869  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6870  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
6871  __Pyx_GOTREF(__pyx_t_1);
6872  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6873  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 84, __pyx_L1_error)
6874  __Pyx_GIVEREF(__pyx_t_1);
6875  __Pyx_GOTREF(__pyx_v_self->F_Aij);
6876  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_Aij));
6877  __pyx_v_self->F_Aij = ((PyArrayObject *)__pyx_t_1);
6878  __pyx_t_1 = 0;
6879 
6880  /* "mbd/CouplingFSI.pyx":85
6881  * self.M_applied = np.zeros(3) # initialise empty Applied moment
6882  * self.F_Aij = np.zeros(3) # initialise empty added mass force
6883  * self.M_Aij = np.zeros(3) # initialise empty added mass moment # <<<<<<<<<<<<<<
6884  * self.prescribed_motion_function = None
6885  * self.acceleration = np.zeros(3)
6886  */
6887  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 85, __pyx_L1_error)
6888  __Pyx_GOTREF(__pyx_t_6);
6889  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 85, __pyx_L1_error)
6890  __Pyx_GOTREF(__pyx_t_5);
6891  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6892  __pyx_t_6 = NULL;
6893  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6894  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6895  if (likely(__pyx_t_6)) {
6896  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6897  __Pyx_INCREF(__pyx_t_6);
6898  __Pyx_INCREF(function);
6899  __Pyx_DECREF_SET(__pyx_t_5, function);
6900  }
6901  }
6902  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
6903  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6904  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
6905  __Pyx_GOTREF(__pyx_t_1);
6906  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6907  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 85, __pyx_L1_error)
6908  __Pyx_GIVEREF(__pyx_t_1);
6909  __Pyx_GOTREF(__pyx_v_self->M_Aij);
6910  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_Aij));
6911  __pyx_v_self->M_Aij = ((PyArrayObject *)__pyx_t_1);
6912  __pyx_t_1 = 0;
6913 
6914  /* "mbd/CouplingFSI.pyx":86
6915  * self.F_Aij = np.zeros(3) # initialise empty added mass force
6916  * self.M_Aij = np.zeros(3) # initialise empty added mass moment
6917  * self.prescribed_motion_function = None # <<<<<<<<<<<<<<
6918  * self.acceleration = np.zeros(3)
6919  * self.acceleration_last = np.zeros(3)
6920  */
6921  __Pyx_INCREF(Py_None);
6922  __Pyx_GIVEREF(Py_None);
6923  __Pyx_GOTREF(__pyx_v_self->prescribed_motion_function);
6924  __Pyx_DECREF(__pyx_v_self->prescribed_motion_function);
6925  __pyx_v_self->prescribed_motion_function = Py_None;
6926 
6927  /* "mbd/CouplingFSI.pyx":87
6928  * self.M_Aij = np.zeros(3) # initialise empty added mass moment
6929  * self.prescribed_motion_function = None
6930  * self.acceleration = np.zeros(3) # <<<<<<<<<<<<<<
6931  * self.acceleration_last = np.zeros(3)
6932  * self.velocity = np.zeros(3)
6933  */
6934  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 87, __pyx_L1_error)
6935  __Pyx_GOTREF(__pyx_t_5);
6936  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 87, __pyx_L1_error)
6937  __Pyx_GOTREF(__pyx_t_6);
6938  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6939  __pyx_t_5 = NULL;
6940  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
6941  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
6942  if (likely(__pyx_t_5)) {
6943  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
6944  __Pyx_INCREF(__pyx_t_5);
6945  __Pyx_INCREF(function);
6946  __Pyx_DECREF_SET(__pyx_t_6, function);
6947  }
6948  }
6949  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
6950  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
6951  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
6952  __Pyx_GOTREF(__pyx_t_1);
6953  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6954  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 87, __pyx_L1_error)
6955  __Pyx_GIVEREF(__pyx_t_1);
6956  __Pyx_GOTREF(__pyx_v_self->acceleration);
6957  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration));
6958  __pyx_v_self->acceleration = ((PyArrayObject *)__pyx_t_1);
6959  __pyx_t_1 = 0;
6960 
6961  /* "mbd/CouplingFSI.pyx":88
6962  * self.prescribed_motion_function = None
6963  * self.acceleration = np.zeros(3)
6964  * self.acceleration_last = np.zeros(3) # <<<<<<<<<<<<<<
6965  * self.velocity = np.zeros(3)
6966  * self.velocity_last = np.zeros(3)
6967  */
6968  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error)
6969  __Pyx_GOTREF(__pyx_t_6);
6970  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error)
6971  __Pyx_GOTREF(__pyx_t_5);
6972  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
6973  __pyx_t_6 = NULL;
6974  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
6975  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
6976  if (likely(__pyx_t_6)) {
6977  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
6978  __Pyx_INCREF(__pyx_t_6);
6979  __Pyx_INCREF(function);
6980  __Pyx_DECREF_SET(__pyx_t_5, function);
6981  }
6982  }
6983  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
6984  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
6985  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
6986  __Pyx_GOTREF(__pyx_t_1);
6987  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6988  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 88, __pyx_L1_error)
6989  __Pyx_GIVEREF(__pyx_t_1);
6990  __Pyx_GOTREF(__pyx_v_self->acceleration_last);
6991  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration_last));
6992  __pyx_v_self->acceleration_last = ((PyArrayObject *)__pyx_t_1);
6993  __pyx_t_1 = 0;
6994 
6995  /* "mbd/CouplingFSI.pyx":89
6996  * self.acceleration = np.zeros(3)
6997  * self.acceleration_last = np.zeros(3)
6998  * self.velocity = np.zeros(3) # <<<<<<<<<<<<<<
6999  * self.velocity_last = np.zeros(3)
7000  * self.ang_velocity = np.zeros(3)
7001  */
7002  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 89, __pyx_L1_error)
7003  __Pyx_GOTREF(__pyx_t_5);
7004  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 89, __pyx_L1_error)
7005  __Pyx_GOTREF(__pyx_t_6);
7006  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7007  __pyx_t_5 = NULL;
7008  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7009  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
7010  if (likely(__pyx_t_5)) {
7011  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7012  __Pyx_INCREF(__pyx_t_5);
7013  __Pyx_INCREF(function);
7014  __Pyx_DECREF_SET(__pyx_t_6, function);
7015  }
7016  }
7017  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
7018  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7019  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
7020  __Pyx_GOTREF(__pyx_t_1);
7021  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7022  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 89, __pyx_L1_error)
7023  __Pyx_GIVEREF(__pyx_t_1);
7024  __Pyx_GOTREF(__pyx_v_self->velocity);
7025  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity));
7026  __pyx_v_self->velocity = ((PyArrayObject *)__pyx_t_1);
7027  __pyx_t_1 = 0;
7028 
7029  /* "mbd/CouplingFSI.pyx":90
7030  * self.acceleration_last = np.zeros(3)
7031  * self.velocity = np.zeros(3)
7032  * self.velocity_last = np.zeros(3) # <<<<<<<<<<<<<<
7033  * self.ang_velocity = np.zeros(3)
7034  * self.position = np.zeros(3)
7035  */
7036  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 90, __pyx_L1_error)
7037  __Pyx_GOTREF(__pyx_t_6);
7038  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 90, __pyx_L1_error)
7039  __Pyx_GOTREF(__pyx_t_5);
7040  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7041  __pyx_t_6 = NULL;
7042  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7043  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
7044  if (likely(__pyx_t_6)) {
7045  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7046  __Pyx_INCREF(__pyx_t_6);
7047  __Pyx_INCREF(function);
7048  __Pyx_DECREF_SET(__pyx_t_5, function);
7049  }
7050  }
7051  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
7052  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7053  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error)
7054  __Pyx_GOTREF(__pyx_t_1);
7055  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7056  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 90, __pyx_L1_error)
7057  __Pyx_GIVEREF(__pyx_t_1);
7058  __Pyx_GOTREF(__pyx_v_self->velocity_last);
7059  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity_last));
7060  __pyx_v_self->velocity_last = ((PyArrayObject *)__pyx_t_1);
7061  __pyx_t_1 = 0;
7062 
7063  /* "mbd/CouplingFSI.pyx":91
7064  * self.velocity = np.zeros(3)
7065  * self.velocity_last = np.zeros(3)
7066  * self.ang_velocity = np.zeros(3) # <<<<<<<<<<<<<<
7067  * self.position = np.zeros(3)
7068  * self.position_last = np.zeros(3)
7069  */
7070  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error)
7071  __Pyx_GOTREF(__pyx_t_5);
7072  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
7073  __Pyx_GOTREF(__pyx_t_6);
7074  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7075  __pyx_t_5 = NULL;
7076  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7077  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
7078  if (likely(__pyx_t_5)) {
7079  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7080  __Pyx_INCREF(__pyx_t_5);
7081  __Pyx_INCREF(function);
7082  __Pyx_DECREF_SET(__pyx_t_6, function);
7083  }
7084  }
7085  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
7086  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7087  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
7088  __Pyx_GOTREF(__pyx_t_1);
7089  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7090  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 91, __pyx_L1_error)
7091  __Pyx_GIVEREF(__pyx_t_1);
7092  __Pyx_GOTREF(__pyx_v_self->ang_velocity);
7093  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_velocity));
7094  __pyx_v_self->ang_velocity = ((PyArrayObject *)__pyx_t_1);
7095  __pyx_t_1 = 0;
7096 
7097  /* "mbd/CouplingFSI.pyx":92
7098  * self.velocity_last = np.zeros(3)
7099  * self.ang_velocity = np.zeros(3)
7100  * self.position = np.zeros(3) # <<<<<<<<<<<<<<
7101  * self.position_last = np.zeros(3)
7102  * self.ang_vel_norm = 0. # used for mesh disp prediction
7103  */
7104  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
7105  __Pyx_GOTREF(__pyx_t_6);
7106  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 92, __pyx_L1_error)
7107  __Pyx_GOTREF(__pyx_t_5);
7108  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7109  __pyx_t_6 = NULL;
7110  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7111  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
7112  if (likely(__pyx_t_6)) {
7113  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7114  __Pyx_INCREF(__pyx_t_6);
7115  __Pyx_INCREF(function);
7116  __Pyx_DECREF_SET(__pyx_t_5, function);
7117  }
7118  }
7119  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
7120  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7121  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
7122  __Pyx_GOTREF(__pyx_t_1);
7123  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7124  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 92, __pyx_L1_error)
7125  __Pyx_GIVEREF(__pyx_t_1);
7126  __Pyx_GOTREF(__pyx_v_self->position);
7127  __Pyx_DECREF(((PyObject *)__pyx_v_self->position));
7128  __pyx_v_self->position = ((PyArrayObject *)__pyx_t_1);
7129  __pyx_t_1 = 0;
7130 
7131  /* "mbd/CouplingFSI.pyx":93
7132  * self.ang_velocity = np.zeros(3)
7133  * self.position = np.zeros(3)
7134  * self.position_last = np.zeros(3) # <<<<<<<<<<<<<<
7135  * self.ang_vel_norm = 0. # used for mesh disp prediction
7136  * self.ang_vel_norm_last = 0. # used for mesh disp prediction
7137  */
7138  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error)
7139  __Pyx_GOTREF(__pyx_t_5);
7140  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 93, __pyx_L1_error)
7141  __Pyx_GOTREF(__pyx_t_6);
7142  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7143  __pyx_t_5 = NULL;
7144  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7145  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
7146  if (likely(__pyx_t_5)) {
7147  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7148  __Pyx_INCREF(__pyx_t_5);
7149  __Pyx_INCREF(function);
7150  __Pyx_DECREF_SET(__pyx_t_6, function);
7151  }
7152  }
7153  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
7154  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7155  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error)
7156  __Pyx_GOTREF(__pyx_t_1);
7157  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7158  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 93, __pyx_L1_error)
7159  __Pyx_GIVEREF(__pyx_t_1);
7160  __Pyx_GOTREF(__pyx_v_self->position_last);
7161  __Pyx_DECREF(((PyObject *)__pyx_v_self->position_last));
7162  __pyx_v_self->position_last = ((PyArrayObject *)__pyx_t_1);
7163  __pyx_t_1 = 0;
7164 
7165  /* "mbd/CouplingFSI.pyx":94
7166  * self.position = np.zeros(3)
7167  * self.position_last = np.zeros(3)
7168  * self.ang_vel_norm = 0. # used for mesh disp prediction # <<<<<<<<<<<<<<
7169  * self.ang_vel_norm_last = 0. # used for mesh disp prediction
7170  * self.h_predict = np.zeros(3)
7171  */
7172  __pyx_v_self->ang_vel_norm = 0.;
7173 
7174  /* "mbd/CouplingFSI.pyx":95
7175  * self.position_last = np.zeros(3)
7176  * self.ang_vel_norm = 0. # used for mesh disp prediction
7177  * self.ang_vel_norm_last = 0. # used for mesh disp prediction # <<<<<<<<<<<<<<
7178  * self.h_predict = np.zeros(3)
7179  * self.h_ang_predict = 0.
7180  */
7181  __pyx_v_self->ang_vel_norm_last = 0.;
7182 
7183  /* "mbd/CouplingFSI.pyx":96
7184  * self.ang_vel_norm = 0. # used for mesh disp prediction
7185  * self.ang_vel_norm_last = 0. # used for mesh disp prediction
7186  * self.h_predict = np.zeros(3) # <<<<<<<<<<<<<<
7187  * self.h_ang_predict = 0.
7188  * self.h_ang_vel_predict = np.zeros(3)
7189  */
7190  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
7191  __Pyx_GOTREF(__pyx_t_6);
7192  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
7193  __Pyx_GOTREF(__pyx_t_5);
7194  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7195  __pyx_t_6 = NULL;
7196  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7197  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
7198  if (likely(__pyx_t_6)) {
7199  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7200  __Pyx_INCREF(__pyx_t_6);
7201  __Pyx_INCREF(function);
7202  __Pyx_DECREF_SET(__pyx_t_5, function);
7203  }
7204  }
7205  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
7206  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7207  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
7208  __Pyx_GOTREF(__pyx_t_1);
7209  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7210  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 96, __pyx_L1_error)
7211  __Pyx_GIVEREF(__pyx_t_1);
7212  __Pyx_GOTREF(__pyx_v_self->h_predict);
7213  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_predict));
7214  __pyx_v_self->h_predict = ((PyArrayObject *)__pyx_t_1);
7215  __pyx_t_1 = 0;
7216 
7217  /* "mbd/CouplingFSI.pyx":97
7218  * self.ang_vel_norm_last = 0. # used for mesh disp prediction
7219  * self.h_predict = np.zeros(3)
7220  * self.h_ang_predict = 0. # <<<<<<<<<<<<<<
7221  * self.h_ang_vel_predict = np.zeros(3)
7222  * self.h_predict_last = np.zeros(3)
7223  */
7224  __pyx_v_self->h_ang_predict = 0.;
7225 
7226  /* "mbd/CouplingFSI.pyx":98
7227  * self.h_predict = np.zeros(3)
7228  * self.h_ang_predict = 0.
7229  * self.h_ang_vel_predict = np.zeros(3) # <<<<<<<<<<<<<<
7230  * self.h_predict_last = np.zeros(3)
7231  * self.h_ang_predict_last = 0.
7232  */
7233  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error)
7234  __Pyx_GOTREF(__pyx_t_5);
7235  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 98, __pyx_L1_error)
7236  __Pyx_GOTREF(__pyx_t_6);
7237  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7238  __pyx_t_5 = NULL;
7239  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7240  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
7241  if (likely(__pyx_t_5)) {
7242  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7243  __Pyx_INCREF(__pyx_t_5);
7244  __Pyx_INCREF(function);
7245  __Pyx_DECREF_SET(__pyx_t_6, function);
7246  }
7247  }
7248  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
7249  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7250  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 98, __pyx_L1_error)
7251  __Pyx_GOTREF(__pyx_t_1);
7252  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7253  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 98, __pyx_L1_error)
7254  __Pyx_GIVEREF(__pyx_t_1);
7255  __Pyx_GOTREF(__pyx_v_self->h_ang_vel_predict);
7256  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_ang_vel_predict));
7257  __pyx_v_self->h_ang_vel_predict = ((PyArrayObject *)__pyx_t_1);
7258  __pyx_t_1 = 0;
7259 
7260  /* "mbd/CouplingFSI.pyx":99
7261  * self.h_ang_predict = 0.
7262  * self.h_ang_vel_predict = np.zeros(3)
7263  * self.h_predict_last = np.zeros(3) # <<<<<<<<<<<<<<
7264  * self.h_ang_predict_last = 0.
7265  * self.h_ang_vel_predict_last = np.zeros(3)
7266  */
7267  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 99, __pyx_L1_error)
7268  __Pyx_GOTREF(__pyx_t_6);
7269  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 99, __pyx_L1_error)
7270  __Pyx_GOTREF(__pyx_t_5);
7271  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7272  __pyx_t_6 = NULL;
7273  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7274  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
7275  if (likely(__pyx_t_6)) {
7276  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7277  __Pyx_INCREF(__pyx_t_6);
7278  __Pyx_INCREF(function);
7279  __Pyx_DECREF_SET(__pyx_t_5, function);
7280  }
7281  }
7282  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_int_3);
7283  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7284  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
7285  __Pyx_GOTREF(__pyx_t_1);
7286  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7287  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 99, __pyx_L1_error)
7288  __Pyx_GIVEREF(__pyx_t_1);
7289  __Pyx_GOTREF(__pyx_v_self->h_predict_last);
7290  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_predict_last));
7291  __pyx_v_self->h_predict_last = ((PyArrayObject *)__pyx_t_1);
7292  __pyx_t_1 = 0;
7293 
7294  /* "mbd/CouplingFSI.pyx":100
7295  * self.h_ang_vel_predict = np.zeros(3)
7296  * self.h_predict_last = np.zeros(3)
7297  * self.h_ang_predict_last = 0. # <<<<<<<<<<<<<<
7298  * self.h_ang_vel_predict_last = np.zeros(3)
7299  * self.predicted = False
7300  */
7301  __pyx_v_self->h_ang_predict_last = 0.;
7302 
7303  /* "mbd/CouplingFSI.pyx":101
7304  * self.h_predict_last = np.zeros(3)
7305  * self.h_ang_predict_last = 0.
7306  * self.h_ang_vel_predict_last = np.zeros(3) # <<<<<<<<<<<<<<
7307  * self.predicted = False
7308  * self.adams_vel = np.zeros((5, 3))
7309  */
7310  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L1_error)
7311  __Pyx_GOTREF(__pyx_t_5);
7312  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 101, __pyx_L1_error)
7313  __Pyx_GOTREF(__pyx_t_6);
7314  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7315  __pyx_t_5 = NULL;
7316  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7317  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
7318  if (likely(__pyx_t_5)) {
7319  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7320  __Pyx_INCREF(__pyx_t_5);
7321  __Pyx_INCREF(function);
7322  __Pyx_DECREF_SET(__pyx_t_6, function);
7323  }
7324  }
7325  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
7326  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7327  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
7328  __Pyx_GOTREF(__pyx_t_1);
7329  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7330  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 101, __pyx_L1_error)
7331  __Pyx_GIVEREF(__pyx_t_1);
7332  __Pyx_GOTREF(__pyx_v_self->h_ang_vel_predict_last);
7333  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_ang_vel_predict_last));
7334  __pyx_v_self->h_ang_vel_predict_last = ((PyArrayObject *)__pyx_t_1);
7335  __pyx_t_1 = 0;
7336 
7337  /* "mbd/CouplingFSI.pyx":102
7338  * self.h_ang_predict_last = 0.
7339  * self.h_ang_vel_predict_last = np.zeros(3)
7340  * self.predicted = False # <<<<<<<<<<<<<<
7341  * self.adams_vel = np.zeros((5, 3))
7342  * self.Aij = np.zeros((6, 6)) # added mass array
7343  */
7344  __pyx_v_self->predicted = 0;
7345 
7346  /* "mbd/CouplingFSI.pyx":103
7347  * self.h_ang_vel_predict_last = np.zeros(3)
7348  * self.predicted = False
7349  * self.adams_vel = np.zeros((5, 3)) # <<<<<<<<<<<<<<
7350  * self.Aij = np.zeros((6, 6)) # added mass array
7351  * self.applyAddedMass = True # will apply added mass in Chrono calculations if True
7352  */
7353  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 103, __pyx_L1_error)
7354  __Pyx_GOTREF(__pyx_t_6);
7355  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 103, __pyx_L1_error)
7356  __Pyx_GOTREF(__pyx_t_5);
7357  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7358  __pyx_t_6 = NULL;
7359  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7360  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
7361  if (likely(__pyx_t_6)) {
7362  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7363  __Pyx_INCREF(__pyx_t_6);
7364  __Pyx_INCREF(function);
7365  __Pyx_DECREF_SET(__pyx_t_5, function);
7366  }
7367  }
7368  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_tuple_) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_tuple_);
7369  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7370  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
7371  __Pyx_GOTREF(__pyx_t_1);
7372  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7373  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 103, __pyx_L1_error)
7374  __Pyx_GIVEREF(__pyx_t_1);
7375  __Pyx_GOTREF(__pyx_v_self->adams_vel);
7376  __Pyx_DECREF(((PyObject *)__pyx_v_self->adams_vel));
7377  __pyx_v_self->adams_vel = ((PyArrayObject *)__pyx_t_1);
7378  __pyx_t_1 = 0;
7379 
7380  /* "mbd/CouplingFSI.pyx":104
7381  * self.predicted = False
7382  * self.adams_vel = np.zeros((5, 3))
7383  * self.Aij = np.zeros((6, 6)) # added mass array # <<<<<<<<<<<<<<
7384  * self.applyAddedMass = True # will apply added mass in Chrono calculations if True
7385  * self.useIBM = False
7386  */
7387  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 104, __pyx_L1_error)
7388  __Pyx_GOTREF(__pyx_t_5);
7389  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 104, __pyx_L1_error)
7390  __Pyx_GOTREF(__pyx_t_6);
7391  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7392  __pyx_t_5 = NULL;
7393  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
7394  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
7395  if (likely(__pyx_t_5)) {
7396  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7397  __Pyx_INCREF(__pyx_t_5);
7398  __Pyx_INCREF(function);
7399  __Pyx_DECREF_SET(__pyx_t_6, function);
7400  }
7401  }
7402  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_tuple__2) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_tuple__2);
7403  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7404  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
7405  __Pyx_GOTREF(__pyx_t_1);
7406  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7407  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 104, __pyx_L1_error)
7408  __Pyx_GIVEREF(__pyx_t_1);
7409  __Pyx_GOTREF(__pyx_v_self->Aij);
7410  __Pyx_DECREF(((PyObject *)__pyx_v_self->Aij));
7411  __pyx_v_self->Aij = ((PyArrayObject *)__pyx_t_1);
7412  __pyx_t_1 = 0;
7413 
7414  /* "mbd/CouplingFSI.pyx":105
7415  * self.adams_vel = np.zeros((5, 3))
7416  * self.Aij = np.zeros((6, 6)) # added mass array
7417  * self.applyAddedMass = True # will apply added mass in Chrono calculations if True # <<<<<<<<<<<<<<
7418  * self.useIBM = False
7419  * self.Aij_factor = 1.
7420  */
7421  __pyx_v_self->applyAddedMass = 1;
7422 
7423  /* "mbd/CouplingFSI.pyx":106
7424  * self.Aij = np.zeros((6, 6)) # added mass array
7425  * self.applyAddedMass = True # will apply added mass in Chrono calculations if True
7426  * self.useIBM = False # <<<<<<<<<<<<<<
7427  * self.Aij_factor = 1.
7428  * self.Aij_updated_global = False
7429  */
7430  __pyx_v_self->useIBM = 0;
7431 
7432  /* "mbd/CouplingFSI.pyx":107
7433  * self.applyAddedMass = True # will apply added mass in Chrono calculations if True
7434  * self.useIBM = False
7435  * self.Aij_factor = 1. # <<<<<<<<<<<<<<
7436  * self.Aij_updated_global = False
7437  * self.Aij_transform_local = False
7438  */
7439  __pyx_v_self->Aij_factor = 1.;
7440 
7441  /* "mbd/CouplingFSI.pyx":108
7442  * self.useIBM = False
7443  * self.Aij_factor = 1.
7444  * self.Aij_updated_global = False # <<<<<<<<<<<<<<
7445  * self.Aij_transform_local = False
7446  * self.boundaryFlags = np.empty(0, 'i')
7447  */
7448  __pyx_v_self->Aij_updated_global = 0;
7449 
7450  /* "mbd/CouplingFSI.pyx":109
7451  * self.Aij_factor = 1.
7452  * self.Aij_updated_global = False
7453  * self.Aij_transform_local = False # <<<<<<<<<<<<<<
7454  * self.boundaryFlags = np.empty(0, 'i')
7455  * self.setName(b'rigidbody')
7456  */
7457  __pyx_v_self->Aij_transform_local = 0;
7458 
7459  /* "mbd/CouplingFSI.pyx":110
7460  * self.Aij_updated_global = False
7461  * self.Aij_transform_local = False
7462  * self.boundaryFlags = np.empty(0, 'i') # <<<<<<<<<<<<<<
7463  * self.setName(b'rigidbody')
7464  *
7465  */
7466  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
7467  __Pyx_GOTREF(__pyx_t_1);
7468  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
7469  __Pyx_GOTREF(__pyx_t_6);
7470  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7471  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
7472  __Pyx_GOTREF(__pyx_t_1);
7473  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7474  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 110, __pyx_L1_error)
7475  __Pyx_GIVEREF(__pyx_t_1);
7476  __Pyx_GOTREF(__pyx_v_self->boundaryFlags);
7477  __Pyx_DECREF(((PyObject *)__pyx_v_self->boundaryFlags));
7478  __pyx_v_self->boundaryFlags = ((PyArrayObject *)__pyx_t_1);
7479  __pyx_t_1 = 0;
7480 
7481  /* "mbd/CouplingFSI.pyx":111
7482  * self.Aij_transform_local = False
7483  * self.boundaryFlags = np.empty(0, 'i')
7484  * self.setName(b'rigidbody') # <<<<<<<<<<<<<<
7485  *
7486  * def getChronoObject(self):
7487  */
7488  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setName); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
7489  __Pyx_GOTREF(__pyx_t_6);
7490  __pyx_t_5 = NULL;
7491  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
7492  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
7493  if (likely(__pyx_t_5)) {
7494  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
7495  __Pyx_INCREF(__pyx_t_5);
7496  __Pyx_INCREF(function);
7497  __Pyx_DECREF_SET(__pyx_t_6, function);
7498  }
7499  }
7500  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_n_b_rigidbody) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_n_b_rigidbody);
7501  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
7502  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
7503  __Pyx_GOTREF(__pyx_t_1);
7504  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7505  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
7506 
7507  /* "mbd/CouplingFSI.pyx":67
7508  * cdef class ProtChBody:
7509  *
7510  * def __cinit__(self, # <<<<<<<<<<<<<<
7511  * ProtChSystem system=None):
7512  * self.ProtChSystem = system
7513  */
7514 
7515  /* function exit code */
7516  __pyx_r = 0;
7517  goto __pyx_L0;
7518  __pyx_L1_error:;
7519  __Pyx_XDECREF(__pyx_t_1);
7520  __Pyx_XDECREF(__pyx_t_5);
7521  __Pyx_XDECREF(__pyx_t_6);
7522  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7523  __pyx_r = -1;
7524  __pyx_L0:;
7525  __Pyx_TraceReturn(Py_None, 0);
7526  __Pyx_RefNannyFinishContext();
7527  return __pyx_r;
7528 }
7529 
7530 /* "mbd/CouplingFSI.pyx":113
7531  * self.setName(b'rigidbody')
7532  *
7533  * def getChronoObject(self): # <<<<<<<<<<<<<<
7534  * return self.ChBody
7535  *
7536  */
7537 
7538 /* Python wrapper */
7539 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3getChronoObject(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
7540 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_2getChronoObject[] = "ProtChBody.getChronoObject(self)";
7541 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_3getChronoObject = {"getChronoObject", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3getChronoObject, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_2getChronoObject};
7542 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3getChronoObject(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
7543  PyObject *__pyx_r = 0;
7544  __Pyx_RefNannyDeclarations
7545  __Pyx_RefNannySetupContext("getChronoObject (wrapper)", 0);
7546  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2getChronoObject(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
7547 
7548  /* function exit code */
7549  __Pyx_RefNannyFinishContext();
7550  return __pyx_r;
7551 }
7552 
7553 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2getChronoObject(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
7554  PyObject *__pyx_r = NULL;
7555  __Pyx_TraceDeclarations
7556  __Pyx_RefNannyDeclarations
7557  int __pyx_lineno = 0;
7558  const char *__pyx_filename = NULL;
7559  int __pyx_clineno = 0;
7560  __Pyx_TraceFrameInit(__pyx_codeobj__4)
7561  __Pyx_RefNannySetupContext("getChronoObject", 0);
7562  __Pyx_TraceCall("getChronoObject", __pyx_f[0], 113, 0, __PYX_ERR(0, 113, __pyx_L1_error));
7563 
7564  /* "mbd/CouplingFSI.pyx":114
7565  *
7566  * def getChronoObject(self):
7567  * return self.ChBody # <<<<<<<<<<<<<<
7568  *
7569  * def attachShape(self,
7570  */
7571  __Pyx_XDECREF(__pyx_r);
7572  __Pyx_INCREF(__pyx_v_self->ChBody);
7573  __pyx_r = __pyx_v_self->ChBody;
7574  goto __pyx_L0;
7575 
7576  /* "mbd/CouplingFSI.pyx":113
7577  * self.setName(b'rigidbody')
7578  *
7579  * def getChronoObject(self): # <<<<<<<<<<<<<<
7580  * return self.ChBody
7581  *
7582  */
7583 
7584  /* function exit code */
7585  __pyx_L1_error:;
7586  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getChronoObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
7587  __pyx_r = NULL;
7588  __pyx_L0:;
7589  __Pyx_XGIVEREF(__pyx_r);
7590  __Pyx_TraceReturn(__pyx_r, 0);
7591  __Pyx_RefNannyFinishContext();
7592  return __pyx_r;
7593 }
7594 
7595 /* "mbd/CouplingFSI.pyx":116
7596  * return self.ChBody
7597  *
7598  * def attachShape(self, # <<<<<<<<<<<<<<
7599  * shape,
7600  * take_shape_name=True):
7601  */
7602 
7603 /* Python wrapper */
7604 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5attachShape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
7605 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_4attachShape[] = "ProtChBody.attachShape(self, shape, take_shape_name=True)\nAttach proteus.SpatialTools shape to body.\n Used for automatic calculation of external forces from Proteus.\n Called automatically when creating a body and passing a shape\n instance.\n\n Parameters\n ----------\n shape: SpatialTools.Shape\n instance of shape from proteus.SpatialTools or\n proteus.mprans.SpatialTools\n ";
7606 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_5attachShape = {"attachShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5attachShape, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_4attachShape};
7607 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5attachShape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
7608  PyObject *__pyx_v_shape = 0;
7609  PyObject *__pyx_v_take_shape_name = 0;
7610  int __pyx_lineno = 0;
7611  const char *__pyx_filename = NULL;
7612  int __pyx_clineno = 0;
7613  PyObject *__pyx_r = 0;
7614  __Pyx_RefNannyDeclarations
7615  __Pyx_RefNannySetupContext("attachShape (wrapper)", 0);
7616  {
7617  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_take_shape_name,0};
7618  PyObject* values[2] = {0,0};
7619 
7620  /* "mbd/CouplingFSI.pyx":118
7621  * def attachShape(self,
7622  * shape,
7623  * take_shape_name=True): # <<<<<<<<<<<<<<
7624  * """Attach proteus.SpatialTools shape to body.
7625  * Used for automatic calculation of external forces from Proteus.
7626  */
7627  values[1] = ((PyObject *)Py_True);
7628  if (unlikely(__pyx_kwds)) {
7629  Py_ssize_t kw_args;
7630  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
7631  switch (pos_args) {
7632  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7633  CYTHON_FALLTHROUGH;
7634  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7635  CYTHON_FALLTHROUGH;
7636  case 0: break;
7637  default: goto __pyx_L5_argtuple_error;
7638  }
7639  kw_args = PyDict_Size(__pyx_kwds);
7640  switch (pos_args) {
7641  case 0:
7642  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
7643  else goto __pyx_L5_argtuple_error;
7644  CYTHON_FALLTHROUGH;
7645  case 1:
7646  if (kw_args > 0) {
7647  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_take_shape_name);
7648  if (value) { values[1] = value; kw_args--; }
7649  }
7650  }
7651  if (unlikely(kw_args > 0)) {
7652  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attachShape") < 0)) __PYX_ERR(0, 116, __pyx_L3_error)
7653  }
7654  } else {
7655  switch (PyTuple_GET_SIZE(__pyx_args)) {
7656  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
7657  CYTHON_FALLTHROUGH;
7658  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
7659  break;
7660  default: goto __pyx_L5_argtuple_error;
7661  }
7662  }
7663  __pyx_v_shape = values[0];
7664  __pyx_v_take_shape_name = values[1];
7665  }
7666  goto __pyx_L4_argument_unpacking_done;
7667  __pyx_L5_argtuple_error:;
7668  __Pyx_RaiseArgtupleInvalid("attachShape", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 116, __pyx_L3_error)
7669  __pyx_L3_error:;
7670  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.attachShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
7671  __Pyx_RefNannyFinishContext();
7672  return NULL;
7673  __pyx_L4_argument_unpacking_done:;
7674  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4attachShape(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_shape, __pyx_v_take_shape_name);
7675 
7676  /* "mbd/CouplingFSI.pyx":116
7677  * return self.ChBody
7678  *
7679  * def attachShape(self, # <<<<<<<<<<<<<<
7680  * shape,
7681  * take_shape_name=True):
7682  */
7683 
7684  /* function exit code */
7685  __Pyx_RefNannyFinishContext();
7686  return __pyx_r;
7687 }
7688 
7689 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4attachShape(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_shape, PyObject *__pyx_v_take_shape_name) {
7690  PyObject *__pyx_v_new_vec = NULL;
7691  PyObject *__pyx_r = NULL;
7692  __Pyx_TraceDeclarations
7693  __Pyx_RefNannyDeclarations
7694  int __pyx_t_1;
7695  PyObject *__pyx_t_2 = NULL;
7696  PyObject *__pyx_t_3 = NULL;
7697  int __pyx_t_4;
7698  PyObject *__pyx_t_5 = NULL;
7699  PyObject *__pyx_t_6 = NULL;
7700  int __pyx_t_7;
7701  PyObject *__pyx_t_8 = NULL;
7702  PyObject *__pyx_t_9 = NULL;
7703  PyObject *__pyx_t_10 = NULL;
7704  int __pyx_lineno = 0;
7705  const char *__pyx_filename = NULL;
7706  int __pyx_clineno = 0;
7707  __Pyx_TraceFrameInit(__pyx_codeobj__5)
7708  __Pyx_RefNannySetupContext("attachShape", 0);
7709  __Pyx_TraceCall("attachShape", __pyx_f[0], 116, 0, __PYX_ERR(0, 116, __pyx_L1_error));
7710 
7711  /* "mbd/CouplingFSI.pyx":130
7712  * proteus.mprans.SpatialTools
7713  * """
7714  * assert self.Shape is None, 'Shape '+self.Shape.name+' was already attached' # <<<<<<<<<<<<<<
7715  * self.Shape = shape
7716  * if 'ChRigidBody' not in shape.auxiliaryVariables:
7717  */
7718  #ifndef CYTHON_WITHOUT_ASSERTIONS
7719  if (unlikely(!Py_OptimizeFlag)) {
7720  __pyx_t_1 = (__pyx_v_self->Shape == Py_None);
7721  if (unlikely(!(__pyx_t_1 != 0))) {
7722  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->Shape, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
7723  __Pyx_GOTREF(__pyx_t_2);
7724  __pyx_t_3 = PyNumber_Add(__pyx_kp_s_Shape, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
7725  __Pyx_GOTREF(__pyx_t_3);
7726  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7727  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_kp_s_was_already_attached); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
7728  __Pyx_GOTREF(__pyx_t_2);
7729  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7730  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 130, __pyx_L1_error)
7731  __Pyx_GOTREF(__pyx_t_3);
7732  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7733  PyErr_SetObject(PyExc_AssertionError, __pyx_t_3);
7734  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7735  __PYX_ERR(0, 130, __pyx_L1_error)
7736  }
7737  }
7738  #endif
7739 
7740  /* "mbd/CouplingFSI.pyx":131
7741  * """
7742  * assert self.Shape is None, 'Shape '+self.Shape.name+' was already attached'
7743  * self.Shape = shape # <<<<<<<<<<<<<<
7744  * if 'ChRigidBody' not in shape.auxiliaryVariables:
7745  * shape.auxiliaryVariables['ChRigidBody'] = self
7746  */
7747  __Pyx_INCREF(__pyx_v_shape);
7748  __Pyx_GIVEREF(__pyx_v_shape);
7749  __Pyx_GOTREF(__pyx_v_self->Shape);
7750  __Pyx_DECREF(__pyx_v_self->Shape);
7751  __pyx_v_self->Shape = __pyx_v_shape;
7752 
7753  /* "mbd/CouplingFSI.pyx":132
7754  * assert self.Shape is None, 'Shape '+self.Shape.name+' was already attached'
7755  * self.Shape = shape
7756  * if 'ChRigidBody' not in shape.auxiliaryVariables: # <<<<<<<<<<<<<<
7757  * shape.auxiliaryVariables['ChRigidBody'] = self
7758  * if take_shape_name is True:
7759  */
7760  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_auxiliaryVariables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error)
7761  __Pyx_GOTREF(__pyx_t_3);
7762  __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_ChRigidBody, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 132, __pyx_L1_error)
7763  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7764  __pyx_t_4 = (__pyx_t_1 != 0);
7765  if (__pyx_t_4) {
7766 
7767  /* "mbd/CouplingFSI.pyx":133
7768  * self.Shape = shape
7769  * if 'ChRigidBody' not in shape.auxiliaryVariables:
7770  * shape.auxiliaryVariables['ChRigidBody'] = self # <<<<<<<<<<<<<<
7771  * if take_shape_name is True:
7772  * self.setName(bytes(shape.name,'utf-8'))
7773  */
7774  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_auxiliaryVariables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
7775  __Pyx_GOTREF(__pyx_t_3);
7776  if (unlikely(PyObject_SetItem(__pyx_t_3, __pyx_n_s_ChRigidBody, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 133, __pyx_L1_error)
7777  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7778 
7779  /* "mbd/CouplingFSI.pyx":134
7780  * if 'ChRigidBody' not in shape.auxiliaryVariables:
7781  * shape.auxiliaryVariables['ChRigidBody'] = self
7782  * if take_shape_name is True: # <<<<<<<<<<<<<<
7783  * self.setName(bytes(shape.name,'utf-8'))
7784  * self.nd = shape.Domain.nd
7785  */
7786  __pyx_t_4 = (__pyx_v_take_shape_name == Py_True);
7787  __pyx_t_1 = (__pyx_t_4 != 0);
7788  if (__pyx_t_1) {
7789 
7790  /* "mbd/CouplingFSI.pyx":135
7791  * shape.auxiliaryVariables['ChRigidBody'] = self
7792  * if take_shape_name is True:
7793  * self.setName(bytes(shape.name,'utf-8')) # <<<<<<<<<<<<<<
7794  * self.nd = shape.Domain.nd
7795  * new_vec = chrono.ChVectorD(shape.barycenter[0],
7796  */
7797  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
7798  __Pyx_GOTREF(__pyx_t_2);
7799  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
7800  __Pyx_GOTREF(__pyx_t_5);
7801  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 135, __pyx_L1_error)
7802  __Pyx_GOTREF(__pyx_t_6);
7803  __Pyx_GIVEREF(__pyx_t_5);
7804  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
7805  __Pyx_INCREF(__pyx_kp_s_utf_8);
7806  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
7807  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s_utf_8);
7808  __pyx_t_5 = 0;
7809  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 135, __pyx_L1_error)
7810  __Pyx_GOTREF(__pyx_t_5);
7811  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7812  __pyx_t_6 = NULL;
7813  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
7814  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
7815  if (likely(__pyx_t_6)) {
7816  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
7817  __Pyx_INCREF(__pyx_t_6);
7818  __Pyx_INCREF(function);
7819  __Pyx_DECREF_SET(__pyx_t_2, function);
7820  }
7821  }
7822  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
7823  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
7824  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7825  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error)
7826  __Pyx_GOTREF(__pyx_t_3);
7827  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7828  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7829 
7830  /* "mbd/CouplingFSI.pyx":134
7831  * if 'ChRigidBody' not in shape.auxiliaryVariables:
7832  * shape.auxiliaryVariables['ChRigidBody'] = self
7833  * if take_shape_name is True: # <<<<<<<<<<<<<<
7834  * self.setName(bytes(shape.name,'utf-8'))
7835  * self.nd = shape.Domain.nd
7836  */
7837  }
7838 
7839  /* "mbd/CouplingFSI.pyx":132
7840  * assert self.Shape is None, 'Shape '+self.Shape.name+' was already attached'
7841  * self.Shape = shape
7842  * if 'ChRigidBody' not in shape.auxiliaryVariables: # <<<<<<<<<<<<<<
7843  * shape.auxiliaryVariables['ChRigidBody'] = self
7844  * if take_shape_name is True:
7845  */
7846  }
7847 
7848  /* "mbd/CouplingFSI.pyx":136
7849  * if take_shape_name is True:
7850  * self.setName(bytes(shape.name,'utf-8'))
7851  * self.nd = shape.Domain.nd # <<<<<<<<<<<<<<
7852  * new_vec = chrono.ChVectorD(shape.barycenter[0],
7853  * shape.barycenter[1],
7854  */
7855  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_Domain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
7856  __Pyx_GOTREF(__pyx_t_3);
7857  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
7858  __Pyx_GOTREF(__pyx_t_2);
7859  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7860  __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L1_error)
7861  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7862  __pyx_v_self->nd = __pyx_t_7;
7863 
7864  /* "mbd/CouplingFSI.pyx":137
7865  * self.setName(bytes(shape.name,'utf-8'))
7866  * self.nd = shape.Domain.nd
7867  * new_vec = chrono.ChVectorD(shape.barycenter[0], # <<<<<<<<<<<<<<
7868  * shape.barycenter[1],
7869  * shape.barycenter[2])
7870  */
7871  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_chrono); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
7872  __Pyx_GOTREF(__pyx_t_3);
7873  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ChVectorD); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 137, __pyx_L1_error)
7874  __Pyx_GOTREF(__pyx_t_5);
7875  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7876  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_barycenter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 137, __pyx_L1_error)
7877  __Pyx_GOTREF(__pyx_t_3);
7878  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 137, __pyx_L1_error)
7879  __Pyx_GOTREF(__pyx_t_6);
7880  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7881 
7882  /* "mbd/CouplingFSI.pyx":138
7883  * self.nd = shape.Domain.nd
7884  * new_vec = chrono.ChVectorD(shape.barycenter[0],
7885  * shape.barycenter[1], # <<<<<<<<<<<<<<
7886  * shape.barycenter[2])
7887  * self.ChBody.SetPos(new_vec)
7888  */
7889  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_barycenter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
7890  __Pyx_GOTREF(__pyx_t_3);
7891  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 138, __pyx_L1_error)
7892  __Pyx_GOTREF(__pyx_t_8);
7893  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7894 
7895  /* "mbd/CouplingFSI.pyx":139
7896  * new_vec = chrono.ChVectorD(shape.barycenter[0],
7897  * shape.barycenter[1],
7898  * shape.barycenter[2]) # <<<<<<<<<<<<<<
7899  * self.ChBody.SetPos(new_vec)
7900  *
7901  */
7902  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_barycenter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
7903  __Pyx_GOTREF(__pyx_t_3);
7904  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 139, __pyx_L1_error)
7905  __Pyx_GOTREF(__pyx_t_9);
7906  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
7907  __pyx_t_3 = NULL;
7908  __pyx_t_7 = 0;
7909  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
7910  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
7911  if (likely(__pyx_t_3)) {
7912  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7913  __Pyx_INCREF(__pyx_t_3);
7914  __Pyx_INCREF(function);
7915  __Pyx_DECREF_SET(__pyx_t_5, function);
7916  __pyx_t_7 = 1;
7917  }
7918  }
7919  #if CYTHON_FAST_PYCALL
7920  if (PyFunction_Check(__pyx_t_5)) {
7921  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_t_8, __pyx_t_9};
7922  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
7923  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7924  __Pyx_GOTREF(__pyx_t_2);
7925  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7926  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7927  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7928  } else
7929  #endif
7930  #if CYTHON_FAST_PYCCALL
7931  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
7932  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_6, __pyx_t_8, __pyx_t_9};
7933  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
7934  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
7935  __Pyx_GOTREF(__pyx_t_2);
7936  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
7937  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
7938  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
7939  } else
7940  #endif
7941  {
7942  __pyx_t_10 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 137, __pyx_L1_error)
7943  __Pyx_GOTREF(__pyx_t_10);
7944  if (__pyx_t_3) {
7945  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
7946  }
7947  __Pyx_GIVEREF(__pyx_t_6);
7948  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_t_6);
7949  __Pyx_GIVEREF(__pyx_t_8);
7950  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_t_8);
7951  __Pyx_GIVEREF(__pyx_t_9);
7952  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_7, __pyx_t_9);
7953  __pyx_t_6 = 0;
7954  __pyx_t_8 = 0;
7955  __pyx_t_9 = 0;
7956  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error)
7957  __Pyx_GOTREF(__pyx_t_2);
7958  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
7959  }
7960  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7961  __pyx_v_new_vec = __pyx_t_2;
7962  __pyx_t_2 = 0;
7963 
7964  /* "mbd/CouplingFSI.pyx":140
7965  * shape.barycenter[1],
7966  * shape.barycenter[2])
7967  * self.ChBody.SetPos(new_vec) # <<<<<<<<<<<<<<
7968  *
7969  * def addTriangleMeshFromShape(self,
7970  */
7971  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetPos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 140, __pyx_L1_error)
7972  __Pyx_GOTREF(__pyx_t_5);
7973  __pyx_t_10 = NULL;
7974  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
7975  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
7976  if (likely(__pyx_t_10)) {
7977  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
7978  __Pyx_INCREF(__pyx_t_10);
7979  __Pyx_INCREF(function);
7980  __Pyx_DECREF_SET(__pyx_t_5, function);
7981  }
7982  }
7983  __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_10, __pyx_v_new_vec) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_new_vec);
7984  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
7985  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
7986  __Pyx_GOTREF(__pyx_t_2);
7987  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
7988  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
7989 
7990  /* "mbd/CouplingFSI.pyx":116
7991  * return self.ChBody
7992  *
7993  * def attachShape(self, # <<<<<<<<<<<<<<
7994  * shape,
7995  * take_shape_name=True):
7996  */
7997 
7998  /* function exit code */
7999  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8000  goto __pyx_L0;
8001  __pyx_L1_error:;
8002  __Pyx_XDECREF(__pyx_t_2);
8003  __Pyx_XDECREF(__pyx_t_3);
8004  __Pyx_XDECREF(__pyx_t_5);
8005  __Pyx_XDECREF(__pyx_t_6);
8006  __Pyx_XDECREF(__pyx_t_8);
8007  __Pyx_XDECREF(__pyx_t_9);
8008  __Pyx_XDECREF(__pyx_t_10);
8009  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.attachShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
8010  __pyx_r = NULL;
8011  __pyx_L0:;
8012  __Pyx_XDECREF(__pyx_v_new_vec);
8013  __Pyx_XGIVEREF(__pyx_r);
8014  __Pyx_TraceReturn(__pyx_r, 0);
8015  __Pyx_RefNannyFinishContext();
8016  return __pyx_r;
8017 }
8018 
8019 /* "mbd/CouplingFSI.pyx":142
8020  * self.ChBody.SetPos(new_vec)
8021  *
8022  * def addTriangleMeshFromShape(self, # <<<<<<<<<<<<<<
8023  * object shape=None,
8024  * double[:] pos=None,
8025  */
8026 
8027 /* Python wrapper */
8028 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_7addTriangleMeshFromShape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8029 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_6addTriangleMeshFromShape[] = "ProtChBody.addTriangleMeshFromShape(self, shape=None, double[:] pos=None, double[:, :] rot=None, bool is_static=False, bool is_convex=False, double sphereswept_thickness=0.005)\nAdds triangle mesh to collision model and for IBM calculations\n ";
8030 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_7addTriangleMeshFromShape = {"addTriangleMeshFromShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_7addTriangleMeshFromShape, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_6addTriangleMeshFromShape};
8031 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_7addTriangleMeshFromShape(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8032  PyObject *__pyx_v_shape = 0;
8033  __Pyx_memviewslice __pyx_v_pos = { 0, 0, { 0 }, { 0 }, { 0 } };
8034  __Pyx_memviewslice __pyx_v_rot = { 0, 0, { 0 }, { 0 }, { 0 } };
8035  bool __pyx_v_is_static;
8036  bool __pyx_v_is_convex;
8037  double __pyx_v_sphereswept_thickness;
8038  int __pyx_lineno = 0;
8039  const char *__pyx_filename = NULL;
8040  int __pyx_clineno = 0;
8041  PyObject *__pyx_r = 0;
8042  __Pyx_RefNannyDeclarations
8043  __Pyx_RefNannySetupContext("addTriangleMeshFromShape (wrapper)", 0);
8044  {
8045  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_pos,&__pyx_n_s_rot,&__pyx_n_s_is_static,&__pyx_n_s_is_convex,&__pyx_n_s_sphereswept_thickness,0};
8046  PyObject* values[6] = {0,0,0,0,0,0};
8047 
8048  /* "mbd/CouplingFSI.pyx":143
8049  *
8050  * def addTriangleMeshFromShape(self,
8051  * object shape=None, # <<<<<<<<<<<<<<
8052  * double[:] pos=None,
8053  * double[:,:] rot=None,
8054  */
8055  values[0] = ((PyObject *)Py_None);
8056  if (unlikely(__pyx_kwds)) {
8057  Py_ssize_t kw_args;
8058  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
8059  switch (pos_args) {
8060  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8061  CYTHON_FALLTHROUGH;
8062  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8063  CYTHON_FALLTHROUGH;
8064  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8065  CYTHON_FALLTHROUGH;
8066  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8067  CYTHON_FALLTHROUGH;
8068  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8069  CYTHON_FALLTHROUGH;
8070  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8071  CYTHON_FALLTHROUGH;
8072  case 0: break;
8073  default: goto __pyx_L5_argtuple_error;
8074  }
8075  kw_args = PyDict_Size(__pyx_kwds);
8076  switch (pos_args) {
8077  case 0:
8078  if (kw_args > 0) {
8079  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape);
8080  if (value) { values[0] = value; kw_args--; }
8081  }
8082  CYTHON_FALLTHROUGH;
8083  case 1:
8084  if (kw_args > 0) {
8085  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pos);
8086  if (value) { values[1] = value; kw_args--; }
8087  }
8088  CYTHON_FALLTHROUGH;
8089  case 2:
8090  if (kw_args > 0) {
8091  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rot);
8092  if (value) { values[2] = value; kw_args--; }
8093  }
8094  CYTHON_FALLTHROUGH;
8095  case 3:
8096  if (kw_args > 0) {
8097  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_is_static);
8098  if (value) { values[3] = value; kw_args--; }
8099  }
8100  CYTHON_FALLTHROUGH;
8101  case 4:
8102  if (kw_args > 0) {
8103  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_is_convex);
8104  if (value) { values[4] = value; kw_args--; }
8105  }
8106  CYTHON_FALLTHROUGH;
8107  case 5:
8108  if (kw_args > 0) {
8109  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sphereswept_thickness);
8110  if (value) { values[5] = value; kw_args--; }
8111  }
8112  }
8113  if (unlikely(kw_args > 0)) {
8114  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addTriangleMeshFromShape") < 0)) __PYX_ERR(0, 142, __pyx_L3_error)
8115  }
8116  } else {
8117  switch (PyTuple_GET_SIZE(__pyx_args)) {
8118  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
8119  CYTHON_FALLTHROUGH;
8120  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
8121  CYTHON_FALLTHROUGH;
8122  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
8123  CYTHON_FALLTHROUGH;
8124  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
8125  CYTHON_FALLTHROUGH;
8126  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
8127  CYTHON_FALLTHROUGH;
8128  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
8129  CYTHON_FALLTHROUGH;
8130  case 0: break;
8131  default: goto __pyx_L5_argtuple_error;
8132  }
8133  }
8134  __pyx_v_shape = values[0];
8135  if (values[1]) {
8136  __pyx_v_pos = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_pos.memview)) __PYX_ERR(0, 144, __pyx_L3_error)
8137  } else {
8138  __pyx_v_pos = __pyx_k__6;
8139  __PYX_INC_MEMVIEW(&__pyx_v_pos, 1);
8140  }
8141  if (values[2]) {
8142  __pyx_v_rot = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_rot.memview)) __PYX_ERR(0, 145, __pyx_L3_error)
8143  } else {
8144  __pyx_v_rot = __pyx_k__7;
8145  __PYX_INC_MEMVIEW(&__pyx_v_rot, 1);
8146  }
8147  if (values[3]) {
8148  __pyx_v_is_static = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_is_static == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 146, __pyx_L3_error)
8149  } else {
8150 
8151  /* "mbd/CouplingFSI.pyx":146
8152  * double[:] pos=None,
8153  * double[:,:] rot=None,
8154  * bool is_static=False, # <<<<<<<<<<<<<<
8155  * bool is_convex=False,
8156  * double sphereswept_thickness=0.005):
8157  */
8158  __pyx_v_is_static = ((bool)0);
8159  }
8160  if (values[4]) {
8161  __pyx_v_is_convex = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_is_convex == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 147, __pyx_L3_error)
8162  } else {
8163 
8164  /* "mbd/CouplingFSI.pyx":147
8165  * double[:,:] rot=None,
8166  * bool is_static=False,
8167  * bool is_convex=False, # <<<<<<<<<<<<<<
8168  * double sphereswept_thickness=0.005):
8169  * """Adds triangle mesh to collision model and for IBM calculations
8170  */
8171  __pyx_v_is_convex = ((bool)0);
8172  }
8173  if (values[5]) {
8174  __pyx_v_sphereswept_thickness = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_sphereswept_thickness == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error)
8175  } else {
8176  __pyx_v_sphereswept_thickness = ((double)0.005);
8177  }
8178  }
8179  goto __pyx_L4_argument_unpacking_done;
8180  __pyx_L5_argtuple_error:;
8181  __Pyx_RaiseArgtupleInvalid("addTriangleMeshFromShape", 0, 0, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 142, __pyx_L3_error)
8182  __pyx_L3_error:;
8183  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addTriangleMeshFromShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
8184  __Pyx_RefNannyFinishContext();
8185  return NULL;
8186  __pyx_L4_argument_unpacking_done:;
8187  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6addTriangleMeshFromShape(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_shape, __pyx_v_pos, __pyx_v_rot, __pyx_v_is_static, __pyx_v_is_convex, __pyx_v_sphereswept_thickness);
8188 
8189  /* "mbd/CouplingFSI.pyx":142
8190  * self.ChBody.SetPos(new_vec)
8191  *
8192  * def addTriangleMeshFromShape(self, # <<<<<<<<<<<<<<
8193  * object shape=None,
8194  * double[:] pos=None,
8195  */
8196 
8197  /* function exit code */
8198  __Pyx_RefNannyFinishContext();
8199  return __pyx_r;
8200 }
8201 
8202 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6addTriangleMeshFromShape(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_shape, __Pyx_memviewslice __pyx_v_pos, __Pyx_memviewslice __pyx_v_rot, bool __pyx_v_is_static, bool __pyx_v_is_convex, double __pyx_v_sphereswept_thickness) {
8203  PyObject *__pyx_v_vertices = NULL;
8204  PyObject *__pyx_v_f_i = NULL;
8205  PyObject *__pyx_v_facet = NULL;
8206  PyObject *__pyx_v_f = NULL;
8207  PyObject *__pyx_v_facets = NULL;
8208  PyObject *__pyx_r = NULL;
8209  __Pyx_TraceDeclarations
8210  __Pyx_RefNannyDeclarations
8211  int __pyx_t_1;
8212  int __pyx_t_2;
8213  PyObject *__pyx_t_3 = NULL;
8214  PyObject *__pyx_t_4 = NULL;
8215  PyObject *__pyx_t_5 = NULL;
8216  Py_ssize_t __pyx_t_6;
8217  PyObject *(*__pyx_t_7)(PyObject *);
8218  Py_ssize_t __pyx_t_8;
8219  PyObject *__pyx_t_9 = NULL;
8220  PyObject *__pyx_t_10 = NULL;
8221  int __pyx_lineno = 0;
8222  const char *__pyx_filename = NULL;
8223  int __pyx_clineno = 0;
8224  __Pyx_TraceFrameInit(__pyx_codeobj__8)
8225  __Pyx_RefNannySetupContext("addTriangleMeshFromShape", 0);
8226  __Pyx_TraceCall("addTriangleMeshFromShape", __pyx_f[0], 142, 0, __PYX_ERR(0, 142, __pyx_L1_error));
8227  __Pyx_INCREF(__pyx_v_shape);
8228 
8229  /* "mbd/CouplingFSI.pyx":151
8230  * """Adds triangle mesh to collision model and for IBM calculations
8231  * """
8232  * if shape is None: # <<<<<<<<<<<<<<
8233  * shape = self.Shape
8234  * assert shape is not None, 'no Shape was defined for making a triangle mesh'
8235  */
8236  __pyx_t_1 = (__pyx_v_shape == Py_None);
8237  __pyx_t_2 = (__pyx_t_1 != 0);
8238  if (__pyx_t_2) {
8239 
8240  /* "mbd/CouplingFSI.pyx":152
8241  * """
8242  * if shape is None:
8243  * shape = self.Shape # <<<<<<<<<<<<<<
8244  * assert shape is not None, 'no Shape was defined for making a triangle mesh'
8245  * vertices = shape.vertices
8246  */
8247  __pyx_t_3 = __pyx_v_self->Shape;
8248  __Pyx_INCREF(__pyx_t_3);
8249  __Pyx_DECREF_SET(__pyx_v_shape, __pyx_t_3);
8250  __pyx_t_3 = 0;
8251 
8252  /* "mbd/CouplingFSI.pyx":151
8253  * """Adds triangle mesh to collision model and for IBM calculations
8254  * """
8255  * if shape is None: # <<<<<<<<<<<<<<
8256  * shape = self.Shape
8257  * assert shape is not None, 'no Shape was defined for making a triangle mesh'
8258  */
8259  }
8260 
8261  /* "mbd/CouplingFSI.pyx":153
8262  * if shape is None:
8263  * shape = self.Shape
8264  * assert shape is not None, 'no Shape was defined for making a triangle mesh' # <<<<<<<<<<<<<<
8265  * vertices = shape.vertices
8266  * for f_i, facet in enumerate(shape.facets):
8267  */
8268  #ifndef CYTHON_WITHOUT_ASSERTIONS
8269  if (unlikely(!Py_OptimizeFlag)) {
8270  __pyx_t_2 = (__pyx_v_shape != Py_None);
8271  if (unlikely(!(__pyx_t_2 != 0))) {
8272  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_no_Shape_was_defined_for_making);
8273  __PYX_ERR(0, 153, __pyx_L1_error)
8274  }
8275  }
8276  #endif
8277 
8278  /* "mbd/CouplingFSI.pyx":154
8279  * shape = self.Shape
8280  * assert shape is not None, 'no Shape was defined for making a triangle mesh'
8281  * vertices = shape.vertices # <<<<<<<<<<<<<<
8282  * for f_i, facet in enumerate(shape.facets):
8283  * f = facet[0]
8284  */
8285  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_vertices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 154, __pyx_L1_error)
8286  __Pyx_GOTREF(__pyx_t_3);
8287  __pyx_v_vertices = __pyx_t_3;
8288  __pyx_t_3 = 0;
8289 
8290  /* "mbd/CouplingFSI.pyx":155
8291  * assert shape is not None, 'no Shape was defined for making a triangle mesh'
8292  * vertices = shape.vertices
8293  * for f_i, facet in enumerate(shape.facets): # <<<<<<<<<<<<<<
8294  * f = facet[0]
8295  * assert len(f) == 3, 'Facets must be triangles for triangle mesh but facet '+str(f_i)+' is not of length 3'
8296  */
8297  __Pyx_INCREF(__pyx_int_0);
8298  __pyx_t_3 = __pyx_int_0;
8299  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_facets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
8300  __Pyx_GOTREF(__pyx_t_4);
8301  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
8302  __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
8303  __pyx_t_7 = NULL;
8304  } else {
8305  __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error)
8306  __Pyx_GOTREF(__pyx_t_5);
8307  __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 155, __pyx_L1_error)
8308  }
8309  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8310  for (;;) {
8311  if (likely(!__pyx_t_7)) {
8312  if (likely(PyList_CheckExact(__pyx_t_5))) {
8313  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
8314  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8315  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 155, __pyx_L1_error)
8316  #else
8317  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
8318  __Pyx_GOTREF(__pyx_t_4);
8319  #endif
8320  } else {
8321  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
8322  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
8323  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 155, __pyx_L1_error)
8324  #else
8325  __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
8326  __Pyx_GOTREF(__pyx_t_4);
8327  #endif
8328  }
8329  } else {
8330  __pyx_t_4 = __pyx_t_7(__pyx_t_5);
8331  if (unlikely(!__pyx_t_4)) {
8332  PyObject* exc_type = PyErr_Occurred();
8333  if (exc_type) {
8334  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
8335  else __PYX_ERR(0, 155, __pyx_L1_error)
8336  }
8337  break;
8338  }
8339  __Pyx_GOTREF(__pyx_t_4);
8340  }
8341  __Pyx_XDECREF_SET(__pyx_v_facet, __pyx_t_4);
8342  __pyx_t_4 = 0;
8343  __Pyx_INCREF(__pyx_t_3);
8344  __Pyx_XDECREF_SET(__pyx_v_f_i, __pyx_t_3);
8345  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
8346  __Pyx_GOTREF(__pyx_t_4);
8347  __Pyx_DECREF(__pyx_t_3);
8348  __pyx_t_3 = __pyx_t_4;
8349  __pyx_t_4 = 0;
8350 
8351  /* "mbd/CouplingFSI.pyx":156
8352  * vertices = shape.vertices
8353  * for f_i, facet in enumerate(shape.facets):
8354  * f = facet[0] # <<<<<<<<<<<<<<
8355  * assert len(f) == 3, 'Facets must be triangles for triangle mesh but facet '+str(f_i)+' is not of length 3'
8356  * facets = np.array(shape.facets, dtype=np.int32)
8357  */
8358  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_facet, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
8359  __Pyx_GOTREF(__pyx_t_4);
8360  __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_4);
8361  __pyx_t_4 = 0;
8362 
8363  /* "mbd/CouplingFSI.pyx":157
8364  * for f_i, facet in enumerate(shape.facets):
8365  * f = facet[0]
8366  * assert len(f) == 3, 'Facets must be triangles for triangle mesh but facet '+str(f_i)+' is not of length 3' # <<<<<<<<<<<<<<
8367  * facets = np.array(shape.facets, dtype=np.int32)
8368  * self.addTriangleMeshFromVerticesFaces(vertices=vertices,
8369  */
8370  #ifndef CYTHON_WITHOUT_ASSERTIONS
8371  if (unlikely(!Py_OptimizeFlag)) {
8372  __pyx_t_8 = PyObject_Length(__pyx_v_f); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 157, __pyx_L1_error)
8373  if (unlikely(!((__pyx_t_8 == 3) != 0))) {
8374  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_f_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
8375  __Pyx_GOTREF(__pyx_t_4);
8376  __pyx_t_9 = PyNumber_Add(__pyx_kp_s_Facets_must_be_triangles_for_tri, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 157, __pyx_L1_error)
8377  __Pyx_GOTREF(__pyx_t_9);
8378  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8379  __pyx_t_4 = PyNumber_Add(__pyx_t_9, __pyx_kp_s_is_not_of_length_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
8380  __Pyx_GOTREF(__pyx_t_4);
8381  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8382  __pyx_t_9 = PyTuple_Pack(1, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 157, __pyx_L1_error)
8383  __Pyx_GOTREF(__pyx_t_9);
8384  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8385  PyErr_SetObject(PyExc_AssertionError, __pyx_t_9);
8386  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8387  __PYX_ERR(0, 157, __pyx_L1_error)
8388  }
8389  }
8390  #endif
8391 
8392  /* "mbd/CouplingFSI.pyx":155
8393  * assert shape is not None, 'no Shape was defined for making a triangle mesh'
8394  * vertices = shape.vertices
8395  * for f_i, facet in enumerate(shape.facets): # <<<<<<<<<<<<<<
8396  * f = facet[0]
8397  * assert len(f) == 3, 'Facets must be triangles for triangle mesh but facet '+str(f_i)+' is not of length 3'
8398  */
8399  }
8400  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8401  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8402 
8403  /* "mbd/CouplingFSI.pyx":158
8404  * f = facet[0]
8405  * assert len(f) == 3, 'Facets must be triangles for triangle mesh but facet '+str(f_i)+' is not of length 3'
8406  * facets = np.array(shape.facets, dtype=np.int32) # <<<<<<<<<<<<<<
8407  * self.addTriangleMeshFromVerticesFaces(vertices=vertices,
8408  * facets=facets,
8409  */
8410  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
8411  __Pyx_GOTREF(__pyx_t_3);
8412  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 158, __pyx_L1_error)
8413  __Pyx_GOTREF(__pyx_t_5);
8414  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8415  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_shape, __pyx_n_s_facets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
8416  __Pyx_GOTREF(__pyx_t_3);
8417  __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 158, __pyx_L1_error)
8418  __Pyx_GOTREF(__pyx_t_9);
8419  __Pyx_GIVEREF(__pyx_t_3);
8420  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3);
8421  __pyx_t_3 = 0;
8422  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 158, __pyx_L1_error)
8423  __Pyx_GOTREF(__pyx_t_3);
8424  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error)
8425  __Pyx_GOTREF(__pyx_t_4);
8426  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
8427  __Pyx_GOTREF(__pyx_t_10);
8428  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8429  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_10) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
8430  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8431  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 158, __pyx_L1_error)
8432  __Pyx_GOTREF(__pyx_t_10);
8433  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
8434  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8435  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8436  __pyx_v_facets = __pyx_t_10;
8437  __pyx_t_10 = 0;
8438 
8439  /* "mbd/CouplingFSI.pyx":159
8440  * assert len(f) == 3, 'Facets must be triangles for triangle mesh but facet '+str(f_i)+' is not of length 3'
8441  * facets = np.array(shape.facets, dtype=np.int32)
8442  * self.addTriangleMeshFromVerticesFaces(vertices=vertices, # <<<<<<<<<<<<<<
8443  * facets=facets,
8444  * pos=pos,
8445  */
8446  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addTriangleMeshFromVerticesFaces); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 159, __pyx_L1_error)
8447  __Pyx_GOTREF(__pyx_t_10);
8448  __pyx_t_3 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
8449  __Pyx_GOTREF(__pyx_t_3);
8450  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_vertices, __pyx_v_vertices) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
8451 
8452  /* "mbd/CouplingFSI.pyx":160
8453  * facets = np.array(shape.facets, dtype=np.int32)
8454  * self.addTriangleMeshFromVerticesFaces(vertices=vertices,
8455  * facets=facets, # <<<<<<<<<<<<<<
8456  * pos=pos,
8457  * rot=rot,
8458  */
8459  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_facets, __pyx_v_facets) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
8460 
8461  /* "mbd/CouplingFSI.pyx":161
8462  * self.addTriangleMeshFromVerticesFaces(vertices=vertices,
8463  * facets=facets,
8464  * pos=pos, # <<<<<<<<<<<<<<
8465  * rot=rot,
8466  * is_static=is_static,
8467  */
8468  __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_pos, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error)
8469  __Pyx_GOTREF(__pyx_t_9);
8470  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pos, __pyx_t_9) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
8471  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8472 
8473  /* "mbd/CouplingFSI.pyx":162
8474  * facets=facets,
8475  * pos=pos,
8476  * rot=rot, # <<<<<<<<<<<<<<
8477  * is_static=is_static,
8478  * is_convex=is_convex,
8479  */
8480  __pyx_t_9 = __pyx_memoryview_fromslice(__pyx_v_rot, 2, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 162, __pyx_L1_error)
8481  __Pyx_GOTREF(__pyx_t_9);
8482  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_rot, __pyx_t_9) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
8483  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8484 
8485  /* "mbd/CouplingFSI.pyx":163
8486  * pos=pos,
8487  * rot=rot,
8488  * is_static=is_static, # <<<<<<<<<<<<<<
8489  * is_convex=is_convex,
8490  * sphereswept_thickness=sphereswept_thickness)
8491  */
8492  __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_is_static); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 163, __pyx_L1_error)
8493  __Pyx_GOTREF(__pyx_t_9);
8494  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_static, __pyx_t_9) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
8495  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8496 
8497  /* "mbd/CouplingFSI.pyx":164
8498  * rot=rot,
8499  * is_static=is_static,
8500  * is_convex=is_convex, # <<<<<<<<<<<<<<
8501  * sphereswept_thickness=sphereswept_thickness)
8502  *
8503  */
8504  __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_is_convex); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 164, __pyx_L1_error)
8505  __Pyx_GOTREF(__pyx_t_9);
8506  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_is_convex, __pyx_t_9) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
8507  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8508 
8509  /* "mbd/CouplingFSI.pyx":165
8510  * is_static=is_static,
8511  * is_convex=is_convex,
8512  * sphereswept_thickness=sphereswept_thickness) # <<<<<<<<<<<<<<
8513  *
8514  * # def addTriangleMeshFromVerticesFaces(self,
8515  */
8516  __pyx_t_9 = PyFloat_FromDouble(__pyx_v_sphereswept_thickness); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 165, __pyx_L1_error)
8517  __Pyx_GOTREF(__pyx_t_9);
8518  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_sphereswept_thickness, __pyx_t_9) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
8519  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8520 
8521  /* "mbd/CouplingFSI.pyx":159
8522  * assert len(f) == 3, 'Facets must be triangles for triangle mesh but facet '+str(f_i)+' is not of length 3'
8523  * facets = np.array(shape.facets, dtype=np.int32)
8524  * self.addTriangleMeshFromVerticesFaces(vertices=vertices, # <<<<<<<<<<<<<<
8525  * facets=facets,
8526  * pos=pos,
8527  */
8528  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
8529  __Pyx_GOTREF(__pyx_t_9);
8530  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
8531  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8532  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
8533 
8534  /* "mbd/CouplingFSI.pyx":142
8535  * self.ChBody.SetPos(new_vec)
8536  *
8537  * def addTriangleMeshFromShape(self, # <<<<<<<<<<<<<<
8538  * object shape=None,
8539  * double[:] pos=None,
8540  */
8541 
8542  /* function exit code */
8543  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
8544  goto __pyx_L0;
8545  __pyx_L1_error:;
8546  __Pyx_XDECREF(__pyx_t_3);
8547  __Pyx_XDECREF(__pyx_t_4);
8548  __Pyx_XDECREF(__pyx_t_5);
8549  __Pyx_XDECREF(__pyx_t_9);
8550  __Pyx_XDECREF(__pyx_t_10);
8551  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addTriangleMeshFromShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
8552  __pyx_r = NULL;
8553  __pyx_L0:;
8554  __Pyx_XDECREF(__pyx_v_vertices);
8555  __Pyx_XDECREF(__pyx_v_f_i);
8556  __Pyx_XDECREF(__pyx_v_facet);
8557  __Pyx_XDECREF(__pyx_v_f);
8558  __Pyx_XDECREF(__pyx_v_facets);
8559  __Pyx_XDECREF(__pyx_v_shape);
8560  __PYX_XDEC_MEMVIEW(&__pyx_v_pos, 1);
8561  __PYX_XDEC_MEMVIEW(&__pyx_v_rot, 1);
8562  __Pyx_XGIVEREF(__pyx_r);
8563  __Pyx_TraceReturn(__pyx_r, 0);
8564  __Pyx_RefNannyFinishContext();
8565  return __pyx_r;
8566 }
8567 
8568 /* "mbd/CouplingFSI.pyx":246
8569  * # sphereswept_thickness)
8570  *
8571  * def getTriangleMeshInfo(self): # <<<<<<<<<<<<<<
8572  * # vertices
8573  * cdef vector[ch.ChVector[double]] chpos = deref(self.thisptr.trimesh).getCoordsVertices()
8574  */
8575 
8576 /* Python wrapper */
8577 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9getTriangleMeshInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
8578 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_8getTriangleMeshInfo[] = "ProtChBody.getTriangleMeshInfo(self)";
8579 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_9getTriangleMeshInfo = {"getTriangleMeshInfo", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9getTriangleMeshInfo, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_8getTriangleMeshInfo};
8580 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9getTriangleMeshInfo(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
8581  PyObject *__pyx_r = 0;
8582  __Pyx_RefNannyDeclarations
8583  __Pyx_RefNannySetupContext("getTriangleMeshInfo (wrapper)", 0);
8584  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8getTriangleMeshInfo(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
8585 
8586  /* function exit code */
8587  __Pyx_RefNannyFinishContext();
8588  return __pyx_r;
8589 }
8590 
8591 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8getTriangleMeshInfo(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
8592  std::vector<ChVector<double> > __pyx_v_chpos;
8593  __Pyx_memviewslice __pyx_v_pos = { 0, 0, { 0 }, { 0 }, { 0 } };
8594  std::vector<ChVector<double> > ::size_type __pyx_v_i;
8595  std::vector<ChVector<int> > __pyx_v_chel_connect;
8596  __Pyx_memviewslice __pyx_v_el_connect = { 0, 0, { 0 }, { 0 }, { 0 } };
8597  PyObject *__pyx_r = NULL;
8598  __Pyx_TraceDeclarations
8599  __Pyx_RefNannyDeclarations
8600  PyObject *__pyx_t_1 = NULL;
8601  PyObject *__pyx_t_2 = NULL;
8602  PyObject *__pyx_t_3 = NULL;
8603  PyObject *__pyx_t_4 = NULL;
8604  __Pyx_memviewslice __pyx_t_5 = { 0, 0, { 0 }, { 0 }, { 0 } };
8605  std::vector<ChVector<double> > ::size_type __pyx_t_6;
8606  std::vector<ChVector<double> > ::size_type __pyx_t_7;
8607  std::vector<ChVector<double> > ::size_type __pyx_t_8;
8608  __Pyx_FakeReference<ChVector<double> > __pyx_t_9;
8609  std::vector<ChVector<double> > ::size_type __pyx_t_10;
8610  Py_ssize_t __pyx_t_11;
8611  int __pyx_t_12;
8612  __Pyx_FakeReference<ChVector<double> > __pyx_t_13;
8613  __Pyx_FakeReference<ChVector<double> > __pyx_t_14;
8614  PyObject *__pyx_t_15 = NULL;
8615  __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } };
8616  std::vector<ChVector<int> > ::size_type __pyx_t_17;
8617  std::vector<ChVector<int> > ::size_type __pyx_t_18;
8618  __Pyx_FakeReference<ChVector<int> > __pyx_t_19;
8619  __Pyx_FakeReference<ChVector<int> > __pyx_t_20;
8620  __Pyx_FakeReference<ChVector<int> > __pyx_t_21;
8621  int __pyx_lineno = 0;
8622  const char *__pyx_filename = NULL;
8623  int __pyx_clineno = 0;
8624  __Pyx_TraceFrameInit(__pyx_codeobj__9)
8625  __Pyx_RefNannySetupContext("getTriangleMeshInfo", 0);
8626  __Pyx_TraceCall("getTriangleMeshInfo", __pyx_f[0], 246, 0, __PYX_ERR(0, 246, __pyx_L1_error));
8627 
8628  /* "mbd/CouplingFSI.pyx":248
8629  * def getTriangleMeshInfo(self):
8630  * # vertices
8631  * cdef vector[ch.ChVector[double]] chpos = deref(self.thisptr.trimesh).getCoordsVertices() # <<<<<<<<<<<<<<
8632  * cdef double[:,:] pos = np.zeros((chpos.size(),3 ))
8633  * for i in range(chpos.size()):
8634  */
8635  __pyx_v_chpos = (*__pyx_v_self->thisptr->trimesh).getCoordsVertices();
8636 
8637  /* "mbd/CouplingFSI.pyx":249
8638  * # vertices
8639  * cdef vector[ch.ChVector[double]] chpos = deref(self.thisptr.trimesh).getCoordsVertices()
8640  * cdef double[:,:] pos = np.zeros((chpos.size(),3 )) # <<<<<<<<<<<<<<
8641  * for i in range(chpos.size()):
8642  * pos[i, 0] = chpos.at(i).x()
8643  */
8644  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
8645  __Pyx_GOTREF(__pyx_t_2);
8646  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
8647  __Pyx_GOTREF(__pyx_t_3);
8648  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8649  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_chpos.size()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
8650  __Pyx_GOTREF(__pyx_t_2);
8651  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
8652  __Pyx_GOTREF(__pyx_t_4);
8653  __Pyx_GIVEREF(__pyx_t_2);
8654  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
8655  __Pyx_INCREF(__pyx_int_3);
8656  __Pyx_GIVEREF(__pyx_int_3);
8657  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);
8658  __pyx_t_2 = 0;
8659  __pyx_t_2 = NULL;
8660  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
8661  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
8662  if (likely(__pyx_t_2)) {
8663  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
8664  __Pyx_INCREF(__pyx_t_2);
8665  __Pyx_INCREF(function);
8666  __Pyx_DECREF_SET(__pyx_t_3, function);
8667  }
8668  }
8669  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
8670  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
8671  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8672  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
8673  __Pyx_GOTREF(__pyx_t_1);
8674  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8675  __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 249, __pyx_L1_error)
8676  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8677  __pyx_v_pos = __pyx_t_5;
8678  __pyx_t_5.memview = NULL;
8679  __pyx_t_5.data = NULL;
8680 
8681  /* "mbd/CouplingFSI.pyx":250
8682  * cdef vector[ch.ChVector[double]] chpos = deref(self.thisptr.trimesh).getCoordsVertices()
8683  * cdef double[:,:] pos = np.zeros((chpos.size(),3 ))
8684  * for i in range(chpos.size()): # <<<<<<<<<<<<<<
8685  * pos[i, 0] = chpos.at(i).x()
8686  * pos[i, 1] = chpos.at(i).y()
8687  */
8688  __pyx_t_6 = __pyx_v_chpos.size();
8689  __pyx_t_7 = __pyx_t_6;
8690  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
8691  __pyx_v_i = __pyx_t_8;
8692 
8693  /* "mbd/CouplingFSI.pyx":251
8694  * cdef double[:,:] pos = np.zeros((chpos.size(),3 ))
8695  * for i in range(chpos.size()):
8696  * pos[i, 0] = chpos.at(i).x() # <<<<<<<<<<<<<<
8697  * pos[i, 1] = chpos.at(i).y()
8698  * pos[i, 2] = chpos.at(i).z()
8699  */
8700  try {
8701  __pyx_t_9 = __pyx_v_chpos.at(__pyx_v_i);
8702  } catch(...) {
8703  __Pyx_CppExn2PyErr();
8704  __PYX_ERR(0, 251, __pyx_L1_error)
8705  }
8706  __pyx_t_10 = __pyx_v_i;
8707  __pyx_t_11 = 0;
8708  __pyx_t_12 = -1;
8709  if (unlikely(__pyx_t_10 >= (size_t)__pyx_v_pos.shape[0])) __pyx_t_12 = 0;
8710  if (__pyx_t_11 < 0) {
8711  __pyx_t_11 += __pyx_v_pos.shape[1];
8712  if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
8713  } else if (unlikely(__pyx_t_11 >= __pyx_v_pos.shape[1])) __pyx_t_12 = 1;
8714  if (unlikely(__pyx_t_12 != -1)) {
8715  __Pyx_RaiseBufferIndexError(__pyx_t_12);
8716  __PYX_ERR(0, 251, __pyx_L1_error)
8717  }
8718  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pos.data + __pyx_t_10 * __pyx_v_pos.strides[0]) ) + __pyx_t_11 * __pyx_v_pos.strides[1]) )) = __pyx_t_9->x();
8719 
8720  /* "mbd/CouplingFSI.pyx":252
8721  * for i in range(chpos.size()):
8722  * pos[i, 0] = chpos.at(i).x()
8723  * pos[i, 1] = chpos.at(i).y() # <<<<<<<<<<<<<<
8724  * pos[i, 2] = chpos.at(i).z()
8725  * cdef vector[ch.ChVector[int]] chel_connect = deref(self.thisptr.trimesh).getIndicesVertexes()
8726  */
8727  try {
8728  __pyx_t_13 = __pyx_v_chpos.at(__pyx_v_i);
8729  } catch(...) {
8730  __Pyx_CppExn2PyErr();
8731  __PYX_ERR(0, 252, __pyx_L1_error)
8732  }
8733  __pyx_t_10 = __pyx_v_i;
8734  __pyx_t_11 = 1;
8735  __pyx_t_12 = -1;
8736  if (unlikely(__pyx_t_10 >= (size_t)__pyx_v_pos.shape[0])) __pyx_t_12 = 0;
8737  if (__pyx_t_11 < 0) {
8738  __pyx_t_11 += __pyx_v_pos.shape[1];
8739  if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
8740  } else if (unlikely(__pyx_t_11 >= __pyx_v_pos.shape[1])) __pyx_t_12 = 1;
8741  if (unlikely(__pyx_t_12 != -1)) {
8742  __Pyx_RaiseBufferIndexError(__pyx_t_12);
8743  __PYX_ERR(0, 252, __pyx_L1_error)
8744  }
8745  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pos.data + __pyx_t_10 * __pyx_v_pos.strides[0]) ) + __pyx_t_11 * __pyx_v_pos.strides[1]) )) = __pyx_t_13->y();
8746 
8747  /* "mbd/CouplingFSI.pyx":253
8748  * pos[i, 0] = chpos.at(i).x()
8749  * pos[i, 1] = chpos.at(i).y()
8750  * pos[i, 2] = chpos.at(i).z() # <<<<<<<<<<<<<<
8751  * cdef vector[ch.ChVector[int]] chel_connect = deref(self.thisptr.trimesh).getIndicesVertexes()
8752  * # connection of vertices
8753  */
8754  try {
8755  __pyx_t_14 = __pyx_v_chpos.at(__pyx_v_i);
8756  } catch(...) {
8757  __Pyx_CppExn2PyErr();
8758  __PYX_ERR(0, 253, __pyx_L1_error)
8759  }
8760  __pyx_t_10 = __pyx_v_i;
8761  __pyx_t_11 = 2;
8762  __pyx_t_12 = -1;
8763  if (unlikely(__pyx_t_10 >= (size_t)__pyx_v_pos.shape[0])) __pyx_t_12 = 0;
8764  if (__pyx_t_11 < 0) {
8765  __pyx_t_11 += __pyx_v_pos.shape[1];
8766  if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
8767  } else if (unlikely(__pyx_t_11 >= __pyx_v_pos.shape[1])) __pyx_t_12 = 1;
8768  if (unlikely(__pyx_t_12 != -1)) {
8769  __Pyx_RaiseBufferIndexError(__pyx_t_12);
8770  __PYX_ERR(0, 253, __pyx_L1_error)
8771  }
8772  *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_pos.data + __pyx_t_10 * __pyx_v_pos.strides[0]) ) + __pyx_t_11 * __pyx_v_pos.strides[1]) )) = __pyx_t_14->z();
8773  }
8774 
8775  /* "mbd/CouplingFSI.pyx":254
8776  * pos[i, 1] = chpos.at(i).y()
8777  * pos[i, 2] = chpos.at(i).z()
8778  * cdef vector[ch.ChVector[int]] chel_connect = deref(self.thisptr.trimesh).getIndicesVertexes() # <<<<<<<<<<<<<<
8779  * # connection of vertices
8780  * cdef int[:,:] el_connect = np.zeros((chel_connect.size(), 3), dtype=np.int32)
8781  */
8782  __pyx_v_chel_connect = (*__pyx_v_self->thisptr->trimesh).getIndicesVertexes();
8783 
8784  /* "mbd/CouplingFSI.pyx":256
8785  * cdef vector[ch.ChVector[int]] chel_connect = deref(self.thisptr.trimesh).getIndicesVertexes()
8786  * # connection of vertices
8787  * cdef int[:,:] el_connect = np.zeros((chel_connect.size(), 3), dtype=np.int32) # <<<<<<<<<<<<<<
8788  * for i in range(chel_connect.size()):
8789  * el_connect[i, 0] = int(chel_connect.at(i).x())
8790  */
8791  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
8792  __Pyx_GOTREF(__pyx_t_1);
8793  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 256, __pyx_L1_error)
8794  __Pyx_GOTREF(__pyx_t_3);
8795  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8796  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_chel_connect.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
8797  __Pyx_GOTREF(__pyx_t_1);
8798  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
8799  __Pyx_GOTREF(__pyx_t_4);
8800  __Pyx_GIVEREF(__pyx_t_1);
8801  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
8802  __Pyx_INCREF(__pyx_int_3);
8803  __Pyx_GIVEREF(__pyx_int_3);
8804  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);
8805  __pyx_t_1 = 0;
8806  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error)
8807  __Pyx_GOTREF(__pyx_t_1);
8808  __Pyx_GIVEREF(__pyx_t_4);
8809  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
8810  __pyx_t_4 = 0;
8811  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error)
8812  __Pyx_GOTREF(__pyx_t_4);
8813  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error)
8814  __Pyx_GOTREF(__pyx_t_2);
8815  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 256, __pyx_L1_error)
8816  __Pyx_GOTREF(__pyx_t_15);
8817  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
8818  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_15) < 0) __PYX_ERR(0, 256, __pyx_L1_error)
8819  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8820  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 256, __pyx_L1_error)
8821  __Pyx_GOTREF(__pyx_t_15);
8822  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
8823  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8824  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
8825  __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_t_15, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 256, __pyx_L1_error)
8826  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
8827  __pyx_v_el_connect = __pyx_t_16;
8828  __pyx_t_16.memview = NULL;
8829  __pyx_t_16.data = NULL;
8830 
8831  /* "mbd/CouplingFSI.pyx":257
8832  * # connection of vertices
8833  * cdef int[:,:] el_connect = np.zeros((chel_connect.size(), 3), dtype=np.int32)
8834  * for i in range(chel_connect.size()): # <<<<<<<<<<<<<<
8835  * el_connect[i, 0] = int(chel_connect.at(i).x())
8836  * el_connect[i, 1] = int(chel_connect.at(i).y())
8837  */
8838  __pyx_t_17 = __pyx_v_chel_connect.size();
8839  __pyx_t_18 = __pyx_t_17;
8840  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_18; __pyx_t_6+=1) {
8841  __pyx_v_i = __pyx_t_6;
8842 
8843  /* "mbd/CouplingFSI.pyx":258
8844  * cdef int[:,:] el_connect = np.zeros((chel_connect.size(), 3), dtype=np.int32)
8845  * for i in range(chel_connect.size()):
8846  * el_connect[i, 0] = int(chel_connect.at(i).x()) # <<<<<<<<<<<<<<
8847  * el_connect[i, 1] = int(chel_connect.at(i).y())
8848  * el_connect[i, 2] = int(chel_connect.at(i).z())
8849  */
8850  try {
8851  __pyx_t_19 = __pyx_v_chel_connect.at(__pyx_v_i);
8852  } catch(...) {
8853  __Pyx_CppExn2PyErr();
8854  __PYX_ERR(0, 258, __pyx_L1_error)
8855  }
8856  __pyx_t_7 = __pyx_v_i;
8857  __pyx_t_11 = 0;
8858  __pyx_t_12 = -1;
8859  if (unlikely(__pyx_t_7 >= (size_t)__pyx_v_el_connect.shape[0])) __pyx_t_12 = 0;
8860  if (__pyx_t_11 < 0) {
8861  __pyx_t_11 += __pyx_v_el_connect.shape[1];
8862  if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
8863  } else if (unlikely(__pyx_t_11 >= __pyx_v_el_connect.shape[1])) __pyx_t_12 = 1;
8864  if (unlikely(__pyx_t_12 != -1)) {
8865  __Pyx_RaiseBufferIndexError(__pyx_t_12);
8866  __PYX_ERR(0, 258, __pyx_L1_error)
8867  }
8868  *((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_el_connect.data + __pyx_t_7 * __pyx_v_el_connect.strides[0]) ) + __pyx_t_11 * __pyx_v_el_connect.strides[1]) )) = ((int)__pyx_t_19->x());
8869 
8870  /* "mbd/CouplingFSI.pyx":259
8871  * for i in range(chel_connect.size()):
8872  * el_connect[i, 0] = int(chel_connect.at(i).x())
8873  * el_connect[i, 1] = int(chel_connect.at(i).y()) # <<<<<<<<<<<<<<
8874  * el_connect[i, 2] = int(chel_connect.at(i).z())
8875  * return pos, el_connect
8876  */
8877  try {
8878  __pyx_t_20 = __pyx_v_chel_connect.at(__pyx_v_i);
8879  } catch(...) {
8880  __Pyx_CppExn2PyErr();
8881  __PYX_ERR(0, 259, __pyx_L1_error)
8882  }
8883  __pyx_t_7 = __pyx_v_i;
8884  __pyx_t_11 = 1;
8885  __pyx_t_12 = -1;
8886  if (unlikely(__pyx_t_7 >= (size_t)__pyx_v_el_connect.shape[0])) __pyx_t_12 = 0;
8887  if (__pyx_t_11 < 0) {
8888  __pyx_t_11 += __pyx_v_el_connect.shape[1];
8889  if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
8890  } else if (unlikely(__pyx_t_11 >= __pyx_v_el_connect.shape[1])) __pyx_t_12 = 1;
8891  if (unlikely(__pyx_t_12 != -1)) {
8892  __Pyx_RaiseBufferIndexError(__pyx_t_12);
8893  __PYX_ERR(0, 259, __pyx_L1_error)
8894  }
8895  *((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_el_connect.data + __pyx_t_7 * __pyx_v_el_connect.strides[0]) ) + __pyx_t_11 * __pyx_v_el_connect.strides[1]) )) = ((int)__pyx_t_20->y());
8896 
8897  /* "mbd/CouplingFSI.pyx":260
8898  * el_connect[i, 0] = int(chel_connect.at(i).x())
8899  * el_connect[i, 1] = int(chel_connect.at(i).y())
8900  * el_connect[i, 2] = int(chel_connect.at(i).z()) # <<<<<<<<<<<<<<
8901  * return pos, el_connect
8902  *
8903  */
8904  try {
8905  __pyx_t_21 = __pyx_v_chel_connect.at(__pyx_v_i);
8906  } catch(...) {
8907  __Pyx_CppExn2PyErr();
8908  __PYX_ERR(0, 260, __pyx_L1_error)
8909  }
8910  __pyx_t_7 = __pyx_v_i;
8911  __pyx_t_11 = 2;
8912  __pyx_t_12 = -1;
8913  if (unlikely(__pyx_t_7 >= (size_t)__pyx_v_el_connect.shape[0])) __pyx_t_12 = 0;
8914  if (__pyx_t_11 < 0) {
8915  __pyx_t_11 += __pyx_v_el_connect.shape[1];
8916  if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 1;
8917  } else if (unlikely(__pyx_t_11 >= __pyx_v_el_connect.shape[1])) __pyx_t_12 = 1;
8918  if (unlikely(__pyx_t_12 != -1)) {
8919  __Pyx_RaiseBufferIndexError(__pyx_t_12);
8920  __PYX_ERR(0, 260, __pyx_L1_error)
8921  }
8922  *((int *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_el_connect.data + __pyx_t_7 * __pyx_v_el_connect.strides[0]) ) + __pyx_t_11 * __pyx_v_el_connect.strides[1]) )) = ((int)__pyx_t_21->z());
8923  }
8924 
8925  /* "mbd/CouplingFSI.pyx":261
8926  * el_connect[i, 1] = int(chel_connect.at(i).y())
8927  * el_connect[i, 2] = int(chel_connect.at(i).z())
8928  * return pos, el_connect # <<<<<<<<<<<<<<
8929  *
8930  * def setCollisionOptions(self,
8931  */
8932  __Pyx_XDECREF(__pyx_r);
8933  __pyx_t_15 = __pyx_memoryview_fromslice(__pyx_v_pos, 2, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 261, __pyx_L1_error)
8934  __Pyx_GOTREF(__pyx_t_15);
8935  __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_el_connect, 2, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
8936  __Pyx_GOTREF(__pyx_t_4);
8937  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error)
8938  __Pyx_GOTREF(__pyx_t_1);
8939  __Pyx_GIVEREF(__pyx_t_15);
8940  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15);
8941  __Pyx_GIVEREF(__pyx_t_4);
8942  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
8943  __pyx_t_15 = 0;
8944  __pyx_t_4 = 0;
8945  __pyx_r = __pyx_t_1;
8946  __pyx_t_1 = 0;
8947  goto __pyx_L0;
8948 
8949  /* "mbd/CouplingFSI.pyx":246
8950  * # sphereswept_thickness)
8951  *
8952  * def getTriangleMeshInfo(self): # <<<<<<<<<<<<<<
8953  * # vertices
8954  * cdef vector[ch.ChVector[double]] chpos = deref(self.thisptr.trimesh).getCoordsVertices()
8955  */
8956 
8957  /* function exit code */
8958  __pyx_L1_error:;
8959  __Pyx_XDECREF(__pyx_t_1);
8960  __Pyx_XDECREF(__pyx_t_2);
8961  __Pyx_XDECREF(__pyx_t_3);
8962  __Pyx_XDECREF(__pyx_t_4);
8963  __PYX_XDEC_MEMVIEW(&__pyx_t_5, 1);
8964  __Pyx_XDECREF(__pyx_t_15);
8965  __PYX_XDEC_MEMVIEW(&__pyx_t_16, 1);
8966  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getTriangleMeshInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
8967  __pyx_r = NULL;
8968  __pyx_L0:;
8969  __PYX_XDEC_MEMVIEW(&__pyx_v_pos, 1);
8970  __PYX_XDEC_MEMVIEW(&__pyx_v_el_connect, 1);
8971  __Pyx_XGIVEREF(__pyx_r);
8972  __Pyx_TraceReturn(__pyx_r, 0);
8973  __Pyx_RefNannyFinishContext();
8974  return __pyx_r;
8975 }
8976 
8977 /* "mbd/CouplingFSI.pyx":263
8978  * return pos, el_connect
8979  *
8980  * def setCollisionOptions(self, # <<<<<<<<<<<<<<
8981  * double envelope=0.001,
8982  * double margin=0.0005,
8983  */
8984 
8985 /* Python wrapper */
8986 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11setCollisionOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
8987 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_10setCollisionOptions[] = "ProtChBody.setCollisionOptions(self, double envelope=0.001, double margin=0.0005, bool collide=True)";
8988 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_11setCollisionOptions = {"setCollisionOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11setCollisionOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_10setCollisionOptions};
8989 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11setCollisionOptions(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
8990  double __pyx_v_envelope;
8991  double __pyx_v_margin;
8992  bool __pyx_v_collide;
8993  int __pyx_lineno = 0;
8994  const char *__pyx_filename = NULL;
8995  int __pyx_clineno = 0;
8996  PyObject *__pyx_r = 0;
8997  __Pyx_RefNannyDeclarations
8998  __Pyx_RefNannySetupContext("setCollisionOptions (wrapper)", 0);
8999  {
9000  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_envelope,&__pyx_n_s_margin,&__pyx_n_s_collide,0};
9001  PyObject* values[3] = {0,0,0};
9002  if (unlikely(__pyx_kwds)) {
9003  Py_ssize_t kw_args;
9004  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9005  switch (pos_args) {
9006  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9007  CYTHON_FALLTHROUGH;
9008  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9009  CYTHON_FALLTHROUGH;
9010  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9011  CYTHON_FALLTHROUGH;
9012  case 0: break;
9013  default: goto __pyx_L5_argtuple_error;
9014  }
9015  kw_args = PyDict_Size(__pyx_kwds);
9016  switch (pos_args) {
9017  case 0:
9018  if (kw_args > 0) {
9019  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_envelope);
9020  if (value) { values[0] = value; kw_args--; }
9021  }
9022  CYTHON_FALLTHROUGH;
9023  case 1:
9024  if (kw_args > 0) {
9025  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_margin);
9026  if (value) { values[1] = value; kw_args--; }
9027  }
9028  CYTHON_FALLTHROUGH;
9029  case 2:
9030  if (kw_args > 0) {
9031  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_collide);
9032  if (value) { values[2] = value; kw_args--; }
9033  }
9034  }
9035  if (unlikely(kw_args > 0)) {
9036  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCollisionOptions") < 0)) __PYX_ERR(0, 263, __pyx_L3_error)
9037  }
9038  } else {
9039  switch (PyTuple_GET_SIZE(__pyx_args)) {
9040  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9041  CYTHON_FALLTHROUGH;
9042  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9043  CYTHON_FALLTHROUGH;
9044  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9045  CYTHON_FALLTHROUGH;
9046  case 0: break;
9047  default: goto __pyx_L5_argtuple_error;
9048  }
9049  }
9050  if (values[0]) {
9051  __pyx_v_envelope = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_envelope == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 264, __pyx_L3_error)
9052  } else {
9053  __pyx_v_envelope = ((double)0.001);
9054  }
9055  if (values[1]) {
9056  __pyx_v_margin = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_margin == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L3_error)
9057  } else {
9058  __pyx_v_margin = ((double)0.0005);
9059  }
9060  if (values[2]) {
9061  __pyx_v_collide = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_collide == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 266, __pyx_L3_error)
9062  } else {
9063 
9064  /* "mbd/CouplingFSI.pyx":266
9065  * double envelope=0.001,
9066  * double margin=0.0005,
9067  * bool collide=True): # <<<<<<<<<<<<<<
9068  * deref(self.thisptr.body).SetCollide(collide)
9069  * deref(deref(self.thisptr.body).GetCollisionModel()).SetEnvelope(envelope)
9070  */
9071  __pyx_v_collide = ((bool)1);
9072  }
9073  }
9074  goto __pyx_L4_argument_unpacking_done;
9075  __pyx_L5_argtuple_error:;
9076  __Pyx_RaiseArgtupleInvalid("setCollisionOptions", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 263, __pyx_L3_error)
9077  __pyx_L3_error:;
9078  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setCollisionOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
9079  __Pyx_RefNannyFinishContext();
9080  return NULL;
9081  __pyx_L4_argument_unpacking_done:;
9082  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10setCollisionOptions(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_envelope, __pyx_v_margin, __pyx_v_collide);
9083 
9084  /* "mbd/CouplingFSI.pyx":263
9085  * return pos, el_connect
9086  *
9087  * def setCollisionOptions(self, # <<<<<<<<<<<<<<
9088  * double envelope=0.001,
9089  * double margin=0.0005,
9090  */
9091 
9092  /* function exit code */
9093  __Pyx_RefNannyFinishContext();
9094  return __pyx_r;
9095 }
9096 
9097 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10setCollisionOptions(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_envelope, double __pyx_v_margin, bool __pyx_v_collide) {
9098  PyObject *__pyx_r = NULL;
9099  __Pyx_TraceDeclarations
9100  __Pyx_RefNannyDeclarations
9101  int __pyx_lineno = 0;
9102  const char *__pyx_filename = NULL;
9103  int __pyx_clineno = 0;
9104  __Pyx_TraceFrameInit(__pyx_codeobj__10)
9105  __Pyx_RefNannySetupContext("setCollisionOptions", 0);
9106  __Pyx_TraceCall("setCollisionOptions", __pyx_f[0], 263, 0, __PYX_ERR(0, 263, __pyx_L1_error));
9107 
9108  /* "mbd/CouplingFSI.pyx":267
9109  * double margin=0.0005,
9110  * bool collide=True):
9111  * deref(self.thisptr.body).SetCollide(collide) # <<<<<<<<<<<<<<
9112  * deref(deref(self.thisptr.body).GetCollisionModel()).SetEnvelope(envelope)
9113  * deref(deref(self.thisptr.body).GetCollisionModel()).SetSafeMargin(margin)
9114  */
9115  (*__pyx_v_self->thisptr->body).SetCollide(__pyx_v_collide);
9116 
9117  /* "mbd/CouplingFSI.pyx":268
9118  * bool collide=True):
9119  * deref(self.thisptr.body).SetCollide(collide)
9120  * deref(deref(self.thisptr.body).GetCollisionModel()).SetEnvelope(envelope) # <<<<<<<<<<<<<<
9121  * deref(deref(self.thisptr.body).GetCollisionModel()).SetSafeMargin(margin)
9122  *
9123  */
9124  (*(*__pyx_v_self->thisptr->body).GetCollisionModel()).SetEnvelope(__pyx_v_envelope);
9125 
9126  /* "mbd/CouplingFSI.pyx":269
9127  * deref(self.thisptr.body).SetCollide(collide)
9128  * deref(deref(self.thisptr.body).GetCollisionModel()).SetEnvelope(envelope)
9129  * deref(deref(self.thisptr.body).GetCollisionModel()).SetSafeMargin(margin) # <<<<<<<<<<<<<<
9130  *
9131  * def setBoundaryFlags(self, flags):
9132  */
9133  (*(*__pyx_v_self->thisptr->body).GetCollisionModel()).SetSafeMargin(__pyx_v_margin);
9134 
9135  /* "mbd/CouplingFSI.pyx":263
9136  * return pos, el_connect
9137  *
9138  * def setCollisionOptions(self, # <<<<<<<<<<<<<<
9139  * double envelope=0.001,
9140  * double margin=0.0005,
9141  */
9142 
9143  /* function exit code */
9144  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9145  goto __pyx_L0;
9146  __pyx_L1_error:;
9147  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setCollisionOptions", __pyx_clineno, __pyx_lineno, __pyx_filename);
9148  __pyx_r = NULL;
9149  __pyx_L0:;
9150  __Pyx_XGIVEREF(__pyx_r);
9151  __Pyx_TraceReturn(__pyx_r, 0);
9152  __Pyx_RefNannyFinishContext();
9153  return __pyx_r;
9154 }
9155 
9156 /* "mbd/CouplingFSI.pyx":271
9157  * deref(deref(self.thisptr.body).GetCollisionModel()).SetSafeMargin(margin)
9158  *
9159  * def setBoundaryFlags(self, flags): # <<<<<<<<<<<<<<
9160  * """Sets the flags of the boundaries of the body
9161  * numbers must be gloabal (from domain.segmentFlags or
9162  */
9163 
9164 /* Python wrapper */
9165 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13setBoundaryFlags(PyObject *__pyx_v_self, PyObject *__pyx_v_flags); /*proto*/
9166 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_12setBoundaryFlags[] = "ProtChBody.setBoundaryFlags(self, flags)\nSets the flags of the boundaries of the body\n numbers must be gloabal (from domain.segmentFlags or\n domain.facetFlags).\n\n Parameters\n ----------\n flags: array_like\n list of flags that belong to this body\n ";
9167 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_13setBoundaryFlags = {"setBoundaryFlags", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13setBoundaryFlags, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_12setBoundaryFlags};
9168 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13setBoundaryFlags(PyObject *__pyx_v_self, PyObject *__pyx_v_flags) {
9169  PyObject *__pyx_r = 0;
9170  __Pyx_RefNannyDeclarations
9171  __Pyx_RefNannySetupContext("setBoundaryFlags (wrapper)", 0);
9172  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12setBoundaryFlags(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_flags));
9173 
9174  /* function exit code */
9175  __Pyx_RefNannyFinishContext();
9176  return __pyx_r;
9177 }
9178 
9179 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12setBoundaryFlags(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_flags) {
9180  PyObject *__pyx_r = NULL;
9181  __Pyx_TraceDeclarations
9182  __Pyx_RefNannyDeclarations
9183  PyObject *__pyx_t_1 = NULL;
9184  PyObject *__pyx_t_2 = NULL;
9185  PyObject *__pyx_t_3 = NULL;
9186  int __pyx_t_4;
9187  PyObject *__pyx_t_5 = NULL;
9188  int __pyx_lineno = 0;
9189  const char *__pyx_filename = NULL;
9190  int __pyx_clineno = 0;
9191  __Pyx_TraceFrameInit(__pyx_codeobj__11)
9192  __Pyx_RefNannySetupContext("setBoundaryFlags", 0);
9193  __Pyx_TraceCall("setBoundaryFlags", __pyx_f[0], 271, 0, __PYX_ERR(0, 271, __pyx_L1_error));
9194 
9195  /* "mbd/CouplingFSI.pyx":281
9196  * list of flags that belong to this body
9197  * """
9198  * self.boundaryFlags = np.array(flags, 'i') # <<<<<<<<<<<<<<
9199  *
9200  * def setIBM(self, useIBM=True, radiusIBM=0., sdfIBM=None):
9201  */
9202  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
9203  __Pyx_GOTREF(__pyx_t_2);
9204  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 281, __pyx_L1_error)
9205  __Pyx_GOTREF(__pyx_t_3);
9206  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9207  __pyx_t_2 = NULL;
9208  __pyx_t_4 = 0;
9209  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9210  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9211  if (likely(__pyx_t_2)) {
9212  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9213  __Pyx_INCREF(__pyx_t_2);
9214  __Pyx_INCREF(function);
9215  __Pyx_DECREF_SET(__pyx_t_3, function);
9216  __pyx_t_4 = 1;
9217  }
9218  }
9219  #if CYTHON_FAST_PYCALL
9220  if (PyFunction_Check(__pyx_t_3)) {
9221  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_flags, __pyx_n_s_i};
9222  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
9223  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9224  __Pyx_GOTREF(__pyx_t_1);
9225  } else
9226  #endif
9227  #if CYTHON_FAST_PYCCALL
9228  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
9229  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_flags, __pyx_n_s_i};
9230  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
9231  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9232  __Pyx_GOTREF(__pyx_t_1);
9233  } else
9234  #endif
9235  {
9236  __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 281, __pyx_L1_error)
9237  __Pyx_GOTREF(__pyx_t_5);
9238  if (__pyx_t_2) {
9239  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
9240  }
9241  __Pyx_INCREF(__pyx_v_flags);
9242  __Pyx_GIVEREF(__pyx_v_flags);
9243  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_flags);
9244  __Pyx_INCREF(__pyx_n_s_i);
9245  __Pyx_GIVEREF(__pyx_n_s_i);
9246  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_n_s_i);
9247  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
9248  __Pyx_GOTREF(__pyx_t_1);
9249  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
9250  }
9251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9252  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 281, __pyx_L1_error)
9253  __Pyx_GIVEREF(__pyx_t_1);
9254  __Pyx_GOTREF(__pyx_v_self->boundaryFlags);
9255  __Pyx_DECREF(((PyObject *)__pyx_v_self->boundaryFlags));
9256  __pyx_v_self->boundaryFlags = ((PyArrayObject *)__pyx_t_1);
9257  __pyx_t_1 = 0;
9258 
9259  /* "mbd/CouplingFSI.pyx":271
9260  * deref(deref(self.thisptr.body).GetCollisionModel()).SetSafeMargin(margin)
9261  *
9262  * def setBoundaryFlags(self, flags): # <<<<<<<<<<<<<<
9263  * """Sets the flags of the boundaries of the body
9264  * numbers must be gloabal (from domain.segmentFlags or
9265  */
9266 
9267  /* function exit code */
9268  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9269  goto __pyx_L0;
9270  __pyx_L1_error:;
9271  __Pyx_XDECREF(__pyx_t_1);
9272  __Pyx_XDECREF(__pyx_t_2);
9273  __Pyx_XDECREF(__pyx_t_3);
9274  __Pyx_XDECREF(__pyx_t_5);
9275  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setBoundaryFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
9276  __pyx_r = NULL;
9277  __pyx_L0:;
9278  __Pyx_XGIVEREF(__pyx_r);
9279  __Pyx_TraceReturn(__pyx_r, 0);
9280  __Pyx_RefNannyFinishContext();
9281  return __pyx_r;
9282 }
9283 
9284 /* "mbd/CouplingFSI.pyx":283
9285  * self.boundaryFlags = np.array(flags, 'i')
9286  *
9287  * def setIBM(self, useIBM=True, radiusIBM=0., sdfIBM=None): # <<<<<<<<<<<<<<
9288  * """Sets IBM mode for retrieving fluid forces
9289  *
9290  */
9291 
9292 /* Python wrapper */
9293 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15setIBM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9294 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_14setIBM[] = "ProtChBody.setIBM(self, useIBM=True, radiusIBM=0., sdfIBM=None)\nSets IBM mode for retrieving fluid forces\n\n Parameters\n ----------\n useIBM: bool\n set if IBM should be used\n radiusIBM: double\n radius of the particle for IBM\n radiusIBM: double\n sdf relative to barycentre of body for IBM\n ";
9295 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_15setIBM = {"setIBM", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15setIBM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_14setIBM};
9296 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15setIBM(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9297  PyObject *__pyx_v_useIBM = 0;
9298  PyObject *__pyx_v_radiusIBM = 0;
9299  PyObject *__pyx_v_sdfIBM = 0;
9300  int __pyx_lineno = 0;
9301  const char *__pyx_filename = NULL;
9302  int __pyx_clineno = 0;
9303  PyObject *__pyx_r = 0;
9304  __Pyx_RefNannyDeclarations
9305  __Pyx_RefNannySetupContext("setIBM (wrapper)", 0);
9306  {
9307  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_useIBM,&__pyx_n_s_radiusIBM,&__pyx_n_s_sdfIBM,0};
9308  PyObject* values[3] = {0,0,0};
9309  values[0] = ((PyObject *)Py_True);
9310  values[1] = ((PyObject *)__pyx_float_0_);
9311  values[2] = ((PyObject *)Py_None);
9312  if (unlikely(__pyx_kwds)) {
9313  Py_ssize_t kw_args;
9314  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9315  switch (pos_args) {
9316  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9317  CYTHON_FALLTHROUGH;
9318  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9319  CYTHON_FALLTHROUGH;
9320  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9321  CYTHON_FALLTHROUGH;
9322  case 0: break;
9323  default: goto __pyx_L5_argtuple_error;
9324  }
9325  kw_args = PyDict_Size(__pyx_kwds);
9326  switch (pos_args) {
9327  case 0:
9328  if (kw_args > 0) {
9329  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_useIBM);
9330  if (value) { values[0] = value; kw_args--; }
9331  }
9332  CYTHON_FALLTHROUGH;
9333  case 1:
9334  if (kw_args > 0) {
9335  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radiusIBM);
9336  if (value) { values[1] = value; kw_args--; }
9337  }
9338  CYTHON_FALLTHROUGH;
9339  case 2:
9340  if (kw_args > 0) {
9341  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sdfIBM);
9342  if (value) { values[2] = value; kw_args--; }
9343  }
9344  }
9345  if (unlikely(kw_args > 0)) {
9346  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setIBM") < 0)) __PYX_ERR(0, 283, __pyx_L3_error)
9347  }
9348  } else {
9349  switch (PyTuple_GET_SIZE(__pyx_args)) {
9350  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9351  CYTHON_FALLTHROUGH;
9352  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9353  CYTHON_FALLTHROUGH;
9354  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9355  CYTHON_FALLTHROUGH;
9356  case 0: break;
9357  default: goto __pyx_L5_argtuple_error;
9358  }
9359  }
9360  __pyx_v_useIBM = values[0];
9361  __pyx_v_radiusIBM = values[1];
9362  __pyx_v_sdfIBM = values[2];
9363  }
9364  goto __pyx_L4_argument_unpacking_done;
9365  __pyx_L5_argtuple_error:;
9366  __Pyx_RaiseArgtupleInvalid("setIBM", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 283, __pyx_L3_error)
9367  __pyx_L3_error:;
9368  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setIBM", __pyx_clineno, __pyx_lineno, __pyx_filename);
9369  __Pyx_RefNannyFinishContext();
9370  return NULL;
9371  __pyx_L4_argument_unpacking_done:;
9372  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14setIBM(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_useIBM, __pyx_v_radiusIBM, __pyx_v_sdfIBM);
9373 
9374  /* function exit code */
9375  __Pyx_RefNannyFinishContext();
9376  return __pyx_r;
9377 }
9378 
9379 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14setIBM(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_useIBM, PyObject *__pyx_v_radiusIBM, PyObject *__pyx_v_sdfIBM) {
9380  PyObject *__pyx_r = NULL;
9381  __Pyx_TraceDeclarations
9382  __Pyx_RefNannyDeclarations
9383  bool __pyx_t_1;
9384  double __pyx_t_2;
9385  int __pyx_lineno = 0;
9386  const char *__pyx_filename = NULL;
9387  int __pyx_clineno = 0;
9388  __Pyx_TraceFrameInit(__pyx_codeobj__12)
9389  __Pyx_RefNannySetupContext("setIBM", 0);
9390  __Pyx_TraceCall("setIBM", __pyx_f[0], 283, 0, __PYX_ERR(0, 283, __pyx_L1_error));
9391 
9392  /* "mbd/CouplingFSI.pyx":295
9393  * sdf relative to barycentre of body for IBM
9394  * """
9395  * self.useIBM = useIBM # <<<<<<<<<<<<<<
9396  * self.radiusIBM = radiusIBM
9397  * self.sdfIBM = sdfIBM
9398  */
9399  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_useIBM); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error)
9400  __pyx_v_self->useIBM = __pyx_t_1;
9401 
9402  /* "mbd/CouplingFSI.pyx":296
9403  * """
9404  * self.useIBM = useIBM
9405  * self.radiusIBM = radiusIBM # <<<<<<<<<<<<<<
9406  * self.sdfIBM = sdfIBM
9407  *
9408  */
9409  __pyx_t_2 = __pyx_PyFloat_AsDouble(__pyx_v_radiusIBM); if (unlikely((__pyx_t_2 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error)
9410  __pyx_v_self->radiusIBM = __pyx_t_2;
9411 
9412  /* "mbd/CouplingFSI.pyx":297
9413  * self.useIBM = useIBM
9414  * self.radiusIBM = radiusIBM
9415  * self.sdfIBM = sdfIBM # <<<<<<<<<<<<<<
9416  *
9417  * def setWidth2D(self, width):
9418  */
9419  __Pyx_INCREF(__pyx_v_sdfIBM);
9420  __Pyx_GIVEREF(__pyx_v_sdfIBM);
9421  __Pyx_GOTREF(__pyx_v_self->sdfIBM);
9422  __Pyx_DECREF(__pyx_v_self->sdfIBM);
9423  __pyx_v_self->sdfIBM = __pyx_v_sdfIBM;
9424 
9425  /* "mbd/CouplingFSI.pyx":283
9426  * self.boundaryFlags = np.array(flags, 'i')
9427  *
9428  * def setIBM(self, useIBM=True, radiusIBM=0., sdfIBM=None): # <<<<<<<<<<<<<<
9429  * """Sets IBM mode for retrieving fluid forces
9430  *
9431  */
9432 
9433  /* function exit code */
9434  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9435  goto __pyx_L0;
9436  __pyx_L1_error:;
9437  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setIBM", __pyx_clineno, __pyx_lineno, __pyx_filename);
9438  __pyx_r = NULL;
9439  __pyx_L0:;
9440  __Pyx_XGIVEREF(__pyx_r);
9441  __Pyx_TraceReturn(__pyx_r, 0);
9442  __Pyx_RefNannyFinishContext();
9443  return __pyx_r;
9444 }
9445 
9446 /* "mbd/CouplingFSI.pyx":299
9447  * self.sdfIBM = sdfIBM
9448  *
9449  * def setWidth2D(self, width): # <<<<<<<<<<<<<<
9450  * """Sets width of 2D body (for forces and moments calculation)
9451  *
9452  */
9453 
9454 /* Python wrapper */
9455 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17setWidth2D(PyObject *__pyx_v_self, PyObject *__pyx_v_width); /*proto*/
9456 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_16setWidth2D[] = "ProtChBody.setWidth2D(self, width)\nSets width of 2D body (for forces and moments calculation)\n\n Parameters\n ----------\n width: float\n width of the body\n ";
9457 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_17setWidth2D = {"setWidth2D", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17setWidth2D, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_16setWidth2D};
9458 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17setWidth2D(PyObject *__pyx_v_self, PyObject *__pyx_v_width) {
9459  PyObject *__pyx_r = 0;
9460  __Pyx_RefNannyDeclarations
9461  __Pyx_RefNannySetupContext("setWidth2D (wrapper)", 0);
9462  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16setWidth2D(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_width));
9463 
9464  /* function exit code */
9465  __Pyx_RefNannyFinishContext();
9466  return __pyx_r;
9467 }
9468 
9469 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16setWidth2D(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_width) {
9470  PyObject *__pyx_r = NULL;
9471  __Pyx_TraceDeclarations
9472  __Pyx_RefNannyDeclarations
9473  double __pyx_t_1;
9474  int __pyx_lineno = 0;
9475  const char *__pyx_filename = NULL;
9476  int __pyx_clineno = 0;
9477  __Pyx_TraceFrameInit(__pyx_codeobj__13)
9478  __Pyx_RefNannySetupContext("setWidth2D", 0);
9479  __Pyx_TraceCall("setWidth2D", __pyx_f[0], 299, 0, __PYX_ERR(0, 299, __pyx_L1_error));
9480 
9481  /* "mbd/CouplingFSI.pyx":307
9482  * width of the body
9483  * """
9484  * self.width_2D = width # <<<<<<<<<<<<<<
9485  *
9486  * def attachAuxiliaryVariables(self,avDict):
9487  */
9488  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_width); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 307, __pyx_L1_error)
9489  __pyx_v_self->width_2D = __pyx_t_1;
9490 
9491  /* "mbd/CouplingFSI.pyx":299
9492  * self.sdfIBM = sdfIBM
9493  *
9494  * def setWidth2D(self, width): # <<<<<<<<<<<<<<
9495  * """Sets width of 2D body (for forces and moments calculation)
9496  *
9497  */
9498 
9499  /* function exit code */
9500  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9501  goto __pyx_L0;
9502  __pyx_L1_error:;
9503  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setWidth2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
9504  __pyx_r = NULL;
9505  __pyx_L0:;
9506  __Pyx_XGIVEREF(__pyx_r);
9507  __Pyx_TraceReturn(__pyx_r, 0);
9508  __Pyx_RefNannyFinishContext();
9509  return __pyx_r;
9510 }
9511 
9512 /* "mbd/CouplingFSI.pyx":309
9513  * self.width_2D = width
9514  *
9515  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
9516  * pass
9517  *
9518  */
9519 
9520 /* Python wrapper */
9521 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19attachAuxiliaryVariables(PyObject *__pyx_v_self, PyObject *__pyx_v_avDict); /*proto*/
9522 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_18attachAuxiliaryVariables[] = "ProtChBody.attachAuxiliaryVariables(self, avDict)";
9523 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_19attachAuxiliaryVariables = {"attachAuxiliaryVariables", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19attachAuxiliaryVariables, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_18attachAuxiliaryVariables};
9524 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19attachAuxiliaryVariables(PyObject *__pyx_v_self, PyObject *__pyx_v_avDict) {
9525  PyObject *__pyx_r = 0;
9526  __Pyx_RefNannyDeclarations
9527  __Pyx_RefNannySetupContext("attachAuxiliaryVariables (wrapper)", 0);
9528  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18attachAuxiliaryVariables(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_avDict));
9529 
9530  /* function exit code */
9531  __Pyx_RefNannyFinishContext();
9532  return __pyx_r;
9533 }
9534 
9535 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18attachAuxiliaryVariables(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_avDict) {
9536  PyObject *__pyx_r = NULL;
9537  __Pyx_TraceDeclarations
9538  __Pyx_RefNannyDeclarations
9539  int __pyx_lineno = 0;
9540  const char *__pyx_filename = NULL;
9541  int __pyx_clineno = 0;
9542  __Pyx_TraceFrameInit(__pyx_codeobj__14)
9543  __Pyx_RefNannySetupContext("attachAuxiliaryVariables", 0);
9544  __Pyx_TraceCall("attachAuxiliaryVariables", __pyx_f[0], 309, 0, __PYX_ERR(0, 309, __pyx_L1_error));
9545 
9546  /* function exit code */
9547  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9548  goto __pyx_L0;
9549  __pyx_L1_error:;
9550  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.attachAuxiliaryVariables", __pyx_clineno, __pyx_lineno, __pyx_filename);
9551  __pyx_r = NULL;
9552  __pyx_L0:;
9553  __Pyx_XGIVEREF(__pyx_r);
9554  __Pyx_TraceReturn(__pyx_r, 0);
9555  __Pyx_RefNannyFinishContext();
9556  return __pyx_r;
9557 }
9558 
9559 /* "mbd/CouplingFSI.pyx":312
9560  * pass
9561  *
9562  * def setInitialRot(self, rot): # <<<<<<<<<<<<<<
9563  * cdef np.ndarray zeros = np.zeros(3)
9564  * self.rotation_init = rot
9565  */
9566 
9567 /* Python wrapper */
9568 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21setInitialRot(PyObject *__pyx_v_self, PyObject *__pyx_v_rot); /*proto*/
9569 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_20setInitialRot[] = "ProtChBody.setInitialRot(self, rot)";
9570 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_21setInitialRot = {"setInitialRot", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21setInitialRot, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_20setInitialRot};
9571 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21setInitialRot(PyObject *__pyx_v_self, PyObject *__pyx_v_rot) {
9572  PyObject *__pyx_r = 0;
9573  __Pyx_RefNannyDeclarations
9574  __Pyx_RefNannySetupContext("setInitialRot (wrapper)", 0);
9575  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_20setInitialRot(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_rot));
9576 
9577  /* function exit code */
9578  __Pyx_RefNannyFinishContext();
9579  return __pyx_r;
9580 }
9581 
9582 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_20setInitialRot(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_rot) {
9583  PyArrayObject *__pyx_v_zeros = 0;
9584  PyObject *__pyx_v_new_quat = NULL;
9585  PyObject *__pyx_r = NULL;
9586  __Pyx_TraceDeclarations
9587  __Pyx_RefNannyDeclarations
9588  PyObject *__pyx_t_1 = NULL;
9589  PyObject *__pyx_t_2 = NULL;
9590  PyObject *__pyx_t_3 = NULL;
9591  int __pyx_t_4;
9592  int __pyx_t_5;
9593  PyObject *__pyx_t_6 = NULL;
9594  PyObject *__pyx_t_7 = NULL;
9595  PyObject *__pyx_t_8 = NULL;
9596  PyObject *__pyx_t_9 = NULL;
9597  int __pyx_t_10;
9598  PyObject *__pyx_t_11 = NULL;
9599  int __pyx_lineno = 0;
9600  const char *__pyx_filename = NULL;
9601  int __pyx_clineno = 0;
9602  __Pyx_TraceFrameInit(__pyx_codeobj__15)
9603  __Pyx_RefNannySetupContext("setInitialRot", 0);
9604  __Pyx_TraceCall("setInitialRot", __pyx_f[0], 312, 0, __PYX_ERR(0, 312, __pyx_L1_error));
9605 
9606  /* "mbd/CouplingFSI.pyx":313
9607  *
9608  * def setInitialRot(self, rot):
9609  * cdef np.ndarray zeros = np.zeros(3) # <<<<<<<<<<<<<<
9610  * self.rotation_init = rot
9611  * self.thisptr.prestep(<double*> zeros.data,
9612  */
9613  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 313, __pyx_L1_error)
9614  __Pyx_GOTREF(__pyx_t_2);
9615  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
9616  __Pyx_GOTREF(__pyx_t_3);
9617  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9618  __pyx_t_2 = NULL;
9619  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9620  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9621  if (likely(__pyx_t_2)) {
9622  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9623  __Pyx_INCREF(__pyx_t_2);
9624  __Pyx_INCREF(function);
9625  __Pyx_DECREF_SET(__pyx_t_3, function);
9626  }
9627  }
9628  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_3);
9629  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9630  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error)
9631  __Pyx_GOTREF(__pyx_t_1);
9632  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9633  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 313, __pyx_L1_error)
9634  __pyx_v_zeros = ((PyArrayObject *)__pyx_t_1);
9635  __pyx_t_1 = 0;
9636 
9637  /* "mbd/CouplingFSI.pyx":314
9638  * def setInitialRot(self, rot):
9639  * cdef np.ndarray zeros = np.zeros(3)
9640  * self.rotation_init = rot # <<<<<<<<<<<<<<
9641  * self.thisptr.prestep(<double*> zeros.data,
9642  * <double*> zeros.data)
9643  */
9644  if (!(likely(((__pyx_v_rot) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_rot, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 314, __pyx_L1_error)
9645  __pyx_t_1 = __pyx_v_rot;
9646  __Pyx_INCREF(__pyx_t_1);
9647  __Pyx_GIVEREF(__pyx_t_1);
9648  __Pyx_GOTREF(__pyx_v_self->rotation_init);
9649  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotation_init));
9650  __pyx_v_self->rotation_init = ((PyArrayObject *)__pyx_t_1);
9651  __pyx_t_1 = 0;
9652 
9653  /* "mbd/CouplingFSI.pyx":315
9654  * cdef np.ndarray zeros = np.zeros(3)
9655  * self.rotation_init = rot
9656  * self.thisptr.prestep(<double*> zeros.data, # <<<<<<<<<<<<<<
9657  * <double*> zeros.data)
9658  * if self.rotation_init is not None:
9659  */
9660  __pyx_v_self->thisptr->prestep(((double *)__pyx_v_zeros->data), ((double *)__pyx_v_zeros->data));
9661 
9662  /* "mbd/CouplingFSI.pyx":317
9663  * self.thisptr.prestep(<double*> zeros.data,
9664  * <double*> zeros.data)
9665  * if self.rotation_init is not None: # <<<<<<<<<<<<<<
9666  * new_quat = chrono.ChQuaternionD(rot[0], rot[1], rot[2], rot[3])
9667  * self.ChBody.SetRot(new_quat)
9668  */
9669  __pyx_t_4 = (((PyObject *)__pyx_v_self->rotation_init) != Py_None);
9670  __pyx_t_5 = (__pyx_t_4 != 0);
9671  if (__pyx_t_5) {
9672 
9673  /* "mbd/CouplingFSI.pyx":318
9674  * <double*> zeros.data)
9675  * if self.rotation_init is not None:
9676  * new_quat = chrono.ChQuaternionD(rot[0], rot[1], rot[2], rot[3]) # <<<<<<<<<<<<<<
9677  * self.ChBody.SetRot(new_quat)
9678  * self.thisptr.poststep()
9679  */
9680  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_chrono); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
9681  __Pyx_GOTREF(__pyx_t_3);
9682  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ChQuaternionD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error)
9683  __Pyx_GOTREF(__pyx_t_2);
9684  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9685  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_rot, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L1_error)
9686  __Pyx_GOTREF(__pyx_t_3);
9687  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_rot, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 318, __pyx_L1_error)
9688  __Pyx_GOTREF(__pyx_t_6);
9689  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_rot, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 318, __pyx_L1_error)
9690  __Pyx_GOTREF(__pyx_t_7);
9691  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_rot, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 318, __pyx_L1_error)
9692  __Pyx_GOTREF(__pyx_t_8);
9693  __pyx_t_9 = NULL;
9694  __pyx_t_10 = 0;
9695  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
9696  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
9697  if (likely(__pyx_t_9)) {
9698  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9699  __Pyx_INCREF(__pyx_t_9);
9700  __Pyx_INCREF(function);
9701  __Pyx_DECREF_SET(__pyx_t_2, function);
9702  __pyx_t_10 = 1;
9703  }
9704  }
9705  #if CYTHON_FAST_PYCALL
9706  if (PyFunction_Check(__pyx_t_2)) {
9707  PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_t_3, __pyx_t_6, __pyx_t_7, __pyx_t_8};
9708  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
9709  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9710  __Pyx_GOTREF(__pyx_t_1);
9711  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9712  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9713  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9714  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9715  } else
9716  #endif
9717  #if CYTHON_FAST_PYCCALL
9718  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
9719  PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_t_3, __pyx_t_6, __pyx_t_7, __pyx_t_8};
9720  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 4+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
9721  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
9722  __Pyx_GOTREF(__pyx_t_1);
9723  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9724  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
9725  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
9726  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
9727  } else
9728  #endif
9729  {
9730  __pyx_t_11 = PyTuple_New(4+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 318, __pyx_L1_error)
9731  __Pyx_GOTREF(__pyx_t_11);
9732  if (__pyx_t_9) {
9733  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
9734  }
9735  __Pyx_GIVEREF(__pyx_t_3);
9736  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
9737  __Pyx_GIVEREF(__pyx_t_6);
9738  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_6);
9739  __Pyx_GIVEREF(__pyx_t_7);
9740  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_7);
9741  __Pyx_GIVEREF(__pyx_t_8);
9742  PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_8);
9743  __pyx_t_3 = 0;
9744  __pyx_t_6 = 0;
9745  __pyx_t_7 = 0;
9746  __pyx_t_8 = 0;
9747  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error)
9748  __Pyx_GOTREF(__pyx_t_1);
9749  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
9750  }
9751  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9752  __pyx_v_new_quat = __pyx_t_1;
9753  __pyx_t_1 = 0;
9754 
9755  /* "mbd/CouplingFSI.pyx":319
9756  * if self.rotation_init is not None:
9757  * new_quat = chrono.ChQuaternionD(rot[0], rot[1], rot[2], rot[3])
9758  * self.ChBody.SetRot(new_quat) # <<<<<<<<<<<<<<
9759  * self.thisptr.poststep()
9760  *
9761  */
9762  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetRot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error)
9763  __Pyx_GOTREF(__pyx_t_2);
9764  __pyx_t_11 = NULL;
9765  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
9766  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
9767  if (likely(__pyx_t_11)) {
9768  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
9769  __Pyx_INCREF(__pyx_t_11);
9770  __Pyx_INCREF(function);
9771  __Pyx_DECREF_SET(__pyx_t_2, function);
9772  }
9773  }
9774  __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_new_quat) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_new_quat);
9775  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
9776  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error)
9777  __Pyx_GOTREF(__pyx_t_1);
9778  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9779  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9780 
9781  /* "mbd/CouplingFSI.pyx":317
9782  * self.thisptr.prestep(<double*> zeros.data,
9783  * <double*> zeros.data)
9784  * if self.rotation_init is not None: # <<<<<<<<<<<<<<
9785  * new_quat = chrono.ChQuaternionD(rot[0], rot[1], rot[2], rot[3])
9786  * self.ChBody.SetRot(new_quat)
9787  */
9788  }
9789 
9790  /* "mbd/CouplingFSI.pyx":320
9791  * new_quat = chrono.ChQuaternionD(rot[0], rot[1], rot[2], rot[3])
9792  * self.ChBody.SetRot(new_quat)
9793  * self.thisptr.poststep() # <<<<<<<<<<<<<<
9794  *
9795  * def hxyz(self, np.ndarray x, double t, debug=False):
9796  */
9797  __pyx_v_self->thisptr->poststep();
9798 
9799  /* "mbd/CouplingFSI.pyx":312
9800  * pass
9801  *
9802  * def setInitialRot(self, rot): # <<<<<<<<<<<<<<
9803  * cdef np.ndarray zeros = np.zeros(3)
9804  * self.rotation_init = rot
9805  */
9806 
9807  /* function exit code */
9808  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
9809  goto __pyx_L0;
9810  __pyx_L1_error:;
9811  __Pyx_XDECREF(__pyx_t_1);
9812  __Pyx_XDECREF(__pyx_t_2);
9813  __Pyx_XDECREF(__pyx_t_3);
9814  __Pyx_XDECREF(__pyx_t_6);
9815  __Pyx_XDECREF(__pyx_t_7);
9816  __Pyx_XDECREF(__pyx_t_8);
9817  __Pyx_XDECREF(__pyx_t_9);
9818  __Pyx_XDECREF(__pyx_t_11);
9819  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setInitialRot", __pyx_clineno, __pyx_lineno, __pyx_filename);
9820  __pyx_r = NULL;
9821  __pyx_L0:;
9822  __Pyx_XDECREF((PyObject *)__pyx_v_zeros);
9823  __Pyx_XDECREF(__pyx_v_new_quat);
9824  __Pyx_XGIVEREF(__pyx_r);
9825  __Pyx_TraceReturn(__pyx_r, 0);
9826  __Pyx_RefNannyFinishContext();
9827  return __pyx_r;
9828 }
9829 
9830 /* "mbd/CouplingFSI.pyx":322
9831  * self.thisptr.poststep()
9832  *
9833  * def hxyz(self, np.ndarray x, double t, debug=False): # <<<<<<<<<<<<<<
9834  * cdef np.ndarray h
9835  * cdef np.ndarray xx
9836  */
9837 
9838 /* Python wrapper */
9839 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_23hxyz(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
9840 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_22hxyz[] = "ProtChBody.hxyz(self, ndarray x, double t, debug=False)";
9841 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_23hxyz = {"hxyz", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_23hxyz, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_22hxyz};
9842 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_23hxyz(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
9843  PyArrayObject *__pyx_v_x = 0;
9844  double __pyx_v_t;
9845  PyObject *__pyx_v_debug = 0;
9846  int __pyx_lineno = 0;
9847  const char *__pyx_filename = NULL;
9848  int __pyx_clineno = 0;
9849  PyObject *__pyx_r = 0;
9850  __Pyx_RefNannyDeclarations
9851  __Pyx_RefNannySetupContext("hxyz (wrapper)", 0);
9852  {
9853  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,&__pyx_n_s_debug,0};
9854  PyObject* values[3] = {0,0,0};
9855  values[2] = ((PyObject *)Py_False);
9856  if (unlikely(__pyx_kwds)) {
9857  Py_ssize_t kw_args;
9858  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
9859  switch (pos_args) {
9860  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9861  CYTHON_FALLTHROUGH;
9862  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9863  CYTHON_FALLTHROUGH;
9864  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9865  CYTHON_FALLTHROUGH;
9866  case 0: break;
9867  default: goto __pyx_L5_argtuple_error;
9868  }
9869  kw_args = PyDict_Size(__pyx_kwds);
9870  switch (pos_args) {
9871  case 0:
9872  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
9873  else goto __pyx_L5_argtuple_error;
9874  CYTHON_FALLTHROUGH;
9875  case 1:
9876  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
9877  else {
9878  __Pyx_RaiseArgtupleInvalid("hxyz", 0, 2, 3, 1); __PYX_ERR(0, 322, __pyx_L3_error)
9879  }
9880  CYTHON_FALLTHROUGH;
9881  case 2:
9882  if (kw_args > 0) {
9883  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_debug);
9884  if (value) { values[2] = value; kw_args--; }
9885  }
9886  }
9887  if (unlikely(kw_args > 0)) {
9888  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hxyz") < 0)) __PYX_ERR(0, 322, __pyx_L3_error)
9889  }
9890  } else {
9891  switch (PyTuple_GET_SIZE(__pyx_args)) {
9892  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
9893  CYTHON_FALLTHROUGH;
9894  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
9895  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
9896  break;
9897  default: goto __pyx_L5_argtuple_error;
9898  }
9899  }
9900  __pyx_v_x = ((PyArrayObject *)values[0]);
9901  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 322, __pyx_L3_error)
9902  __pyx_v_debug = values[2];
9903  }
9904  goto __pyx_L4_argument_unpacking_done;
9905  __pyx_L5_argtuple_error:;
9906  __Pyx_RaiseArgtupleInvalid("hxyz", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 322, __pyx_L3_error)
9907  __pyx_L3_error:;
9908  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hxyz", __pyx_clineno, __pyx_lineno, __pyx_filename);
9909  __Pyx_RefNannyFinishContext();
9910  return NULL;
9911  __pyx_L4_argument_unpacking_done:;
9912  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 322, __pyx_L1_error)
9913  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22hxyz(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t, __pyx_v_debug);
9914 
9915  /* function exit code */
9916  goto __pyx_L0;
9917  __pyx_L1_error:;
9918  __pyx_r = NULL;
9919  __pyx_L0:;
9920  __Pyx_RefNannyFinishContext();
9921  return __pyx_r;
9922 }
9923 
9924 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22hxyz(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t, PyObject *__pyx_v_debug) {
9925  PyArrayObject *__pyx_v_h = 0;
9926  PyArrayObject *__pyx_v_xx = 0;
9927  double __pyx_v_ang;
9928  double __pyx_v_ang_last;
9929  PyArrayObject *__pyx_v_d_rot = 0;
9930  PyArrayObject *__pyx_v_d_rot_last = 0;
9931  PyArrayObject *__pyx_v_h_body = 0;
9932  ChVector<double> __pyx_v_h_body_vec;
9933  CYTHON_UNUSED PyObject *__pyx_v_comm = NULL;
9934  PyObject *__pyx_r = NULL;
9935  __Pyx_TraceDeclarations
9936  __Pyx_RefNannyDeclarations
9937  PyObject *__pyx_t_1 = NULL;
9938  PyObject *__pyx_t_2 = NULL;
9939  PyObject *__pyx_t_3 = NULL;
9940  int __pyx_t_4;
9941  PyObject *__pyx_t_5 = NULL;
9942  PyObject *__pyx_t_6 = NULL;
9943  PyObject *__pyx_t_7 = NULL;
9944  int __pyx_t_8;
9945  int __pyx_t_9;
9946  PyObject *__pyx_t_10 = NULL;
9947  double __pyx_t_11;
9948  int __pyx_lineno = 0;
9949  const char *__pyx_filename = NULL;
9950  int __pyx_clineno = 0;
9951  __Pyx_TraceFrameInit(__pyx_codeobj__16)
9952  __Pyx_RefNannySetupContext("hxyz", 0);
9953  __Pyx_TraceCall("hxyz", __pyx_f[0], 322, 0, __PYX_ERR(0, 322, __pyx_L1_error));
9954 
9955  /* "mbd/CouplingFSI.pyx":330
9956  * cdef np.ndarray h_body # displacement from body
9957  * cdef ch.ChVector h_body_vec
9958  * h = np.zeros(3) # <<<<<<<<<<<<<<
9959  * if self.predicted is False:
9960  * self.prediction()
9961  */
9962  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
9963  __Pyx_GOTREF(__pyx_t_2);
9964  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error)
9965  __Pyx_GOTREF(__pyx_t_3);
9966  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
9967  __pyx_t_2 = NULL;
9968  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
9969  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
9970  if (likely(__pyx_t_2)) {
9971  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9972  __Pyx_INCREF(__pyx_t_2);
9973  __Pyx_INCREF(function);
9974  __Pyx_DECREF_SET(__pyx_t_3, function);
9975  }
9976  }
9977  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_3);
9978  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
9979  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
9980  __Pyx_GOTREF(__pyx_t_1);
9981  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9982  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 330, __pyx_L1_error)
9983  __pyx_v_h = ((PyArrayObject *)__pyx_t_1);
9984  __pyx_t_1 = 0;
9985 
9986  /* "mbd/CouplingFSI.pyx":331
9987  * cdef ch.ChVector h_body_vec
9988  * h = np.zeros(3)
9989  * if self.predicted is False: # <<<<<<<<<<<<<<
9990  * self.prediction()
9991  * # if self.ProtChSystem.thisptr.system.GetChTime() > 0.0003:
9992  */
9993  __pyx_t_4 = ((__pyx_v_self->predicted == 0) != 0);
9994  if (__pyx_t_4) {
9995 
9996  /* "mbd/CouplingFSI.pyx":332
9997  * h = np.zeros(3)
9998  * if self.predicted is False:
9999  * self.prediction() # <<<<<<<<<<<<<<
10000  * # if self.ProtChSystem.thisptr.system.GetChTime() > 0.0003:
10001  * # if self.ProtChSystem.step_nb > self.ProtChSystem.step_start:
10002  */
10003  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_prediction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
10004  __Pyx_GOTREF(__pyx_t_3);
10005  __pyx_t_2 = NULL;
10006  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
10007  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
10008  if (likely(__pyx_t_2)) {
10009  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
10010  __Pyx_INCREF(__pyx_t_2);
10011  __Pyx_INCREF(function);
10012  __Pyx_DECREF_SET(__pyx_t_3, function);
10013  }
10014  }
10015  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
10016  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
10017  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
10018  __Pyx_GOTREF(__pyx_t_1);
10019  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10020  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10021 
10022  /* "mbd/CouplingFSI.pyx":331
10023  * cdef ch.ChVector h_body_vec
10024  * h = np.zeros(3)
10025  * if self.predicted is False: # <<<<<<<<<<<<<<
10026  * self.prediction()
10027  * # if self.ProtChSystem.thisptr.system.GetChTime() > 0.0003:
10028  */
10029  }
10030 
10031  /* "mbd/CouplingFSI.pyx":336
10032  * # if self.ProtChSystem.step_nb > self.ProtChSystem.step_start:
10033  * # self.ChBody.SetBodyFixed(False)
10034  * if self.ProtChSystem.scheme == "CSS": # <<<<<<<<<<<<<<
10035  * h_body_vec = self.thisptr.hxyz(<double*> x.data, t)
10036  * h_body = np.array([h_body_vec.x(), h_body_vec.y(), h_body_vec.z()])
10037  */
10038  __pyx_t_4 = ((__pyx_v_self->ProtChSystem->scheme == ((char const *)"CSS")) != 0);
10039  if (__pyx_t_4) {
10040 
10041  /* "mbd/CouplingFSI.pyx":337
10042  * # self.ChBody.SetBodyFixed(False)
10043  * if self.ProtChSystem.scheme == "CSS":
10044  * h_body_vec = self.thisptr.hxyz(<double*> x.data, t) # <<<<<<<<<<<<<<
10045  * h_body = np.array([h_body_vec.x(), h_body_vec.y(), h_body_vec.z()])
10046  * h += h_body
10047  */
10048  __pyx_v_h_body_vec = __pyx_v_self->thisptr->hxyz(((double *)__pyx_v_x->data), __pyx_v_t);
10049 
10050  /* "mbd/CouplingFSI.pyx":338
10051  * if self.ProtChSystem.scheme == "CSS":
10052  * h_body_vec = self.thisptr.hxyz(<double*> x.data, t)
10053  * h_body = np.array([h_body_vec.x(), h_body_vec.y(), h_body_vec.z()]) # <<<<<<<<<<<<<<
10054  * h += h_body
10055  * elif self.ProtChSystem.scheme == "ISS":
10056  */
10057  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error)
10058  __Pyx_GOTREF(__pyx_t_3);
10059  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error)
10060  __Pyx_GOTREF(__pyx_t_2);
10061  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10062  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_h_body_vec.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L1_error)
10063  __Pyx_GOTREF(__pyx_t_3);
10064  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_h_body_vec.y()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 338, __pyx_L1_error)
10065  __Pyx_GOTREF(__pyx_t_5);
10066  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_h_body_vec.z()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error)
10067  __Pyx_GOTREF(__pyx_t_6);
10068  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error)
10069  __Pyx_GOTREF(__pyx_t_7);
10070  __Pyx_GIVEREF(__pyx_t_3);
10071  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
10072  __Pyx_GIVEREF(__pyx_t_5);
10073  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
10074  __Pyx_GIVEREF(__pyx_t_6);
10075  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
10076  __pyx_t_3 = 0;
10077  __pyx_t_5 = 0;
10078  __pyx_t_6 = 0;
10079  __pyx_t_6 = NULL;
10080  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
10081  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
10082  if (likely(__pyx_t_6)) {
10083  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10084  __Pyx_INCREF(__pyx_t_6);
10085  __Pyx_INCREF(function);
10086  __Pyx_DECREF_SET(__pyx_t_2, function);
10087  }
10088  }
10089  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7);
10090  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10091  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10092  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error)
10093  __Pyx_GOTREF(__pyx_t_1);
10094  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10095  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 338, __pyx_L1_error)
10096  __pyx_v_h_body = ((PyArrayObject *)__pyx_t_1);
10097  __pyx_t_1 = 0;
10098 
10099  /* "mbd/CouplingFSI.pyx":339
10100  * h_body_vec = self.thisptr.hxyz(<double*> x.data, t)
10101  * h_body = np.array([h_body_vec.x(), h_body_vec.y(), h_body_vec.z()])
10102  * h += h_body # <<<<<<<<<<<<<<
10103  * elif self.ProtChSystem.scheme == "ISS":
10104  * # remove previous prediction
10105  */
10106  __pyx_t_1 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_h), ((PyObject *)__pyx_v_h_body)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error)
10107  __Pyx_GOTREF(__pyx_t_1);
10108  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 339, __pyx_L1_error)
10109  __Pyx_DECREF_SET(__pyx_v_h, ((PyArrayObject *)__pyx_t_1));
10110  __pyx_t_1 = 0;
10111 
10112  /* "mbd/CouplingFSI.pyx":336
10113  * # if self.ProtChSystem.step_nb > self.ProtChSystem.step_start:
10114  * # self.ChBody.SetBodyFixed(False)
10115  * if self.ProtChSystem.scheme == "CSS": # <<<<<<<<<<<<<<
10116  * h_body_vec = self.thisptr.hxyz(<double*> x.data, t)
10117  * h_body = np.array([h_body_vec.x(), h_body_vec.y(), h_body_vec.z()])
10118  */
10119  goto __pyx_L4;
10120  }
10121 
10122  /* "mbd/CouplingFSI.pyx":340
10123  * h_body = np.array([h_body_vec.x(), h_body_vec.y(), h_body_vec.z()])
10124  * h += h_body
10125  * elif self.ProtChSystem.scheme == "ISS": # <<<<<<<<<<<<<<
10126  * # remove previous prediction
10127  * # translate back first
10128  */
10129  __pyx_t_4 = ((__pyx_v_self->ProtChSystem->scheme == ((char const *)"ISS")) != 0);
10130  if (__pyx_t_4) {
10131 
10132  /* "mbd/CouplingFSI.pyx":343
10133  * # remove previous prediction
10134  * # translate back first
10135  * if debug is True: # <<<<<<<<<<<<<<
10136  * print("$$$$$$$$$$$$$$$$$$")
10137  * print("x: ", x)
10138  */
10139  __pyx_t_4 = (__pyx_v_debug == Py_True);
10140  __pyx_t_8 = (__pyx_t_4 != 0);
10141  if (__pyx_t_8) {
10142 
10143  /* "mbd/CouplingFSI.pyx":344
10144  * # translate back first
10145  * if debug is True:
10146  * print("$$$$$$$$$$$$$$$$$$") # <<<<<<<<<<<<<<
10147  * print("x: ", x)
10148  * # d_tra_last = -self.velocity_last*dt_half_last
10149  */
10150  if (__Pyx_PrintOne(0, __pyx_kp_s__17) < 0) __PYX_ERR(0, 344, __pyx_L1_error)
10151 
10152  /* "mbd/CouplingFSI.pyx":345
10153  * if debug is True:
10154  * print("$$$$$$$$$$$$$$$$$$")
10155  * print("x: ", x) # <<<<<<<<<<<<<<
10156  * # d_tra_last = -self.velocity_last*dt_half_last
10157  * # h += d_tra_last
10158  */
10159  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
10160  __Pyx_GOTREF(__pyx_t_1);
10161  __Pyx_INCREF(__pyx_kp_s_x_2);
10162  __Pyx_GIVEREF(__pyx_kp_s_x_2);
10163  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_x_2);
10164  __Pyx_INCREF(((PyObject *)__pyx_v_x));
10165  __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
10166  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_x));
10167  if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 345, __pyx_L1_error)
10168  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10169 
10170  /* "mbd/CouplingFSI.pyx":343
10171  * # remove previous prediction
10172  * # translate back first
10173  * if debug is True: # <<<<<<<<<<<<<<
10174  * print("$$$$$$$$$$$$$$$$$$")
10175  * print("x: ", x)
10176  */
10177  }
10178 
10179  /* "mbd/CouplingFSI.pyx":348
10180  * # d_tra_last = -self.velocity_last*dt_half_last
10181  * # h += d_tra_last
10182  * h += -self.h_predict_last # <<<<<<<<<<<<<<
10183  * if debug is True:
10184  * print("h_predict_last: ", self.h_predict_last)
10185  */
10186  __pyx_t_1 = PyNumber_Negative(((PyObject *)__pyx_v_self->h_predict_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
10187  __Pyx_GOTREF(__pyx_t_1);
10188  __pyx_t_2 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_h), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
10189  __Pyx_GOTREF(__pyx_t_2);
10190  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10191  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 348, __pyx_L1_error)
10192  __Pyx_DECREF_SET(__pyx_v_h, ((PyArrayObject *)__pyx_t_2));
10193  __pyx_t_2 = 0;
10194 
10195  /* "mbd/CouplingFSI.pyx":349
10196  * # h += d_tra_last
10197  * h += -self.h_predict_last
10198  * if debug is True: # <<<<<<<<<<<<<<
10199  * print("h_predict_last: ", self.h_predict_last)
10200  * print("h_predict: ", self.h_predict)
10201  */
10202  __pyx_t_8 = (__pyx_v_debug == Py_True);
10203  __pyx_t_4 = (__pyx_t_8 != 0);
10204  if (__pyx_t_4) {
10205 
10206  /* "mbd/CouplingFSI.pyx":350
10207  * h += -self.h_predict_last
10208  * if debug is True:
10209  * print("h_predict_last: ", self.h_predict_last) # <<<<<<<<<<<<<<
10210  * print("h_predict: ", self.h_predict)
10211  * print("h_ang_predict_last: ", self.h_ang_predict_last)
10212  */
10213  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 350, __pyx_L1_error)
10214  __Pyx_GOTREF(__pyx_t_2);
10215  __Pyx_INCREF(__pyx_kp_s_h_predict_last);
10216  __Pyx_GIVEREF(__pyx_kp_s_h_predict_last);
10217  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_h_predict_last);
10218  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_predict_last));
10219  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->h_predict_last));
10220  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->h_predict_last));
10221  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
10222  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10223 
10224  /* "mbd/CouplingFSI.pyx":351
10225  * if debug is True:
10226  * print("h_predict_last: ", self.h_predict_last)
10227  * print("h_predict: ", self.h_predict) # <<<<<<<<<<<<<<
10228  * print("h_ang_predict_last: ", self.h_ang_predict_last)
10229  * print("h_ang_predict: ", self.h_ang_predict)
10230  */
10231  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
10232  __Pyx_GOTREF(__pyx_t_2);
10233  __Pyx_INCREF(__pyx_kp_s_h_predict);
10234  __Pyx_GIVEREF(__pyx_kp_s_h_predict);
10235  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_h_predict);
10236  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_predict));
10237  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->h_predict));
10238  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->h_predict));
10239  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
10240  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10241 
10242  /* "mbd/CouplingFSI.pyx":352
10243  * print("h_predict_last: ", self.h_predict_last)
10244  * print("h_predict: ", self.h_predict)
10245  * print("h_ang_predict_last: ", self.h_ang_predict_last) # <<<<<<<<<<<<<<
10246  * print("h_ang_predict: ", self.h_ang_predict)
10247  * print("h_ang_vel_predict_last: ", self.h_ang_vel_predict_last)
10248  */
10249  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->h_ang_predict_last); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
10250  __Pyx_GOTREF(__pyx_t_2);
10251  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error)
10252  __Pyx_GOTREF(__pyx_t_1);
10253  __Pyx_INCREF(__pyx_kp_s_h_ang_predict_last);
10254  __Pyx_GIVEREF(__pyx_kp_s_h_ang_predict_last);
10255  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_h_ang_predict_last);
10256  __Pyx_GIVEREF(__pyx_t_2);
10257  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
10258  __pyx_t_2 = 0;
10259  if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 352, __pyx_L1_error)
10260  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10261 
10262  /* "mbd/CouplingFSI.pyx":353
10263  * print("h_predict: ", self.h_predict)
10264  * print("h_ang_predict_last: ", self.h_ang_predict_last)
10265  * print("h_ang_predict: ", self.h_ang_predict) # <<<<<<<<<<<<<<
10266  * print("h_ang_vel_predict_last: ", self.h_ang_vel_predict_last)
10267  * print("h_ang_vel_predict: ", self.h_ang_vel_predict)
10268  */
10269  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->h_ang_predict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 353, __pyx_L1_error)
10270  __Pyx_GOTREF(__pyx_t_1);
10271  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 353, __pyx_L1_error)
10272  __Pyx_GOTREF(__pyx_t_2);
10273  __Pyx_INCREF(__pyx_kp_s_h_ang_predict);
10274  __Pyx_GIVEREF(__pyx_kp_s_h_ang_predict);
10275  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_h_ang_predict);
10276  __Pyx_GIVEREF(__pyx_t_1);
10277  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
10278  __pyx_t_1 = 0;
10279  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
10280  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10281 
10282  /* "mbd/CouplingFSI.pyx":354
10283  * print("h_ang_predict_last: ", self.h_ang_predict_last)
10284  * print("h_ang_predict: ", self.h_ang_predict)
10285  * print("h_ang_vel_predict_last: ", self.h_ang_vel_predict_last) # <<<<<<<<<<<<<<
10286  * print("h_ang_vel_predict: ", self.h_ang_vel_predict)
10287  * # rotate back
10288  */
10289  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
10290  __Pyx_GOTREF(__pyx_t_2);
10291  __Pyx_INCREF(__pyx_kp_s_h_ang_vel_predict_last);
10292  __Pyx_GIVEREF(__pyx_kp_s_h_ang_vel_predict_last);
10293  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_h_ang_vel_predict_last);
10294  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_ang_vel_predict_last));
10295  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->h_ang_vel_predict_last));
10296  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->h_ang_vel_predict_last));
10297  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 354, __pyx_L1_error)
10298  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10299 
10300  /* "mbd/CouplingFSI.pyx":355
10301  * print("h_ang_predict: ", self.h_ang_predict)
10302  * print("h_ang_vel_predict_last: ", self.h_ang_vel_predict_last)
10303  * print("h_ang_vel_predict: ", self.h_ang_vel_predict) # <<<<<<<<<<<<<<
10304  * # rotate back
10305  * # ang_last = -self.ang_vel_norm_last*dt_half_last
10306  */
10307  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 355, __pyx_L1_error)
10308  __Pyx_GOTREF(__pyx_t_2);
10309  __Pyx_INCREF(__pyx_kp_s_h_ang_vel_predict);
10310  __Pyx_GIVEREF(__pyx_kp_s_h_ang_vel_predict);
10311  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_h_ang_vel_predict);
10312  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_ang_vel_predict));
10313  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->h_ang_vel_predict));
10314  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->h_ang_vel_predict));
10315  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
10316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10317 
10318  /* "mbd/CouplingFSI.pyx":349
10319  * # h += d_tra_last
10320  * h += -self.h_predict_last
10321  * if debug is True: # <<<<<<<<<<<<<<
10322  * print("h_predict_last: ", self.h_predict_last)
10323  * print("h_predict: ", self.h_predict)
10324  */
10325  }
10326 
10327  /* "mbd/CouplingFSI.pyx":358
10328  * # rotate back
10329  * # ang_last = -self.ang_vel_norm_last*dt_half_last
10330  * ang_last = -self.h_ang_predict_last # <<<<<<<<<<<<<<
10331  * if ang > 0:
10332  * d_rot_last = (st.rotation3D(points=x+h, # (translated back)
10333  */
10334  __pyx_v_ang_last = (-__pyx_v_self->h_ang_predict_last);
10335 
10336  /* "mbd/CouplingFSI.pyx":359
10337  * # ang_last = -self.ang_vel_norm_last*dt_half_last
10338  * ang_last = -self.h_ang_predict_last
10339  * if ang > 0: # <<<<<<<<<<<<<<
10340  * d_rot_last = (st.rotation3D(points=x+h, # (translated back)
10341  * rot=ang_last,
10342  */
10343  __pyx_t_4 = ((__pyx_v_ang > 0.0) != 0);
10344  if (__pyx_t_4) {
10345 
10346  /* "mbd/CouplingFSI.pyx":360
10347  * ang_last = -self.h_ang_predict_last
10348  * if ang > 0:
10349  * d_rot_last = (st.rotation3D(points=x+h, # (translated back) # <<<<<<<<<<<<<<
10350  * rot=ang_last,
10351  * axis=self.h_ang_vel_predict_last,
10352  */
10353  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_st); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
10354  __Pyx_GOTREF(__pyx_t_2);
10355  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rotation3D); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
10356  __Pyx_GOTREF(__pyx_t_1);
10357  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10358  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
10359  __Pyx_GOTREF(__pyx_t_2);
10360  __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 360, __pyx_L1_error)
10361  __Pyx_GOTREF(__pyx_t_7);
10362  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_points, __pyx_t_7) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
10363  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10364 
10365  /* "mbd/CouplingFSI.pyx":361
10366  * if ang > 0:
10367  * d_rot_last = (st.rotation3D(points=x+h, # (translated back)
10368  * rot=ang_last, # <<<<<<<<<<<<<<
10369  * axis=self.h_ang_vel_predict_last,
10370  * pivot=self.position_last)
10371  */
10372  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_ang_last); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 361, __pyx_L1_error)
10373  __Pyx_GOTREF(__pyx_t_7);
10374  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rot, __pyx_t_7) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
10375  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10376 
10377  /* "mbd/CouplingFSI.pyx":362
10378  * d_rot_last = (st.rotation3D(points=x+h, # (translated back)
10379  * rot=ang_last,
10380  * axis=self.h_ang_vel_predict_last, # <<<<<<<<<<<<<<
10381  * pivot=self.position_last)
10382  * -x+h)
10383  */
10384  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, ((PyObject *)__pyx_v_self->h_ang_vel_predict_last)) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
10385 
10386  /* "mbd/CouplingFSI.pyx":363
10387  * rot=ang_last,
10388  * axis=self.h_ang_vel_predict_last,
10389  * pivot=self.position_last) # <<<<<<<<<<<<<<
10390  * -x+h)
10391  * h += d_rot_last
10392  */
10393  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pivot, ((PyObject *)__pyx_v_self->position_last)) < 0) __PYX_ERR(0, 360, __pyx_L1_error)
10394 
10395  /* "mbd/CouplingFSI.pyx":360
10396  * ang_last = -self.h_ang_predict_last
10397  * if ang > 0:
10398  * d_rot_last = (st.rotation3D(points=x+h, # (translated back) # <<<<<<<<<<<<<<
10399  * rot=ang_last,
10400  * axis=self.h_ang_vel_predict_last,
10401  */
10402  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 360, __pyx_L1_error)
10403  __Pyx_GOTREF(__pyx_t_7);
10404  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10405  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10406 
10407  /* "mbd/CouplingFSI.pyx":364
10408  * axis=self.h_ang_vel_predict_last,
10409  * pivot=self.position_last)
10410  * -x+h) # <<<<<<<<<<<<<<
10411  * h += d_rot_last
10412  * # add rigid body displacement
10413  */
10414  __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
10415  __Pyx_GOTREF(__pyx_t_2);
10416  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10417  __pyx_t_7 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 364, __pyx_L1_error)
10418  __Pyx_GOTREF(__pyx_t_7);
10419  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10420  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 364, __pyx_L1_error)
10421  __pyx_v_d_rot_last = ((PyArrayObject *)__pyx_t_7);
10422  __pyx_t_7 = 0;
10423 
10424  /* "mbd/CouplingFSI.pyx":365
10425  * pivot=self.position_last)
10426  * -x+h)
10427  * h += d_rot_last # <<<<<<<<<<<<<<
10428  * # add rigid body displacement
10429  * xx = x+h # previous position of body
10430  */
10431  __pyx_t_7 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_h), ((PyObject *)__pyx_v_d_rot_last)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 365, __pyx_L1_error)
10432  __Pyx_GOTREF(__pyx_t_7);
10433  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 365, __pyx_L1_error)
10434  __Pyx_DECREF_SET(__pyx_v_h, ((PyArrayObject *)__pyx_t_7));
10435  __pyx_t_7 = 0;
10436 
10437  /* "mbd/CouplingFSI.pyx":359
10438  * # ang_last = -self.ang_vel_norm_last*dt_half_last
10439  * ang_last = -self.h_ang_predict_last
10440  * if ang > 0: # <<<<<<<<<<<<<<
10441  * d_rot_last = (st.rotation3D(points=x+h, # (translated back)
10442  * rot=ang_last,
10443  */
10444  }
10445 
10446  /* "mbd/CouplingFSI.pyx":367
10447  * h += d_rot_last
10448  * # add rigid body displacement
10449  * xx = x+h # previous position of body # <<<<<<<<<<<<<<
10450  * if debug is True:
10451  * print("x_old: ", x+h)
10452  */
10453  __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 367, __pyx_L1_error)
10454  __Pyx_GOTREF(__pyx_t_7);
10455  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 367, __pyx_L1_error)
10456  __pyx_v_xx = ((PyArrayObject *)__pyx_t_7);
10457  __pyx_t_7 = 0;
10458 
10459  /* "mbd/CouplingFSI.pyx":368
10460  * # add rigid body displacement
10461  * xx = x+h # previous position of body
10462  * if debug is True: # <<<<<<<<<<<<<<
10463  * print("x_old: ", x+h)
10464  * print("F_applied: ", self.F_applied)
10465  */
10466  __pyx_t_4 = (__pyx_v_debug == Py_True);
10467  __pyx_t_8 = (__pyx_t_4 != 0);
10468  if (__pyx_t_8) {
10469 
10470  /* "mbd/CouplingFSI.pyx":369
10471  * xx = x+h # previous position of body
10472  * if debug is True:
10473  * print("x_old: ", x+h) # <<<<<<<<<<<<<<
10474  * print("F_applied: ", self.F_applied)
10475  * h_body_vec = self.thisptr.hxyz(<double*> xx.data, t)
10476  */
10477  __pyx_t_7 = PyNumber_Add(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 369, __pyx_L1_error)
10478  __Pyx_GOTREF(__pyx_t_7);
10479  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
10480  __Pyx_GOTREF(__pyx_t_2);
10481  __Pyx_INCREF(__pyx_kp_s_x_old);
10482  __Pyx_GIVEREF(__pyx_kp_s_x_old);
10483  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_x_old);
10484  __Pyx_GIVEREF(__pyx_t_7);
10485  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
10486  __pyx_t_7 = 0;
10487  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
10488  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10489 
10490  /* "mbd/CouplingFSI.pyx":370
10491  * if debug is True:
10492  * print("x_old: ", x+h)
10493  * print("F_applied: ", self.F_applied) # <<<<<<<<<<<<<<
10494  * h_body_vec = self.thisptr.hxyz(<double*> xx.data, t)
10495  * h_body = np.array(h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
10496  */
10497  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
10498  __Pyx_GOTREF(__pyx_t_2);
10499  __Pyx_INCREF(__pyx_kp_s_F_applied);
10500  __Pyx_GIVEREF(__pyx_kp_s_F_applied);
10501  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_F_applied);
10502  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_applied));
10503  __Pyx_GIVEREF(((PyObject *)__pyx_v_self->F_applied));
10504  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->F_applied));
10505  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 370, __pyx_L1_error)
10506  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10507 
10508  /* "mbd/CouplingFSI.pyx":368
10509  * # add rigid body displacement
10510  * xx = x+h # previous position of body
10511  * if debug is True: # <<<<<<<<<<<<<<
10512  * print("x_old: ", x+h)
10513  * print("F_applied: ", self.F_applied)
10514  */
10515  }
10516 
10517  /* "mbd/CouplingFSI.pyx":371
10518  * print("x_old: ", x+h)
10519  * print("F_applied: ", self.F_applied)
10520  * h_body_vec = self.thisptr.hxyz(<double*> xx.data, t) # <<<<<<<<<<<<<<
10521  * h_body = np.array(h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
10522  * h += h_body
10523  */
10524  __pyx_v_h_body_vec = __pyx_v_self->thisptr->hxyz(((double *)__pyx_v_xx->data), __pyx_v_t);
10525 
10526  /* "mbd/CouplingFSI.pyx":372
10527  * print("F_applied: ", self.F_applied)
10528  * h_body_vec = self.thisptr.hxyz(<double*> xx.data, t)
10529  * h_body = np.array(h_body_vec.x(), h_body_vec.y(), h_body_vec.z()) # <<<<<<<<<<<<<<
10530  * h += h_body
10531  * # add current prediction
10532  */
10533  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 372, __pyx_L1_error)
10534  __Pyx_GOTREF(__pyx_t_7);
10535  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
10536  __Pyx_GOTREF(__pyx_t_1);
10537  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10538  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_h_body_vec.x()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 372, __pyx_L1_error)
10539  __Pyx_GOTREF(__pyx_t_7);
10540  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_h_body_vec.y()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 372, __pyx_L1_error)
10541  __Pyx_GOTREF(__pyx_t_6);
10542  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_h_body_vec.z()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 372, __pyx_L1_error)
10543  __Pyx_GOTREF(__pyx_t_5);
10544  __pyx_t_3 = NULL;
10545  __pyx_t_9 = 0;
10546  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
10547  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
10548  if (likely(__pyx_t_3)) {
10549  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
10550  __Pyx_INCREF(__pyx_t_3);
10551  __Pyx_INCREF(function);
10552  __Pyx_DECREF_SET(__pyx_t_1, function);
10553  __pyx_t_9 = 1;
10554  }
10555  }
10556  #if CYTHON_FAST_PYCALL
10557  if (PyFunction_Check(__pyx_t_1)) {
10558  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_6, __pyx_t_5};
10559  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
10560  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10561  __Pyx_GOTREF(__pyx_t_2);
10562  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10563  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10564  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10565  } else
10566  #endif
10567  #if CYTHON_FAST_PYCCALL
10568  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
10569  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_t_7, __pyx_t_6, __pyx_t_5};
10570  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
10571  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10572  __Pyx_GOTREF(__pyx_t_2);
10573  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
10574  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
10575  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10576  } else
10577  #endif
10578  {
10579  __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
10580  __Pyx_GOTREF(__pyx_t_10);
10581  if (__pyx_t_3) {
10582  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_3); __pyx_t_3 = NULL;
10583  }
10584  __Pyx_GIVEREF(__pyx_t_7);
10585  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
10586  __Pyx_GIVEREF(__pyx_t_6);
10587  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
10588  __Pyx_GIVEREF(__pyx_t_5);
10589  PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
10590  __pyx_t_7 = 0;
10591  __pyx_t_6 = 0;
10592  __pyx_t_5 = 0;
10593  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
10594  __Pyx_GOTREF(__pyx_t_2);
10595  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10596  }
10597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10598  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 372, __pyx_L1_error)
10599  __pyx_v_h_body = ((PyArrayObject *)__pyx_t_2);
10600  __pyx_t_2 = 0;
10601 
10602  /* "mbd/CouplingFSI.pyx":373
10603  * h_body_vec = self.thisptr.hxyz(<double*> xx.data, t)
10604  * h_body = np.array(h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
10605  * h += h_body # <<<<<<<<<<<<<<
10606  * # add current prediction
10607  * # rotate first
10608  */
10609  __pyx_t_2 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_h), ((PyObject *)__pyx_v_h_body)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
10610  __Pyx_GOTREF(__pyx_t_2);
10611  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 373, __pyx_L1_error)
10612  __Pyx_DECREF_SET(__pyx_v_h, ((PyArrayObject *)__pyx_t_2));
10613  __pyx_t_2 = 0;
10614 
10615  /* "mbd/CouplingFSI.pyx":377
10616  * # rotate first
10617  * # ang = self.ang_vel_norm*dt_half
10618  * ang = self.h_ang_predict # <<<<<<<<<<<<<<
10619  * if debug is True:
10620  * print("x_body: ", x+h)
10621  */
10622  __pyx_t_11 = __pyx_v_self->h_ang_predict;
10623  __pyx_v_ang = __pyx_t_11;
10624 
10625  /* "mbd/CouplingFSI.pyx":378
10626  * # ang = self.ang_vel_norm*dt_half
10627  * ang = self.h_ang_predict
10628  * if debug is True: # <<<<<<<<<<<<<<
10629  * print("x_body: ", x+h)
10630  * print("pos_body: ", self.ChBody.GetPos())
10631  */
10632  __pyx_t_8 = (__pyx_v_debug == Py_True);
10633  __pyx_t_4 = (__pyx_t_8 != 0);
10634  if (__pyx_t_4) {
10635 
10636  /* "mbd/CouplingFSI.pyx":379
10637  * ang = self.h_ang_predict
10638  * if debug is True:
10639  * print("x_body: ", x+h) # <<<<<<<<<<<<<<
10640  * print("pos_body: ", self.ChBody.GetPos())
10641  * if ang > 0:
10642  */
10643  __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error)
10644  __Pyx_GOTREF(__pyx_t_2);
10645  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
10646  __Pyx_GOTREF(__pyx_t_1);
10647  __Pyx_INCREF(__pyx_kp_s_x_body);
10648  __Pyx_GIVEREF(__pyx_kp_s_x_body);
10649  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_x_body);
10650  __Pyx_GIVEREF(__pyx_t_2);
10651  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
10652  __pyx_t_2 = 0;
10653  if (__Pyx_PrintOne(0, __pyx_t_1) < 0) __PYX_ERR(0, 379, __pyx_L1_error)
10654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10655 
10656  /* "mbd/CouplingFSI.pyx":380
10657  * if debug is True:
10658  * print("x_body: ", x+h)
10659  * print("pos_body: ", self.ChBody.GetPos()) # <<<<<<<<<<<<<<
10660  * if ang > 0:
10661  * d_rot = (st.rotation3D(points=x+h,
10662  */
10663  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
10664  __Pyx_GOTREF(__pyx_t_2);
10665  __pyx_t_10 = NULL;
10666  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10667  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
10668  if (likely(__pyx_t_10)) {
10669  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10670  __Pyx_INCREF(__pyx_t_10);
10671  __Pyx_INCREF(function);
10672  __Pyx_DECREF_SET(__pyx_t_2, function);
10673  }
10674  }
10675  __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
10676  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
10677  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 380, __pyx_L1_error)
10678  __Pyx_GOTREF(__pyx_t_1);
10679  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10680  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
10681  __Pyx_GOTREF(__pyx_t_2);
10682  __Pyx_INCREF(__pyx_kp_s_pos_body);
10683  __Pyx_GIVEREF(__pyx_kp_s_pos_body);
10684  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_pos_body);
10685  __Pyx_GIVEREF(__pyx_t_1);
10686  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
10687  __pyx_t_1 = 0;
10688  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 380, __pyx_L1_error)
10689  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10690 
10691  /* "mbd/CouplingFSI.pyx":378
10692  * # ang = self.ang_vel_norm*dt_half
10693  * ang = self.h_ang_predict
10694  * if debug is True: # <<<<<<<<<<<<<<
10695  * print("x_body: ", x+h)
10696  * print("pos_body: ", self.ChBody.GetPos())
10697  */
10698  }
10699 
10700  /* "mbd/CouplingFSI.pyx":381
10701  * print("x_body: ", x+h)
10702  * print("pos_body: ", self.ChBody.GetPos())
10703  * if ang > 0: # <<<<<<<<<<<<<<
10704  * d_rot = (st.rotation3D(points=x+h,
10705  * rot=ang,
10706  */
10707  __pyx_t_4 = ((__pyx_v_ang > 0.0) != 0);
10708  if (__pyx_t_4) {
10709 
10710  /* "mbd/CouplingFSI.pyx":382
10711  * print("pos_body: ", self.ChBody.GetPos())
10712  * if ang > 0:
10713  * d_rot = (st.rotation3D(points=x+h, # <<<<<<<<<<<<<<
10714  * rot=ang,
10715  * axis=self.h_ang_vel_predict,
10716  */
10717  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_st); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
10718  __Pyx_GOTREF(__pyx_t_2);
10719  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rotation3D); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 382, __pyx_L1_error)
10720  __Pyx_GOTREF(__pyx_t_1);
10721  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10722  __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
10723  __Pyx_GOTREF(__pyx_t_2);
10724  __pyx_t_10 = PyNumber_Add(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 382, __pyx_L1_error)
10725  __Pyx_GOTREF(__pyx_t_10);
10726  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_points, __pyx_t_10) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
10727  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10728 
10729  /* "mbd/CouplingFSI.pyx":383
10730  * if ang > 0:
10731  * d_rot = (st.rotation3D(points=x+h,
10732  * rot=ang, # <<<<<<<<<<<<<<
10733  * axis=self.h_ang_vel_predict,
10734  * pivot=self.position)
10735  */
10736  __pyx_t_10 = PyFloat_FromDouble(__pyx_v_ang); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 383, __pyx_L1_error)
10737  __Pyx_GOTREF(__pyx_t_10);
10738  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_rot, __pyx_t_10) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
10739  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10740 
10741  /* "mbd/CouplingFSI.pyx":384
10742  * d_rot = (st.rotation3D(points=x+h,
10743  * rot=ang,
10744  * axis=self.h_ang_vel_predict, # <<<<<<<<<<<<<<
10745  * pivot=self.position)
10746  * -x+h)
10747  */
10748  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, ((PyObject *)__pyx_v_self->h_ang_vel_predict)) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
10749 
10750  /* "mbd/CouplingFSI.pyx":385
10751  * rot=ang,
10752  * axis=self.h_ang_vel_predict,
10753  * pivot=self.position) # <<<<<<<<<<<<<<
10754  * -x+h)
10755  * h += d_rot
10756  */
10757  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pivot, ((PyObject *)__pyx_v_self->position)) < 0) __PYX_ERR(0, 382, __pyx_L1_error)
10758 
10759  /* "mbd/CouplingFSI.pyx":382
10760  * print("pos_body: ", self.ChBody.GetPos())
10761  * if ang > 0:
10762  * d_rot = (st.rotation3D(points=x+h, # <<<<<<<<<<<<<<
10763  * rot=ang,
10764  * axis=self.h_ang_vel_predict,
10765  */
10766  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 382, __pyx_L1_error)
10767  __Pyx_GOTREF(__pyx_t_10);
10768  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10769  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10770 
10771  /* "mbd/CouplingFSI.pyx":386
10772  * axis=self.h_ang_vel_predict,
10773  * pivot=self.position)
10774  * -x+h) # <<<<<<<<<<<<<<
10775  * h += d_rot
10776  * if debug is True:
10777  */
10778  __pyx_t_2 = PyNumber_Subtract(__pyx_t_10, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 386, __pyx_L1_error)
10779  __Pyx_GOTREF(__pyx_t_2);
10780  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10781  __pyx_t_10 = PyNumber_Add(__pyx_t_2, ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 386, __pyx_L1_error)
10782  __Pyx_GOTREF(__pyx_t_10);
10783  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10784  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 386, __pyx_L1_error)
10785  __pyx_v_d_rot = ((PyArrayObject *)__pyx_t_10);
10786  __pyx_t_10 = 0;
10787 
10788  /* "mbd/CouplingFSI.pyx":387
10789  * pivot=self.position)
10790  * -x+h)
10791  * h += d_rot # <<<<<<<<<<<<<<
10792  * if debug is True:
10793  * print("x_new_rot: ", x+h)
10794  */
10795  __pyx_t_10 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_h), ((PyObject *)__pyx_v_d_rot)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 387, __pyx_L1_error)
10796  __Pyx_GOTREF(__pyx_t_10);
10797  if (!(likely(((__pyx_t_10) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_10, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 387, __pyx_L1_error)
10798  __Pyx_DECREF_SET(__pyx_v_h, ((PyArrayObject *)__pyx_t_10));
10799  __pyx_t_10 = 0;
10800 
10801  /* "mbd/CouplingFSI.pyx":381
10802  * print("x_body: ", x+h)
10803  * print("pos_body: ", self.ChBody.GetPos())
10804  * if ang > 0: # <<<<<<<<<<<<<<
10805  * d_rot = (st.rotation3D(points=x+h,
10806  * rot=ang,
10807  */
10808  }
10809 
10810  /* "mbd/CouplingFSI.pyx":388
10811  * -x+h)
10812  * h += d_rot
10813  * if debug is True: # <<<<<<<<<<<<<<
10814  * print("x_new_rot: ", x+h)
10815  * # translate
10816  */
10817  __pyx_t_4 = (__pyx_v_debug == Py_True);
10818  __pyx_t_8 = (__pyx_t_4 != 0);
10819  if (__pyx_t_8) {
10820 
10821  /* "mbd/CouplingFSI.pyx":389
10822  * h += d_rot
10823  * if debug is True:
10824  * print("x_new_rot: ", x+h) # <<<<<<<<<<<<<<
10825  * # translate
10826  * # d_tra = self.velocity*dt_half
10827  */
10828  __pyx_t_10 = PyNumber_Add(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 389, __pyx_L1_error)
10829  __Pyx_GOTREF(__pyx_t_10);
10830  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
10831  __Pyx_GOTREF(__pyx_t_2);
10832  __Pyx_INCREF(__pyx_kp_s_x_new_rot);
10833  __Pyx_GIVEREF(__pyx_kp_s_x_new_rot);
10834  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_s_x_new_rot);
10835  __Pyx_GIVEREF(__pyx_t_10);
10836  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_10);
10837  __pyx_t_10 = 0;
10838  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
10839  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10840 
10841  /* "mbd/CouplingFSI.pyx":388
10842  * -x+h)
10843  * h += d_rot
10844  * if debug is True: # <<<<<<<<<<<<<<
10845  * print("x_new_rot: ", x+h)
10846  * # translate
10847  */
10848  }
10849 
10850  /* "mbd/CouplingFSI.pyx":393
10851  * # d_tra = self.velocity*dt_half
10852  * # h += d_tra
10853  * h += self.h_predict # <<<<<<<<<<<<<<
10854  * if debug is True:
10855  * print("x_new_trarot: ", x+h)
10856  */
10857  __pyx_t_2 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_h), ((PyObject *)__pyx_v_self->h_predict)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
10858  __Pyx_GOTREF(__pyx_t_2);
10859  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 393, __pyx_L1_error)
10860  __Pyx_DECREF_SET(__pyx_v_h, ((PyArrayObject *)__pyx_t_2));
10861  __pyx_t_2 = 0;
10862 
10863  /* "mbd/CouplingFSI.pyx":394
10864  * # h += d_tra
10865  * h += self.h_predict
10866  * if debug is True: # <<<<<<<<<<<<<<
10867  * print("x_new_trarot: ", x+h)
10868  * comm = Comm.get().comm.tompi4py()
10869  */
10870  __pyx_t_8 = (__pyx_v_debug == Py_True);
10871  __pyx_t_4 = (__pyx_t_8 != 0);
10872  if (__pyx_t_4) {
10873 
10874  /* "mbd/CouplingFSI.pyx":395
10875  * h += self.h_predict
10876  * if debug is True:
10877  * print("x_new_trarot: ", x+h) # <<<<<<<<<<<<<<
10878  * comm = Comm.get().comm.tompi4py()
10879  * # print(comm.rank, h, x, t)
10880  */
10881  __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_x), ((PyObject *)__pyx_v_h)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
10882  __Pyx_GOTREF(__pyx_t_2);
10883  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 395, __pyx_L1_error)
10884  __Pyx_GOTREF(__pyx_t_10);
10885  __Pyx_INCREF(__pyx_kp_s_x_new_trarot);
10886  __Pyx_GIVEREF(__pyx_kp_s_x_new_trarot);
10887  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_s_x_new_trarot);
10888  __Pyx_GIVEREF(__pyx_t_2);
10889  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2);
10890  __pyx_t_2 = 0;
10891  if (__Pyx_PrintOne(0, __pyx_t_10) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
10892  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
10893 
10894  /* "mbd/CouplingFSI.pyx":394
10895  * # h += d_tra
10896  * h += self.h_predict
10897  * if debug is True: # <<<<<<<<<<<<<<
10898  * print("x_new_trarot: ", x+h)
10899  * comm = Comm.get().comm.tompi4py()
10900  */
10901  }
10902 
10903  /* "mbd/CouplingFSI.pyx":340
10904  * h_body = np.array([h_body_vec.x(), h_body_vec.y(), h_body_vec.z()])
10905  * h += h_body
10906  * elif self.ProtChSystem.scheme == "ISS": # <<<<<<<<<<<<<<
10907  * # remove previous prediction
10908  * # translate back first
10909  */
10910  }
10911  __pyx_L4:;
10912 
10913  /* "mbd/CouplingFSI.pyx":396
10914  * if debug is True:
10915  * print("x_new_trarot: ", x+h)
10916  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
10917  * # print(comm.rank, h, x, t)
10918  * return h
10919  */
10920  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 396, __pyx_L1_error)
10921  __Pyx_GOTREF(__pyx_t_1);
10922  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 396, __pyx_L1_error)
10923  __Pyx_GOTREF(__pyx_t_5);
10924  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10925  __pyx_t_1 = NULL;
10926  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
10927  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
10928  if (likely(__pyx_t_1)) {
10929  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
10930  __Pyx_INCREF(__pyx_t_1);
10931  __Pyx_INCREF(function);
10932  __Pyx_DECREF_SET(__pyx_t_5, function);
10933  }
10934  }
10935  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
10936  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10937  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
10938  __Pyx_GOTREF(__pyx_t_2);
10939  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10940  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_comm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 396, __pyx_L1_error)
10941  __Pyx_GOTREF(__pyx_t_5);
10942  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10943  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error)
10944  __Pyx_GOTREF(__pyx_t_2);
10945  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10946  __pyx_t_5 = NULL;
10947  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10948  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
10949  if (likely(__pyx_t_5)) {
10950  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10951  __Pyx_INCREF(__pyx_t_5);
10952  __Pyx_INCREF(function);
10953  __Pyx_DECREF_SET(__pyx_t_2, function);
10954  }
10955  }
10956  __pyx_t_10 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
10957  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10958  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 396, __pyx_L1_error)
10959  __Pyx_GOTREF(__pyx_t_10);
10960  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10961  __pyx_v_comm = __pyx_t_10;
10962  __pyx_t_10 = 0;
10963 
10964  /* "mbd/CouplingFSI.pyx":398
10965  * comm = Comm.get().comm.tompi4py()
10966  * # print(comm.rank, h, x, t)
10967  * return h # <<<<<<<<<<<<<<
10968  *
10969  * def hx(self, np.ndarray x, double t):
10970  */
10971  __Pyx_XDECREF(__pyx_r);
10972  __Pyx_INCREF(((PyObject *)__pyx_v_h));
10973  __pyx_r = ((PyObject *)__pyx_v_h);
10974  goto __pyx_L0;
10975 
10976  /* "mbd/CouplingFSI.pyx":322
10977  * self.thisptr.poststep()
10978  *
10979  * def hxyz(self, np.ndarray x, double t, debug=False): # <<<<<<<<<<<<<<
10980  * cdef np.ndarray h
10981  * cdef np.ndarray xx
10982  */
10983 
10984  /* function exit code */
10985  __pyx_L1_error:;
10986  __Pyx_XDECREF(__pyx_t_1);
10987  __Pyx_XDECREF(__pyx_t_2);
10988  __Pyx_XDECREF(__pyx_t_3);
10989  __Pyx_XDECREF(__pyx_t_5);
10990  __Pyx_XDECREF(__pyx_t_6);
10991  __Pyx_XDECREF(__pyx_t_7);
10992  __Pyx_XDECREF(__pyx_t_10);
10993  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hxyz", __pyx_clineno, __pyx_lineno, __pyx_filename);
10994  __pyx_r = NULL;
10995  __pyx_L0:;
10996  __Pyx_XDECREF((PyObject *)__pyx_v_h);
10997  __Pyx_XDECREF((PyObject *)__pyx_v_xx);
10998  __Pyx_XDECREF((PyObject *)__pyx_v_d_rot);
10999  __Pyx_XDECREF((PyObject *)__pyx_v_d_rot_last);
11000  __Pyx_XDECREF((PyObject *)__pyx_v_h_body);
11001  __Pyx_XDECREF(__pyx_v_comm);
11002  __Pyx_XGIVEREF(__pyx_r);
11003  __Pyx_TraceReturn(__pyx_r, 0);
11004  __Pyx_RefNannyFinishContext();
11005  return __pyx_r;
11006 }
11007 
11008 /* "mbd/CouplingFSI.pyx":400
11009  * return h
11010  *
11011  * def hx(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11012  * """BC function for mesh nodes displacement (x component)
11013  *
11014  */
11015 
11016 /* Python wrapper */
11017 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_25hx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11018 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_24hx[] = "ProtChBody.hx(self, ndarray x, double t)\nBC function for mesh nodes displacement (x component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
11019 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_25hx = {"hx", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_25hx, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_24hx};
11020 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_25hx(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11021  PyArrayObject *__pyx_v_x = 0;
11022  double __pyx_v_t;
11023  int __pyx_lineno = 0;
11024  const char *__pyx_filename = NULL;
11025  int __pyx_clineno = 0;
11026  PyObject *__pyx_r = 0;
11027  __Pyx_RefNannyDeclarations
11028  __Pyx_RefNannySetupContext("hx (wrapper)", 0);
11029  {
11030  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
11031  PyObject* values[2] = {0,0};
11032  if (unlikely(__pyx_kwds)) {
11033  Py_ssize_t kw_args;
11034  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11035  switch (pos_args) {
11036  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11037  CYTHON_FALLTHROUGH;
11038  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11039  CYTHON_FALLTHROUGH;
11040  case 0: break;
11041  default: goto __pyx_L5_argtuple_error;
11042  }
11043  kw_args = PyDict_Size(__pyx_kwds);
11044  switch (pos_args) {
11045  case 0:
11046  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
11047  else goto __pyx_L5_argtuple_error;
11048  CYTHON_FALLTHROUGH;
11049  case 1:
11050  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
11051  else {
11052  __Pyx_RaiseArgtupleInvalid("hx", 1, 2, 2, 1); __PYX_ERR(0, 400, __pyx_L3_error)
11053  }
11054  }
11055  if (unlikely(kw_args > 0)) {
11056  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hx") < 0)) __PYX_ERR(0, 400, __pyx_L3_error)
11057  }
11058  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11059  goto __pyx_L5_argtuple_error;
11060  } else {
11061  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11062  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11063  }
11064  __pyx_v_x = ((PyArrayObject *)values[0]);
11065  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 400, __pyx_L3_error)
11066  }
11067  goto __pyx_L4_argument_unpacking_done;
11068  __pyx_L5_argtuple_error:;
11069  __Pyx_RaiseArgtupleInvalid("hx", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 400, __pyx_L3_error)
11070  __pyx_L3_error:;
11071  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hx", __pyx_clineno, __pyx_lineno, __pyx_filename);
11072  __Pyx_RefNannyFinishContext();
11073  return NULL;
11074  __pyx_L4_argument_unpacking_done:;
11075  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 400, __pyx_L1_error)
11076  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_24hx(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
11077 
11078  /* function exit code */
11079  goto __pyx_L0;
11080  __pyx_L1_error:;
11081  __pyx_r = NULL;
11082  __pyx_L0:;
11083  __Pyx_RefNannyFinishContext();
11084  return __pyx_r;
11085 }
11086 
11087 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_24hx(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t) {
11088  PyObject *__pyx_r = NULL;
11089  __Pyx_TraceDeclarations
11090  __Pyx_RefNannyDeclarations
11091  PyObject *__pyx_t_1 = NULL;
11092  PyObject *__pyx_t_2 = NULL;
11093  PyObject *__pyx_t_3 = NULL;
11094  PyObject *__pyx_t_4 = NULL;
11095  int __pyx_t_5;
11096  PyObject *__pyx_t_6 = NULL;
11097  int __pyx_lineno = 0;
11098  const char *__pyx_filename = NULL;
11099  int __pyx_clineno = 0;
11100  __Pyx_TraceFrameInit(__pyx_codeobj__18)
11101  __Pyx_RefNannySetupContext("hx", 0);
11102  __Pyx_TraceCall("hx", __pyx_f[0], 400, 0, __PYX_ERR(0, 400, __pyx_L1_error));
11103 
11104  /* "mbd/CouplingFSI.pyx":410
11105  * simulation time
11106  * """
11107  * return self.hxyz(x, t)[0] # <<<<<<<<<<<<<<
11108  *
11109  * def hy(self, np.ndarray x, double t):
11110  */
11111  __Pyx_XDECREF(__pyx_r);
11112  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hxyz); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
11113  __Pyx_GOTREF(__pyx_t_2);
11114  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error)
11115  __Pyx_GOTREF(__pyx_t_3);
11116  __pyx_t_4 = NULL;
11117  __pyx_t_5 = 0;
11118  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11119  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
11120  if (likely(__pyx_t_4)) {
11121  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11122  __Pyx_INCREF(__pyx_t_4);
11123  __Pyx_INCREF(function);
11124  __Pyx_DECREF_SET(__pyx_t_2, function);
11125  __pyx_t_5 = 1;
11126  }
11127  }
11128  #if CYTHON_FAST_PYCALL
11129  if (PyFunction_Check(__pyx_t_2)) {
11130  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
11131  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
11132  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11133  __Pyx_GOTREF(__pyx_t_1);
11134  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11135  } else
11136  #endif
11137  #if CYTHON_FAST_PYCCALL
11138  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
11139  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
11140  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
11141  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11142  __Pyx_GOTREF(__pyx_t_1);
11143  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11144  } else
11145  #endif
11146  {
11147  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L1_error)
11148  __Pyx_GOTREF(__pyx_t_6);
11149  if (__pyx_t_4) {
11150  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
11151  }
11152  __Pyx_INCREF(((PyObject *)__pyx_v_x));
11153  __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
11154  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_x));
11155  __Pyx_GIVEREF(__pyx_t_3);
11156  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
11157  __pyx_t_3 = 0;
11158  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
11159  __Pyx_GOTREF(__pyx_t_1);
11160  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11161  }
11162  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11163  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
11164  __Pyx_GOTREF(__pyx_t_2);
11165  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11166  __pyx_r = __pyx_t_2;
11167  __pyx_t_2 = 0;
11168  goto __pyx_L0;
11169 
11170  /* "mbd/CouplingFSI.pyx":400
11171  * return h
11172  *
11173  * def hx(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11174  * """BC function for mesh nodes displacement (x component)
11175  *
11176  */
11177 
11178  /* function exit code */
11179  __pyx_L1_error:;
11180  __Pyx_XDECREF(__pyx_t_1);
11181  __Pyx_XDECREF(__pyx_t_2);
11182  __Pyx_XDECREF(__pyx_t_3);
11183  __Pyx_XDECREF(__pyx_t_4);
11184  __Pyx_XDECREF(__pyx_t_6);
11185  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hx", __pyx_clineno, __pyx_lineno, __pyx_filename);
11186  __pyx_r = NULL;
11187  __pyx_L0:;
11188  __Pyx_XGIVEREF(__pyx_r);
11189  __Pyx_TraceReturn(__pyx_r, 0);
11190  __Pyx_RefNannyFinishContext();
11191  return __pyx_r;
11192 }
11193 
11194 /* "mbd/CouplingFSI.pyx":412
11195  * return self.hxyz(x, t)[0]
11196  *
11197  * def hy(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11198  * """BC function for mesh nodes displacement (y component)
11199  *
11200  */
11201 
11202 /* Python wrapper */
11203 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_27hy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11204 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_26hy[] = "ProtChBody.hy(self, ndarray x, double t)\nBC function for mesh nodes displacement (y component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
11205 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_27hy = {"hy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_27hy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_26hy};
11206 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_27hy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11207  PyArrayObject *__pyx_v_x = 0;
11208  double __pyx_v_t;
11209  int __pyx_lineno = 0;
11210  const char *__pyx_filename = NULL;
11211  int __pyx_clineno = 0;
11212  PyObject *__pyx_r = 0;
11213  __Pyx_RefNannyDeclarations
11214  __Pyx_RefNannySetupContext("hy (wrapper)", 0);
11215  {
11216  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
11217  PyObject* values[2] = {0,0};
11218  if (unlikely(__pyx_kwds)) {
11219  Py_ssize_t kw_args;
11220  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11221  switch (pos_args) {
11222  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11223  CYTHON_FALLTHROUGH;
11224  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11225  CYTHON_FALLTHROUGH;
11226  case 0: break;
11227  default: goto __pyx_L5_argtuple_error;
11228  }
11229  kw_args = PyDict_Size(__pyx_kwds);
11230  switch (pos_args) {
11231  case 0:
11232  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
11233  else goto __pyx_L5_argtuple_error;
11234  CYTHON_FALLTHROUGH;
11235  case 1:
11236  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
11237  else {
11238  __Pyx_RaiseArgtupleInvalid("hy", 1, 2, 2, 1); __PYX_ERR(0, 412, __pyx_L3_error)
11239  }
11240  }
11241  if (unlikely(kw_args > 0)) {
11242  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hy") < 0)) __PYX_ERR(0, 412, __pyx_L3_error)
11243  }
11244  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11245  goto __pyx_L5_argtuple_error;
11246  } else {
11247  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11248  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11249  }
11250  __pyx_v_x = ((PyArrayObject *)values[0]);
11251  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 412, __pyx_L3_error)
11252  }
11253  goto __pyx_L4_argument_unpacking_done;
11254  __pyx_L5_argtuple_error:;
11255  __Pyx_RaiseArgtupleInvalid("hy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 412, __pyx_L3_error)
11256  __pyx_L3_error:;
11257  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hy", __pyx_clineno, __pyx_lineno, __pyx_filename);
11258  __Pyx_RefNannyFinishContext();
11259  return NULL;
11260  __pyx_L4_argument_unpacking_done:;
11261  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 412, __pyx_L1_error)
11262  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26hy(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
11263 
11264  /* function exit code */
11265  goto __pyx_L0;
11266  __pyx_L1_error:;
11267  __pyx_r = NULL;
11268  __pyx_L0:;
11269  __Pyx_RefNannyFinishContext();
11270  return __pyx_r;
11271 }
11272 
11273 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26hy(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t) {
11274  PyObject *__pyx_r = NULL;
11275  __Pyx_TraceDeclarations
11276  __Pyx_RefNannyDeclarations
11277  PyObject *__pyx_t_1 = NULL;
11278  PyObject *__pyx_t_2 = NULL;
11279  PyObject *__pyx_t_3 = NULL;
11280  PyObject *__pyx_t_4 = NULL;
11281  int __pyx_t_5;
11282  PyObject *__pyx_t_6 = NULL;
11283  int __pyx_lineno = 0;
11284  const char *__pyx_filename = NULL;
11285  int __pyx_clineno = 0;
11286  __Pyx_TraceFrameInit(__pyx_codeobj__19)
11287  __Pyx_RefNannySetupContext("hy", 0);
11288  __Pyx_TraceCall("hy", __pyx_f[0], 412, 0, __PYX_ERR(0, 412, __pyx_L1_error));
11289 
11290  /* "mbd/CouplingFSI.pyx":422
11291  * simulation time
11292  * """
11293  * return self.hxyz(x, t)[1] # <<<<<<<<<<<<<<
11294  *
11295  * def hz(self, np.ndarray x, double t):
11296  */
11297  __Pyx_XDECREF(__pyx_r);
11298  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hxyz); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
11299  __Pyx_GOTREF(__pyx_t_2);
11300  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 422, __pyx_L1_error)
11301  __Pyx_GOTREF(__pyx_t_3);
11302  __pyx_t_4 = NULL;
11303  __pyx_t_5 = 0;
11304  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11305  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
11306  if (likely(__pyx_t_4)) {
11307  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11308  __Pyx_INCREF(__pyx_t_4);
11309  __Pyx_INCREF(function);
11310  __Pyx_DECREF_SET(__pyx_t_2, function);
11311  __pyx_t_5 = 1;
11312  }
11313  }
11314  #if CYTHON_FAST_PYCALL
11315  if (PyFunction_Check(__pyx_t_2)) {
11316  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
11317  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
11318  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11319  __Pyx_GOTREF(__pyx_t_1);
11320  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11321  } else
11322  #endif
11323  #if CYTHON_FAST_PYCCALL
11324  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
11325  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
11326  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
11327  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11328  __Pyx_GOTREF(__pyx_t_1);
11329  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11330  } else
11331  #endif
11332  {
11333  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 422, __pyx_L1_error)
11334  __Pyx_GOTREF(__pyx_t_6);
11335  if (__pyx_t_4) {
11336  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
11337  }
11338  __Pyx_INCREF(((PyObject *)__pyx_v_x));
11339  __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
11340  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_x));
11341  __Pyx_GIVEREF(__pyx_t_3);
11342  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
11343  __pyx_t_3 = 0;
11344  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 422, __pyx_L1_error)
11345  __Pyx_GOTREF(__pyx_t_1);
11346  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11347  }
11348  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11349  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 422, __pyx_L1_error)
11350  __Pyx_GOTREF(__pyx_t_2);
11351  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11352  __pyx_r = __pyx_t_2;
11353  __pyx_t_2 = 0;
11354  goto __pyx_L0;
11355 
11356  /* "mbd/CouplingFSI.pyx":412
11357  * return self.hxyz(x, t)[0]
11358  *
11359  * def hy(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11360  * """BC function for mesh nodes displacement (y component)
11361  *
11362  */
11363 
11364  /* function exit code */
11365  __pyx_L1_error:;
11366  __Pyx_XDECREF(__pyx_t_1);
11367  __Pyx_XDECREF(__pyx_t_2);
11368  __Pyx_XDECREF(__pyx_t_3);
11369  __Pyx_XDECREF(__pyx_t_4);
11370  __Pyx_XDECREF(__pyx_t_6);
11371  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hy", __pyx_clineno, __pyx_lineno, __pyx_filename);
11372  __pyx_r = NULL;
11373  __pyx_L0:;
11374  __Pyx_XGIVEREF(__pyx_r);
11375  __Pyx_TraceReturn(__pyx_r, 0);
11376  __Pyx_RefNannyFinishContext();
11377  return __pyx_r;
11378 }
11379 
11380 /* "mbd/CouplingFSI.pyx":424
11381  * return self.hxyz(x, t)[1]
11382  *
11383  * def hz(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11384  * """BC function for mesh nodes displacement (z component)
11385  *
11386  */
11387 
11388 /* Python wrapper */
11389 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_29hz(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11390 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_28hz[] = "ProtChBody.hz(self, ndarray x, double t)\nBC function for mesh nodes displacement (z component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
11391 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_29hz = {"hz", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_29hz, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_28hz};
11392 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_29hz(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11393  PyArrayObject *__pyx_v_x = 0;
11394  double __pyx_v_t;
11395  int __pyx_lineno = 0;
11396  const char *__pyx_filename = NULL;
11397  int __pyx_clineno = 0;
11398  PyObject *__pyx_r = 0;
11399  __Pyx_RefNannyDeclarations
11400  __Pyx_RefNannySetupContext("hz (wrapper)", 0);
11401  {
11402  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
11403  PyObject* values[2] = {0,0};
11404  if (unlikely(__pyx_kwds)) {
11405  Py_ssize_t kw_args;
11406  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11407  switch (pos_args) {
11408  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11409  CYTHON_FALLTHROUGH;
11410  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11411  CYTHON_FALLTHROUGH;
11412  case 0: break;
11413  default: goto __pyx_L5_argtuple_error;
11414  }
11415  kw_args = PyDict_Size(__pyx_kwds);
11416  switch (pos_args) {
11417  case 0:
11418  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
11419  else goto __pyx_L5_argtuple_error;
11420  CYTHON_FALLTHROUGH;
11421  case 1:
11422  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
11423  else {
11424  __Pyx_RaiseArgtupleInvalid("hz", 1, 2, 2, 1); __PYX_ERR(0, 424, __pyx_L3_error)
11425  }
11426  }
11427  if (unlikely(kw_args > 0)) {
11428  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hz") < 0)) __PYX_ERR(0, 424, __pyx_L3_error)
11429  }
11430  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11431  goto __pyx_L5_argtuple_error;
11432  } else {
11433  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11434  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11435  }
11436  __pyx_v_x = ((PyArrayObject *)values[0]);
11437  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L3_error)
11438  }
11439  goto __pyx_L4_argument_unpacking_done;
11440  __pyx_L5_argtuple_error:;
11441  __Pyx_RaiseArgtupleInvalid("hz", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 424, __pyx_L3_error)
11442  __pyx_L3_error:;
11443  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hz", __pyx_clineno, __pyx_lineno, __pyx_filename);
11444  __Pyx_RefNannyFinishContext();
11445  return NULL;
11446  __pyx_L4_argument_unpacking_done:;
11447  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 424, __pyx_L1_error)
11448  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_28hz(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
11449 
11450  /* function exit code */
11451  goto __pyx_L0;
11452  __pyx_L1_error:;
11453  __pyx_r = NULL;
11454  __pyx_L0:;
11455  __Pyx_RefNannyFinishContext();
11456  return __pyx_r;
11457 }
11458 
11459 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_28hz(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t) {
11460  PyObject *__pyx_r = NULL;
11461  __Pyx_TraceDeclarations
11462  __Pyx_RefNannyDeclarations
11463  PyObject *__pyx_t_1 = NULL;
11464  PyObject *__pyx_t_2 = NULL;
11465  PyObject *__pyx_t_3 = NULL;
11466  PyObject *__pyx_t_4 = NULL;
11467  int __pyx_t_5;
11468  PyObject *__pyx_t_6 = NULL;
11469  int __pyx_lineno = 0;
11470  const char *__pyx_filename = NULL;
11471  int __pyx_clineno = 0;
11472  __Pyx_TraceFrameInit(__pyx_codeobj__20)
11473  __Pyx_RefNannySetupContext("hz", 0);
11474  __Pyx_TraceCall("hz", __pyx_f[0], 424, 0, __PYX_ERR(0, 424, __pyx_L1_error));
11475 
11476  /* "mbd/CouplingFSI.pyx":434
11477  * simulation time
11478  * """
11479  * return self.hxyz(x, t)[2] # <<<<<<<<<<<<<<
11480  *
11481  * def hx_translation(self, np.ndarray x, double t):
11482  */
11483  __Pyx_XDECREF(__pyx_r);
11484  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hxyz); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error)
11485  __Pyx_GOTREF(__pyx_t_2);
11486  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error)
11487  __Pyx_GOTREF(__pyx_t_3);
11488  __pyx_t_4 = NULL;
11489  __pyx_t_5 = 0;
11490  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11491  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
11492  if (likely(__pyx_t_4)) {
11493  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11494  __Pyx_INCREF(__pyx_t_4);
11495  __Pyx_INCREF(function);
11496  __Pyx_DECREF_SET(__pyx_t_2, function);
11497  __pyx_t_5 = 1;
11498  }
11499  }
11500  #if CYTHON_FAST_PYCALL
11501  if (PyFunction_Check(__pyx_t_2)) {
11502  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
11503  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
11504  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11505  __Pyx_GOTREF(__pyx_t_1);
11506  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11507  } else
11508  #endif
11509  #if CYTHON_FAST_PYCCALL
11510  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
11511  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
11512  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
11513  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11514  __Pyx_GOTREF(__pyx_t_1);
11515  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11516  } else
11517  #endif
11518  {
11519  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 434, __pyx_L1_error)
11520  __Pyx_GOTREF(__pyx_t_6);
11521  if (__pyx_t_4) {
11522  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
11523  }
11524  __Pyx_INCREF(((PyObject *)__pyx_v_x));
11525  __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
11526  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_x));
11527  __Pyx_GIVEREF(__pyx_t_3);
11528  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
11529  __pyx_t_3 = 0;
11530  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L1_error)
11531  __Pyx_GOTREF(__pyx_t_1);
11532  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
11533  }
11534  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11535  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L1_error)
11536  __Pyx_GOTREF(__pyx_t_2);
11537  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11538  __pyx_r = __pyx_t_2;
11539  __pyx_t_2 = 0;
11540  goto __pyx_L0;
11541 
11542  /* "mbd/CouplingFSI.pyx":424
11543  * return self.hxyz(x, t)[1]
11544  *
11545  * def hz(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11546  * """BC function for mesh nodes displacement (z component)
11547  *
11548  */
11549 
11550  /* function exit code */
11551  __pyx_L1_error:;
11552  __Pyx_XDECREF(__pyx_t_1);
11553  __Pyx_XDECREF(__pyx_t_2);
11554  __Pyx_XDECREF(__pyx_t_3);
11555  __Pyx_XDECREF(__pyx_t_4);
11556  __Pyx_XDECREF(__pyx_t_6);
11557  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hz", __pyx_clineno, __pyx_lineno, __pyx_filename);
11558  __pyx_r = NULL;
11559  __pyx_L0:;
11560  __Pyx_XGIVEREF(__pyx_r);
11561  __Pyx_TraceReturn(__pyx_r, 0);
11562  __Pyx_RefNannyFinishContext();
11563  return __pyx_r;
11564 }
11565 
11566 /* "mbd/CouplingFSI.pyx":436
11567  * return self.hxyz(x, t)[2]
11568  *
11569  * def hx_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11570  * """BC function for mesh nodes displacement (x component)
11571  *
11572  */
11573 
11574 /* Python wrapper */
11575 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_31hx_translation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11576 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_30hx_translation[] = "ProtChBody.hx_translation(self, ndarray x, double t)\nBC function for mesh nodes displacement (x component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
11577 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_31hx_translation = {"hx_translation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_31hx_translation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_30hx_translation};
11578 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_31hx_translation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11579  CYTHON_UNUSED PyArrayObject *__pyx_v_x = 0;
11580  CYTHON_UNUSED double __pyx_v_t;
11581  int __pyx_lineno = 0;
11582  const char *__pyx_filename = NULL;
11583  int __pyx_clineno = 0;
11584  PyObject *__pyx_r = 0;
11585  __Pyx_RefNannyDeclarations
11586  __Pyx_RefNannySetupContext("hx_translation (wrapper)", 0);
11587  {
11588  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
11589  PyObject* values[2] = {0,0};
11590  if (unlikely(__pyx_kwds)) {
11591  Py_ssize_t kw_args;
11592  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11593  switch (pos_args) {
11594  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11595  CYTHON_FALLTHROUGH;
11596  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11597  CYTHON_FALLTHROUGH;
11598  case 0: break;
11599  default: goto __pyx_L5_argtuple_error;
11600  }
11601  kw_args = PyDict_Size(__pyx_kwds);
11602  switch (pos_args) {
11603  case 0:
11604  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
11605  else goto __pyx_L5_argtuple_error;
11606  CYTHON_FALLTHROUGH;
11607  case 1:
11608  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
11609  else {
11610  __Pyx_RaiseArgtupleInvalid("hx_translation", 1, 2, 2, 1); __PYX_ERR(0, 436, __pyx_L3_error)
11611  }
11612  }
11613  if (unlikely(kw_args > 0)) {
11614  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hx_translation") < 0)) __PYX_ERR(0, 436, __pyx_L3_error)
11615  }
11616  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11617  goto __pyx_L5_argtuple_error;
11618  } else {
11619  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11620  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11621  }
11622  __pyx_v_x = ((PyArrayObject *)values[0]);
11623  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 436, __pyx_L3_error)
11624  }
11625  goto __pyx_L4_argument_unpacking_done;
11626  __pyx_L5_argtuple_error:;
11627  __Pyx_RaiseArgtupleInvalid("hx_translation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 436, __pyx_L3_error)
11628  __pyx_L3_error:;
11629  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hx_translation", __pyx_clineno, __pyx_lineno, __pyx_filename);
11630  __Pyx_RefNannyFinishContext();
11631  return NULL;
11632  __pyx_L4_argument_unpacking_done:;
11633  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 436, __pyx_L1_error)
11634  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_30hx_translation(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
11635 
11636  /* function exit code */
11637  goto __pyx_L0;
11638  __pyx_L1_error:;
11639  __pyx_r = NULL;
11640  __pyx_L0:;
11641  __Pyx_RefNannyFinishContext();
11642  return __pyx_r;
11643 }
11644 
11645 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_30hx_translation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_x, CYTHON_UNUSED double __pyx_v_t) {
11646  PyObject *__pyx_r = NULL;
11647  __Pyx_TraceDeclarations
11648  __Pyx_RefNannyDeclarations
11649  PyObject *__pyx_t_1 = NULL;
11650  PyObject *__pyx_t_2 = NULL;
11651  int __pyx_lineno = 0;
11652  const char *__pyx_filename = NULL;
11653  int __pyx_clineno = 0;
11654  __Pyx_TraceFrameInit(__pyx_codeobj__21)
11655  __Pyx_RefNannySetupContext("hx_translation", 0);
11656  __Pyx_TraceCall("hx_translation", __pyx_f[0], 436, 0, __PYX_ERR(0, 436, __pyx_L1_error));
11657 
11658  /* "mbd/CouplingFSI.pyx":446
11659  * simulation time
11660  * """
11661  * return (self.position-self.position_last)[0] # <<<<<<<<<<<<<<
11662  *
11663  * def hy_translation(self, np.ndarray x, double t):
11664  */
11665  __Pyx_XDECREF(__pyx_r);
11666  __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_self->position), ((PyObject *)__pyx_v_self->position_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
11667  __Pyx_GOTREF(__pyx_t_1);
11668  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
11669  __Pyx_GOTREF(__pyx_t_2);
11670  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11671  __pyx_r = __pyx_t_2;
11672  __pyx_t_2 = 0;
11673  goto __pyx_L0;
11674 
11675  /* "mbd/CouplingFSI.pyx":436
11676  * return self.hxyz(x, t)[2]
11677  *
11678  * def hx_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11679  * """BC function for mesh nodes displacement (x component)
11680  *
11681  */
11682 
11683  /* function exit code */
11684  __pyx_L1_error:;
11685  __Pyx_XDECREF(__pyx_t_1);
11686  __Pyx_XDECREF(__pyx_t_2);
11687  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hx_translation", __pyx_clineno, __pyx_lineno, __pyx_filename);
11688  __pyx_r = NULL;
11689  __pyx_L0:;
11690  __Pyx_XGIVEREF(__pyx_r);
11691  __Pyx_TraceReturn(__pyx_r, 0);
11692  __Pyx_RefNannyFinishContext();
11693  return __pyx_r;
11694 }
11695 
11696 /* "mbd/CouplingFSI.pyx":448
11697  * return (self.position-self.position_last)[0]
11698  *
11699  * def hy_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11700  * """BC function for mesh nodes displacement (y component)
11701  *
11702  */
11703 
11704 /* Python wrapper */
11705 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_33hy_translation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11706 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_32hy_translation[] = "ProtChBody.hy_translation(self, ndarray x, double t)\nBC function for mesh nodes displacement (y component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
11707 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_33hy_translation = {"hy_translation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_33hy_translation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_32hy_translation};
11708 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_33hy_translation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11709  CYTHON_UNUSED PyArrayObject *__pyx_v_x = 0;
11710  CYTHON_UNUSED double __pyx_v_t;
11711  int __pyx_lineno = 0;
11712  const char *__pyx_filename = NULL;
11713  int __pyx_clineno = 0;
11714  PyObject *__pyx_r = 0;
11715  __Pyx_RefNannyDeclarations
11716  __Pyx_RefNannySetupContext("hy_translation (wrapper)", 0);
11717  {
11718  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
11719  PyObject* values[2] = {0,0};
11720  if (unlikely(__pyx_kwds)) {
11721  Py_ssize_t kw_args;
11722  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11723  switch (pos_args) {
11724  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11725  CYTHON_FALLTHROUGH;
11726  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11727  CYTHON_FALLTHROUGH;
11728  case 0: break;
11729  default: goto __pyx_L5_argtuple_error;
11730  }
11731  kw_args = PyDict_Size(__pyx_kwds);
11732  switch (pos_args) {
11733  case 0:
11734  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
11735  else goto __pyx_L5_argtuple_error;
11736  CYTHON_FALLTHROUGH;
11737  case 1:
11738  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
11739  else {
11740  __Pyx_RaiseArgtupleInvalid("hy_translation", 1, 2, 2, 1); __PYX_ERR(0, 448, __pyx_L3_error)
11741  }
11742  }
11743  if (unlikely(kw_args > 0)) {
11744  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hy_translation") < 0)) __PYX_ERR(0, 448, __pyx_L3_error)
11745  }
11746  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11747  goto __pyx_L5_argtuple_error;
11748  } else {
11749  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11750  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11751  }
11752  __pyx_v_x = ((PyArrayObject *)values[0]);
11753  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 448, __pyx_L3_error)
11754  }
11755  goto __pyx_L4_argument_unpacking_done;
11756  __pyx_L5_argtuple_error:;
11757  __Pyx_RaiseArgtupleInvalid("hy_translation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 448, __pyx_L3_error)
11758  __pyx_L3_error:;
11759  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hy_translation", __pyx_clineno, __pyx_lineno, __pyx_filename);
11760  __Pyx_RefNannyFinishContext();
11761  return NULL;
11762  __pyx_L4_argument_unpacking_done:;
11763  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 448, __pyx_L1_error)
11764  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_32hy_translation(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
11765 
11766  /* function exit code */
11767  goto __pyx_L0;
11768  __pyx_L1_error:;
11769  __pyx_r = NULL;
11770  __pyx_L0:;
11771  __Pyx_RefNannyFinishContext();
11772  return __pyx_r;
11773 }
11774 
11775 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_32hy_translation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_x, CYTHON_UNUSED double __pyx_v_t) {
11776  PyObject *__pyx_r = NULL;
11777  __Pyx_TraceDeclarations
11778  __Pyx_RefNannyDeclarations
11779  PyObject *__pyx_t_1 = NULL;
11780  PyObject *__pyx_t_2 = NULL;
11781  int __pyx_lineno = 0;
11782  const char *__pyx_filename = NULL;
11783  int __pyx_clineno = 0;
11784  __Pyx_TraceFrameInit(__pyx_codeobj__22)
11785  __Pyx_RefNannySetupContext("hy_translation", 0);
11786  __Pyx_TraceCall("hy_translation", __pyx_f[0], 448, 0, __PYX_ERR(0, 448, __pyx_L1_error));
11787 
11788  /* "mbd/CouplingFSI.pyx":458
11789  * simulation time
11790  * """
11791  * return (self.position-self.position_last)[1] # <<<<<<<<<<<<<<
11792  *
11793  * def hz_translation(self, np.ndarray x, double t):
11794  */
11795  __Pyx_XDECREF(__pyx_r);
11796  __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_self->position), ((PyObject *)__pyx_v_self->position_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
11797  __Pyx_GOTREF(__pyx_t_1);
11798  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error)
11799  __Pyx_GOTREF(__pyx_t_2);
11800  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11801  __pyx_r = __pyx_t_2;
11802  __pyx_t_2 = 0;
11803  goto __pyx_L0;
11804 
11805  /* "mbd/CouplingFSI.pyx":448
11806  * return (self.position-self.position_last)[0]
11807  *
11808  * def hy_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11809  * """BC function for mesh nodes displacement (y component)
11810  *
11811  */
11812 
11813  /* function exit code */
11814  __pyx_L1_error:;
11815  __Pyx_XDECREF(__pyx_t_1);
11816  __Pyx_XDECREF(__pyx_t_2);
11817  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hy_translation", __pyx_clineno, __pyx_lineno, __pyx_filename);
11818  __pyx_r = NULL;
11819  __pyx_L0:;
11820  __Pyx_XGIVEREF(__pyx_r);
11821  __Pyx_TraceReturn(__pyx_r, 0);
11822  __Pyx_RefNannyFinishContext();
11823  return __pyx_r;
11824 }
11825 
11826 /* "mbd/CouplingFSI.pyx":460
11827  * return (self.position-self.position_last)[1]
11828  *
11829  * def hz_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11830  * """BC function for mesh nodes displacement (z component)
11831  *
11832  */
11833 
11834 /* Python wrapper */
11835 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_35hz_translation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11836 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_34hz_translation[] = "ProtChBody.hz_translation(self, ndarray x, double t)\nBC function for mesh nodes displacement (z component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
11837 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_35hz_translation = {"hz_translation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_35hz_translation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_34hz_translation};
11838 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_35hz_translation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11839  CYTHON_UNUSED PyArrayObject *__pyx_v_x = 0;
11840  CYTHON_UNUSED double __pyx_v_t;
11841  int __pyx_lineno = 0;
11842  const char *__pyx_filename = NULL;
11843  int __pyx_clineno = 0;
11844  PyObject *__pyx_r = 0;
11845  __Pyx_RefNannyDeclarations
11846  __Pyx_RefNannySetupContext("hz_translation (wrapper)", 0);
11847  {
11848  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
11849  PyObject* values[2] = {0,0};
11850  if (unlikely(__pyx_kwds)) {
11851  Py_ssize_t kw_args;
11852  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11853  switch (pos_args) {
11854  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11855  CYTHON_FALLTHROUGH;
11856  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11857  CYTHON_FALLTHROUGH;
11858  case 0: break;
11859  default: goto __pyx_L5_argtuple_error;
11860  }
11861  kw_args = PyDict_Size(__pyx_kwds);
11862  switch (pos_args) {
11863  case 0:
11864  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
11865  else goto __pyx_L5_argtuple_error;
11866  CYTHON_FALLTHROUGH;
11867  case 1:
11868  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
11869  else {
11870  __Pyx_RaiseArgtupleInvalid("hz_translation", 1, 2, 2, 1); __PYX_ERR(0, 460, __pyx_L3_error)
11871  }
11872  }
11873  if (unlikely(kw_args > 0)) {
11874  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hz_translation") < 0)) __PYX_ERR(0, 460, __pyx_L3_error)
11875  }
11876  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11877  goto __pyx_L5_argtuple_error;
11878  } else {
11879  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11880  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11881  }
11882  __pyx_v_x = ((PyArrayObject *)values[0]);
11883  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 460, __pyx_L3_error)
11884  }
11885  goto __pyx_L4_argument_unpacking_done;
11886  __pyx_L5_argtuple_error:;
11887  __Pyx_RaiseArgtupleInvalid("hz_translation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 460, __pyx_L3_error)
11888  __pyx_L3_error:;
11889  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hz_translation", __pyx_clineno, __pyx_lineno, __pyx_filename);
11890  __Pyx_RefNannyFinishContext();
11891  return NULL;
11892  __pyx_L4_argument_unpacking_done:;
11893  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 460, __pyx_L1_error)
11894  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_34hz_translation(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
11895 
11896  /* function exit code */
11897  goto __pyx_L0;
11898  __pyx_L1_error:;
11899  __pyx_r = NULL;
11900  __pyx_L0:;
11901  __Pyx_RefNannyFinishContext();
11902  return __pyx_r;
11903 }
11904 
11905 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_34hz_translation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyArrayObject *__pyx_v_x, CYTHON_UNUSED double __pyx_v_t) {
11906  PyObject *__pyx_r = NULL;
11907  __Pyx_TraceDeclarations
11908  __Pyx_RefNannyDeclarations
11909  PyObject *__pyx_t_1 = NULL;
11910  PyObject *__pyx_t_2 = NULL;
11911  int __pyx_lineno = 0;
11912  const char *__pyx_filename = NULL;
11913  int __pyx_clineno = 0;
11914  __Pyx_TraceFrameInit(__pyx_codeobj__23)
11915  __Pyx_RefNannySetupContext("hz_translation", 0);
11916  __Pyx_TraceCall("hz_translation", __pyx_f[0], 460, 0, __PYX_ERR(0, 460, __pyx_L1_error));
11917 
11918  /* "mbd/CouplingFSI.pyx":470
11919  * simulation time
11920  * """
11921  * return (self.position-self.position_last)[2] # <<<<<<<<<<<<<<
11922  *
11923  * def hx_rotation(self, np.ndarray x, double t):
11924  */
11925  __Pyx_XDECREF(__pyx_r);
11926  __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_self->position), ((PyObject *)__pyx_v_self->position_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
11927  __Pyx_GOTREF(__pyx_t_1);
11928  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 470, __pyx_L1_error)
11929  __Pyx_GOTREF(__pyx_t_2);
11930  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11931  __pyx_r = __pyx_t_2;
11932  __pyx_t_2 = 0;
11933  goto __pyx_L0;
11934 
11935  /* "mbd/CouplingFSI.pyx":460
11936  * return (self.position-self.position_last)[1]
11937  *
11938  * def hz_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11939  * """BC function for mesh nodes displacement (z component)
11940  *
11941  */
11942 
11943  /* function exit code */
11944  __pyx_L1_error:;
11945  __Pyx_XDECREF(__pyx_t_1);
11946  __Pyx_XDECREF(__pyx_t_2);
11947  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hz_translation", __pyx_clineno, __pyx_lineno, __pyx_filename);
11948  __pyx_r = NULL;
11949  __pyx_L0:;
11950  __Pyx_XGIVEREF(__pyx_r);
11951  __Pyx_TraceReturn(__pyx_r, 0);
11952  __Pyx_RefNannyFinishContext();
11953  return __pyx_r;
11954 }
11955 
11956 /* "mbd/CouplingFSI.pyx":472
11957  * return (self.position-self.position_last)[2]
11958  *
11959  * def hx_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
11960  * """BC function for mesh nodes displacement (x component)
11961  *
11962  */
11963 
11964 /* Python wrapper */
11965 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_37hx_rotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11966 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_36hx_rotation[] = "ProtChBody.hx_rotation(self, ndarray x, double t)\nBC function for mesh nodes displacement (x component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
11967 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_37hx_rotation = {"hx_rotation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_37hx_rotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_36hx_rotation};
11968 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_37hx_rotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11969  PyArrayObject *__pyx_v_x = 0;
11970  double __pyx_v_t;
11971  int __pyx_lineno = 0;
11972  const char *__pyx_filename = NULL;
11973  int __pyx_clineno = 0;
11974  PyObject *__pyx_r = 0;
11975  __Pyx_RefNannyDeclarations
11976  __Pyx_RefNannySetupContext("hx_rotation (wrapper)", 0);
11977  {
11978  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
11979  PyObject* values[2] = {0,0};
11980  if (unlikely(__pyx_kwds)) {
11981  Py_ssize_t kw_args;
11982  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11983  switch (pos_args) {
11984  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11985  CYTHON_FALLTHROUGH;
11986  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11987  CYTHON_FALLTHROUGH;
11988  case 0: break;
11989  default: goto __pyx_L5_argtuple_error;
11990  }
11991  kw_args = PyDict_Size(__pyx_kwds);
11992  switch (pos_args) {
11993  case 0:
11994  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
11995  else goto __pyx_L5_argtuple_error;
11996  CYTHON_FALLTHROUGH;
11997  case 1:
11998  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
11999  else {
12000  __Pyx_RaiseArgtupleInvalid("hx_rotation", 1, 2, 2, 1); __PYX_ERR(0, 472, __pyx_L3_error)
12001  }
12002  }
12003  if (unlikely(kw_args > 0)) {
12004  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hx_rotation") < 0)) __PYX_ERR(0, 472, __pyx_L3_error)
12005  }
12006  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12007  goto __pyx_L5_argtuple_error;
12008  } else {
12009  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12010  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12011  }
12012  __pyx_v_x = ((PyArrayObject *)values[0]);
12013  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 472, __pyx_L3_error)
12014  }
12015  goto __pyx_L4_argument_unpacking_done;
12016  __pyx_L5_argtuple_error:;
12017  __Pyx_RaiseArgtupleInvalid("hx_rotation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 472, __pyx_L3_error)
12018  __pyx_L3_error:;
12019  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hx_rotation", __pyx_clineno, __pyx_lineno, __pyx_filename);
12020  __Pyx_RefNannyFinishContext();
12021  return NULL;
12022  __pyx_L4_argument_unpacking_done:;
12023  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 472, __pyx_L1_error)
12024  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_36hx_rotation(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
12025 
12026  /* function exit code */
12027  goto __pyx_L0;
12028  __pyx_L1_error:;
12029  __pyx_r = NULL;
12030  __pyx_L0:;
12031  __Pyx_RefNannyFinishContext();
12032  return __pyx_r;
12033 }
12034 
12035 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_36hx_rotation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t) {
12036  PyObject *__pyx_r = NULL;
12037  __Pyx_TraceDeclarations
12038  __Pyx_RefNannyDeclarations
12039  PyObject *__pyx_t_1 = NULL;
12040  PyObject *__pyx_t_2 = NULL;
12041  PyObject *__pyx_t_3 = NULL;
12042  PyObject *__pyx_t_4 = NULL;
12043  int __pyx_t_5;
12044  PyObject *__pyx_t_6 = NULL;
12045  int __pyx_lineno = 0;
12046  const char *__pyx_filename = NULL;
12047  int __pyx_clineno = 0;
12048  __Pyx_TraceFrameInit(__pyx_codeobj__24)
12049  __Pyx_RefNannySetupContext("hx_rotation", 0);
12050  __Pyx_TraceCall("hx_rotation", __pyx_f[0], 472, 0, __PYX_ERR(0, 472, __pyx_L1_error));
12051 
12052  /* "mbd/CouplingFSI.pyx":482
12053  * simulation time
12054  * """
12055  * return self.hxyz(x, t)[0]-(self.position-self.position_last)[0] # <<<<<<<<<<<<<<
12056  *
12057  * def hy_rotation(self, np.ndarray x, double t):
12058  */
12059  __Pyx_XDECREF(__pyx_r);
12060  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hxyz); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
12061  __Pyx_GOTREF(__pyx_t_2);
12062  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error)
12063  __Pyx_GOTREF(__pyx_t_3);
12064  __pyx_t_4 = NULL;
12065  __pyx_t_5 = 0;
12066  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12067  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
12068  if (likely(__pyx_t_4)) {
12069  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12070  __Pyx_INCREF(__pyx_t_4);
12071  __Pyx_INCREF(function);
12072  __Pyx_DECREF_SET(__pyx_t_2, function);
12073  __pyx_t_5 = 1;
12074  }
12075  }
12076  #if CYTHON_FAST_PYCALL
12077  if (PyFunction_Check(__pyx_t_2)) {
12078  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
12079  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
12080  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12081  __Pyx_GOTREF(__pyx_t_1);
12082  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12083  } else
12084  #endif
12085  #if CYTHON_FAST_PYCCALL
12086  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
12087  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
12088  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
12089  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12090  __Pyx_GOTREF(__pyx_t_1);
12091  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12092  } else
12093  #endif
12094  {
12095  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 482, __pyx_L1_error)
12096  __Pyx_GOTREF(__pyx_t_6);
12097  if (__pyx_t_4) {
12098  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
12099  }
12100  __Pyx_INCREF(((PyObject *)__pyx_v_x));
12101  __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
12102  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_x));
12103  __Pyx_GIVEREF(__pyx_t_3);
12104  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
12105  __pyx_t_3 = 0;
12106  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
12107  __Pyx_GOTREF(__pyx_t_1);
12108  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12109  }
12110  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12111  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
12112  __Pyx_GOTREF(__pyx_t_2);
12113  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12114  __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_self->position), ((PyObject *)__pyx_v_self->position_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
12115  __Pyx_GOTREF(__pyx_t_1);
12116  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 482, __pyx_L1_error)
12117  __Pyx_GOTREF(__pyx_t_6);
12118  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12119  __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
12120  __Pyx_GOTREF(__pyx_t_1);
12121  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12122  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12123  __pyx_r = __pyx_t_1;
12124  __pyx_t_1 = 0;
12125  goto __pyx_L0;
12126 
12127  /* "mbd/CouplingFSI.pyx":472
12128  * return (self.position-self.position_last)[2]
12129  *
12130  * def hx_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
12131  * """BC function for mesh nodes displacement (x component)
12132  *
12133  */
12134 
12135  /* function exit code */
12136  __pyx_L1_error:;
12137  __Pyx_XDECREF(__pyx_t_1);
12138  __Pyx_XDECREF(__pyx_t_2);
12139  __Pyx_XDECREF(__pyx_t_3);
12140  __Pyx_XDECREF(__pyx_t_4);
12141  __Pyx_XDECREF(__pyx_t_6);
12142  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hx_rotation", __pyx_clineno, __pyx_lineno, __pyx_filename);
12143  __pyx_r = NULL;
12144  __pyx_L0:;
12145  __Pyx_XGIVEREF(__pyx_r);
12146  __Pyx_TraceReturn(__pyx_r, 0);
12147  __Pyx_RefNannyFinishContext();
12148  return __pyx_r;
12149 }
12150 
12151 /* "mbd/CouplingFSI.pyx":484
12152  * return self.hxyz(x, t)[0]-(self.position-self.position_last)[0]
12153  *
12154  * def hy_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
12155  * """BC function for mesh nodes displacement (y component)
12156  *
12157  */
12158 
12159 /* Python wrapper */
12160 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_39hy_rotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12161 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_38hy_rotation[] = "ProtChBody.hy_rotation(self, ndarray x, double t)\nBC function for mesh nodes displacement (y component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
12162 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_39hy_rotation = {"hy_rotation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_39hy_rotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_38hy_rotation};
12163 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_39hy_rotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12164  PyArrayObject *__pyx_v_x = 0;
12165  double __pyx_v_t;
12166  int __pyx_lineno = 0;
12167  const char *__pyx_filename = NULL;
12168  int __pyx_clineno = 0;
12169  PyObject *__pyx_r = 0;
12170  __Pyx_RefNannyDeclarations
12171  __Pyx_RefNannySetupContext("hy_rotation (wrapper)", 0);
12172  {
12173  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
12174  PyObject* values[2] = {0,0};
12175  if (unlikely(__pyx_kwds)) {
12176  Py_ssize_t kw_args;
12177  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12178  switch (pos_args) {
12179  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12180  CYTHON_FALLTHROUGH;
12181  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12182  CYTHON_FALLTHROUGH;
12183  case 0: break;
12184  default: goto __pyx_L5_argtuple_error;
12185  }
12186  kw_args = PyDict_Size(__pyx_kwds);
12187  switch (pos_args) {
12188  case 0:
12189  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
12190  else goto __pyx_L5_argtuple_error;
12191  CYTHON_FALLTHROUGH;
12192  case 1:
12193  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
12194  else {
12195  __Pyx_RaiseArgtupleInvalid("hy_rotation", 1, 2, 2, 1); __PYX_ERR(0, 484, __pyx_L3_error)
12196  }
12197  }
12198  if (unlikely(kw_args > 0)) {
12199  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hy_rotation") < 0)) __PYX_ERR(0, 484, __pyx_L3_error)
12200  }
12201  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12202  goto __pyx_L5_argtuple_error;
12203  } else {
12204  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12205  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12206  }
12207  __pyx_v_x = ((PyArrayObject *)values[0]);
12208  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L3_error)
12209  }
12210  goto __pyx_L4_argument_unpacking_done;
12211  __pyx_L5_argtuple_error:;
12212  __Pyx_RaiseArgtupleInvalid("hy_rotation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 484, __pyx_L3_error)
12213  __pyx_L3_error:;
12214  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hy_rotation", __pyx_clineno, __pyx_lineno, __pyx_filename);
12215  __Pyx_RefNannyFinishContext();
12216  return NULL;
12217  __pyx_L4_argument_unpacking_done:;
12218  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 484, __pyx_L1_error)
12219  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_38hy_rotation(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
12220 
12221  /* function exit code */
12222  goto __pyx_L0;
12223  __pyx_L1_error:;
12224  __pyx_r = NULL;
12225  __pyx_L0:;
12226  __Pyx_RefNannyFinishContext();
12227  return __pyx_r;
12228 }
12229 
12230 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_38hy_rotation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t) {
12231  PyObject *__pyx_r = NULL;
12232  __Pyx_TraceDeclarations
12233  __Pyx_RefNannyDeclarations
12234  PyObject *__pyx_t_1 = NULL;
12235  PyObject *__pyx_t_2 = NULL;
12236  PyObject *__pyx_t_3 = NULL;
12237  PyObject *__pyx_t_4 = NULL;
12238  int __pyx_t_5;
12239  PyObject *__pyx_t_6 = NULL;
12240  int __pyx_lineno = 0;
12241  const char *__pyx_filename = NULL;
12242  int __pyx_clineno = 0;
12243  __Pyx_TraceFrameInit(__pyx_codeobj__25)
12244  __Pyx_RefNannySetupContext("hy_rotation", 0);
12245  __Pyx_TraceCall("hy_rotation", __pyx_f[0], 484, 0, __PYX_ERR(0, 484, __pyx_L1_error));
12246 
12247  /* "mbd/CouplingFSI.pyx":494
12248  * simulation time
12249  * """
12250  * return self.hxyz(x, t)[1]-(self.position-self.position_last)[1] # <<<<<<<<<<<<<<
12251  *
12252  * def hz_rotation(self, np.ndarray x, double t):
12253  */
12254  __Pyx_XDECREF(__pyx_r);
12255  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hxyz); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
12256  __Pyx_GOTREF(__pyx_t_2);
12257  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error)
12258  __Pyx_GOTREF(__pyx_t_3);
12259  __pyx_t_4 = NULL;
12260  __pyx_t_5 = 0;
12261  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12262  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
12263  if (likely(__pyx_t_4)) {
12264  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12265  __Pyx_INCREF(__pyx_t_4);
12266  __Pyx_INCREF(function);
12267  __Pyx_DECREF_SET(__pyx_t_2, function);
12268  __pyx_t_5 = 1;
12269  }
12270  }
12271  #if CYTHON_FAST_PYCALL
12272  if (PyFunction_Check(__pyx_t_2)) {
12273  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
12274  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
12275  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12276  __Pyx_GOTREF(__pyx_t_1);
12277  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12278  } else
12279  #endif
12280  #if CYTHON_FAST_PYCCALL
12281  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
12282  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
12283  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
12284  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12285  __Pyx_GOTREF(__pyx_t_1);
12286  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12287  } else
12288  #endif
12289  {
12290  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error)
12291  __Pyx_GOTREF(__pyx_t_6);
12292  if (__pyx_t_4) {
12293  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
12294  }
12295  __Pyx_INCREF(((PyObject *)__pyx_v_x));
12296  __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
12297  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_x));
12298  __Pyx_GIVEREF(__pyx_t_3);
12299  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
12300  __pyx_t_3 = 0;
12301  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
12302  __Pyx_GOTREF(__pyx_t_1);
12303  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12304  }
12305  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12306  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
12307  __Pyx_GOTREF(__pyx_t_2);
12308  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12309  __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_self->position), ((PyObject *)__pyx_v_self->position_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
12310  __Pyx_GOTREF(__pyx_t_1);
12311  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error)
12312  __Pyx_GOTREF(__pyx_t_6);
12313  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12314  __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
12315  __Pyx_GOTREF(__pyx_t_1);
12316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12317  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12318  __pyx_r = __pyx_t_1;
12319  __pyx_t_1 = 0;
12320  goto __pyx_L0;
12321 
12322  /* "mbd/CouplingFSI.pyx":484
12323  * return self.hxyz(x, t)[0]-(self.position-self.position_last)[0]
12324  *
12325  * def hy_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
12326  * """BC function for mesh nodes displacement (y component)
12327  *
12328  */
12329 
12330  /* function exit code */
12331  __pyx_L1_error:;
12332  __Pyx_XDECREF(__pyx_t_1);
12333  __Pyx_XDECREF(__pyx_t_2);
12334  __Pyx_XDECREF(__pyx_t_3);
12335  __Pyx_XDECREF(__pyx_t_4);
12336  __Pyx_XDECREF(__pyx_t_6);
12337  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hy_rotation", __pyx_clineno, __pyx_lineno, __pyx_filename);
12338  __pyx_r = NULL;
12339  __pyx_L0:;
12340  __Pyx_XGIVEREF(__pyx_r);
12341  __Pyx_TraceReturn(__pyx_r, 0);
12342  __Pyx_RefNannyFinishContext();
12343  return __pyx_r;
12344 }
12345 
12346 /* "mbd/CouplingFSI.pyx":496
12347  * return self.hxyz(x, t)[1]-(self.position-self.position_last)[1]
12348  *
12349  * def hz_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
12350  * """BC function for mesh nodes displacement (z component)
12351  *
12352  */
12353 
12354 /* Python wrapper */
12355 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_41hz_rotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12356 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_40hz_rotation[] = "ProtChBody.hz_rotation(self, ndarray x, double t)\nBC function for mesh nodes displacement (z component)\n\n Parameters\n ----------\n x: array_like\n coordinates of the node before displacement\n t: double\n simulation time\n ";
12357 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_41hz_rotation = {"hz_rotation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_41hz_rotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_40hz_rotation};
12358 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_41hz_rotation(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12359  PyArrayObject *__pyx_v_x = 0;
12360  double __pyx_v_t;
12361  int __pyx_lineno = 0;
12362  const char *__pyx_filename = NULL;
12363  int __pyx_clineno = 0;
12364  PyObject *__pyx_r = 0;
12365  __Pyx_RefNannyDeclarations
12366  __Pyx_RefNannySetupContext("hz_rotation (wrapper)", 0);
12367  {
12368  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
12369  PyObject* values[2] = {0,0};
12370  if (unlikely(__pyx_kwds)) {
12371  Py_ssize_t kw_args;
12372  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12373  switch (pos_args) {
12374  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12375  CYTHON_FALLTHROUGH;
12376  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12377  CYTHON_FALLTHROUGH;
12378  case 0: break;
12379  default: goto __pyx_L5_argtuple_error;
12380  }
12381  kw_args = PyDict_Size(__pyx_kwds);
12382  switch (pos_args) {
12383  case 0:
12384  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
12385  else goto __pyx_L5_argtuple_error;
12386  CYTHON_FALLTHROUGH;
12387  case 1:
12388  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
12389  else {
12390  __Pyx_RaiseArgtupleInvalid("hz_rotation", 1, 2, 2, 1); __PYX_ERR(0, 496, __pyx_L3_error)
12391  }
12392  }
12393  if (unlikely(kw_args > 0)) {
12394  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "hz_rotation") < 0)) __PYX_ERR(0, 496, __pyx_L3_error)
12395  }
12396  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12397  goto __pyx_L5_argtuple_error;
12398  } else {
12399  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12400  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12401  }
12402  __pyx_v_x = ((PyArrayObject *)values[0]);
12403  __pyx_v_t = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L3_error)
12404  }
12405  goto __pyx_L4_argument_unpacking_done;
12406  __pyx_L5_argtuple_error:;
12407  __Pyx_RaiseArgtupleInvalid("hz_rotation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 496, __pyx_L3_error)
12408  __pyx_L3_error:;
12409  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hz_rotation", __pyx_clineno, __pyx_lineno, __pyx_filename);
12410  __Pyx_RefNannyFinishContext();
12411  return NULL;
12412  __pyx_L4_argument_unpacking_done:;
12413  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_5numpy_ndarray, 1, "x", 0))) __PYX_ERR(0, 496, __pyx_L1_error)
12414  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_40hz_rotation(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_x, __pyx_v_t);
12415 
12416  /* function exit code */
12417  goto __pyx_L0;
12418  __pyx_L1_error:;
12419  __pyx_r = NULL;
12420  __pyx_L0:;
12421  __Pyx_RefNannyFinishContext();
12422  return __pyx_r;
12423 }
12424 
12425 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_40hz_rotation(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_x, double __pyx_v_t) {
12426  PyObject *__pyx_r = NULL;
12427  __Pyx_TraceDeclarations
12428  __Pyx_RefNannyDeclarations
12429  PyObject *__pyx_t_1 = NULL;
12430  PyObject *__pyx_t_2 = NULL;
12431  PyObject *__pyx_t_3 = NULL;
12432  PyObject *__pyx_t_4 = NULL;
12433  int __pyx_t_5;
12434  PyObject *__pyx_t_6 = NULL;
12435  int __pyx_lineno = 0;
12436  const char *__pyx_filename = NULL;
12437  int __pyx_clineno = 0;
12438  __Pyx_TraceFrameInit(__pyx_codeobj__26)
12439  __Pyx_RefNannySetupContext("hz_rotation", 0);
12440  __Pyx_TraceCall("hz_rotation", __pyx_f[0], 496, 0, __PYX_ERR(0, 496, __pyx_L1_error));
12441 
12442  /* "mbd/CouplingFSI.pyx":506
12443  * simulation time
12444  * """
12445  * return self.hxyz(x, t)[2]-(self.position-self.position_last)[2] # <<<<<<<<<<<<<<
12446  *
12447  * def addSpring(self, double stiffness, double damping, np.ndarray fairlead,
12448  */
12449  __Pyx_XDECREF(__pyx_r);
12450  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_hxyz); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
12451  __Pyx_GOTREF(__pyx_t_2);
12452  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L1_error)
12453  __Pyx_GOTREF(__pyx_t_3);
12454  __pyx_t_4 = NULL;
12455  __pyx_t_5 = 0;
12456  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
12457  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
12458  if (likely(__pyx_t_4)) {
12459  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
12460  __Pyx_INCREF(__pyx_t_4);
12461  __Pyx_INCREF(function);
12462  __Pyx_DECREF_SET(__pyx_t_2, function);
12463  __pyx_t_5 = 1;
12464  }
12465  }
12466  #if CYTHON_FAST_PYCALL
12467  if (PyFunction_Check(__pyx_t_2)) {
12468  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
12469  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
12470  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12471  __Pyx_GOTREF(__pyx_t_1);
12472  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12473  } else
12474  #endif
12475  #if CYTHON_FAST_PYCCALL
12476  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
12477  PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_x), __pyx_t_3};
12478  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
12479  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12480  __Pyx_GOTREF(__pyx_t_1);
12481  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12482  } else
12483  #endif
12484  {
12485  __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
12486  __Pyx_GOTREF(__pyx_t_6);
12487  if (__pyx_t_4) {
12488  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
12489  }
12490  __Pyx_INCREF(((PyObject *)__pyx_v_x));
12491  __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
12492  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, ((PyObject *)__pyx_v_x));
12493  __Pyx_GIVEREF(__pyx_t_3);
12494  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
12495  __pyx_t_3 = 0;
12496  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
12497  __Pyx_GOTREF(__pyx_t_1);
12498  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12499  }
12500  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12501  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
12502  __Pyx_GOTREF(__pyx_t_2);
12503  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12504  __pyx_t_1 = PyNumber_Subtract(((PyObject *)__pyx_v_self->position), ((PyObject *)__pyx_v_self->position_last)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
12505  __Pyx_GOTREF(__pyx_t_1);
12506  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
12507  __Pyx_GOTREF(__pyx_t_6);
12508  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12509  __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
12510  __Pyx_GOTREF(__pyx_t_1);
12511  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12512  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12513  __pyx_r = __pyx_t_1;
12514  __pyx_t_1 = 0;
12515  goto __pyx_L0;
12516 
12517  /* "mbd/CouplingFSI.pyx":496
12518  * return self.hxyz(x, t)[1]-(self.position-self.position_last)[1]
12519  *
12520  * def hz_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
12521  * """BC function for mesh nodes displacement (z component)
12522  *
12523  */
12524 
12525  /* function exit code */
12526  __pyx_L1_error:;
12527  __Pyx_XDECREF(__pyx_t_1);
12528  __Pyx_XDECREF(__pyx_t_2);
12529  __Pyx_XDECREF(__pyx_t_3);
12530  __Pyx_XDECREF(__pyx_t_4);
12531  __Pyx_XDECREF(__pyx_t_6);
12532  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hz_rotation", __pyx_clineno, __pyx_lineno, __pyx_filename);
12533  __pyx_r = NULL;
12534  __pyx_L0:;
12535  __Pyx_XGIVEREF(__pyx_r);
12536  __Pyx_TraceReturn(__pyx_r, 0);
12537  __Pyx_RefNannyFinishContext();
12538  return __pyx_r;
12539 }
12540 
12541 /* "mbd/CouplingFSI.pyx":508
12542  * return self.hxyz(x, t)[2]-(self.position-self.position_last)[2]
12543  *
12544  * def addSpring(self, double stiffness, double damping, np.ndarray fairlead, # <<<<<<<<<<<<<<
12545  * np.ndarray anchor, double rest_length):
12546  * self.thisptr.addSpring(stiffness, damping, <double*> fairlead.data,
12547  */
12548 
12549 /* Python wrapper */
12550 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_43addSpring(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12551 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_42addSpring[] = "ProtChBody.addSpring(self, double stiffness, double damping, ndarray fairlead, ndarray anchor, double rest_length)";
12552 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_43addSpring = {"addSpring", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_43addSpring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_42addSpring};
12553 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_43addSpring(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12554  double __pyx_v_stiffness;
12555  double __pyx_v_damping;
12556  PyArrayObject *__pyx_v_fairlead = 0;
12557  PyArrayObject *__pyx_v_anchor = 0;
12558  double __pyx_v_rest_length;
12559  int __pyx_lineno = 0;
12560  const char *__pyx_filename = NULL;
12561  int __pyx_clineno = 0;
12562  PyObject *__pyx_r = 0;
12563  __Pyx_RefNannyDeclarations
12564  __Pyx_RefNannySetupContext("addSpring (wrapper)", 0);
12565  {
12566  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stiffness,&__pyx_n_s_damping,&__pyx_n_s_fairlead,&__pyx_n_s_anchor,&__pyx_n_s_rest_length,0};
12567  PyObject* values[5] = {0,0,0,0,0};
12568  if (unlikely(__pyx_kwds)) {
12569  Py_ssize_t kw_args;
12570  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12571  switch (pos_args) {
12572  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
12573  CYTHON_FALLTHROUGH;
12574  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12575  CYTHON_FALLTHROUGH;
12576  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12577  CYTHON_FALLTHROUGH;
12578  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12579  CYTHON_FALLTHROUGH;
12580  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12581  CYTHON_FALLTHROUGH;
12582  case 0: break;
12583  default: goto __pyx_L5_argtuple_error;
12584  }
12585  kw_args = PyDict_Size(__pyx_kwds);
12586  switch (pos_args) {
12587  case 0:
12588  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stiffness)) != 0)) kw_args--;
12589  else goto __pyx_L5_argtuple_error;
12590  CYTHON_FALLTHROUGH;
12591  case 1:
12592  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_damping)) != 0)) kw_args--;
12593  else {
12594  __Pyx_RaiseArgtupleInvalid("addSpring", 1, 5, 5, 1); __PYX_ERR(0, 508, __pyx_L3_error)
12595  }
12596  CYTHON_FALLTHROUGH;
12597  case 2:
12598  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fairlead)) != 0)) kw_args--;
12599  else {
12600  __Pyx_RaiseArgtupleInvalid("addSpring", 1, 5, 5, 2); __PYX_ERR(0, 508, __pyx_L3_error)
12601  }
12602  CYTHON_FALLTHROUGH;
12603  case 3:
12604  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_anchor)) != 0)) kw_args--;
12605  else {
12606  __Pyx_RaiseArgtupleInvalid("addSpring", 1, 5, 5, 3); __PYX_ERR(0, 508, __pyx_L3_error)
12607  }
12608  CYTHON_FALLTHROUGH;
12609  case 4:
12610  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rest_length)) != 0)) kw_args--;
12611  else {
12612  __Pyx_RaiseArgtupleInvalid("addSpring", 1, 5, 5, 4); __PYX_ERR(0, 508, __pyx_L3_error)
12613  }
12614  }
12615  if (unlikely(kw_args > 0)) {
12616  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addSpring") < 0)) __PYX_ERR(0, 508, __pyx_L3_error)
12617  }
12618  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
12619  goto __pyx_L5_argtuple_error;
12620  } else {
12621  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12622  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12623  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
12624  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
12625  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
12626  }
12627  __pyx_v_stiffness = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_stiffness == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L3_error)
12628  __pyx_v_damping = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_damping == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L3_error)
12629  __pyx_v_fairlead = ((PyArrayObject *)values[2]);
12630  __pyx_v_anchor = ((PyArrayObject *)values[3]);
12631  __pyx_v_rest_length = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_rest_length == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L3_error)
12632  }
12633  goto __pyx_L4_argument_unpacking_done;
12634  __pyx_L5_argtuple_error:;
12635  __Pyx_RaiseArgtupleInvalid("addSpring", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 508, __pyx_L3_error)
12636  __pyx_L3_error:;
12637  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addSpring", __pyx_clineno, __pyx_lineno, __pyx_filename);
12638  __Pyx_RefNannyFinishContext();
12639  return NULL;
12640  __pyx_L4_argument_unpacking_done:;
12641  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fairlead), __pyx_ptype_5numpy_ndarray, 1, "fairlead", 0))) __PYX_ERR(0, 508, __pyx_L1_error)
12642  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_anchor), __pyx_ptype_5numpy_ndarray, 1, "anchor", 0))) __PYX_ERR(0, 509, __pyx_L1_error)
12643  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_42addSpring(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_stiffness, __pyx_v_damping, __pyx_v_fairlead, __pyx_v_anchor, __pyx_v_rest_length);
12644 
12645  /* function exit code */
12646  goto __pyx_L0;
12647  __pyx_L1_error:;
12648  __pyx_r = NULL;
12649  __pyx_L0:;
12650  __Pyx_RefNannyFinishContext();
12651  return __pyx_r;
12652 }
12653 
12654 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_42addSpring(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_stiffness, double __pyx_v_damping, PyArrayObject *__pyx_v_fairlead, PyArrayObject *__pyx_v_anchor, double __pyx_v_rest_length) {
12655  PyObject *__pyx_r = NULL;
12656  __Pyx_TraceDeclarations
12657  __Pyx_RefNannyDeclarations
12658  int __pyx_lineno = 0;
12659  const char *__pyx_filename = NULL;
12660  int __pyx_clineno = 0;
12661  __Pyx_TraceFrameInit(__pyx_codeobj__27)
12662  __Pyx_RefNannySetupContext("addSpring", 0);
12663  __Pyx_TraceCall("addSpring", __pyx_f[0], 508, 0, __PYX_ERR(0, 508, __pyx_L1_error));
12664 
12665  /* "mbd/CouplingFSI.pyx":510
12666  * def addSpring(self, double stiffness, double damping, np.ndarray fairlead,
12667  * np.ndarray anchor, double rest_length):
12668  * self.thisptr.addSpring(stiffness, damping, <double*> fairlead.data, # <<<<<<<<<<<<<<
12669  * <double*> anchor.data, rest_length)
12670  *
12671  */
12672  __pyx_v_self->thisptr->addSpring(__pyx_v_stiffness, __pyx_v_damping, ((double *)__pyx_v_fairlead->data), ((double *)__pyx_v_anchor->data), __pyx_v_rest_length);
12673 
12674  /* "mbd/CouplingFSI.pyx":508
12675  * return self.hxyz(x, t)[2]-(self.position-self.position_last)[2]
12676  *
12677  * def addSpring(self, double stiffness, double damping, np.ndarray fairlead, # <<<<<<<<<<<<<<
12678  * np.ndarray anchor, double rest_length):
12679  * self.thisptr.addSpring(stiffness, damping, <double*> fairlead.data,
12680  */
12681 
12682  /* function exit code */
12683  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12684  goto __pyx_L0;
12685  __pyx_L1_error:;
12686  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addSpring", __pyx_clineno, __pyx_lineno, __pyx_filename);
12687  __pyx_r = NULL;
12688  __pyx_L0:;
12689  __Pyx_XGIVEREF(__pyx_r);
12690  __Pyx_TraceReturn(__pyx_r, 0);
12691  __Pyx_RefNannyFinishContext();
12692  return __pyx_r;
12693 }
12694 
12695 /* "mbd/CouplingFSI.pyx":513
12696  * <double*> anchor.data, rest_length)
12697  *
12698  * def setConstraints(self, np.ndarray free_x, np.ndarray free_r): # <<<<<<<<<<<<<<
12699  * """Sets constraints on the body
12700  * (!) Only acts on Proteus and gravity forces
12701  */
12702 
12703 /* Python wrapper */
12704 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_45setConstraints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
12705 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_44setConstraints[] = "ProtChBody.setConstraints(self, ndarray free_x, ndarray free_r)\nSets constraints on the body\n (!) Only acts on Proteus and gravity forces\n\n Parameters\n ----------\n free_x: array_like\n Translational constraints.\n free_r: array_like\n Rotational constraints.\n ";
12706 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_45setConstraints = {"setConstraints", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_45setConstraints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_44setConstraints};
12707 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_45setConstraints(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
12708  PyArrayObject *__pyx_v_free_x = 0;
12709  PyArrayObject *__pyx_v_free_r = 0;
12710  int __pyx_lineno = 0;
12711  const char *__pyx_filename = NULL;
12712  int __pyx_clineno = 0;
12713  PyObject *__pyx_r = 0;
12714  __Pyx_RefNannyDeclarations
12715  __Pyx_RefNannySetupContext("setConstraints (wrapper)", 0);
12716  {
12717  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_free_x,&__pyx_n_s_free_r,0};
12718  PyObject* values[2] = {0,0};
12719  if (unlikely(__pyx_kwds)) {
12720  Py_ssize_t kw_args;
12721  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
12722  switch (pos_args) {
12723  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12724  CYTHON_FALLTHROUGH;
12725  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12726  CYTHON_FALLTHROUGH;
12727  case 0: break;
12728  default: goto __pyx_L5_argtuple_error;
12729  }
12730  kw_args = PyDict_Size(__pyx_kwds);
12731  switch (pos_args) {
12732  case 0:
12733  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free_x)) != 0)) kw_args--;
12734  else goto __pyx_L5_argtuple_error;
12735  CYTHON_FALLTHROUGH;
12736  case 1:
12737  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_free_r)) != 0)) kw_args--;
12738  else {
12739  __Pyx_RaiseArgtupleInvalid("setConstraints", 1, 2, 2, 1); __PYX_ERR(0, 513, __pyx_L3_error)
12740  }
12741  }
12742  if (unlikely(kw_args > 0)) {
12743  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setConstraints") < 0)) __PYX_ERR(0, 513, __pyx_L3_error)
12744  }
12745  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
12746  goto __pyx_L5_argtuple_error;
12747  } else {
12748  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
12749  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
12750  }
12751  __pyx_v_free_x = ((PyArrayObject *)values[0]);
12752  __pyx_v_free_r = ((PyArrayObject *)values[1]);
12753  }
12754  goto __pyx_L4_argument_unpacking_done;
12755  __pyx_L5_argtuple_error:;
12756  __Pyx_RaiseArgtupleInvalid("setConstraints", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 513, __pyx_L3_error)
12757  __pyx_L3_error:;
12758  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setConstraints", __pyx_clineno, __pyx_lineno, __pyx_filename);
12759  __Pyx_RefNannyFinishContext();
12760  return NULL;
12761  __pyx_L4_argument_unpacking_done:;
12762  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_free_x), __pyx_ptype_5numpy_ndarray, 1, "free_x", 0))) __PYX_ERR(0, 513, __pyx_L1_error)
12763  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_free_r), __pyx_ptype_5numpy_ndarray, 1, "free_r", 0))) __PYX_ERR(0, 513, __pyx_L1_error)
12764  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_44setConstraints(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_free_x, __pyx_v_free_r);
12765 
12766  /* function exit code */
12767  goto __pyx_L0;
12768  __pyx_L1_error:;
12769  __pyx_r = NULL;
12770  __pyx_L0:;
12771  __Pyx_RefNannyFinishContext();
12772  return __pyx_r;
12773 }
12774 
12775 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_44setConstraints(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_free_x, PyArrayObject *__pyx_v_free_r) {
12776  PyObject *__pyx_r = NULL;
12777  __Pyx_TraceDeclarations
12778  __Pyx_RefNannyDeclarations
12779  int __pyx_lineno = 0;
12780  const char *__pyx_filename = NULL;
12781  int __pyx_clineno = 0;
12782  __Pyx_TraceFrameInit(__pyx_codeobj__28)
12783  __Pyx_RefNannySetupContext("setConstraints", 0);
12784  __Pyx_TraceCall("setConstraints", __pyx_f[0], 513, 0, __PYX_ERR(0, 513, __pyx_L1_error));
12785 
12786  /* "mbd/CouplingFSI.pyx":524
12787  * Rotational constraints.
12788  * """
12789  * self.thisptr.setConstraints(<double*> free_x.data, <double*> free_r.data) # <<<<<<<<<<<<<<
12790  *
12791  * def setAddedMass(self, np.ndarray Aij):
12792  */
12793  __pyx_v_self->thisptr->setConstraints(((double *)__pyx_v_free_x->data), ((double *)__pyx_v_free_r->data));
12794 
12795  /* "mbd/CouplingFSI.pyx":513
12796  * <double*> anchor.data, rest_length)
12797  *
12798  * def setConstraints(self, np.ndarray free_x, np.ndarray free_r): # <<<<<<<<<<<<<<
12799  * """Sets constraints on the body
12800  * (!) Only acts on Proteus and gravity forces
12801  */
12802 
12803  /* function exit code */
12804  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
12805  goto __pyx_L0;
12806  __pyx_L1_error:;
12807  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setConstraints", __pyx_clineno, __pyx_lineno, __pyx_filename);
12808  __pyx_r = NULL;
12809  __pyx_L0:;
12810  __Pyx_XGIVEREF(__pyx_r);
12811  __Pyx_TraceReturn(__pyx_r, 0);
12812  __Pyx_RefNannyFinishContext();
12813  return __pyx_r;
12814 }
12815 
12816 /* "mbd/CouplingFSI.pyx":526
12817  * self.thisptr.setConstraints(<double*> free_x.data, <double*> free_r.data)
12818  *
12819  * def setAddedMass(self, np.ndarray Aij): # <<<<<<<<<<<<<<
12820  * """
12821  * Sets the added mass matrix of the body
12822  */
12823 
12824 /* Python wrapper */
12825 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_47setAddedMass(PyObject *__pyx_v_self, PyObject *__pyx_v_Aij); /*proto*/
12826 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_46setAddedMass[] = "ProtChBody.setAddedMass(self, ndarray Aij)\n\n Sets the added mass matrix of the body\n\n Parameters\n ----------\n added_mass: array_like\n Added mass matrix (must be 6x6 array!)\n ";
12827 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_47setAddedMass = {"setAddedMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_47setAddedMass, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_46setAddedMass};
12828 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_47setAddedMass(PyObject *__pyx_v_self, PyObject *__pyx_v_Aij) {
12829  int __pyx_lineno = 0;
12830  const char *__pyx_filename = NULL;
12831  int __pyx_clineno = 0;
12832  PyObject *__pyx_r = 0;
12833  __Pyx_RefNannyDeclarations
12834  __Pyx_RefNannySetupContext("setAddedMass (wrapper)", 0);
12835  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_Aij), __pyx_ptype_5numpy_ndarray, 1, "Aij", 0))) __PYX_ERR(0, 526, __pyx_L1_error)
12836  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_46setAddedMass(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyArrayObject *)__pyx_v_Aij));
12837 
12838  /* function exit code */
12839  goto __pyx_L0;
12840  __pyx_L1_error:;
12841  __pyx_r = NULL;
12842  __pyx_L0:;
12843  __Pyx_RefNannyFinishContext();
12844  return __pyx_r;
12845 }
12846 
12847 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_46setAddedMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_Aij) {
12848  double __pyx_v_mass;
12849  PyArrayObject *__pyx_v_iner = 0;
12850  PyArrayObject *__pyx_v_MM = 0;
12851  PyArrayObject *__pyx_v_FM = 0;
12852  PyArrayObject *__pyx_v_rotMarr_big = 0;
12853  PyArrayObject *__pyx_v_rotMarrT_big = 0;
12854  PyArrayObject *__pyx_v_Aij_global = 0;
12855  PyObject *__pyx_v_rot = NULL;
12856  PyObject *__pyx_v_rotch = NULL;
12857  PyObject *__pyx_v_i = NULL;
12858  PyObject *__pyx_v_j = NULL;
12859  CYTHON_UNUSED PyObject *__pyx_v_inv_FM = NULL;
12860  PyObject *__pyx_v_chFM = NULL;
12861  CYTHON_UNUSED PyObject *__pyx_v_inv_chFM = NULL;
12862  SwigPyObject *__pyx_v_swig_obj;
12863  ChMatrixDynamic<double> *__pyx_v_mycpp_ptr;
12864  ChMatrixDynamic<double> __pyx_v_my_instance;
12865  PyObject *__pyx_v_aa = NULL;
12866  PyObject *__pyx_v_Aija = NULL;
12867  PyObject *__pyx_r = NULL;
12868  __Pyx_TraceDeclarations
12869  __Pyx_RefNannyDeclarations
12870  int __pyx_t_1;
12871  PyObject *__pyx_t_2 = NULL;
12872  PyObject *__pyx_t_3 = NULL;
12873  PyObject *__pyx_t_4 = NULL;
12874  double __pyx_t_5;
12875  PyObject *__pyx_t_6 = NULL;
12876  PyObject *__pyx_t_7 = NULL;
12877  int __pyx_t_8;
12878  long __pyx_t_9;
12879  long __pyx_t_10;
12880  int __pyx_t_11;
12881  PyObject *__pyx_t_12 = NULL;
12882  PyArrayObject *__pyx_t_13 = NULL;
12883  PyObject *__pyx_t_14 = NULL;
12884  int __pyx_lineno = 0;
12885  const char *__pyx_filename = NULL;
12886  int __pyx_clineno = 0;
12887  __Pyx_TraceFrameInit(__pyx_codeobj__29)
12888  __Pyx_RefNannySetupContext("setAddedMass", 0);
12889  __Pyx_TraceCall("setAddedMass", __pyx_f[0], 526, 0, __PYX_ERR(0, 526, __pyx_L1_error));
12890 
12891  /* "mbd/CouplingFSI.pyx":536
12892  * """
12893  *
12894  * assert Aij.shape[0] == Aij.shape[1] == 6, 'Added mass matrix must be 6x6 (np)' # <<<<<<<<<<<<<<
12895  * cdef double mass = self.ChBody.GetMass()
12896  * cdef np.ndarray iner = pymat332array(self.ChBody.GetInertia())
12897  */
12898  #ifndef CYTHON_WITHOUT_ASSERTIONS
12899  if (unlikely(!Py_OptimizeFlag)) {
12900  __pyx_t_1 = ((__pyx_v_Aij->dimensions[0]) == (__pyx_v_Aij->dimensions[1]));
12901  if (__pyx_t_1) {
12902  __pyx_t_1 = ((__pyx_v_Aij->dimensions[1]) == 6);
12903  }
12904  if (unlikely(!(__pyx_t_1 != 0))) {
12905  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Added_mass_matrix_must_be_6x6_np);
12906  __PYX_ERR(0, 536, __pyx_L1_error)
12907  }
12908  }
12909  #endif
12910 
12911  /* "mbd/CouplingFSI.pyx":537
12912  *
12913  * assert Aij.shape[0] == Aij.shape[1] == 6, 'Added mass matrix must be 6x6 (np)'
12914  * cdef double mass = self.ChBody.GetMass() # <<<<<<<<<<<<<<
12915  * cdef np.ndarray iner = pymat332array(self.ChBody.GetInertia())
12916  * cdef np.ndarray MM = np.zeros((6,6)) # mass matrix
12917  */
12918  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetMass); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error)
12919  __Pyx_GOTREF(__pyx_t_3);
12920  __pyx_t_4 = NULL;
12921  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
12922  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
12923  if (likely(__pyx_t_4)) {
12924  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12925  __Pyx_INCREF(__pyx_t_4);
12926  __Pyx_INCREF(function);
12927  __Pyx_DECREF_SET(__pyx_t_3, function);
12928  }
12929  }
12930  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
12931  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
12932  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error)
12933  __Pyx_GOTREF(__pyx_t_2);
12934  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12935  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 537, __pyx_L1_error)
12936  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12937  __pyx_v_mass = __pyx_t_5;
12938 
12939  /* "mbd/CouplingFSI.pyx":538
12940  * assert Aij.shape[0] == Aij.shape[1] == 6, 'Added mass matrix must be 6x6 (np)'
12941  * cdef double mass = self.ChBody.GetMass()
12942  * cdef np.ndarray iner = pymat332array(self.ChBody.GetInertia()) # <<<<<<<<<<<<<<
12943  * cdef np.ndarray MM = np.zeros((6,6)) # mass matrix
12944  * cdef np.ndarray FM = np.zeros((6,6)) # full mass matrix
12945  */
12946  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pymat332array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 538, __pyx_L1_error)
12947  __Pyx_GOTREF(__pyx_t_3);
12948  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetInertia); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 538, __pyx_L1_error)
12949  __Pyx_GOTREF(__pyx_t_6);
12950  __pyx_t_7 = NULL;
12951  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
12952  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
12953  if (likely(__pyx_t_7)) {
12954  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
12955  __Pyx_INCREF(__pyx_t_7);
12956  __Pyx_INCREF(function);
12957  __Pyx_DECREF_SET(__pyx_t_6, function);
12958  }
12959  }
12960  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
12961  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
12962  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 538, __pyx_L1_error)
12963  __Pyx_GOTREF(__pyx_t_4);
12964  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
12965  __pyx_t_6 = NULL;
12966  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
12967  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
12968  if (likely(__pyx_t_6)) {
12969  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12970  __Pyx_INCREF(__pyx_t_6);
12971  __Pyx_INCREF(function);
12972  __Pyx_DECREF_SET(__pyx_t_3, function);
12973  }
12974  }
12975  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
12976  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
12977  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12978  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error)
12979  __Pyx_GOTREF(__pyx_t_2);
12980  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12981  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 538, __pyx_L1_error)
12982  __pyx_v_iner = ((PyArrayObject *)__pyx_t_2);
12983  __pyx_t_2 = 0;
12984 
12985  /* "mbd/CouplingFSI.pyx":539
12986  * cdef double mass = self.ChBody.GetMass()
12987  * cdef np.ndarray iner = pymat332array(self.ChBody.GetInertia())
12988  * cdef np.ndarray MM = np.zeros((6,6)) # mass matrix # <<<<<<<<<<<<<<
12989  * cdef np.ndarray FM = np.zeros((6,6)) # full mass matrix
12990  *
12991  */
12992  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error)
12993  __Pyx_GOTREF(__pyx_t_3);
12994  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error)
12995  __Pyx_GOTREF(__pyx_t_4);
12996  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12997  __pyx_t_3 = NULL;
12998  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
12999  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
13000  if (likely(__pyx_t_3)) {
13001  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
13002  __Pyx_INCREF(__pyx_t_3);
13003  __Pyx_INCREF(function);
13004  __Pyx_DECREF_SET(__pyx_t_4, function);
13005  }
13006  }
13007  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_tuple__2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_tuple__2);
13008  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13009  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error)
13010  __Pyx_GOTREF(__pyx_t_2);
13011  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13012  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 539, __pyx_L1_error)
13013  __pyx_v_MM = ((PyArrayObject *)__pyx_t_2);
13014  __pyx_t_2 = 0;
13015 
13016  /* "mbd/CouplingFSI.pyx":540
13017  * cdef np.ndarray iner = pymat332array(self.ChBody.GetInertia())
13018  * cdef np.ndarray MM = np.zeros((6,6)) # mass matrix
13019  * cdef np.ndarray FM = np.zeros((6,6)) # full mass matrix # <<<<<<<<<<<<<<
13020  *
13021  * # added mass matrix
13022  */
13023  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 540, __pyx_L1_error)
13024  __Pyx_GOTREF(__pyx_t_4);
13025  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error)
13026  __Pyx_GOTREF(__pyx_t_3);
13027  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13028  __pyx_t_4 = NULL;
13029  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13030  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
13031  if (likely(__pyx_t_4)) {
13032  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13033  __Pyx_INCREF(__pyx_t_4);
13034  __Pyx_INCREF(function);
13035  __Pyx_DECREF_SET(__pyx_t_3, function);
13036  }
13037  }
13038  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_tuple__2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_tuple__2);
13039  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13040  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error)
13041  __Pyx_GOTREF(__pyx_t_2);
13042  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13043  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 540, __pyx_L1_error)
13044  __pyx_v_FM = ((PyArrayObject *)__pyx_t_2);
13045  __pyx_t_2 = 0;
13046 
13047  /* "mbd/CouplingFSI.pyx":546
13048  * cdef np.ndarray rotMarrT_big
13049  * # store Aij in global frame
13050  * cdef np.ndarray Aij_global = np.zeros((6, 6)) # <<<<<<<<<<<<<<
13051  * Aij_global[:] = Aij[:]
13052  * # transform Aij in local frame
13053  */
13054  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
13055  __Pyx_GOTREF(__pyx_t_3);
13056  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
13057  __Pyx_GOTREF(__pyx_t_4);
13058  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13059  __pyx_t_3 = NULL;
13060  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
13061  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
13062  if (likely(__pyx_t_3)) {
13063  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
13064  __Pyx_INCREF(__pyx_t_3);
13065  __Pyx_INCREF(function);
13066  __Pyx_DECREF_SET(__pyx_t_4, function);
13067  }
13068  }
13069  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_tuple__2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_tuple__2);
13070  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13071  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
13072  __Pyx_GOTREF(__pyx_t_2);
13073  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13074  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 546, __pyx_L1_error)
13075  __pyx_v_Aij_global = ((PyArrayObject *)__pyx_t_2);
13076  __pyx_t_2 = 0;
13077 
13078  /* "mbd/CouplingFSI.pyx":547
13079  * # store Aij in global frame
13080  * cdef np.ndarray Aij_global = np.zeros((6, 6))
13081  * Aij_global[:] = Aij[:] # <<<<<<<<<<<<<<
13082  * # transform Aij in local frame
13083  * if self.Aij_updated_global is True and self.Aij_transform_local is True:
13084  */
13085  __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_Aij), 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
13086  __Pyx_GOTREF(__pyx_t_2);
13087  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_Aij_global), __pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 547, __pyx_L1_error)
13088  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13089 
13090  /* "mbd/CouplingFSI.pyx":549
13091  * Aij_global[:] = Aij[:]
13092  * # transform Aij in local frame
13093  * if self.Aij_updated_global is True and self.Aij_transform_local is True: # <<<<<<<<<<<<<<
13094  * # converting from global to local: Rot*Aij*RotT*v
13095  * rot = self.ChBodyAddedMass.GetRot()
13096  */
13097  __pyx_t_8 = ((__pyx_v_self->Aij_updated_global == 1) != 0);
13098  if (__pyx_t_8) {
13099  } else {
13100  __pyx_t_1 = __pyx_t_8;
13101  goto __pyx_L4_bool_binop_done;
13102  }
13103  __pyx_t_8 = ((__pyx_v_self->Aij_transform_local == 1) != 0);
13104  __pyx_t_1 = __pyx_t_8;
13105  __pyx_L4_bool_binop_done:;
13106  if (__pyx_t_1) {
13107 
13108  /* "mbd/CouplingFSI.pyx":551
13109  * if self.Aij_updated_global is True and self.Aij_transform_local is True:
13110  * # converting from global to local: Rot*Aij*RotT*v
13111  * rot = self.ChBodyAddedMass.GetRot() # <<<<<<<<<<<<<<
13112  * rotch = chrono.ChMatrix33D(rot)
13113  * rotMarr_big = np.zeros((6, 6))
13114  */
13115  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ChBodyAddedMass), __pyx_n_s_GetRot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 551, __pyx_L1_error)
13116  __Pyx_GOTREF(__pyx_t_4);
13117  __pyx_t_3 = NULL;
13118  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
13119  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
13120  if (likely(__pyx_t_3)) {
13121  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
13122  __Pyx_INCREF(__pyx_t_3);
13123  __Pyx_INCREF(function);
13124  __Pyx_DECREF_SET(__pyx_t_4, function);
13125  }
13126  }
13127  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
13128  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13129  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
13130  __Pyx_GOTREF(__pyx_t_2);
13131  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13132  __pyx_v_rot = __pyx_t_2;
13133  __pyx_t_2 = 0;
13134 
13135  /* "mbd/CouplingFSI.pyx":552
13136  * # converting from global to local: Rot*Aij*RotT*v
13137  * rot = self.ChBodyAddedMass.GetRot()
13138  * rotch = chrono.ChMatrix33D(rot) # <<<<<<<<<<<<<<
13139  * rotMarr_big = np.zeros((6, 6))
13140  * rotMarrT_big = np.zeros((6, 6))
13141  */
13142  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_chrono); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L1_error)
13143  __Pyx_GOTREF(__pyx_t_4);
13144  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_ChMatrix33D); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error)
13145  __Pyx_GOTREF(__pyx_t_3);
13146  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13147  __pyx_t_4 = NULL;
13148  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13149  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
13150  if (likely(__pyx_t_4)) {
13151  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13152  __Pyx_INCREF(__pyx_t_4);
13153  __Pyx_INCREF(function);
13154  __Pyx_DECREF_SET(__pyx_t_3, function);
13155  }
13156  }
13157  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_rot) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_rot);
13158  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13159  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
13160  __Pyx_GOTREF(__pyx_t_2);
13161  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13162  __pyx_v_rotch = __pyx_t_2;
13163  __pyx_t_2 = 0;
13164 
13165  /* "mbd/CouplingFSI.pyx":553
13166  * rot = self.ChBodyAddedMass.GetRot()
13167  * rotch = chrono.ChMatrix33D(rot)
13168  * rotMarr_big = np.zeros((6, 6)) # <<<<<<<<<<<<<<
13169  * rotMarrT_big = np.zeros((6, 6))
13170  * for i in range(6):
13171  */
13172  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 553, __pyx_L1_error)
13173  __Pyx_GOTREF(__pyx_t_3);
13174  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error)
13175  __Pyx_GOTREF(__pyx_t_4);
13176  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13177  __pyx_t_3 = NULL;
13178  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
13179  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
13180  if (likely(__pyx_t_3)) {
13181  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
13182  __Pyx_INCREF(__pyx_t_3);
13183  __Pyx_INCREF(function);
13184  __Pyx_DECREF_SET(__pyx_t_4, function);
13185  }
13186  }
13187  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_tuple__2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_tuple__2);
13188  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13189  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
13190  __Pyx_GOTREF(__pyx_t_2);
13191  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13192  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 553, __pyx_L1_error)
13193  __pyx_v_rotMarr_big = ((PyArrayObject *)__pyx_t_2);
13194  __pyx_t_2 = 0;
13195 
13196  /* "mbd/CouplingFSI.pyx":554
13197  * rotch = chrono.ChMatrix33D(rot)
13198  * rotMarr_big = np.zeros((6, 6))
13199  * rotMarrT_big = np.zeros((6, 6)) # <<<<<<<<<<<<<<
13200  * for i in range(6):
13201  * for j in range(6):
13202  */
13203  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error)
13204  __Pyx_GOTREF(__pyx_t_4);
13205  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
13206  __Pyx_GOTREF(__pyx_t_3);
13207  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13208  __pyx_t_4 = NULL;
13209  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
13210  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
13211  if (likely(__pyx_t_4)) {
13212  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13213  __Pyx_INCREF(__pyx_t_4);
13214  __Pyx_INCREF(function);
13215  __Pyx_DECREF_SET(__pyx_t_3, function);
13216  }
13217  }
13218  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_tuple__2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_tuple__2);
13219  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13220  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
13221  __Pyx_GOTREF(__pyx_t_2);
13222  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13223  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 554, __pyx_L1_error)
13224  __pyx_v_rotMarrT_big = ((PyArrayObject *)__pyx_t_2);
13225  __pyx_t_2 = 0;
13226 
13227  /* "mbd/CouplingFSI.pyx":555
13228  * rotMarr_big = np.zeros((6, 6))
13229  * rotMarrT_big = np.zeros((6, 6))
13230  * for i in range(6): # <<<<<<<<<<<<<<
13231  * for j in range(6):
13232  * if i < 3 and j < 3 :
13233  */
13234  for (__pyx_t_9 = 0; __pyx_t_9 < 6; __pyx_t_9+=1) {
13235  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
13236  __Pyx_GOTREF(__pyx_t_2);
13237  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
13238  __pyx_t_2 = 0;
13239 
13240  /* "mbd/CouplingFSI.pyx":556
13241  * rotMarrT_big = np.zeros((6, 6))
13242  * for i in range(6):
13243  * for j in range(6): # <<<<<<<<<<<<<<
13244  * if i < 3 and j < 3 :
13245  * rotMarr_big[i, j] = rotch.getitem(i, j)
13246  */
13247  for (__pyx_t_10 = 0; __pyx_t_10 < 6; __pyx_t_10+=1) {
13248  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 556, __pyx_L1_error)
13249  __Pyx_GOTREF(__pyx_t_2);
13250  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2);
13251  __pyx_t_2 = 0;
13252 
13253  /* "mbd/CouplingFSI.pyx":557
13254  * for i in range(6):
13255  * for j in range(6):
13256  * if i < 3 and j < 3 : # <<<<<<<<<<<<<<
13257  * rotMarr_big[i, j] = rotch.getitem(i, j)
13258  * rotMarrT_big[i, j] = rotch.getitem(j, i)
13259  */
13260  __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
13261  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 557, __pyx_L1_error)
13262  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13263  if (__pyx_t_8) {
13264  } else {
13265  __pyx_t_1 = __pyx_t_8;
13266  goto __pyx_L11_bool_binop_done;
13267  }
13268  __pyx_t_2 = PyObject_RichCompare(__pyx_v_j, __pyx_int_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 557, __pyx_L1_error)
13269  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 557, __pyx_L1_error)
13270  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13271  __pyx_t_1 = __pyx_t_8;
13272  __pyx_L11_bool_binop_done:;
13273  if (__pyx_t_1) {
13274 
13275  /* "mbd/CouplingFSI.pyx":558
13276  * for j in range(6):
13277  * if i < 3 and j < 3 :
13278  * rotMarr_big[i, j] = rotch.getitem(i, j) # <<<<<<<<<<<<<<
13279  * rotMarrT_big[i, j] = rotch.getitem(j, i)
13280  * elif i >=3 and j >= 3:
13281  */
13282  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rotch, __pyx_n_s_getitem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
13283  __Pyx_GOTREF(__pyx_t_3);
13284  __pyx_t_4 = NULL;
13285  __pyx_t_11 = 0;
13286  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13287  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
13288  if (likely(__pyx_t_4)) {
13289  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13290  __Pyx_INCREF(__pyx_t_4);
13291  __Pyx_INCREF(function);
13292  __Pyx_DECREF_SET(__pyx_t_3, function);
13293  __pyx_t_11 = 1;
13294  }
13295  }
13296  #if CYTHON_FAST_PYCALL
13297  if (PyFunction_Check(__pyx_t_3)) {
13298  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_i, __pyx_v_j};
13299  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
13300  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13301  __Pyx_GOTREF(__pyx_t_2);
13302  } else
13303  #endif
13304  #if CYTHON_FAST_PYCCALL
13305  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
13306  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_i, __pyx_v_j};
13307  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
13308  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13309  __Pyx_GOTREF(__pyx_t_2);
13310  } else
13311  #endif
13312  {
13313  __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 558, __pyx_L1_error)
13314  __Pyx_GOTREF(__pyx_t_6);
13315  if (__pyx_t_4) {
13316  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
13317  }
13318  __Pyx_INCREF(__pyx_v_i);
13319  __Pyx_GIVEREF(__pyx_v_i);
13320  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_11, __pyx_v_i);
13321  __Pyx_INCREF(__pyx_v_j);
13322  __Pyx_GIVEREF(__pyx_v_j);
13323  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_11, __pyx_v_j);
13324  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error)
13325  __Pyx_GOTREF(__pyx_t_2);
13326  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13327  }
13328  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13329  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error)
13330  __Pyx_GOTREF(__pyx_t_3);
13331  __Pyx_INCREF(__pyx_v_i);
13332  __Pyx_GIVEREF(__pyx_v_i);
13333  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
13334  __Pyx_INCREF(__pyx_v_j);
13335  __Pyx_GIVEREF(__pyx_v_j);
13336  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j);
13337  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_rotMarr_big), __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 558, __pyx_L1_error)
13338  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13339  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13340 
13341  /* "mbd/CouplingFSI.pyx":559
13342  * if i < 3 and j < 3 :
13343  * rotMarr_big[i, j] = rotch.getitem(i, j)
13344  * rotMarrT_big[i, j] = rotch.getitem(j, i) # <<<<<<<<<<<<<<
13345  * elif i >=3 and j >= 3:
13346  * rotMarr_big[i, j] = rotch.getitem(i-3, j-3)
13347  */
13348  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rotch, __pyx_n_s_getitem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
13349  __Pyx_GOTREF(__pyx_t_3);
13350  __pyx_t_6 = NULL;
13351  __pyx_t_11 = 0;
13352  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13353  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
13354  if (likely(__pyx_t_6)) {
13355  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13356  __Pyx_INCREF(__pyx_t_6);
13357  __Pyx_INCREF(function);
13358  __Pyx_DECREF_SET(__pyx_t_3, function);
13359  __pyx_t_11 = 1;
13360  }
13361  }
13362  #if CYTHON_FAST_PYCALL
13363  if (PyFunction_Check(__pyx_t_3)) {
13364  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_j, __pyx_v_i};
13365  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
13366  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13367  __Pyx_GOTREF(__pyx_t_2);
13368  } else
13369  #endif
13370  #if CYTHON_FAST_PYCCALL
13371  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
13372  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_j, __pyx_v_i};
13373  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
13374  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13375  __Pyx_GOTREF(__pyx_t_2);
13376  } else
13377  #endif
13378  {
13379  __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error)
13380  __Pyx_GOTREF(__pyx_t_4);
13381  if (__pyx_t_6) {
13382  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
13383  }
13384  __Pyx_INCREF(__pyx_v_j);
13385  __Pyx_GIVEREF(__pyx_v_j);
13386  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_11, __pyx_v_j);
13387  __Pyx_INCREF(__pyx_v_i);
13388  __Pyx_GIVEREF(__pyx_v_i);
13389  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, __pyx_v_i);
13390  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
13391  __Pyx_GOTREF(__pyx_t_2);
13392  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13393  }
13394  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13395  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
13396  __Pyx_GOTREF(__pyx_t_3);
13397  __Pyx_INCREF(__pyx_v_i);
13398  __Pyx_GIVEREF(__pyx_v_i);
13399  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
13400  __Pyx_INCREF(__pyx_v_j);
13401  __Pyx_GIVEREF(__pyx_v_j);
13402  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j);
13403  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_rotMarrT_big), __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 559, __pyx_L1_error)
13404  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13405  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13406 
13407  /* "mbd/CouplingFSI.pyx":557
13408  * for i in range(6):
13409  * for j in range(6):
13410  * if i < 3 and j < 3 : # <<<<<<<<<<<<<<
13411  * rotMarr_big[i, j] = rotch.getitem(i, j)
13412  * rotMarrT_big[i, j] = rotch.getitem(j, i)
13413  */
13414  goto __pyx_L10;
13415  }
13416 
13417  /* "mbd/CouplingFSI.pyx":560
13418  * rotMarr_big[i, j] = rotch.getitem(i, j)
13419  * rotMarrT_big[i, j] = rotch.getitem(j, i)
13420  * elif i >=3 and j >= 3: # <<<<<<<<<<<<<<
13421  * rotMarr_big[i, j] = rotch.getitem(i-3, j-3)
13422  * rotMarrT_big[i, j] = rotch.getitem(j-3, i-3)
13423  */
13424  __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
13425  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 560, __pyx_L1_error)
13426  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13427  if (__pyx_t_8) {
13428  } else {
13429  __pyx_t_1 = __pyx_t_8;
13430  goto __pyx_L13_bool_binop_done;
13431  }
13432  __pyx_t_2 = PyObject_RichCompare(__pyx_v_j, __pyx_int_3, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
13433  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 560, __pyx_L1_error)
13434  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13435  __pyx_t_1 = __pyx_t_8;
13436  __pyx_L13_bool_binop_done:;
13437  if (__pyx_t_1) {
13438 
13439  /* "mbd/CouplingFSI.pyx":561
13440  * rotMarrT_big[i, j] = rotch.getitem(j, i)
13441  * elif i >=3 and j >= 3:
13442  * rotMarr_big[i, j] = rotch.getitem(i-3, j-3) # <<<<<<<<<<<<<<
13443  * rotMarrT_big[i, j] = rotch.getitem(j-3, i-3)
13444  * # self.Aij[:] = np.matmul(rotMarr_big, np.matmul(Aij, rotMarrT_big))
13445  */
13446  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rotch, __pyx_n_s_getitem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
13447  __Pyx_GOTREF(__pyx_t_3);
13448  __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 561, __pyx_L1_error)
13449  __Pyx_GOTREF(__pyx_t_4);
13450  __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_j, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 561, __pyx_L1_error)
13451  __Pyx_GOTREF(__pyx_t_6);
13452  __pyx_t_7 = NULL;
13453  __pyx_t_11 = 0;
13454  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13455  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
13456  if (likely(__pyx_t_7)) {
13457  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13458  __Pyx_INCREF(__pyx_t_7);
13459  __Pyx_INCREF(function);
13460  __Pyx_DECREF_SET(__pyx_t_3, function);
13461  __pyx_t_11 = 1;
13462  }
13463  }
13464  #if CYTHON_FAST_PYCALL
13465  if (PyFunction_Check(__pyx_t_3)) {
13466  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_6};
13467  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
13468  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13469  __Pyx_GOTREF(__pyx_t_2);
13470  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13471  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13472  } else
13473  #endif
13474  #if CYTHON_FAST_PYCCALL
13475  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
13476  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_4, __pyx_t_6};
13477  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
13478  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
13479  __Pyx_GOTREF(__pyx_t_2);
13480  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
13481  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13482  } else
13483  #endif
13484  {
13485  __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 561, __pyx_L1_error)
13486  __Pyx_GOTREF(__pyx_t_12);
13487  if (__pyx_t_7) {
13488  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_7); __pyx_t_7 = NULL;
13489  }
13490  __Pyx_GIVEREF(__pyx_t_4);
13491  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_4);
13492  __Pyx_GIVEREF(__pyx_t_6);
13493  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_6);
13494  __pyx_t_4 = 0;
13495  __pyx_t_6 = 0;
13496  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 561, __pyx_L1_error)
13497  __Pyx_GOTREF(__pyx_t_2);
13498  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
13499  }
13500  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13501  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
13502  __Pyx_GOTREF(__pyx_t_3);
13503  __Pyx_INCREF(__pyx_v_i);
13504  __Pyx_GIVEREF(__pyx_v_i);
13505  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
13506  __Pyx_INCREF(__pyx_v_j);
13507  __Pyx_GIVEREF(__pyx_v_j);
13508  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j);
13509  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_rotMarr_big), __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 561, __pyx_L1_error)
13510  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13511  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13512 
13513  /* "mbd/CouplingFSI.pyx":562
13514  * elif i >=3 and j >= 3:
13515  * rotMarr_big[i, j] = rotch.getitem(i-3, j-3)
13516  * rotMarrT_big[i, j] = rotch.getitem(j-3, i-3) # <<<<<<<<<<<<<<
13517  * # self.Aij[:] = np.matmul(rotMarr_big, np.matmul(Aij, rotMarrT_big))
13518  * self.Aij[:] = rotMarrT_big.dot(Aij).dot(rotMarr_big)
13519  */
13520  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rotch, __pyx_n_s_getitem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
13521  __Pyx_GOTREF(__pyx_t_3);
13522  __pyx_t_12 = __Pyx_PyInt_SubtractObjC(__pyx_v_j, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 562, __pyx_L1_error)
13523  __Pyx_GOTREF(__pyx_t_12);
13524  __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error)
13525  __Pyx_GOTREF(__pyx_t_6);
13526  __pyx_t_4 = NULL;
13527  __pyx_t_11 = 0;
13528  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
13529  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
13530  if (likely(__pyx_t_4)) {
13531  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
13532  __Pyx_INCREF(__pyx_t_4);
13533  __Pyx_INCREF(function);
13534  __Pyx_DECREF_SET(__pyx_t_3, function);
13535  __pyx_t_11 = 1;
13536  }
13537  }
13538  #if CYTHON_FAST_PYCALL
13539  if (PyFunction_Check(__pyx_t_3)) {
13540  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_12, __pyx_t_6};
13541  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
13542  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13543  __Pyx_GOTREF(__pyx_t_2);
13544  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
13545  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13546  } else
13547  #endif
13548  #if CYTHON_FAST_PYCCALL
13549  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
13550  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_12, __pyx_t_6};
13551  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
13552  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
13553  __Pyx_GOTREF(__pyx_t_2);
13554  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
13555  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
13556  } else
13557  #endif
13558  {
13559  __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 562, __pyx_L1_error)
13560  __Pyx_GOTREF(__pyx_t_7);
13561  if (__pyx_t_4) {
13562  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
13563  }
13564  __Pyx_GIVEREF(__pyx_t_12);
13565  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_t_12);
13566  __Pyx_GIVEREF(__pyx_t_6);
13567  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_t_6);
13568  __pyx_t_12 = 0;
13569  __pyx_t_6 = 0;
13570  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error)
13571  __Pyx_GOTREF(__pyx_t_2);
13572  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13573  }
13574  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13575  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
13576  __Pyx_GOTREF(__pyx_t_3);
13577  __Pyx_INCREF(__pyx_v_i);
13578  __Pyx_GIVEREF(__pyx_v_i);
13579  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
13580  __Pyx_INCREF(__pyx_v_j);
13581  __Pyx_GIVEREF(__pyx_v_j);
13582  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j);
13583  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_rotMarrT_big), __pyx_t_3, __pyx_t_2) < 0)) __PYX_ERR(0, 562, __pyx_L1_error)
13584  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13585  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13586 
13587  /* "mbd/CouplingFSI.pyx":560
13588  * rotMarr_big[i, j] = rotch.getitem(i, j)
13589  * rotMarrT_big[i, j] = rotch.getitem(j, i)
13590  * elif i >=3 and j >= 3: # <<<<<<<<<<<<<<
13591  * rotMarr_big[i, j] = rotch.getitem(i-3, j-3)
13592  * rotMarrT_big[i, j] = rotch.getitem(j-3, i-3)
13593  */
13594  }
13595  __pyx_L10:;
13596  }
13597  }
13598 
13599  /* "mbd/CouplingFSI.pyx":564
13600  * rotMarrT_big[i, j] = rotch.getitem(j-3, i-3)
13601  * # self.Aij[:] = np.matmul(rotMarr_big, np.matmul(Aij, rotMarrT_big))
13602  * self.Aij[:] = rotMarrT_big.dot(Aij).dot(rotMarr_big) # <<<<<<<<<<<<<<
13603  * else:
13604  * self.Aij[:] = Aij
13605  */
13606  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rotMarrT_big), __pyx_n_s_dot); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 564, __pyx_L1_error)
13607  __Pyx_GOTREF(__pyx_t_7);
13608  __pyx_t_6 = NULL;
13609  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
13610  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
13611  if (likely(__pyx_t_6)) {
13612  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
13613  __Pyx_INCREF(__pyx_t_6);
13614  __Pyx_INCREF(function);
13615  __Pyx_DECREF_SET(__pyx_t_7, function);
13616  }
13617  }
13618  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, ((PyObject *)__pyx_v_Aij)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_Aij));
13619  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
13620  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 564, __pyx_L1_error)
13621  __Pyx_GOTREF(__pyx_t_3);
13622  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13623  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_dot); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 564, __pyx_L1_error)
13624  __Pyx_GOTREF(__pyx_t_7);
13625  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13626  __pyx_t_3 = NULL;
13627  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
13628  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
13629  if (likely(__pyx_t_3)) {
13630  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
13631  __Pyx_INCREF(__pyx_t_3);
13632  __Pyx_INCREF(function);
13633  __Pyx_DECREF_SET(__pyx_t_7, function);
13634  }
13635  }
13636  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_v_rotMarr_big)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_v_rotMarr_big));
13637  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13638  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
13639  __Pyx_GOTREF(__pyx_t_2);
13640  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13641  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->Aij), __pyx_t_2, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 564, __pyx_L1_error)
13642  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13643 
13644  /* "mbd/CouplingFSI.pyx":549
13645  * Aij_global[:] = Aij[:]
13646  * # transform Aij in local frame
13647  * if self.Aij_updated_global is True and self.Aij_transform_local is True: # <<<<<<<<<<<<<<
13648  * # converting from global to local: Rot*Aij*RotT*v
13649  * rot = self.ChBodyAddedMass.GetRot()
13650  */
13651  goto __pyx_L3;
13652  }
13653 
13654  /* "mbd/CouplingFSI.pyx":566
13655  * self.Aij[:] = rotMarrT_big.dot(Aij).dot(rotMarr_big)
13656  * else:
13657  * self.Aij[:] = Aij # <<<<<<<<<<<<<<
13658  * # remove terms from restrained DOFs
13659  * self.Aij[0, 1:] *= self.thisptr.free_x.x()
13660  */
13661  /*else*/ {
13662  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->Aij), ((PyObject *)__pyx_v_Aij), 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 566, __pyx_L1_error)
13663  }
13664  __pyx_L3:;
13665 
13666  /* "mbd/CouplingFSI.pyx":568
13667  * self.Aij[:] = Aij
13668  * # remove terms from restrained DOFs
13669  * self.Aij[0, 1:] *= self.thisptr.free_x.x() # <<<<<<<<<<<<<<
13670  * self.Aij[1, 0] *= self.thisptr.free_x.y()
13671  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
13672  */
13673  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13674  __pyx_t_13 = __pyx_v_self->Aij;
13675  __Pyx_INCREF(__pyx_tuple__32);
13676  __pyx_t_14 = __pyx_tuple__32;
13677  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
13678  __Pyx_GOTREF(__pyx_t_2);
13679  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_x.x()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 568, __pyx_L1_error)
13680  __Pyx_GOTREF(__pyx_t_7);
13681  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
13682  __Pyx_GOTREF(__pyx_t_3);
13683  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13684  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13685  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_3) < 0)) __PYX_ERR(0, 568, __pyx_L1_error)
13686  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13687  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13688  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13689 
13690  /* "mbd/CouplingFSI.pyx":569
13691  * # remove terms from restrained DOFs
13692  * self.Aij[0, 1:] *= self.thisptr.free_x.x()
13693  * self.Aij[1, 0] *= self.thisptr.free_x.y() # <<<<<<<<<<<<<<
13694  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
13695  * self.Aij[2, :2] *= self.thisptr.free_x.z()
13696  */
13697  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13698  __pyx_t_13 = __pyx_v_self->Aij;
13699  __Pyx_INCREF(__pyx_tuple__33);
13700  __pyx_t_14 = __pyx_tuple__33;
13701  __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L1_error)
13702  __Pyx_GOTREF(__pyx_t_3);
13703  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_x.y()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 569, __pyx_L1_error)
13704  __Pyx_GOTREF(__pyx_t_7);
13705  __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error)
13706  __Pyx_GOTREF(__pyx_t_2);
13707  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13708  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13709  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 569, __pyx_L1_error)
13710  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13711  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13712  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13713 
13714  /* "mbd/CouplingFSI.pyx":570
13715  * self.Aij[0, 1:] *= self.thisptr.free_x.x()
13716  * self.Aij[1, 0] *= self.thisptr.free_x.y()
13717  * self.Aij[1, 2:] *= self.thisptr.free_x.y() # <<<<<<<<<<<<<<
13718  * self.Aij[2, :2] *= self.thisptr.free_x.z()
13719  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
13720  */
13721  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13722  __pyx_t_13 = __pyx_v_self->Aij;
13723  __Pyx_INCREF(__pyx_tuple__35);
13724  __pyx_t_14 = __pyx_tuple__35;
13725  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 570, __pyx_L1_error)
13726  __Pyx_GOTREF(__pyx_t_2);
13727  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_x.y()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 570, __pyx_L1_error)
13728  __Pyx_GOTREF(__pyx_t_7);
13729  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
13730  __Pyx_GOTREF(__pyx_t_3);
13731  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13732  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13733  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_3) < 0)) __PYX_ERR(0, 570, __pyx_L1_error)
13734  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13735  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13736  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13737 
13738  /* "mbd/CouplingFSI.pyx":571
13739  * self.Aij[1, 0] *= self.thisptr.free_x.y()
13740  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
13741  * self.Aij[2, :2] *= self.thisptr.free_x.z() # <<<<<<<<<<<<<<
13742  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
13743  * self.Aij[3, :3] *= self.thisptr.free_r.x()
13744  */
13745  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13746  __pyx_t_13 = __pyx_v_self->Aij;
13747  __Pyx_INCREF(__pyx_tuple__37);
13748  __pyx_t_14 = __pyx_tuple__37;
13749  __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
13750  __Pyx_GOTREF(__pyx_t_3);
13751  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_x.z()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 571, __pyx_L1_error)
13752  __Pyx_GOTREF(__pyx_t_7);
13753  __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
13754  __Pyx_GOTREF(__pyx_t_2);
13755  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13756  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13757  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 571, __pyx_L1_error)
13758  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13759  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13760  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13761 
13762  /* "mbd/CouplingFSI.pyx":572
13763  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
13764  * self.Aij[2, :2] *= self.thisptr.free_x.z()
13765  * self.Aij[2, 3:] *= self.thisptr.free_x.z() # <<<<<<<<<<<<<<
13766  * self.Aij[3, :3] *= self.thisptr.free_r.x()
13767  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
13768  */
13769  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13770  __pyx_t_13 = __pyx_v_self->Aij;
13771  __Pyx_INCREF(__pyx_tuple__39);
13772  __pyx_t_14 = __pyx_tuple__39;
13773  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error)
13774  __Pyx_GOTREF(__pyx_t_2);
13775  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_x.z()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 572, __pyx_L1_error)
13776  __Pyx_GOTREF(__pyx_t_7);
13777  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 572, __pyx_L1_error)
13778  __Pyx_GOTREF(__pyx_t_3);
13779  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13780  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13781  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_3) < 0)) __PYX_ERR(0, 572, __pyx_L1_error)
13782  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13783  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13784  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13785 
13786  /* "mbd/CouplingFSI.pyx":573
13787  * self.Aij[2, :2] *= self.thisptr.free_x.z()
13788  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
13789  * self.Aij[3, :3] *= self.thisptr.free_r.x() # <<<<<<<<<<<<<<
13790  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
13791  * self.Aij[4, :4] *= self.thisptr.free_r.y()
13792  */
13793  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13794  __pyx_t_13 = __pyx_v_self->Aij;
13795  __Pyx_INCREF(__pyx_tuple__41);
13796  __pyx_t_14 = __pyx_tuple__41;
13797  __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
13798  __Pyx_GOTREF(__pyx_t_3);
13799  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_r.x()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 573, __pyx_L1_error)
13800  __Pyx_GOTREF(__pyx_t_7);
13801  __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
13802  __Pyx_GOTREF(__pyx_t_2);
13803  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13804  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13805  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 573, __pyx_L1_error)
13806  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13807  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13808  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13809 
13810  /* "mbd/CouplingFSI.pyx":574
13811  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
13812  * self.Aij[3, :3] *= self.thisptr.free_r.x()
13813  * self.Aij[3, 4:] *= self.thisptr.free_r.x() # <<<<<<<<<<<<<<
13814  * self.Aij[4, :4] *= self.thisptr.free_r.y()
13815  * self.Aij[4, 5] *= self.thisptr.free_r.y()
13816  */
13817  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13818  __pyx_t_13 = __pyx_v_self->Aij;
13819  __Pyx_INCREF(__pyx_tuple__43);
13820  __pyx_t_14 = __pyx_tuple__43;
13821  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 574, __pyx_L1_error)
13822  __Pyx_GOTREF(__pyx_t_2);
13823  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_r.x()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 574, __pyx_L1_error)
13824  __Pyx_GOTREF(__pyx_t_7);
13825  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error)
13826  __Pyx_GOTREF(__pyx_t_3);
13827  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13828  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13829  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_3) < 0)) __PYX_ERR(0, 574, __pyx_L1_error)
13830  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13831  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13832  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13833 
13834  /* "mbd/CouplingFSI.pyx":575
13835  * self.Aij[3, :3] *= self.thisptr.free_r.x()
13836  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
13837  * self.Aij[4, :4] *= self.thisptr.free_r.y() # <<<<<<<<<<<<<<
13838  * self.Aij[4, 5] *= self.thisptr.free_r.y()
13839  * self.Aij[5, :5] *= self.thisptr.free_r.z()
13840  */
13841  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13842  __pyx_t_13 = __pyx_v_self->Aij;
13843  __Pyx_INCREF(__pyx_tuple__45);
13844  __pyx_t_14 = __pyx_tuple__45;
13845  __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
13846  __Pyx_GOTREF(__pyx_t_3);
13847  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_r.y()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 575, __pyx_L1_error)
13848  __Pyx_GOTREF(__pyx_t_7);
13849  __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
13850  __Pyx_GOTREF(__pyx_t_2);
13851  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13852  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13853  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 575, __pyx_L1_error)
13854  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13855  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13856  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13857 
13858  /* "mbd/CouplingFSI.pyx":576
13859  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
13860  * self.Aij[4, :4] *= self.thisptr.free_r.y()
13861  * self.Aij[4, 5] *= self.thisptr.free_r.y() # <<<<<<<<<<<<<<
13862  * self.Aij[5, :5] *= self.thisptr.free_r.z()
13863  * # mass matrix
13864  */
13865  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13866  __pyx_t_13 = __pyx_v_self->Aij;
13867  __Pyx_INCREF(__pyx_tuple__46);
13868  __pyx_t_14 = __pyx_tuple__46;
13869  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error)
13870  __Pyx_GOTREF(__pyx_t_2);
13871  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_r.y()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 576, __pyx_L1_error)
13872  __Pyx_GOTREF(__pyx_t_7);
13873  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)
13874  __Pyx_GOTREF(__pyx_t_3);
13875  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13876  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13877  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_3) < 0)) __PYX_ERR(0, 576, __pyx_L1_error)
13878  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13879  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13880  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13881 
13882  /* "mbd/CouplingFSI.pyx":577
13883  * self.Aij[4, :4] *= self.thisptr.free_r.y()
13884  * self.Aij[4, 5] *= self.thisptr.free_r.y()
13885  * self.Aij[5, :5] *= self.thisptr.free_r.z() # <<<<<<<<<<<<<<
13886  * # mass matrix
13887  * MM[0,0] = mass
13888  */
13889  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
13890  __pyx_t_13 = __pyx_v_self->Aij;
13891  __Pyx_INCREF(__pyx_tuple__48);
13892  __pyx_t_14 = __pyx_tuple__48;
13893  __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_t_13), __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error)
13894  __Pyx_GOTREF(__pyx_t_3);
13895  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->thisptr->free_r.z()); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
13896  __Pyx_GOTREF(__pyx_t_7);
13897  __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error)
13898  __Pyx_GOTREF(__pyx_t_2);
13899  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13900  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
13901  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_t_13), __pyx_t_14, __pyx_t_2) < 0)) __PYX_ERR(0, 577, __pyx_L1_error)
13902  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13903  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
13904  __Pyx_DECREF(((PyObject *)__pyx_t_13)); __pyx_t_13 = 0;
13905 
13906  /* "mbd/CouplingFSI.pyx":579
13907  * self.Aij[5, :5] *= self.thisptr.free_r.z()
13908  * # mass matrix
13909  * MM[0,0] = mass # <<<<<<<<<<<<<<
13910  * MM[1,1] = mass
13911  * MM[2,2] = mass
13912  */
13913  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_mass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
13914  __Pyx_GOTREF(__pyx_t_2);
13915  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_MM), __pyx_tuple__49, __pyx_t_2) < 0)) __PYX_ERR(0, 579, __pyx_L1_error)
13916  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13917 
13918  /* "mbd/CouplingFSI.pyx":580
13919  * # mass matrix
13920  * MM[0,0] = mass
13921  * MM[1,1] = mass # <<<<<<<<<<<<<<
13922  * MM[2,2] = mass
13923  * for i in range(3):
13924  */
13925  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_mass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)
13926  __Pyx_GOTREF(__pyx_t_2);
13927  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_MM), __pyx_tuple__50, __pyx_t_2) < 0)) __PYX_ERR(0, 580, __pyx_L1_error)
13928  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13929 
13930  /* "mbd/CouplingFSI.pyx":581
13931  * MM[0,0] = mass
13932  * MM[1,1] = mass
13933  * MM[2,2] = mass # <<<<<<<<<<<<<<
13934  * for i in range(3):
13935  * for j in range(3):
13936  */
13937  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_mass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
13938  __Pyx_GOTREF(__pyx_t_2);
13939  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_MM), __pyx_tuple__51, __pyx_t_2) < 0)) __PYX_ERR(0, 581, __pyx_L1_error)
13940  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13941 
13942  /* "mbd/CouplingFSI.pyx":582
13943  * MM[1,1] = mass
13944  * MM[2,2] = mass
13945  * for i in range(3): # <<<<<<<<<<<<<<
13946  * for j in range(3):
13947  * MM[i+3, j+3] = iner[i, j]
13948  */
13949  for (__pyx_t_9 = 0; __pyx_t_9 < 3; __pyx_t_9+=1) {
13950  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
13951  __Pyx_GOTREF(__pyx_t_2);
13952  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
13953  __pyx_t_2 = 0;
13954 
13955  /* "mbd/CouplingFSI.pyx":583
13956  * MM[2,2] = mass
13957  * for i in range(3):
13958  * for j in range(3): # <<<<<<<<<<<<<<
13959  * MM[i+3, j+3] = iner[i, j]
13960  * # full mass
13961  */
13962  for (__pyx_t_10 = 0; __pyx_t_10 < 3; __pyx_t_10+=1) {
13963  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
13964  __Pyx_GOTREF(__pyx_t_2);
13965  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2);
13966  __pyx_t_2 = 0;
13967 
13968  /* "mbd/CouplingFSI.pyx":584
13969  * for i in range(3):
13970  * for j in range(3):
13971  * MM[i+3, j+3] = iner[i, j] # <<<<<<<<<<<<<<
13972  * # full mass
13973  * FM += self.Aij
13974  */
13975  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
13976  __Pyx_GOTREF(__pyx_t_2);
13977  __Pyx_INCREF(__pyx_v_i);
13978  __Pyx_GIVEREF(__pyx_v_i);
13979  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i);
13980  __Pyx_INCREF(__pyx_v_j);
13981  __Pyx_GIVEREF(__pyx_v_j);
13982  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_j);
13983  __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_iner), __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 584, __pyx_L1_error)
13984  __Pyx_GOTREF(__pyx_t_7);
13985  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13986  __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
13987  __Pyx_GOTREF(__pyx_t_2);
13988  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_j, __pyx_int_3, 3, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error)
13989  __Pyx_GOTREF(__pyx_t_3);
13990  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 584, __pyx_L1_error)
13991  __Pyx_GOTREF(__pyx_t_6);
13992  __Pyx_GIVEREF(__pyx_t_2);
13993  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
13994  __Pyx_GIVEREF(__pyx_t_3);
13995  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3);
13996  __pyx_t_2 = 0;
13997  __pyx_t_3 = 0;
13998  if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_MM), __pyx_t_6, __pyx_t_7) < 0)) __PYX_ERR(0, 584, __pyx_L1_error)
13999  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14000  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14001  }
14002  }
14003 
14004  /* "mbd/CouplingFSI.pyx":586
14005  * MM[i+3, j+3] = iner[i, j]
14006  * # full mass
14007  * FM += self.Aij # <<<<<<<<<<<<<<
14008  * FM += MM
14009  * Profiling.logEvent('Mass Matrix:\n'+str(MM))
14010  */
14011  __pyx_t_7 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_FM), ((PyObject *)__pyx_v_self->Aij)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
14012  __Pyx_GOTREF(__pyx_t_7);
14013  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 586, __pyx_L1_error)
14014  __Pyx_DECREF_SET(__pyx_v_FM, ((PyArrayObject *)__pyx_t_7));
14015  __pyx_t_7 = 0;
14016 
14017  /* "mbd/CouplingFSI.pyx":587
14018  * # full mass
14019  * FM += self.Aij
14020  * FM += MM # <<<<<<<<<<<<<<
14021  * Profiling.logEvent('Mass Matrix:\n'+str(MM))
14022  * Profiling.logEvent('Added Mass Matrix:\n'+str(self.Aij))
14023  */
14024  __pyx_t_7 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_FM), ((PyObject *)__pyx_v_MM)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 587, __pyx_L1_error)
14025  __Pyx_GOTREF(__pyx_t_7);
14026  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 587, __pyx_L1_error)
14027  __Pyx_DECREF_SET(__pyx_v_FM, ((PyArrayObject *)__pyx_t_7));
14028  __pyx_t_7 = 0;
14029 
14030  /* "mbd/CouplingFSI.pyx":588
14031  * FM += self.Aij
14032  * FM += MM
14033  * Profiling.logEvent('Mass Matrix:\n'+str(MM)) # <<<<<<<<<<<<<<
14034  * Profiling.logEvent('Added Mass Matrix:\n'+str(self.Aij))
14035  * Profiling.logEvent('Full Mass Matrix:\n'+str(FM))
14036  */
14037  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 588, __pyx_L1_error)
14038  __Pyx_GOTREF(__pyx_t_6);
14039  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
14040  __Pyx_GOTREF(__pyx_t_3);
14041  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14042  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_MM)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 588, __pyx_L1_error)
14043  __Pyx_GOTREF(__pyx_t_6);
14044  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_Mass_Matrix, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
14045  __Pyx_GOTREF(__pyx_t_2);
14046  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14047  __pyx_t_6 = NULL;
14048  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
14049  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
14050  if (likely(__pyx_t_6)) {
14051  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
14052  __Pyx_INCREF(__pyx_t_6);
14053  __Pyx_INCREF(function);
14054  __Pyx_DECREF_SET(__pyx_t_3, function);
14055  }
14056  }
14057  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
14058  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14059  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14060  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 588, __pyx_L1_error)
14061  __Pyx_GOTREF(__pyx_t_7);
14062  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14063  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14064 
14065  /* "mbd/CouplingFSI.pyx":589
14066  * FM += MM
14067  * Profiling.logEvent('Mass Matrix:\n'+str(MM))
14068  * Profiling.logEvent('Added Mass Matrix:\n'+str(self.Aij)) # <<<<<<<<<<<<<<
14069  * Profiling.logEvent('Full Mass Matrix:\n'+str(FM))
14070  * # inverse of full mass matrix
14071  */
14072  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
14073  __Pyx_GOTREF(__pyx_t_3);
14074  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
14075  __Pyx_GOTREF(__pyx_t_2);
14076  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14077  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self->Aij)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error)
14078  __Pyx_GOTREF(__pyx_t_3);
14079  __pyx_t_6 = PyNumber_Add(__pyx_kp_s_Added_Mass_Matrix, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 589, __pyx_L1_error)
14080  __Pyx_GOTREF(__pyx_t_6);
14081  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14082  __pyx_t_3 = NULL;
14083  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
14084  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
14085  if (likely(__pyx_t_3)) {
14086  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14087  __Pyx_INCREF(__pyx_t_3);
14088  __Pyx_INCREF(function);
14089  __Pyx_DECREF_SET(__pyx_t_2, function);
14090  }
14091  }
14092  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6);
14093  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14094  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14095  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 589, __pyx_L1_error)
14096  __Pyx_GOTREF(__pyx_t_7);
14097  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14098  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14099 
14100  /* "mbd/CouplingFSI.pyx":590
14101  * Profiling.logEvent('Mass Matrix:\n'+str(MM))
14102  * Profiling.logEvent('Added Mass Matrix:\n'+str(self.Aij))
14103  * Profiling.logEvent('Full Mass Matrix:\n'+str(FM)) # <<<<<<<<<<<<<<
14104  * # inverse of full mass matrix
14105  * inv_FM = np.linalg.inv(FM)
14106  */
14107  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
14108  __Pyx_GOTREF(__pyx_t_2);
14109  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 590, __pyx_L1_error)
14110  __Pyx_GOTREF(__pyx_t_6);
14111  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14112  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_FM)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
14113  __Pyx_GOTREF(__pyx_t_2);
14114  __pyx_t_3 = PyNumber_Add(__pyx_kp_s_Full_Mass_Matrix, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error)
14115  __Pyx_GOTREF(__pyx_t_3);
14116  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14117  __pyx_t_2 = NULL;
14118  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14119  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
14120  if (likely(__pyx_t_2)) {
14121  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14122  __Pyx_INCREF(__pyx_t_2);
14123  __Pyx_INCREF(function);
14124  __Pyx_DECREF_SET(__pyx_t_6, function);
14125  }
14126  }
14127  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3);
14128  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14129  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14130  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 590, __pyx_L1_error)
14131  __Pyx_GOTREF(__pyx_t_7);
14132  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14133  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14134 
14135  /* "mbd/CouplingFSI.pyx":592
14136  * Profiling.logEvent('Full Mass Matrix:\n'+str(FM))
14137  * # inverse of full mass matrix
14138  * inv_FM = np.linalg.inv(FM) # <<<<<<<<<<<<<<
14139  * #set it to chrono variable
14140  * chFM = chrono.ChMatrixDynamicD(6, 6)
14141  */
14142  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 592, __pyx_L1_error)
14143  __Pyx_GOTREF(__pyx_t_6);
14144  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_linalg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error)
14145  __Pyx_GOTREF(__pyx_t_3);
14146  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14147  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_inv); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 592, __pyx_L1_error)
14148  __Pyx_GOTREF(__pyx_t_6);
14149  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14150  __pyx_t_3 = NULL;
14151  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
14152  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
14153  if (likely(__pyx_t_3)) {
14154  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14155  __Pyx_INCREF(__pyx_t_3);
14156  __Pyx_INCREF(function);
14157  __Pyx_DECREF_SET(__pyx_t_6, function);
14158  }
14159  }
14160  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, ((PyObject *)__pyx_v_FM)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_FM));
14161  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14162  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 592, __pyx_L1_error)
14163  __Pyx_GOTREF(__pyx_t_7);
14164  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14165  __pyx_v_inv_FM = __pyx_t_7;
14166  __pyx_t_7 = 0;
14167 
14168  /* "mbd/CouplingFSI.pyx":594
14169  * inv_FM = np.linalg.inv(FM)
14170  * #set it to chrono variable
14171  * chFM = chrono.ChMatrixDynamicD(6, 6) # <<<<<<<<<<<<<<
14172  * inv_chFM = chrono.ChMatrixDynamicD(6, 6)
14173  * for i in range(6):
14174  */
14175  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_chrono); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 594, __pyx_L1_error)
14176  __Pyx_GOTREF(__pyx_t_7);
14177  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ChMatrixDynamicD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error)
14178  __Pyx_GOTREF(__pyx_t_6);
14179  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14180  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 594, __pyx_L1_error)
14181  __Pyx_GOTREF(__pyx_t_7);
14182  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14183  __pyx_v_chFM = __pyx_t_7;
14184  __pyx_t_7 = 0;
14185 
14186  /* "mbd/CouplingFSI.pyx":595
14187  * #set it to chrono variable
14188  * chFM = chrono.ChMatrixDynamicD(6, 6)
14189  * inv_chFM = chrono.ChMatrixDynamicD(6, 6) # <<<<<<<<<<<<<<
14190  * for i in range(6):
14191  * for j in range(6):
14192  */
14193  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_chrono); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L1_error)
14194  __Pyx_GOTREF(__pyx_t_7);
14195  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ChMatrixDynamicD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
14196  __Pyx_GOTREF(__pyx_t_6);
14197  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14198  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 595, __pyx_L1_error)
14199  __Pyx_GOTREF(__pyx_t_7);
14200  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14201  __pyx_v_inv_chFM = __pyx_t_7;
14202  __pyx_t_7 = 0;
14203 
14204  /* "mbd/CouplingFSI.pyx":596
14205  * chFM = chrono.ChMatrixDynamicD(6, 6)
14206  * inv_chFM = chrono.ChMatrixDynamicD(6, 6)
14207  * for i in range(6): # <<<<<<<<<<<<<<
14208  * for j in range(6):
14209  * chFM.setitem(i, j, FM[i, j])
14210  */
14211  for (__pyx_t_9 = 0; __pyx_t_9 < 6; __pyx_t_9+=1) {
14212  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 596, __pyx_L1_error)
14213  __Pyx_GOTREF(__pyx_t_7);
14214  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_7);
14215  __pyx_t_7 = 0;
14216 
14217  /* "mbd/CouplingFSI.pyx":597
14218  * inv_chFM = chrono.ChMatrixDynamicD(6, 6)
14219  * for i in range(6):
14220  * for j in range(6): # <<<<<<<<<<<<<<
14221  * chFM.setitem(i, j, FM[i, j])
14222  *
14223  */
14224  for (__pyx_t_10 = 0; __pyx_t_10 < 6; __pyx_t_10+=1) {
14225  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error)
14226  __Pyx_GOTREF(__pyx_t_7);
14227  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_7);
14228  __pyx_t_7 = 0;
14229 
14230  /* "mbd/CouplingFSI.pyx":598
14231  * for i in range(6):
14232  * for j in range(6):
14233  * chFM.setitem(i, j, FM[i, j]) # <<<<<<<<<<<<<<
14234  *
14235  * # hack for swig
14236  */
14237  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_chFM, __pyx_n_s_setitem); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error)
14238  __Pyx_GOTREF(__pyx_t_6);
14239  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error)
14240  __Pyx_GOTREF(__pyx_t_3);
14241  __Pyx_INCREF(__pyx_v_i);
14242  __Pyx_GIVEREF(__pyx_v_i);
14243  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i);
14244  __Pyx_INCREF(__pyx_v_j);
14245  __Pyx_GIVEREF(__pyx_v_j);
14246  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_j);
14247  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_FM), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
14248  __Pyx_GOTREF(__pyx_t_2);
14249  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14250  __pyx_t_3 = NULL;
14251  __pyx_t_11 = 0;
14252  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
14253  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
14254  if (likely(__pyx_t_3)) {
14255  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14256  __Pyx_INCREF(__pyx_t_3);
14257  __Pyx_INCREF(function);
14258  __Pyx_DECREF_SET(__pyx_t_6, function);
14259  __pyx_t_11 = 1;
14260  }
14261  }
14262  #if CYTHON_FAST_PYCALL
14263  if (PyFunction_Check(__pyx_t_6)) {
14264  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_i, __pyx_v_j, __pyx_t_2};
14265  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 598, __pyx_L1_error)
14266  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14267  __Pyx_GOTREF(__pyx_t_7);
14268  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14269  } else
14270  #endif
14271  #if CYTHON_FAST_PYCCALL
14272  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
14273  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_i, __pyx_v_j, __pyx_t_2};
14274  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 598, __pyx_L1_error)
14275  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14276  __Pyx_GOTREF(__pyx_t_7);
14277  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14278  } else
14279  #endif
14280  {
14281  __pyx_t_12 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 598, __pyx_L1_error)
14282  __Pyx_GOTREF(__pyx_t_12);
14283  if (__pyx_t_3) {
14284  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL;
14285  }
14286  __Pyx_INCREF(__pyx_v_i);
14287  __Pyx_GIVEREF(__pyx_v_i);
14288  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v_i);
14289  __Pyx_INCREF(__pyx_v_j);
14290  __Pyx_GIVEREF(__pyx_v_j);
14291  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_j);
14292  __Pyx_GIVEREF(__pyx_t_2);
14293  PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_11, __pyx_t_2);
14294  __pyx_t_2 = 0;
14295  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 598, __pyx_L1_error)
14296  __Pyx_GOTREF(__pyx_t_7);
14297  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
14298  }
14299  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14300  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14301  }
14302  }
14303 
14304  /* "mbd/CouplingFSI.pyx":601
14305  *
14306  * # hack for swig
14307  * cdef SwigPyObject *swig_obj = <SwigPyObject*> chFM.this # <<<<<<<<<<<<<<
14308  * cdef ch.ChMatrixDynamic *mycpp_ptr = <ch.ChMatrixDynamic*?>swig_obj.ptr
14309  * cdef ch.ChMatrixDynamic my_instance = deref(mycpp_ptr)
14310  */
14311  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_chFM, __pyx_n_s_this); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error)
14312  __Pyx_GOTREF(__pyx_t_7);
14313  __pyx_v_swig_obj = ((SwigPyObject *)__pyx_t_7);
14314  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14315 
14316  /* "mbd/CouplingFSI.pyx":602
14317  * # hack for swig
14318  * cdef SwigPyObject *swig_obj = <SwigPyObject*> chFM.this
14319  * cdef ch.ChMatrixDynamic *mycpp_ptr = <ch.ChMatrixDynamic*?>swig_obj.ptr # <<<<<<<<<<<<<<
14320  * cdef ch.ChMatrixDynamic my_instance = deref(mycpp_ptr)
14321  *
14322  */
14323  __pyx_v_mycpp_ptr = ((ChMatrixDynamic<double> *)__pyx_v_swig_obj->ptr);
14324 
14325  /* "mbd/CouplingFSI.pyx":603
14326  * cdef SwigPyObject *swig_obj = <SwigPyObject*> chFM.this
14327  * cdef ch.ChMatrixDynamic *mycpp_ptr = <ch.ChMatrixDynamic*?>swig_obj.ptr
14328  * cdef ch.ChMatrixDynamic my_instance = deref(mycpp_ptr) # <<<<<<<<<<<<<<
14329  *
14330  * # set full mass matrix
14331  */
14332  __pyx_v_my_instance = (*__pyx_v_mycpp_ptr);
14333 
14334  /* "mbd/CouplingFSI.pyx":606
14335  *
14336  * # set full mass matrix
14337  * self.ChBodyAddedMass.SetMfullmass(my_instance) # <<<<<<<<<<<<<<
14338  *
14339  * aa = np.zeros(6)
14340  */
14341  ((struct __pyx_vtabstruct_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_v_self->ChBodyAddedMass->__pyx_vtab)->SetMfullmass(__pyx_v_self->ChBodyAddedMass, __pyx_v_my_instance);
14342 
14343  /* "mbd/CouplingFSI.pyx":608
14344  * self.ChBodyAddedMass.SetMfullmass(my_instance)
14345  *
14346  * aa = np.zeros(6) # <<<<<<<<<<<<<<
14347  *
14348  * aa[:3] = pyvec2array(self.ChBody.GetPos_dtdt())
14349  */
14350  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
14351  __Pyx_GOTREF(__pyx_t_6);
14352  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 608, __pyx_L1_error)
14353  __Pyx_GOTREF(__pyx_t_12);
14354  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14355  __pyx_t_6 = NULL;
14356  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
14357  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
14358  if (likely(__pyx_t_6)) {
14359  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
14360  __Pyx_INCREF(__pyx_t_6);
14361  __Pyx_INCREF(function);
14362  __Pyx_DECREF_SET(__pyx_t_12, function);
14363  }
14364  }
14365  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_6, __pyx_int_6) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_int_6);
14366  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
14367  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L1_error)
14368  __Pyx_GOTREF(__pyx_t_7);
14369  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
14370  __pyx_v_aa = __pyx_t_7;
14371  __pyx_t_7 = 0;
14372 
14373  /* "mbd/CouplingFSI.pyx":610
14374  * aa = np.zeros(6)
14375  *
14376  * aa[:3] = pyvec2array(self.ChBody.GetPos_dtdt()) # <<<<<<<<<<<<<<
14377  * aa[3:] = pyvec2array(self.ChBody.GetWacc_par())
14378  * Aija = np.dot(Aij_global, aa)
14379  */
14380  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 610, __pyx_L1_error)
14381  __Pyx_GOTREF(__pyx_t_12);
14382  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos_dtdt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 610, __pyx_L1_error)
14383  __Pyx_GOTREF(__pyx_t_2);
14384  __pyx_t_3 = NULL;
14385  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
14386  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
14387  if (likely(__pyx_t_3)) {
14388  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14389  __Pyx_INCREF(__pyx_t_3);
14390  __Pyx_INCREF(function);
14391  __Pyx_DECREF_SET(__pyx_t_2, function);
14392  }
14393  }
14394  __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
14395  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14396  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
14397  __Pyx_GOTREF(__pyx_t_6);
14398  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14399  __pyx_t_2 = NULL;
14400  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
14401  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
14402  if (likely(__pyx_t_2)) {
14403  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
14404  __Pyx_INCREF(__pyx_t_2);
14405  __Pyx_INCREF(function);
14406  __Pyx_DECREF_SET(__pyx_t_12, function);
14407  }
14408  }
14409  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6);
14410  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14411  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14412  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
14413  __Pyx_GOTREF(__pyx_t_7);
14414  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
14415  if (__Pyx_PyObject_SetSlice(__pyx_v_aa, __pyx_t_7, 0, 3, NULL, NULL, &__pyx_slice__40, 0, 1, 1) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
14416  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14417 
14418  /* "mbd/CouplingFSI.pyx":611
14419  *
14420  * aa[:3] = pyvec2array(self.ChBody.GetPos_dtdt())
14421  * aa[3:] = pyvec2array(self.ChBody.GetWacc_par()) # <<<<<<<<<<<<<<
14422  * Aija = np.dot(Aij_global, aa)
14423  * self.F_Aij = Aija[:3]
14424  */
14425  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 611, __pyx_L1_error)
14426  __Pyx_GOTREF(__pyx_t_12);
14427  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetWacc_par); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error)
14428  __Pyx_GOTREF(__pyx_t_2);
14429  __pyx_t_3 = NULL;
14430  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
14431  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
14432  if (likely(__pyx_t_3)) {
14433  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
14434  __Pyx_INCREF(__pyx_t_3);
14435  __Pyx_INCREF(function);
14436  __Pyx_DECREF_SET(__pyx_t_2, function);
14437  }
14438  }
14439  __pyx_t_6 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
14440  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
14441  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 611, __pyx_L1_error)
14442  __Pyx_GOTREF(__pyx_t_6);
14443  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14444  __pyx_t_2 = NULL;
14445  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
14446  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_12);
14447  if (likely(__pyx_t_2)) {
14448  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
14449  __Pyx_INCREF(__pyx_t_2);
14450  __Pyx_INCREF(function);
14451  __Pyx_DECREF_SET(__pyx_t_12, function);
14452  }
14453  }
14454  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6);
14455  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14456  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14457  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
14458  __Pyx_GOTREF(__pyx_t_7);
14459  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
14460  if (__Pyx_PyObject_SetSlice(__pyx_v_aa, __pyx_t_7, 3, 0, NULL, NULL, &__pyx_slice__38, 1, 0, 1) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
14461  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14462 
14463  /* "mbd/CouplingFSI.pyx":612
14464  * aa[:3] = pyvec2array(self.ChBody.GetPos_dtdt())
14465  * aa[3:] = pyvec2array(self.ChBody.GetWacc_par())
14466  * Aija = np.dot(Aij_global, aa) # <<<<<<<<<<<<<<
14467  * self.F_Aij = Aija[:3]
14468  * self.M_Aij = Aija[3:]
14469  */
14470  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 612, __pyx_L1_error)
14471  __Pyx_GOTREF(__pyx_t_12);
14472  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_dot); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L1_error)
14473  __Pyx_GOTREF(__pyx_t_6);
14474  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
14475  __pyx_t_12 = NULL;
14476  __pyx_t_11 = 0;
14477  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
14478  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
14479  if (likely(__pyx_t_12)) {
14480  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
14481  __Pyx_INCREF(__pyx_t_12);
14482  __Pyx_INCREF(function);
14483  __Pyx_DECREF_SET(__pyx_t_6, function);
14484  __pyx_t_11 = 1;
14485  }
14486  }
14487  #if CYTHON_FAST_PYCALL
14488  if (PyFunction_Check(__pyx_t_6)) {
14489  PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_Aij_global), __pyx_v_aa};
14490  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
14491  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
14492  __Pyx_GOTREF(__pyx_t_7);
14493  } else
14494  #endif
14495  #if CYTHON_FAST_PYCCALL
14496  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
14497  PyObject *__pyx_temp[3] = {__pyx_t_12, ((PyObject *)__pyx_v_Aij_global), __pyx_v_aa};
14498  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
14499  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
14500  __Pyx_GOTREF(__pyx_t_7);
14501  } else
14502  #endif
14503  {
14504  __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
14505  __Pyx_GOTREF(__pyx_t_2);
14506  if (__pyx_t_12) {
14507  __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_12); __pyx_t_12 = NULL;
14508  }
14509  __Pyx_INCREF(((PyObject *)__pyx_v_Aij_global));
14510  __Pyx_GIVEREF(((PyObject *)__pyx_v_Aij_global));
14511  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_11, ((PyObject *)__pyx_v_Aij_global));
14512  __Pyx_INCREF(__pyx_v_aa);
14513  __Pyx_GIVEREF(__pyx_v_aa);
14514  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_v_aa);
14515  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
14516  __Pyx_GOTREF(__pyx_t_7);
14517  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14518  }
14519  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14520  __pyx_v_Aija = __pyx_t_7;
14521  __pyx_t_7 = 0;
14522 
14523  /* "mbd/CouplingFSI.pyx":613
14524  * aa[3:] = pyvec2array(self.ChBody.GetWacc_par())
14525  * Aija = np.dot(Aij_global, aa)
14526  * self.F_Aij = Aija[:3] # <<<<<<<<<<<<<<
14527  * self.M_Aij = Aija[3:]
14528  *
14529  */
14530  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_Aija, 0, 3, NULL, NULL, &__pyx_slice__40, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 613, __pyx_L1_error)
14531  __Pyx_GOTREF(__pyx_t_7);
14532  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 613, __pyx_L1_error)
14533  __Pyx_GIVEREF(__pyx_t_7);
14534  __Pyx_GOTREF(__pyx_v_self->F_Aij);
14535  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_Aij));
14536  __pyx_v_self->F_Aij = ((PyArrayObject *)__pyx_t_7);
14537  __pyx_t_7 = 0;
14538 
14539  /* "mbd/CouplingFSI.pyx":614
14540  * Aija = np.dot(Aij_global, aa)
14541  * self.F_Aij = Aija[:3]
14542  * self.M_Aij = Aija[3:] # <<<<<<<<<<<<<<
14543  *
14544  * def getPressureForces(self):
14545  */
14546  __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_Aija, 3, 0, NULL, NULL, &__pyx_slice__38, 1, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 614, __pyx_L1_error)
14547  __Pyx_GOTREF(__pyx_t_7);
14548  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 614, __pyx_L1_error)
14549  __Pyx_GIVEREF(__pyx_t_7);
14550  __Pyx_GOTREF(__pyx_v_self->M_Aij);
14551  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_Aij));
14552  __pyx_v_self->M_Aij = ((PyArrayObject *)__pyx_t_7);
14553  __pyx_t_7 = 0;
14554 
14555  /* "mbd/CouplingFSI.pyx":526
14556  * self.thisptr.setConstraints(<double*> free_x.data, <double*> free_r.data)
14557  *
14558  * def setAddedMass(self, np.ndarray Aij): # <<<<<<<<<<<<<<
14559  * """
14560  * Sets the added mass matrix of the body
14561  */
14562 
14563  /* function exit code */
14564  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
14565  goto __pyx_L0;
14566  __pyx_L1_error:;
14567  __Pyx_XDECREF(__pyx_t_2);
14568  __Pyx_XDECREF(__pyx_t_3);
14569  __Pyx_XDECREF(__pyx_t_4);
14570  __Pyx_XDECREF(__pyx_t_6);
14571  __Pyx_XDECREF(__pyx_t_7);
14572  __Pyx_XDECREF(__pyx_t_12);
14573  __Pyx_XDECREF(((PyObject *)__pyx_t_13));
14574  __Pyx_XDECREF(__pyx_t_14);
14575  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setAddedMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
14576  __pyx_r = NULL;
14577  __pyx_L0:;
14578  __Pyx_XDECREF((PyObject *)__pyx_v_iner);
14579  __Pyx_XDECREF((PyObject *)__pyx_v_MM);
14580  __Pyx_XDECREF((PyObject *)__pyx_v_FM);
14581  __Pyx_XDECREF((PyObject *)__pyx_v_rotMarr_big);
14582  __Pyx_XDECREF((PyObject *)__pyx_v_rotMarrT_big);
14583  __Pyx_XDECREF((PyObject *)__pyx_v_Aij_global);
14584  __Pyx_XDECREF(__pyx_v_rot);
14585  __Pyx_XDECREF(__pyx_v_rotch);
14586  __Pyx_XDECREF(__pyx_v_i);
14587  __Pyx_XDECREF(__pyx_v_j);
14588  __Pyx_XDECREF(__pyx_v_inv_FM);
14589  __Pyx_XDECREF(__pyx_v_chFM);
14590  __Pyx_XDECREF(__pyx_v_inv_chFM);
14591  __Pyx_XDECREF(__pyx_v_aa);
14592  __Pyx_XDECREF(__pyx_v_Aija);
14593  __Pyx_XGIVEREF(__pyx_r);
14594  __Pyx_TraceReturn(__pyx_r, 0);
14595  __Pyx_RefNannyFinishContext();
14596  return __pyx_r;
14597 }
14598 
14599 /* "mbd/CouplingFSI.pyx":616
14600  * self.M_Aij = Aija[3:]
14601  *
14602  * def getPressureForces(self): # <<<<<<<<<<<<<<
14603  * """Gives pressure forces from fluid (Proteus) acting on body.
14604  * (!) Only works during proteus simulation
14605  */
14606 
14607 /* Python wrapper */
14608 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_49getPressureForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
14609 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_48getPressureForces[] = "ProtChBody.getPressureForces(self)\nGives pressure forces from fluid (Proteus) acting on body.\n (!) Only works during proteus simulation\n\n Returns\n -------\n F_p: array_like\n pressure forces (x, y, z) as provided by Proteus\n ";
14610 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_49getPressureForces = {"getPressureForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_49getPressureForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_48getPressureForces};
14611 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_49getPressureForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
14612  PyObject *__pyx_r = 0;
14613  __Pyx_RefNannyDeclarations
14614  __Pyx_RefNannySetupContext("getPressureForces (wrapper)", 0);
14615  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_48getPressureForces(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
14616 
14617  /* function exit code */
14618  __Pyx_RefNannyFinishContext();
14619  return __pyx_r;
14620 }
14621 
14622 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_48getPressureForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
14623  PyObject *__pyx_v_F_p = NULL;
14624  PyObject *__pyx_v_flag = NULL;
14625  PyObject *__pyx_r = NULL;
14626  __Pyx_TraceDeclarations
14627  __Pyx_RefNannyDeclarations
14628  PyObject *__pyx_t_1 = NULL;
14629  PyObject *__pyx_t_2 = NULL;
14630  PyObject *__pyx_t_3 = NULL;
14631  Py_ssize_t __pyx_t_4;
14632  PyObject *(*__pyx_t_5)(PyObject *);
14633  int __pyx_t_6;
14634  int __pyx_lineno = 0;
14635  const char *__pyx_filename = NULL;
14636  int __pyx_clineno = 0;
14637  __Pyx_TraceFrameInit(__pyx_codeobj__52)
14638  __Pyx_RefNannySetupContext("getPressureForces", 0);
14639  __Pyx_TraceCall("getPressureForces", __pyx_f[0], 616, 0, __PYX_ERR(0, 616, __pyx_L1_error));
14640 
14641  /* "mbd/CouplingFSI.pyx":625
14642  * pressure forces (x, y, z) as provided by Proteus
14643  * """
14644  * F_p = np.zeros(3) # <<<<<<<<<<<<<<
14645  * for flag in self.boundaryFlags:
14646  * if self.useIBM:
14647  */
14648  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
14649  __Pyx_GOTREF(__pyx_t_2);
14650  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
14651  __Pyx_GOTREF(__pyx_t_3);
14652  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14653  __pyx_t_2 = NULL;
14654  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
14655  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
14656  if (likely(__pyx_t_2)) {
14657  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
14658  __Pyx_INCREF(__pyx_t_2);
14659  __Pyx_INCREF(function);
14660  __Pyx_DECREF_SET(__pyx_t_3, function);
14661  }
14662  }
14663  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_3);
14664  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14665  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
14666  __Pyx_GOTREF(__pyx_t_1);
14667  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14668  __pyx_v_F_p = __pyx_t_1;
14669  __pyx_t_1 = 0;
14670 
14671  /* "mbd/CouplingFSI.pyx":626
14672  * """
14673  * F_p = np.zeros(3)
14674  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
14675  * if self.useIBM:
14676  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netForces[flag]
14677  */
14678  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) {
14679  __pyx_t_1 = ((PyObject *)__pyx_v_self->boundaryFlags); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
14680  __pyx_t_5 = NULL;
14681  } else {
14682  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->boundaryFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error)
14683  __Pyx_GOTREF(__pyx_t_1);
14684  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 626, __pyx_L1_error)
14685  }
14686  for (;;) {
14687  if (likely(!__pyx_t_5)) {
14688  if (likely(PyList_CheckExact(__pyx_t_1))) {
14689  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
14690  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14691  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 626, __pyx_L1_error)
14692  #else
14693  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
14694  __Pyx_GOTREF(__pyx_t_3);
14695  #endif
14696  } else {
14697  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
14698  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14699  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 626, __pyx_L1_error)
14700  #else
14701  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
14702  __Pyx_GOTREF(__pyx_t_3);
14703  #endif
14704  }
14705  } else {
14706  __pyx_t_3 = __pyx_t_5(__pyx_t_1);
14707  if (unlikely(!__pyx_t_3)) {
14708  PyObject* exc_type = PyErr_Occurred();
14709  if (exc_type) {
14710  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14711  else __PYX_ERR(0, 626, __pyx_L1_error)
14712  }
14713  break;
14714  }
14715  __Pyx_GOTREF(__pyx_t_3);
14716  }
14717  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_3);
14718  __pyx_t_3 = 0;
14719 
14720  /* "mbd/CouplingFSI.pyx":627
14721  * F_p = np.zeros(3)
14722  * for flag in self.boundaryFlags:
14723  * if self.useIBM: # <<<<<<<<<<<<<<
14724  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netForces[flag]
14725  * else:
14726  */
14727  __pyx_t_6 = (__pyx_v_self->useIBM != 0);
14728  if (__pyx_t_6) {
14729 
14730  /* "mbd/CouplingFSI.pyx":628
14731  * for flag in self.boundaryFlags:
14732  * if self.useIBM:
14733  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netForces[flag] # <<<<<<<<<<<<<<
14734  * else:
14735  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.netForces_p[flag]
14736  */
14737  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error)
14738  __Pyx_GOTREF(__pyx_t_3);
14739  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
14740  __Pyx_GOTREF(__pyx_t_2);
14741  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14742  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error)
14743  __Pyx_GOTREF(__pyx_t_3);
14744  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14745  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_particle_netForces); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
14746  __Pyx_GOTREF(__pyx_t_2);
14747  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14748  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_flag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error)
14749  __Pyx_GOTREF(__pyx_t_3);
14750  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14751  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_F_p, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
14752  __Pyx_GOTREF(__pyx_t_2);
14753  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14754  __Pyx_DECREF_SET(__pyx_v_F_p, __pyx_t_2);
14755  __pyx_t_2 = 0;
14756 
14757  /* "mbd/CouplingFSI.pyx":627
14758  * F_p = np.zeros(3)
14759  * for flag in self.boundaryFlags:
14760  * if self.useIBM: # <<<<<<<<<<<<<<
14761  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netForces[flag]
14762  * else:
14763  */
14764  goto __pyx_L5;
14765  }
14766 
14767  /* "mbd/CouplingFSI.pyx":630
14768  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netForces[flag]
14769  * else:
14770  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.netForces_p[flag] # <<<<<<<<<<<<<<
14771  * return F_p
14772  *
14773  */
14774  /*else*/ {
14775  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
14776  __Pyx_GOTREF(__pyx_t_2);
14777  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error)
14778  __Pyx_GOTREF(__pyx_t_3);
14779  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14780  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
14781  __Pyx_GOTREF(__pyx_t_2);
14782  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14783  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_netForces_p); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error)
14784  __Pyx_GOTREF(__pyx_t_3);
14785  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14786  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error)
14787  __Pyx_GOTREF(__pyx_t_2);
14788  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14789  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_F_p, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error)
14790  __Pyx_GOTREF(__pyx_t_3);
14791  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14792  __Pyx_DECREF_SET(__pyx_v_F_p, __pyx_t_3);
14793  __pyx_t_3 = 0;
14794  }
14795  __pyx_L5:;
14796 
14797  /* "mbd/CouplingFSI.pyx":626
14798  * """
14799  * F_p = np.zeros(3)
14800  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
14801  * if self.useIBM:
14802  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netForces[flag]
14803  */
14804  }
14805  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14806 
14807  /* "mbd/CouplingFSI.pyx":631
14808  * else:
14809  * F_p += self.ProtChSystem.model.levelModelList[-1].coefficients.netForces_p[flag]
14810  * return F_p # <<<<<<<<<<<<<<
14811  *
14812  * def getShearForces(self):
14813  */
14814  __Pyx_XDECREF(__pyx_r);
14815  __Pyx_INCREF(__pyx_v_F_p);
14816  __pyx_r = __pyx_v_F_p;
14817  goto __pyx_L0;
14818 
14819  /* "mbd/CouplingFSI.pyx":616
14820  * self.M_Aij = Aija[3:]
14821  *
14822  * def getPressureForces(self): # <<<<<<<<<<<<<<
14823  * """Gives pressure forces from fluid (Proteus) acting on body.
14824  * (!) Only works during proteus simulation
14825  */
14826 
14827  /* function exit code */
14828  __pyx_L1_error:;
14829  __Pyx_XDECREF(__pyx_t_1);
14830  __Pyx_XDECREF(__pyx_t_2);
14831  __Pyx_XDECREF(__pyx_t_3);
14832  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getPressureForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
14833  __pyx_r = NULL;
14834  __pyx_L0:;
14835  __Pyx_XDECREF(__pyx_v_F_p);
14836  __Pyx_XDECREF(__pyx_v_flag);
14837  __Pyx_XGIVEREF(__pyx_r);
14838  __Pyx_TraceReturn(__pyx_r, 0);
14839  __Pyx_RefNannyFinishContext();
14840  return __pyx_r;
14841 }
14842 
14843 /* "mbd/CouplingFSI.pyx":633
14844  * return F_p
14845  *
14846  * def getShearForces(self): # <<<<<<<<<<<<<<
14847  * """Gives shear forces from fluid (Proteus) acting on body
14848  * (!) Only works during proteus simulation
14849  */
14850 
14851 /* Python wrapper */
14852 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_51getShearForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
14853 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_50getShearForces[] = "ProtChBody.getShearForces(self)\nGives shear forces from fluid (Proteus) acting on body\n (!) Only works during proteus simulation\n\n Returns\n -------\n F_v: array_like\n shear forces (x, y, z) as provided by Proteus\n ";
14854 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_51getShearForces = {"getShearForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_51getShearForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_50getShearForces};
14855 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_51getShearForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
14856  PyObject *__pyx_r = 0;
14857  __Pyx_RefNannyDeclarations
14858  __Pyx_RefNannySetupContext("getShearForces (wrapper)", 0);
14859  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_50getShearForces(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
14860 
14861  /* function exit code */
14862  __Pyx_RefNannyFinishContext();
14863  return __pyx_r;
14864 }
14865 
14866 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_50getShearForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
14867  PyObject *__pyx_v_F_v = NULL;
14868  PyObject *__pyx_v_flag = NULL;
14869  PyObject *__pyx_r = NULL;
14870  __Pyx_TraceDeclarations
14871  __Pyx_RefNannyDeclarations
14872  PyObject *__pyx_t_1 = NULL;
14873  PyObject *__pyx_t_2 = NULL;
14874  PyObject *__pyx_t_3 = NULL;
14875  int __pyx_t_4;
14876  Py_ssize_t __pyx_t_5;
14877  PyObject *(*__pyx_t_6)(PyObject *);
14878  int __pyx_lineno = 0;
14879  const char *__pyx_filename = NULL;
14880  int __pyx_clineno = 0;
14881  __Pyx_TraceFrameInit(__pyx_codeobj__53)
14882  __Pyx_RefNannySetupContext("getShearForces", 0);
14883  __Pyx_TraceCall("getShearForces", __pyx_f[0], 633, 0, __PYX_ERR(0, 633, __pyx_L1_error));
14884 
14885  /* "mbd/CouplingFSI.pyx":642
14886  * shear forces (x, y, z) as provided by Proteus
14887  * """
14888  * F_v = np.zeros(3) # <<<<<<<<<<<<<<
14889  * if self.useIBM:
14890  * pass
14891  */
14892  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
14893  __Pyx_GOTREF(__pyx_t_2);
14894  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error)
14895  __Pyx_GOTREF(__pyx_t_3);
14896  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14897  __pyx_t_2 = NULL;
14898  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
14899  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
14900  if (likely(__pyx_t_2)) {
14901  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
14902  __Pyx_INCREF(__pyx_t_2);
14903  __Pyx_INCREF(function);
14904  __Pyx_DECREF_SET(__pyx_t_3, function);
14905  }
14906  }
14907  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_3);
14908  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
14909  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
14910  __Pyx_GOTREF(__pyx_t_1);
14911  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14912  __pyx_v_F_v = __pyx_t_1;
14913  __pyx_t_1 = 0;
14914 
14915  /* "mbd/CouplingFSI.pyx":643
14916  * """
14917  * F_v = np.zeros(3)
14918  * if self.useIBM: # <<<<<<<<<<<<<<
14919  * pass
14920  * else:
14921  */
14922  __pyx_t_4 = (__pyx_v_self->useIBM != 0);
14923  if (__pyx_t_4) {
14924  goto __pyx_L3;
14925  }
14926 
14927  /* "mbd/CouplingFSI.pyx":646
14928  * pass
14929  * else:
14930  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
14931  * F_v += self.ProtChSystem.model.levelModelList[-1].coefficients.netForces_v[flag]
14932  * return F_v
14933  */
14934  /*else*/ {
14935  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) {
14936  __pyx_t_1 = ((PyObject *)__pyx_v_self->boundaryFlags); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
14937  __pyx_t_6 = NULL;
14938  } else {
14939  __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->boundaryFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
14940  __Pyx_GOTREF(__pyx_t_1);
14941  __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L1_error)
14942  }
14943  for (;;) {
14944  if (likely(!__pyx_t_6)) {
14945  if (likely(PyList_CheckExact(__pyx_t_1))) {
14946  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
14947  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14948  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 646, __pyx_L1_error)
14949  #else
14950  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
14951  __Pyx_GOTREF(__pyx_t_3);
14952  #endif
14953  } else {
14954  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
14955  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
14956  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 646, __pyx_L1_error)
14957  #else
14958  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
14959  __Pyx_GOTREF(__pyx_t_3);
14960  #endif
14961  }
14962  } else {
14963  __pyx_t_3 = __pyx_t_6(__pyx_t_1);
14964  if (unlikely(!__pyx_t_3)) {
14965  PyObject* exc_type = PyErr_Occurred();
14966  if (exc_type) {
14967  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
14968  else __PYX_ERR(0, 646, __pyx_L1_error)
14969  }
14970  break;
14971  }
14972  __Pyx_GOTREF(__pyx_t_3);
14973  }
14974  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_3);
14975  __pyx_t_3 = 0;
14976 
14977  /* "mbd/CouplingFSI.pyx":647
14978  * else:
14979  * for flag in self.boundaryFlags:
14980  * F_v += self.ProtChSystem.model.levelModelList[-1].coefficients.netForces_v[flag] # <<<<<<<<<<<<<<
14981  * return F_v
14982  *
14983  */
14984  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
14985  __Pyx_GOTREF(__pyx_t_3);
14986  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
14987  __Pyx_GOTREF(__pyx_t_2);
14988  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14989  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
14990  __Pyx_GOTREF(__pyx_t_3);
14991  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14992  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_netForces_v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
14993  __Pyx_GOTREF(__pyx_t_2);
14994  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14995  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_flag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
14996  __Pyx_GOTREF(__pyx_t_3);
14997  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14998  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_F_v, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
14999  __Pyx_GOTREF(__pyx_t_2);
15000  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15001  __Pyx_DECREF_SET(__pyx_v_F_v, __pyx_t_2);
15002  __pyx_t_2 = 0;
15003 
15004  /* "mbd/CouplingFSI.pyx":646
15005  * pass
15006  * else:
15007  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
15008  * F_v += self.ProtChSystem.model.levelModelList[-1].coefficients.netForces_v[flag]
15009  * return F_v
15010  */
15011  }
15012  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15013  }
15014  __pyx_L3:;
15015 
15016  /* "mbd/CouplingFSI.pyx":648
15017  * for flag in self.boundaryFlags:
15018  * F_v += self.ProtChSystem.model.levelModelList[-1].coefficients.netForces_v[flag]
15019  * return F_v # <<<<<<<<<<<<<<
15020  *
15021  * def getMoments(self):
15022  */
15023  __Pyx_XDECREF(__pyx_r);
15024  __Pyx_INCREF(__pyx_v_F_v);
15025  __pyx_r = __pyx_v_F_v;
15026  goto __pyx_L0;
15027 
15028  /* "mbd/CouplingFSI.pyx":633
15029  * return F_p
15030  *
15031  * def getShearForces(self): # <<<<<<<<<<<<<<
15032  * """Gives shear forces from fluid (Proteus) acting on body
15033  * (!) Only works during proteus simulation
15034  */
15035 
15036  /* function exit code */
15037  __pyx_L1_error:;
15038  __Pyx_XDECREF(__pyx_t_1);
15039  __Pyx_XDECREF(__pyx_t_2);
15040  __Pyx_XDECREF(__pyx_t_3);
15041  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getShearForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
15042  __pyx_r = NULL;
15043  __pyx_L0:;
15044  __Pyx_XDECREF(__pyx_v_F_v);
15045  __Pyx_XDECREF(__pyx_v_flag);
15046  __Pyx_XGIVEREF(__pyx_r);
15047  __Pyx_TraceReturn(__pyx_r, 0);
15048  __Pyx_RefNannyFinishContext();
15049  return __pyx_r;
15050 }
15051 
15052 /* "mbd/CouplingFSI.pyx":650
15053  * return F_v
15054  *
15055  * def getMoments(self): # <<<<<<<<<<<<<<
15056  * """Gives moments from fluid (Proteus) acting on body
15057  * (!) Only works during proteus simulation
15058  */
15059 
15060 /* Python wrapper */
15061 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_53getMoments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
15062 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_52getMoments[] = "ProtChBody.getMoments(self)\nGives moments from fluid (Proteus) acting on body\n (!) Only works during proteus simulation\n\n Returns\n -------\n M: array_like\n moments (x, y, z) as provided by Proteus\n ";
15063 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_53getMoments = {"getMoments", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_53getMoments, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_52getMoments};
15064 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_53getMoments(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
15065  PyObject *__pyx_r = 0;
15066  __Pyx_RefNannyDeclarations
15067  __Pyx_RefNannySetupContext("getMoments (wrapper)", 0);
15068  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_52getMoments(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
15069 
15070  /* function exit code */
15071  __Pyx_RefNannyFinishContext();
15072  return __pyx_r;
15073 }
15074 
15075 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_52getMoments(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
15076  PyObject *__pyx_v_M = NULL;
15077  PyObject *__pyx_v_flag = NULL;
15078  PyObject *__pyx_v_Fx = NULL;
15079  PyObject *__pyx_v_Fy = NULL;
15080  PyObject *__pyx_v_Fz = NULL;
15081  PyObject *__pyx_v_rx = NULL;
15082  PyObject *__pyx_v_ry = NULL;
15083  PyObject *__pyx_v_rz = NULL;
15084  PyObject *__pyx_v_Mp = NULL;
15085  PyObject *__pyx_r = NULL;
15086  __Pyx_TraceDeclarations
15087  __Pyx_RefNannyDeclarations
15088  PyObject *__pyx_t_1 = NULL;
15089  PyObject *__pyx_t_2 = NULL;
15090  PyObject *__pyx_t_3 = NULL;
15091  Py_ssize_t __pyx_t_4;
15092  PyObject *(*__pyx_t_5)(PyObject *);
15093  int __pyx_t_6;
15094  PyObject *__pyx_t_7 = NULL;
15095  PyObject *__pyx_t_8 = NULL;
15096  PyObject *(*__pyx_t_9)(PyObject *);
15097  PyObject *__pyx_t_10 = NULL;
15098  PyObject *__pyx_t_11 = NULL;
15099  int __pyx_lineno = 0;
15100  const char *__pyx_filename = NULL;
15101  int __pyx_clineno = 0;
15102  __Pyx_TraceFrameInit(__pyx_codeobj__54)
15103  __Pyx_RefNannySetupContext("getMoments", 0);
15104  __Pyx_TraceCall("getMoments", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
15105 
15106  /* "mbd/CouplingFSI.pyx":659
15107  * moments (x, y, z) as provided by Proteus
15108  * """
15109  * M = np.zeros(3) # <<<<<<<<<<<<<<
15110  * for flag in self.boundaryFlags:
15111  * if self.useIBM:
15112  */
15113  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
15114  __Pyx_GOTREF(__pyx_t_2);
15115  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
15116  __Pyx_GOTREF(__pyx_t_3);
15117  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15118  __pyx_t_2 = NULL;
15119  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
15120  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
15121  if (likely(__pyx_t_2)) {
15122  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
15123  __Pyx_INCREF(__pyx_t_2);
15124  __Pyx_INCREF(function);
15125  __Pyx_DECREF_SET(__pyx_t_3, function);
15126  }
15127  }
15128  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_3);
15129  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
15130  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
15131  __Pyx_GOTREF(__pyx_t_1);
15132  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15133  __pyx_v_M = __pyx_t_1;
15134  __pyx_t_1 = 0;
15135 
15136  /* "mbd/CouplingFSI.pyx":660
15137  * """
15138  * M = np.zeros(3)
15139  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
15140  * if self.useIBM:
15141  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netMoments[flag]
15142  */
15143  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) {
15144  __pyx_t_1 = ((PyObject *)__pyx_v_self->boundaryFlags); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
15145  __pyx_t_5 = NULL;
15146  } else {
15147  __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->boundaryFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
15148  __Pyx_GOTREF(__pyx_t_1);
15149  __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error)
15150  }
15151  for (;;) {
15152  if (likely(!__pyx_t_5)) {
15153  if (likely(PyList_CheckExact(__pyx_t_1))) {
15154  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
15155  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15156  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
15157  #else
15158  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
15159  __Pyx_GOTREF(__pyx_t_3);
15160  #endif
15161  } else {
15162  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
15163  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15164  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 660, __pyx_L1_error)
15165  #else
15166  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 660, __pyx_L1_error)
15167  __Pyx_GOTREF(__pyx_t_3);
15168  #endif
15169  }
15170  } else {
15171  __pyx_t_3 = __pyx_t_5(__pyx_t_1);
15172  if (unlikely(!__pyx_t_3)) {
15173  PyObject* exc_type = PyErr_Occurred();
15174  if (exc_type) {
15175  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
15176  else __PYX_ERR(0, 660, __pyx_L1_error)
15177  }
15178  break;
15179  }
15180  __Pyx_GOTREF(__pyx_t_3);
15181  }
15182  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_3);
15183  __pyx_t_3 = 0;
15184 
15185  /* "mbd/CouplingFSI.pyx":661
15186  * M = np.zeros(3)
15187  * for flag in self.boundaryFlags:
15188  * if self.useIBM: # <<<<<<<<<<<<<<
15189  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netMoments[flag]
15190  * else:
15191  */
15192  __pyx_t_6 = (__pyx_v_self->useIBM != 0);
15193  if (__pyx_t_6) {
15194 
15195  /* "mbd/CouplingFSI.pyx":662
15196  * for flag in self.boundaryFlags:
15197  * if self.useIBM:
15198  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netMoments[flag] # <<<<<<<<<<<<<<
15199  * else:
15200  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.netMoments[flag]
15201  */
15202  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
15203  __Pyx_GOTREF(__pyx_t_3);
15204  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
15205  __Pyx_GOTREF(__pyx_t_2);
15206  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15207  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
15208  __Pyx_GOTREF(__pyx_t_3);
15209  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15210  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_particle_netMoments); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
15211  __Pyx_GOTREF(__pyx_t_2);
15212  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15213  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_flag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 662, __pyx_L1_error)
15214  __Pyx_GOTREF(__pyx_t_3);
15215  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15216  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_M, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
15217  __Pyx_GOTREF(__pyx_t_2);
15218  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15219  __Pyx_DECREF_SET(__pyx_v_M, __pyx_t_2);
15220  __pyx_t_2 = 0;
15221 
15222  /* "mbd/CouplingFSI.pyx":661
15223  * M = np.zeros(3)
15224  * for flag in self.boundaryFlags:
15225  * if self.useIBM: # <<<<<<<<<<<<<<
15226  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netMoments[flag]
15227  * else:
15228  */
15229  goto __pyx_L5;
15230  }
15231 
15232  /* "mbd/CouplingFSI.pyx":664
15233  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netMoments[flag]
15234  * else:
15235  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.netMoments[flag] # <<<<<<<<<<<<<<
15236  * # !!!!!!!!!!!! UPDATE BARYCENTER !!!!!!!!!!!!
15237  * Fx, Fy, Fz = self.F_prot
15238  */
15239  /*else*/ {
15240  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
15241  __Pyx_GOTREF(__pyx_t_2);
15242  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error)
15243  __Pyx_GOTREF(__pyx_t_3);
15244  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15245  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
15246  __Pyx_GOTREF(__pyx_t_2);
15247  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15248  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_netMoments); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error)
15249  __Pyx_GOTREF(__pyx_t_3);
15250  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15251  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
15252  __Pyx_GOTREF(__pyx_t_2);
15253  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15254  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_M, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error)
15255  __Pyx_GOTREF(__pyx_t_3);
15256  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15257  __Pyx_DECREF_SET(__pyx_v_M, __pyx_t_3);
15258  __pyx_t_3 = 0;
15259  }
15260  __pyx_L5:;
15261 
15262  /* "mbd/CouplingFSI.pyx":660
15263  * """
15264  * M = np.zeros(3)
15265  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
15266  * if self.useIBM:
15267  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.particle_netMoments[flag]
15268  */
15269  }
15270  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15271 
15272  /* "mbd/CouplingFSI.pyx":666
15273  * M += self.ProtChSystem.model.levelModelList[-1].coefficients.netMoments[flag]
15274  * # !!!!!!!!!!!! UPDATE BARYCENTER !!!!!!!!!!!!
15275  * Fx, Fy, Fz = self.F_prot # <<<<<<<<<<<<<<
15276  * rx, ry, rz = self.barycenter0-pyvec2array(self.ChBody.GetPos())
15277  * Mp = np.array([ry*Fz-rz*Fy, -(rx*Fz-rz*Fx), (rx*Fy-ry*Fx)])
15278  */
15279  __pyx_t_1 = ((PyObject *)__pyx_v_self->F_prot);
15280  __Pyx_INCREF(__pyx_t_1);
15281  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
15282  PyObject* sequence = __pyx_t_1;
15283  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
15284  if (unlikely(size != 3)) {
15285  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
15286  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
15287  __PYX_ERR(0, 666, __pyx_L1_error)
15288  }
15289  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15290  if (likely(PyTuple_CheckExact(sequence))) {
15291  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
15292  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
15293  __pyx_t_7 = PyTuple_GET_ITEM(sequence, 2);
15294  } else {
15295  __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
15296  __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
15297  __pyx_t_7 = PyList_GET_ITEM(sequence, 2);
15298  }
15299  __Pyx_INCREF(__pyx_t_3);
15300  __Pyx_INCREF(__pyx_t_2);
15301  __Pyx_INCREF(__pyx_t_7);
15302  #else
15303  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
15304  __Pyx_GOTREF(__pyx_t_3);
15305  __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
15306  __Pyx_GOTREF(__pyx_t_2);
15307  __pyx_t_7 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 666, __pyx_L1_error)
15308  __Pyx_GOTREF(__pyx_t_7);
15309  #endif
15310  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15311  } else {
15312  Py_ssize_t index = -1;
15313  __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 666, __pyx_L1_error)
15314  __Pyx_GOTREF(__pyx_t_8);
15315  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15316  __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
15317  index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
15318  __Pyx_GOTREF(__pyx_t_3);
15319  index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
15320  __Pyx_GOTREF(__pyx_t_2);
15321  index = 2; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed;
15322  __Pyx_GOTREF(__pyx_t_7);
15323  if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
15324  __pyx_t_9 = NULL;
15325  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15326  goto __pyx_L7_unpacking_done;
15327  __pyx_L6_unpacking_failed:;
15328  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15329  __pyx_t_9 = NULL;
15330  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
15331  __PYX_ERR(0, 666, __pyx_L1_error)
15332  __pyx_L7_unpacking_done:;
15333  }
15334  __pyx_v_Fx = __pyx_t_3;
15335  __pyx_t_3 = 0;
15336  __pyx_v_Fy = __pyx_t_2;
15337  __pyx_t_2 = 0;
15338  __pyx_v_Fz = __pyx_t_7;
15339  __pyx_t_7 = 0;
15340 
15341  /* "mbd/CouplingFSI.pyx":667
15342  * # !!!!!!!!!!!! UPDATE BARYCENTER !!!!!!!!!!!!
15343  * Fx, Fy, Fz = self.F_prot
15344  * rx, ry, rz = self.barycenter0-pyvec2array(self.ChBody.GetPos()) # <<<<<<<<<<<<<<
15345  * Mp = np.array([ry*Fz-rz*Fy, -(rx*Fz-rz*Fx), (rx*Fy-ry*Fx)])
15346  * M += Mp
15347  */
15348  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
15349  __Pyx_GOTREF(__pyx_t_7);
15350  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
15351  __Pyx_GOTREF(__pyx_t_3);
15352  __pyx_t_8 = NULL;
15353  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
15354  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
15355  if (likely(__pyx_t_8)) {
15356  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
15357  __Pyx_INCREF(__pyx_t_8);
15358  __Pyx_INCREF(function);
15359  __Pyx_DECREF_SET(__pyx_t_3, function);
15360  }
15361  }
15362  __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
15363  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
15364  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
15365  __Pyx_GOTREF(__pyx_t_2);
15366  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15367  __pyx_t_3 = NULL;
15368  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
15369  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
15370  if (likely(__pyx_t_3)) {
15371  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
15372  __Pyx_INCREF(__pyx_t_3);
15373  __Pyx_INCREF(function);
15374  __Pyx_DECREF_SET(__pyx_t_7, function);
15375  }
15376  }
15377  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2);
15378  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15379  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15380  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
15381  __Pyx_GOTREF(__pyx_t_1);
15382  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15383  __pyx_t_7 = PyNumber_Subtract(((PyObject *)__pyx_v_self->barycenter0), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 667, __pyx_L1_error)
15384  __Pyx_GOTREF(__pyx_t_7);
15385  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15386  if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) {
15387  PyObject* sequence = __pyx_t_7;
15388  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
15389  if (unlikely(size != 3)) {
15390  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
15391  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
15392  __PYX_ERR(0, 667, __pyx_L1_error)
15393  }
15394  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
15395  if (likely(PyTuple_CheckExact(sequence))) {
15396  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
15397  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
15398  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
15399  } else {
15400  __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
15401  __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
15402  __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
15403  }
15404  __Pyx_INCREF(__pyx_t_1);
15405  __Pyx_INCREF(__pyx_t_2);
15406  __Pyx_INCREF(__pyx_t_3);
15407  #else
15408  __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
15409  __Pyx_GOTREF(__pyx_t_1);
15410  __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
15411  __Pyx_GOTREF(__pyx_t_2);
15412  __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error)
15413  __Pyx_GOTREF(__pyx_t_3);
15414  #endif
15415  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15416  } else {
15417  Py_ssize_t index = -1;
15418  __pyx_t_8 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 667, __pyx_L1_error)
15419  __Pyx_GOTREF(__pyx_t_8);
15420  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15421  __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
15422  index = 0; __pyx_t_1 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_1)) goto __pyx_L8_unpacking_failed;
15423  __Pyx_GOTREF(__pyx_t_1);
15424  index = 1; __pyx_t_2 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed;
15425  __Pyx_GOTREF(__pyx_t_2);
15426  index = 2; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed;
15427  __Pyx_GOTREF(__pyx_t_3);
15428  if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 3) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
15429  __pyx_t_9 = NULL;
15430  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15431  goto __pyx_L9_unpacking_done;
15432  __pyx_L8_unpacking_failed:;
15433  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15434  __pyx_t_9 = NULL;
15435  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
15436  __PYX_ERR(0, 667, __pyx_L1_error)
15437  __pyx_L9_unpacking_done:;
15438  }
15439  __pyx_v_rx = __pyx_t_1;
15440  __pyx_t_1 = 0;
15441  __pyx_v_ry = __pyx_t_2;
15442  __pyx_t_2 = 0;
15443  __pyx_v_rz = __pyx_t_3;
15444  __pyx_t_3 = 0;
15445 
15446  /* "mbd/CouplingFSI.pyx":668
15447  * Fx, Fy, Fz = self.F_prot
15448  * rx, ry, rz = self.barycenter0-pyvec2array(self.ChBody.GetPos())
15449  * Mp = np.array([ry*Fz-rz*Fy, -(rx*Fz-rz*Fx), (rx*Fy-ry*Fx)]) # <<<<<<<<<<<<<<
15450  * M += Mp
15451  * return M
15452  */
15453  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
15454  __Pyx_GOTREF(__pyx_t_3);
15455  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
15456  __Pyx_GOTREF(__pyx_t_2);
15457  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15458  __pyx_t_3 = PyNumber_Multiply(__pyx_v_ry, __pyx_v_Fz); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
15459  __Pyx_GOTREF(__pyx_t_3);
15460  __pyx_t_1 = PyNumber_Multiply(__pyx_v_rz, __pyx_v_Fy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
15461  __Pyx_GOTREF(__pyx_t_1);
15462  __pyx_t_8 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 668, __pyx_L1_error)
15463  __Pyx_GOTREF(__pyx_t_8);
15464  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15465  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15466  __pyx_t_1 = PyNumber_Multiply(__pyx_v_rx, __pyx_v_Fz); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
15467  __Pyx_GOTREF(__pyx_t_1);
15468  __pyx_t_3 = PyNumber_Multiply(__pyx_v_rz, __pyx_v_Fx); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
15469  __Pyx_GOTREF(__pyx_t_3);
15470  __pyx_t_10 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 668, __pyx_L1_error)
15471  __Pyx_GOTREF(__pyx_t_10);
15472  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15473  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15474  __pyx_t_3 = PyNumber_Negative(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
15475  __Pyx_GOTREF(__pyx_t_3);
15476  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15477  __pyx_t_10 = PyNumber_Multiply(__pyx_v_rx, __pyx_v_Fy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 668, __pyx_L1_error)
15478  __Pyx_GOTREF(__pyx_t_10);
15479  __pyx_t_1 = PyNumber_Multiply(__pyx_v_ry, __pyx_v_Fx); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
15480  __Pyx_GOTREF(__pyx_t_1);
15481  __pyx_t_11 = PyNumber_Subtract(__pyx_t_10, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 668, __pyx_L1_error)
15482  __Pyx_GOTREF(__pyx_t_11);
15483  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
15484  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15485  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
15486  __Pyx_GOTREF(__pyx_t_1);
15487  __Pyx_GIVEREF(__pyx_t_8);
15488  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_8);
15489  __Pyx_GIVEREF(__pyx_t_3);
15490  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
15491  __Pyx_GIVEREF(__pyx_t_11);
15492  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_11);
15493  __pyx_t_8 = 0;
15494  __pyx_t_3 = 0;
15495  __pyx_t_11 = 0;
15496  __pyx_t_11 = NULL;
15497  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
15498  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
15499  if (likely(__pyx_t_11)) {
15500  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15501  __Pyx_INCREF(__pyx_t_11);
15502  __Pyx_INCREF(function);
15503  __Pyx_DECREF_SET(__pyx_t_2, function);
15504  }
15505  }
15506  __pyx_t_7 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
15507  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
15508  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15509  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
15510  __Pyx_GOTREF(__pyx_t_7);
15511  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15512  __pyx_v_Mp = __pyx_t_7;
15513  __pyx_t_7 = 0;
15514 
15515  /* "mbd/CouplingFSI.pyx":669
15516  * rx, ry, rz = self.barycenter0-pyvec2array(self.ChBody.GetPos())
15517  * Mp = np.array([ry*Fz-rz*Fy, -(rx*Fz-rz*Fx), (rx*Fy-ry*Fx)])
15518  * M += Mp # <<<<<<<<<<<<<<
15519  * return M
15520  *
15521  */
15522  __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_M, __pyx_v_Mp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 669, __pyx_L1_error)
15523  __Pyx_GOTREF(__pyx_t_7);
15524  __Pyx_DECREF_SET(__pyx_v_M, __pyx_t_7);
15525  __pyx_t_7 = 0;
15526 
15527  /* "mbd/CouplingFSI.pyx":670
15528  * Mp = np.array([ry*Fz-rz*Fy, -(rx*Fz-rz*Fx), (rx*Fy-ry*Fx)])
15529  * M += Mp
15530  * return M # <<<<<<<<<<<<<<
15531  *
15532  * def getRotationMatrix(self):
15533  */
15534  __Pyx_XDECREF(__pyx_r);
15535  __Pyx_INCREF(__pyx_v_M);
15536  __pyx_r = __pyx_v_M;
15537  goto __pyx_L0;
15538 
15539  /* "mbd/CouplingFSI.pyx":650
15540  * return F_v
15541  *
15542  * def getMoments(self): # <<<<<<<<<<<<<<
15543  * """Gives moments from fluid (Proteus) acting on body
15544  * (!) Only works during proteus simulation
15545  */
15546 
15547  /* function exit code */
15548  __pyx_L1_error:;
15549  __Pyx_XDECREF(__pyx_t_1);
15550  __Pyx_XDECREF(__pyx_t_2);
15551  __Pyx_XDECREF(__pyx_t_3);
15552  __Pyx_XDECREF(__pyx_t_7);
15553  __Pyx_XDECREF(__pyx_t_8);
15554  __Pyx_XDECREF(__pyx_t_10);
15555  __Pyx_XDECREF(__pyx_t_11);
15556  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getMoments", __pyx_clineno, __pyx_lineno, __pyx_filename);
15557  __pyx_r = NULL;
15558  __pyx_L0:;
15559  __Pyx_XDECREF(__pyx_v_M);
15560  __Pyx_XDECREF(__pyx_v_flag);
15561  __Pyx_XDECREF(__pyx_v_Fx);
15562  __Pyx_XDECREF(__pyx_v_Fy);
15563  __Pyx_XDECREF(__pyx_v_Fz);
15564  __Pyx_XDECREF(__pyx_v_rx);
15565  __Pyx_XDECREF(__pyx_v_ry);
15566  __Pyx_XDECREF(__pyx_v_rz);
15567  __Pyx_XDECREF(__pyx_v_Mp);
15568  __Pyx_XGIVEREF(__pyx_r);
15569  __Pyx_TraceReturn(__pyx_r, 0);
15570  __Pyx_RefNannyFinishContext();
15571  return __pyx_r;
15572 }
15573 
15574 /* "mbd/CouplingFSI.pyx":672
15575  * return M
15576  *
15577  * def getRotationMatrix(self): # <<<<<<<<<<<<<<
15578  * """Gives current rotation (matrix) of body
15579  *
15580  */
15581 
15582 /* Python wrapper */
15583 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_55getRotationMatrix(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
15584 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_54getRotationMatrix[] = "ProtChBody.getRotationMatrix(self)\nGives current rotation (matrix) of body\n\n Returns\n -------\n rot: array_like\n current rotation (matrix) of body\n ";
15585 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_55getRotationMatrix = {"getRotationMatrix", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_55getRotationMatrix, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_54getRotationMatrix};
15586 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_55getRotationMatrix(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
15587  PyObject *__pyx_r = 0;
15588  __Pyx_RefNannyDeclarations
15589  __Pyx_RefNannySetupContext("getRotationMatrix (wrapper)", 0);
15590  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_54getRotationMatrix(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
15591 
15592  /* function exit code */
15593  __Pyx_RefNannyFinishContext();
15594  return __pyx_r;
15595 }
15596 
15597 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_54getRotationMatrix(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
15598  double __pyx_v_x0;
15599  double __pyx_v_x1;
15600  double __pyx_v_x2;
15601  double __pyx_v_y0;
15602  double __pyx_v_y1;
15603  double __pyx_v_y2;
15604  double __pyx_v_z0;
15605  double __pyx_v_z1;
15606  double __pyx_v_z2;
15607  PyObject *__pyx_v_rot = NULL;
15608  PyObject *__pyx_r = NULL;
15609  __Pyx_TraceDeclarations
15610  __Pyx_RefNannyDeclarations
15611  PyObject *__pyx_t_1 = NULL;
15612  PyObject *__pyx_t_2 = NULL;
15613  PyObject *__pyx_t_3 = NULL;
15614  PyObject *__pyx_t_4 = NULL;
15615  PyObject *__pyx_t_5 = NULL;
15616  PyObject *__pyx_t_6 = NULL;
15617  PyObject *__pyx_t_7 = NULL;
15618  PyObject *__pyx_t_8 = NULL;
15619  int __pyx_t_9;
15620  int __pyx_lineno = 0;
15621  const char *__pyx_filename = NULL;
15622  int __pyx_clineno = 0;
15623  __Pyx_TraceFrameInit(__pyx_codeobj__55)
15624  __Pyx_RefNannySetupContext("getRotationMatrix", 0);
15625  __Pyx_TraceCall("getRotationMatrix", __pyx_f[0], 672, 0, __PYX_ERR(0, 672, __pyx_L1_error));
15626 
15627  /* "mbd/CouplingFSI.pyx":680
15628  * current rotation (matrix) of body
15629  * """
15630  * x0 = self.thisptr.rotm.Get_A_Xaxis().x() # <<<<<<<<<<<<<<
15631  * x1 = self.thisptr.rotm.Get_A_Xaxis().y()
15632  * x2 = self.thisptr.rotm.Get_A_Xaxis().z()
15633  */
15634  __pyx_v_x0 = __pyx_v_self->thisptr->rotm.Get_A_Xaxis().x();
15635 
15636  /* "mbd/CouplingFSI.pyx":681
15637  * """
15638  * x0 = self.thisptr.rotm.Get_A_Xaxis().x()
15639  * x1 = self.thisptr.rotm.Get_A_Xaxis().y() # <<<<<<<<<<<<<<
15640  * x2 = self.thisptr.rotm.Get_A_Xaxis().z()
15641  * y0 = self.thisptr.rotm.Get_A_Yaxis().x()
15642  */
15643  __pyx_v_x1 = __pyx_v_self->thisptr->rotm.Get_A_Xaxis().y();
15644 
15645  /* "mbd/CouplingFSI.pyx":682
15646  * x0 = self.thisptr.rotm.Get_A_Xaxis().x()
15647  * x1 = self.thisptr.rotm.Get_A_Xaxis().y()
15648  * x2 = self.thisptr.rotm.Get_A_Xaxis().z() # <<<<<<<<<<<<<<
15649  * y0 = self.thisptr.rotm.Get_A_Yaxis().x()
15650  * y1 = self.thisptr.rotm.Get_A_Yaxis().y()
15651  */
15652  __pyx_v_x2 = __pyx_v_self->thisptr->rotm.Get_A_Xaxis().z();
15653 
15654  /* "mbd/CouplingFSI.pyx":683
15655  * x1 = self.thisptr.rotm.Get_A_Xaxis().y()
15656  * x2 = self.thisptr.rotm.Get_A_Xaxis().z()
15657  * y0 = self.thisptr.rotm.Get_A_Yaxis().x() # <<<<<<<<<<<<<<
15658  * y1 = self.thisptr.rotm.Get_A_Yaxis().y()
15659  * y2 = self.thisptr.rotm.Get_A_Yaxis().z()
15660  */
15661  __pyx_v_y0 = __pyx_v_self->thisptr->rotm.Get_A_Yaxis().x();
15662 
15663  /* "mbd/CouplingFSI.pyx":684
15664  * x2 = self.thisptr.rotm.Get_A_Xaxis().z()
15665  * y0 = self.thisptr.rotm.Get_A_Yaxis().x()
15666  * y1 = self.thisptr.rotm.Get_A_Yaxis().y() # <<<<<<<<<<<<<<
15667  * y2 = self.thisptr.rotm.Get_A_Yaxis().z()
15668  * z0 = self.thisptr.rotm.Get_A_Zaxis().x()
15669  */
15670  __pyx_v_y1 = __pyx_v_self->thisptr->rotm.Get_A_Yaxis().y();
15671 
15672  /* "mbd/CouplingFSI.pyx":685
15673  * y0 = self.thisptr.rotm.Get_A_Yaxis().x()
15674  * y1 = self.thisptr.rotm.Get_A_Yaxis().y()
15675  * y2 = self.thisptr.rotm.Get_A_Yaxis().z() # <<<<<<<<<<<<<<
15676  * z0 = self.thisptr.rotm.Get_A_Zaxis().x()
15677  * z1 = self.thisptr.rotm.Get_A_Zaxis().y()
15678  */
15679  __pyx_v_y2 = __pyx_v_self->thisptr->rotm.Get_A_Yaxis().z();
15680 
15681  /* "mbd/CouplingFSI.pyx":686
15682  * y1 = self.thisptr.rotm.Get_A_Yaxis().y()
15683  * y2 = self.thisptr.rotm.Get_A_Yaxis().z()
15684  * z0 = self.thisptr.rotm.Get_A_Zaxis().x() # <<<<<<<<<<<<<<
15685  * z1 = self.thisptr.rotm.Get_A_Zaxis().y()
15686  * z2 = self.thisptr.rotm.Get_A_Zaxis().z()
15687  */
15688  __pyx_v_z0 = __pyx_v_self->thisptr->rotm.Get_A_Zaxis().x();
15689 
15690  /* "mbd/CouplingFSI.pyx":687
15691  * y2 = self.thisptr.rotm.Get_A_Yaxis().z()
15692  * z0 = self.thisptr.rotm.Get_A_Zaxis().x()
15693  * z1 = self.thisptr.rotm.Get_A_Zaxis().y() # <<<<<<<<<<<<<<
15694  * z2 = self.thisptr.rotm.Get_A_Zaxis().z()
15695  * rot = np.array([x0, x1, x2],
15696  */
15697  __pyx_v_z1 = __pyx_v_self->thisptr->rotm.Get_A_Zaxis().y();
15698 
15699  /* "mbd/CouplingFSI.pyx":688
15700  * z0 = self.thisptr.rotm.Get_A_Zaxis().x()
15701  * z1 = self.thisptr.rotm.Get_A_Zaxis().y()
15702  * z2 = self.thisptr.rotm.Get_A_Zaxis().z() # <<<<<<<<<<<<<<
15703  * rot = np.array([x0, x1, x2],
15704  * [y0, y1, y2],
15705  */
15706  __pyx_v_z2 = __pyx_v_self->thisptr->rotm.Get_A_Zaxis().z();
15707 
15708  /* "mbd/CouplingFSI.pyx":689
15709  * z1 = self.thisptr.rotm.Get_A_Zaxis().y()
15710  * z2 = self.thisptr.rotm.Get_A_Zaxis().z()
15711  * rot = np.array([x0, x1, x2], # <<<<<<<<<<<<<<
15712  * [y0, y1, y2],
15713  * [z0, z1, z2])
15714  */
15715  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
15716  __Pyx_GOTREF(__pyx_t_2);
15717  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 689, __pyx_L1_error)
15718  __Pyx_GOTREF(__pyx_t_3);
15719  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15720  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_x0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
15721  __Pyx_GOTREF(__pyx_t_2);
15722  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error)
15723  __Pyx_GOTREF(__pyx_t_4);
15724  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_x2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 689, __pyx_L1_error)
15725  __Pyx_GOTREF(__pyx_t_5);
15726  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 689, __pyx_L1_error)
15727  __Pyx_GOTREF(__pyx_t_6);
15728  __Pyx_GIVEREF(__pyx_t_2);
15729  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
15730  __Pyx_GIVEREF(__pyx_t_4);
15731  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
15732  __Pyx_GIVEREF(__pyx_t_5);
15733  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
15734  __pyx_t_2 = 0;
15735  __pyx_t_4 = 0;
15736  __pyx_t_5 = 0;
15737 
15738  /* "mbd/CouplingFSI.pyx":690
15739  * z2 = self.thisptr.rotm.Get_A_Zaxis().z()
15740  * rot = np.array([x0, x1, x2],
15741  * [y0, y1, y2], # <<<<<<<<<<<<<<
15742  * [z0, z1, z2])
15743  * return rot
15744  */
15745  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_y0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 690, __pyx_L1_error)
15746  __Pyx_GOTREF(__pyx_t_5);
15747  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_y1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 690, __pyx_L1_error)
15748  __Pyx_GOTREF(__pyx_t_4);
15749  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
15750  __Pyx_GOTREF(__pyx_t_2);
15751  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 690, __pyx_L1_error)
15752  __Pyx_GOTREF(__pyx_t_7);
15753  __Pyx_GIVEREF(__pyx_t_5);
15754  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
15755  __Pyx_GIVEREF(__pyx_t_4);
15756  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
15757  __Pyx_GIVEREF(__pyx_t_2);
15758  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
15759  __pyx_t_5 = 0;
15760  __pyx_t_4 = 0;
15761  __pyx_t_2 = 0;
15762 
15763  /* "mbd/CouplingFSI.pyx":691
15764  * rot = np.array([x0, x1, x2],
15765  * [y0, y1, y2],
15766  * [z0, z1, z2]) # <<<<<<<<<<<<<<
15767  * return rot
15768  *
15769  */
15770  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_z0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 691, __pyx_L1_error)
15771  __Pyx_GOTREF(__pyx_t_2);
15772  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_z1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 691, __pyx_L1_error)
15773  __Pyx_GOTREF(__pyx_t_4);
15774  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_z2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 691, __pyx_L1_error)
15775  __Pyx_GOTREF(__pyx_t_5);
15776  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 691, __pyx_L1_error)
15777  __Pyx_GOTREF(__pyx_t_8);
15778  __Pyx_GIVEREF(__pyx_t_2);
15779  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
15780  __Pyx_GIVEREF(__pyx_t_4);
15781  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
15782  __Pyx_GIVEREF(__pyx_t_5);
15783  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_5);
15784  __pyx_t_2 = 0;
15785  __pyx_t_4 = 0;
15786  __pyx_t_5 = 0;
15787  __pyx_t_5 = NULL;
15788  __pyx_t_9 = 0;
15789  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
15790  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
15791  if (likely(__pyx_t_5)) {
15792  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
15793  __Pyx_INCREF(__pyx_t_5);
15794  __Pyx_INCREF(function);
15795  __Pyx_DECREF_SET(__pyx_t_3, function);
15796  __pyx_t_9 = 1;
15797  }
15798  }
15799  #if CYTHON_FAST_PYCALL
15800  if (PyFunction_Check(__pyx_t_3)) {
15801  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
15802  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
15803  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15804  __Pyx_GOTREF(__pyx_t_1);
15805  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15806  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15807  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15808  } else
15809  #endif
15810  #if CYTHON_FAST_PYCCALL
15811  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
15812  PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8};
15813  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
15814  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
15815  __Pyx_GOTREF(__pyx_t_1);
15816  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
15817  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
15818  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
15819  } else
15820  #endif
15821  {
15822  __pyx_t_4 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error)
15823  __Pyx_GOTREF(__pyx_t_4);
15824  if (__pyx_t_5) {
15825  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
15826  }
15827  __Pyx_GIVEREF(__pyx_t_6);
15828  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, __pyx_t_6);
15829  __Pyx_GIVEREF(__pyx_t_7);
15830  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, __pyx_t_7);
15831  __Pyx_GIVEREF(__pyx_t_8);
15832  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_9, __pyx_t_8);
15833  __pyx_t_6 = 0;
15834  __pyx_t_7 = 0;
15835  __pyx_t_8 = 0;
15836  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
15837  __Pyx_GOTREF(__pyx_t_1);
15838  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
15839  }
15840  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15841  __pyx_v_rot = __pyx_t_1;
15842  __pyx_t_1 = 0;
15843 
15844  /* "mbd/CouplingFSI.pyx":692
15845  * [y0, y1, y2],
15846  * [z0, z1, z2])
15847  * return rot # <<<<<<<<<<<<<<
15848  *
15849  * def prestep(self):
15850  */
15851  __Pyx_XDECREF(__pyx_r);
15852  __Pyx_INCREF(__pyx_v_rot);
15853  __pyx_r = __pyx_v_rot;
15854  goto __pyx_L0;
15855 
15856  /* "mbd/CouplingFSI.pyx":672
15857  * return M
15858  *
15859  * def getRotationMatrix(self): # <<<<<<<<<<<<<<
15860  * """Gives current rotation (matrix) of body
15861  *
15862  */
15863 
15864  /* function exit code */
15865  __pyx_L1_error:;
15866  __Pyx_XDECREF(__pyx_t_1);
15867  __Pyx_XDECREF(__pyx_t_2);
15868  __Pyx_XDECREF(__pyx_t_3);
15869  __Pyx_XDECREF(__pyx_t_4);
15870  __Pyx_XDECREF(__pyx_t_5);
15871  __Pyx_XDECREF(__pyx_t_6);
15872  __Pyx_XDECREF(__pyx_t_7);
15873  __Pyx_XDECREF(__pyx_t_8);
15874  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getRotationMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
15875  __pyx_r = NULL;
15876  __pyx_L0:;
15877  __Pyx_XDECREF(__pyx_v_rot);
15878  __Pyx_XGIVEREF(__pyx_r);
15879  __Pyx_TraceReturn(__pyx_r, 0);
15880  __Pyx_RefNannyFinishContext();
15881  return __pyx_r;
15882 }
15883 
15884 /* "mbd/CouplingFSI.pyx":694
15885  * return rot
15886  *
15887  * def prestep(self): # <<<<<<<<<<<<<<
15888  * """Called before Chrono system step.
15889  * Sets external forces automatically from Proteus solution.
15890  */
15891 
15892 /* Python wrapper */
15893 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_57prestep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
15894 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_56prestep[] = "ProtChBody.prestep(self)\nCalled before Chrono system step.\n Sets external forces automatically from Proteus solution.\n ";
15895 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_57prestep = {"prestep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_57prestep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_56prestep};
15896 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_57prestep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
15897  PyObject *__pyx_r = 0;
15898  __Pyx_RefNannyDeclarations
15899  __Pyx_RefNannySetupContext("prestep (wrapper)", 0);
15900  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_56prestep(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
15901 
15902  /* function exit code */
15903  __Pyx_RefNannyFinishContext();
15904  return __pyx_r;
15905 }
15906 
15907 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_56prestep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
15908  PyObject *__pyx_v_am = NULL;
15909  PyObject *__pyx_v_flag = NULL;
15910  PyObject *__pyx_v_Aij = NULL;
15911  PyObject *__pyx_r = NULL;
15912  __Pyx_TraceDeclarations
15913  __Pyx_RefNannyDeclarations
15914  PyObject *__pyx_t_1 = NULL;
15915  PyObject *__pyx_t_2 = NULL;
15916  PyObject *__pyx_t_3 = NULL;
15917  int __pyx_t_4;
15918  int __pyx_t_5;
15919  bool __pyx_t_6;
15920  Py_ssize_t __pyx_t_7;
15921  PyObject *(*__pyx_t_8)(PyObject *);
15922  int __pyx_lineno = 0;
15923  const char *__pyx_filename = NULL;
15924  int __pyx_clineno = 0;
15925  __Pyx_TraceFrameInit(__pyx_codeobj__56)
15926  __Pyx_RefNannySetupContext("prestep", 0);
15927  __Pyx_TraceCall("prestep", __pyx_f[0], 694, 0, __PYX_ERR(0, 694, __pyx_L1_error));
15928 
15929  /* "mbd/CouplingFSI.pyx":698
15930  * Sets external forces automatically from Proteus solution.
15931  * """
15932  * self.storeValues() # <<<<<<<<<<<<<<
15933  * # if self.ProtChSystem.thisptr.system.GetChTime() > 0.0003 or self.ProtChSystem.model is None: # CHANGE
15934  * # # if self.ProtChSystem.step_nb > self.ProtChSystem.step_start:
15935  */
15936  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_storeValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error)
15937  __Pyx_GOTREF(__pyx_t_2);
15938  __pyx_t_3 = NULL;
15939  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
15940  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
15941  if (likely(__pyx_t_3)) {
15942  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
15943  __Pyx_INCREF(__pyx_t_3);
15944  __Pyx_INCREF(function);
15945  __Pyx_DECREF_SET(__pyx_t_2, function);
15946  }
15947  }
15948  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
15949  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
15950  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error)
15951  __Pyx_GOTREF(__pyx_t_1);
15952  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
15953  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15954 
15955  /* "mbd/CouplingFSI.pyx":702
15956  * # # if self.ProtChSystem.step_nb > self.ProtChSystem.step_start:
15957  * # self.ChBody.SetBodyFixed(False)
15958  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
15959  * if self.ProtChSystem.model_addedmass is not None:
15960  * # getting added mass matrix
15961  */
15962  __pyx_t_4 = (__pyx_v_self->ProtChSystem->model != Py_None);
15963  __pyx_t_5 = (__pyx_t_4 != 0);
15964  if (__pyx_t_5) {
15965 
15966  /* "mbd/CouplingFSI.pyx":703
15967  * # self.ChBody.SetBodyFixed(False)
15968  * if self.ProtChSystem.model is not None:
15969  * if self.ProtChSystem.model_addedmass is not None: # <<<<<<<<<<<<<<
15970  * # getting added mass matrix
15971  * self.Aij[:] = 0
15972  */
15973  __pyx_t_5 = (__pyx_v_self->ProtChSystem->model_addedmass != Py_None);
15974  __pyx_t_4 = (__pyx_t_5 != 0);
15975  if (__pyx_t_4) {
15976 
15977  /* "mbd/CouplingFSI.pyx":705
15978  * if self.ProtChSystem.model_addedmass is not None:
15979  * # getting added mass matrix
15980  * self.Aij[:] = 0 # <<<<<<<<<<<<<<
15981  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
15982  * self.Aij_updated_global = am.coefficients.updated_global
15983  */
15984  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->Aij), __pyx_int_0, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
15985 
15986  /* "mbd/CouplingFSI.pyx":706
15987  * # getting added mass matrix
15988  * self.Aij[:] = 0
15989  * am = self.ProtChSystem.model_addedmass.levelModelList[-1] # <<<<<<<<<<<<<<
15990  * self.Aij_updated_global = am.coefficients.updated_global
15991  * for flag in self.boundaryFlags:
15992  */
15993  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model_addedmass, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
15994  __Pyx_GOTREF(__pyx_t_1);
15995  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
15996  __Pyx_GOTREF(__pyx_t_2);
15997  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15998  __pyx_v_am = __pyx_t_2;
15999  __pyx_t_2 = 0;
16000 
16001  /* "mbd/CouplingFSI.pyx":707
16002  * self.Aij[:] = 0
16003  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
16004  * self.Aij_updated_global = am.coefficients.updated_global # <<<<<<<<<<<<<<
16005  * for flag in self.boundaryFlags:
16006  * if self.useIBM:
16007  */
16008  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_am, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error)
16009  __Pyx_GOTREF(__pyx_t_2);
16010  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_updated_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
16011  __Pyx_GOTREF(__pyx_t_1);
16012  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16013  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error)
16014  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16015  __pyx_v_self->Aij_updated_global = __pyx_t_6;
16016 
16017  /* "mbd/CouplingFSI.pyx":708
16018  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
16019  * self.Aij_updated_global = am.coefficients.updated_global
16020  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
16021  * if self.useIBM:
16022  * self.Aij += am.coefficients.particle_Aij[flag]
16023  */
16024  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) {
16025  __pyx_t_1 = ((PyObject *)__pyx_v_self->boundaryFlags); __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
16026  __pyx_t_8 = NULL;
16027  } else {
16028  __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_self->boundaryFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
16029  __Pyx_GOTREF(__pyx_t_1);
16030  __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 708, __pyx_L1_error)
16031  }
16032  for (;;) {
16033  if (likely(!__pyx_t_8)) {
16034  if (likely(PyList_CheckExact(__pyx_t_1))) {
16035  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
16036  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16037  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 708, __pyx_L1_error)
16038  #else
16039  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
16040  __Pyx_GOTREF(__pyx_t_2);
16041  #endif
16042  } else {
16043  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
16044  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
16045  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 708, __pyx_L1_error)
16046  #else
16047  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
16048  __Pyx_GOTREF(__pyx_t_2);
16049  #endif
16050  }
16051  } else {
16052  __pyx_t_2 = __pyx_t_8(__pyx_t_1);
16053  if (unlikely(!__pyx_t_2)) {
16054  PyObject* exc_type = PyErr_Occurred();
16055  if (exc_type) {
16056  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
16057  else __PYX_ERR(0, 708, __pyx_L1_error)
16058  }
16059  break;
16060  }
16061  __Pyx_GOTREF(__pyx_t_2);
16062  }
16063  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
16064  __pyx_t_2 = 0;
16065 
16066  /* "mbd/CouplingFSI.pyx":709
16067  * self.Aij_updated_global = am.coefficients.updated_global
16068  * for flag in self.boundaryFlags:
16069  * if self.useIBM: # <<<<<<<<<<<<<<
16070  * self.Aij += am.coefficients.particle_Aij[flag]
16071  * else:
16072  */
16073  __pyx_t_4 = (__pyx_v_self->useIBM != 0);
16074  if (__pyx_t_4) {
16075 
16076  /* "mbd/CouplingFSI.pyx":710
16077  * for flag in self.boundaryFlags:
16078  * if self.useIBM:
16079  * self.Aij += am.coefficients.particle_Aij[flag] # <<<<<<<<<<<<<<
16080  * else:
16081  * self.Aij += am.Aij[flag]
16082  */
16083  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_am, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
16084  __Pyx_GOTREF(__pyx_t_2);
16085  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_particle_Aij); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
16086  __Pyx_GOTREF(__pyx_t_3);
16087  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16088  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error)
16089  __Pyx_GOTREF(__pyx_t_2);
16090  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16091  __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_self->Aij), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error)
16092  __Pyx_GOTREF(__pyx_t_3);
16093  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16094  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 710, __pyx_L1_error)
16095  __Pyx_GIVEREF(__pyx_t_3);
16096  __Pyx_GOTREF(__pyx_v_self->Aij);
16097  __Pyx_DECREF(((PyObject *)__pyx_v_self->Aij));
16098  __pyx_v_self->Aij = ((PyArrayObject *)__pyx_t_3);
16099  __pyx_t_3 = 0;
16100 
16101  /* "mbd/CouplingFSI.pyx":709
16102  * self.Aij_updated_global = am.coefficients.updated_global
16103  * for flag in self.boundaryFlags:
16104  * if self.useIBM: # <<<<<<<<<<<<<<
16105  * self.Aij += am.coefficients.particle_Aij[flag]
16106  * else:
16107  */
16108  goto __pyx_L7;
16109  }
16110 
16111  /* "mbd/CouplingFSI.pyx":712
16112  * self.Aij += am.coefficients.particle_Aij[flag]
16113  * else:
16114  * self.Aij += am.Aij[flag] # <<<<<<<<<<<<<<
16115  * if self.width_2D:
16116  * self.Aij *= self.width_2D
16117  */
16118  /*else*/ {
16119  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_am, __pyx_n_s_Aij); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error)
16120  __Pyx_GOTREF(__pyx_t_3);
16121  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L1_error)
16122  __Pyx_GOTREF(__pyx_t_2);
16123  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16124  __pyx_t_3 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_self->Aij), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L1_error)
16125  __Pyx_GOTREF(__pyx_t_3);
16126  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16127  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 712, __pyx_L1_error)
16128  __Pyx_GIVEREF(__pyx_t_3);
16129  __Pyx_GOTREF(__pyx_v_self->Aij);
16130  __Pyx_DECREF(((PyObject *)__pyx_v_self->Aij));
16131  __pyx_v_self->Aij = ((PyArrayObject *)__pyx_t_3);
16132  __pyx_t_3 = 0;
16133  }
16134  __pyx_L7:;
16135 
16136  /* "mbd/CouplingFSI.pyx":708
16137  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
16138  * self.Aij_updated_global = am.coefficients.updated_global
16139  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
16140  * if self.useIBM:
16141  * self.Aij += am.coefficients.particle_Aij[flag]
16142  */
16143  }
16144  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16145 
16146  /* "mbd/CouplingFSI.pyx":713
16147  * else:
16148  * self.Aij += am.Aij[flag]
16149  * if self.width_2D: # <<<<<<<<<<<<<<
16150  * self.Aij *= self.width_2D
16151  * # setting added mass
16152  */
16153  __pyx_t_4 = (__pyx_v_self->width_2D != 0);
16154  if (__pyx_t_4) {
16155 
16156  /* "mbd/CouplingFSI.pyx":714
16157  * self.Aij += am.Aij[flag]
16158  * if self.width_2D:
16159  * self.Aij *= self.width_2D # <<<<<<<<<<<<<<
16160  * # setting added mass
16161  * if self.applyAddedMass is True:
16162  */
16163  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->width_2D); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
16164  __Pyx_GOTREF(__pyx_t_1);
16165  __pyx_t_3 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_self->Aij), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
16166  __Pyx_GOTREF(__pyx_t_3);
16167  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16168  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 714, __pyx_L1_error)
16169  __Pyx_GIVEREF(__pyx_t_3);
16170  __Pyx_GOTREF(__pyx_v_self->Aij);
16171  __Pyx_DECREF(((PyObject *)__pyx_v_self->Aij));
16172  __pyx_v_self->Aij = ((PyArrayObject *)__pyx_t_3);
16173  __pyx_t_3 = 0;
16174 
16175  /* "mbd/CouplingFSI.pyx":713
16176  * else:
16177  * self.Aij += am.Aij[flag]
16178  * if self.width_2D: # <<<<<<<<<<<<<<
16179  * self.Aij *= self.width_2D
16180  * # setting added mass
16181  */
16182  }
16183 
16184  /* "mbd/CouplingFSI.pyx":703
16185  * # self.ChBody.SetBodyFixed(False)
16186  * if self.ProtChSystem.model is not None:
16187  * if self.ProtChSystem.model_addedmass is not None: # <<<<<<<<<<<<<<
16188  * # getting added mass matrix
16189  * self.Aij[:] = 0
16190  */
16191  }
16192 
16193  /* "mbd/CouplingFSI.pyx":716
16194  * self.Aij *= self.width_2D
16195  * # setting added mass
16196  * if self.applyAddedMass is True: # <<<<<<<<<<<<<<
16197  * Aij = np.zeros((6,6))
16198  * Aij[:] = self.Aij[:]
16199  */
16200  __pyx_t_4 = ((__pyx_v_self->applyAddedMass == 1) != 0);
16201  if (__pyx_t_4) {
16202 
16203  /* "mbd/CouplingFSI.pyx":717
16204  * # setting added mass
16205  * if self.applyAddedMass is True:
16206  * Aij = np.zeros((6,6)) # <<<<<<<<<<<<<<
16207  * Aij[:] = self.Aij[:]
16208  * Aij *= self.Aij_factor
16209  */
16210  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
16211  __Pyx_GOTREF(__pyx_t_1);
16212  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
16213  __Pyx_GOTREF(__pyx_t_2);
16214  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
16215  __pyx_t_1 = NULL;
16216  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
16217  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
16218  if (likely(__pyx_t_1)) {
16219  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
16220  __Pyx_INCREF(__pyx_t_1);
16221  __Pyx_INCREF(function);
16222  __Pyx_DECREF_SET(__pyx_t_2, function);
16223  }
16224  }
16225  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_tuple__2) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_tuple__2);
16226  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16227  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error)
16228  __Pyx_GOTREF(__pyx_t_3);
16229  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16230  __pyx_v_Aij = __pyx_t_3;
16231  __pyx_t_3 = 0;
16232 
16233  /* "mbd/CouplingFSI.pyx":718
16234  * if self.applyAddedMass is True:
16235  * Aij = np.zeros((6,6))
16236  * Aij[:] = self.Aij[:] # <<<<<<<<<<<<<<
16237  * Aij *= self.Aij_factor
16238  * self.setAddedMass(Aij)
16239  */
16240  __pyx_t_3 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->Aij), 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L1_error)
16241  __Pyx_GOTREF(__pyx_t_3);
16242  if (__Pyx_PyObject_SetSlice(__pyx_v_Aij, __pyx_t_3, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 718, __pyx_L1_error)
16243  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16244 
16245  /* "mbd/CouplingFSI.pyx":719
16246  * Aij = np.zeros((6,6))
16247  * Aij[:] = self.Aij[:]
16248  * Aij *= self.Aij_factor # <<<<<<<<<<<<<<
16249  * self.setAddedMass(Aij)
16250  * self.setExternalForces()
16251  */
16252  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->Aij_factor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 719, __pyx_L1_error)
16253  __Pyx_GOTREF(__pyx_t_3);
16254  __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_v_Aij, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error)
16255  __Pyx_GOTREF(__pyx_t_2);
16256  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16257  __Pyx_DECREF_SET(__pyx_v_Aij, __pyx_t_2);
16258  __pyx_t_2 = 0;
16259 
16260  /* "mbd/CouplingFSI.pyx":720
16261  * Aij[:] = self.Aij[:]
16262  * Aij *= self.Aij_factor
16263  * self.setAddedMass(Aij) # <<<<<<<<<<<<<<
16264  * self.setExternalForces()
16265  *
16266  */
16267  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setAddedMass); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L1_error)
16268  __Pyx_GOTREF(__pyx_t_3);
16269  __pyx_t_1 = NULL;
16270  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
16271  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
16272  if (likely(__pyx_t_1)) {
16273  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
16274  __Pyx_INCREF(__pyx_t_1);
16275  __Pyx_INCREF(function);
16276  __Pyx_DECREF_SET(__pyx_t_3, function);
16277  }
16278  }
16279  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_Aij) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_Aij);
16280  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16281  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error)
16282  __Pyx_GOTREF(__pyx_t_2);
16283  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16284  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16285 
16286  /* "mbd/CouplingFSI.pyx":716
16287  * self.Aij *= self.width_2D
16288  * # setting added mass
16289  * if self.applyAddedMass is True: # <<<<<<<<<<<<<<
16290  * Aij = np.zeros((6,6))
16291  * Aij[:] = self.Aij[:]
16292  */
16293  }
16294 
16295  /* "mbd/CouplingFSI.pyx":721
16296  * Aij *= self.Aij_factor
16297  * self.setAddedMass(Aij)
16298  * self.setExternalForces() # <<<<<<<<<<<<<<
16299  *
16300  * def setExternalForces(self, np.ndarray forces=None, np.ndarray moments=None):
16301  */
16302  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setExternalForces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
16303  __Pyx_GOTREF(__pyx_t_3);
16304  __pyx_t_1 = NULL;
16305  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
16306  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
16307  if (likely(__pyx_t_1)) {
16308  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
16309  __Pyx_INCREF(__pyx_t_1);
16310  __Pyx_INCREF(function);
16311  __Pyx_DECREF_SET(__pyx_t_3, function);
16312  }
16313  }
16314  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
16315  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
16316  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
16317  __Pyx_GOTREF(__pyx_t_2);
16318  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16319  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
16320 
16321  /* "mbd/CouplingFSI.pyx":702
16322  * # # if self.ProtChSystem.step_nb > self.ProtChSystem.step_start:
16323  * # self.ChBody.SetBodyFixed(False)
16324  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
16325  * if self.ProtChSystem.model_addedmass is not None:
16326  * # getting added mass matrix
16327  */
16328  }
16329 
16330  /* "mbd/CouplingFSI.pyx":694
16331  * return rot
16332  *
16333  * def prestep(self): # <<<<<<<<<<<<<<
16334  * """Called before Chrono system step.
16335  * Sets external forces automatically from Proteus solution.
16336  */
16337 
16338  /* function exit code */
16339  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
16340  goto __pyx_L0;
16341  __pyx_L1_error:;
16342  __Pyx_XDECREF(__pyx_t_1);
16343  __Pyx_XDECREF(__pyx_t_2);
16344  __Pyx_XDECREF(__pyx_t_3);
16345  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.prestep", __pyx_clineno, __pyx_lineno, __pyx_filename);
16346  __pyx_r = NULL;
16347  __pyx_L0:;
16348  __Pyx_XDECREF(__pyx_v_am);
16349  __Pyx_XDECREF(__pyx_v_flag);
16350  __Pyx_XDECREF(__pyx_v_Aij);
16351  __Pyx_XGIVEREF(__pyx_r);
16352  __Pyx_TraceReturn(__pyx_r, 0);
16353  __Pyx_RefNannyFinishContext();
16354  return __pyx_r;
16355 }
16356 
16357 /* "mbd/CouplingFSI.pyx":723
16358  * self.setExternalForces()
16359  *
16360  * def setExternalForces(self, np.ndarray forces=None, np.ndarray moments=None): # <<<<<<<<<<<<<<
16361  * """Sets external forces to body.
16362  * Called during prestep or can be called manually. If called manually,
16363  */
16364 
16365 /* Python wrapper */
16366 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_59setExternalForces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16367 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_58setExternalForces[] = "ProtChBody.setExternalForces(self, ndarray forces=None, ndarray moments=None)\nSets external forces to body.\n Called during prestep or can be called manually. If called manually,\n must be a Chrono only simulation.\n\n Parameters\n ----------\n forces: array_like\n forces array (length 3)\n moments: array_like\n moments array (length 3)\n ";
16368 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_59setExternalForces = {"setExternalForces", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_59setExternalForces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_58setExternalForces};
16369 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_59setExternalForces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16370  PyArrayObject *__pyx_v_forces = 0;
16371  PyArrayObject *__pyx_v_moments = 0;
16372  int __pyx_lineno = 0;
16373  const char *__pyx_filename = NULL;
16374  int __pyx_clineno = 0;
16375  PyObject *__pyx_r = 0;
16376  __Pyx_RefNannyDeclarations
16377  __Pyx_RefNannySetupContext("setExternalForces (wrapper)", 0);
16378  {
16379  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_forces,&__pyx_n_s_moments,0};
16380  PyObject* values[2] = {0,0};
16381  values[0] = (PyObject *)((PyArrayObject *)Py_None);
16382  values[1] = (PyObject *)((PyArrayObject *)Py_None);
16383  if (unlikely(__pyx_kwds)) {
16384  Py_ssize_t kw_args;
16385  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16386  switch (pos_args) {
16387  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16388  CYTHON_FALLTHROUGH;
16389  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16390  CYTHON_FALLTHROUGH;
16391  case 0: break;
16392  default: goto __pyx_L5_argtuple_error;
16393  }
16394  kw_args = PyDict_Size(__pyx_kwds);
16395  switch (pos_args) {
16396  case 0:
16397  if (kw_args > 0) {
16398  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_forces);
16399  if (value) { values[0] = value; kw_args--; }
16400  }
16401  CYTHON_FALLTHROUGH;
16402  case 1:
16403  if (kw_args > 0) {
16404  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_moments);
16405  if (value) { values[1] = value; kw_args--; }
16406  }
16407  }
16408  if (unlikely(kw_args > 0)) {
16409  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setExternalForces") < 0)) __PYX_ERR(0, 723, __pyx_L3_error)
16410  }
16411  } else {
16412  switch (PyTuple_GET_SIZE(__pyx_args)) {
16413  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16414  CYTHON_FALLTHROUGH;
16415  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16416  CYTHON_FALLTHROUGH;
16417  case 0: break;
16418  default: goto __pyx_L5_argtuple_error;
16419  }
16420  }
16421  __pyx_v_forces = ((PyArrayObject *)values[0]);
16422  __pyx_v_moments = ((PyArrayObject *)values[1]);
16423  }
16424  goto __pyx_L4_argument_unpacking_done;
16425  __pyx_L5_argtuple_error:;
16426  __Pyx_RaiseArgtupleInvalid("setExternalForces", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 723, __pyx_L3_error)
16427  __pyx_L3_error:;
16428  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setExternalForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
16429  __Pyx_RefNannyFinishContext();
16430  return NULL;
16431  __pyx_L4_argument_unpacking_done:;
16432  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_forces), __pyx_ptype_5numpy_ndarray, 1, "forces", 0))) __PYX_ERR(0, 723, __pyx_L1_error)
16433  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_moments), __pyx_ptype_5numpy_ndarray, 1, "moments", 0))) __PYX_ERR(0, 723, __pyx_L1_error)
16434  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_58setExternalForces(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_forces, __pyx_v_moments);
16435 
16436  /* function exit code */
16437  goto __pyx_L0;
16438  __pyx_L1_error:;
16439  __pyx_r = NULL;
16440  __pyx_L0:;
16441  __Pyx_RefNannyFinishContext();
16442  return __pyx_r;
16443 }
16444 
16445 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_58setExternalForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_forces, PyArrayObject *__pyx_v_moments) {
16446  PyArrayObject *__pyx_v_F_bar = 0;
16447  PyArrayObject *__pyx_v_M_bar = 0;
16448  long __pyx_v_F_solid_type;
16449  PyObject *__pyx_v_F_body = NULL;
16450  PyObject *__pyx_v_M_body = NULL;
16451  PyObject *__pyx_r = NULL;
16452  __Pyx_TraceDeclarations
16453  __Pyx_RefNannyDeclarations
16454  int __pyx_t_1;
16455  int __pyx_t_2;
16456  PyObject *__pyx_t_3 = NULL;
16457  PyObject *__pyx_t_4 = NULL;
16458  PyObject *__pyx_t_5 = NULL;
16459  PyObject *__pyx_t_6 = NULL;
16460  int __pyx_lineno = 0;
16461  const char *__pyx_filename = NULL;
16462  int __pyx_clineno = 0;
16463  __Pyx_TraceFrameInit(__pyx_codeobj__57)
16464  __Pyx_RefNannySetupContext("setExternalForces", 0);
16465  __Pyx_TraceCall("setExternalForces", __pyx_f[0], 723, 0, __PYX_ERR(0, 723, __pyx_L1_error));
16466 
16467  /* "mbd/CouplingFSI.pyx":735
16468  * moments array (length 3)
16469  * """
16470  * if forces is not None: # <<<<<<<<<<<<<<
16471  * self.F_prot = forces
16472  * if moments is not None:
16473  */
16474  __pyx_t_1 = (((PyObject *)__pyx_v_forces) != Py_None);
16475  __pyx_t_2 = (__pyx_t_1 != 0);
16476  if (__pyx_t_2) {
16477 
16478  /* "mbd/CouplingFSI.pyx":736
16479  * """
16480  * if forces is not None:
16481  * self.F_prot = forces # <<<<<<<<<<<<<<
16482  * if moments is not None:
16483  * self.M_prot = moments
16484  */
16485  __Pyx_INCREF(((PyObject *)__pyx_v_forces));
16486  __Pyx_GIVEREF(((PyObject *)__pyx_v_forces));
16487  __Pyx_GOTREF(__pyx_v_self->F_prot);
16488  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot));
16489  __pyx_v_self->F_prot = __pyx_v_forces;
16490 
16491  /* "mbd/CouplingFSI.pyx":735
16492  * moments array (length 3)
16493  * """
16494  * if forces is not None: # <<<<<<<<<<<<<<
16495  * self.F_prot = forces
16496  * if moments is not None:
16497  */
16498  }
16499 
16500  /* "mbd/CouplingFSI.pyx":737
16501  * if forces is not None:
16502  * self.F_prot = forces
16503  * if moments is not None: # <<<<<<<<<<<<<<
16504  * self.M_prot = moments
16505  * if self.ProtChSystem.model is not None:
16506  */
16507  __pyx_t_2 = (((PyObject *)__pyx_v_moments) != Py_None);
16508  __pyx_t_1 = (__pyx_t_2 != 0);
16509  if (__pyx_t_1) {
16510 
16511  /* "mbd/CouplingFSI.pyx":738
16512  * self.F_prot = forces
16513  * if moments is not None:
16514  * self.M_prot = moments # <<<<<<<<<<<<<<
16515  * if self.ProtChSystem.model is not None:
16516  * self.F_prot = self.getPressureForces()+self.getShearForces()
16517  */
16518  __Pyx_INCREF(((PyObject *)__pyx_v_moments));
16519  __Pyx_GIVEREF(((PyObject *)__pyx_v_moments));
16520  __Pyx_GOTREF(__pyx_v_self->M_prot);
16521  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot));
16522  __pyx_v_self->M_prot = __pyx_v_moments;
16523 
16524  /* "mbd/CouplingFSI.pyx":737
16525  * if forces is not None:
16526  * self.F_prot = forces
16527  * if moments is not None: # <<<<<<<<<<<<<<
16528  * self.M_prot = moments
16529  * if self.ProtChSystem.model is not None:
16530  */
16531  }
16532 
16533  /* "mbd/CouplingFSI.pyx":739
16534  * if moments is not None:
16535  * self.M_prot = moments
16536  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
16537  * self.F_prot = self.getPressureForces()+self.getShearForces()
16538  * self.M_prot = self.getMoments()
16539  */
16540  __pyx_t_1 = (__pyx_v_self->ProtChSystem->model != Py_None);
16541  __pyx_t_2 = (__pyx_t_1 != 0);
16542  if (__pyx_t_2) {
16543 
16544  /* "mbd/CouplingFSI.pyx":740
16545  * self.M_prot = moments
16546  * if self.ProtChSystem.model is not None:
16547  * self.F_prot = self.getPressureForces()+self.getShearForces() # <<<<<<<<<<<<<<
16548  * self.M_prot = self.getMoments()
16549  * if self.width_2D:
16550  */
16551  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getPressureForces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
16552  __Pyx_GOTREF(__pyx_t_4);
16553  __pyx_t_5 = NULL;
16554  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
16555  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
16556  if (likely(__pyx_t_5)) {
16557  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
16558  __Pyx_INCREF(__pyx_t_5);
16559  __Pyx_INCREF(function);
16560  __Pyx_DECREF_SET(__pyx_t_4, function);
16561  }
16562  }
16563  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
16564  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
16565  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error)
16566  __Pyx_GOTREF(__pyx_t_3);
16567  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16568  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getShearForces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
16569  __Pyx_GOTREF(__pyx_t_5);
16570  __pyx_t_6 = NULL;
16571  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
16572  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
16573  if (likely(__pyx_t_6)) {
16574  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
16575  __Pyx_INCREF(__pyx_t_6);
16576  __Pyx_INCREF(function);
16577  __Pyx_DECREF_SET(__pyx_t_5, function);
16578  }
16579  }
16580  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
16581  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
16582  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 740, __pyx_L1_error)
16583  __Pyx_GOTREF(__pyx_t_4);
16584  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16585  __pyx_t_5 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
16586  __Pyx_GOTREF(__pyx_t_5);
16587  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16588  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16589  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 740, __pyx_L1_error)
16590  __Pyx_GIVEREF(__pyx_t_5);
16591  __Pyx_GOTREF(__pyx_v_self->F_prot);
16592  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot));
16593  __pyx_v_self->F_prot = ((PyArrayObject *)__pyx_t_5);
16594  __pyx_t_5 = 0;
16595 
16596  /* "mbd/CouplingFSI.pyx":741
16597  * if self.ProtChSystem.model is not None:
16598  * self.F_prot = self.getPressureForces()+self.getShearForces()
16599  * self.M_prot = self.getMoments() # <<<<<<<<<<<<<<
16600  * if self.width_2D:
16601  * self.F_prot *= self.width_2D
16602  */
16603  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getMoments); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 741, __pyx_L1_error)
16604  __Pyx_GOTREF(__pyx_t_4);
16605  __pyx_t_3 = NULL;
16606  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
16607  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
16608  if (likely(__pyx_t_3)) {
16609  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
16610  __Pyx_INCREF(__pyx_t_3);
16611  __Pyx_INCREF(function);
16612  __Pyx_DECREF_SET(__pyx_t_4, function);
16613  }
16614  }
16615  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
16616  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16617  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 741, __pyx_L1_error)
16618  __Pyx_GOTREF(__pyx_t_5);
16619  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16620  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 741, __pyx_L1_error)
16621  __Pyx_GIVEREF(__pyx_t_5);
16622  __Pyx_GOTREF(__pyx_v_self->M_prot);
16623  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot));
16624  __pyx_v_self->M_prot = ((PyArrayObject *)__pyx_t_5);
16625  __pyx_t_5 = 0;
16626 
16627  /* "mbd/CouplingFSI.pyx":739
16628  * if moments is not None:
16629  * self.M_prot = moments
16630  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
16631  * self.F_prot = self.getPressureForces()+self.getShearForces()
16632  * self.M_prot = self.getMoments()
16633  */
16634  }
16635 
16636  /* "mbd/CouplingFSI.pyx":742
16637  * self.F_prot = self.getPressureForces()+self.getShearForces()
16638  * self.M_prot = self.getMoments()
16639  * if self.width_2D: # <<<<<<<<<<<<<<
16640  * self.F_prot *= self.width_2D
16641  * self.M_prot *= self.width_2D
16642  */
16643  __pyx_t_2 = (__pyx_v_self->width_2D != 0);
16644  if (__pyx_t_2) {
16645 
16646  /* "mbd/CouplingFSI.pyx":743
16647  * self.M_prot = self.getMoments()
16648  * if self.width_2D:
16649  * self.F_prot *= self.width_2D # <<<<<<<<<<<<<<
16650  * self.M_prot *= self.width_2D
16651  * cdef np.ndarray F_bar = np.zeros(3)
16652  */
16653  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->width_2D); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 743, __pyx_L1_error)
16654  __Pyx_GOTREF(__pyx_t_5);
16655  __pyx_t_4 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_self->F_prot), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 743, __pyx_L1_error)
16656  __Pyx_GOTREF(__pyx_t_4);
16657  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16658  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 743, __pyx_L1_error)
16659  __Pyx_GIVEREF(__pyx_t_4);
16660  __Pyx_GOTREF(__pyx_v_self->F_prot);
16661  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot));
16662  __pyx_v_self->F_prot = ((PyArrayObject *)__pyx_t_4);
16663  __pyx_t_4 = 0;
16664 
16665  /* "mbd/CouplingFSI.pyx":744
16666  * if self.width_2D:
16667  * self.F_prot *= self.width_2D
16668  * self.M_prot *= self.width_2D # <<<<<<<<<<<<<<
16669  * cdef np.ndarray F_bar = np.zeros(3)
16670  * cdef np.ndarray M_bar = np.zeros(3)
16671  */
16672  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->width_2D); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 744, __pyx_L1_error)
16673  __Pyx_GOTREF(__pyx_t_4);
16674  __pyx_t_5 = PyNumber_InPlaceMultiply(((PyObject *)__pyx_v_self->M_prot), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 744, __pyx_L1_error)
16675  __Pyx_GOTREF(__pyx_t_5);
16676  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16677  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 744, __pyx_L1_error)
16678  __Pyx_GIVEREF(__pyx_t_5);
16679  __Pyx_GOTREF(__pyx_v_self->M_prot);
16680  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot));
16681  __pyx_v_self->M_prot = ((PyArrayObject *)__pyx_t_5);
16682  __pyx_t_5 = 0;
16683 
16684  /* "mbd/CouplingFSI.pyx":742
16685  * self.F_prot = self.getPressureForces()+self.getShearForces()
16686  * self.M_prot = self.getMoments()
16687  * if self.width_2D: # <<<<<<<<<<<<<<
16688  * self.F_prot *= self.width_2D
16689  * self.M_prot *= self.width_2D
16690  */
16691  }
16692 
16693  /* "mbd/CouplingFSI.pyx":745
16694  * self.F_prot *= self.width_2D
16695  * self.M_prot *= self.width_2D
16696  * cdef np.ndarray F_bar = np.zeros(3) # <<<<<<<<<<<<<<
16697  * cdef np.ndarray M_bar = np.zeros(3)
16698  * F_bar[:] = self.F_prot[:]
16699  */
16700  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 745, __pyx_L1_error)
16701  __Pyx_GOTREF(__pyx_t_4);
16702  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 745, __pyx_L1_error)
16703  __Pyx_GOTREF(__pyx_t_3);
16704  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16705  __pyx_t_4 = NULL;
16706  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
16707  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
16708  if (likely(__pyx_t_4)) {
16709  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
16710  __Pyx_INCREF(__pyx_t_4);
16711  __Pyx_INCREF(function);
16712  __Pyx_DECREF_SET(__pyx_t_3, function);
16713  }
16714  }
16715  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_3);
16716  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
16717  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 745, __pyx_L1_error)
16718  __Pyx_GOTREF(__pyx_t_5);
16719  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16720  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 745, __pyx_L1_error)
16721  __pyx_v_F_bar = ((PyArrayObject *)__pyx_t_5);
16722  __pyx_t_5 = 0;
16723 
16724  /* "mbd/CouplingFSI.pyx":746
16725  * self.M_prot *= self.width_2D
16726  * cdef np.ndarray F_bar = np.zeros(3)
16727  * cdef np.ndarray M_bar = np.zeros(3) # <<<<<<<<<<<<<<
16728  * F_bar[:] = self.F_prot[:]
16729  * M_bar[:] = self.M_prot[:]
16730  */
16731  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
16732  __Pyx_GOTREF(__pyx_t_3);
16733  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 746, __pyx_L1_error)
16734  __Pyx_GOTREF(__pyx_t_4);
16735  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
16736  __pyx_t_3 = NULL;
16737  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
16738  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
16739  if (likely(__pyx_t_3)) {
16740  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
16741  __Pyx_INCREF(__pyx_t_3);
16742  __Pyx_INCREF(function);
16743  __Pyx_DECREF_SET(__pyx_t_4, function);
16744  }
16745  }
16746  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_3);
16747  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
16748  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 746, __pyx_L1_error)
16749  __Pyx_GOTREF(__pyx_t_5);
16750  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16751  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 746, __pyx_L1_error)
16752  __pyx_v_M_bar = ((PyArrayObject *)__pyx_t_5);
16753  __pyx_t_5 = 0;
16754 
16755  /* "mbd/CouplingFSI.pyx":747
16756  * cdef np.ndarray F_bar = np.zeros(3)
16757  * cdef np.ndarray M_bar = np.zeros(3)
16758  * F_bar[:] = self.F_prot[:] # <<<<<<<<<<<<<<
16759  * M_bar[:] = self.M_prot[:]
16760  * if self.applyAddedMass is True:
16761  */
16762  __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->F_prot), 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 747, __pyx_L1_error)
16763  __Pyx_GOTREF(__pyx_t_5);
16764  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_F_bar), __pyx_t_5, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 747, __pyx_L1_error)
16765  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16766 
16767  /* "mbd/CouplingFSI.pyx":748
16768  * cdef np.ndarray M_bar = np.zeros(3)
16769  * F_bar[:] = self.F_prot[:]
16770  * M_bar[:] = self.M_prot[:] # <<<<<<<<<<<<<<
16771  * if self.applyAddedMass is True:
16772  * F_bar += self.F_Aij
16773  */
16774  __pyx_t_5 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->M_prot), 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 748, __pyx_L1_error)
16775  __Pyx_GOTREF(__pyx_t_5);
16776  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_M_bar), __pyx_t_5, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
16777  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16778 
16779  /* "mbd/CouplingFSI.pyx":749
16780  * F_bar[:] = self.F_prot[:]
16781  * M_bar[:] = self.M_prot[:]
16782  * if self.applyAddedMass is True: # <<<<<<<<<<<<<<
16783  * F_bar += self.F_Aij
16784  * M_bar += self.M_Aij
16785  */
16786  __pyx_t_2 = ((__pyx_v_self->applyAddedMass == 1) != 0);
16787  if (__pyx_t_2) {
16788 
16789  /* "mbd/CouplingFSI.pyx":750
16790  * M_bar[:] = self.M_prot[:]
16791  * if self.applyAddedMass is True:
16792  * F_bar += self.F_Aij # <<<<<<<<<<<<<<
16793  * M_bar += self.M_Aij
16794  * if self.ProtChSystem.first_step is False:
16795  */
16796  __pyx_t_5 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_F_bar), ((PyObject *)__pyx_v_self->F_Aij)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 750, __pyx_L1_error)
16797  __Pyx_GOTREF(__pyx_t_5);
16798  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 750, __pyx_L1_error)
16799  __Pyx_DECREF_SET(__pyx_v_F_bar, ((PyArrayObject *)__pyx_t_5));
16800  __pyx_t_5 = 0;
16801 
16802  /* "mbd/CouplingFSI.pyx":751
16803  * if self.applyAddedMass is True:
16804  * F_bar += self.F_Aij
16805  * M_bar += self.M_Aij # <<<<<<<<<<<<<<
16806  * if self.ProtChSystem.first_step is False:
16807  * # actual force applied to body
16808  */
16809  __pyx_t_5 = PyNumber_InPlaceAdd(((PyObject *)__pyx_v_M_bar), ((PyObject *)__pyx_v_self->M_Aij)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 751, __pyx_L1_error)
16810  __Pyx_GOTREF(__pyx_t_5);
16811  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 751, __pyx_L1_error)
16812  __Pyx_DECREF_SET(__pyx_v_M_bar, ((PyArrayObject *)__pyx_t_5));
16813  __pyx_t_5 = 0;
16814 
16815  /* "mbd/CouplingFSI.pyx":749
16816  * F_bar[:] = self.F_prot[:]
16817  * M_bar[:] = self.M_prot[:]
16818  * if self.applyAddedMass is True: # <<<<<<<<<<<<<<
16819  * F_bar += self.F_Aij
16820  * M_bar += self.M_Aij
16821  */
16822  }
16823 
16824  /* "mbd/CouplingFSI.pyx":752
16825  * F_bar += self.F_Aij
16826  * M_bar += self.M_Aij
16827  * if self.ProtChSystem.first_step is False: # <<<<<<<<<<<<<<
16828  * # actual force applied to body
16829  * if self.ProtChSystem.prediction == "backwardEuler":
16830  */
16831  __pyx_t_2 = ((__pyx_v_self->ProtChSystem->first_step == 0) != 0);
16832  if (__pyx_t_2) {
16833 
16834  /* "mbd/CouplingFSI.pyx":754
16835  * if self.ProtChSystem.first_step is False:
16836  * # actual force applied to body
16837  * if self.ProtChSystem.prediction == "backwardEuler": # <<<<<<<<<<<<<<
16838  * F_bar = F_bar
16839  * M_bar = M_bar
16840  */
16841  __pyx_t_2 = ((__pyx_v_self->ProtChSystem->prediction == ((char const *)"backwardEuler")) != 0);
16842  if (__pyx_t_2) {
16843 
16844  /* "mbd/CouplingFSI.pyx":755
16845  * # actual force applied to body
16846  * if self.ProtChSystem.prediction == "backwardEuler":
16847  * F_bar = F_bar # <<<<<<<<<<<<<<
16848  * M_bar = M_bar
16849  * if self.ProtChSystem.prediction == "forwardEuler":
16850  */
16851  __Pyx_INCREF(((PyObject *)__pyx_v_F_bar));
16852  __Pyx_DECREF_SET(__pyx_v_F_bar, __pyx_v_F_bar);
16853 
16854  /* "mbd/CouplingFSI.pyx":756
16855  * if self.ProtChSystem.prediction == "backwardEuler":
16856  * F_bar = F_bar
16857  * M_bar = M_bar # <<<<<<<<<<<<<<
16858  * if self.ProtChSystem.prediction == "forwardEuler":
16859  * F_bar = self.F_prot_last+self.Aij_last
16860  */
16861  __Pyx_INCREF(((PyObject *)__pyx_v_M_bar));
16862  __Pyx_DECREF_SET(__pyx_v_M_bar, __pyx_v_M_bar);
16863 
16864  /* "mbd/CouplingFSI.pyx":754
16865  * if self.ProtChSystem.first_step is False:
16866  * # actual force applied to body
16867  * if self.ProtChSystem.prediction == "backwardEuler": # <<<<<<<<<<<<<<
16868  * F_bar = F_bar
16869  * M_bar = M_bar
16870  */
16871  }
16872 
16873  /* "mbd/CouplingFSI.pyx":757
16874  * F_bar = F_bar
16875  * M_bar = M_bar
16876  * if self.ProtChSystem.prediction == "forwardEuler": # <<<<<<<<<<<<<<
16877  * F_bar = self.F_prot_last+self.Aij_last
16878  * M_bar = self.M_prot_last+self.Aij_last
16879  */
16880  __pyx_t_2 = ((__pyx_v_self->ProtChSystem->prediction == ((char const *)"forwardEuler")) != 0);
16881  if (__pyx_t_2) {
16882 
16883  /* "mbd/CouplingFSI.pyx":758
16884  * M_bar = M_bar
16885  * if self.ProtChSystem.prediction == "forwardEuler":
16886  * F_bar = self.F_prot_last+self.Aij_last # <<<<<<<<<<<<<<
16887  * M_bar = self.M_prot_last+self.Aij_last
16888  * if self.ProtChSystem.prediction == "implicitOrder2":
16889  */
16890  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Aij_last); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 758, __pyx_L1_error)
16891  __Pyx_GOTREF(__pyx_t_5);
16892  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_self->F_prot_last), __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 758, __pyx_L1_error)
16893  __Pyx_GOTREF(__pyx_t_4);
16894  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16895  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 758, __pyx_L1_error)
16896  __Pyx_DECREF_SET(__pyx_v_F_bar, ((PyArrayObject *)__pyx_t_4));
16897  __pyx_t_4 = 0;
16898 
16899  /* "mbd/CouplingFSI.pyx":759
16900  * if self.ProtChSystem.prediction == "forwardEuler":
16901  * F_bar = self.F_prot_last+self.Aij_last
16902  * M_bar = self.M_prot_last+self.Aij_last # <<<<<<<<<<<<<<
16903  * if self.ProtChSystem.prediction == "implicitOrder2":
16904  * F_bar = (F_bar+self.F_prot_last+self.F_Aij_last)/2.
16905  */
16906  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Aij_last); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 759, __pyx_L1_error)
16907  __Pyx_GOTREF(__pyx_t_4);
16908  __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_v_self->M_prot_last), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 759, __pyx_L1_error)
16909  __Pyx_GOTREF(__pyx_t_5);
16910  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16911  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 759, __pyx_L1_error)
16912  __Pyx_DECREF_SET(__pyx_v_M_bar, ((PyArrayObject *)__pyx_t_5));
16913  __pyx_t_5 = 0;
16914 
16915  /* "mbd/CouplingFSI.pyx":757
16916  * F_bar = F_bar
16917  * M_bar = M_bar
16918  * if self.ProtChSystem.prediction == "forwardEuler": # <<<<<<<<<<<<<<
16919  * F_bar = self.F_prot_last+self.Aij_last
16920  * M_bar = self.M_prot_last+self.Aij_last
16921  */
16922  }
16923 
16924  /* "mbd/CouplingFSI.pyx":760
16925  * F_bar = self.F_prot_last+self.Aij_last
16926  * M_bar = self.M_prot_last+self.Aij_last
16927  * if self.ProtChSystem.prediction == "implicitOrder2": # <<<<<<<<<<<<<<
16928  * F_bar = (F_bar+self.F_prot_last+self.F_Aij_last)/2.
16929  * M_bar = (M_bar+self.M_prot_last+self.M_Aij_last)/2.
16930  */
16931  __pyx_t_2 = ((__pyx_v_self->ProtChSystem->prediction == ((char const *)"implicitOrder2")) != 0);
16932  if (__pyx_t_2) {
16933 
16934  /* "mbd/CouplingFSI.pyx":761
16935  * M_bar = self.M_prot_last+self.Aij_last
16936  * if self.ProtChSystem.prediction == "implicitOrder2":
16937  * F_bar = (F_bar+self.F_prot_last+self.F_Aij_last)/2. # <<<<<<<<<<<<<<
16938  * M_bar = (M_bar+self.M_prot_last+self.M_Aij_last)/2.
16939  * # self.F_applied = self.F_prot
16940  */
16941  __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_v_F_bar), ((PyObject *)__pyx_v_self->F_prot_last)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error)
16942  __Pyx_GOTREF(__pyx_t_5);
16943  __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_v_self->F_Aij_last)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 761, __pyx_L1_error)
16944  __Pyx_GOTREF(__pyx_t_4);
16945  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16946  __pyx_t_5 = __Pyx_PyFloat_DivideObjC(__pyx_t_4, __pyx_float_2_, 2., 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 761, __pyx_L1_error)
16947  __Pyx_GOTREF(__pyx_t_5);
16948  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16949  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 761, __pyx_L1_error)
16950  __Pyx_DECREF_SET(__pyx_v_F_bar, ((PyArrayObject *)__pyx_t_5));
16951  __pyx_t_5 = 0;
16952 
16953  /* "mbd/CouplingFSI.pyx":762
16954  * if self.ProtChSystem.prediction == "implicitOrder2":
16955  * F_bar = (F_bar+self.F_prot_last+self.F_Aij_last)/2.
16956  * M_bar = (M_bar+self.M_prot_last+self.M_Aij_last)/2. # <<<<<<<<<<<<<<
16957  * # self.F_applied = self.F_prot
16958  * # self.M_applied = self.M_prot
16959  */
16960  __pyx_t_5 = PyNumber_Add(((PyObject *)__pyx_v_M_bar), ((PyObject *)__pyx_v_self->M_prot_last)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 762, __pyx_L1_error)
16961  __Pyx_GOTREF(__pyx_t_5);
16962  __pyx_t_4 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_v_self->M_Aij_last)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 762, __pyx_L1_error)
16963  __Pyx_GOTREF(__pyx_t_4);
16964  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
16965  __pyx_t_5 = __Pyx_PyFloat_DivideObjC(__pyx_t_4, __pyx_float_2_, 2., 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 762, __pyx_L1_error)
16966  __Pyx_GOTREF(__pyx_t_5);
16967  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
16968  if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 762, __pyx_L1_error)
16969  __Pyx_DECREF_SET(__pyx_v_M_bar, ((PyArrayObject *)__pyx_t_5));
16970  __pyx_t_5 = 0;
16971 
16972  /* "mbd/CouplingFSI.pyx":760
16973  * F_bar = self.F_prot_last+self.Aij_last
16974  * M_bar = self.M_prot_last+self.Aij_last
16975  * if self.ProtChSystem.prediction == "implicitOrder2": # <<<<<<<<<<<<<<
16976  * F_bar = (F_bar+self.F_prot_last+self.F_Aij_last)/2.
16977  * M_bar = (M_bar+self.M_prot_last+self.M_Aij_last)/2.
16978  */
16979  }
16980 
16981  /* "mbd/CouplingFSI.pyx":752
16982  * F_bar += self.F_Aij
16983  * M_bar += self.M_Aij
16984  * if self.ProtChSystem.first_step is False: # <<<<<<<<<<<<<<
16985  * # actual force applied to body
16986  * if self.ProtChSystem.prediction == "backwardEuler":
16987  */
16988  }
16989 
16990  /* "mbd/CouplingFSI.pyx":767
16991  * # self.F_applied = 2*F_bar - self.F_applied_last
16992  * # self.M_applied = 2*M_bar - self.M_applied_last
16993  * F_solid_type = 1 # <<<<<<<<<<<<<<
16994  * if F_solid_type == 1:
16995  * F_body = F_bar
16996  */
16997  __pyx_v_F_solid_type = 1;
16998 
16999  /* "mbd/CouplingFSI.pyx":768
17000  * # self.M_applied = 2*M_bar - self.M_applied_last
17001  * F_solid_type = 1
17002  * if F_solid_type == 1: # <<<<<<<<<<<<<<
17003  * F_body = F_bar
17004  * M_body = M_bar
17005  */
17006  switch (__pyx_v_F_solid_type) {
17007  case 1:
17008 
17009  /* "mbd/CouplingFSI.pyx":769
17010  * F_solid_type = 1
17011  * if F_solid_type == 1:
17012  * F_body = F_bar # <<<<<<<<<<<<<<
17013  * M_body = M_bar
17014  * elif F_solid_type == 2:
17015  */
17016  __Pyx_INCREF(((PyObject *)__pyx_v_F_bar));
17017  __pyx_v_F_body = ((PyObject *)__pyx_v_F_bar);
17018 
17019  /* "mbd/CouplingFSI.pyx":770
17020  * if F_solid_type == 1:
17021  * F_body = F_bar
17022  * M_body = M_bar # <<<<<<<<<<<<<<
17023  * elif F_solid_type == 2:
17024  * if np.linalg.norm(self.F_prot_last) == 0: # first time step
17025  */
17026  __Pyx_INCREF(((PyObject *)__pyx_v_M_bar));
17027  __pyx_v_M_body = ((PyObject *)__pyx_v_M_bar);
17028 
17029  /* "mbd/CouplingFSI.pyx":768
17030  * # self.M_applied = 2*M_bar - self.M_applied_last
17031  * F_solid_type = 1
17032  * if F_solid_type == 1: # <<<<<<<<<<<<<<
17033  * F_body = F_bar
17034  * M_body = M_bar
17035  */
17036  break;
17037  case 2:
17038 
17039  /* "mbd/CouplingFSI.pyx":772
17040  * M_body = M_bar
17041  * elif F_solid_type == 2:
17042  * if np.linalg.norm(self.F_prot_last) == 0: # first time step # <<<<<<<<<<<<<<
17043  * F_body = F_bar
17044  * M_body = M_bar
17045  */
17046  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
17047  __Pyx_GOTREF(__pyx_t_4);
17048  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_linalg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error)
17049  __Pyx_GOTREF(__pyx_t_3);
17050  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17051  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_norm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
17052  __Pyx_GOTREF(__pyx_t_4);
17053  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17054  __pyx_t_3 = NULL;
17055  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
17056  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
17057  if (likely(__pyx_t_3)) {
17058  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
17059  __Pyx_INCREF(__pyx_t_3);
17060  __Pyx_INCREF(function);
17061  __Pyx_DECREF_SET(__pyx_t_4, function);
17062  }
17063  }
17064  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self->F_prot_last)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self->F_prot_last));
17065  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
17066  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 772, __pyx_L1_error)
17067  __Pyx_GOTREF(__pyx_t_5);
17068  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17069  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 772, __pyx_L1_error)
17070  __Pyx_GOTREF(__pyx_t_4);
17071  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17072  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 772, __pyx_L1_error)
17073  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17074  if (__pyx_t_2) {
17075 
17076  /* "mbd/CouplingFSI.pyx":773
17077  * elif F_solid_type == 2:
17078  * if np.linalg.norm(self.F_prot_last) == 0: # first time step
17079  * F_body = F_bar # <<<<<<<<<<<<<<
17080  * M_body = M_bar
17081  * else:
17082  */
17083  __Pyx_INCREF(((PyObject *)__pyx_v_F_bar));
17084  __pyx_v_F_body = ((PyObject *)__pyx_v_F_bar);
17085 
17086  /* "mbd/CouplingFSI.pyx":774
17087  * if np.linalg.norm(self.F_prot_last) == 0: # first time step
17088  * F_body = F_bar
17089  * M_body = M_bar # <<<<<<<<<<<<<<
17090  * else:
17091  * F_body = 2*F_bar-self.F_applied_last
17092  */
17093  __Pyx_INCREF(((PyObject *)__pyx_v_M_bar));
17094  __pyx_v_M_body = ((PyObject *)__pyx_v_M_bar);
17095 
17096  /* "mbd/CouplingFSI.pyx":772
17097  * M_body = M_bar
17098  * elif F_solid_type == 2:
17099  * if np.linalg.norm(self.F_prot_last) == 0: # first time step # <<<<<<<<<<<<<<
17100  * F_body = F_bar
17101  * M_body = M_bar
17102  */
17103  goto __pyx_L12;
17104  }
17105 
17106  /* "mbd/CouplingFSI.pyx":776
17107  * M_body = M_bar
17108  * else:
17109  * F_body = 2*F_bar-self.F_applied_last # <<<<<<<<<<<<<<
17110  * M_body = 2*M_bar-self.M_applied_last
17111  * self.F_applied = F_body
17112  */
17113  /*else*/ {
17114  __pyx_t_4 = PyNumber_Multiply(__pyx_int_2, ((PyObject *)__pyx_v_F_bar)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 776, __pyx_L1_error)
17115  __Pyx_GOTREF(__pyx_t_4);
17116  __pyx_t_5 = PyNumber_Subtract(__pyx_t_4, ((PyObject *)__pyx_v_self->F_applied_last)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 776, __pyx_L1_error)
17117  __Pyx_GOTREF(__pyx_t_5);
17118  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17119  __pyx_v_F_body = __pyx_t_5;
17120  __pyx_t_5 = 0;
17121 
17122  /* "mbd/CouplingFSI.pyx":777
17123  * else:
17124  * F_body = 2*F_bar-self.F_applied_last
17125  * M_body = 2*M_bar-self.M_applied_last # <<<<<<<<<<<<<<
17126  * self.F_applied = F_body
17127  * self.M_applied = M_body
17128  */
17129  __pyx_t_5 = PyNumber_Multiply(__pyx_int_2, ((PyObject *)__pyx_v_M_bar)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 777, __pyx_L1_error)
17130  __Pyx_GOTREF(__pyx_t_5);
17131  __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, ((PyObject *)__pyx_v_self->M_applied_last)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 777, __pyx_L1_error)
17132  __Pyx_GOTREF(__pyx_t_4);
17133  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
17134  __pyx_v_M_body = __pyx_t_4;
17135  __pyx_t_4 = 0;
17136  }
17137  __pyx_L12:;
17138 
17139  /* "mbd/CouplingFSI.pyx":771
17140  * F_body = F_bar
17141  * M_body = M_bar
17142  * elif F_solid_type == 2: # <<<<<<<<<<<<<<
17143  * if np.linalg.norm(self.F_prot_last) == 0: # first time step
17144  * F_body = F_bar
17145  */
17146  break;
17147  default: break;
17148  }
17149 
17150  /* "mbd/CouplingFSI.pyx":778
17151  * F_body = 2*F_bar-self.F_applied_last
17152  * M_body = 2*M_bar-self.M_applied_last
17153  * self.F_applied = F_body # <<<<<<<<<<<<<<
17154  * self.M_applied = M_body
17155  * self.thisptr.prestep(<double*> self.F_applied.data,
17156  */
17157  if (unlikely(!__pyx_v_F_body)) { __Pyx_RaiseUnboundLocalError("F_body"); __PYX_ERR(0, 778, __pyx_L1_error) }
17158  if (!(likely(((__pyx_v_F_body) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_F_body, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 778, __pyx_L1_error)
17159  __pyx_t_4 = __pyx_v_F_body;
17160  __Pyx_INCREF(__pyx_t_4);
17161  __Pyx_GIVEREF(__pyx_t_4);
17162  __Pyx_GOTREF(__pyx_v_self->F_applied);
17163  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_applied));
17164  __pyx_v_self->F_applied = ((PyArrayObject *)__pyx_t_4);
17165  __pyx_t_4 = 0;
17166 
17167  /* "mbd/CouplingFSI.pyx":779
17168  * M_body = 2*M_bar-self.M_applied_last
17169  * self.F_applied = F_body
17170  * self.M_applied = M_body # <<<<<<<<<<<<<<
17171  * self.thisptr.prestep(<double*> self.F_applied.data,
17172  * <double*> self.M_applied.data)
17173  */
17174  if (unlikely(!__pyx_v_M_body)) { __Pyx_RaiseUnboundLocalError("M_body"); __PYX_ERR(0, 779, __pyx_L1_error) }
17175  if (!(likely(((__pyx_v_M_body) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_M_body, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 779, __pyx_L1_error)
17176  __pyx_t_4 = __pyx_v_M_body;
17177  __Pyx_INCREF(__pyx_t_4);
17178  __Pyx_GIVEREF(__pyx_t_4);
17179  __Pyx_GOTREF(__pyx_v_self->M_applied);
17180  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_applied));
17181  __pyx_v_self->M_applied = ((PyArrayObject *)__pyx_t_4);
17182  __pyx_t_4 = 0;
17183 
17184  /* "mbd/CouplingFSI.pyx":780
17185  * self.F_applied = F_body
17186  * self.M_applied = M_body
17187  * self.thisptr.prestep(<double*> self.F_applied.data, # <<<<<<<<<<<<<<
17188  * <double*> self.M_applied.data)
17189  * self.predicted = False
17190  */
17191  __pyx_v_self->thisptr->prestep(((double *)__pyx_v_self->F_applied->data), ((double *)__pyx_v_self->M_applied->data));
17192 
17193  /* "mbd/CouplingFSI.pyx":782
17194  * self.thisptr.prestep(<double*> self.F_applied.data,
17195  * <double*> self.M_applied.data)
17196  * self.predicted = False # <<<<<<<<<<<<<<
17197  *
17198  * def poststep(self):
17199  */
17200  __pyx_v_self->predicted = 0;
17201 
17202  /* "mbd/CouplingFSI.pyx":723
17203  * self.setExternalForces()
17204  *
17205  * def setExternalForces(self, np.ndarray forces=None, np.ndarray moments=None): # <<<<<<<<<<<<<<
17206  * """Sets external forces to body.
17207  * Called during prestep or can be called manually. If called manually,
17208  */
17209 
17210  /* function exit code */
17211  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
17212  goto __pyx_L0;
17213  __pyx_L1_error:;
17214  __Pyx_XDECREF(__pyx_t_3);
17215  __Pyx_XDECREF(__pyx_t_4);
17216  __Pyx_XDECREF(__pyx_t_5);
17217  __Pyx_XDECREF(__pyx_t_6);
17218  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setExternalForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
17219  __pyx_r = NULL;
17220  __pyx_L0:;
17221  __Pyx_XDECREF((PyObject *)__pyx_v_F_bar);
17222  __Pyx_XDECREF((PyObject *)__pyx_v_M_bar);
17223  __Pyx_XDECREF(__pyx_v_F_body);
17224  __Pyx_XDECREF(__pyx_v_M_body);
17225  __Pyx_XGIVEREF(__pyx_r);
17226  __Pyx_TraceReturn(__pyx_r, 0);
17227  __Pyx_RefNannyFinishContext();
17228  return __pyx_r;
17229 }
17230 
17231 /* "mbd/CouplingFSI.pyx":784
17232  * self.predicted = False
17233  *
17234  * def poststep(self): # <<<<<<<<<<<<<<
17235  * """Called after Chrono system step.
17236  * Records values to csv, broadcast new position and rotation from
17237  */
17238 
17239 /* Python wrapper */
17240 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_61poststep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
17241 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_60poststep[] = "ProtChBody.poststep(self)\nCalled after Chrono system step.\n Records values to csv, broadcast new position and rotation from\n calculating processor to all processors for moving mesh BC.\n ";
17242 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_61poststep = {"poststep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_61poststep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_60poststep};
17243 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_61poststep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
17244  PyObject *__pyx_r = 0;
17245  __Pyx_RefNannyDeclarations
17246  __Pyx_RefNannySetupContext("poststep (wrapper)", 0);
17247  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_60poststep(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
17248 
17249  /* function exit code */
17250  __Pyx_RefNannyFinishContext();
17251  return __pyx_r;
17252 }
17253 
17254 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_60poststep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
17255  PyArrayObject *__pyx_v_new_x = NULL;
17256  PyObject *__pyx_v_new_vec = NULL;
17257  PyObject *__pyx_v_comm = NULL;
17258  ChQuaternion<double> __pyx_v_rotq;
17259  ChQuaternion<double> __pyx_v_rotq_last;
17260  ChVector<double> __pyx_v_pos;
17261  ChVector<double> __pyx_v_pos_last;
17262  double __pyx_v_e0;
17263  double __pyx_v_e1;
17264  double __pyx_v_e2;
17265  double __pyx_v_e3;
17266  double __pyx_v_e0_last;
17267  double __pyx_v_e1_last;
17268  double __pyx_v_e2_last;
17269  double __pyx_v_e3_last;
17270  double __pyx_v_posx;
17271  double __pyx_v_posy;
17272  double __pyx_v_posz;
17273  double __pyx_v_posx_last;
17274  double __pyx_v_posy_last;
17275  double __pyx_v_posz_last;
17276  PyObject *__pyx_v_am = NULL;
17277  PyObject *__pyx_v_flag = NULL;
17278  PyObject *__pyx_r = NULL;
17279  __Pyx_TraceDeclarations
17280  __Pyx_RefNannyDeclarations
17281  int __pyx_t_1;
17282  int __pyx_t_2;
17283  PyObject *__pyx_t_3 = NULL;
17284  PyObject *__pyx_t_4 = NULL;
17285  double __pyx_t_5;
17286  PyObject *__pyx_t_6 = NULL;
17287  PyObject *__pyx_t_7 = NULL;
17288  PyObject *__pyx_t_8 = NULL;
17289  PyObject *__pyx_t_9 = NULL;
17290  int __pyx_t_10;
17291  PyObject *__pyx_t_11 = NULL;
17292  PyObject *(*__pyx_t_12)(PyObject *);
17293  double __pyx_t_13;
17294  double __pyx_t_14;
17295  double __pyx_t_15;
17296  Py_ssize_t __pyx_t_16;
17297  PyObject *(*__pyx_t_17)(PyObject *);
17298  int __pyx_t_18;
17299  int __pyx_lineno = 0;
17300  const char *__pyx_filename = NULL;
17301  int __pyx_clineno = 0;
17302  __Pyx_TraceFrameInit(__pyx_codeobj__58)
17303  __Pyx_RefNannySetupContext("poststep", 0);
17304  __Pyx_TraceCall("poststep", __pyx_f[0], 784, 0, __PYX_ERR(0, 784, __pyx_L1_error));
17305 
17306  /* "mbd/CouplingFSI.pyx":789
17307  * calculating processor to all processors for moving mesh BC.
17308  * """
17309  * if self.prescribed_motion_function is not None: # <<<<<<<<<<<<<<
17310  * new_x = self.callPrescribedMotion(self.ProtChSystem.model.stepController.t_model_last)
17311  * new_vec = chrono.ChVectorD(new_x[0], new_x[1], new_x[2])
17312  */
17313  __pyx_t_1 = (__pyx_v_self->prescribed_motion_function != Py_None);
17314  __pyx_t_2 = (__pyx_t_1 != 0);
17315  if (__pyx_t_2) {
17316 
17317  /* "mbd/CouplingFSI.pyx":790
17318  * """
17319  * if self.prescribed_motion_function is not None:
17320  * new_x = self.callPrescribedMotion(self.ProtChSystem.model.stepController.t_model_last) # <<<<<<<<<<<<<<
17321  * new_vec = chrono.ChVectorD(new_x[0], new_x[1], new_x[2])
17322  * self.ChBody.SetPos(new_vec)
17323  */
17324  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_stepController); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L1_error)
17325  __Pyx_GOTREF(__pyx_t_3);
17326  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_t_model_last); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error)
17327  __Pyx_GOTREF(__pyx_t_4);
17328  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17329  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L1_error)
17330  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17331  __pyx_t_4 = ((PyObject *)((struct __pyx_vtabstruct_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self->__pyx_vtab)->callPrescribedMotion(__pyx_v_self, __pyx_t_5)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L1_error)
17332  __Pyx_GOTREF(__pyx_t_4);
17333  __pyx_v_new_x = ((PyArrayObject *)__pyx_t_4);
17334  __pyx_t_4 = 0;
17335 
17336  /* "mbd/CouplingFSI.pyx":791
17337  * if self.prescribed_motion_function is not None:
17338  * new_x = self.callPrescribedMotion(self.ProtChSystem.model.stepController.t_model_last)
17339  * new_vec = chrono.ChVectorD(new_x[0], new_x[1], new_x[2]) # <<<<<<<<<<<<<<
17340  * self.ChBody.SetPos(new_vec)
17341  * self.thisptr.poststep()
17342  */
17343  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_chrono); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 791, __pyx_L1_error)
17344  __Pyx_GOTREF(__pyx_t_3);
17345  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ChVectorD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
17346  __Pyx_GOTREF(__pyx_t_6);
17347  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17348  __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_new_x), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 791, __pyx_L1_error)
17349  __Pyx_GOTREF(__pyx_t_3);
17350  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_new_x), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 791, __pyx_L1_error)
17351  __Pyx_GOTREF(__pyx_t_7);
17352  __pyx_t_8 = __Pyx_GetItemInt(((PyObject *)__pyx_v_new_x), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 791, __pyx_L1_error)
17353  __Pyx_GOTREF(__pyx_t_8);
17354  __pyx_t_9 = NULL;
17355  __pyx_t_10 = 0;
17356  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
17357  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
17358  if (likely(__pyx_t_9)) {
17359  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17360  __Pyx_INCREF(__pyx_t_9);
17361  __Pyx_INCREF(function);
17362  __Pyx_DECREF_SET(__pyx_t_6, function);
17363  __pyx_t_10 = 1;
17364  }
17365  }
17366  #if CYTHON_FAST_PYCALL
17367  if (PyFunction_Check(__pyx_t_6)) {
17368  PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_3, __pyx_t_7, __pyx_t_8};
17369  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
17370  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17371  __Pyx_GOTREF(__pyx_t_4);
17372  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17373  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17374  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17375  } else
17376  #endif
17377  #if CYTHON_FAST_PYCCALL
17378  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
17379  PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_t_3, __pyx_t_7, __pyx_t_8};
17380  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 3+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
17381  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
17382  __Pyx_GOTREF(__pyx_t_4);
17383  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17384  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17385  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17386  } else
17387  #endif
17388  {
17389  __pyx_t_11 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 791, __pyx_L1_error)
17390  __Pyx_GOTREF(__pyx_t_11);
17391  if (__pyx_t_9) {
17392  __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
17393  }
17394  __Pyx_GIVEREF(__pyx_t_3);
17395  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
17396  __Pyx_GIVEREF(__pyx_t_7);
17397  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_7);
17398  __Pyx_GIVEREF(__pyx_t_8);
17399  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_8);
17400  __pyx_t_3 = 0;
17401  __pyx_t_7 = 0;
17402  __pyx_t_8 = 0;
17403  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
17404  __Pyx_GOTREF(__pyx_t_4);
17405  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17406  }
17407  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17408  __pyx_v_new_vec = __pyx_t_4;
17409  __pyx_t_4 = 0;
17410 
17411  /* "mbd/CouplingFSI.pyx":792
17412  * new_x = self.callPrescribedMotion(self.ProtChSystem.model.stepController.t_model_last)
17413  * new_vec = chrono.ChVectorD(new_x[0], new_x[1], new_x[2])
17414  * self.ChBody.SetPos(new_vec) # <<<<<<<<<<<<<<
17415  * self.thisptr.poststep()
17416  * self.getValues()
17417  */
17418  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetPos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 792, __pyx_L1_error)
17419  __Pyx_GOTREF(__pyx_t_6);
17420  __pyx_t_11 = NULL;
17421  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
17422  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
17423  if (likely(__pyx_t_11)) {
17424  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17425  __Pyx_INCREF(__pyx_t_11);
17426  __Pyx_INCREF(function);
17427  __Pyx_DECREF_SET(__pyx_t_6, function);
17428  }
17429  }
17430  __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_v_new_vec) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_new_vec);
17431  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
17432  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 792, __pyx_L1_error)
17433  __Pyx_GOTREF(__pyx_t_4);
17434  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17435  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17436 
17437  /* "mbd/CouplingFSI.pyx":789
17438  * calculating processor to all processors for moving mesh BC.
17439  * """
17440  * if self.prescribed_motion_function is not None: # <<<<<<<<<<<<<<
17441  * new_x = self.callPrescribedMotion(self.ProtChSystem.model.stepController.t_model_last)
17442  * new_vec = chrono.ChVectorD(new_x[0], new_x[1], new_x[2])
17443  */
17444  }
17445 
17446  /* "mbd/CouplingFSI.pyx":793
17447  * new_vec = chrono.ChVectorD(new_x[0], new_x[1], new_x[2])
17448  * self.ChBody.SetPos(new_vec)
17449  * self.thisptr.poststep() # <<<<<<<<<<<<<<
17450  * self.getValues()
17451  * comm = Comm.get().comm.tompi4py()
17452  */
17453  __pyx_v_self->thisptr->poststep();
17454 
17455  /* "mbd/CouplingFSI.pyx":794
17456  * self.ChBody.SetPos(new_vec)
17457  * self.thisptr.poststep()
17458  * self.getValues() # <<<<<<<<<<<<<<
17459  * comm = Comm.get().comm.tompi4py()
17460  * cdef ch.ChQuaternion rotq
17461  */
17462  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getValues); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 794, __pyx_L1_error)
17463  __Pyx_GOTREF(__pyx_t_6);
17464  __pyx_t_11 = NULL;
17465  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
17466  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
17467  if (likely(__pyx_t_11)) {
17468  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17469  __Pyx_INCREF(__pyx_t_11);
17470  __Pyx_INCREF(function);
17471  __Pyx_DECREF_SET(__pyx_t_6, function);
17472  }
17473  }
17474  __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
17475  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
17476  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 794, __pyx_L1_error)
17477  __Pyx_GOTREF(__pyx_t_4);
17478  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17479  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17480 
17481  /* "mbd/CouplingFSI.pyx":795
17482  * self.thisptr.poststep()
17483  * self.getValues()
17484  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
17485  * cdef ch.ChQuaternion rotq
17486  * cdef ch.ChQuaternion rotq_last
17487  */
17488  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_Comm); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 795, __pyx_L1_error)
17489  __Pyx_GOTREF(__pyx_t_11);
17490  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_get); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 795, __pyx_L1_error)
17491  __Pyx_GOTREF(__pyx_t_8);
17492  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17493  __pyx_t_11 = NULL;
17494  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
17495  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
17496  if (likely(__pyx_t_11)) {
17497  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
17498  __Pyx_INCREF(__pyx_t_11);
17499  __Pyx_INCREF(function);
17500  __Pyx_DECREF_SET(__pyx_t_8, function);
17501  }
17502  }
17503  __pyx_t_6 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
17504  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
17505  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
17506  __Pyx_GOTREF(__pyx_t_6);
17507  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17508  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_comm); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 795, __pyx_L1_error)
17509  __Pyx_GOTREF(__pyx_t_8);
17510  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17511  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 795, __pyx_L1_error)
17512  __Pyx_GOTREF(__pyx_t_6);
17513  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17514  __pyx_t_8 = NULL;
17515  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
17516  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
17517  if (likely(__pyx_t_8)) {
17518  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
17519  __Pyx_INCREF(__pyx_t_8);
17520  __Pyx_INCREF(function);
17521  __Pyx_DECREF_SET(__pyx_t_6, function);
17522  }
17523  }
17524  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
17525  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17526  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 795, __pyx_L1_error)
17527  __Pyx_GOTREF(__pyx_t_4);
17528  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17529  __pyx_v_comm = __pyx_t_4;
17530  __pyx_t_4 = 0;
17531 
17532  /* "mbd/CouplingFSI.pyx":802
17533  * cdef double e0, e1, e2, e3, e0_last, e1_last, e2_last, e3_last
17534  * cdef double posx, posy, posz, posx_last, posy_last, posz_last
17535  * if comm.rank == 0 and self.ProtChSystem.record_values is True: # <<<<<<<<<<<<<<
17536  * self._recordValues()
17537  * if self.thisptr.has_trimesh:
17538  */
17539  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error)
17540  __Pyx_GOTREF(__pyx_t_4);
17541  __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_4, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
17542  __Pyx_GOTREF(__pyx_t_6);
17543  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17544  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 802, __pyx_L1_error)
17545  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17546  if (__pyx_t_1) {
17547  } else {
17548  __pyx_t_2 = __pyx_t_1;
17549  goto __pyx_L5_bool_binop_done;
17550  }
17551  __pyx_t_1 = ((__pyx_v_self->ProtChSystem->record_values == 1) != 0);
17552  __pyx_t_2 = __pyx_t_1;
17553  __pyx_L5_bool_binop_done:;
17554  if (__pyx_t_2) {
17555 
17556  /* "mbd/CouplingFSI.pyx":803
17557  * cdef double posx, posy, posz, posx_last, posy_last, posz_last
17558  * if comm.rank == 0 and self.ProtChSystem.record_values is True:
17559  * self._recordValues() # <<<<<<<<<<<<<<
17560  * if self.thisptr.has_trimesh:
17561  * self._recordH5()
17562  */
17563  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_recordValues); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 803, __pyx_L1_error)
17564  __Pyx_GOTREF(__pyx_t_4);
17565  __pyx_t_8 = NULL;
17566  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
17567  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
17568  if (likely(__pyx_t_8)) {
17569  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
17570  __Pyx_INCREF(__pyx_t_8);
17571  __Pyx_INCREF(function);
17572  __Pyx_DECREF_SET(__pyx_t_4, function);
17573  }
17574  }
17575  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
17576  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17577  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 803, __pyx_L1_error)
17578  __Pyx_GOTREF(__pyx_t_6);
17579  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17580  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17581 
17582  /* "mbd/CouplingFSI.pyx":804
17583  * if comm.rank == 0 and self.ProtChSystem.record_values is True:
17584  * self._recordValues()
17585  * if self.thisptr.has_trimesh: # <<<<<<<<<<<<<<
17586  * self._recordH5()
17587  * self._recordXML()
17588  */
17589  __pyx_t_2 = (__pyx_v_self->thisptr->has_trimesh != 0);
17590  if (__pyx_t_2) {
17591 
17592  /* "mbd/CouplingFSI.pyx":805
17593  * self._recordValues()
17594  * if self.thisptr.has_trimesh:
17595  * self._recordH5() # <<<<<<<<<<<<<<
17596  * self._recordXML()
17597  * # need to pass position and rotation values to C++ side
17598  */
17599  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_recordH5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 805, __pyx_L1_error)
17600  __Pyx_GOTREF(__pyx_t_4);
17601  __pyx_t_8 = NULL;
17602  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
17603  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
17604  if (likely(__pyx_t_8)) {
17605  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
17606  __Pyx_INCREF(__pyx_t_8);
17607  __Pyx_INCREF(function);
17608  __Pyx_DECREF_SET(__pyx_t_4, function);
17609  }
17610  }
17611  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
17612  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17613  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 805, __pyx_L1_error)
17614  __Pyx_GOTREF(__pyx_t_6);
17615  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17616  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17617 
17618  /* "mbd/CouplingFSI.pyx":806
17619  * if self.thisptr.has_trimesh:
17620  * self._recordH5()
17621  * self._recordXML() # <<<<<<<<<<<<<<
17622  * # need to pass position and rotation values to C++ side
17623  * # needed for transformations when calling hx, hy, hz, hxyz
17624  */
17625  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_recordXML); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 806, __pyx_L1_error)
17626  __Pyx_GOTREF(__pyx_t_4);
17627  __pyx_t_8 = NULL;
17628  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
17629  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
17630  if (likely(__pyx_t_8)) {
17631  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
17632  __Pyx_INCREF(__pyx_t_8);
17633  __Pyx_INCREF(function);
17634  __Pyx_DECREF_SET(__pyx_t_4, function);
17635  }
17636  }
17637  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
17638  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
17639  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 806, __pyx_L1_error)
17640  __Pyx_GOTREF(__pyx_t_6);
17641  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17642  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17643 
17644  /* "mbd/CouplingFSI.pyx":804
17645  * if comm.rank == 0 and self.ProtChSystem.record_values is True:
17646  * self._recordValues()
17647  * if self.thisptr.has_trimesh: # <<<<<<<<<<<<<<
17648  * self._recordH5()
17649  * self._recordXML()
17650  */
17651  }
17652 
17653  /* "mbd/CouplingFSI.pyx":802
17654  * cdef double e0, e1, e2, e3, e0_last, e1_last, e2_last, e3_last
17655  * cdef double posx, posy, posz, posx_last, posy_last, posz_last
17656  * if comm.rank == 0 and self.ProtChSystem.record_values is True: # <<<<<<<<<<<<<<
17657  * self._recordValues()
17658  * if self.thisptr.has_trimesh:
17659  */
17660  }
17661 
17662  /* "mbd/CouplingFSI.pyx":809
17663  * # need to pass position and rotation values to C++ side
17664  * # needed for transformations when calling hx, hy, hz, hxyz
17665  * e0, e1, e2, e3 = self.rotq # <<<<<<<<<<<<<<
17666  * e0_last, e1_last, e2_last, e3_last = self.rotq_last
17667  * posx, posy, posz = self.position
17668  */
17669  __pyx_t_6 = ((PyObject *)__pyx_v_self->rotq);
17670  __Pyx_INCREF(__pyx_t_6);
17671  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
17672  PyObject* sequence = __pyx_t_6;
17673  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17674  if (unlikely(size != 4)) {
17675  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
17676  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17677  __PYX_ERR(0, 809, __pyx_L1_error)
17678  }
17679  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17680  if (likely(PyTuple_CheckExact(sequence))) {
17681  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
17682  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
17683  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2);
17684  __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3);
17685  } else {
17686  __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
17687  __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
17688  __pyx_t_11 = PyList_GET_ITEM(sequence, 2);
17689  __pyx_t_7 = PyList_GET_ITEM(sequence, 3);
17690  }
17691  __Pyx_INCREF(__pyx_t_4);
17692  __Pyx_INCREF(__pyx_t_8);
17693  __Pyx_INCREF(__pyx_t_11);
17694  __Pyx_INCREF(__pyx_t_7);
17695  #else
17696  {
17697  Py_ssize_t i;
17698  PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_8,&__pyx_t_11,&__pyx_t_7};
17699  for (i=0; i < 4; i++) {
17700  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 809, __pyx_L1_error)
17701  __Pyx_GOTREF(item);
17702  *(temps[i]) = item;
17703  }
17704  }
17705  #endif
17706  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17707  } else {
17708  Py_ssize_t index = -1;
17709  PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_8,&__pyx_t_11,&__pyx_t_7};
17710  __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error)
17711  __Pyx_GOTREF(__pyx_t_3);
17712  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17713  __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext;
17714  for (index=0; index < 4; index++) {
17715  PyObject* item = __pyx_t_12(__pyx_t_3); if (unlikely(!item)) goto __pyx_L8_unpacking_failed;
17716  __Pyx_GOTREF(item);
17717  *(temps[index]) = item;
17718  }
17719  if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_3), 4) < 0) __PYX_ERR(0, 809, __pyx_L1_error)
17720  __pyx_t_12 = NULL;
17721  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17722  goto __pyx_L9_unpacking_done;
17723  __pyx_L8_unpacking_failed:;
17724  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17725  __pyx_t_12 = NULL;
17726  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17727  __PYX_ERR(0, 809, __pyx_L1_error)
17728  __pyx_L9_unpacking_done:;
17729  }
17730  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
17731  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17732  __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
17733  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17734  __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
17735  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17736  __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
17737  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17738  __pyx_v_e0 = __pyx_t_5;
17739  __pyx_v_e1 = __pyx_t_13;
17740  __pyx_v_e2 = __pyx_t_14;
17741  __pyx_v_e3 = __pyx_t_15;
17742 
17743  /* "mbd/CouplingFSI.pyx":810
17744  * # needed for transformations when calling hx, hy, hz, hxyz
17745  * e0, e1, e2, e3 = self.rotq
17746  * e0_last, e1_last, e2_last, e3_last = self.rotq_last # <<<<<<<<<<<<<<
17747  * posx, posy, posz = self.position
17748  * posx_last, posy_last, posz_last = self.position_last
17749  */
17750  __pyx_t_6 = ((PyObject *)__pyx_v_self->rotq_last);
17751  __Pyx_INCREF(__pyx_t_6);
17752  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
17753  PyObject* sequence = __pyx_t_6;
17754  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17755  if (unlikely(size != 4)) {
17756  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
17757  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17758  __PYX_ERR(0, 810, __pyx_L1_error)
17759  }
17760  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17761  if (likely(PyTuple_CheckExact(sequence))) {
17762  __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
17763  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1);
17764  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
17765  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3);
17766  } else {
17767  __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
17768  __pyx_t_11 = PyList_GET_ITEM(sequence, 1);
17769  __pyx_t_8 = PyList_GET_ITEM(sequence, 2);
17770  __pyx_t_4 = PyList_GET_ITEM(sequence, 3);
17771  }
17772  __Pyx_INCREF(__pyx_t_7);
17773  __Pyx_INCREF(__pyx_t_11);
17774  __Pyx_INCREF(__pyx_t_8);
17775  __Pyx_INCREF(__pyx_t_4);
17776  #else
17777  {
17778  Py_ssize_t i;
17779  PyObject** temps[4] = {&__pyx_t_7,&__pyx_t_11,&__pyx_t_8,&__pyx_t_4};
17780  for (i=0; i < 4; i++) {
17781  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 810, __pyx_L1_error)
17782  __Pyx_GOTREF(item);
17783  *(temps[i]) = item;
17784  }
17785  }
17786  #endif
17787  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17788  } else {
17789  Py_ssize_t index = -1;
17790  PyObject** temps[4] = {&__pyx_t_7,&__pyx_t_11,&__pyx_t_8,&__pyx_t_4};
17791  __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 810, __pyx_L1_error)
17792  __Pyx_GOTREF(__pyx_t_3);
17793  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17794  __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext;
17795  for (index=0; index < 4; index++) {
17796  PyObject* item = __pyx_t_12(__pyx_t_3); if (unlikely(!item)) goto __pyx_L10_unpacking_failed;
17797  __Pyx_GOTREF(item);
17798  *(temps[index]) = item;
17799  }
17800  if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_3), 4) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
17801  __pyx_t_12 = NULL;
17802  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17803  goto __pyx_L11_unpacking_done;
17804  __pyx_L10_unpacking_failed:;
17805  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
17806  __pyx_t_12 = NULL;
17807  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17808  __PYX_ERR(0, 810, __pyx_L1_error)
17809  __pyx_L11_unpacking_done:;
17810  }
17811  __pyx_t_15 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_15 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error)
17812  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17813  __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error)
17814  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17815  __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error)
17816  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17817  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error)
17818  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17819  __pyx_v_e0_last = __pyx_t_15;
17820  __pyx_v_e1_last = __pyx_t_14;
17821  __pyx_v_e2_last = __pyx_t_13;
17822  __pyx_v_e3_last = __pyx_t_5;
17823 
17824  /* "mbd/CouplingFSI.pyx":811
17825  * e0, e1, e2, e3 = self.rotq
17826  * e0_last, e1_last, e2_last, e3_last = self.rotq_last
17827  * posx, posy, posz = self.position # <<<<<<<<<<<<<<
17828  * posx_last, posy_last, posz_last = self.position_last
17829  * pos = ch.ChVector[double](posx, posy, posz)
17830  */
17831  __pyx_t_6 = ((PyObject *)__pyx_v_self->position);
17832  __Pyx_INCREF(__pyx_t_6);
17833  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
17834  PyObject* sequence = __pyx_t_6;
17835  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17836  if (unlikely(size != 3)) {
17837  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
17838  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17839  __PYX_ERR(0, 811, __pyx_L1_error)
17840  }
17841  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17842  if (likely(PyTuple_CheckExact(sequence))) {
17843  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
17844  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
17845  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2);
17846  } else {
17847  __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
17848  __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
17849  __pyx_t_11 = PyList_GET_ITEM(sequence, 2);
17850  }
17851  __Pyx_INCREF(__pyx_t_4);
17852  __Pyx_INCREF(__pyx_t_8);
17853  __Pyx_INCREF(__pyx_t_11);
17854  #else
17855  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 811, __pyx_L1_error)
17856  __Pyx_GOTREF(__pyx_t_4);
17857  __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 811, __pyx_L1_error)
17858  __Pyx_GOTREF(__pyx_t_8);
17859  __pyx_t_11 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 811, __pyx_L1_error)
17860  __Pyx_GOTREF(__pyx_t_11);
17861  #endif
17862  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17863  } else {
17864  Py_ssize_t index = -1;
17865  __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 811, __pyx_L1_error)
17866  __Pyx_GOTREF(__pyx_t_7);
17867  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17868  __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext;
17869  index = 0; __pyx_t_4 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L12_unpacking_failed;
17870  __Pyx_GOTREF(__pyx_t_4);
17871  index = 1; __pyx_t_8 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed;
17872  __Pyx_GOTREF(__pyx_t_8);
17873  index = 2; __pyx_t_11 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_11)) goto __pyx_L12_unpacking_failed;
17874  __Pyx_GOTREF(__pyx_t_11);
17875  if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_7), 3) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
17876  __pyx_t_12 = NULL;
17877  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17878  goto __pyx_L13_unpacking_done;
17879  __pyx_L12_unpacking_failed:;
17880  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17881  __pyx_t_12 = NULL;
17882  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17883  __PYX_ERR(0, 811, __pyx_L1_error)
17884  __pyx_L13_unpacking_done:;
17885  }
17886  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L1_error)
17887  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17888  __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L1_error)
17889  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17890  __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L1_error)
17891  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17892  __pyx_v_posx = __pyx_t_5;
17893  __pyx_v_posy = __pyx_t_13;
17894  __pyx_v_posz = __pyx_t_14;
17895 
17896  /* "mbd/CouplingFSI.pyx":812
17897  * e0_last, e1_last, e2_last, e3_last = self.rotq_last
17898  * posx, posy, posz = self.position
17899  * posx_last, posy_last, posz_last = self.position_last # <<<<<<<<<<<<<<
17900  * pos = ch.ChVector[double](posx, posy, posz)
17901  * pos_last = ch.ChVector[double](posx_last, posy_last, posz_last)
17902  */
17903  __pyx_t_6 = ((PyObject *)__pyx_v_self->position_last);
17904  __Pyx_INCREF(__pyx_t_6);
17905  if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
17906  PyObject* sequence = __pyx_t_6;
17907  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
17908  if (unlikely(size != 3)) {
17909  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
17910  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
17911  __PYX_ERR(0, 812, __pyx_L1_error)
17912  }
17913  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
17914  if (likely(PyTuple_CheckExact(sequence))) {
17915  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0);
17916  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
17917  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2);
17918  } else {
17919  __pyx_t_11 = PyList_GET_ITEM(sequence, 0);
17920  __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
17921  __pyx_t_4 = PyList_GET_ITEM(sequence, 2);
17922  }
17923  __Pyx_INCREF(__pyx_t_11);
17924  __Pyx_INCREF(__pyx_t_8);
17925  __Pyx_INCREF(__pyx_t_4);
17926  #else
17927  __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 812, __pyx_L1_error)
17928  __Pyx_GOTREF(__pyx_t_11);
17929  __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 812, __pyx_L1_error)
17930  __Pyx_GOTREF(__pyx_t_8);
17931  __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 812, __pyx_L1_error)
17932  __Pyx_GOTREF(__pyx_t_4);
17933  #endif
17934  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17935  } else {
17936  Py_ssize_t index = -1;
17937  __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 812, __pyx_L1_error)
17938  __Pyx_GOTREF(__pyx_t_7);
17939  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
17940  __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext;
17941  index = 0; __pyx_t_11 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_11)) goto __pyx_L14_unpacking_failed;
17942  __Pyx_GOTREF(__pyx_t_11);
17943  index = 1; __pyx_t_8 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L14_unpacking_failed;
17944  __Pyx_GOTREF(__pyx_t_8);
17945  index = 2; __pyx_t_4 = __pyx_t_12(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L14_unpacking_failed;
17946  __Pyx_GOTREF(__pyx_t_4);
17947  if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_7), 3) < 0) __PYX_ERR(0, 812, __pyx_L1_error)
17948  __pyx_t_12 = NULL;
17949  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17950  goto __pyx_L15_unpacking_done;
17951  __pyx_L14_unpacking_failed:;
17952  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
17953  __pyx_t_12 = NULL;
17954  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
17955  __PYX_ERR(0, 812, __pyx_L1_error)
17956  __pyx_L15_unpacking_done:;
17957  }
17958  __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_11); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L1_error)
17959  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
17960  __pyx_t_13 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_13 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L1_error)
17961  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
17962  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L1_error)
17963  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
17964  __pyx_v_posx_last = __pyx_t_14;
17965  __pyx_v_posy_last = __pyx_t_13;
17966  __pyx_v_posz_last = __pyx_t_5;
17967 
17968  /* "mbd/CouplingFSI.pyx":813
17969  * posx, posy, posz = self.position
17970  * posx_last, posy_last, posz_last = self.position_last
17971  * pos = ch.ChVector[double](posx, posy, posz) # <<<<<<<<<<<<<<
17972  * pos_last = ch.ChVector[double](posx_last, posy_last, posz_last)
17973  * rotq = ch.ChQuaternion[double](e0, e1, e2, e3)
17974  */
17975  __pyx_v_pos = ((ChVector<double> )ChVector<double> (__pyx_v_posx, __pyx_v_posy, __pyx_v_posz));
17976 
17977  /* "mbd/CouplingFSI.pyx":814
17978  * posx_last, posy_last, posz_last = self.position_last
17979  * pos = ch.ChVector[double](posx, posy, posz)
17980  * pos_last = ch.ChVector[double](posx_last, posy_last, posz_last) # <<<<<<<<<<<<<<
17981  * rotq = ch.ChQuaternion[double](e0, e1, e2, e3)
17982  * rotq_last = ch.ChQuaternion[double](e0_last, e1_last, e2_last, e3_last)
17983  */
17984  __pyx_v_pos_last = ((ChVector<double> )ChVector<double> (__pyx_v_posx_last, __pyx_v_posy_last, __pyx_v_posz_last));
17985 
17986  /* "mbd/CouplingFSI.pyx":815
17987  * pos = ch.ChVector[double](posx, posy, posz)
17988  * pos_last = ch.ChVector[double](posx_last, posy_last, posz_last)
17989  * rotq = ch.ChQuaternion[double](e0, e1, e2, e3) # <<<<<<<<<<<<<<
17990  * rotq_last = ch.ChQuaternion[double](e0_last, e1_last, e2_last, e3_last)
17991  * self.thisptr.rotq = rotq
17992  */
17993  __pyx_v_rotq = ((ChQuaternion<double> )ChQuaternion<double> (__pyx_v_e0, __pyx_v_e1, __pyx_v_e2, __pyx_v_e3));
17994 
17995  /* "mbd/CouplingFSI.pyx":816
17996  * pos_last = ch.ChVector[double](posx_last, posy_last, posz_last)
17997  * rotq = ch.ChQuaternion[double](e0, e1, e2, e3)
17998  * rotq_last = ch.ChQuaternion[double](e0_last, e1_last, e2_last, e3_last) # <<<<<<<<<<<<<<
17999  * self.thisptr.rotq = rotq
18000  * self.thisptr.rotq_last = rotq_last
18001  */
18002  __pyx_v_rotq_last = ((ChQuaternion<double> )ChQuaternion<double> (__pyx_v_e0_last, __pyx_v_e1_last, __pyx_v_e2_last, __pyx_v_e3_last));
18003 
18004  /* "mbd/CouplingFSI.pyx":817
18005  * rotq = ch.ChQuaternion[double](e0, e1, e2, e3)
18006  * rotq_last = ch.ChQuaternion[double](e0_last, e1_last, e2_last, e3_last)
18007  * self.thisptr.rotq = rotq # <<<<<<<<<<<<<<
18008  * self.thisptr.rotq_last = rotq_last
18009  * self.thisptr.pos = pos
18010  */
18011  __pyx_v_self->thisptr->rotq = __pyx_v_rotq;
18012 
18013  /* "mbd/CouplingFSI.pyx":818
18014  * rotq_last = ch.ChQuaternion[double](e0_last, e1_last, e2_last, e3_last)
18015  * self.thisptr.rotq = rotq
18016  * self.thisptr.rotq_last = rotq_last # <<<<<<<<<<<<<<
18017  * self.thisptr.pos = pos
18018  * self.thisptr.pos_last = pos_last
18019  */
18020  __pyx_v_self->thisptr->rotq_last = __pyx_v_rotq_last;
18021 
18022  /* "mbd/CouplingFSI.pyx":819
18023  * self.thisptr.rotq = rotq
18024  * self.thisptr.rotq_last = rotq_last
18025  * self.thisptr.pos = pos # <<<<<<<<<<<<<<
18026  * self.thisptr.pos_last = pos_last
18027  * if self.ProtChSystem.model_addedmass is not None:
18028  */
18029  __pyx_v_self->thisptr->pos = __pyx_v_pos;
18030 
18031  /* "mbd/CouplingFSI.pyx":820
18032  * self.thisptr.rotq_last = rotq_last
18033  * self.thisptr.pos = pos
18034  * self.thisptr.pos_last = pos_last # <<<<<<<<<<<<<<
18035  * if self.ProtChSystem.model_addedmass is not None:
18036  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
18037  */
18038  __pyx_v_self->thisptr->pos_last = __pyx_v_pos_last;
18039 
18040  /* "mbd/CouplingFSI.pyx":821
18041  * self.thisptr.pos = pos
18042  * self.thisptr.pos_last = pos_last
18043  * if self.ProtChSystem.model_addedmass is not None: # <<<<<<<<<<<<<<
18044  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
18045  * for flag in self.boundaryFlags:
18046  */
18047  __pyx_t_2 = (__pyx_v_self->ProtChSystem->model_addedmass != Py_None);
18048  __pyx_t_1 = (__pyx_t_2 != 0);
18049  if (__pyx_t_1) {
18050 
18051  /* "mbd/CouplingFSI.pyx":822
18052  * self.thisptr.pos_last = pos_last
18053  * if self.ProtChSystem.model_addedmass is not None:
18054  * am = self.ProtChSystem.model_addedmass.levelModelList[-1] # <<<<<<<<<<<<<<
18055  * for flag in self.boundaryFlags:
18056  * am.barycenters[flag] = pyvec2array(self.ChBody.GetPos())
18057  */
18058  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model_addedmass, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error)
18059  __Pyx_GOTREF(__pyx_t_6);
18060  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
18061  __Pyx_GOTREF(__pyx_t_4);
18062  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18063  __pyx_v_am = __pyx_t_4;
18064  __pyx_t_4 = 0;
18065 
18066  /* "mbd/CouplingFSI.pyx":823
18067  * if self.ProtChSystem.model_addedmass is not None:
18068  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
18069  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
18070  * am.barycenters[flag] = pyvec2array(self.ChBody.GetPos())
18071  * if self.useIBM and self.ProtChSystem.model is not None:
18072  */
18073  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self->boundaryFlags))) {
18074  __pyx_t_4 = ((PyObject *)__pyx_v_self->boundaryFlags); __Pyx_INCREF(__pyx_t_4); __pyx_t_16 = 0;
18075  __pyx_t_17 = NULL;
18076  } else {
18077  __pyx_t_16 = -1; __pyx_t_4 = PyObject_GetIter(((PyObject *)__pyx_v_self->boundaryFlags)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
18078  __Pyx_GOTREF(__pyx_t_4);
18079  __pyx_t_17 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 823, __pyx_L1_error)
18080  }
18081  for (;;) {
18082  if (likely(!__pyx_t_17)) {
18083  if (likely(PyList_CheckExact(__pyx_t_4))) {
18084  if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_4)) break;
18085  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18086  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 823, __pyx_L1_error)
18087  #else
18088  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error)
18089  __Pyx_GOTREF(__pyx_t_6);
18090  #endif
18091  } else {
18092  if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
18093  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18094  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 823, __pyx_L1_error)
18095  #else
18096  __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L1_error)
18097  __Pyx_GOTREF(__pyx_t_6);
18098  #endif
18099  }
18100  } else {
18101  __pyx_t_6 = __pyx_t_17(__pyx_t_4);
18102  if (unlikely(!__pyx_t_6)) {
18103  PyObject* exc_type = PyErr_Occurred();
18104  if (exc_type) {
18105  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18106  else __PYX_ERR(0, 823, __pyx_L1_error)
18107  }
18108  break;
18109  }
18110  __Pyx_GOTREF(__pyx_t_6);
18111  }
18112  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_6);
18113  __pyx_t_6 = 0;
18114 
18115  /* "mbd/CouplingFSI.pyx":824
18116  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
18117  * for flag in self.boundaryFlags:
18118  * am.barycenters[flag] = pyvec2array(self.ChBody.GetPos()) # <<<<<<<<<<<<<<
18119  * if self.useIBM and self.ProtChSystem.model is not None:
18120  * self.updateIBM()
18121  */
18122  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 824, __pyx_L1_error)
18123  __Pyx_GOTREF(__pyx_t_8);
18124  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 824, __pyx_L1_error)
18125  __Pyx_GOTREF(__pyx_t_7);
18126  __pyx_t_3 = NULL;
18127  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
18128  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
18129  if (likely(__pyx_t_3)) {
18130  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
18131  __Pyx_INCREF(__pyx_t_3);
18132  __Pyx_INCREF(function);
18133  __Pyx_DECREF_SET(__pyx_t_7, function);
18134  }
18135  }
18136  __pyx_t_11 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
18137  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18138  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 824, __pyx_L1_error)
18139  __Pyx_GOTREF(__pyx_t_11);
18140  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18141  __pyx_t_7 = NULL;
18142  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
18143  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
18144  if (likely(__pyx_t_7)) {
18145  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
18146  __Pyx_INCREF(__pyx_t_7);
18147  __Pyx_INCREF(function);
18148  __Pyx_DECREF_SET(__pyx_t_8, function);
18149  }
18150  }
18151  __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_11);
18152  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
18153  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
18154  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 824, __pyx_L1_error)
18155  __Pyx_GOTREF(__pyx_t_6);
18156  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18157  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_am, __pyx_n_s_barycenters); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 824, __pyx_L1_error)
18158  __Pyx_GOTREF(__pyx_t_8);
18159  if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_flag, __pyx_t_6) < 0)) __PYX_ERR(0, 824, __pyx_L1_error)
18160  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18161  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18162 
18163  /* "mbd/CouplingFSI.pyx":823
18164  * if self.ProtChSystem.model_addedmass is not None:
18165  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
18166  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
18167  * am.barycenters[flag] = pyvec2array(self.ChBody.GetPos())
18168  * if self.useIBM and self.ProtChSystem.model is not None:
18169  */
18170  }
18171  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18172 
18173  /* "mbd/CouplingFSI.pyx":821
18174  * self.thisptr.pos = pos
18175  * self.thisptr.pos_last = pos_last
18176  * if self.ProtChSystem.model_addedmass is not None: # <<<<<<<<<<<<<<
18177  * am = self.ProtChSystem.model_addedmass.levelModelList[-1]
18178  * for flag in self.boundaryFlags:
18179  */
18180  }
18181 
18182  /* "mbd/CouplingFSI.pyx":825
18183  * for flag in self.boundaryFlags:
18184  * am.barycenters[flag] = pyvec2array(self.ChBody.GetPos())
18185  * if self.useIBM and self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
18186  * self.updateIBM()
18187  *
18188  */
18189  __pyx_t_2 = (__pyx_v_self->useIBM != 0);
18190  if (__pyx_t_2) {
18191  } else {
18192  __pyx_t_1 = __pyx_t_2;
18193  goto __pyx_L20_bool_binop_done;
18194  }
18195  __pyx_t_2 = (__pyx_v_self->ProtChSystem->model != Py_None);
18196  __pyx_t_18 = (__pyx_t_2 != 0);
18197  __pyx_t_1 = __pyx_t_18;
18198  __pyx_L20_bool_binop_done:;
18199  if (__pyx_t_1) {
18200 
18201  /* "mbd/CouplingFSI.pyx":826
18202  * am.barycenters[flag] = pyvec2array(self.ChBody.GetPos())
18203  * if self.useIBM and self.ProtChSystem.model is not None:
18204  * self.updateIBM() # <<<<<<<<<<<<<<
18205  *
18206  * def updateIBM(self):
18207  */
18208  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_updateIBM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L1_error)
18209  __Pyx_GOTREF(__pyx_t_6);
18210  __pyx_t_8 = NULL;
18211  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
18212  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
18213  if (likely(__pyx_t_8)) {
18214  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
18215  __Pyx_INCREF(__pyx_t_8);
18216  __Pyx_INCREF(function);
18217  __Pyx_DECREF_SET(__pyx_t_6, function);
18218  }
18219  }
18220  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
18221  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
18222  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
18223  __Pyx_GOTREF(__pyx_t_4);
18224  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
18225  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18226 
18227  /* "mbd/CouplingFSI.pyx":825
18228  * for flag in self.boundaryFlags:
18229  * am.barycenters[flag] = pyvec2array(self.ChBody.GetPos())
18230  * if self.useIBM and self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
18231  * self.updateIBM()
18232  *
18233  */
18234  }
18235 
18236  /* "mbd/CouplingFSI.pyx":784
18237  * self.predicted = False
18238  *
18239  * def poststep(self): # <<<<<<<<<<<<<<
18240  * """Called after Chrono system step.
18241  * Records values to csv, broadcast new position and rotation from
18242  */
18243 
18244  /* function exit code */
18245  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18246  goto __pyx_L0;
18247  __pyx_L1_error:;
18248  __Pyx_XDECREF(__pyx_t_3);
18249  __Pyx_XDECREF(__pyx_t_4);
18250  __Pyx_XDECREF(__pyx_t_6);
18251  __Pyx_XDECREF(__pyx_t_7);
18252  __Pyx_XDECREF(__pyx_t_8);
18253  __Pyx_XDECREF(__pyx_t_9);
18254  __Pyx_XDECREF(__pyx_t_11);
18255  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.poststep", __pyx_clineno, __pyx_lineno, __pyx_filename);
18256  __pyx_r = NULL;
18257  __pyx_L0:;
18258  __Pyx_XDECREF((PyObject *)__pyx_v_new_x);
18259  __Pyx_XDECREF(__pyx_v_new_vec);
18260  __Pyx_XDECREF(__pyx_v_comm);
18261  __Pyx_XDECREF(__pyx_v_am);
18262  __Pyx_XDECREF(__pyx_v_flag);
18263  __Pyx_XGIVEREF(__pyx_r);
18264  __Pyx_TraceReturn(__pyx_r, 0);
18265  __Pyx_RefNannyFinishContext();
18266  return __pyx_r;
18267 }
18268 
18269 /* "mbd/CouplingFSI.pyx":828
18270  * self.updateIBM()
18271  *
18272  * def updateIBM(self): # <<<<<<<<<<<<<<
18273  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
18274  * if c.use_ball_as_particle:
18275  */
18276 
18277 /* Python wrapper */
18278 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_63updateIBM(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
18279 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_62updateIBM[] = "ProtChBody.updateIBM(self)";
18280 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_63updateIBM = {"updateIBM", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_63updateIBM, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_62updateIBM};
18281 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_63updateIBM(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
18282  PyObject *__pyx_r = 0;
18283  __Pyx_RefNannyDeclarations
18284  __Pyx_RefNannySetupContext("updateIBM (wrapper)", 0);
18285  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_62updateIBM(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
18286 
18287  /* function exit code */
18288  __Pyx_RefNannyFinishContext();
18289  return __pyx_r;
18290 }
18291 
18292 /* "mbd/CouplingFSI.pyx":848
18293  * for flag in self.boundaryFlags:
18294  * c.particle_sdfList[flag] = self.getDynamicSDF
18295  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity() # <<<<<<<<<<<<<<
18296  *
18297  * def getDynamicSDF(self, t, x):
18298  */
18299 
18300 /* Python wrapper */
18301 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9updateIBM_lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18302 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_9updateIBM_lambda = {"lambda", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9updateIBM_lambda, METH_VARARGS|METH_KEYWORDS, 0};
18303 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9updateIBM_lambda(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18304  CYTHON_UNUSED PyObject *__pyx_v_x = 0;
18305  CYTHON_UNUSED PyObject *__pyx_v_t = 0;
18306  int __pyx_lineno = 0;
18307  const char *__pyx_filename = NULL;
18308  int __pyx_clineno = 0;
18309  PyObject *__pyx_r = 0;
18310  __Pyx_RefNannyDeclarations
18311  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
18312  {
18313  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_t,0};
18314  PyObject* values[2] = {0,0};
18315  if (unlikely(__pyx_kwds)) {
18316  Py_ssize_t kw_args;
18317  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18318  switch (pos_args) {
18319  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18320  CYTHON_FALLTHROUGH;
18321  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18322  CYTHON_FALLTHROUGH;
18323  case 0: break;
18324  default: goto __pyx_L5_argtuple_error;
18325  }
18326  kw_args = PyDict_Size(__pyx_kwds);
18327  switch (pos_args) {
18328  case 0:
18329  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
18330  else goto __pyx_L5_argtuple_error;
18331  CYTHON_FALLTHROUGH;
18332  case 1:
18333  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
18334  else {
18335  __Pyx_RaiseArgtupleInvalid("lambda", 1, 2, 2, 1); __PYX_ERR(0, 848, __pyx_L3_error)
18336  }
18337  }
18338  if (unlikely(kw_args > 0)) {
18339  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda") < 0)) __PYX_ERR(0, 848, __pyx_L3_error)
18340  }
18341  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18342  goto __pyx_L5_argtuple_error;
18343  } else {
18344  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18345  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18346  }
18347  __pyx_v_x = values[0];
18348  __pyx_v_t = values[1];
18349  }
18350  goto __pyx_L4_argument_unpacking_done;
18351  __pyx_L5_argtuple_error:;
18352  __Pyx_RaiseArgtupleInvalid("lambda", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 848, __pyx_L3_error)
18353  __pyx_L3_error:;
18354  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.updateIBM.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
18355  __Pyx_RefNannyFinishContext();
18356  return NULL;
18357  __pyx_L4_argument_unpacking_done:;
18358  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x, __pyx_v_t);
18359 
18360  /* function exit code */
18361  __Pyx_RefNannyFinishContext();
18362  return __pyx_r;
18363 }
18364 
18365 static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_x, CYTHON_UNUSED PyObject *__pyx_v_t) {
18366  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *__pyx_cur_scope;
18367  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *__pyx_outer_scope;
18368  PyObject *__pyx_r = NULL;
18369  __Pyx_TraceDeclarations
18370  __Pyx_RefNannyDeclarations
18371  PyObject *__pyx_t_1 = NULL;
18372  PyObject *__pyx_t_2 = NULL;
18373  PyObject *__pyx_t_3 = NULL;
18374  int __pyx_lineno = 0;
18375  const char *__pyx_filename = NULL;
18376  int __pyx_clineno = 0;
18377  __Pyx_RefNannySetupContext("lambda", 0);
18378  __pyx_outer_scope = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *) __Pyx_CyFunction_GetClosure(__pyx_self);
18379  __pyx_cur_scope = __pyx_outer_scope;
18380  __Pyx_TraceCall("lambda", __pyx_f[0], 848, 0, __PYX_ERR(0, 848, __pyx_L1_error));
18381  __Pyx_XDECREF(__pyx_r);
18382  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 848, __pyx_L1_error) }
18383  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_getVelocity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
18384  __Pyx_GOTREF(__pyx_t_2);
18385  __pyx_t_3 = NULL;
18386  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18387  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
18388  if (likely(__pyx_t_3)) {
18389  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18390  __Pyx_INCREF(__pyx_t_3);
18391  __Pyx_INCREF(function);
18392  __Pyx_DECREF_SET(__pyx_t_2, function);
18393  }
18394  }
18395  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
18396  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
18397  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error)
18398  __Pyx_GOTREF(__pyx_t_1);
18399  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18400  __pyx_r = __pyx_t_1;
18401  __pyx_t_1 = 0;
18402  goto __pyx_L0;
18403 
18404  /* function exit code */
18405  __pyx_L1_error:;
18406  __Pyx_XDECREF(__pyx_t_1);
18407  __Pyx_XDECREF(__pyx_t_2);
18408  __Pyx_XDECREF(__pyx_t_3);
18409  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.updateIBM.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
18410  __pyx_r = NULL;
18411  __pyx_L0:;
18412  __Pyx_XGIVEREF(__pyx_r);
18413  __Pyx_TraceReturn(__pyx_r, 0);
18414  __Pyx_RefNannyFinishContext();
18415  return __pyx_r;
18416 }
18417 
18418 /* "mbd/CouplingFSI.pyx":828
18419  * self.updateIBM()
18420  *
18421  * def updateIBM(self): # <<<<<<<<<<<<<<
18422  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
18423  * if c.use_ball_as_particle:
18424  */
18425 
18426 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_62updateIBM(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
18427  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *__pyx_cur_scope;
18428  PyObject *__pyx_v_c = NULL;
18429  PyObject *__pyx_v_chpos = NULL;
18430  PyObject *__pyx_v_chvel = NULL;
18431  PyObject *__pyx_v_chvel_ang = NULL;
18432  PyObject *__pyx_v_flag = NULL;
18433  PyObject *__pyx_r = NULL;
18434  __Pyx_TraceDeclarations
18435  __Pyx_RefNannyDeclarations
18436  PyObject *__pyx_t_1 = NULL;
18437  PyObject *__pyx_t_2 = NULL;
18438  int __pyx_t_3;
18439  PyObject *__pyx_t_4 = NULL;
18440  Py_ssize_t __pyx_t_5;
18441  PyObject *(*__pyx_t_6)(PyObject *);
18442  PyObject *__pyx_t_7 = NULL;
18443  int __pyx_lineno = 0;
18444  const char *__pyx_filename = NULL;
18445  int __pyx_clineno = 0;
18446  __Pyx_TraceFrameInit(__pyx_codeobj__59)
18447  __Pyx_RefNannySetupContext("updateIBM", 0);
18448  __pyx_cur_scope = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *)__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM(__pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM, __pyx_empty_tuple, NULL);
18449  if (unlikely(!__pyx_cur_scope)) {
18450  __pyx_cur_scope = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *)Py_None);
18451  __Pyx_INCREF(Py_None);
18452  __PYX_ERR(0, 828, __pyx_L1_error)
18453  } else {
18454  __Pyx_GOTREF(__pyx_cur_scope);
18455  }
18456  __Pyx_TraceCall("updateIBM", __pyx_f[0], 828, 0, __PYX_ERR(0, 828, __pyx_L1_error));
18457  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
18458  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
18459  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
18460 
18461  /* "mbd/CouplingFSI.pyx":829
18462  *
18463  * def updateIBM(self):
18464  * c = self.ProtChSystem.model.levelModelList[-1].coefficients # <<<<<<<<<<<<<<
18465  * if c.use_ball_as_particle:
18466  * chpos = self.ChBody.GetPos()
18467  */
18468  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error)
18469  __Pyx_GOTREF(__pyx_t_1);
18470  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
18471  __Pyx_GOTREF(__pyx_t_2);
18472  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18473  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error)
18474  __Pyx_GOTREF(__pyx_t_1);
18475  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18476  __pyx_v_c = __pyx_t_1;
18477  __pyx_t_1 = 0;
18478 
18479  /* "mbd/CouplingFSI.pyx":830
18480  * def updateIBM(self):
18481  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
18482  * if c.use_ball_as_particle: # <<<<<<<<<<<<<<
18483  * chpos = self.ChBody.GetPos()
18484  * chvel = self.ChBody.GetPos_dt()
18485  */
18486  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_use_ball_as_particle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
18487  __Pyx_GOTREF(__pyx_t_1);
18488  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 830, __pyx_L1_error)
18489  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18490  if (__pyx_t_3) {
18491 
18492  /* "mbd/CouplingFSI.pyx":831
18493  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
18494  * if c.use_ball_as_particle:
18495  * chpos = self.ChBody.GetPos() # <<<<<<<<<<<<<<
18496  * chvel = self.ChBody.GetPos_dt()
18497  * chvel_ang = self.ChBody.GetWvel_loc()
18498  */
18499  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error)
18500  __Pyx_GOTREF(__pyx_t_2);
18501  __pyx_t_4 = NULL;
18502  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18503  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
18504  if (likely(__pyx_t_4)) {
18505  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18506  __Pyx_INCREF(__pyx_t_4);
18507  __Pyx_INCREF(function);
18508  __Pyx_DECREF_SET(__pyx_t_2, function);
18509  }
18510  }
18511  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
18512  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
18513  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error)
18514  __Pyx_GOTREF(__pyx_t_1);
18515  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18516  __pyx_v_chpos = __pyx_t_1;
18517  __pyx_t_1 = 0;
18518 
18519  /* "mbd/CouplingFSI.pyx":832
18520  * if c.use_ball_as_particle:
18521  * chpos = self.ChBody.GetPos()
18522  * chvel = self.ChBody.GetPos_dt() # <<<<<<<<<<<<<<
18523  * chvel_ang = self.ChBody.GetWvel_loc()
18524  * for flag in self.boundaryFlags:
18525  */
18526  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->ChBody, __pyx_n_s_GetPos_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
18527  __Pyx_GOTREF(__pyx_t_2);
18528  __pyx_t_4 = NULL;
18529  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18530  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
18531  if (likely(__pyx_t_4)) {
18532  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18533  __Pyx_INCREF(__pyx_t_4);
18534  __Pyx_INCREF(function);
18535  __Pyx_DECREF_SET(__pyx_t_2, function);
18536  }
18537  }
18538  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
18539  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
18540  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
18541  __Pyx_GOTREF(__pyx_t_1);
18542  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18543  __pyx_v_chvel = __pyx_t_1;
18544  __pyx_t_1 = 0;
18545 
18546  /* "mbd/CouplingFSI.pyx":833
18547  * chpos = self.ChBody.GetPos()
18548  * chvel = self.ChBody.GetPos_dt()
18549  * chvel_ang = self.ChBody.GetWvel_loc() # <<<<<<<<<<<<<<
18550  * for flag in self.boundaryFlags:
18551  * c.ball_radius[flag] = self.radiusIBM
18552  */
18553  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self->ChBody, __pyx_n_s_GetWvel_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
18554  __Pyx_GOTREF(__pyx_t_2);
18555  __pyx_t_4 = NULL;
18556  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
18557  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
18558  if (likely(__pyx_t_4)) {
18559  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
18560  __Pyx_INCREF(__pyx_t_4);
18561  __Pyx_INCREF(function);
18562  __Pyx_DECREF_SET(__pyx_t_2, function);
18563  }
18564  }
18565  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
18566  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
18567  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
18568  __Pyx_GOTREF(__pyx_t_1);
18569  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18570  __pyx_v_chvel_ang = __pyx_t_1;
18571  __pyx_t_1 = 0;
18572 
18573  /* "mbd/CouplingFSI.pyx":834
18574  * chvel = self.ChBody.GetPos_dt()
18575  * chvel_ang = self.ChBody.GetWvel_loc()
18576  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
18577  * c.ball_radius[flag] = self.radiusIBM
18578  * c.ball_center[flag, 0] = chpos.x
18579  */
18580  if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags))) {
18581  __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
18582  __pyx_t_6 = NULL;
18583  } else {
18584  __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
18585  __Pyx_GOTREF(__pyx_t_1);
18586  __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error)
18587  }
18588  for (;;) {
18589  if (likely(!__pyx_t_6)) {
18590  if (likely(PyList_CheckExact(__pyx_t_1))) {
18591  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
18592  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18593  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 834, __pyx_L1_error)
18594  #else
18595  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
18596  __Pyx_GOTREF(__pyx_t_2);
18597  #endif
18598  } else {
18599  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
18600  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18601  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 834, __pyx_L1_error)
18602  #else
18603  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
18604  __Pyx_GOTREF(__pyx_t_2);
18605  #endif
18606  }
18607  } else {
18608  __pyx_t_2 = __pyx_t_6(__pyx_t_1);
18609  if (unlikely(!__pyx_t_2)) {
18610  PyObject* exc_type = PyErr_Occurred();
18611  if (exc_type) {
18612  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18613  else __PYX_ERR(0, 834, __pyx_L1_error)
18614  }
18615  break;
18616  }
18617  __Pyx_GOTREF(__pyx_t_2);
18618  }
18619  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
18620  __pyx_t_2 = 0;
18621 
18622  /* "mbd/CouplingFSI.pyx":835
18623  * chvel_ang = self.ChBody.GetWvel_loc()
18624  * for flag in self.boundaryFlags:
18625  * c.ball_radius[flag] = self.radiusIBM # <<<<<<<<<<<<<<
18626  * c.ball_center[flag, 0] = chpos.x
18627  * c.ball_center[flag, 1] = chpos.y
18628  */
18629  __pyx_t_2 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_self->radiusIBM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
18630  __Pyx_GOTREF(__pyx_t_2);
18631  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_radius); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 835, __pyx_L1_error)
18632  __Pyx_GOTREF(__pyx_t_4);
18633  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_flag, __pyx_t_2) < 0)) __PYX_ERR(0, 835, __pyx_L1_error)
18634  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18635  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18636 
18637  /* "mbd/CouplingFSI.pyx":836
18638  * for flag in self.boundaryFlags:
18639  * c.ball_radius[flag] = self.radiusIBM
18640  * c.ball_center[flag, 0] = chpos.x # <<<<<<<<<<<<<<
18641  * c.ball_center[flag, 1] = chpos.y
18642  * c.ball_center[flag, 2] = chpos.z
18643  */
18644  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chpos, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error)
18645  __Pyx_GOTREF(__pyx_t_2);
18646  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_center); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error)
18647  __Pyx_GOTREF(__pyx_t_4);
18648  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 836, __pyx_L1_error)
18649  __Pyx_GOTREF(__pyx_t_7);
18650  __Pyx_INCREF(__pyx_v_flag);
18651  __Pyx_GIVEREF(__pyx_v_flag);
18652  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_flag);
18653  __Pyx_INCREF(__pyx_int_0);
18654  __Pyx_GIVEREF(__pyx_int_0);
18655  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_0);
18656  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_2) < 0)) __PYX_ERR(0, 836, __pyx_L1_error)
18657  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18658  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18659  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18660 
18661  /* "mbd/CouplingFSI.pyx":837
18662  * c.ball_radius[flag] = self.radiusIBM
18663  * c.ball_center[flag, 0] = chpos.x
18664  * c.ball_center[flag, 1] = chpos.y # <<<<<<<<<<<<<<
18665  * c.ball_center[flag, 2] = chpos.z
18666  * c.ball_velocity[flag, 0] = chvel.x
18667  */
18668  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chpos, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
18669  __Pyx_GOTREF(__pyx_t_2);
18670  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_center); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 837, __pyx_L1_error)
18671  __Pyx_GOTREF(__pyx_t_7);
18672  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 837, __pyx_L1_error)
18673  __Pyx_GOTREF(__pyx_t_4);
18674  __Pyx_INCREF(__pyx_v_flag);
18675  __Pyx_GIVEREF(__pyx_v_flag);
18676  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_flag);
18677  __Pyx_INCREF(__pyx_int_1);
18678  __Pyx_GIVEREF(__pyx_int_1);
18679  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
18680  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_2) < 0)) __PYX_ERR(0, 837, __pyx_L1_error)
18681  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18682  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18683  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18684 
18685  /* "mbd/CouplingFSI.pyx":838
18686  * c.ball_center[flag, 0] = chpos.x
18687  * c.ball_center[flag, 1] = chpos.y
18688  * c.ball_center[flag, 2] = chpos.z # <<<<<<<<<<<<<<
18689  * c.ball_velocity[flag, 0] = chvel.x
18690  * c.ball_velocity[flag, 1] = chvel.y
18691  */
18692  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chpos, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
18693  __Pyx_GOTREF(__pyx_t_2);
18694  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_center); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 838, __pyx_L1_error)
18695  __Pyx_GOTREF(__pyx_t_4);
18696  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 838, __pyx_L1_error)
18697  __Pyx_GOTREF(__pyx_t_7);
18698  __Pyx_INCREF(__pyx_v_flag);
18699  __Pyx_GIVEREF(__pyx_v_flag);
18700  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_flag);
18701  __Pyx_INCREF(__pyx_int_2);
18702  __Pyx_GIVEREF(__pyx_int_2);
18703  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_2);
18704  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_2) < 0)) __PYX_ERR(0, 838, __pyx_L1_error)
18705  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18706  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18707  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18708 
18709  /* "mbd/CouplingFSI.pyx":839
18710  * c.ball_center[flag, 1] = chpos.y
18711  * c.ball_center[flag, 2] = chpos.z
18712  * c.ball_velocity[flag, 0] = chvel.x # <<<<<<<<<<<<<<
18713  * c.ball_velocity[flag, 1] = chvel.y
18714  * c.ball_velocity[flag, 2] = chvel.z
18715  */
18716  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chvel, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 839, __pyx_L1_error)
18717  __Pyx_GOTREF(__pyx_t_2);
18718  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_velocity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 839, __pyx_L1_error)
18719  __Pyx_GOTREF(__pyx_t_7);
18720  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error)
18721  __Pyx_GOTREF(__pyx_t_4);
18722  __Pyx_INCREF(__pyx_v_flag);
18723  __Pyx_GIVEREF(__pyx_v_flag);
18724  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_flag);
18725  __Pyx_INCREF(__pyx_int_0);
18726  __Pyx_GIVEREF(__pyx_int_0);
18727  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_0);
18728  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_2) < 0)) __PYX_ERR(0, 839, __pyx_L1_error)
18729  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18730  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18731  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18732 
18733  /* "mbd/CouplingFSI.pyx":840
18734  * c.ball_center[flag, 2] = chpos.z
18735  * c.ball_velocity[flag, 0] = chvel.x
18736  * c.ball_velocity[flag, 1] = chvel.y # <<<<<<<<<<<<<<
18737  * c.ball_velocity[flag, 2] = chvel.z
18738  * c.ball_angular_velocity[flag, 0] = chvel_ang.x
18739  */
18740  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chvel, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error)
18741  __Pyx_GOTREF(__pyx_t_2);
18742  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_velocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error)
18743  __Pyx_GOTREF(__pyx_t_4);
18744  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 840, __pyx_L1_error)
18745  __Pyx_GOTREF(__pyx_t_7);
18746  __Pyx_INCREF(__pyx_v_flag);
18747  __Pyx_GIVEREF(__pyx_v_flag);
18748  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_flag);
18749  __Pyx_INCREF(__pyx_int_1);
18750  __Pyx_GIVEREF(__pyx_int_1);
18751  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_1);
18752  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_2) < 0)) __PYX_ERR(0, 840, __pyx_L1_error)
18753  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18754  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18755  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18756 
18757  /* "mbd/CouplingFSI.pyx":841
18758  * c.ball_velocity[flag, 0] = chvel.x
18759  * c.ball_velocity[flag, 1] = chvel.y
18760  * c.ball_velocity[flag, 2] = chvel.z # <<<<<<<<<<<<<<
18761  * c.ball_angular_velocity[flag, 0] = chvel_ang.x
18762  * c.ball_angular_velocity[flag, 1] = chvel_ang.y
18763  */
18764  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chvel, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error)
18765  __Pyx_GOTREF(__pyx_t_2);
18766  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_velocity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error)
18767  __Pyx_GOTREF(__pyx_t_7);
18768  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 841, __pyx_L1_error)
18769  __Pyx_GOTREF(__pyx_t_4);
18770  __Pyx_INCREF(__pyx_v_flag);
18771  __Pyx_GIVEREF(__pyx_v_flag);
18772  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_flag);
18773  __Pyx_INCREF(__pyx_int_2);
18774  __Pyx_GIVEREF(__pyx_int_2);
18775  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2);
18776  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_2) < 0)) __PYX_ERR(0, 841, __pyx_L1_error)
18777  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18778  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18779  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18780 
18781  /* "mbd/CouplingFSI.pyx":842
18782  * c.ball_velocity[flag, 1] = chvel.y
18783  * c.ball_velocity[flag, 2] = chvel.z
18784  * c.ball_angular_velocity[flag, 0] = chvel_ang.x # <<<<<<<<<<<<<<
18785  * c.ball_angular_velocity[flag, 1] = chvel_ang.y
18786  * c.ball_angular_velocity[flag, 2] = chvel_ang.z
18787  */
18788  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chvel_ang, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
18789  __Pyx_GOTREF(__pyx_t_2);
18790  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_angular_velocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error)
18791  __Pyx_GOTREF(__pyx_t_4);
18792  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 842, __pyx_L1_error)
18793  __Pyx_GOTREF(__pyx_t_7);
18794  __Pyx_INCREF(__pyx_v_flag);
18795  __Pyx_GIVEREF(__pyx_v_flag);
18796  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_flag);
18797  __Pyx_INCREF(__pyx_int_0);
18798  __Pyx_GIVEREF(__pyx_int_0);
18799  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_0);
18800  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_2) < 0)) __PYX_ERR(0, 842, __pyx_L1_error)
18801  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18802  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18803  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18804 
18805  /* "mbd/CouplingFSI.pyx":843
18806  * c.ball_velocity[flag, 2] = chvel.z
18807  * c.ball_angular_velocity[flag, 0] = chvel_ang.x
18808  * c.ball_angular_velocity[flag, 1] = chvel_ang.y # <<<<<<<<<<<<<<
18809  * c.ball_angular_velocity[flag, 2] = chvel_ang.z
18810  * else:
18811  */
18812  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chvel_ang, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error)
18813  __Pyx_GOTREF(__pyx_t_2);
18814  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_angular_velocity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 843, __pyx_L1_error)
18815  __Pyx_GOTREF(__pyx_t_7);
18816  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error)
18817  __Pyx_GOTREF(__pyx_t_4);
18818  __Pyx_INCREF(__pyx_v_flag);
18819  __Pyx_GIVEREF(__pyx_v_flag);
18820  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_flag);
18821  __Pyx_INCREF(__pyx_int_1);
18822  __Pyx_GIVEREF(__pyx_int_1);
18823  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_1);
18824  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_4, __pyx_t_2) < 0)) __PYX_ERR(0, 843, __pyx_L1_error)
18825  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18826  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18827  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18828 
18829  /* "mbd/CouplingFSI.pyx":844
18830  * c.ball_angular_velocity[flag, 0] = chvel_ang.x
18831  * c.ball_angular_velocity[flag, 1] = chvel_ang.y
18832  * c.ball_angular_velocity[flag, 2] = chvel_ang.z # <<<<<<<<<<<<<<
18833  * else:
18834  * for flag in self.boundaryFlags:
18835  */
18836  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chvel_ang, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error)
18837  __Pyx_GOTREF(__pyx_t_2);
18838  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_angular_velocity); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error)
18839  __Pyx_GOTREF(__pyx_t_4);
18840  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 844, __pyx_L1_error)
18841  __Pyx_GOTREF(__pyx_t_7);
18842  __Pyx_INCREF(__pyx_v_flag);
18843  __Pyx_GIVEREF(__pyx_v_flag);
18844  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_flag);
18845  __Pyx_INCREF(__pyx_int_2);
18846  __Pyx_GIVEREF(__pyx_int_2);
18847  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_2);
18848  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, __pyx_t_2) < 0)) __PYX_ERR(0, 844, __pyx_L1_error)
18849  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18850  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18851  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18852 
18853  /* "mbd/CouplingFSI.pyx":834
18854  * chvel = self.ChBody.GetPos_dt()
18855  * chvel_ang = self.ChBody.GetWvel_loc()
18856  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
18857  * c.ball_radius[flag] = self.radiusIBM
18858  * c.ball_center[flag, 0] = chpos.x
18859  */
18860  }
18861  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18862 
18863  /* "mbd/CouplingFSI.pyx":830
18864  * def updateIBM(self):
18865  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
18866  * if c.use_ball_as_particle: # <<<<<<<<<<<<<<
18867  * chpos = self.ChBody.GetPos()
18868  * chvel = self.ChBody.GetPos_dt()
18869  */
18870  goto __pyx_L3;
18871  }
18872 
18873  /* "mbd/CouplingFSI.pyx":846
18874  * c.ball_angular_velocity[flag, 2] = chvel_ang.z
18875  * else:
18876  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
18877  * c.particle_sdfList[flag] = self.getDynamicSDF
18878  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity()
18879  */
18880  /*else*/ {
18881  if (likely(PyList_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags))) || PyTuple_CheckExact(((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags))) {
18882  __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
18883  __pyx_t_6 = NULL;
18884  } else {
18885  __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_cur_scope->__pyx_v_self->boundaryFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
18886  __Pyx_GOTREF(__pyx_t_1);
18887  __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L1_error)
18888  }
18889  for (;;) {
18890  if (likely(!__pyx_t_6)) {
18891  if (likely(PyList_CheckExact(__pyx_t_1))) {
18892  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
18893  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18894  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
18895  #else
18896  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
18897  __Pyx_GOTREF(__pyx_t_2);
18898  #endif
18899  } else {
18900  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
18901  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
18902  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
18903  #else
18904  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
18905  __Pyx_GOTREF(__pyx_t_2);
18906  #endif
18907  }
18908  } else {
18909  __pyx_t_2 = __pyx_t_6(__pyx_t_1);
18910  if (unlikely(!__pyx_t_2)) {
18911  PyObject* exc_type = PyErr_Occurred();
18912  if (exc_type) {
18913  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
18914  else __PYX_ERR(0, 846, __pyx_L1_error)
18915  }
18916  break;
18917  }
18918  __Pyx_GOTREF(__pyx_t_2);
18919  }
18920  __Pyx_XDECREF_SET(__pyx_v_flag, __pyx_t_2);
18921  __pyx_t_2 = 0;
18922 
18923  /* "mbd/CouplingFSI.pyx":847
18924  * else:
18925  * for flag in self.boundaryFlags:
18926  * c.particle_sdfList[flag] = self.getDynamicSDF # <<<<<<<<<<<<<<
18927  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity()
18928  *
18929  */
18930  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_self), __pyx_n_s_getDynamicSDF); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
18931  __Pyx_GOTREF(__pyx_t_2);
18932  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_particle_sdfList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 847, __pyx_L1_error)
18933  __Pyx_GOTREF(__pyx_t_7);
18934  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_flag, __pyx_t_2) < 0)) __PYX_ERR(0, 847, __pyx_L1_error)
18935  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18936  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18937 
18938  /* "mbd/CouplingFSI.pyx":848
18939  * for flag in self.boundaryFlags:
18940  * c.particle_sdfList[flag] = self.getDynamicSDF
18941  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity() # <<<<<<<<<<<<<<
18942  *
18943  * def getDynamicSDF(self, t, x):
18944  */
18945  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_9updateIBM_lambda, 0, __pyx_n_s_updateIBM_locals_lambda, ((PyObject*)__pyx_cur_scope), __pyx_n_s_mbd_CouplingFSI, __pyx_d, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
18946  __Pyx_GOTREF(__pyx_t_2);
18947  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_particle_velocityList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 848, __pyx_L1_error)
18948  __Pyx_GOTREF(__pyx_t_7);
18949  if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_v_flag, __pyx_t_2) < 0)) __PYX_ERR(0, 848, __pyx_L1_error)
18950  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
18951  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18952 
18953  /* "mbd/CouplingFSI.pyx":846
18954  * c.ball_angular_velocity[flag, 2] = chvel_ang.z
18955  * else:
18956  * for flag in self.boundaryFlags: # <<<<<<<<<<<<<<
18957  * c.particle_sdfList[flag] = self.getDynamicSDF
18958  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity()
18959  */
18960  }
18961  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
18962  }
18963  __pyx_L3:;
18964 
18965  /* "mbd/CouplingFSI.pyx":828
18966  * self.updateIBM()
18967  *
18968  * def updateIBM(self): # <<<<<<<<<<<<<<
18969  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
18970  * if c.use_ball_as_particle:
18971  */
18972 
18973  /* function exit code */
18974  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18975  goto __pyx_L0;
18976  __pyx_L1_error:;
18977  __Pyx_XDECREF(__pyx_t_1);
18978  __Pyx_XDECREF(__pyx_t_2);
18979  __Pyx_XDECREF(__pyx_t_4);
18980  __Pyx_XDECREF(__pyx_t_7);
18981  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.updateIBM", __pyx_clineno, __pyx_lineno, __pyx_filename);
18982  __pyx_r = NULL;
18983  __pyx_L0:;
18984  __Pyx_XDECREF(__pyx_v_c);
18985  __Pyx_XDECREF(__pyx_v_chpos);
18986  __Pyx_XDECREF(__pyx_v_chvel);
18987  __Pyx_XDECREF(__pyx_v_chvel_ang);
18988  __Pyx_XDECREF(__pyx_v_flag);
18989  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
18990  __Pyx_XGIVEREF(__pyx_r);
18991  __Pyx_TraceReturn(__pyx_r, 0);
18992  __Pyx_RefNannyFinishContext();
18993  return __pyx_r;
18994 }
18995 
18996 /* "mbd/CouplingFSI.pyx":850
18997  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity()
18998  *
18999  * def getDynamicSDF(self, t, x): # <<<<<<<<<<<<<<
19000  * chpos = self.ChBody.GetPos()
19001  * relative_x = x-np.array([chpos.x, chpos.y, chpos.z])
19002  */
19003 
19004 /* Python wrapper */
19005 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_65getDynamicSDF(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
19006 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_64getDynamicSDF[] = "ProtChBody.getDynamicSDF(self, t, x)";
19007 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_65getDynamicSDF = {"getDynamicSDF", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_65getDynamicSDF, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_64getDynamicSDF};
19008 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_65getDynamicSDF(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
19009  PyObject *__pyx_v_t = 0;
19010  PyObject *__pyx_v_x = 0;
19011  int __pyx_lineno = 0;
19012  const char *__pyx_filename = NULL;
19013  int __pyx_clineno = 0;
19014  PyObject *__pyx_r = 0;
19015  __Pyx_RefNannyDeclarations
19016  __Pyx_RefNannySetupContext("getDynamicSDF (wrapper)", 0);
19017  {
19018  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_x,0};
19019  PyObject* values[2] = {0,0};
19020  if (unlikely(__pyx_kwds)) {
19021  Py_ssize_t kw_args;
19022  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
19023  switch (pos_args) {
19024  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19025  CYTHON_FALLTHROUGH;
19026  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19027  CYTHON_FALLTHROUGH;
19028  case 0: break;
19029  default: goto __pyx_L5_argtuple_error;
19030  }
19031  kw_args = PyDict_Size(__pyx_kwds);
19032  switch (pos_args) {
19033  case 0:
19034  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
19035  else goto __pyx_L5_argtuple_error;
19036  CYTHON_FALLTHROUGH;
19037  case 1:
19038  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
19039  else {
19040  __Pyx_RaiseArgtupleInvalid("getDynamicSDF", 1, 2, 2, 1); __PYX_ERR(0, 850, __pyx_L3_error)
19041  }
19042  }
19043  if (unlikely(kw_args > 0)) {
19044  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDynamicSDF") < 0)) __PYX_ERR(0, 850, __pyx_L3_error)
19045  }
19046  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
19047  goto __pyx_L5_argtuple_error;
19048  } else {
19049  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
19050  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
19051  }
19052  __pyx_v_t = values[0];
19053  __pyx_v_x = values[1];
19054  }
19055  goto __pyx_L4_argument_unpacking_done;
19056  __pyx_L5_argtuple_error:;
19057  __Pyx_RaiseArgtupleInvalid("getDynamicSDF", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 850, __pyx_L3_error)
19058  __pyx_L3_error:;
19059  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getDynamicSDF", __pyx_clineno, __pyx_lineno, __pyx_filename);
19060  __Pyx_RefNannyFinishContext();
19061  return NULL;
19062  __pyx_L4_argument_unpacking_done:;
19063  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_64getDynamicSDF(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_t, __pyx_v_x);
19064 
19065  /* function exit code */
19066  __Pyx_RefNannyFinishContext();
19067  return __pyx_r;
19068 }
19069 
19070 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_64getDynamicSDF(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_t, PyObject *__pyx_v_x) {
19071  PyObject *__pyx_v_chpos = NULL;
19072  PyObject *__pyx_v_relative_x = NULL;
19073  PyObject *__pyx_r = NULL;
19074  __Pyx_TraceDeclarations
19075  __Pyx_RefNannyDeclarations
19076  PyObject *__pyx_t_1 = NULL;
19077  PyObject *__pyx_t_2 = NULL;
19078  PyObject *__pyx_t_3 = NULL;
19079  PyObject *__pyx_t_4 = NULL;
19080  PyObject *__pyx_t_5 = NULL;
19081  PyObject *__pyx_t_6 = NULL;
19082  int __pyx_t_7;
19083  int __pyx_lineno = 0;
19084  const char *__pyx_filename = NULL;
19085  int __pyx_clineno = 0;
19086  __Pyx_TraceFrameInit(__pyx_codeobj__60)
19087  __Pyx_RefNannySetupContext("getDynamicSDF", 0);
19088  __Pyx_TraceCall("getDynamicSDF", __pyx_f[0], 850, 0, __PYX_ERR(0, 850, __pyx_L1_error));
19089 
19090  /* "mbd/CouplingFSI.pyx":851
19091  *
19092  * def getDynamicSDF(self, t, x):
19093  * chpos = self.ChBody.GetPos() # <<<<<<<<<<<<<<
19094  * relative_x = x-np.array([chpos.x, chpos.y, chpos.z])
19095  * return self.sdfIBM(t, relative_x)
19096  */
19097  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error)
19098  __Pyx_GOTREF(__pyx_t_2);
19099  __pyx_t_3 = NULL;
19100  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19101  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
19102  if (likely(__pyx_t_3)) {
19103  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19104  __Pyx_INCREF(__pyx_t_3);
19105  __Pyx_INCREF(function);
19106  __Pyx_DECREF_SET(__pyx_t_2, function);
19107  }
19108  }
19109  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
19110  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19111  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error)
19112  __Pyx_GOTREF(__pyx_t_1);
19113  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19114  __pyx_v_chpos = __pyx_t_1;
19115  __pyx_t_1 = 0;
19116 
19117  /* "mbd/CouplingFSI.pyx":852
19118  * def getDynamicSDF(self, t, x):
19119  * chpos = self.ChBody.GetPos()
19120  * relative_x = x-np.array([chpos.x, chpos.y, chpos.z]) # <<<<<<<<<<<<<<
19121  * return self.sdfIBM(t, relative_x)
19122  *
19123  */
19124  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
19125  __Pyx_GOTREF(__pyx_t_2);
19126  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error)
19127  __Pyx_GOTREF(__pyx_t_3);
19128  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19129  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_chpos, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
19130  __Pyx_GOTREF(__pyx_t_2);
19131  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_chpos, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error)
19132  __Pyx_GOTREF(__pyx_t_4);
19133  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_chpos, __pyx_n_s_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error)
19134  __Pyx_GOTREF(__pyx_t_5);
19135  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 852, __pyx_L1_error)
19136  __Pyx_GOTREF(__pyx_t_6);
19137  __Pyx_GIVEREF(__pyx_t_2);
19138  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
19139  __Pyx_GIVEREF(__pyx_t_4);
19140  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
19141  __Pyx_GIVEREF(__pyx_t_5);
19142  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
19143  __pyx_t_2 = 0;
19144  __pyx_t_4 = 0;
19145  __pyx_t_5 = 0;
19146  __pyx_t_5 = NULL;
19147  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
19148  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
19149  if (likely(__pyx_t_5)) {
19150  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
19151  __Pyx_INCREF(__pyx_t_5);
19152  __Pyx_INCREF(function);
19153  __Pyx_DECREF_SET(__pyx_t_3, function);
19154  }
19155  }
19156  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
19157  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
19158  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
19159  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error)
19160  __Pyx_GOTREF(__pyx_t_1);
19161  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19162  __pyx_t_3 = PyNumber_Subtract(__pyx_v_x, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error)
19163  __Pyx_GOTREF(__pyx_t_3);
19164  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19165  __pyx_v_relative_x = __pyx_t_3;
19166  __pyx_t_3 = 0;
19167 
19168  /* "mbd/CouplingFSI.pyx":853
19169  * chpos = self.ChBody.GetPos()
19170  * relative_x = x-np.array([chpos.x, chpos.y, chpos.z])
19171  * return self.sdfIBM(t, relative_x) # <<<<<<<<<<<<<<
19172  *
19173  * def setPosition(self, np.ndarray pos):
19174  */
19175  __Pyx_XDECREF(__pyx_r);
19176  __Pyx_INCREF(__pyx_v_self->sdfIBM);
19177  __pyx_t_1 = __pyx_v_self->sdfIBM; __pyx_t_6 = NULL;
19178  __pyx_t_7 = 0;
19179  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
19180  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
19181  if (likely(__pyx_t_6)) {
19182  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
19183  __Pyx_INCREF(__pyx_t_6);
19184  __Pyx_INCREF(function);
19185  __Pyx_DECREF_SET(__pyx_t_1, function);
19186  __pyx_t_7 = 1;
19187  }
19188  }
19189  #if CYTHON_FAST_PYCALL
19190  if (PyFunction_Check(__pyx_t_1)) {
19191  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_t, __pyx_v_relative_x};
19192  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
19193  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19194  __Pyx_GOTREF(__pyx_t_3);
19195  } else
19196  #endif
19197  #if CYTHON_FAST_PYCCALL
19198  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
19199  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_t, __pyx_v_relative_x};
19200  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
19201  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19202  __Pyx_GOTREF(__pyx_t_3);
19203  } else
19204  #endif
19205  {
19206  __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error)
19207  __Pyx_GOTREF(__pyx_t_5);
19208  if (__pyx_t_6) {
19209  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
19210  }
19211  __Pyx_INCREF(__pyx_v_t);
19212  __Pyx_GIVEREF(__pyx_v_t);
19213  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_t);
19214  __Pyx_INCREF(__pyx_v_relative_x);
19215  __Pyx_GIVEREF(__pyx_v_relative_x);
19216  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_relative_x);
19217  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 853, __pyx_L1_error)
19218  __Pyx_GOTREF(__pyx_t_3);
19219  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19220  }
19221  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19222  __pyx_r = __pyx_t_3;
19223  __pyx_t_3 = 0;
19224  goto __pyx_L0;
19225 
19226  /* "mbd/CouplingFSI.pyx":850
19227  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity()
19228  *
19229  * def getDynamicSDF(self, t, x): # <<<<<<<<<<<<<<
19230  * chpos = self.ChBody.GetPos()
19231  * relative_x = x-np.array([chpos.x, chpos.y, chpos.z])
19232  */
19233 
19234  /* function exit code */
19235  __pyx_L1_error:;
19236  __Pyx_XDECREF(__pyx_t_1);
19237  __Pyx_XDECREF(__pyx_t_2);
19238  __Pyx_XDECREF(__pyx_t_3);
19239  __Pyx_XDECREF(__pyx_t_4);
19240  __Pyx_XDECREF(__pyx_t_5);
19241  __Pyx_XDECREF(__pyx_t_6);
19242  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getDynamicSDF", __pyx_clineno, __pyx_lineno, __pyx_filename);
19243  __pyx_r = NULL;
19244  __pyx_L0:;
19245  __Pyx_XDECREF(__pyx_v_chpos);
19246  __Pyx_XDECREF(__pyx_v_relative_x);
19247  __Pyx_XGIVEREF(__pyx_r);
19248  __Pyx_TraceReturn(__pyx_r, 0);
19249  __Pyx_RefNannyFinishContext();
19250  return __pyx_r;
19251 }
19252 
19253 /* "mbd/CouplingFSI.pyx":855
19254  * return self.sdfIBM(t, relative_x)
19255  *
19256  * def setPosition(self, np.ndarray pos): # <<<<<<<<<<<<<<
19257  * chvec = chrono.ChVectorD(pos[0], pos[1], pos[2])
19258  * self.ChBody.SetPos(chvec)
19259  */
19260 
19261 /* Python wrapper */
19262 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_67setPosition(PyObject *__pyx_v_self, PyObject *__pyx_v_pos); /*proto*/
19263 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_66setPosition[] = "ProtChBody.setPosition(self, ndarray pos)";
19264 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_67setPosition = {"setPosition", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_67setPosition, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_66setPosition};
19265 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_67setPosition(PyObject *__pyx_v_self, PyObject *__pyx_v_pos) {
19266  int __pyx_lineno = 0;
19267  const char *__pyx_filename = NULL;
19268  int __pyx_clineno = 0;
19269  PyObject *__pyx_r = 0;
19270  __Pyx_RefNannyDeclarations
19271  __Pyx_RefNannySetupContext("setPosition (wrapper)", 0);
19272  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pos), __pyx_ptype_5numpy_ndarray, 1, "pos", 0))) __PYX_ERR(0, 855, __pyx_L1_error)
19273  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_66setPosition(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyArrayObject *)__pyx_v_pos));
19274 
19275  /* function exit code */
19276  goto __pyx_L0;
19277  __pyx_L1_error:;
19278  __pyx_r = NULL;
19279  __pyx_L0:;
19280  __Pyx_RefNannyFinishContext();
19281  return __pyx_r;
19282 }
19283 
19284 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_66setPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_pos) {
19285  PyObject *__pyx_v_chvec = NULL;
19286  PyObject *__pyx_r = NULL;
19287  __Pyx_TraceDeclarations
19288  __Pyx_RefNannyDeclarations
19289  PyObject *__pyx_t_1 = NULL;
19290  PyObject *__pyx_t_2 = NULL;
19291  PyObject *__pyx_t_3 = NULL;
19292  PyObject *__pyx_t_4 = NULL;
19293  PyObject *__pyx_t_5 = NULL;
19294  PyObject *__pyx_t_6 = NULL;
19295  int __pyx_t_7;
19296  PyObject *__pyx_t_8 = NULL;
19297  int __pyx_lineno = 0;
19298  const char *__pyx_filename = NULL;
19299  int __pyx_clineno = 0;
19300  __Pyx_TraceFrameInit(__pyx_codeobj__61)
19301  __Pyx_RefNannySetupContext("setPosition", 0);
19302  __Pyx_TraceCall("setPosition", __pyx_f[0], 855, 0, __PYX_ERR(0, 855, __pyx_L1_error));
19303 
19304  /* "mbd/CouplingFSI.pyx":856
19305  *
19306  * def setPosition(self, np.ndarray pos):
19307  * chvec = chrono.ChVectorD(pos[0], pos[1], pos[2]) # <<<<<<<<<<<<<<
19308  * self.ChBody.SetPos(chvec)
19309  *
19310  */
19311  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chrono); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error)
19312  __Pyx_GOTREF(__pyx_t_2);
19313  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChVectorD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 856, __pyx_L1_error)
19314  __Pyx_GOTREF(__pyx_t_3);
19315  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19316  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error)
19317  __Pyx_GOTREF(__pyx_t_2);
19318  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error)
19319  __Pyx_GOTREF(__pyx_t_4);
19320  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_pos), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error)
19321  __Pyx_GOTREF(__pyx_t_5);
19322  __pyx_t_6 = NULL;
19323  __pyx_t_7 = 0;
19324  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
19325  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
19326  if (likely(__pyx_t_6)) {
19327  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
19328  __Pyx_INCREF(__pyx_t_6);
19329  __Pyx_INCREF(function);
19330  __Pyx_DECREF_SET(__pyx_t_3, function);
19331  __pyx_t_7 = 1;
19332  }
19333  }
19334  #if CYTHON_FAST_PYCALL
19335  if (PyFunction_Check(__pyx_t_3)) {
19336  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
19337  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
19338  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19339  __Pyx_GOTREF(__pyx_t_1);
19340  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19341  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19342  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19343  } else
19344  #endif
19345  #if CYTHON_FAST_PYCCALL
19346  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
19347  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
19348  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
19349  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19350  __Pyx_GOTREF(__pyx_t_1);
19351  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19352  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19353  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19354  } else
19355  #endif
19356  {
19357  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error)
19358  __Pyx_GOTREF(__pyx_t_8);
19359  if (__pyx_t_6) {
19360  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
19361  }
19362  __Pyx_GIVEREF(__pyx_t_2);
19363  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2);
19364  __Pyx_GIVEREF(__pyx_t_4);
19365  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
19366  __Pyx_GIVEREF(__pyx_t_5);
19367  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
19368  __pyx_t_2 = 0;
19369  __pyx_t_4 = 0;
19370  __pyx_t_5 = 0;
19371  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error)
19372  __Pyx_GOTREF(__pyx_t_1);
19373  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19374  }
19375  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19376  __pyx_v_chvec = __pyx_t_1;
19377  __pyx_t_1 = 0;
19378 
19379  /* "mbd/CouplingFSI.pyx":857
19380  * def setPosition(self, np.ndarray pos):
19381  * chvec = chrono.ChVectorD(pos[0], pos[1], pos[2])
19382  * self.ChBody.SetPos(chvec) # <<<<<<<<<<<<<<
19383  *
19384  * def getPosition(self):
19385  */
19386  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetPos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 857, __pyx_L1_error)
19387  __Pyx_GOTREF(__pyx_t_3);
19388  __pyx_t_8 = NULL;
19389  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
19390  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
19391  if (likely(__pyx_t_8)) {
19392  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
19393  __Pyx_INCREF(__pyx_t_8);
19394  __Pyx_INCREF(function);
19395  __Pyx_DECREF_SET(__pyx_t_3, function);
19396  }
19397  }
19398  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_chvec) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_chvec);
19399  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
19400  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 857, __pyx_L1_error)
19401  __Pyx_GOTREF(__pyx_t_1);
19402  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19403  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19404 
19405  /* "mbd/CouplingFSI.pyx":855
19406  * return self.sdfIBM(t, relative_x)
19407  *
19408  * def setPosition(self, np.ndarray pos): # <<<<<<<<<<<<<<
19409  * chvec = chrono.ChVectorD(pos[0], pos[1], pos[2])
19410  * self.ChBody.SetPos(chvec)
19411  */
19412 
19413  /* function exit code */
19414  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19415  goto __pyx_L0;
19416  __pyx_L1_error:;
19417  __Pyx_XDECREF(__pyx_t_1);
19418  __Pyx_XDECREF(__pyx_t_2);
19419  __Pyx_XDECREF(__pyx_t_3);
19420  __Pyx_XDECREF(__pyx_t_4);
19421  __Pyx_XDECREF(__pyx_t_5);
19422  __Pyx_XDECREF(__pyx_t_6);
19423  __Pyx_XDECREF(__pyx_t_8);
19424  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPosition", __pyx_clineno, __pyx_lineno, __pyx_filename);
19425  __pyx_r = NULL;
19426  __pyx_L0:;
19427  __Pyx_XDECREF(__pyx_v_chvec);
19428  __Pyx_XGIVEREF(__pyx_r);
19429  __Pyx_TraceReturn(__pyx_r, 0);
19430  __Pyx_RefNannyFinishContext();
19431  return __pyx_r;
19432 }
19433 
19434 /* "mbd/CouplingFSI.pyx":859
19435  * self.ChBody.SetPos(chvec)
19436  *
19437  * def getPosition(self): # <<<<<<<<<<<<<<
19438  * chpos = self.ChBody.GetPos()
19439  * return pyvec2array(chpos)
19440  */
19441 
19442 /* Python wrapper */
19443 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_69getPosition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
19444 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_68getPosition[] = "ProtChBody.getPosition(self)";
19445 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_69getPosition = {"getPosition", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_69getPosition, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_68getPosition};
19446 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_69getPosition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
19447  PyObject *__pyx_r = 0;
19448  __Pyx_RefNannyDeclarations
19449  __Pyx_RefNannySetupContext("getPosition (wrapper)", 0);
19450  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_68getPosition(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
19451 
19452  /* function exit code */
19453  __Pyx_RefNannyFinishContext();
19454  return __pyx_r;
19455 }
19456 
19457 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_68getPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
19458  PyObject *__pyx_v_chpos = NULL;
19459  PyObject *__pyx_r = NULL;
19460  __Pyx_TraceDeclarations
19461  __Pyx_RefNannyDeclarations
19462  PyObject *__pyx_t_1 = NULL;
19463  PyObject *__pyx_t_2 = NULL;
19464  PyObject *__pyx_t_3 = NULL;
19465  int __pyx_lineno = 0;
19466  const char *__pyx_filename = NULL;
19467  int __pyx_clineno = 0;
19468  __Pyx_TraceFrameInit(__pyx_codeobj__62)
19469  __Pyx_RefNannySetupContext("getPosition", 0);
19470  __Pyx_TraceCall("getPosition", __pyx_f[0], 859, 0, __PYX_ERR(0, 859, __pyx_L1_error));
19471 
19472  /* "mbd/CouplingFSI.pyx":860
19473  *
19474  * def getPosition(self):
19475  * chpos = self.ChBody.GetPos() # <<<<<<<<<<<<<<
19476  * return pyvec2array(chpos)
19477  *
19478  */
19479  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error)
19480  __Pyx_GOTREF(__pyx_t_2);
19481  __pyx_t_3 = NULL;
19482  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19483  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
19484  if (likely(__pyx_t_3)) {
19485  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19486  __Pyx_INCREF(__pyx_t_3);
19487  __Pyx_INCREF(function);
19488  __Pyx_DECREF_SET(__pyx_t_2, function);
19489  }
19490  }
19491  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
19492  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19493  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error)
19494  __Pyx_GOTREF(__pyx_t_1);
19495  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19496  __pyx_v_chpos = __pyx_t_1;
19497  __pyx_t_1 = 0;
19498 
19499  /* "mbd/CouplingFSI.pyx":861
19500  * def getPosition(self):
19501  * chpos = self.ChBody.GetPos()
19502  * return pyvec2array(chpos) # <<<<<<<<<<<<<<
19503  *
19504  * def setMass(self, double mass):
19505  */
19506  __Pyx_XDECREF(__pyx_r);
19507  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 861, __pyx_L1_error)
19508  __Pyx_GOTREF(__pyx_t_2);
19509  __pyx_t_3 = NULL;
19510  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
19511  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
19512  if (likely(__pyx_t_3)) {
19513  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19514  __Pyx_INCREF(__pyx_t_3);
19515  __Pyx_INCREF(function);
19516  __Pyx_DECREF_SET(__pyx_t_2, function);
19517  }
19518  }
19519  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_chpos) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_chpos);
19520  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19521  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 861, __pyx_L1_error)
19522  __Pyx_GOTREF(__pyx_t_1);
19523  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19524  __pyx_r = __pyx_t_1;
19525  __pyx_t_1 = 0;
19526  goto __pyx_L0;
19527 
19528  /* "mbd/CouplingFSI.pyx":859
19529  * self.ChBody.SetPos(chvec)
19530  *
19531  * def getPosition(self): # <<<<<<<<<<<<<<
19532  * chpos = self.ChBody.GetPos()
19533  * return pyvec2array(chpos)
19534  */
19535 
19536  /* function exit code */
19537  __pyx_L1_error:;
19538  __Pyx_XDECREF(__pyx_t_1);
19539  __Pyx_XDECREF(__pyx_t_2);
19540  __Pyx_XDECREF(__pyx_t_3);
19541  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getPosition", __pyx_clineno, __pyx_lineno, __pyx_filename);
19542  __pyx_r = NULL;
19543  __pyx_L0:;
19544  __Pyx_XDECREF(__pyx_v_chpos);
19545  __Pyx_XGIVEREF(__pyx_r);
19546  __Pyx_TraceReturn(__pyx_r, 0);
19547  __Pyx_RefNannyFinishContext();
19548  return __pyx_r;
19549 }
19550 
19551 /* "mbd/CouplingFSI.pyx":863
19552  * return pyvec2array(chpos)
19553  *
19554  * def setMass(self, double mass): # <<<<<<<<<<<<<<
19555  * self.ChBody.SetMass(mass)
19556  *
19557  */
19558 
19559 /* Python wrapper */
19560 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_71setMass(PyObject *__pyx_v_self, PyObject *__pyx_arg_mass); /*proto*/
19561 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_70setMass[] = "ProtChBody.setMass(self, double mass)";
19562 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_71setMass = {"setMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_71setMass, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_70setMass};
19563 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_71setMass(PyObject *__pyx_v_self, PyObject *__pyx_arg_mass) {
19564  double __pyx_v_mass;
19565  int __pyx_lineno = 0;
19566  const char *__pyx_filename = NULL;
19567  int __pyx_clineno = 0;
19568  PyObject *__pyx_r = 0;
19569  __Pyx_RefNannyDeclarations
19570  __Pyx_RefNannySetupContext("setMass (wrapper)", 0);
19571  assert(__pyx_arg_mass); {
19572  __pyx_v_mass = __pyx_PyFloat_AsDouble(__pyx_arg_mass); if (unlikely((__pyx_v_mass == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 863, __pyx_L3_error)
19573  }
19574  goto __pyx_L4_argument_unpacking_done;
19575  __pyx_L3_error:;
19576  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
19577  __Pyx_RefNannyFinishContext();
19578  return NULL;
19579  __pyx_L4_argument_unpacking_done:;
19580  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_70setMass(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((double)__pyx_v_mass));
19581 
19582  /* function exit code */
19583  __Pyx_RefNannyFinishContext();
19584  return __pyx_r;
19585 }
19586 
19587 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_70setMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_mass) {
19588  PyObject *__pyx_r = NULL;
19589  __Pyx_TraceDeclarations
19590  __Pyx_RefNannyDeclarations
19591  PyObject *__pyx_t_1 = NULL;
19592  PyObject *__pyx_t_2 = NULL;
19593  PyObject *__pyx_t_3 = NULL;
19594  PyObject *__pyx_t_4 = NULL;
19595  int __pyx_lineno = 0;
19596  const char *__pyx_filename = NULL;
19597  int __pyx_clineno = 0;
19598  __Pyx_TraceFrameInit(__pyx_codeobj__63)
19599  __Pyx_RefNannySetupContext("setMass", 0);
19600  __Pyx_TraceCall("setMass", __pyx_f[0], 863, 0, __PYX_ERR(0, 863, __pyx_L1_error));
19601 
19602  /* "mbd/CouplingFSI.pyx":864
19603  *
19604  * def setMass(self, double mass):
19605  * self.ChBody.SetMass(mass) # <<<<<<<<<<<<<<
19606  *
19607  * def getMass(self):
19608  */
19609  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetMass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error)
19610  __Pyx_GOTREF(__pyx_t_2);
19611  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mass); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error)
19612  __Pyx_GOTREF(__pyx_t_3);
19613  __pyx_t_4 = NULL;
19614  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19615  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
19616  if (likely(__pyx_t_4)) {
19617  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19618  __Pyx_INCREF(__pyx_t_4);
19619  __Pyx_INCREF(function);
19620  __Pyx_DECREF_SET(__pyx_t_2, function);
19621  }
19622  }
19623  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
19624  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
19625  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19626  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error)
19627  __Pyx_GOTREF(__pyx_t_1);
19628  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19629  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19630 
19631  /* "mbd/CouplingFSI.pyx":863
19632  * return pyvec2array(chpos)
19633  *
19634  * def setMass(self, double mass): # <<<<<<<<<<<<<<
19635  * self.ChBody.SetMass(mass)
19636  *
19637  */
19638 
19639  /* function exit code */
19640  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19641  goto __pyx_L0;
19642  __pyx_L1_error:;
19643  __Pyx_XDECREF(__pyx_t_1);
19644  __Pyx_XDECREF(__pyx_t_2);
19645  __Pyx_XDECREF(__pyx_t_3);
19646  __Pyx_XDECREF(__pyx_t_4);
19647  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
19648  __pyx_r = NULL;
19649  __pyx_L0:;
19650  __Pyx_XGIVEREF(__pyx_r);
19651  __Pyx_TraceReturn(__pyx_r, 0);
19652  __Pyx_RefNannyFinishContext();
19653  return __pyx_r;
19654 }
19655 
19656 /* "mbd/CouplingFSI.pyx":866
19657  * self.ChBody.SetMass(mass)
19658  *
19659  * def getMass(self): # <<<<<<<<<<<<<<
19660  * return self.ChBody.GetMass()
19661  *
19662  */
19663 
19664 /* Python wrapper */
19665 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_73getMass(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
19666 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_72getMass[] = "ProtChBody.getMass(self)";
19667 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_73getMass = {"getMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_73getMass, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_72getMass};
19668 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_73getMass(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
19669  PyObject *__pyx_r = 0;
19670  __Pyx_RefNannyDeclarations
19671  __Pyx_RefNannySetupContext("getMass (wrapper)", 0);
19672  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_72getMass(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
19673 
19674  /* function exit code */
19675  __Pyx_RefNannyFinishContext();
19676  return __pyx_r;
19677 }
19678 
19679 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_72getMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
19680  PyObject *__pyx_r = NULL;
19681  __Pyx_TraceDeclarations
19682  __Pyx_RefNannyDeclarations
19683  PyObject *__pyx_t_1 = NULL;
19684  PyObject *__pyx_t_2 = NULL;
19685  PyObject *__pyx_t_3 = NULL;
19686  int __pyx_lineno = 0;
19687  const char *__pyx_filename = NULL;
19688  int __pyx_clineno = 0;
19689  __Pyx_TraceFrameInit(__pyx_codeobj__64)
19690  __Pyx_RefNannySetupContext("getMass", 0);
19691  __Pyx_TraceCall("getMass", __pyx_f[0], 866, 0, __PYX_ERR(0, 866, __pyx_L1_error));
19692 
19693  /* "mbd/CouplingFSI.pyx":867
19694  *
19695  * def getMass(self):
19696  * return self.ChBody.GetMass() # <<<<<<<<<<<<<<
19697  *
19698  * def setInertiaXX(self, np.ndarray inertia):
19699  */
19700  __Pyx_XDECREF(__pyx_r);
19701  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetMass); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error)
19702  __Pyx_GOTREF(__pyx_t_2);
19703  __pyx_t_3 = NULL;
19704  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
19705  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
19706  if (likely(__pyx_t_3)) {
19707  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
19708  __Pyx_INCREF(__pyx_t_3);
19709  __Pyx_INCREF(function);
19710  __Pyx_DECREF_SET(__pyx_t_2, function);
19711  }
19712  }
19713  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
19714  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
19715  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
19716  __Pyx_GOTREF(__pyx_t_1);
19717  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19718  __pyx_r = __pyx_t_1;
19719  __pyx_t_1 = 0;
19720  goto __pyx_L0;
19721 
19722  /* "mbd/CouplingFSI.pyx":866
19723  * self.ChBody.SetMass(mass)
19724  *
19725  * def getMass(self): # <<<<<<<<<<<<<<
19726  * return self.ChBody.GetMass()
19727  *
19728  */
19729 
19730  /* function exit code */
19731  __pyx_L1_error:;
19732  __Pyx_XDECREF(__pyx_t_1);
19733  __Pyx_XDECREF(__pyx_t_2);
19734  __Pyx_XDECREF(__pyx_t_3);
19735  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
19736  __pyx_r = NULL;
19737  __pyx_L0:;
19738  __Pyx_XGIVEREF(__pyx_r);
19739  __Pyx_TraceReturn(__pyx_r, 0);
19740  __Pyx_RefNannyFinishContext();
19741  return __pyx_r;
19742 }
19743 
19744 /* "mbd/CouplingFSI.pyx":869
19745  * return self.ChBody.GetMass()
19746  *
19747  * def setInertiaXX(self, np.ndarray inertia): # <<<<<<<<<<<<<<
19748  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
19749  * self.ChBody.SetInertiaXX(chvec)
19750  */
19751 
19752 /* Python wrapper */
19753 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_75setInertiaXX(PyObject *__pyx_v_self, PyObject *__pyx_v_inertia); /*proto*/
19754 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_74setInertiaXX[] = "ProtChBody.setInertiaXX(self, ndarray inertia)";
19755 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_75setInertiaXX = {"setInertiaXX", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_75setInertiaXX, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_74setInertiaXX};
19756 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_75setInertiaXX(PyObject *__pyx_v_self, PyObject *__pyx_v_inertia) {
19757  int __pyx_lineno = 0;
19758  const char *__pyx_filename = NULL;
19759  int __pyx_clineno = 0;
19760  PyObject *__pyx_r = 0;
19761  __Pyx_RefNannyDeclarations
19762  __Pyx_RefNannySetupContext("setInertiaXX (wrapper)", 0);
19763  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inertia), __pyx_ptype_5numpy_ndarray, 1, "inertia", 0))) __PYX_ERR(0, 869, __pyx_L1_error)
19764  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_74setInertiaXX(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyArrayObject *)__pyx_v_inertia));
19765 
19766  /* function exit code */
19767  goto __pyx_L0;
19768  __pyx_L1_error:;
19769  __pyx_r = NULL;
19770  __pyx_L0:;
19771  __Pyx_RefNannyFinishContext();
19772  return __pyx_r;
19773 }
19774 
19775 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_74setInertiaXX(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_inertia) {
19776  PyObject *__pyx_v_chvec = NULL;
19777  PyObject *__pyx_r = NULL;
19778  __Pyx_TraceDeclarations
19779  __Pyx_RefNannyDeclarations
19780  PyObject *__pyx_t_1 = NULL;
19781  PyObject *__pyx_t_2 = NULL;
19782  PyObject *__pyx_t_3 = NULL;
19783  PyObject *__pyx_t_4 = NULL;
19784  PyObject *__pyx_t_5 = NULL;
19785  PyObject *__pyx_t_6 = NULL;
19786  int __pyx_t_7;
19787  PyObject *__pyx_t_8 = NULL;
19788  int __pyx_lineno = 0;
19789  const char *__pyx_filename = NULL;
19790  int __pyx_clineno = 0;
19791  __Pyx_TraceFrameInit(__pyx_codeobj__65)
19792  __Pyx_RefNannySetupContext("setInertiaXX", 0);
19793  __Pyx_TraceCall("setInertiaXX", __pyx_f[0], 869, 0, __PYX_ERR(0, 869, __pyx_L1_error));
19794 
19795  /* "mbd/CouplingFSI.pyx":870
19796  *
19797  * def setInertiaXX(self, np.ndarray inertia):
19798  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2]) # <<<<<<<<<<<<<<
19799  * self.ChBody.SetInertiaXX(chvec)
19800  *
19801  */
19802  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chrono); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
19803  __Pyx_GOTREF(__pyx_t_2);
19804  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChVectorD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error)
19805  __Pyx_GOTREF(__pyx_t_3);
19806  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19807  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_inertia), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 870, __pyx_L1_error)
19808  __Pyx_GOTREF(__pyx_t_2);
19809  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_inertia), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
19810  __Pyx_GOTREF(__pyx_t_4);
19811  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_inertia), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 870, __pyx_L1_error)
19812  __Pyx_GOTREF(__pyx_t_5);
19813  __pyx_t_6 = NULL;
19814  __pyx_t_7 = 0;
19815  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
19816  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
19817  if (likely(__pyx_t_6)) {
19818  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
19819  __Pyx_INCREF(__pyx_t_6);
19820  __Pyx_INCREF(function);
19821  __Pyx_DECREF_SET(__pyx_t_3, function);
19822  __pyx_t_7 = 1;
19823  }
19824  }
19825  #if CYTHON_FAST_PYCALL
19826  if (PyFunction_Check(__pyx_t_3)) {
19827  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
19828  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
19829  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19830  __Pyx_GOTREF(__pyx_t_1);
19831  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19832  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19833  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19834  } else
19835  #endif
19836  #if CYTHON_FAST_PYCCALL
19837  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
19838  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
19839  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
19840  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
19841  __Pyx_GOTREF(__pyx_t_1);
19842  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19843  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19844  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
19845  } else
19846  #endif
19847  {
19848  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 870, __pyx_L1_error)
19849  __Pyx_GOTREF(__pyx_t_8);
19850  if (__pyx_t_6) {
19851  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
19852  }
19853  __Pyx_GIVEREF(__pyx_t_2);
19854  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2);
19855  __Pyx_GIVEREF(__pyx_t_4);
19856  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
19857  __Pyx_GIVEREF(__pyx_t_5);
19858  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
19859  __pyx_t_2 = 0;
19860  __pyx_t_4 = 0;
19861  __pyx_t_5 = 0;
19862  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
19863  __Pyx_GOTREF(__pyx_t_1);
19864  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
19865  }
19866  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19867  __pyx_v_chvec = __pyx_t_1;
19868  __pyx_t_1 = 0;
19869 
19870  /* "mbd/CouplingFSI.pyx":871
19871  * def setInertiaXX(self, np.ndarray inertia):
19872  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
19873  * self.ChBody.SetInertiaXX(chvec) # <<<<<<<<<<<<<<
19874  *
19875  * def setInertiaXY(self, np.ndarray inertia):
19876  */
19877  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetInertiaXX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error)
19878  __Pyx_GOTREF(__pyx_t_3);
19879  __pyx_t_8 = NULL;
19880  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
19881  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
19882  if (likely(__pyx_t_8)) {
19883  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
19884  __Pyx_INCREF(__pyx_t_8);
19885  __Pyx_INCREF(function);
19886  __Pyx_DECREF_SET(__pyx_t_3, function);
19887  }
19888  }
19889  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_chvec) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_chvec);
19890  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
19891  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
19892  __Pyx_GOTREF(__pyx_t_1);
19893  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19894  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
19895 
19896  /* "mbd/CouplingFSI.pyx":869
19897  * return self.ChBody.GetMass()
19898  *
19899  * def setInertiaXX(self, np.ndarray inertia): # <<<<<<<<<<<<<<
19900  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
19901  * self.ChBody.SetInertiaXX(chvec)
19902  */
19903 
19904  /* function exit code */
19905  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
19906  goto __pyx_L0;
19907  __pyx_L1_error:;
19908  __Pyx_XDECREF(__pyx_t_1);
19909  __Pyx_XDECREF(__pyx_t_2);
19910  __Pyx_XDECREF(__pyx_t_3);
19911  __Pyx_XDECREF(__pyx_t_4);
19912  __Pyx_XDECREF(__pyx_t_5);
19913  __Pyx_XDECREF(__pyx_t_6);
19914  __Pyx_XDECREF(__pyx_t_8);
19915  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setInertiaXX", __pyx_clineno, __pyx_lineno, __pyx_filename);
19916  __pyx_r = NULL;
19917  __pyx_L0:;
19918  __Pyx_XDECREF(__pyx_v_chvec);
19919  __Pyx_XGIVEREF(__pyx_r);
19920  __Pyx_TraceReturn(__pyx_r, 0);
19921  __Pyx_RefNannyFinishContext();
19922  return __pyx_r;
19923 }
19924 
19925 /* "mbd/CouplingFSI.pyx":873
19926  * self.ChBody.SetInertiaXX(chvec)
19927  *
19928  * def setInertiaXY(self, np.ndarray inertia): # <<<<<<<<<<<<<<
19929  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
19930  * self.ChBody.SetInertiaXY(chvec)
19931  */
19932 
19933 /* Python wrapper */
19934 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_77setInertiaXY(PyObject *__pyx_v_self, PyObject *__pyx_v_inertia); /*proto*/
19935 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_76setInertiaXY[] = "ProtChBody.setInertiaXY(self, ndarray inertia)";
19936 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_77setInertiaXY = {"setInertiaXY", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_77setInertiaXY, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_76setInertiaXY};
19937 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_77setInertiaXY(PyObject *__pyx_v_self, PyObject *__pyx_v_inertia) {
19938  int __pyx_lineno = 0;
19939  const char *__pyx_filename = NULL;
19940  int __pyx_clineno = 0;
19941  PyObject *__pyx_r = 0;
19942  __Pyx_RefNannyDeclarations
19943  __Pyx_RefNannySetupContext("setInertiaXY (wrapper)", 0);
19944  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_inertia), __pyx_ptype_5numpy_ndarray, 1, "inertia", 0))) __PYX_ERR(0, 873, __pyx_L1_error)
19945  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_76setInertiaXY(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyArrayObject *)__pyx_v_inertia));
19946 
19947  /* function exit code */
19948  goto __pyx_L0;
19949  __pyx_L1_error:;
19950  __pyx_r = NULL;
19951  __pyx_L0:;
19952  __Pyx_RefNannyFinishContext();
19953  return __pyx_r;
19954 }
19955 
19956 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_76setInertiaXY(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_inertia) {
19957  PyObject *__pyx_v_chvec = NULL;
19958  PyObject *__pyx_r = NULL;
19959  __Pyx_TraceDeclarations
19960  __Pyx_RefNannyDeclarations
19961  PyObject *__pyx_t_1 = NULL;
19962  PyObject *__pyx_t_2 = NULL;
19963  PyObject *__pyx_t_3 = NULL;
19964  PyObject *__pyx_t_4 = NULL;
19965  PyObject *__pyx_t_5 = NULL;
19966  PyObject *__pyx_t_6 = NULL;
19967  int __pyx_t_7;
19968  PyObject *__pyx_t_8 = NULL;
19969  int __pyx_lineno = 0;
19970  const char *__pyx_filename = NULL;
19971  int __pyx_clineno = 0;
19972  __Pyx_TraceFrameInit(__pyx_codeobj__66)
19973  __Pyx_RefNannySetupContext("setInertiaXY", 0);
19974  __Pyx_TraceCall("setInertiaXY", __pyx_f[0], 873, 0, __PYX_ERR(0, 873, __pyx_L1_error));
19975 
19976  /* "mbd/CouplingFSI.pyx":874
19977  *
19978  * def setInertiaXY(self, np.ndarray inertia):
19979  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2]) # <<<<<<<<<<<<<<
19980  * self.ChBody.SetInertiaXY(chvec)
19981  *
19982  */
19983  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chrono); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error)
19984  __Pyx_GOTREF(__pyx_t_2);
19985  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChVectorD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error)
19986  __Pyx_GOTREF(__pyx_t_3);
19987  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
19988  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_inertia), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error)
19989  __Pyx_GOTREF(__pyx_t_2);
19990  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_inertia), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L1_error)
19991  __Pyx_GOTREF(__pyx_t_4);
19992  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_inertia), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 874, __pyx_L1_error)
19993  __Pyx_GOTREF(__pyx_t_5);
19994  __pyx_t_6 = NULL;
19995  __pyx_t_7 = 0;
19996  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
19997  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
19998  if (likely(__pyx_t_6)) {
19999  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
20000  __Pyx_INCREF(__pyx_t_6);
20001  __Pyx_INCREF(function);
20002  __Pyx_DECREF_SET(__pyx_t_3, function);
20003  __pyx_t_7 = 1;
20004  }
20005  }
20006  #if CYTHON_FAST_PYCALL
20007  if (PyFunction_Check(__pyx_t_3)) {
20008  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
20009  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
20010  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20011  __Pyx_GOTREF(__pyx_t_1);
20012  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20013  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20014  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20015  } else
20016  #endif
20017  #if CYTHON_FAST_PYCCALL
20018  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
20019  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
20020  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
20021  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20022  __Pyx_GOTREF(__pyx_t_1);
20023  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20024  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20025  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20026  } else
20027  #endif
20028  {
20029  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 874, __pyx_L1_error)
20030  __Pyx_GOTREF(__pyx_t_8);
20031  if (__pyx_t_6) {
20032  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
20033  }
20034  __Pyx_GIVEREF(__pyx_t_2);
20035  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2);
20036  __Pyx_GIVEREF(__pyx_t_4);
20037  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
20038  __Pyx_GIVEREF(__pyx_t_5);
20039  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
20040  __pyx_t_2 = 0;
20041  __pyx_t_4 = 0;
20042  __pyx_t_5 = 0;
20043  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
20044  __Pyx_GOTREF(__pyx_t_1);
20045  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20046  }
20047  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20048  __pyx_v_chvec = __pyx_t_1;
20049  __pyx_t_1 = 0;
20050 
20051  /* "mbd/CouplingFSI.pyx":875
20052  * def setInertiaXY(self, np.ndarray inertia):
20053  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
20054  * self.ChBody.SetInertiaXY(chvec) # <<<<<<<<<<<<<<
20055  *
20056  * def getInertia(self):
20057  */
20058  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetInertiaXY); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error)
20059  __Pyx_GOTREF(__pyx_t_3);
20060  __pyx_t_8 = NULL;
20061  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
20062  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
20063  if (likely(__pyx_t_8)) {
20064  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
20065  __Pyx_INCREF(__pyx_t_8);
20066  __Pyx_INCREF(function);
20067  __Pyx_DECREF_SET(__pyx_t_3, function);
20068  }
20069  }
20070  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_chvec) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_chvec);
20071  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20072  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error)
20073  __Pyx_GOTREF(__pyx_t_1);
20074  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20075  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20076 
20077  /* "mbd/CouplingFSI.pyx":873
20078  * self.ChBody.SetInertiaXX(chvec)
20079  *
20080  * def setInertiaXY(self, np.ndarray inertia): # <<<<<<<<<<<<<<
20081  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
20082  * self.ChBody.SetInertiaXY(chvec)
20083  */
20084 
20085  /* function exit code */
20086  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20087  goto __pyx_L0;
20088  __pyx_L1_error:;
20089  __Pyx_XDECREF(__pyx_t_1);
20090  __Pyx_XDECREF(__pyx_t_2);
20091  __Pyx_XDECREF(__pyx_t_3);
20092  __Pyx_XDECREF(__pyx_t_4);
20093  __Pyx_XDECREF(__pyx_t_5);
20094  __Pyx_XDECREF(__pyx_t_6);
20095  __Pyx_XDECREF(__pyx_t_8);
20096  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setInertiaXY", __pyx_clineno, __pyx_lineno, __pyx_filename);
20097  __pyx_r = NULL;
20098  __pyx_L0:;
20099  __Pyx_XDECREF(__pyx_v_chvec);
20100  __Pyx_XGIVEREF(__pyx_r);
20101  __Pyx_TraceReturn(__pyx_r, 0);
20102  __Pyx_RefNannyFinishContext();
20103  return __pyx_r;
20104 }
20105 
20106 /* "mbd/CouplingFSI.pyx":877
20107  * self.ChBody.SetInertiaXY(chvec)
20108  *
20109  * def getInertia(self): # <<<<<<<<<<<<<<
20110  * iner = pymat332array(self.ChBody.GetInertia())
20111  * return iner
20112  */
20113 
20114 /* Python wrapper */
20115 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_79getInertia(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
20116 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_78getInertia[] = "ProtChBody.getInertia(self)";
20117 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_79getInertia = {"getInertia", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_79getInertia, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_78getInertia};
20118 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_79getInertia(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
20119  PyObject *__pyx_r = 0;
20120  __Pyx_RefNannyDeclarations
20121  __Pyx_RefNannySetupContext("getInertia (wrapper)", 0);
20122  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_78getInertia(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
20123 
20124  /* function exit code */
20125  __Pyx_RefNannyFinishContext();
20126  return __pyx_r;
20127 }
20128 
20129 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_78getInertia(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
20130  PyObject *__pyx_v_iner = NULL;
20131  PyObject *__pyx_r = NULL;
20132  __Pyx_TraceDeclarations
20133  __Pyx_RefNannyDeclarations
20134  PyObject *__pyx_t_1 = NULL;
20135  PyObject *__pyx_t_2 = NULL;
20136  PyObject *__pyx_t_3 = NULL;
20137  PyObject *__pyx_t_4 = NULL;
20138  PyObject *__pyx_t_5 = NULL;
20139  int __pyx_lineno = 0;
20140  const char *__pyx_filename = NULL;
20141  int __pyx_clineno = 0;
20142  __Pyx_TraceFrameInit(__pyx_codeobj__67)
20143  __Pyx_RefNannySetupContext("getInertia", 0);
20144  __Pyx_TraceCall("getInertia", __pyx_f[0], 877, 0, __PYX_ERR(0, 877, __pyx_L1_error));
20145 
20146  /* "mbd/CouplingFSI.pyx":878
20147  *
20148  * def getInertia(self):
20149  * iner = pymat332array(self.ChBody.GetInertia()) # <<<<<<<<<<<<<<
20150  * return iner
20151  *
20152  */
20153  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pymat332array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error)
20154  __Pyx_GOTREF(__pyx_t_2);
20155  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetInertia); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error)
20156  __Pyx_GOTREF(__pyx_t_4);
20157  __pyx_t_5 = NULL;
20158  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
20159  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
20160  if (likely(__pyx_t_5)) {
20161  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20162  __Pyx_INCREF(__pyx_t_5);
20163  __Pyx_INCREF(function);
20164  __Pyx_DECREF_SET(__pyx_t_4, function);
20165  }
20166  }
20167  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
20168  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
20169  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error)
20170  __Pyx_GOTREF(__pyx_t_3);
20171  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20172  __pyx_t_4 = NULL;
20173  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
20174  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
20175  if (likely(__pyx_t_4)) {
20176  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20177  __Pyx_INCREF(__pyx_t_4);
20178  __Pyx_INCREF(function);
20179  __Pyx_DECREF_SET(__pyx_t_2, function);
20180  }
20181  }
20182  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
20183  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
20184  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20185  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 878, __pyx_L1_error)
20186  __Pyx_GOTREF(__pyx_t_1);
20187  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20188  __pyx_v_iner = __pyx_t_1;
20189  __pyx_t_1 = 0;
20190 
20191  /* "mbd/CouplingFSI.pyx":879
20192  * def getInertia(self):
20193  * iner = pymat332array(self.ChBody.GetInertia())
20194  * return iner # <<<<<<<<<<<<<<
20195  *
20196  * def getVelocity(self):
20197  */
20198  __Pyx_XDECREF(__pyx_r);
20199  __Pyx_INCREF(__pyx_v_iner);
20200  __pyx_r = __pyx_v_iner;
20201  goto __pyx_L0;
20202 
20203  /* "mbd/CouplingFSI.pyx":877
20204  * self.ChBody.SetInertiaXY(chvec)
20205  *
20206  * def getInertia(self): # <<<<<<<<<<<<<<
20207  * iner = pymat332array(self.ChBody.GetInertia())
20208  * return iner
20209  */
20210 
20211  /* function exit code */
20212  __pyx_L1_error:;
20213  __Pyx_XDECREF(__pyx_t_1);
20214  __Pyx_XDECREF(__pyx_t_2);
20215  __Pyx_XDECREF(__pyx_t_3);
20216  __Pyx_XDECREF(__pyx_t_4);
20217  __Pyx_XDECREF(__pyx_t_5);
20218  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getInertia", __pyx_clineno, __pyx_lineno, __pyx_filename);
20219  __pyx_r = NULL;
20220  __pyx_L0:;
20221  __Pyx_XDECREF(__pyx_v_iner);
20222  __Pyx_XGIVEREF(__pyx_r);
20223  __Pyx_TraceReturn(__pyx_r, 0);
20224  __Pyx_RefNannyFinishContext();
20225  return __pyx_r;
20226 }
20227 
20228 /* "mbd/CouplingFSI.pyx":881
20229  * return iner
20230  *
20231  * def getVelocity(self): # <<<<<<<<<<<<<<
20232  * chvel = self.ChBody.GetPos_dt()
20233  * return pyvec2array(chvel)
20234  */
20235 
20236 /* Python wrapper */
20237 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_81getVelocity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
20238 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_80getVelocity[] = "ProtChBody.getVelocity(self)";
20239 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_81getVelocity = {"getVelocity", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_81getVelocity, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_80getVelocity};
20240 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_81getVelocity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
20241  PyObject *__pyx_r = 0;
20242  __Pyx_RefNannyDeclarations
20243  __Pyx_RefNannySetupContext("getVelocity (wrapper)", 0);
20244  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_80getVelocity(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
20245 
20246  /* function exit code */
20247  __Pyx_RefNannyFinishContext();
20248  return __pyx_r;
20249 }
20250 
20251 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_80getVelocity(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
20252  PyObject *__pyx_v_chvel = NULL;
20253  PyObject *__pyx_r = NULL;
20254  __Pyx_TraceDeclarations
20255  __Pyx_RefNannyDeclarations
20256  PyObject *__pyx_t_1 = NULL;
20257  PyObject *__pyx_t_2 = NULL;
20258  PyObject *__pyx_t_3 = NULL;
20259  int __pyx_lineno = 0;
20260  const char *__pyx_filename = NULL;
20261  int __pyx_clineno = 0;
20262  __Pyx_TraceFrameInit(__pyx_codeobj__68)
20263  __Pyx_RefNannySetupContext("getVelocity", 0);
20264  __Pyx_TraceCall("getVelocity", __pyx_f[0], 881, 0, __PYX_ERR(0, 881, __pyx_L1_error));
20265 
20266  /* "mbd/CouplingFSI.pyx":882
20267  *
20268  * def getVelocity(self):
20269  * chvel = self.ChBody.GetPos_dt() # <<<<<<<<<<<<<<
20270  * return pyvec2array(chvel)
20271  *
20272  */
20273  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos_dt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
20274  __Pyx_GOTREF(__pyx_t_2);
20275  __pyx_t_3 = NULL;
20276  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
20277  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
20278  if (likely(__pyx_t_3)) {
20279  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20280  __Pyx_INCREF(__pyx_t_3);
20281  __Pyx_INCREF(function);
20282  __Pyx_DECREF_SET(__pyx_t_2, function);
20283  }
20284  }
20285  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
20286  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20287  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
20288  __Pyx_GOTREF(__pyx_t_1);
20289  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20290  __pyx_v_chvel = __pyx_t_1;
20291  __pyx_t_1 = 0;
20292 
20293  /* "mbd/CouplingFSI.pyx":883
20294  * def getVelocity(self):
20295  * chvel = self.ChBody.GetPos_dt()
20296  * return pyvec2array(chvel) # <<<<<<<<<<<<<<
20297  *
20298  * def setVelocity(self, np.ndarray vel):
20299  */
20300  __Pyx_XDECREF(__pyx_r);
20301  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 883, __pyx_L1_error)
20302  __Pyx_GOTREF(__pyx_t_2);
20303  __pyx_t_3 = NULL;
20304  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
20305  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
20306  if (likely(__pyx_t_3)) {
20307  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20308  __Pyx_INCREF(__pyx_t_3);
20309  __Pyx_INCREF(function);
20310  __Pyx_DECREF_SET(__pyx_t_2, function);
20311  }
20312  }
20313  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_chvel) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_chvel);
20314  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20315  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 883, __pyx_L1_error)
20316  __Pyx_GOTREF(__pyx_t_1);
20317  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20318  __pyx_r = __pyx_t_1;
20319  __pyx_t_1 = 0;
20320  goto __pyx_L0;
20321 
20322  /* "mbd/CouplingFSI.pyx":881
20323  * return iner
20324  *
20325  * def getVelocity(self): # <<<<<<<<<<<<<<
20326  * chvel = self.ChBody.GetPos_dt()
20327  * return pyvec2array(chvel)
20328  */
20329 
20330  /* function exit code */
20331  __pyx_L1_error:;
20332  __Pyx_XDECREF(__pyx_t_1);
20333  __Pyx_XDECREF(__pyx_t_2);
20334  __Pyx_XDECREF(__pyx_t_3);
20335  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
20336  __pyx_r = NULL;
20337  __pyx_L0:;
20338  __Pyx_XDECREF(__pyx_v_chvel);
20339  __Pyx_XGIVEREF(__pyx_r);
20340  __Pyx_TraceReturn(__pyx_r, 0);
20341  __Pyx_RefNannyFinishContext();
20342  return __pyx_r;
20343 }
20344 
20345 /* "mbd/CouplingFSI.pyx":885
20346  * return pyvec2array(chvel)
20347  *
20348  * def setVelocity(self, np.ndarray vel): # <<<<<<<<<<<<<<
20349  * chvec = chrono.ChVectorD(vel[0], vel[1], vel[2])
20350  * self.ChBody.SetPos_dt(chvec)
20351  */
20352 
20353 /* Python wrapper */
20354 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_83setVelocity(PyObject *__pyx_v_self, PyObject *__pyx_v_vel); /*proto*/
20355 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_82setVelocity[] = "ProtChBody.setVelocity(self, ndarray vel)";
20356 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_83setVelocity = {"setVelocity", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_83setVelocity, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_82setVelocity};
20357 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_83setVelocity(PyObject *__pyx_v_self, PyObject *__pyx_v_vel) {
20358  int __pyx_lineno = 0;
20359  const char *__pyx_filename = NULL;
20360  int __pyx_clineno = 0;
20361  PyObject *__pyx_r = 0;
20362  __Pyx_RefNannyDeclarations
20363  __Pyx_RefNannySetupContext("setVelocity (wrapper)", 0);
20364  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vel), __pyx_ptype_5numpy_ndarray, 1, "vel", 0))) __PYX_ERR(0, 885, __pyx_L1_error)
20365  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_82setVelocity(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyArrayObject *)__pyx_v_vel));
20366 
20367  /* function exit code */
20368  goto __pyx_L0;
20369  __pyx_L1_error:;
20370  __pyx_r = NULL;
20371  __pyx_L0:;
20372  __Pyx_RefNannyFinishContext();
20373  return __pyx_r;
20374 }
20375 
20376 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_82setVelocity(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_vel) {
20377  PyObject *__pyx_v_chvec = NULL;
20378  PyObject *__pyx_r = NULL;
20379  __Pyx_TraceDeclarations
20380  __Pyx_RefNannyDeclarations
20381  PyObject *__pyx_t_1 = NULL;
20382  PyObject *__pyx_t_2 = NULL;
20383  PyObject *__pyx_t_3 = NULL;
20384  PyObject *__pyx_t_4 = NULL;
20385  PyObject *__pyx_t_5 = NULL;
20386  PyObject *__pyx_t_6 = NULL;
20387  int __pyx_t_7;
20388  PyObject *__pyx_t_8 = NULL;
20389  int __pyx_lineno = 0;
20390  const char *__pyx_filename = NULL;
20391  int __pyx_clineno = 0;
20392  __Pyx_TraceFrameInit(__pyx_codeobj__69)
20393  __Pyx_RefNannySetupContext("setVelocity", 0);
20394  __Pyx_TraceCall("setVelocity", __pyx_f[0], 885, 0, __PYX_ERR(0, 885, __pyx_L1_error));
20395 
20396  /* "mbd/CouplingFSI.pyx":886
20397  *
20398  * def setVelocity(self, np.ndarray vel):
20399  * chvec = chrono.ChVectorD(vel[0], vel[1], vel[2]) # <<<<<<<<<<<<<<
20400  * self.ChBody.SetPos_dt(chvec)
20401  *
20402  */
20403  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chrono); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
20404  __Pyx_GOTREF(__pyx_t_2);
20405  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChVectorD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error)
20406  __Pyx_GOTREF(__pyx_t_3);
20407  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20408  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vel), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error)
20409  __Pyx_GOTREF(__pyx_t_2);
20410  __pyx_t_4 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vel), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L1_error)
20411  __Pyx_GOTREF(__pyx_t_4);
20412  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_vel), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 886, __pyx_L1_error)
20413  __Pyx_GOTREF(__pyx_t_5);
20414  __pyx_t_6 = NULL;
20415  __pyx_t_7 = 0;
20416  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
20417  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
20418  if (likely(__pyx_t_6)) {
20419  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
20420  __Pyx_INCREF(__pyx_t_6);
20421  __Pyx_INCREF(function);
20422  __Pyx_DECREF_SET(__pyx_t_3, function);
20423  __pyx_t_7 = 1;
20424  }
20425  }
20426  #if CYTHON_FAST_PYCALL
20427  if (PyFunction_Check(__pyx_t_3)) {
20428  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
20429  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
20430  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20431  __Pyx_GOTREF(__pyx_t_1);
20432  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20433  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20434  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20435  } else
20436  #endif
20437  #if CYTHON_FAST_PYCCALL
20438  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
20439  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
20440  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
20441  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20442  __Pyx_GOTREF(__pyx_t_1);
20443  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20444  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20445  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20446  } else
20447  #endif
20448  {
20449  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 886, __pyx_L1_error)
20450  __Pyx_GOTREF(__pyx_t_8);
20451  if (__pyx_t_6) {
20452  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
20453  }
20454  __Pyx_GIVEREF(__pyx_t_2);
20455  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2);
20456  __Pyx_GIVEREF(__pyx_t_4);
20457  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
20458  __Pyx_GIVEREF(__pyx_t_5);
20459  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
20460  __pyx_t_2 = 0;
20461  __pyx_t_4 = 0;
20462  __pyx_t_5 = 0;
20463  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
20464  __Pyx_GOTREF(__pyx_t_1);
20465  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20466  }
20467  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20468  __pyx_v_chvec = __pyx_t_1;
20469  __pyx_t_1 = 0;
20470 
20471  /* "mbd/CouplingFSI.pyx":887
20472  * def setVelocity(self, np.ndarray vel):
20473  * chvec = chrono.ChVectorD(vel[0], vel[1], vel[2])
20474  * self.ChBody.SetPos_dt(chvec) # <<<<<<<<<<<<<<
20475  *
20476  * def prediction(self):
20477  */
20478  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_SetPos_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 887, __pyx_L1_error)
20479  __Pyx_GOTREF(__pyx_t_3);
20480  __pyx_t_8 = NULL;
20481  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
20482  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
20483  if (likely(__pyx_t_8)) {
20484  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
20485  __Pyx_INCREF(__pyx_t_8);
20486  __Pyx_INCREF(function);
20487  __Pyx_DECREF_SET(__pyx_t_3, function);
20488  }
20489  }
20490  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_chvec) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_chvec);
20491  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
20492  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error)
20493  __Pyx_GOTREF(__pyx_t_1);
20494  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20495  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20496 
20497  /* "mbd/CouplingFSI.pyx":885
20498  * return pyvec2array(chvel)
20499  *
20500  * def setVelocity(self, np.ndarray vel): # <<<<<<<<<<<<<<
20501  * chvec = chrono.ChVectorD(vel[0], vel[1], vel[2])
20502  * self.ChBody.SetPos_dt(chvec)
20503  */
20504 
20505  /* function exit code */
20506  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20507  goto __pyx_L0;
20508  __pyx_L1_error:;
20509  __Pyx_XDECREF(__pyx_t_1);
20510  __Pyx_XDECREF(__pyx_t_2);
20511  __Pyx_XDECREF(__pyx_t_3);
20512  __Pyx_XDECREF(__pyx_t_4);
20513  __Pyx_XDECREF(__pyx_t_5);
20514  __Pyx_XDECREF(__pyx_t_6);
20515  __Pyx_XDECREF(__pyx_t_8);
20516  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
20517  __pyx_r = NULL;
20518  __pyx_L0:;
20519  __Pyx_XDECREF(__pyx_v_chvec);
20520  __Pyx_XGIVEREF(__pyx_r);
20521  __Pyx_TraceReturn(__pyx_r, 0);
20522  __Pyx_RefNannyFinishContext();
20523  return __pyx_r;
20524 }
20525 
20526 /* "mbd/CouplingFSI.pyx":889
20527  * self.ChBody.SetPos_dt(chvec)
20528  *
20529  * def prediction(self): # <<<<<<<<<<<<<<
20530  * comm = Comm.get().comm.tompi4py()
20531  * cdef ch.ChVector h_body_vec
20532  */
20533 
20534 /* Python wrapper */
20535 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_85prediction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
20536 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_84prediction[] = "ProtChBody.prediction(self)";
20537 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_85prediction = {"prediction", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_85prediction, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_84prediction};
20538 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_85prediction(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
20539  PyObject *__pyx_r = 0;
20540  __Pyx_RefNannyDeclarations
20541  __Pyx_RefNannySetupContext("prediction (wrapper)", 0);
20542  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_84prediction(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
20543 
20544  /* function exit code */
20545  __Pyx_RefNannyFinishContext();
20546  return __pyx_r;
20547 }
20548 
20549 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_84prediction(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
20550  CYTHON_UNUSED PyObject *__pyx_v_comm = NULL;
20551  CYTHON_UNUSED ChVector<double> __pyx_v_h_body_vec;
20552  CYTHON_UNUSED double __pyx_v_dt;
20553  CYTHON_UNUSED double __pyx_v_dt_next;
20554  PyObject *__pyx_r = NULL;
20555  __Pyx_TraceDeclarations
20556  __Pyx_RefNannyDeclarations
20557  PyObject *__pyx_t_1 = NULL;
20558  PyObject *__pyx_t_2 = NULL;
20559  PyObject *__pyx_t_3 = NULL;
20560  PyObject *__pyx_t_4 = NULL;
20561  int __pyx_t_5;
20562  int __pyx_t_6;
20563  PyObject *__pyx_t_7 = NULL;
20564  PyObject *__pyx_t_8 = NULL;
20565  PyObject *__pyx_t_9 = NULL;
20566  double __pyx_t_10;
20567  int __pyx_lineno = 0;
20568  const char *__pyx_filename = NULL;
20569  int __pyx_clineno = 0;
20570  __Pyx_TraceFrameInit(__pyx_codeobj__70)
20571  __Pyx_RefNannySetupContext("prediction", 0);
20572  __Pyx_TraceCall("prediction", __pyx_f[0], 889, 0, __PYX_ERR(0, 889, __pyx_L1_error));
20573 
20574  /* "mbd/CouplingFSI.pyx":890
20575  *
20576  * def prediction(self):
20577  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
20578  * cdef ch.ChVector h_body_vec
20579  * h_body_vec = self.thisptr.hxyz(<double*> self.position_last.data, 0.)
20580  */
20581  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 890, __pyx_L1_error)
20582  __Pyx_GOTREF(__pyx_t_3);
20583  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error)
20584  __Pyx_GOTREF(__pyx_t_4);
20585  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20586  __pyx_t_3 = NULL;
20587  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
20588  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
20589  if (likely(__pyx_t_3)) {
20590  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
20591  __Pyx_INCREF(__pyx_t_3);
20592  __Pyx_INCREF(function);
20593  __Pyx_DECREF_SET(__pyx_t_4, function);
20594  }
20595  }
20596  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
20597  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20598  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
20599  __Pyx_GOTREF(__pyx_t_2);
20600  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20601  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 890, __pyx_L1_error)
20602  __Pyx_GOTREF(__pyx_t_4);
20603  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20604  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 890, __pyx_L1_error)
20605  __Pyx_GOTREF(__pyx_t_2);
20606  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20607  __pyx_t_4 = NULL;
20608  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
20609  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
20610  if (likely(__pyx_t_4)) {
20611  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
20612  __Pyx_INCREF(__pyx_t_4);
20613  __Pyx_INCREF(function);
20614  __Pyx_DECREF_SET(__pyx_t_2, function);
20615  }
20616  }
20617  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
20618  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
20619  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error)
20620  __Pyx_GOTREF(__pyx_t_1);
20621  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
20622  __pyx_v_comm = __pyx_t_1;
20623  __pyx_t_1 = 0;
20624 
20625  /* "mbd/CouplingFSI.pyx":892
20626  * comm = Comm.get().comm.tompi4py()
20627  * cdef ch.ChVector h_body_vec
20628  * h_body_vec = self.thisptr.hxyz(<double*> self.position_last.data, 0.) # <<<<<<<<<<<<<<
20629  * #print("MY BODY DISP: ", h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
20630  * if self.ProtChSystem.model is not None:
20631  */
20632  __pyx_v_h_body_vec = __pyx_v_self->thisptr->hxyz(((double *)__pyx_v_self->position_last->data), 0.);
20633 
20634  /* "mbd/CouplingFSI.pyx":894
20635  * h_body_vec = self.thisptr.hxyz(<double*> self.position_last.data, 0.)
20636  * #print("MY BODY DISP: ", h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
20637  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
20638  * try:
20639  * dt = self.ProtChSystem.proteus_dt
20640  */
20641  __pyx_t_5 = (__pyx_v_self->ProtChSystem->model != Py_None);
20642  __pyx_t_6 = (__pyx_t_5 != 0);
20643  if (__pyx_t_6) {
20644 
20645  /* "mbd/CouplingFSI.pyx":895
20646  * #print("MY BODY DISP: ", h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
20647  * if self.ProtChSystem.model is not None:
20648  * try: # <<<<<<<<<<<<<<
20649  * dt = self.ProtChSystem.proteus_dt
20650  * dt_next = self.ProtChSystem.proteus_dt_next
20651  */
20652  {
20653  (void)__pyx_t_7; (void)__pyx_t_8; (void)__pyx_t_9; /* mark used */
20654  /*try:*/ {
20655 
20656  /* "mbd/CouplingFSI.pyx":896
20657  * if self.ProtChSystem.model is not None:
20658  * try:
20659  * dt = self.ProtChSystem.proteus_dt # <<<<<<<<<<<<<<
20660  * dt_next = self.ProtChSystem.proteus_dt_next
20661  * except:
20662  */
20663  __pyx_t_10 = __pyx_v_self->ProtChSystem->proteus_dt;
20664  __pyx_v_dt = __pyx_t_10;
20665 
20666  /* "mbd/CouplingFSI.pyx":897
20667  * try:
20668  * dt = self.ProtChSystem.proteus_dt
20669  * dt_next = self.ProtChSystem.proteus_dt_next # <<<<<<<<<<<<<<
20670  * except:
20671  * dt = 0.
20672  */
20673  __pyx_t_10 = __pyx_v_self->ProtChSystem->proteus_dt_next;
20674  __pyx_v_dt_next = __pyx_t_10;
20675 
20676  /* "mbd/CouplingFSI.pyx":895
20677  * #print("MY BODY DISP: ", h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
20678  * if self.ProtChSystem.model is not None:
20679  * try: # <<<<<<<<<<<<<<
20680  * dt = self.ProtChSystem.proteus_dt
20681  * dt_next = self.ProtChSystem.proteus_dt_next
20682  */
20683  }
20684  }
20685 
20686  /* "mbd/CouplingFSI.pyx":894
20687  * h_body_vec = self.thisptr.hxyz(<double*> self.position_last.data, 0.)
20688  * #print("MY BODY DISP: ", h_body_vec.x(), h_body_vec.y(), h_body_vec.z())
20689  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
20690  * try:
20691  * dt = self.ProtChSystem.proteus_dt
20692  */
20693  }
20694 
20695  /* "mbd/CouplingFSI.pyx":942
20696  * # # print("BODY H:", h_body, self.velocity, self.ChBody.GetPos_dt())
20697  * # self.h_predict = h
20698  * self.predicted = True # <<<<<<<<<<<<<<
20699  *
20700  * def calculate_init(self):
20701  */
20702  __pyx_v_self->predicted = 1;
20703 
20704  /* "mbd/CouplingFSI.pyx":889
20705  * self.ChBody.SetPos_dt(chvec)
20706  *
20707  * def prediction(self): # <<<<<<<<<<<<<<
20708  * comm = Comm.get().comm.tompi4py()
20709  * cdef ch.ChVector h_body_vec
20710  */
20711 
20712  /* function exit code */
20713  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20714  goto __pyx_L0;
20715  __pyx_L1_error:;
20716  __Pyx_XDECREF(__pyx_t_1);
20717  __Pyx_XDECREF(__pyx_t_2);
20718  __Pyx_XDECREF(__pyx_t_3);
20719  __Pyx_XDECREF(__pyx_t_4);
20720  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.prediction", __pyx_clineno, __pyx_lineno, __pyx_filename);
20721  __pyx_r = NULL;
20722  __pyx_L0:;
20723  __Pyx_XDECREF(__pyx_v_comm);
20724  __Pyx_XGIVEREF(__pyx_r);
20725  __Pyx_TraceReturn(__pyx_r, 0);
20726  __Pyx_RefNannyFinishContext();
20727  return __pyx_r;
20728 }
20729 
20730 /* "mbd/CouplingFSI.pyx":944
20731  * self.predicted = True
20732  *
20733  * def calculate_init(self): # <<<<<<<<<<<<<<
20734  * """Called from self.ProtChSystem.calculate_init()
20735  * before simulation starts
20736  */
20737 
20738 /* Python wrapper */
20739 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_87calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
20740 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_86calculate_init[] = "ProtChBody.calculate_init(self)\nCalled from self.ProtChSystem.calculate_init()\n before simulation starts\n ";
20741 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_87calculate_init = {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_87calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_86calculate_init};
20742 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_87calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
20743  PyObject *__pyx_r = 0;
20744  __Pyx_RefNannyDeclarations
20745  __Pyx_RefNannySetupContext("calculate_init (wrapper)", 0);
20746  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_86calculate_init(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
20747 
20748  /* function exit code */
20749  __Pyx_RefNannyFinishContext();
20750  return __pyx_r;
20751 }
20752 
20753 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_86calculate_init(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
20754  PyArrayObject *__pyx_v_zeros = 0;
20755  PyObject *__pyx_r = NULL;
20756  __Pyx_TraceDeclarations
20757  __Pyx_RefNannyDeclarations
20758  int __pyx_t_1;
20759  int __pyx_t_2;
20760  PyObject *__pyx_t_3 = NULL;
20761  PyObject *__pyx_t_4 = NULL;
20762  PyObject *__pyx_t_5 = NULL;
20763  PyObject *__pyx_t_6 = NULL;
20764  PyObject *__pyx_t_7 = NULL;
20765  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_t_8 = NULL;
20766  int __pyx_t_9;
20767  int __pyx_lineno = 0;
20768  const char *__pyx_filename = NULL;
20769  int __pyx_clineno = 0;
20770  __Pyx_TraceFrameInit(__pyx_codeobj__71)
20771  __Pyx_RefNannySetupContext("calculate_init", 0);
20772  __Pyx_TraceCall("calculate_init", __pyx_f[0], 944, 0, __PYX_ERR(0, 944, __pyx_L1_error));
20773 
20774  /* "mbd/CouplingFSI.pyx":949
20775  * """
20776  * # barycenter0 used for moment calculations
20777  * if self.Shape is not None: # <<<<<<<<<<<<<<
20778  * self.barycenter0 = self.Shape.barycenter.copy()
20779  * else:
20780  */
20781  __pyx_t_1 = (__pyx_v_self->Shape != Py_None);
20782  __pyx_t_2 = (__pyx_t_1 != 0);
20783  if (__pyx_t_2) {
20784 
20785  /* "mbd/CouplingFSI.pyx":950
20786  * # barycenter0 used for moment calculations
20787  * if self.Shape is not None:
20788  * self.barycenter0 = self.Shape.barycenter.copy() # <<<<<<<<<<<<<<
20789  * else:
20790  * self.barycenter0 = pyvec2array(self.ChBody.GetPos())
20791  */
20792  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->Shape, __pyx_n_s_barycenter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 950, __pyx_L1_error)
20793  __Pyx_GOTREF(__pyx_t_4);
20794  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 950, __pyx_L1_error)
20795  __Pyx_GOTREF(__pyx_t_5);
20796  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20797  __pyx_t_4 = NULL;
20798  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
20799  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
20800  if (likely(__pyx_t_4)) {
20801  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
20802  __Pyx_INCREF(__pyx_t_4);
20803  __Pyx_INCREF(function);
20804  __Pyx_DECREF_SET(__pyx_t_5, function);
20805  }
20806  }
20807  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
20808  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
20809  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 950, __pyx_L1_error)
20810  __Pyx_GOTREF(__pyx_t_3);
20811  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20812  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 950, __pyx_L1_error)
20813  __Pyx_GIVEREF(__pyx_t_3);
20814  __Pyx_GOTREF(__pyx_v_self->barycenter0);
20815  __Pyx_DECREF(((PyObject *)__pyx_v_self->barycenter0));
20816  __pyx_v_self->barycenter0 = ((PyArrayObject *)__pyx_t_3);
20817  __pyx_t_3 = 0;
20818 
20819  /* "mbd/CouplingFSI.pyx":949
20820  * """
20821  * # barycenter0 used for moment calculations
20822  * if self.Shape is not None: # <<<<<<<<<<<<<<
20823  * self.barycenter0 = self.Shape.barycenter.copy()
20824  * else:
20825  */
20826  goto __pyx_L3;
20827  }
20828 
20829  /* "mbd/CouplingFSI.pyx":952
20830  * self.barycenter0 = self.Shape.barycenter.copy()
20831  * else:
20832  * self.barycenter0 = pyvec2array(self.ChBody.GetPos()) # <<<<<<<<<<<<<<
20833  * self.position_last[:] = pyvec2array(self.ChBody.GetPos())
20834  * self.position[:] = pyvec2array(self.ChBody.GetPos())
20835  */
20836  /*else*/ {
20837  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 952, __pyx_L1_error)
20838  __Pyx_GOTREF(__pyx_t_5);
20839  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 952, __pyx_L1_error)
20840  __Pyx_GOTREF(__pyx_t_6);
20841  __pyx_t_7 = NULL;
20842  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
20843  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
20844  if (likely(__pyx_t_7)) {
20845  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
20846  __Pyx_INCREF(__pyx_t_7);
20847  __Pyx_INCREF(function);
20848  __Pyx_DECREF_SET(__pyx_t_6, function);
20849  }
20850  }
20851  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
20852  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
20853  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 952, __pyx_L1_error)
20854  __Pyx_GOTREF(__pyx_t_4);
20855  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20856  __pyx_t_6 = NULL;
20857  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
20858  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
20859  if (likely(__pyx_t_6)) {
20860  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
20861  __Pyx_INCREF(__pyx_t_6);
20862  __Pyx_INCREF(function);
20863  __Pyx_DECREF_SET(__pyx_t_5, function);
20864  }
20865  }
20866  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
20867  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20868  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20869  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 952, __pyx_L1_error)
20870  __Pyx_GOTREF(__pyx_t_3);
20871  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20872  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 952, __pyx_L1_error)
20873  __Pyx_GIVEREF(__pyx_t_3);
20874  __Pyx_GOTREF(__pyx_v_self->barycenter0);
20875  __Pyx_DECREF(((PyObject *)__pyx_v_self->barycenter0));
20876  __pyx_v_self->barycenter0 = ((PyArrayObject *)__pyx_t_3);
20877  __pyx_t_3 = 0;
20878  }
20879  __pyx_L3:;
20880 
20881  /* "mbd/CouplingFSI.pyx":953
20882  * else:
20883  * self.barycenter0 = pyvec2array(self.ChBody.GetPos())
20884  * self.position_last[:] = pyvec2array(self.ChBody.GetPos()) # <<<<<<<<<<<<<<
20885  * self.position[:] = pyvec2array(self.ChBody.GetPos())
20886  * # check if IBM and set index if not set previously by user
20887  */
20888  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 953, __pyx_L1_error)
20889  __Pyx_GOTREF(__pyx_t_5);
20890  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 953, __pyx_L1_error)
20891  __Pyx_GOTREF(__pyx_t_6);
20892  __pyx_t_7 = NULL;
20893  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
20894  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
20895  if (likely(__pyx_t_7)) {
20896  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
20897  __Pyx_INCREF(__pyx_t_7);
20898  __Pyx_INCREF(function);
20899  __Pyx_DECREF_SET(__pyx_t_6, function);
20900  }
20901  }
20902  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
20903  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
20904  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 953, __pyx_L1_error)
20905  __Pyx_GOTREF(__pyx_t_4);
20906  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20907  __pyx_t_6 = NULL;
20908  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
20909  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
20910  if (likely(__pyx_t_6)) {
20911  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
20912  __Pyx_INCREF(__pyx_t_6);
20913  __Pyx_INCREF(function);
20914  __Pyx_DECREF_SET(__pyx_t_5, function);
20915  }
20916  }
20917  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
20918  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20919  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20920  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L1_error)
20921  __Pyx_GOTREF(__pyx_t_3);
20922  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20923  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->position_last), __pyx_t_3, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 953, __pyx_L1_error)
20924  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20925 
20926  /* "mbd/CouplingFSI.pyx":954
20927  * self.barycenter0 = pyvec2array(self.ChBody.GetPos())
20928  * self.position_last[:] = pyvec2array(self.ChBody.GetPos())
20929  * self.position[:] = pyvec2array(self.ChBody.GetPos()) # <<<<<<<<<<<<<<
20930  * # check if IBM and set index if not set previously by user
20931  * if self.useIBM:
20932  */
20933  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L1_error)
20934  __Pyx_GOTREF(__pyx_t_5);
20935  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 954, __pyx_L1_error)
20936  __Pyx_GOTREF(__pyx_t_6);
20937  __pyx_t_7 = NULL;
20938  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
20939  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
20940  if (likely(__pyx_t_7)) {
20941  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
20942  __Pyx_INCREF(__pyx_t_7);
20943  __Pyx_INCREF(function);
20944  __Pyx_DECREF_SET(__pyx_t_6, function);
20945  }
20946  }
20947  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
20948  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
20949  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
20950  __Pyx_GOTREF(__pyx_t_4);
20951  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
20952  __pyx_t_6 = NULL;
20953  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
20954  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
20955  if (likely(__pyx_t_6)) {
20956  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
20957  __Pyx_INCREF(__pyx_t_6);
20958  __Pyx_INCREF(function);
20959  __Pyx_DECREF_SET(__pyx_t_5, function);
20960  }
20961  }
20962  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
20963  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20964  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20965  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L1_error)
20966  __Pyx_GOTREF(__pyx_t_3);
20967  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
20968  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->position), __pyx_t_3, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 954, __pyx_L1_error)
20969  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20970 
20971  /* "mbd/CouplingFSI.pyx":956
20972  * self.position[:] = pyvec2array(self.ChBody.GetPos())
20973  * # check if IBM and set index if not set previously by user
20974  * if self.useIBM: # <<<<<<<<<<<<<<
20975  * if not self.boundaryFlags:
20976  * self.setBoundaryFlags([self.ProtChSystem.nBodiesIBM])
20977  */
20978  __pyx_t_2 = (__pyx_v_self->useIBM != 0);
20979  if (__pyx_t_2) {
20980 
20981  /* "mbd/CouplingFSI.pyx":957
20982  * # check if IBM and set index if not set previously by user
20983  * if self.useIBM:
20984  * if not self.boundaryFlags: # <<<<<<<<<<<<<<
20985  * self.setBoundaryFlags([self.ProtChSystem.nBodiesIBM])
20986  * self.ProtChSystem.nBodiesIBM += 1
20987  */
20988  __pyx_t_2 = __Pyx_PyObject_IsTrue(((PyObject *)__pyx_v_self->boundaryFlags)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 957, __pyx_L1_error)
20989  __pyx_t_1 = ((!__pyx_t_2) != 0);
20990  if (__pyx_t_1) {
20991 
20992  /* "mbd/CouplingFSI.pyx":958
20993  * if self.useIBM:
20994  * if not self.boundaryFlags:
20995  * self.setBoundaryFlags([self.ProtChSystem.nBodiesIBM]) # <<<<<<<<<<<<<<
20996  * self.ProtChSystem.nBodiesIBM += 1
20997  * # get the initial values for F and M
20998  */
20999  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setBoundaryFlags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
21000  __Pyx_GOTREF(__pyx_t_5);
21001  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->ProtChSystem->nBodiesIBM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L1_error)
21002  __Pyx_GOTREF(__pyx_t_4);
21003  __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 958, __pyx_L1_error)
21004  __Pyx_GOTREF(__pyx_t_6);
21005  __Pyx_GIVEREF(__pyx_t_4);
21006  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
21007  __pyx_t_4 = 0;
21008  __pyx_t_4 = NULL;
21009  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
21010  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
21011  if (likely(__pyx_t_4)) {
21012  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
21013  __Pyx_INCREF(__pyx_t_4);
21014  __Pyx_INCREF(function);
21015  __Pyx_DECREF_SET(__pyx_t_5, function);
21016  }
21017  }
21018  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
21019  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21020  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21021  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
21022  __Pyx_GOTREF(__pyx_t_3);
21023  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21024  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21025 
21026  /* "mbd/CouplingFSI.pyx":957
21027  * # check if IBM and set index if not set previously by user
21028  * if self.useIBM:
21029  * if not self.boundaryFlags: # <<<<<<<<<<<<<<
21030  * self.setBoundaryFlags([self.ProtChSystem.nBodiesIBM])
21031  * self.ProtChSystem.nBodiesIBM += 1
21032  */
21033  }
21034 
21035  /* "mbd/CouplingFSI.pyx":959
21036  * if not self.boundaryFlags:
21037  * self.setBoundaryFlags([self.ProtChSystem.nBodiesIBM])
21038  * self.ProtChSystem.nBodiesIBM += 1 # <<<<<<<<<<<<<<
21039  * # get the initial values for F and M
21040  * cdef np.ndarray zeros = np.zeros(3)
21041  */
21042  __Pyx_INCREF(((PyObject *)__pyx_v_self->ProtChSystem));
21043  __pyx_t_8 = __pyx_v_self->ProtChSystem;
21044  __pyx_t_8->nBodiesIBM = (__pyx_t_8->nBodiesIBM + 1);
21045  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
21046 
21047  /* "mbd/CouplingFSI.pyx":956
21048  * self.position[:] = pyvec2array(self.ChBody.GetPos())
21049  * # check if IBM and set index if not set previously by user
21050  * if self.useIBM: # <<<<<<<<<<<<<<
21051  * if not self.boundaryFlags:
21052  * self.setBoundaryFlags([self.ProtChSystem.nBodiesIBM])
21053  */
21054  }
21055 
21056  /* "mbd/CouplingFSI.pyx":961
21057  * self.ProtChSystem.nBodiesIBM += 1
21058  * # get the initial values for F and M
21059  * cdef np.ndarray zeros = np.zeros(3) # <<<<<<<<<<<<<<
21060  * self.setExternalForces(zeros, zeros)
21061  * # build collision model
21062  */
21063  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error)
21064  __Pyx_GOTREF(__pyx_t_5);
21065  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 961, __pyx_L1_error)
21066  __Pyx_GOTREF(__pyx_t_6);
21067  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21068  __pyx_t_5 = NULL;
21069  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
21070  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
21071  if (likely(__pyx_t_5)) {
21072  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
21073  __Pyx_INCREF(__pyx_t_5);
21074  __Pyx_INCREF(function);
21075  __Pyx_DECREF_SET(__pyx_t_6, function);
21076  }
21077  }
21078  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
21079  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21080  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
21081  __Pyx_GOTREF(__pyx_t_3);
21082  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21083  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 961, __pyx_L1_error)
21084  __pyx_v_zeros = ((PyArrayObject *)__pyx_t_3);
21085  __pyx_t_3 = 0;
21086 
21087  /* "mbd/CouplingFSI.pyx":962
21088  * # get the initial values for F and M
21089  * cdef np.ndarray zeros = np.zeros(3)
21090  * self.setExternalForces(zeros, zeros) # <<<<<<<<<<<<<<
21091  * # build collision model
21092  * if deref(self.thisptr.body).GetCollide() is True:
21093  */
21094  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setExternalForces); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 962, __pyx_L1_error)
21095  __Pyx_GOTREF(__pyx_t_6);
21096  __pyx_t_5 = NULL;
21097  __pyx_t_9 = 0;
21098  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
21099  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
21100  if (likely(__pyx_t_5)) {
21101  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
21102  __Pyx_INCREF(__pyx_t_5);
21103  __Pyx_INCREF(function);
21104  __Pyx_DECREF_SET(__pyx_t_6, function);
21105  __pyx_t_9 = 1;
21106  }
21107  }
21108  #if CYTHON_FAST_PYCALL
21109  if (PyFunction_Check(__pyx_t_6)) {
21110  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_zeros), ((PyObject *)__pyx_v_zeros)};
21111  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
21112  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21113  __Pyx_GOTREF(__pyx_t_3);
21114  } else
21115  #endif
21116  #if CYTHON_FAST_PYCCALL
21117  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
21118  PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_zeros), ((PyObject *)__pyx_v_zeros)};
21119  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
21120  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
21121  __Pyx_GOTREF(__pyx_t_3);
21122  } else
21123  #endif
21124  {
21125  __pyx_t_4 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 962, __pyx_L1_error)
21126  __Pyx_GOTREF(__pyx_t_4);
21127  if (__pyx_t_5) {
21128  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
21129  }
21130  __Pyx_INCREF(((PyObject *)__pyx_v_zeros));
21131  __Pyx_GIVEREF(((PyObject *)__pyx_v_zeros));
21132  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_9, ((PyObject *)__pyx_v_zeros));
21133  __Pyx_INCREF(((PyObject *)__pyx_v_zeros));
21134  __Pyx_GIVEREF(((PyObject *)__pyx_v_zeros));
21135  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_9, ((PyObject *)__pyx_v_zeros));
21136  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
21137  __Pyx_GOTREF(__pyx_t_3);
21138  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
21139  }
21140  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21141  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21142 
21143  /* "mbd/CouplingFSI.pyx":964
21144  * self.setExternalForces(zeros, zeros)
21145  * # build collision model
21146  * if deref(self.thisptr.body).GetCollide() is True: # <<<<<<<<<<<<<<
21147  * deref(deref(self.thisptr.body).GetCollisionModel()).BuildModel()
21148  * # poststep (record values, etc)
21149  */
21150  __pyx_t_1 = (((*__pyx_v_self->thisptr->body).GetCollide() == 1) != 0);
21151  if (__pyx_t_1) {
21152 
21153  /* "mbd/CouplingFSI.pyx":965
21154  * # build collision model
21155  * if deref(self.thisptr.body).GetCollide() is True:
21156  * deref(deref(self.thisptr.body).GetCollisionModel()).BuildModel() # <<<<<<<<<<<<<<
21157  * # poststep (record values, etc)
21158  * self.thisptr.poststep()
21159  */
21160  (*(*__pyx_v_self->thisptr->body).GetCollisionModel()).BuildModel();
21161 
21162  /* "mbd/CouplingFSI.pyx":964
21163  * self.setExternalForces(zeros, zeros)
21164  * # build collision model
21165  * if deref(self.thisptr.body).GetCollide() is True: # <<<<<<<<<<<<<<
21166  * deref(deref(self.thisptr.body).GetCollisionModel()).BuildModel()
21167  * # poststep (record values, etc)
21168  */
21169  }
21170 
21171  /* "mbd/CouplingFSI.pyx":967
21172  * deref(deref(self.thisptr.body).GetCollisionModel()).BuildModel()
21173  * # poststep (record values, etc)
21174  * self.thisptr.poststep() # <<<<<<<<<<<<<<
21175  * # get first, store then on initial time step
21176  * self.getValues()
21177  */
21178  __pyx_v_self->thisptr->poststep();
21179 
21180  /* "mbd/CouplingFSI.pyx":969
21181  * self.thisptr.poststep()
21182  * # get first, store then on initial time step
21183  * self.getValues() # <<<<<<<<<<<<<<
21184  * self.storeValues()
21185  * # set mass matrix with no added mass
21186  */
21187  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getValues); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 969, __pyx_L1_error)
21188  __Pyx_GOTREF(__pyx_t_6);
21189  __pyx_t_4 = NULL;
21190  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
21191  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
21192  if (likely(__pyx_t_4)) {
21193  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
21194  __Pyx_INCREF(__pyx_t_4);
21195  __Pyx_INCREF(function);
21196  __Pyx_DECREF_SET(__pyx_t_6, function);
21197  }
21198  }
21199  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
21200  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21201  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 969, __pyx_L1_error)
21202  __Pyx_GOTREF(__pyx_t_3);
21203  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21204  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21205 
21206  /* "mbd/CouplingFSI.pyx":970
21207  * # get first, store then on initial time step
21208  * self.getValues()
21209  * self.storeValues() # <<<<<<<<<<<<<<
21210  * # set mass matrix with no added mass
21211  * self.setAddedMass(self.Aij)
21212  */
21213  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_storeValues); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 970, __pyx_L1_error)
21214  __Pyx_GOTREF(__pyx_t_6);
21215  __pyx_t_4 = NULL;
21216  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
21217  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
21218  if (likely(__pyx_t_4)) {
21219  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
21220  __Pyx_INCREF(__pyx_t_4);
21221  __Pyx_INCREF(function);
21222  __Pyx_DECREF_SET(__pyx_t_6, function);
21223  }
21224  }
21225  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
21226  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21227  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L1_error)
21228  __Pyx_GOTREF(__pyx_t_3);
21229  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21230  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21231 
21232  /* "mbd/CouplingFSI.pyx":972
21233  * self.storeValues()
21234  * # set mass matrix with no added mass
21235  * self.setAddedMass(self.Aij) # <<<<<<<<<<<<<<
21236  * self.thisptr.calculate_init()
21237  *
21238  */
21239  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setAddedMass); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 972, __pyx_L1_error)
21240  __Pyx_GOTREF(__pyx_t_6);
21241  __pyx_t_4 = NULL;
21242  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
21243  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
21244  if (likely(__pyx_t_4)) {
21245  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
21246  __Pyx_INCREF(__pyx_t_4);
21247  __Pyx_INCREF(function);
21248  __Pyx_DECREF_SET(__pyx_t_6, function);
21249  }
21250  }
21251  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, ((PyObject *)__pyx_v_self->Aij)) : __Pyx_PyObject_CallOneArg(__pyx_t_6, ((PyObject *)__pyx_v_self->Aij));
21252  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
21253  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error)
21254  __Pyx_GOTREF(__pyx_t_3);
21255  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21256  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21257 
21258  /* "mbd/CouplingFSI.pyx":973
21259  * # set mass matrix with no added mass
21260  * self.setAddedMass(self.Aij)
21261  * self.thisptr.calculate_init() # <<<<<<<<<<<<<<
21262  *
21263  * def calculate(self):
21264  */
21265  __pyx_v_self->thisptr->calculate_init();
21266 
21267  /* "mbd/CouplingFSI.pyx":944
21268  * self.predicted = True
21269  *
21270  * def calculate_init(self): # <<<<<<<<<<<<<<
21271  * """Called from self.ProtChSystem.calculate_init()
21272  * before simulation starts
21273  */
21274 
21275  /* function exit code */
21276  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21277  goto __pyx_L0;
21278  __pyx_L1_error:;
21279  __Pyx_XDECREF(__pyx_t_3);
21280  __Pyx_XDECREF(__pyx_t_4);
21281  __Pyx_XDECREF(__pyx_t_5);
21282  __Pyx_XDECREF(__pyx_t_6);
21283  __Pyx_XDECREF(__pyx_t_7);
21284  __Pyx_XDECREF(((PyObject *)__pyx_t_8));
21285  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.calculate_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
21286  __pyx_r = NULL;
21287  __pyx_L0:;
21288  __Pyx_XDECREF((PyObject *)__pyx_v_zeros);
21289  __Pyx_XGIVEREF(__pyx_r);
21290  __Pyx_TraceReturn(__pyx_r, 0);
21291  __Pyx_RefNannyFinishContext();
21292  return __pyx_r;
21293 }
21294 
21295 /* "mbd/CouplingFSI.pyx":975
21296  * self.thisptr.calculate_init()
21297  *
21298  * def calculate(self): # <<<<<<<<<<<<<<
21299  * pass
21300  *
21301  */
21302 
21303 /* Python wrapper */
21304 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_89calculate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
21305 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_88calculate[] = "ProtChBody.calculate(self)";
21306 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_89calculate = {"calculate", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_89calculate, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_88calculate};
21307 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_89calculate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
21308  PyObject *__pyx_r = 0;
21309  __Pyx_RefNannyDeclarations
21310  __Pyx_RefNannySetupContext("calculate (wrapper)", 0);
21311  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_88calculate(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
21312 
21313  /* function exit code */
21314  __Pyx_RefNannyFinishContext();
21315  return __pyx_r;
21316 }
21317 
21318 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_88calculate(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
21319  PyObject *__pyx_r = NULL;
21320  __Pyx_TraceDeclarations
21321  __Pyx_RefNannyDeclarations
21322  int __pyx_lineno = 0;
21323  const char *__pyx_filename = NULL;
21324  int __pyx_clineno = 0;
21325  __Pyx_TraceFrameInit(__pyx_codeobj__72)
21326  __Pyx_RefNannySetupContext("calculate", 0);
21327  __Pyx_TraceCall("calculate", __pyx_f[0], 975, 0, __PYX_ERR(0, 975, __pyx_L1_error));
21328 
21329  /* function exit code */
21330  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
21331  goto __pyx_L0;
21332  __pyx_L1_error:;
21333  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
21334  __pyx_r = NULL;
21335  __pyx_L0:;
21336  __Pyx_XGIVEREF(__pyx_r);
21337  __Pyx_TraceReturn(__pyx_r, 0);
21338  __Pyx_RefNannyFinishContext();
21339  return __pyx_r;
21340 }
21341 
21342 /* "mbd/CouplingFSI.pyx":978
21343  * pass
21344  *
21345  * def setPrescribedMotionCustom(self, double[:] t, double[:] x=None, # <<<<<<<<<<<<<<
21346  * double[:] y=None, double[:] z=None,
21347  * double[:] ang=None, double[:] ang2=None,
21348  */
21349 
21350 /* Python wrapper */
21351 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_91setPrescribedMotionCustom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
21352 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_90setPrescribedMotionCustom[] = "ProtChBody.setPrescribedMotionCustom(self, double[:] t, double[:] x=None, double[:] y=None, double[:] z=None, double[:] ang=None, double[:] ang2=None, double[:] ang3=None, double t_max=0)\nSets custom prescribed motion for body.\n Parameters must have the same length as the time array t\n\n Parameters\n ----------\n t: array_like\n time array\n x: array_like\n x coordinates of body\n y: array_like\n y coordinates of body\n z: array_like\n z coordinates of body\n ang: array_like\n rotation of body\n ang2: array_like\n rotation of body\n ang3: array_like\n rotation coordinates of body\n t_max: double\n prescribed motion is released when t > t_max.\n if t_max=0, the prescribed motion is never released.\n ";
21353 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_91setPrescribedMotionCustom = {"setPrescribedMotionCustom", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_91setPrescribedMotionCustom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_90setPrescribedMotionCustom};
21354 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_91setPrescribedMotionCustom(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
21355  __Pyx_memviewslice __pyx_v_t = { 0, 0, { 0 }, { 0 }, { 0 } };
21356  __Pyx_memviewslice __pyx_v_x = { 0, 0, { 0 }, { 0 }, { 0 } };
21357  __Pyx_memviewslice __pyx_v_y = { 0, 0, { 0 }, { 0 }, { 0 } };
21358  __Pyx_memviewslice __pyx_v_z = { 0, 0, { 0 }, { 0 }, { 0 } };
21359  __Pyx_memviewslice __pyx_v_ang = { 0, 0, { 0 }, { 0 }, { 0 } };
21360  __Pyx_memviewslice __pyx_v_ang2 = { 0, 0, { 0 }, { 0 }, { 0 } };
21361  __Pyx_memviewslice __pyx_v_ang3 = { 0, 0, { 0 }, { 0 }, { 0 } };
21362  double __pyx_v_t_max;
21363  int __pyx_lineno = 0;
21364  const char *__pyx_filename = NULL;
21365  int __pyx_clineno = 0;
21366  PyObject *__pyx_r = 0;
21367  __Pyx_RefNannyDeclarations
21368  __Pyx_RefNannySetupContext("setPrescribedMotionCustom (wrapper)", 0);
21369  {
21370  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_ang,&__pyx_n_s_ang2,&__pyx_n_s_ang3,&__pyx_n_s_t_max,0};
21371  PyObject* values[8] = {0,0,0,0,0,0,0,0};
21372  if (unlikely(__pyx_kwds)) {
21373  Py_ssize_t kw_args;
21374  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
21375  switch (pos_args) {
21376  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
21377  CYTHON_FALLTHROUGH;
21378  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
21379  CYTHON_FALLTHROUGH;
21380  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
21381  CYTHON_FALLTHROUGH;
21382  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
21383  CYTHON_FALLTHROUGH;
21384  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21385  CYTHON_FALLTHROUGH;
21386  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21387  CYTHON_FALLTHROUGH;
21388  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21389  CYTHON_FALLTHROUGH;
21390  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21391  CYTHON_FALLTHROUGH;
21392  case 0: break;
21393  default: goto __pyx_L5_argtuple_error;
21394  }
21395  kw_args = PyDict_Size(__pyx_kwds);
21396  switch (pos_args) {
21397  case 0:
21398  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
21399  else goto __pyx_L5_argtuple_error;
21400  CYTHON_FALLTHROUGH;
21401  case 1:
21402  if (kw_args > 0) {
21403  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x);
21404  if (value) { values[1] = value; kw_args--; }
21405  }
21406  CYTHON_FALLTHROUGH;
21407  case 2:
21408  if (kw_args > 0) {
21409  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y);
21410  if (value) { values[2] = value; kw_args--; }
21411  }
21412  CYTHON_FALLTHROUGH;
21413  case 3:
21414  if (kw_args > 0) {
21415  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z);
21416  if (value) { values[3] = value; kw_args--; }
21417  }
21418  CYTHON_FALLTHROUGH;
21419  case 4:
21420  if (kw_args > 0) {
21421  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ang);
21422  if (value) { values[4] = value; kw_args--; }
21423  }
21424  CYTHON_FALLTHROUGH;
21425  case 5:
21426  if (kw_args > 0) {
21427  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ang2);
21428  if (value) { values[5] = value; kw_args--; }
21429  }
21430  CYTHON_FALLTHROUGH;
21431  case 6:
21432  if (kw_args > 0) {
21433  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ang3);
21434  if (value) { values[6] = value; kw_args--; }
21435  }
21436  CYTHON_FALLTHROUGH;
21437  case 7:
21438  if (kw_args > 0) {
21439  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t_max);
21440  if (value) { values[7] = value; kw_args--; }
21441  }
21442  }
21443  if (unlikely(kw_args > 0)) {
21444  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPrescribedMotionCustom") < 0)) __PYX_ERR(0, 978, __pyx_L3_error)
21445  }
21446  } else {
21447  switch (PyTuple_GET_SIZE(__pyx_args)) {
21448  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
21449  CYTHON_FALLTHROUGH;
21450  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
21451  CYTHON_FALLTHROUGH;
21452  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
21453  CYTHON_FALLTHROUGH;
21454  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
21455  CYTHON_FALLTHROUGH;
21456  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
21457  CYTHON_FALLTHROUGH;
21458  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
21459  CYTHON_FALLTHROUGH;
21460  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
21461  CYTHON_FALLTHROUGH;
21462  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
21463  break;
21464  default: goto __pyx_L5_argtuple_error;
21465  }
21466  }
21467  __pyx_v_t = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_t.memview)) __PYX_ERR(0, 978, __pyx_L3_error)
21468  if (values[1]) {
21469  __pyx_v_x = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_x.memview)) __PYX_ERR(0, 978, __pyx_L3_error)
21470  } else {
21471  __pyx_v_x = __pyx_k__73;
21472  __PYX_INC_MEMVIEW(&__pyx_v_x, 1);
21473  }
21474  if (values[2]) {
21475  __pyx_v_y = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_y.memview)) __PYX_ERR(0, 979, __pyx_L3_error)
21476  } else {
21477  __pyx_v_y = __pyx_k__74;
21478  __PYX_INC_MEMVIEW(&__pyx_v_y, 1);
21479  }
21480  if (values[3]) {
21481  __pyx_v_z = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[3], PyBUF_WRITABLE); if (unlikely(!__pyx_v_z.memview)) __PYX_ERR(0, 979, __pyx_L3_error)
21482  } else {
21483  __pyx_v_z = __pyx_k__75;
21484  __PYX_INC_MEMVIEW(&__pyx_v_z, 1);
21485  }
21486  if (values[4]) {
21487  __pyx_v_ang = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_ang.memview)) __PYX_ERR(0, 980, __pyx_L3_error)
21488  } else {
21489  __pyx_v_ang = __pyx_k__76;
21490  __PYX_INC_MEMVIEW(&__pyx_v_ang, 1);
21491  }
21492  if (values[5]) {
21493  __pyx_v_ang2 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_ang2.memview)) __PYX_ERR(0, 980, __pyx_L3_error)
21494  } else {
21495  __pyx_v_ang2 = __pyx_k__77;
21496  __PYX_INC_MEMVIEW(&__pyx_v_ang2, 1);
21497  }
21498  if (values[6]) {
21499  __pyx_v_ang3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_ang3.memview)) __PYX_ERR(0, 981, __pyx_L3_error)
21500  } else {
21501  __pyx_v_ang3 = __pyx_k__78;
21502  __PYX_INC_MEMVIEW(&__pyx_v_ang3, 1);
21503  }
21504  if (values[7]) {
21505  __pyx_v_t_max = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_t_max == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 981, __pyx_L3_error)
21506  } else {
21507  __pyx_v_t_max = ((double)0.0);
21508  }
21509  }
21510  goto __pyx_L4_argument_unpacking_done;
21511  __pyx_L5_argtuple_error:;
21512  __Pyx_RaiseArgtupleInvalid("setPrescribedMotionCustom", 0, 1, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 978, __pyx_L3_error)
21513  __pyx_L3_error:;
21514  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPrescribedMotionCustom", __pyx_clineno, __pyx_lineno, __pyx_filename);
21515  __Pyx_RefNannyFinishContext();
21516  return NULL;
21517  __pyx_L4_argument_unpacking_done:;
21518  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_90setPrescribedMotionCustom(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_t, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_ang, __pyx_v_ang2, __pyx_v_ang3, __pyx_v_t_max);
21519 
21520  /* function exit code */
21521  __Pyx_RefNannyFinishContext();
21522  return __pyx_r;
21523 }
21524 
21525 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_90setPrescribedMotionCustom(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, __Pyx_memviewslice __pyx_v_t, __Pyx_memviewslice __pyx_v_x, __Pyx_memviewslice __pyx_v_y, __Pyx_memviewslice __pyx_v_z, __Pyx_memviewslice __pyx_v_ang, __Pyx_memviewslice __pyx_v_ang2, __Pyx_memviewslice __pyx_v_ang3, double __pyx_v_t_max) {
21526  std::vector<double> __pyx_v_t_vec;
21527  std::vector<double> __pyx_v_x_vec;
21528  std::vector<double> __pyx_v_y_vec;
21529  std::vector<double> __pyx_v_z_vec;
21530  std::vector<double> __pyx_v_ang_vec;
21531  std::vector<double> __pyx_v_ang2_vec;
21532  std::vector<double> __pyx_v_ang3_vec;
21533  PyObject *__pyx_v_tt = NULL;
21534  PyObject *__pyx_v_xx = NULL;
21535  PyObject *__pyx_v_yy = NULL;
21536  PyObject *__pyx_v_zz = NULL;
21537  PyObject *__pyx_v_angang = NULL;
21538  PyObject *__pyx_v_ang2ang2 = NULL;
21539  PyObject *__pyx_v_ang3ang3 = NULL;
21540  PyObject *__pyx_r = NULL;
21541  __Pyx_TraceDeclarations
21542  __Pyx_RefNannyDeclarations
21543  PyObject *__pyx_t_1 = NULL;
21544  PyObject *__pyx_t_2 = NULL;
21545  Py_ssize_t __pyx_t_3;
21546  PyObject *(*__pyx_t_4)(PyObject *);
21547  double __pyx_t_5;
21548  int __pyx_t_6;
21549  size_t __pyx_t_7;
21550  size_t __pyx_t_8;
21551  int __pyx_lineno = 0;
21552  const char *__pyx_filename = NULL;
21553  int __pyx_clineno = 0;
21554  __Pyx_TraceFrameInit(__pyx_codeobj__79)
21555  __Pyx_RefNannySetupContext("setPrescribedMotionCustom", 0);
21556  __Pyx_TraceCall("setPrescribedMotionCustom", __pyx_f[0], 978, 0, __PYX_ERR(0, 978, __pyx_L1_error));
21557 
21558  /* "mbd/CouplingFSI.pyx":1012
21559  * cdef vector[double] ang2_vec
21560  * cdef vector[double] ang3_vec
21561  * for tt in t: # <<<<<<<<<<<<<<
21562  * t_vec.push_back(tt)
21563  * if x is not None:
21564  */
21565  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_t, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
21566  __Pyx_GOTREF(__pyx_t_1);
21567  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
21568  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
21569  __pyx_t_4 = NULL;
21570  } else {
21571  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error)
21572  __Pyx_GOTREF(__pyx_t_2);
21573  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1012, __pyx_L1_error)
21574  }
21575  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21576  for (;;) {
21577  if (likely(!__pyx_t_4)) {
21578  if (likely(PyList_CheckExact(__pyx_t_2))) {
21579  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
21580  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21581  __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, 1012, __pyx_L1_error)
21582  #else
21583  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
21584  __Pyx_GOTREF(__pyx_t_1);
21585  #endif
21586  } else {
21587  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
21588  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21589  __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, 1012, __pyx_L1_error)
21590  #else
21591  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error)
21592  __Pyx_GOTREF(__pyx_t_1);
21593  #endif
21594  }
21595  } else {
21596  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
21597  if (unlikely(!__pyx_t_1)) {
21598  PyObject* exc_type = PyErr_Occurred();
21599  if (exc_type) {
21600  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
21601  else __PYX_ERR(0, 1012, __pyx_L1_error)
21602  }
21603  break;
21604  }
21605  __Pyx_GOTREF(__pyx_t_1);
21606  }
21607  __Pyx_XDECREF_SET(__pyx_v_tt, __pyx_t_1);
21608  __pyx_t_1 = 0;
21609 
21610  /* "mbd/CouplingFSI.pyx":1013
21611  * cdef vector[double] ang3_vec
21612  * for tt in t:
21613  * t_vec.push_back(tt) # <<<<<<<<<<<<<<
21614  * if x is not None:
21615  * assert len(x) == len(t), 'x and t should have the same length'
21616  */
21617  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_tt); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1013, __pyx_L1_error)
21618  try {
21619  __pyx_v_t_vec.push_back(__pyx_t_5);
21620  } catch(...) {
21621  __Pyx_CppExn2PyErr();
21622  __PYX_ERR(0, 1013, __pyx_L1_error)
21623  }
21624 
21625  /* "mbd/CouplingFSI.pyx":1012
21626  * cdef vector[double] ang2_vec
21627  * cdef vector[double] ang3_vec
21628  * for tt in t: # <<<<<<<<<<<<<<
21629  * t_vec.push_back(tt)
21630  * if x is not None:
21631  */
21632  }
21633  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21634 
21635  /* "mbd/CouplingFSI.pyx":1014
21636  * for tt in t:
21637  * t_vec.push_back(tt)
21638  * if x is not None: # <<<<<<<<<<<<<<
21639  * assert len(x) == len(t), 'x and t should have the same length'
21640  * for xx in x:
21641  */
21642  __pyx_t_6 = ((((PyObject *) __pyx_v_x.memview) != Py_None) != 0);
21643  if (__pyx_t_6) {
21644 
21645  /* "mbd/CouplingFSI.pyx":1015
21646  * t_vec.push_back(tt)
21647  * if x is not None:
21648  * assert len(x) == len(t), 'x and t should have the same length' # <<<<<<<<<<<<<<
21649  * for xx in x:
21650  * x_vec.push_back(xx)
21651  */
21652  #ifndef CYTHON_WITHOUT_ASSERTIONS
21653  if (unlikely(!Py_OptimizeFlag)) {
21654  __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_x);
21655  __pyx_t_8 = __Pyx_MemoryView_Len(__pyx_v_t);
21656  if (unlikely(!((__pyx_t_7 == __pyx_t_8) != 0))) {
21657  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_x_and_t_should_have_the_same_len);
21658  __PYX_ERR(0, 1015, __pyx_L1_error)
21659  }
21660  }
21661  #endif
21662 
21663  /* "mbd/CouplingFSI.pyx":1016
21664  * if x is not None:
21665  * assert len(x) == len(t), 'x and t should have the same length'
21666  * for xx in x: # <<<<<<<<<<<<<<
21667  * x_vec.push_back(xx)
21668  * if y is not None:
21669  */
21670  __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_x, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
21671  __Pyx_GOTREF(__pyx_t_2);
21672  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
21673  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
21674  __pyx_t_4 = NULL;
21675  } else {
21676  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
21677  __Pyx_GOTREF(__pyx_t_1);
21678  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1016, __pyx_L1_error)
21679  }
21680  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21681  for (;;) {
21682  if (likely(!__pyx_t_4)) {
21683  if (likely(PyList_CheckExact(__pyx_t_1))) {
21684  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
21685  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21686  __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, 1016, __pyx_L1_error)
21687  #else
21688  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
21689  __Pyx_GOTREF(__pyx_t_2);
21690  #endif
21691  } else {
21692  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
21693  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21694  __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, 1016, __pyx_L1_error)
21695  #else
21696  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
21697  __Pyx_GOTREF(__pyx_t_2);
21698  #endif
21699  }
21700  } else {
21701  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
21702  if (unlikely(!__pyx_t_2)) {
21703  PyObject* exc_type = PyErr_Occurred();
21704  if (exc_type) {
21705  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
21706  else __PYX_ERR(0, 1016, __pyx_L1_error)
21707  }
21708  break;
21709  }
21710  __Pyx_GOTREF(__pyx_t_2);
21711  }
21712  __Pyx_XDECREF_SET(__pyx_v_xx, __pyx_t_2);
21713  __pyx_t_2 = 0;
21714 
21715  /* "mbd/CouplingFSI.pyx":1017
21716  * assert len(x) == len(t), 'x and t should have the same length'
21717  * for xx in x:
21718  * x_vec.push_back(xx) # <<<<<<<<<<<<<<
21719  * if y is not None:
21720  * assert len(y) == len(t), 'y and t should have the same length'
21721  */
21722  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_xx); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1017, __pyx_L1_error)
21723  try {
21724  __pyx_v_x_vec.push_back(__pyx_t_5);
21725  } catch(...) {
21726  __Pyx_CppExn2PyErr();
21727  __PYX_ERR(0, 1017, __pyx_L1_error)
21728  }
21729 
21730  /* "mbd/CouplingFSI.pyx":1016
21731  * if x is not None:
21732  * assert len(x) == len(t), 'x and t should have the same length'
21733  * for xx in x: # <<<<<<<<<<<<<<
21734  * x_vec.push_back(xx)
21735  * if y is not None:
21736  */
21737  }
21738  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21739 
21740  /* "mbd/CouplingFSI.pyx":1014
21741  * for tt in t:
21742  * t_vec.push_back(tt)
21743  * if x is not None: # <<<<<<<<<<<<<<
21744  * assert len(x) == len(t), 'x and t should have the same length'
21745  * for xx in x:
21746  */
21747  }
21748 
21749  /* "mbd/CouplingFSI.pyx":1018
21750  * for xx in x:
21751  * x_vec.push_back(xx)
21752  * if y is not None: # <<<<<<<<<<<<<<
21753  * assert len(y) == len(t), 'y and t should have the same length'
21754  * for yy in y:
21755  */
21756  __pyx_t_6 = ((((PyObject *) __pyx_v_y.memview) != Py_None) != 0);
21757  if (__pyx_t_6) {
21758 
21759  /* "mbd/CouplingFSI.pyx":1019
21760  * x_vec.push_back(xx)
21761  * if y is not None:
21762  * assert len(y) == len(t), 'y and t should have the same length' # <<<<<<<<<<<<<<
21763  * for yy in y:
21764  * y_vec.push_back(yy)
21765  */
21766  #ifndef CYTHON_WITHOUT_ASSERTIONS
21767  if (unlikely(!Py_OptimizeFlag)) {
21768  __pyx_t_8 = __Pyx_MemoryView_Len(__pyx_v_y);
21769  __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_t);
21770  if (unlikely(!((__pyx_t_8 == __pyx_t_7) != 0))) {
21771  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_y_and_t_should_have_the_same_len);
21772  __PYX_ERR(0, 1019, __pyx_L1_error)
21773  }
21774  }
21775  #endif
21776 
21777  /* "mbd/CouplingFSI.pyx":1020
21778  * if y is not None:
21779  * assert len(y) == len(t), 'y and t should have the same length'
21780  * for yy in y: # <<<<<<<<<<<<<<
21781  * y_vec.push_back(yy)
21782  * if z is not None:
21783  */
21784  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_y, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
21785  __Pyx_GOTREF(__pyx_t_1);
21786  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
21787  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
21788  __pyx_t_4 = NULL;
21789  } else {
21790  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
21791  __Pyx_GOTREF(__pyx_t_2);
21792  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1020, __pyx_L1_error)
21793  }
21794  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21795  for (;;) {
21796  if (likely(!__pyx_t_4)) {
21797  if (likely(PyList_CheckExact(__pyx_t_2))) {
21798  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
21799  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21800  __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, 1020, __pyx_L1_error)
21801  #else
21802  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
21803  __Pyx_GOTREF(__pyx_t_1);
21804  #endif
21805  } else {
21806  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
21807  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21808  __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, 1020, __pyx_L1_error)
21809  #else
21810  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
21811  __Pyx_GOTREF(__pyx_t_1);
21812  #endif
21813  }
21814  } else {
21815  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
21816  if (unlikely(!__pyx_t_1)) {
21817  PyObject* exc_type = PyErr_Occurred();
21818  if (exc_type) {
21819  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
21820  else __PYX_ERR(0, 1020, __pyx_L1_error)
21821  }
21822  break;
21823  }
21824  __Pyx_GOTREF(__pyx_t_1);
21825  }
21826  __Pyx_XDECREF_SET(__pyx_v_yy, __pyx_t_1);
21827  __pyx_t_1 = 0;
21828 
21829  /* "mbd/CouplingFSI.pyx":1021
21830  * assert len(y) == len(t), 'y and t should have the same length'
21831  * for yy in y:
21832  * y_vec.push_back(yy) # <<<<<<<<<<<<<<
21833  * if z is not None:
21834  * assert len(z) == len(t), 'z and t should have the same length'
21835  */
21836  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_yy); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L1_error)
21837  try {
21838  __pyx_v_y_vec.push_back(__pyx_t_5);
21839  } catch(...) {
21840  __Pyx_CppExn2PyErr();
21841  __PYX_ERR(0, 1021, __pyx_L1_error)
21842  }
21843 
21844  /* "mbd/CouplingFSI.pyx":1020
21845  * if y is not None:
21846  * assert len(y) == len(t), 'y and t should have the same length'
21847  * for yy in y: # <<<<<<<<<<<<<<
21848  * y_vec.push_back(yy)
21849  * if z is not None:
21850  */
21851  }
21852  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21853 
21854  /* "mbd/CouplingFSI.pyx":1018
21855  * for xx in x:
21856  * x_vec.push_back(xx)
21857  * if y is not None: # <<<<<<<<<<<<<<
21858  * assert len(y) == len(t), 'y and t should have the same length'
21859  * for yy in y:
21860  */
21861  }
21862 
21863  /* "mbd/CouplingFSI.pyx":1022
21864  * for yy in y:
21865  * y_vec.push_back(yy)
21866  * if z is not None: # <<<<<<<<<<<<<<
21867  * assert len(z) == len(t), 'z and t should have the same length'
21868  * for zz in z:
21869  */
21870  __pyx_t_6 = ((((PyObject *) __pyx_v_z.memview) != Py_None) != 0);
21871  if (__pyx_t_6) {
21872 
21873  /* "mbd/CouplingFSI.pyx":1023
21874  * y_vec.push_back(yy)
21875  * if z is not None:
21876  * assert len(z) == len(t), 'z and t should have the same length' # <<<<<<<<<<<<<<
21877  * for zz in z:
21878  * z_vec.push_back(zz)
21879  */
21880  #ifndef CYTHON_WITHOUT_ASSERTIONS
21881  if (unlikely(!Py_OptimizeFlag)) {
21882  __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_z);
21883  __pyx_t_8 = __Pyx_MemoryView_Len(__pyx_v_t);
21884  if (unlikely(!((__pyx_t_7 == __pyx_t_8) != 0))) {
21885  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_z_and_t_should_have_the_same_len);
21886  __PYX_ERR(0, 1023, __pyx_L1_error)
21887  }
21888  }
21889  #endif
21890 
21891  /* "mbd/CouplingFSI.pyx":1024
21892  * if z is not None:
21893  * assert len(z) == len(t), 'z and t should have the same length'
21894  * for zz in z: # <<<<<<<<<<<<<<
21895  * z_vec.push_back(zz)
21896  * if ang is not None:
21897  */
21898  __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_z, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error)
21899  __Pyx_GOTREF(__pyx_t_2);
21900  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
21901  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
21902  __pyx_t_4 = NULL;
21903  } else {
21904  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error)
21905  __Pyx_GOTREF(__pyx_t_1);
21906  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1024, __pyx_L1_error)
21907  }
21908  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
21909  for (;;) {
21910  if (likely(!__pyx_t_4)) {
21911  if (likely(PyList_CheckExact(__pyx_t_1))) {
21912  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
21913  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21914  __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, 1024, __pyx_L1_error)
21915  #else
21916  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error)
21917  __Pyx_GOTREF(__pyx_t_2);
21918  #endif
21919  } else {
21920  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
21921  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21922  __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, 1024, __pyx_L1_error)
21923  #else
21924  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error)
21925  __Pyx_GOTREF(__pyx_t_2);
21926  #endif
21927  }
21928  } else {
21929  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
21930  if (unlikely(!__pyx_t_2)) {
21931  PyObject* exc_type = PyErr_Occurred();
21932  if (exc_type) {
21933  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
21934  else __PYX_ERR(0, 1024, __pyx_L1_error)
21935  }
21936  break;
21937  }
21938  __Pyx_GOTREF(__pyx_t_2);
21939  }
21940  __Pyx_XDECREF_SET(__pyx_v_zz, __pyx_t_2);
21941  __pyx_t_2 = 0;
21942 
21943  /* "mbd/CouplingFSI.pyx":1025
21944  * assert len(z) == len(t), 'z and t should have the same length'
21945  * for zz in z:
21946  * z_vec.push_back(zz) # <<<<<<<<<<<<<<
21947  * if ang is not None:
21948  * assert len(ang) == len(t), 'ang and t should have the same length'
21949  */
21950  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_zz); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L1_error)
21951  try {
21952  __pyx_v_z_vec.push_back(__pyx_t_5);
21953  } catch(...) {
21954  __Pyx_CppExn2PyErr();
21955  __PYX_ERR(0, 1025, __pyx_L1_error)
21956  }
21957 
21958  /* "mbd/CouplingFSI.pyx":1024
21959  * if z is not None:
21960  * assert len(z) == len(t), 'z and t should have the same length'
21961  * for zz in z: # <<<<<<<<<<<<<<
21962  * z_vec.push_back(zz)
21963  * if ang is not None:
21964  */
21965  }
21966  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
21967 
21968  /* "mbd/CouplingFSI.pyx":1022
21969  * for yy in y:
21970  * y_vec.push_back(yy)
21971  * if z is not None: # <<<<<<<<<<<<<<
21972  * assert len(z) == len(t), 'z and t should have the same length'
21973  * for zz in z:
21974  */
21975  }
21976 
21977  /* "mbd/CouplingFSI.pyx":1026
21978  * for zz in z:
21979  * z_vec.push_back(zz)
21980  * if ang is not None: # <<<<<<<<<<<<<<
21981  * assert len(ang) == len(t), 'ang and t should have the same length'
21982  * for angang in ang:
21983  */
21984  __pyx_t_6 = ((((PyObject *) __pyx_v_ang.memview) != Py_None) != 0);
21985  if (__pyx_t_6) {
21986 
21987  /* "mbd/CouplingFSI.pyx":1027
21988  * z_vec.push_back(zz)
21989  * if ang is not None:
21990  * assert len(ang) == len(t), 'ang and t should have the same length' # <<<<<<<<<<<<<<
21991  * for angang in ang:
21992  * ang_vec.push_back(angang)
21993  */
21994  #ifndef CYTHON_WITHOUT_ASSERTIONS
21995  if (unlikely(!Py_OptimizeFlag)) {
21996  __pyx_t_8 = __Pyx_MemoryView_Len(__pyx_v_ang);
21997  __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_t);
21998  if (unlikely(!((__pyx_t_8 == __pyx_t_7) != 0))) {
21999  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_ang_and_t_should_have_the_same_l);
22000  __PYX_ERR(0, 1027, __pyx_L1_error)
22001  }
22002  }
22003  #endif
22004 
22005  /* "mbd/CouplingFSI.pyx":1028
22006  * if ang is not None:
22007  * assert len(ang) == len(t), 'ang and t should have the same length'
22008  * for angang in ang: # <<<<<<<<<<<<<<
22009  * ang_vec.push_back(angang)
22010  * if ang2 is not None:
22011  */
22012  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_ang, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error)
22013  __Pyx_GOTREF(__pyx_t_1);
22014  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
22015  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
22016  __pyx_t_4 = NULL;
22017  } else {
22018  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1028, __pyx_L1_error)
22019  __Pyx_GOTREF(__pyx_t_2);
22020  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1028, __pyx_L1_error)
22021  }
22022  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22023  for (;;) {
22024  if (likely(!__pyx_t_4)) {
22025  if (likely(PyList_CheckExact(__pyx_t_2))) {
22026  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
22027  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22028  __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, 1028, __pyx_L1_error)
22029  #else
22030  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error)
22031  __Pyx_GOTREF(__pyx_t_1);
22032  #endif
22033  } else {
22034  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
22035  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22036  __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, 1028, __pyx_L1_error)
22037  #else
22038  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error)
22039  __Pyx_GOTREF(__pyx_t_1);
22040  #endif
22041  }
22042  } else {
22043  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
22044  if (unlikely(!__pyx_t_1)) {
22045  PyObject* exc_type = PyErr_Occurred();
22046  if (exc_type) {
22047  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
22048  else __PYX_ERR(0, 1028, __pyx_L1_error)
22049  }
22050  break;
22051  }
22052  __Pyx_GOTREF(__pyx_t_1);
22053  }
22054  __Pyx_XDECREF_SET(__pyx_v_angang, __pyx_t_1);
22055  __pyx_t_1 = 0;
22056 
22057  /* "mbd/CouplingFSI.pyx":1029
22058  * assert len(ang) == len(t), 'ang and t should have the same length'
22059  * for angang in ang:
22060  * ang_vec.push_back(angang) # <<<<<<<<<<<<<<
22061  * if ang2 is not None:
22062  * assert len(ang2) == len(t), 'ang2 and t should have the same length'
22063  */
22064  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_angang); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1029, __pyx_L1_error)
22065  try {
22066  __pyx_v_ang_vec.push_back(__pyx_t_5);
22067  } catch(...) {
22068  __Pyx_CppExn2PyErr();
22069  __PYX_ERR(0, 1029, __pyx_L1_error)
22070  }
22071 
22072  /* "mbd/CouplingFSI.pyx":1028
22073  * if ang is not None:
22074  * assert len(ang) == len(t), 'ang and t should have the same length'
22075  * for angang in ang: # <<<<<<<<<<<<<<
22076  * ang_vec.push_back(angang)
22077  * if ang2 is not None:
22078  */
22079  }
22080  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22081 
22082  /* "mbd/CouplingFSI.pyx":1026
22083  * for zz in z:
22084  * z_vec.push_back(zz)
22085  * if ang is not None: # <<<<<<<<<<<<<<
22086  * assert len(ang) == len(t), 'ang and t should have the same length'
22087  * for angang in ang:
22088  */
22089  }
22090 
22091  /* "mbd/CouplingFSI.pyx":1030
22092  * for angang in ang:
22093  * ang_vec.push_back(angang)
22094  * if ang2 is not None: # <<<<<<<<<<<<<<
22095  * assert len(ang2) == len(t), 'ang2 and t should have the same length'
22096  * for ang2ang2 in ang2:
22097  */
22098  __pyx_t_6 = ((((PyObject *) __pyx_v_ang2.memview) != Py_None) != 0);
22099  if (__pyx_t_6) {
22100 
22101  /* "mbd/CouplingFSI.pyx":1031
22102  * ang_vec.push_back(angang)
22103  * if ang2 is not None:
22104  * assert len(ang2) == len(t), 'ang2 and t should have the same length' # <<<<<<<<<<<<<<
22105  * for ang2ang2 in ang2:
22106  * ang2_vec.push_back(ang2ang2)
22107  */
22108  #ifndef CYTHON_WITHOUT_ASSERTIONS
22109  if (unlikely(!Py_OptimizeFlag)) {
22110  __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_ang2);
22111  __pyx_t_8 = __Pyx_MemoryView_Len(__pyx_v_t);
22112  if (unlikely(!((__pyx_t_7 == __pyx_t_8) != 0))) {
22113  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_ang2_and_t_should_have_the_same);
22114  __PYX_ERR(0, 1031, __pyx_L1_error)
22115  }
22116  }
22117  #endif
22118 
22119  /* "mbd/CouplingFSI.pyx":1032
22120  * if ang2 is not None:
22121  * assert len(ang2) == len(t), 'ang2 and t should have the same length'
22122  * for ang2ang2 in ang2: # <<<<<<<<<<<<<<
22123  * ang2_vec.push_back(ang2ang2)
22124  * if ang3 is not None:
22125  */
22126  __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_ang2, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
22127  __Pyx_GOTREF(__pyx_t_2);
22128  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
22129  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
22130  __pyx_t_4 = NULL;
22131  } else {
22132  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error)
22133  __Pyx_GOTREF(__pyx_t_1);
22134  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1032, __pyx_L1_error)
22135  }
22136  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22137  for (;;) {
22138  if (likely(!__pyx_t_4)) {
22139  if (likely(PyList_CheckExact(__pyx_t_1))) {
22140  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
22141  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22142  __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, 1032, __pyx_L1_error)
22143  #else
22144  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
22145  __Pyx_GOTREF(__pyx_t_2);
22146  #endif
22147  } else {
22148  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
22149  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22150  __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, 1032, __pyx_L1_error)
22151  #else
22152  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
22153  __Pyx_GOTREF(__pyx_t_2);
22154  #endif
22155  }
22156  } else {
22157  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
22158  if (unlikely(!__pyx_t_2)) {
22159  PyObject* exc_type = PyErr_Occurred();
22160  if (exc_type) {
22161  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
22162  else __PYX_ERR(0, 1032, __pyx_L1_error)
22163  }
22164  break;
22165  }
22166  __Pyx_GOTREF(__pyx_t_2);
22167  }
22168  __Pyx_XDECREF_SET(__pyx_v_ang2ang2, __pyx_t_2);
22169  __pyx_t_2 = 0;
22170 
22171  /* "mbd/CouplingFSI.pyx":1033
22172  * assert len(ang2) == len(t), 'ang2 and t should have the same length'
22173  * for ang2ang2 in ang2:
22174  * ang2_vec.push_back(ang2ang2) # <<<<<<<<<<<<<<
22175  * if ang3 is not None:
22176  * assert len(ang3) == len(t), 'ang3 and t should have the same length'
22177  */
22178  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_ang2ang2); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1033, __pyx_L1_error)
22179  try {
22180  __pyx_v_ang2_vec.push_back(__pyx_t_5);
22181  } catch(...) {
22182  __Pyx_CppExn2PyErr();
22183  __PYX_ERR(0, 1033, __pyx_L1_error)
22184  }
22185 
22186  /* "mbd/CouplingFSI.pyx":1032
22187  * if ang2 is not None:
22188  * assert len(ang2) == len(t), 'ang2 and t should have the same length'
22189  * for ang2ang2 in ang2: # <<<<<<<<<<<<<<
22190  * ang2_vec.push_back(ang2ang2)
22191  * if ang3 is not None:
22192  */
22193  }
22194  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22195 
22196  /* "mbd/CouplingFSI.pyx":1030
22197  * for angang in ang:
22198  * ang_vec.push_back(angang)
22199  * if ang2 is not None: # <<<<<<<<<<<<<<
22200  * assert len(ang2) == len(t), 'ang2 and t should have the same length'
22201  * for ang2ang2 in ang2:
22202  */
22203  }
22204 
22205  /* "mbd/CouplingFSI.pyx":1034
22206  * for ang2ang2 in ang2:
22207  * ang2_vec.push_back(ang2ang2)
22208  * if ang3 is not None: # <<<<<<<<<<<<<<
22209  * assert len(ang3) == len(t), 'ang3 and t should have the same length'
22210  * for ang3ang3 in ang3:
22211  */
22212  __pyx_t_6 = ((((PyObject *) __pyx_v_ang3.memview) != Py_None) != 0);
22213  if (__pyx_t_6) {
22214 
22215  /* "mbd/CouplingFSI.pyx":1035
22216  * ang2_vec.push_back(ang2ang2)
22217  * if ang3 is not None:
22218  * assert len(ang3) == len(t), 'ang3 and t should have the same length' # <<<<<<<<<<<<<<
22219  * for ang3ang3 in ang3:
22220  * ang3_vec.push_back(ang3ang3)
22221  */
22222  #ifndef CYTHON_WITHOUT_ASSERTIONS
22223  if (unlikely(!Py_OptimizeFlag)) {
22224  __pyx_t_8 = __Pyx_MemoryView_Len(__pyx_v_ang3);
22225  __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_t);
22226  if (unlikely(!((__pyx_t_8 == __pyx_t_7) != 0))) {
22227  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_ang3_and_t_should_have_the_same);
22228  __PYX_ERR(0, 1035, __pyx_L1_error)
22229  }
22230  }
22231  #endif
22232 
22233  /* "mbd/CouplingFSI.pyx":1036
22234  * if ang3 is not None:
22235  * assert len(ang3) == len(t), 'ang3 and t should have the same length'
22236  * for ang3ang3 in ang3: # <<<<<<<<<<<<<<
22237  * ang3_vec.push_back(ang3ang3)
22238  * self.thisptr.setPrescribedMotionCustom(t_vec, x_vec, y_vec, z_vec,
22239  */
22240  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_ang3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
22241  __Pyx_GOTREF(__pyx_t_1);
22242  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
22243  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
22244  __pyx_t_4 = NULL;
22245  } else {
22246  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
22247  __Pyx_GOTREF(__pyx_t_2);
22248  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1036, __pyx_L1_error)
22249  }
22250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22251  for (;;) {
22252  if (likely(!__pyx_t_4)) {
22253  if (likely(PyList_CheckExact(__pyx_t_2))) {
22254  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
22255  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22256  __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, 1036, __pyx_L1_error)
22257  #else
22258  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
22259  __Pyx_GOTREF(__pyx_t_1);
22260  #endif
22261  } else {
22262  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
22263  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
22264  __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, 1036, __pyx_L1_error)
22265  #else
22266  __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
22267  __Pyx_GOTREF(__pyx_t_1);
22268  #endif
22269  }
22270  } else {
22271  __pyx_t_1 = __pyx_t_4(__pyx_t_2);
22272  if (unlikely(!__pyx_t_1)) {
22273  PyObject* exc_type = PyErr_Occurred();
22274  if (exc_type) {
22275  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
22276  else __PYX_ERR(0, 1036, __pyx_L1_error)
22277  }
22278  break;
22279  }
22280  __Pyx_GOTREF(__pyx_t_1);
22281  }
22282  __Pyx_XDECREF_SET(__pyx_v_ang3ang3, __pyx_t_1);
22283  __pyx_t_1 = 0;
22284 
22285  /* "mbd/CouplingFSI.pyx":1037
22286  * assert len(ang3) == len(t), 'ang3 and t should have the same length'
22287  * for ang3ang3 in ang3:
22288  * ang3_vec.push_back(ang3ang3) # <<<<<<<<<<<<<<
22289  * self.thisptr.setPrescribedMotionCustom(t_vec, x_vec, y_vec, z_vec,
22290  * ang_vec, ang2_vec, ang3_vec,
22291  */
22292  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_ang3ang3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
22293  try {
22294  __pyx_v_ang3_vec.push_back(__pyx_t_5);
22295  } catch(...) {
22296  __Pyx_CppExn2PyErr();
22297  __PYX_ERR(0, 1037, __pyx_L1_error)
22298  }
22299 
22300  /* "mbd/CouplingFSI.pyx":1036
22301  * if ang3 is not None:
22302  * assert len(ang3) == len(t), 'ang3 and t should have the same length'
22303  * for ang3ang3 in ang3: # <<<<<<<<<<<<<<
22304  * ang3_vec.push_back(ang3ang3)
22305  * self.thisptr.setPrescribedMotionCustom(t_vec, x_vec, y_vec, z_vec,
22306  */
22307  }
22308  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22309 
22310  /* "mbd/CouplingFSI.pyx":1034
22311  * for ang2ang2 in ang2:
22312  * ang2_vec.push_back(ang2ang2)
22313  * if ang3 is not None: # <<<<<<<<<<<<<<
22314  * assert len(ang3) == len(t), 'ang3 and t should have the same length'
22315  * for ang3ang3 in ang3:
22316  */
22317  }
22318 
22319  /* "mbd/CouplingFSI.pyx":1038
22320  * for ang3ang3 in ang3:
22321  * ang3_vec.push_back(ang3ang3)
22322  * self.thisptr.setPrescribedMotionCustom(t_vec, x_vec, y_vec, z_vec, # <<<<<<<<<<<<<<
22323  * ang_vec, ang2_vec, ang3_vec,
22324  * t_max)
22325  */
22326  __pyx_v_self->thisptr->setPrescribedMotionCustom(__pyx_v_t_vec, __pyx_v_x_vec, __pyx_v_y_vec, __pyx_v_z_vec, __pyx_v_ang_vec, __pyx_v_ang2_vec, __pyx_v_ang3_vec, __pyx_v_t_max);
22327 
22328  /* "mbd/CouplingFSI.pyx":978
22329  * pass
22330  *
22331  * def setPrescribedMotionCustom(self, double[:] t, double[:] x=None, # <<<<<<<<<<<<<<
22332  * double[:] y=None, double[:] z=None,
22333  * double[:] ang=None, double[:] ang2=None,
22334  */
22335 
22336  /* function exit code */
22337  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22338  goto __pyx_L0;
22339  __pyx_L1_error:;
22340  __Pyx_XDECREF(__pyx_t_1);
22341  __Pyx_XDECREF(__pyx_t_2);
22342  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPrescribedMotionCustom", __pyx_clineno, __pyx_lineno, __pyx_filename);
22343  __pyx_r = NULL;
22344  __pyx_L0:;
22345  __Pyx_XDECREF(__pyx_v_tt);
22346  __Pyx_XDECREF(__pyx_v_xx);
22347  __Pyx_XDECREF(__pyx_v_yy);
22348  __Pyx_XDECREF(__pyx_v_zz);
22349  __Pyx_XDECREF(__pyx_v_angang);
22350  __Pyx_XDECREF(__pyx_v_ang2ang2);
22351  __Pyx_XDECREF(__pyx_v_ang3ang3);
22352  __PYX_XDEC_MEMVIEW(&__pyx_v_t, 1);
22353  __PYX_XDEC_MEMVIEW(&__pyx_v_x, 1);
22354  __PYX_XDEC_MEMVIEW(&__pyx_v_y, 1);
22355  __PYX_XDEC_MEMVIEW(&__pyx_v_z, 1);
22356  __PYX_XDEC_MEMVIEW(&__pyx_v_ang, 1);
22357  __PYX_XDEC_MEMVIEW(&__pyx_v_ang2, 1);
22358  __PYX_XDEC_MEMVIEW(&__pyx_v_ang3, 1);
22359  __Pyx_XGIVEREF(__pyx_r);
22360  __Pyx_TraceReturn(__pyx_r, 0);
22361  __Pyx_RefNannyFinishContext();
22362  return __pyx_r;
22363 }
22364 
22365 /* "mbd/CouplingFSI.pyx":1042
22366  * t_max)
22367  *
22368  * def setPrescribedMotionSine(self, double a, double f): # <<<<<<<<<<<<<<
22369  * """Sets sinusoidal prescribed motion for body
22370  *
22371  */
22372 
22373 /* Python wrapper */
22374 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_93setPrescribedMotionSine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22375 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_92setPrescribedMotionSine[] = "ProtChBody.setPrescribedMotionSine(self, double a, double f)\nSets sinusoidal prescribed motion for body\n\n Parameters\n ----------\n a: double\n amplitude of sinusoid\n f: double\n frequency of sinusoid\n ";
22376 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_93setPrescribedMotionSine = {"setPrescribedMotionSine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_93setPrescribedMotionSine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_92setPrescribedMotionSine};
22377 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_93setPrescribedMotionSine(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22378  double __pyx_v_a;
22379  double __pyx_v_f;
22380  int __pyx_lineno = 0;
22381  const char *__pyx_filename = NULL;
22382  int __pyx_clineno = 0;
22383  PyObject *__pyx_r = 0;
22384  __Pyx_RefNannyDeclarations
22385  __Pyx_RefNannySetupContext("setPrescribedMotionSine (wrapper)", 0);
22386  {
22387  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_f,0};
22388  PyObject* values[2] = {0,0};
22389  if (unlikely(__pyx_kwds)) {
22390  Py_ssize_t kw_args;
22391  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22392  switch (pos_args) {
22393  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22394  CYTHON_FALLTHROUGH;
22395  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22396  CYTHON_FALLTHROUGH;
22397  case 0: break;
22398  default: goto __pyx_L5_argtuple_error;
22399  }
22400  kw_args = PyDict_Size(__pyx_kwds);
22401  switch (pos_args) {
22402  case 0:
22403  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
22404  else goto __pyx_L5_argtuple_error;
22405  CYTHON_FALLTHROUGH;
22406  case 1:
22407  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_f)) != 0)) kw_args--;
22408  else {
22409  __Pyx_RaiseArgtupleInvalid("setPrescribedMotionSine", 1, 2, 2, 1); __PYX_ERR(0, 1042, __pyx_L3_error)
22410  }
22411  }
22412  if (unlikely(kw_args > 0)) {
22413  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setPrescribedMotionSine") < 0)) __PYX_ERR(0, 1042, __pyx_L3_error)
22414  }
22415  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
22416  goto __pyx_L5_argtuple_error;
22417  } else {
22418  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22419  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
22420  }
22421  __pyx_v_a = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L3_error)
22422  __pyx_v_f = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_f == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1042, __pyx_L3_error)
22423  }
22424  goto __pyx_L4_argument_unpacking_done;
22425  __pyx_L5_argtuple_error:;
22426  __Pyx_RaiseArgtupleInvalid("setPrescribedMotionSine", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1042, __pyx_L3_error)
22427  __pyx_L3_error:;
22428  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPrescribedMotionSine", __pyx_clineno, __pyx_lineno, __pyx_filename);
22429  __Pyx_RefNannyFinishContext();
22430  return NULL;
22431  __pyx_L4_argument_unpacking_done:;
22432  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_92setPrescribedMotionSine(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_a, __pyx_v_f);
22433 
22434  /* function exit code */
22435  __Pyx_RefNannyFinishContext();
22436  return __pyx_r;
22437 }
22438 
22439 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_92setPrescribedMotionSine(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_a, double __pyx_v_f) {
22440  PyObject *__pyx_r = NULL;
22441  __Pyx_TraceDeclarations
22442  __Pyx_RefNannyDeclarations
22443  int __pyx_lineno = 0;
22444  const char *__pyx_filename = NULL;
22445  int __pyx_clineno = 0;
22446  __Pyx_TraceFrameInit(__pyx_codeobj__80)
22447  __Pyx_RefNannySetupContext("setPrescribedMotionSine", 0);
22448  __Pyx_TraceCall("setPrescribedMotionSine", __pyx_f[0], 1042, 0, __PYX_ERR(0, 1042, __pyx_L1_error));
22449 
22450  /* "mbd/CouplingFSI.pyx":1052
22451  * frequency of sinusoid
22452  * """
22453  * self.thisptr.setPrescribedMotionSine(a, f) # <<<<<<<<<<<<<<
22454  *
22455  * def setPrescribedMotionPoly(self, double coeff1):
22456  */
22457  __pyx_v_self->thisptr->setPrescribedMotionSine(__pyx_v_a, __pyx_v_f);
22458 
22459  /* "mbd/CouplingFSI.pyx":1042
22460  * t_max)
22461  *
22462  * def setPrescribedMotionSine(self, double a, double f): # <<<<<<<<<<<<<<
22463  * """Sets sinusoidal prescribed motion for body
22464  *
22465  */
22466 
22467  /* function exit code */
22468  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22469  goto __pyx_L0;
22470  __pyx_L1_error:;
22471  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPrescribedMotionSine", __pyx_clineno, __pyx_lineno, __pyx_filename);
22472  __pyx_r = NULL;
22473  __pyx_L0:;
22474  __Pyx_XGIVEREF(__pyx_r);
22475  __Pyx_TraceReturn(__pyx_r, 0);
22476  __Pyx_RefNannyFinishContext();
22477  return __pyx_r;
22478 }
22479 
22480 /* "mbd/CouplingFSI.pyx":1054
22481  * self.thisptr.setPrescribedMotionSine(a, f)
22482  *
22483  * def setPrescribedMotionPoly(self, double coeff1): # <<<<<<<<<<<<<<
22484  * """Sets polynomial prescribed motion for body
22485  *
22486  */
22487 
22488 /* Python wrapper */
22489 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_95setPrescribedMotionPoly(PyObject *__pyx_v_self, PyObject *__pyx_arg_coeff1); /*proto*/
22490 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_94setPrescribedMotionPoly[] = "ProtChBody.setPrescribedMotionPoly(self, double coeff1)\nSets polynomial prescribed motion for body\n\n Parameters\n ----------\n coeff1: double\n coeff1 of polynomial\n ";
22491 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_95setPrescribedMotionPoly = {"setPrescribedMotionPoly", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_95setPrescribedMotionPoly, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_94setPrescribedMotionPoly};
22492 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_95setPrescribedMotionPoly(PyObject *__pyx_v_self, PyObject *__pyx_arg_coeff1) {
22493  double __pyx_v_coeff1;
22494  int __pyx_lineno = 0;
22495  const char *__pyx_filename = NULL;
22496  int __pyx_clineno = 0;
22497  PyObject *__pyx_r = 0;
22498  __Pyx_RefNannyDeclarations
22499  __Pyx_RefNannySetupContext("setPrescribedMotionPoly (wrapper)", 0);
22500  assert(__pyx_arg_coeff1); {
22501  __pyx_v_coeff1 = __pyx_PyFloat_AsDouble(__pyx_arg_coeff1); if (unlikely((__pyx_v_coeff1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1054, __pyx_L3_error)
22502  }
22503  goto __pyx_L4_argument_unpacking_done;
22504  __pyx_L3_error:;
22505  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPrescribedMotionPoly", __pyx_clineno, __pyx_lineno, __pyx_filename);
22506  __Pyx_RefNannyFinishContext();
22507  return NULL;
22508  __pyx_L4_argument_unpacking_done:;
22509  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_94setPrescribedMotionPoly(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((double)__pyx_v_coeff1));
22510 
22511  /* function exit code */
22512  __Pyx_RefNannyFinishContext();
22513  return __pyx_r;
22514 }
22515 
22516 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_94setPrescribedMotionPoly(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_coeff1) {
22517  PyObject *__pyx_r = NULL;
22518  __Pyx_TraceDeclarations
22519  __Pyx_RefNannyDeclarations
22520  int __pyx_lineno = 0;
22521  const char *__pyx_filename = NULL;
22522  int __pyx_clineno = 0;
22523  __Pyx_TraceFrameInit(__pyx_codeobj__81)
22524  __Pyx_RefNannySetupContext("setPrescribedMotionPoly", 0);
22525  __Pyx_TraceCall("setPrescribedMotionPoly", __pyx_f[0], 1054, 0, __PYX_ERR(0, 1054, __pyx_L1_error));
22526 
22527  /* "mbd/CouplingFSI.pyx":1062
22528  * coeff1 of polynomial
22529  * """
22530  * self.thisptr.setPrescribedMotionPoly(coeff1) # <<<<<<<<<<<<<<
22531  *
22532  * def setPrescribedMotion(self, function):
22533  */
22534  __pyx_v_self->thisptr->setPrescribedMotionPoly(__pyx_v_coeff1);
22535 
22536  /* "mbd/CouplingFSI.pyx":1054
22537  * self.thisptr.setPrescribedMotionSine(a, f)
22538  *
22539  * def setPrescribedMotionPoly(self, double coeff1): # <<<<<<<<<<<<<<
22540  * """Sets polynomial prescribed motion for body
22541  *
22542  */
22543 
22544  /* function exit code */
22545  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22546  goto __pyx_L0;
22547  __pyx_L1_error:;
22548  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPrescribedMotionPoly", __pyx_clineno, __pyx_lineno, __pyx_filename);
22549  __pyx_r = NULL;
22550  __pyx_L0:;
22551  __Pyx_XGIVEREF(__pyx_r);
22552  __Pyx_TraceReturn(__pyx_r, 0);
22553  __Pyx_RefNannyFinishContext();
22554  return __pyx_r;
22555 }
22556 
22557 /* "mbd/CouplingFSI.pyx":1064
22558  * self.thisptr.setPrescribedMotionPoly(coeff1)
22559  *
22560  * def setPrescribedMotion(self, function): # <<<<<<<<<<<<<<
22561  * """Sets custom prescribed motion function
22562  * (!) should be preferably set only if body is free and not
22563  */
22564 
22565 /* Python wrapper */
22566 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_97setPrescribedMotion(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
22567 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_96setPrescribedMotion[] = "ProtChBody.setPrescribedMotion(self, function)\nSets custom prescribed motion function\n (!) should be preferably set only if body is free and not\n linked to other bodies or other elements (such as moorings)\n as this is used only for setting moving mesh BC by enforcing\n position of the body at each time step.\n Use setPrescribedMotionPoly or setPrescribedMotionSine for\n functions that are safe to use with a body linked with other\n elements.\n\n Parameters\n ----------\n function:\n must be a function of time returning an array of the\n absolute position of the body (numpy array of length 3:\n x, y, z)\n ";
22568 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_97setPrescribedMotion = {"setPrescribedMotion", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_97setPrescribedMotion, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_96setPrescribedMotion};
22569 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_97setPrescribedMotion(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
22570  PyObject *__pyx_r = 0;
22571  __Pyx_RefNannyDeclarations
22572  __Pyx_RefNannySetupContext("setPrescribedMotion (wrapper)", 0);
22573  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_96setPrescribedMotion(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_function));
22574 
22575  /* function exit code */
22576  __Pyx_RefNannyFinishContext();
22577  return __pyx_r;
22578 }
22579 
22580 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_96setPrescribedMotion(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_function) {
22581  PyObject *__pyx_r = NULL;
22582  __Pyx_TraceDeclarations
22583  __Pyx_RefNannyDeclarations
22584  int __pyx_lineno = 0;
22585  const char *__pyx_filename = NULL;
22586  int __pyx_clineno = 0;
22587  __Pyx_TraceFrameInit(__pyx_codeobj__82)
22588  __Pyx_RefNannySetupContext("setPrescribedMotion", 0);
22589  __Pyx_TraceCall("setPrescribedMotion", __pyx_f[0], 1064, 0, __PYX_ERR(0, 1064, __pyx_L1_error));
22590 
22591  /* "mbd/CouplingFSI.pyx":1081
22592  * x, y, z)
22593  * """
22594  * self.prescribed_motion_function = function # <<<<<<<<<<<<<<
22595  *
22596  * cdef np.ndarray callPrescribedMotion(self, double t):
22597  */
22598  __Pyx_INCREF(__pyx_v_function);
22599  __Pyx_GIVEREF(__pyx_v_function);
22600  __Pyx_GOTREF(__pyx_v_self->prescribed_motion_function);
22601  __Pyx_DECREF(__pyx_v_self->prescribed_motion_function);
22602  __pyx_v_self->prescribed_motion_function = __pyx_v_function;
22603 
22604  /* "mbd/CouplingFSI.pyx":1064
22605  * self.thisptr.setPrescribedMotionPoly(coeff1)
22606  *
22607  * def setPrescribedMotion(self, function): # <<<<<<<<<<<<<<
22608  * """Sets custom prescribed motion function
22609  * (!) should be preferably set only if body is free and not
22610  */
22611 
22612  /* function exit code */
22613  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22614  goto __pyx_L0;
22615  __pyx_L1_error:;
22616  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setPrescribedMotion", __pyx_clineno, __pyx_lineno, __pyx_filename);
22617  __pyx_r = NULL;
22618  __pyx_L0:;
22619  __Pyx_XGIVEREF(__pyx_r);
22620  __Pyx_TraceReturn(__pyx_r, 0);
22621  __Pyx_RefNannyFinishContext();
22622  return __pyx_r;
22623 }
22624 
22625 /* "mbd/CouplingFSI.pyx":1083
22626  * self.prescribed_motion_function = function
22627  *
22628  * cdef np.ndarray callPrescribedMotion(self, double t): # <<<<<<<<<<<<<<
22629  * return self.prescribed_motion_function(t)
22630  *
22631  */
22632 
22633 static PyArrayObject *__pyx_f_3mbd_11CouplingFSI_10ProtChBody_callPrescribedMotion(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, double __pyx_v_t) {
22634  PyArrayObject *__pyx_r = NULL;
22635  __Pyx_TraceDeclarations
22636  __Pyx_RefNannyDeclarations
22637  PyObject *__pyx_t_1 = NULL;
22638  PyObject *__pyx_t_2 = NULL;
22639  PyObject *__pyx_t_3 = NULL;
22640  PyObject *__pyx_t_4 = NULL;
22641  int __pyx_lineno = 0;
22642  const char *__pyx_filename = NULL;
22643  int __pyx_clineno = 0;
22644  __Pyx_RefNannySetupContext("callPrescribedMotion", 0);
22645  __Pyx_TraceCall("callPrescribedMotion", __pyx_f[0], 1083, 0, __PYX_ERR(0, 1083, __pyx_L1_error));
22646 
22647  /* "mbd/CouplingFSI.pyx":1084
22648  *
22649  * cdef np.ndarray callPrescribedMotion(self, double t):
22650  * return self.prescribed_motion_function(t) # <<<<<<<<<<<<<<
22651  *
22652  * def storeValues(self):
22653  */
22654  __Pyx_XDECREF(((PyObject *)__pyx_r));
22655  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
22656  __Pyx_GOTREF(__pyx_t_2);
22657  __Pyx_INCREF(__pyx_v_self->prescribed_motion_function);
22658  __pyx_t_3 = __pyx_v_self->prescribed_motion_function; __pyx_t_4 = NULL;
22659  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
22660  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
22661  if (likely(__pyx_t_4)) {
22662  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
22663  __Pyx_INCREF(__pyx_t_4);
22664  __Pyx_INCREF(function);
22665  __Pyx_DECREF_SET(__pyx_t_3, function);
22666  }
22667  }
22668  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
22669  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22670  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22671  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
22672  __Pyx_GOTREF(__pyx_t_1);
22673  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22674  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1084, __pyx_L1_error)
22675  __pyx_r = ((PyArrayObject *)__pyx_t_1);
22676  __pyx_t_1 = 0;
22677  goto __pyx_L0;
22678 
22679  /* "mbd/CouplingFSI.pyx":1083
22680  * self.prescribed_motion_function = function
22681  *
22682  * cdef np.ndarray callPrescribedMotion(self, double t): # <<<<<<<<<<<<<<
22683  * return self.prescribed_motion_function(t)
22684  *
22685  */
22686 
22687  /* function exit code */
22688  __pyx_L1_error:;
22689  __Pyx_XDECREF(__pyx_t_1);
22690  __Pyx_XDECREF(__pyx_t_2);
22691  __Pyx_XDECREF(__pyx_t_3);
22692  __Pyx_XDECREF(__pyx_t_4);
22693  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.callPrescribedMotion", __pyx_clineno, __pyx_lineno, __pyx_filename);
22694  __pyx_r = 0;
22695  __pyx_L0:;
22696  __Pyx_XGIVEREF((PyObject *)__pyx_r);
22697  __Pyx_TraceReturn(__pyx_r, 0);
22698  __Pyx_RefNannyFinishContext();
22699  return __pyx_r;
22700 }
22701 
22702 /* "mbd/CouplingFSI.pyx":1086
22703  * return self.prescribed_motion_function(t)
22704  *
22705  * def storeValues(self): # <<<<<<<<<<<<<<
22706  * self.velocity_last = self.velocity
22707  * self.position_last = self.position
22708  */
22709 
22710 /* Python wrapper */
22711 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_99storeValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
22712 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_98storeValues[] = "ProtChBody.storeValues(self)";
22713 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_99storeValues = {"storeValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_99storeValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_98storeValues};
22714 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_99storeValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
22715  PyObject *__pyx_r = 0;
22716  __Pyx_RefNannyDeclarations
22717  __Pyx_RefNannySetupContext("storeValues (wrapper)", 0);
22718  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_98storeValues(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
22719 
22720  /* function exit code */
22721  __Pyx_RefNannyFinishContext();
22722  return __pyx_r;
22723 }
22724 
22725 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_98storeValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
22726  PyObject *__pyx_r = NULL;
22727  __Pyx_TraceDeclarations
22728  __Pyx_RefNannyDeclarations
22729  PyObject *__pyx_t_1 = NULL;
22730  double __pyx_t_2;
22731  PyObject *__pyx_t_3 = NULL;
22732  PyObject *__pyx_t_4 = NULL;
22733  int __pyx_lineno = 0;
22734  const char *__pyx_filename = NULL;
22735  int __pyx_clineno = 0;
22736  __Pyx_TraceFrameInit(__pyx_codeobj__83)
22737  __Pyx_RefNannySetupContext("storeValues", 0);
22738  __Pyx_TraceCall("storeValues", __pyx_f[0], 1086, 0, __PYX_ERR(0, 1086, __pyx_L1_error));
22739 
22740  /* "mbd/CouplingFSI.pyx":1087
22741  *
22742  * def storeValues(self):
22743  * self.velocity_last = self.velocity # <<<<<<<<<<<<<<
22744  * self.position_last = self.position
22745  * self.acceleration_last = self.acceleration
22746  */
22747  __pyx_t_1 = ((PyObject *)__pyx_v_self->velocity);
22748  __Pyx_INCREF(__pyx_t_1);
22749  __Pyx_GIVEREF(__pyx_t_1);
22750  __Pyx_GOTREF(__pyx_v_self->velocity_last);
22751  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity_last));
22752  __pyx_v_self->velocity_last = ((PyArrayObject *)__pyx_t_1);
22753  __pyx_t_1 = 0;
22754 
22755  /* "mbd/CouplingFSI.pyx":1088
22756  * def storeValues(self):
22757  * self.velocity_last = self.velocity
22758  * self.position_last = self.position # <<<<<<<<<<<<<<
22759  * self.acceleration_last = self.acceleration
22760  * self.rotq_last = self.rotq
22761  */
22762  __pyx_t_1 = ((PyObject *)__pyx_v_self->position);
22763  __Pyx_INCREF(__pyx_t_1);
22764  __Pyx_GIVEREF(__pyx_t_1);
22765  __Pyx_GOTREF(__pyx_v_self->position_last);
22766  __Pyx_DECREF(((PyObject *)__pyx_v_self->position_last));
22767  __pyx_v_self->position_last = ((PyArrayObject *)__pyx_t_1);
22768  __pyx_t_1 = 0;
22769 
22770  /* "mbd/CouplingFSI.pyx":1089
22771  * self.velocity_last = self.velocity
22772  * self.position_last = self.position
22773  * self.acceleration_last = self.acceleration # <<<<<<<<<<<<<<
22774  * self.rotq_last = self.rotq
22775  * # self.rotm_last = self.rotm
22776  */
22777  __pyx_t_1 = ((PyObject *)__pyx_v_self->acceleration);
22778  __Pyx_INCREF(__pyx_t_1);
22779  __Pyx_GIVEREF(__pyx_t_1);
22780  __Pyx_GOTREF(__pyx_v_self->acceleration_last);
22781  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration_last));
22782  __pyx_v_self->acceleration_last = ((PyArrayObject *)__pyx_t_1);
22783  __pyx_t_1 = 0;
22784 
22785  /* "mbd/CouplingFSI.pyx":1090
22786  * self.position_last = self.position
22787  * self.acceleration_last = self.acceleration
22788  * self.rotq_last = self.rotq # <<<<<<<<<<<<<<
22789  * # self.rotm_last = self.rotm
22790  * self.ang_acceleration_last = self.ang_acceleration
22791  */
22792  __pyx_t_1 = ((PyObject *)__pyx_v_self->rotq);
22793  __Pyx_INCREF(__pyx_t_1);
22794  __Pyx_GIVEREF(__pyx_t_1);
22795  __Pyx_GOTREF(__pyx_v_self->rotq_last);
22796  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotq_last));
22797  __pyx_v_self->rotq_last = ((PyArrayObject *)__pyx_t_1);
22798  __pyx_t_1 = 0;
22799 
22800  /* "mbd/CouplingFSI.pyx":1092
22801  * self.rotq_last = self.rotq
22802  * # self.rotm_last = self.rotm
22803  * self.ang_acceleration_last = self.ang_acceleration # <<<<<<<<<<<<<<
22804  * self.ang_velocity_last = self.ang_velocity
22805  * self.F_last = self.F
22806  */
22807  __pyx_t_1 = ((PyObject *)__pyx_v_self->ang_acceleration);
22808  __Pyx_INCREF(__pyx_t_1);
22809  __Pyx_GIVEREF(__pyx_t_1);
22810  __Pyx_GOTREF(__pyx_v_self->ang_acceleration_last);
22811  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_acceleration_last));
22812  __pyx_v_self->ang_acceleration_last = ((PyArrayObject *)__pyx_t_1);
22813  __pyx_t_1 = 0;
22814 
22815  /* "mbd/CouplingFSI.pyx":1093
22816  * # self.rotm_last = self.rotm
22817  * self.ang_acceleration_last = self.ang_acceleration
22818  * self.ang_velocity_last = self.ang_velocity # <<<<<<<<<<<<<<
22819  * self.F_last = self.F
22820  * self.M_last = self.M
22821  */
22822  __pyx_t_1 = ((PyObject *)__pyx_v_self->ang_velocity);
22823  __Pyx_INCREF(__pyx_t_1);
22824  __Pyx_GIVEREF(__pyx_t_1);
22825  __Pyx_GOTREF(__pyx_v_self->ang_velocity_last);
22826  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_velocity_last));
22827  __pyx_v_self->ang_velocity_last = ((PyArrayObject *)__pyx_t_1);
22828  __pyx_t_1 = 0;
22829 
22830  /* "mbd/CouplingFSI.pyx":1094
22831  * self.ang_acceleration_last = self.ang_acceleration
22832  * self.ang_velocity_last = self.ang_velocity
22833  * self.F_last = self.F # <<<<<<<<<<<<<<
22834  * self.M_last = self.M
22835  * self.ang_vel_norm_last = self.ang_vel_norm
22836  */
22837  __pyx_t_1 = ((PyObject *)__pyx_v_self->F);
22838  __Pyx_INCREF(__pyx_t_1);
22839  __Pyx_GIVEREF(__pyx_t_1);
22840  __Pyx_GOTREF(__pyx_v_self->F_last);
22841  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_last));
22842  __pyx_v_self->F_last = ((PyArrayObject *)__pyx_t_1);
22843  __pyx_t_1 = 0;
22844 
22845  /* "mbd/CouplingFSI.pyx":1095
22846  * self.ang_velocity_last = self.ang_velocity
22847  * self.F_last = self.F
22848  * self.M_last = self.M # <<<<<<<<<<<<<<
22849  * self.ang_vel_norm_last = self.ang_vel_norm
22850  * # force from fluid at current time step
22851  */
22852  __pyx_t_1 = ((PyObject *)__pyx_v_self->M);
22853  __Pyx_INCREF(__pyx_t_1);
22854  __Pyx_GIVEREF(__pyx_t_1);
22855  __Pyx_GOTREF(__pyx_v_self->M_last);
22856  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_last));
22857  __pyx_v_self->M_last = ((PyArrayObject *)__pyx_t_1);
22858  __pyx_t_1 = 0;
22859 
22860  /* "mbd/CouplingFSI.pyx":1096
22861  * self.F_last = self.F
22862  * self.M_last = self.M
22863  * self.ang_vel_norm_last = self.ang_vel_norm # <<<<<<<<<<<<<<
22864  * # force from fluid at current time step
22865  * self.F_prot_last = np.array(self.F_prot)
22866  */
22867  __pyx_t_2 = __pyx_v_self->ang_vel_norm;
22868  __pyx_v_self->ang_vel_norm_last = __pyx_t_2;
22869 
22870  /* "mbd/CouplingFSI.pyx":1098
22871  * self.ang_vel_norm_last = self.ang_vel_norm
22872  * # force from fluid at current time step
22873  * self.F_prot_last = np.array(self.F_prot) # <<<<<<<<<<<<<<
22874  * self.M_prot_last = np.array(self.M_prot)
22875  * self.F_applied_last = np.array(self.F_applied)
22876  */
22877  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1098, __pyx_L1_error)
22878  __Pyx_GOTREF(__pyx_t_3);
22879  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
22880  __Pyx_GOTREF(__pyx_t_4);
22881  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22882  __pyx_t_3 = NULL;
22883  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
22884  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
22885  if (likely(__pyx_t_3)) {
22886  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
22887  __Pyx_INCREF(__pyx_t_3);
22888  __Pyx_INCREF(function);
22889  __Pyx_DECREF_SET(__pyx_t_4, function);
22890  }
22891  }
22892  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self->F_prot)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self->F_prot));
22893  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
22894  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
22895  __Pyx_GOTREF(__pyx_t_1);
22896  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22897  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1098, __pyx_L1_error)
22898  __Pyx_GIVEREF(__pyx_t_1);
22899  __Pyx_GOTREF(__pyx_v_self->F_prot_last);
22900  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot_last));
22901  __pyx_v_self->F_prot_last = ((PyArrayObject *)__pyx_t_1);
22902  __pyx_t_1 = 0;
22903 
22904  /* "mbd/CouplingFSI.pyx":1099
22905  * # force from fluid at current time step
22906  * self.F_prot_last = np.array(self.F_prot)
22907  * self.M_prot_last = np.array(self.M_prot) # <<<<<<<<<<<<<<
22908  * self.F_applied_last = np.array(self.F_applied)
22909  * self.M_applied_last = np.array(self.M_applied)
22910  */
22911  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
22912  __Pyx_GOTREF(__pyx_t_4);
22913  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1099, __pyx_L1_error)
22914  __Pyx_GOTREF(__pyx_t_3);
22915  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22916  __pyx_t_4 = NULL;
22917  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
22918  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
22919  if (likely(__pyx_t_4)) {
22920  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
22921  __Pyx_INCREF(__pyx_t_4);
22922  __Pyx_INCREF(function);
22923  __Pyx_DECREF_SET(__pyx_t_3, function);
22924  }
22925  }
22926  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self->M_prot)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->M_prot));
22927  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22928  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __pyx_L1_error)
22929  __Pyx_GOTREF(__pyx_t_1);
22930  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22931  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1099, __pyx_L1_error)
22932  __Pyx_GIVEREF(__pyx_t_1);
22933  __Pyx_GOTREF(__pyx_v_self->M_prot_last);
22934  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot_last));
22935  __pyx_v_self->M_prot_last = ((PyArrayObject *)__pyx_t_1);
22936  __pyx_t_1 = 0;
22937 
22938  /* "mbd/CouplingFSI.pyx":1100
22939  * self.F_prot_last = np.array(self.F_prot)
22940  * self.M_prot_last = np.array(self.M_prot)
22941  * self.F_applied_last = np.array(self.F_applied) # <<<<<<<<<<<<<<
22942  * self.M_applied_last = np.array(self.M_applied)
22943  * self.F_Aij_last = np.array(self.F_Aij)
22944  */
22945  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1100, __pyx_L1_error)
22946  __Pyx_GOTREF(__pyx_t_3);
22947  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1100, __pyx_L1_error)
22948  __Pyx_GOTREF(__pyx_t_4);
22949  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22950  __pyx_t_3 = NULL;
22951  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
22952  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
22953  if (likely(__pyx_t_3)) {
22954  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
22955  __Pyx_INCREF(__pyx_t_3);
22956  __Pyx_INCREF(function);
22957  __Pyx_DECREF_SET(__pyx_t_4, function);
22958  }
22959  }
22960  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self->F_applied)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self->F_applied));
22961  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
22962  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error)
22963  __Pyx_GOTREF(__pyx_t_1);
22964  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22965  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1100, __pyx_L1_error)
22966  __Pyx_GIVEREF(__pyx_t_1);
22967  __Pyx_GOTREF(__pyx_v_self->F_applied_last);
22968  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_applied_last));
22969  __pyx_v_self->F_applied_last = ((PyArrayObject *)__pyx_t_1);
22970  __pyx_t_1 = 0;
22971 
22972  /* "mbd/CouplingFSI.pyx":1101
22973  * self.M_prot_last = np.array(self.M_prot)
22974  * self.F_applied_last = np.array(self.F_applied)
22975  * self.M_applied_last = np.array(self.M_applied) # <<<<<<<<<<<<<<
22976  * self.F_Aij_last = np.array(self.F_Aij)
22977  * self.M_Aij_last = np.array(self.M_Aij)
22978  */
22979  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
22980  __Pyx_GOTREF(__pyx_t_4);
22981  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1101, __pyx_L1_error)
22982  __Pyx_GOTREF(__pyx_t_3);
22983  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
22984  __pyx_t_4 = NULL;
22985  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
22986  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
22987  if (likely(__pyx_t_4)) {
22988  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
22989  __Pyx_INCREF(__pyx_t_4);
22990  __Pyx_INCREF(function);
22991  __Pyx_DECREF_SET(__pyx_t_3, function);
22992  }
22993  }
22994  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self->M_applied)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->M_applied));
22995  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
22996  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
22997  __Pyx_GOTREF(__pyx_t_1);
22998  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22999  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1101, __pyx_L1_error)
23000  __Pyx_GIVEREF(__pyx_t_1);
23001  __Pyx_GOTREF(__pyx_v_self->M_applied_last);
23002  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_applied_last));
23003  __pyx_v_self->M_applied_last = ((PyArrayObject *)__pyx_t_1);
23004  __pyx_t_1 = 0;
23005 
23006  /* "mbd/CouplingFSI.pyx":1102
23007  * self.F_applied_last = np.array(self.F_applied)
23008  * self.M_applied_last = np.array(self.M_applied)
23009  * self.F_Aij_last = np.array(self.F_Aij) # <<<<<<<<<<<<<<
23010  * self.M_Aij_last = np.array(self.M_Aij)
23011  *
23012  */
23013  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1102, __pyx_L1_error)
23014  __Pyx_GOTREF(__pyx_t_3);
23015  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1102, __pyx_L1_error)
23016  __Pyx_GOTREF(__pyx_t_4);
23017  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23018  __pyx_t_3 = NULL;
23019  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
23020  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
23021  if (likely(__pyx_t_3)) {
23022  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23023  __Pyx_INCREF(__pyx_t_3);
23024  __Pyx_INCREF(function);
23025  __Pyx_DECREF_SET(__pyx_t_4, function);
23026  }
23027  }
23028  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self->F_Aij)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self->F_Aij));
23029  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
23030  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
23031  __Pyx_GOTREF(__pyx_t_1);
23032  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23033  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1102, __pyx_L1_error)
23034  __Pyx_GIVEREF(__pyx_t_1);
23035  __Pyx_GOTREF(__pyx_v_self->F_Aij_last);
23036  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_Aij_last));
23037  __pyx_v_self->F_Aij_last = ((PyArrayObject *)__pyx_t_1);
23038  __pyx_t_1 = 0;
23039 
23040  /* "mbd/CouplingFSI.pyx":1103
23041  * self.M_applied_last = np.array(self.M_applied)
23042  * self.F_Aij_last = np.array(self.F_Aij)
23043  * self.M_Aij_last = np.array(self.M_Aij) # <<<<<<<<<<<<<<
23044  *
23045  * def getValues(self):
23046  */
23047  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
23048  __Pyx_GOTREF(__pyx_t_4);
23049  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1103, __pyx_L1_error)
23050  __Pyx_GOTREF(__pyx_t_3);
23051  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23052  __pyx_t_4 = NULL;
23053  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
23054  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
23055  if (likely(__pyx_t_4)) {
23056  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
23057  __Pyx_INCREF(__pyx_t_4);
23058  __Pyx_INCREF(function);
23059  __Pyx_DECREF_SET(__pyx_t_3, function);
23060  }
23061  }
23062  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self->M_Aij)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->M_Aij));
23063  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23064  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1103, __pyx_L1_error)
23065  __Pyx_GOTREF(__pyx_t_1);
23066  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23067  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1103, __pyx_L1_error)
23068  __Pyx_GIVEREF(__pyx_t_1);
23069  __Pyx_GOTREF(__pyx_v_self->M_Aij_last);
23070  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_Aij_last));
23071  __pyx_v_self->M_Aij_last = ((PyArrayObject *)__pyx_t_1);
23072  __pyx_t_1 = 0;
23073 
23074  /* "mbd/CouplingFSI.pyx":1086
23075  * return self.prescribed_motion_function(t)
23076  *
23077  * def storeValues(self): # <<<<<<<<<<<<<<
23078  * self.velocity_last = self.velocity
23079  * self.position_last = self.position
23080  */
23081 
23082  /* function exit code */
23083  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23084  goto __pyx_L0;
23085  __pyx_L1_error:;
23086  __Pyx_XDECREF(__pyx_t_1);
23087  __Pyx_XDECREF(__pyx_t_3);
23088  __Pyx_XDECREF(__pyx_t_4);
23089  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.storeValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
23090  __pyx_r = NULL;
23091  __pyx_L0:;
23092  __Pyx_XGIVEREF(__pyx_r);
23093  __Pyx_TraceReturn(__pyx_r, 0);
23094  __Pyx_RefNannyFinishContext();
23095  return __pyx_r;
23096 }
23097 
23098 /* "mbd/CouplingFSI.pyx":1105
23099  * self.M_Aij_last = np.array(self.M_Aij)
23100  *
23101  * def getValues(self): # <<<<<<<<<<<<<<
23102  * """Get values (pos, vel, acc, etc.) from C++ to python
23103  * """
23104  */
23105 
23106 /* Python wrapper */
23107 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_101getValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
23108 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_100getValues[] = "ProtChBody.getValues(self)\nGet values (pos, vel, acc, etc.) from C++ to python\n ";
23109 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_101getValues = {"getValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_101getValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_100getValues};
23110 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_101getValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
23111  PyObject *__pyx_r = 0;
23112  __Pyx_RefNannyDeclarations
23113  __Pyx_RefNannySetupContext("getValues (wrapper)", 0);
23114  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_100getValues(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
23115 
23116  /* function exit code */
23117  __Pyx_RefNannyFinishContext();
23118  return __pyx_r;
23119 }
23120 
23121 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_100getValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
23122  PyObject *__pyx_r = NULL;
23123  __Pyx_TraceDeclarations
23124  __Pyx_RefNannyDeclarations
23125  PyObject *__pyx_t_1 = NULL;
23126  PyObject *__pyx_t_2 = NULL;
23127  PyObject *__pyx_t_3 = NULL;
23128  PyObject *__pyx_t_4 = NULL;
23129  PyObject *__pyx_t_5 = NULL;
23130  double __pyx_t_6;
23131  PyObject *__pyx_t_7 = NULL;
23132  int __pyx_lineno = 0;
23133  const char *__pyx_filename = NULL;
23134  int __pyx_clineno = 0;
23135  __Pyx_TraceFrameInit(__pyx_codeobj__84)
23136  __Pyx_RefNannySetupContext("getValues", 0);
23137  __Pyx_TraceCall("getValues", __pyx_f[0], 1105, 0, __PYX_ERR(0, 1105, __pyx_L1_error));
23138 
23139  /* "mbd/CouplingFSI.pyx":1109
23140  * """
23141  * # position
23142  * self.position = pyvec2array(self.ChBody.GetPos()) # <<<<<<<<<<<<<<
23143  * # rotation
23144  * self.rotq = pyquat2array(self.ChBody.GetRot())
23145  */
23146  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1109, __pyx_L1_error)
23147  __Pyx_GOTREF(__pyx_t_2);
23148  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1109, __pyx_L1_error)
23149  __Pyx_GOTREF(__pyx_t_4);
23150  __pyx_t_5 = NULL;
23151  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
23152  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
23153  if (likely(__pyx_t_5)) {
23154  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23155  __Pyx_INCREF(__pyx_t_5);
23156  __Pyx_INCREF(function);
23157  __Pyx_DECREF_SET(__pyx_t_4, function);
23158  }
23159  }
23160  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
23161  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23162  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1109, __pyx_L1_error)
23163  __Pyx_GOTREF(__pyx_t_3);
23164  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23165  __pyx_t_4 = NULL;
23166  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
23167  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23168  if (likely(__pyx_t_4)) {
23169  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23170  __Pyx_INCREF(__pyx_t_4);
23171  __Pyx_INCREF(function);
23172  __Pyx_DECREF_SET(__pyx_t_2, function);
23173  }
23174  }
23175  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
23176  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23177  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23178  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
23179  __Pyx_GOTREF(__pyx_t_1);
23180  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23181  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1109, __pyx_L1_error)
23182  __Pyx_GIVEREF(__pyx_t_1);
23183  __Pyx_GOTREF(__pyx_v_self->position);
23184  __Pyx_DECREF(((PyObject *)__pyx_v_self->position));
23185  __pyx_v_self->position = ((PyArrayObject *)__pyx_t_1);
23186  __pyx_t_1 = 0;
23187 
23188  /* "mbd/CouplingFSI.pyx":1111
23189  * self.position = pyvec2array(self.ChBody.GetPos())
23190  * # rotation
23191  * self.rotq = pyquat2array(self.ChBody.GetRot()) # <<<<<<<<<<<<<<
23192  * # self.rotm = mat332array(self.ChBody.GetA())
23193  * # acceleration
23194  */
23195  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyquat2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1111, __pyx_L1_error)
23196  __Pyx_GOTREF(__pyx_t_2);
23197  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetRot); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1111, __pyx_L1_error)
23198  __Pyx_GOTREF(__pyx_t_4);
23199  __pyx_t_5 = NULL;
23200  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
23201  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
23202  if (likely(__pyx_t_5)) {
23203  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23204  __Pyx_INCREF(__pyx_t_5);
23205  __Pyx_INCREF(function);
23206  __Pyx_DECREF_SET(__pyx_t_4, function);
23207  }
23208  }
23209  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
23210  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23211  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1111, __pyx_L1_error)
23212  __Pyx_GOTREF(__pyx_t_3);
23213  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23214  __pyx_t_4 = NULL;
23215  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
23216  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23217  if (likely(__pyx_t_4)) {
23218  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23219  __Pyx_INCREF(__pyx_t_4);
23220  __Pyx_INCREF(function);
23221  __Pyx_DECREF_SET(__pyx_t_2, function);
23222  }
23223  }
23224  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
23225  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23226  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23227  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
23228  __Pyx_GOTREF(__pyx_t_1);
23229  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23230  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1111, __pyx_L1_error)
23231  __Pyx_GIVEREF(__pyx_t_1);
23232  __Pyx_GOTREF(__pyx_v_self->rotq);
23233  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotq));
23234  __pyx_v_self->rotq = ((PyArrayObject *)__pyx_t_1);
23235  __pyx_t_1 = 0;
23236 
23237  /* "mbd/CouplingFSI.pyx":1114
23238  * # self.rotm = mat332array(self.ChBody.GetA())
23239  * # acceleration
23240  * self.acceleration = pyvec2array(self.ChBody.GetPos_dtdt()) # <<<<<<<<<<<<<<
23241  * #velocity
23242  * self.velocity = pyvec2array(self.ChBody.GetPos_dt())
23243  */
23244  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1114, __pyx_L1_error)
23245  __Pyx_GOTREF(__pyx_t_2);
23246  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos_dtdt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1114, __pyx_L1_error)
23247  __Pyx_GOTREF(__pyx_t_4);
23248  __pyx_t_5 = NULL;
23249  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
23250  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
23251  if (likely(__pyx_t_5)) {
23252  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23253  __Pyx_INCREF(__pyx_t_5);
23254  __Pyx_INCREF(function);
23255  __Pyx_DECREF_SET(__pyx_t_4, function);
23256  }
23257  }
23258  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
23259  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23260  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1114, __pyx_L1_error)
23261  __Pyx_GOTREF(__pyx_t_3);
23262  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23263  __pyx_t_4 = NULL;
23264  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
23265  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23266  if (likely(__pyx_t_4)) {
23267  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23268  __Pyx_INCREF(__pyx_t_4);
23269  __Pyx_INCREF(function);
23270  __Pyx_DECREF_SET(__pyx_t_2, function);
23271  }
23272  }
23273  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
23274  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23275  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23276  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error)
23277  __Pyx_GOTREF(__pyx_t_1);
23278  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23279  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1114, __pyx_L1_error)
23280  __Pyx_GIVEREF(__pyx_t_1);
23281  __Pyx_GOTREF(__pyx_v_self->acceleration);
23282  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration));
23283  __pyx_v_self->acceleration = ((PyArrayObject *)__pyx_t_1);
23284  __pyx_t_1 = 0;
23285 
23286  /* "mbd/CouplingFSI.pyx":1116
23287  * self.acceleration = pyvec2array(self.ChBody.GetPos_dtdt())
23288  * #velocity
23289  * self.velocity = pyvec2array(self.ChBody.GetPos_dt()) # <<<<<<<<<<<<<<
23290  * # angular acceleration
23291  * self.ang_acceleration = pyvec2array(self.ChBody.GetWacc_loc())
23292  */
23293  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1116, __pyx_L1_error)
23294  __Pyx_GOTREF(__pyx_t_2);
23295  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetPos_dt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1116, __pyx_L1_error)
23296  __Pyx_GOTREF(__pyx_t_4);
23297  __pyx_t_5 = NULL;
23298  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
23299  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
23300  if (likely(__pyx_t_5)) {
23301  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23302  __Pyx_INCREF(__pyx_t_5);
23303  __Pyx_INCREF(function);
23304  __Pyx_DECREF_SET(__pyx_t_4, function);
23305  }
23306  }
23307  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
23308  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23309  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1116, __pyx_L1_error)
23310  __Pyx_GOTREF(__pyx_t_3);
23311  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23312  __pyx_t_4 = NULL;
23313  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
23314  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23315  if (likely(__pyx_t_4)) {
23316  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23317  __Pyx_INCREF(__pyx_t_4);
23318  __Pyx_INCREF(function);
23319  __Pyx_DECREF_SET(__pyx_t_2, function);
23320  }
23321  }
23322  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
23323  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23324  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23325  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
23326  __Pyx_GOTREF(__pyx_t_1);
23327  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23328  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1116, __pyx_L1_error)
23329  __Pyx_GIVEREF(__pyx_t_1);
23330  __Pyx_GOTREF(__pyx_v_self->velocity);
23331  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity));
23332  __pyx_v_self->velocity = ((PyArrayObject *)__pyx_t_1);
23333  __pyx_t_1 = 0;
23334 
23335  /* "mbd/CouplingFSI.pyx":1118
23336  * self.velocity = pyvec2array(self.ChBody.GetPos_dt())
23337  * # angular acceleration
23338  * self.ang_acceleration = pyvec2array(self.ChBody.GetWacc_loc()) # <<<<<<<<<<<<<<
23339  * # angular velocity
23340  * self.ang_velocity = pyvec2array(self.ChBody.GetWvel_loc())
23341  */
23342  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1118, __pyx_L1_error)
23343  __Pyx_GOTREF(__pyx_t_2);
23344  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetWacc_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1118, __pyx_L1_error)
23345  __Pyx_GOTREF(__pyx_t_4);
23346  __pyx_t_5 = NULL;
23347  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
23348  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
23349  if (likely(__pyx_t_5)) {
23350  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23351  __Pyx_INCREF(__pyx_t_5);
23352  __Pyx_INCREF(function);
23353  __Pyx_DECREF_SET(__pyx_t_4, function);
23354  }
23355  }
23356  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
23357  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23358  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1118, __pyx_L1_error)
23359  __Pyx_GOTREF(__pyx_t_3);
23360  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23361  __pyx_t_4 = NULL;
23362  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
23363  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23364  if (likely(__pyx_t_4)) {
23365  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23366  __Pyx_INCREF(__pyx_t_4);
23367  __Pyx_INCREF(function);
23368  __Pyx_DECREF_SET(__pyx_t_2, function);
23369  }
23370  }
23371  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
23372  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23374  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1118, __pyx_L1_error)
23375  __Pyx_GOTREF(__pyx_t_1);
23376  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23377  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1118, __pyx_L1_error)
23378  __Pyx_GIVEREF(__pyx_t_1);
23379  __Pyx_GOTREF(__pyx_v_self->ang_acceleration);
23380  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_acceleration));
23381  __pyx_v_self->ang_acceleration = ((PyArrayObject *)__pyx_t_1);
23382  __pyx_t_1 = 0;
23383 
23384  /* "mbd/CouplingFSI.pyx":1120
23385  * self.ang_acceleration = pyvec2array(self.ChBody.GetWacc_loc())
23386  * # angular velocity
23387  * self.ang_velocity = pyvec2array(self.ChBody.GetWvel_loc()) # <<<<<<<<<<<<<<
23388  * # norm of angular velocity
23389  * self.ang_vel_norm = np.sqrt(self.ang_velocity[0]**2
23390  */
23391  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error)
23392  __Pyx_GOTREF(__pyx_t_2);
23393  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBody, __pyx_n_s_GetWvel_loc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1120, __pyx_L1_error)
23394  __Pyx_GOTREF(__pyx_t_4);
23395  __pyx_t_5 = NULL;
23396  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
23397  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
23398  if (likely(__pyx_t_5)) {
23399  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
23400  __Pyx_INCREF(__pyx_t_5);
23401  __Pyx_INCREF(function);
23402  __Pyx_DECREF_SET(__pyx_t_4, function);
23403  }
23404  }
23405  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
23406  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
23407  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error)
23408  __Pyx_GOTREF(__pyx_t_3);
23409  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23410  __pyx_t_4 = NULL;
23411  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
23412  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
23413  if (likely(__pyx_t_4)) {
23414  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
23415  __Pyx_INCREF(__pyx_t_4);
23416  __Pyx_INCREF(function);
23417  __Pyx_DECREF_SET(__pyx_t_2, function);
23418  }
23419  }
23420  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
23421  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23422  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23423  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error)
23424  __Pyx_GOTREF(__pyx_t_1);
23425  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23426  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1120, __pyx_L1_error)
23427  __Pyx_GIVEREF(__pyx_t_1);
23428  __Pyx_GOTREF(__pyx_v_self->ang_velocity);
23429  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_velocity));
23430  __pyx_v_self->ang_velocity = ((PyArrayObject *)__pyx_t_1);
23431  __pyx_t_1 = 0;
23432 
23433  /* "mbd/CouplingFSI.pyx":1122
23434  * self.ang_velocity = pyvec2array(self.ChBody.GetWvel_loc())
23435  * # norm of angular velocity
23436  * self.ang_vel_norm = np.sqrt(self.ang_velocity[0]**2 # <<<<<<<<<<<<<<
23437  * +self.ang_velocity[1]**2
23438  * +self.ang_velocity[2]**2)
23439  */
23440  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
23441  __Pyx_GOTREF(__pyx_t_2);
23442  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sqrt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error)
23443  __Pyx_GOTREF(__pyx_t_3);
23444  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23445  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->ang_velocity), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error)
23446  __Pyx_GOTREF(__pyx_t_2);
23447  __pyx_t_4 = PyNumber_Power(__pyx_t_2, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1122, __pyx_L1_error)
23448  __Pyx_GOTREF(__pyx_t_4);
23449  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23450 
23451  /* "mbd/CouplingFSI.pyx":1123
23452  * # norm of angular velocity
23453  * self.ang_vel_norm = np.sqrt(self.ang_velocity[0]**2
23454  * +self.ang_velocity[1]**2 # <<<<<<<<<<<<<<
23455  * +self.ang_velocity[2]**2)
23456  * # force
23457  */
23458  __pyx_t_2 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->ang_velocity), 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
23459  __Pyx_GOTREF(__pyx_t_2);
23460  __pyx_t_5 = PyNumber_Power(__pyx_t_2, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1123, __pyx_L1_error)
23461  __Pyx_GOTREF(__pyx_t_5);
23462  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23463  __pyx_t_2 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error)
23464  __Pyx_GOTREF(__pyx_t_2);
23465  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23466  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23467 
23468  /* "mbd/CouplingFSI.pyx":1124
23469  * self.ang_vel_norm = np.sqrt(self.ang_velocity[0]**2
23470  * +self.ang_velocity[1]**2
23471  * +self.ang_velocity[2]**2) # <<<<<<<<<<<<<<
23472  * # force
23473  * self.F = np.array([self.thisptr.F.x(),
23474  */
23475  __pyx_t_5 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->ang_velocity), 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error)
23476  __Pyx_GOTREF(__pyx_t_5);
23477  __pyx_t_4 = PyNumber_Power(__pyx_t_5, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error)
23478  __Pyx_GOTREF(__pyx_t_4);
23479  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23480  __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error)
23481  __Pyx_GOTREF(__pyx_t_5);
23482  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23483  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
23484  __pyx_t_4 = NULL;
23485  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
23486  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
23487  if (likely(__pyx_t_4)) {
23488  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
23489  __Pyx_INCREF(__pyx_t_4);
23490  __Pyx_INCREF(function);
23491  __Pyx_DECREF_SET(__pyx_t_3, function);
23492  }
23493  }
23494  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
23495  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23496  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23497  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error)
23498  __Pyx_GOTREF(__pyx_t_1);
23499  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23500 
23501  /* "mbd/CouplingFSI.pyx":1122
23502  * self.ang_velocity = pyvec2array(self.ChBody.GetWvel_loc())
23503  * # norm of angular velocity
23504  * self.ang_vel_norm = np.sqrt(self.ang_velocity[0]**2 # <<<<<<<<<<<<<<
23505  * +self.ang_velocity[1]**2
23506  * +self.ang_velocity[2]**2)
23507  */
23508  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L1_error)
23509  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
23510  __pyx_v_self->ang_vel_norm = __pyx_t_6;
23511 
23512  /* "mbd/CouplingFSI.pyx":1126
23513  * +self.ang_velocity[2]**2)
23514  * # force
23515  * self.F = np.array([self.thisptr.F.x(), # <<<<<<<<<<<<<<
23516  * self.thisptr.F.y(),
23517  * self.thisptr.F.z()])
23518  */
23519  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1126, __pyx_L1_error)
23520  __Pyx_GOTREF(__pyx_t_3);
23521  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error)
23522  __Pyx_GOTREF(__pyx_t_5);
23523  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23524  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->thisptr->F.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1126, __pyx_L1_error)
23525  __Pyx_GOTREF(__pyx_t_3);
23526 
23527  /* "mbd/CouplingFSI.pyx":1127
23528  * # force
23529  * self.F = np.array([self.thisptr.F.x(),
23530  * self.thisptr.F.y(), # <<<<<<<<<<<<<<
23531  * self.thisptr.F.z()])
23532  * # moment
23533  */
23534  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->thisptr->F.y()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1127, __pyx_L1_error)
23535  __Pyx_GOTREF(__pyx_t_4);
23536 
23537  /* "mbd/CouplingFSI.pyx":1128
23538  * self.F = np.array([self.thisptr.F.x(),
23539  * self.thisptr.F.y(),
23540  * self.thisptr.F.z()]) # <<<<<<<<<<<<<<
23541  * # moment
23542  * self.M = np.array([self.thisptr.M.x(),
23543  */
23544  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->thisptr->F.z()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1128, __pyx_L1_error)
23545  __Pyx_GOTREF(__pyx_t_2);
23546 
23547  /* "mbd/CouplingFSI.pyx":1126
23548  * +self.ang_velocity[2]**2)
23549  * # force
23550  * self.F = np.array([self.thisptr.F.x(), # <<<<<<<<<<<<<<
23551  * self.thisptr.F.y(),
23552  * self.thisptr.F.z()])
23553  */
23554  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1126, __pyx_L1_error)
23555  __Pyx_GOTREF(__pyx_t_7);
23556  __Pyx_GIVEREF(__pyx_t_3);
23557  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
23558  __Pyx_GIVEREF(__pyx_t_4);
23559  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
23560  __Pyx_GIVEREF(__pyx_t_2);
23561  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_2);
23562  __pyx_t_3 = 0;
23563  __pyx_t_4 = 0;
23564  __pyx_t_2 = 0;
23565  __pyx_t_2 = NULL;
23566  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
23567  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
23568  if (likely(__pyx_t_2)) {
23569  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
23570  __Pyx_INCREF(__pyx_t_2);
23571  __Pyx_INCREF(function);
23572  __Pyx_DECREF_SET(__pyx_t_5, function);
23573  }
23574  }
23575  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7);
23576  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
23577  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23578  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
23579  __Pyx_GOTREF(__pyx_t_1);
23580  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23581  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1126, __pyx_L1_error)
23582  __Pyx_GIVEREF(__pyx_t_1);
23583  __Pyx_GOTREF(__pyx_v_self->F);
23584  __Pyx_DECREF(((PyObject *)__pyx_v_self->F));
23585  __pyx_v_self->F = ((PyArrayObject *)__pyx_t_1);
23586  __pyx_t_1 = 0;
23587 
23588  /* "mbd/CouplingFSI.pyx":1130
23589  * self.thisptr.F.z()])
23590  * # moment
23591  * self.M = np.array([self.thisptr.M.x(), # <<<<<<<<<<<<<<
23592  * self.thisptr.M.y(),
23593  * self.thisptr.M.z()])
23594  */
23595  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1130, __pyx_L1_error)
23596  __Pyx_GOTREF(__pyx_t_5);
23597  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1130, __pyx_L1_error)
23598  __Pyx_GOTREF(__pyx_t_7);
23599  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
23600  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->thisptr->M.x()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1130, __pyx_L1_error)
23601  __Pyx_GOTREF(__pyx_t_5);
23602 
23603  /* "mbd/CouplingFSI.pyx":1131
23604  * # moment
23605  * self.M = np.array([self.thisptr.M.x(),
23606  * self.thisptr.M.y(), # <<<<<<<<<<<<<<
23607  * self.thisptr.M.z()])
23608  *
23609  */
23610  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->thisptr->M.y()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1131, __pyx_L1_error)
23611  __Pyx_GOTREF(__pyx_t_2);
23612 
23613  /* "mbd/CouplingFSI.pyx":1132
23614  * self.M = np.array([self.thisptr.M.x(),
23615  * self.thisptr.M.y(),
23616  * self.thisptr.M.z()]) # <<<<<<<<<<<<<<
23617  *
23618  *
23619  */
23620  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->thisptr->M.z()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1132, __pyx_L1_error)
23621  __Pyx_GOTREF(__pyx_t_4);
23622 
23623  /* "mbd/CouplingFSI.pyx":1130
23624  * self.thisptr.F.z()])
23625  * # moment
23626  * self.M = np.array([self.thisptr.M.x(), # <<<<<<<<<<<<<<
23627  * self.thisptr.M.y(),
23628  * self.thisptr.M.z()])
23629  */
23630  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
23631  __Pyx_GOTREF(__pyx_t_3);
23632  __Pyx_GIVEREF(__pyx_t_5);
23633  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
23634  __Pyx_GIVEREF(__pyx_t_2);
23635  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
23636  __Pyx_GIVEREF(__pyx_t_4);
23637  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_4);
23638  __pyx_t_5 = 0;
23639  __pyx_t_2 = 0;
23640  __pyx_t_4 = 0;
23641  __pyx_t_4 = NULL;
23642  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
23643  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
23644  if (likely(__pyx_t_4)) {
23645  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
23646  __Pyx_INCREF(__pyx_t_4);
23647  __Pyx_INCREF(function);
23648  __Pyx_DECREF_SET(__pyx_t_7, function);
23649  }
23650  }
23651  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3);
23652  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
23653  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23654  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error)
23655  __Pyx_GOTREF(__pyx_t_1);
23656  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
23657  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1130, __pyx_L1_error)
23658  __Pyx_GIVEREF(__pyx_t_1);
23659  __Pyx_GOTREF(__pyx_v_self->M);
23660  __Pyx_DECREF(((PyObject *)__pyx_v_self->M));
23661  __pyx_v_self->M = ((PyArrayObject *)__pyx_t_1);
23662  __pyx_t_1 = 0;
23663 
23664  /* "mbd/CouplingFSI.pyx":1105
23665  * self.M_Aij_last = np.array(self.M_Aij)
23666  *
23667  * def getValues(self): # <<<<<<<<<<<<<<
23668  * """Get values (pos, vel, acc, etc.) from C++ to python
23669  * """
23670  */
23671 
23672  /* function exit code */
23673  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
23674  goto __pyx_L0;
23675  __pyx_L1_error:;
23676  __Pyx_XDECREF(__pyx_t_1);
23677  __Pyx_XDECREF(__pyx_t_2);
23678  __Pyx_XDECREF(__pyx_t_3);
23679  __Pyx_XDECREF(__pyx_t_4);
23680  __Pyx_XDECREF(__pyx_t_5);
23681  __Pyx_XDECREF(__pyx_t_7);
23682  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.getValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
23683  __pyx_r = NULL;
23684  __pyx_L0:;
23685  __Pyx_XGIVEREF(__pyx_r);
23686  __Pyx_TraceReturn(__pyx_r, 0);
23687  __Pyx_RefNannyFinishContext();
23688  return __pyx_r;
23689 }
23690 
23691 /* "mbd/CouplingFSI.pyx":1135
23692  *
23693  *
23694  * def setRecordValues(self, all_values=False, pos=False, # <<<<<<<<<<<<<<
23695  * rot=False, ang_disp=False, F=False, M=False,
23696  * inertia=False, vel=False, acc=False, ang_vel=False,
23697  */
23698 
23699 /* Python wrapper */
23700 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_103setRecordValues(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23701 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_102setRecordValues[] = "ProtChBody.setRecordValues(self, all_values=False, pos=False, rot=False, ang_disp=False, F=False, M=False, inertia=False, vel=False, acc=False, ang_vel=False, ang_acc=False, h_predict=False)\n\n Sets the body attributes that are to be recorded in a csv file\n during the simulation.\n\n Parameters\n ----------\n all_values: bool\n Set to True to record all values listed below.\n time: bool\n Time of recorded row (default: True).\n pos: bool\n Position of body (default: False. Set to True to record).\n rot: bool\n Rotation of body (default: False. Set to True to record).\n ang_disp: array\n Angular displecement calculated during rigid body calculation step.\n Applied on the body in order to make it rotating.\n F: bool\n Forces applied on body (default: False. Set to True to record).\n M: bool\n Moments applied on body (default: False. Set to True to record).\n inertia: bool\n Inertia of body (default: False. Set to True to record).\n vel: bool\n Velocity of body (default: False. Set to True to record).\n acc: bool\n Acceleration of body (default: False. Set to True to record).\n ang_vel: array\n Angular velocity of body (default: False. Set to True to record).\n ang_acc: bool\n Angular acceleration of body (default: False. Set to True to record).\n Notes\n -----\n To add another value manually, add to dictionary self.record_dict:\n key: header of the column in .csv\n value: list of length 2: [variable name, index within variable]\n (if no index, use None)\n e.g. self.record_dict['m']['mass', None]\n ";
23702 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_103setRecordValues = {"setRecordValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_103setRecordValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_102setRecordValues};
23703 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_103setRecordValues(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23704  PyObject *__pyx_v_all_values = 0;
23705  PyObject *__pyx_v_pos = 0;
23706  PyObject *__pyx_v_rot = 0;
23707  CYTHON_UNUSED PyObject *__pyx_v_ang_disp = 0;
23708  PyObject *__pyx_v_F = 0;
23709  PyObject *__pyx_v_M = 0;
23710  PyObject *__pyx_v_inertia = 0;
23711  PyObject *__pyx_v_vel = 0;
23712  PyObject *__pyx_v_acc = 0;
23713  PyObject *__pyx_v_ang_vel = 0;
23714  PyObject *__pyx_v_ang_acc = 0;
23715  PyObject *__pyx_v_h_predict = 0;
23716  int __pyx_lineno = 0;
23717  const char *__pyx_filename = NULL;
23718  int __pyx_clineno = 0;
23719  PyObject *__pyx_r = 0;
23720  __Pyx_RefNannyDeclarations
23721  __Pyx_RefNannySetupContext("setRecordValues (wrapper)", 0);
23722  {
23723  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_all_values,&__pyx_n_s_pos,&__pyx_n_s_rot,&__pyx_n_s_ang_disp,&__pyx_n_s_F,&__pyx_n_s_M,&__pyx_n_s_inertia,&__pyx_n_s_vel,&__pyx_n_s_acc,&__pyx_n_s_ang_vel,&__pyx_n_s_ang_acc,&__pyx_n_s_h_predict_2,0};
23724  PyObject* values[12] = {0,0,0,0,0,0,0,0,0,0,0,0};
23725  values[0] = ((PyObject *)Py_False);
23726  values[1] = ((PyObject *)Py_False);
23727 
23728  /* "mbd/CouplingFSI.pyx":1136
23729  *
23730  * def setRecordValues(self, all_values=False, pos=False,
23731  * rot=False, ang_disp=False, F=False, M=False, # <<<<<<<<<<<<<<
23732  * inertia=False, vel=False, acc=False, ang_vel=False,
23733  * ang_acc=False, h_predict=False):
23734  */
23735  values[2] = ((PyObject *)Py_False);
23736  values[3] = ((PyObject *)Py_False);
23737  values[4] = ((PyObject *)Py_False);
23738  values[5] = ((PyObject *)Py_False);
23739 
23740  /* "mbd/CouplingFSI.pyx":1137
23741  * def setRecordValues(self, all_values=False, pos=False,
23742  * rot=False, ang_disp=False, F=False, M=False,
23743  * inertia=False, vel=False, acc=False, ang_vel=False, # <<<<<<<<<<<<<<
23744  * ang_acc=False, h_predict=False):
23745  * """
23746  */
23747  values[6] = ((PyObject *)Py_False);
23748  values[7] = ((PyObject *)Py_False);
23749  values[8] = ((PyObject *)Py_False);
23750  values[9] = ((PyObject *)Py_False);
23751 
23752  /* "mbd/CouplingFSI.pyx":1138
23753  * rot=False, ang_disp=False, F=False, M=False,
23754  * inertia=False, vel=False, acc=False, ang_vel=False,
23755  * ang_acc=False, h_predict=False): # <<<<<<<<<<<<<<
23756  * """
23757  * Sets the body attributes that are to be recorded in a csv file
23758  */
23759  values[10] = ((PyObject *)Py_False);
23760  values[11] = ((PyObject *)Py_False);
23761  if (unlikely(__pyx_kwds)) {
23762  Py_ssize_t kw_args;
23763  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23764  switch (pos_args) {
23765  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
23766  CYTHON_FALLTHROUGH;
23767  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
23768  CYTHON_FALLTHROUGH;
23769  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
23770  CYTHON_FALLTHROUGH;
23771  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
23772  CYTHON_FALLTHROUGH;
23773  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
23774  CYTHON_FALLTHROUGH;
23775  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
23776  CYTHON_FALLTHROUGH;
23777  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
23778  CYTHON_FALLTHROUGH;
23779  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
23780  CYTHON_FALLTHROUGH;
23781  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
23782  CYTHON_FALLTHROUGH;
23783  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23784  CYTHON_FALLTHROUGH;
23785  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23786  CYTHON_FALLTHROUGH;
23787  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23788  CYTHON_FALLTHROUGH;
23789  case 0: break;
23790  default: goto __pyx_L5_argtuple_error;
23791  }
23792  kw_args = PyDict_Size(__pyx_kwds);
23793  switch (pos_args) {
23794  case 0:
23795  if (kw_args > 0) {
23796  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_all_values);
23797  if (value) { values[0] = value; kw_args--; }
23798  }
23799  CYTHON_FALLTHROUGH;
23800  case 1:
23801  if (kw_args > 0) {
23802  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pos);
23803  if (value) { values[1] = value; kw_args--; }
23804  }
23805  CYTHON_FALLTHROUGH;
23806  case 2:
23807  if (kw_args > 0) {
23808  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rot);
23809  if (value) { values[2] = value; kw_args--; }
23810  }
23811  CYTHON_FALLTHROUGH;
23812  case 3:
23813  if (kw_args > 0) {
23814  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ang_disp);
23815  if (value) { values[3] = value; kw_args--; }
23816  }
23817  CYTHON_FALLTHROUGH;
23818  case 4:
23819  if (kw_args > 0) {
23820  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_F);
23821  if (value) { values[4] = value; kw_args--; }
23822  }
23823  CYTHON_FALLTHROUGH;
23824  case 5:
23825  if (kw_args > 0) {
23826  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_M);
23827  if (value) { values[5] = value; kw_args--; }
23828  }
23829  CYTHON_FALLTHROUGH;
23830  case 6:
23831  if (kw_args > 0) {
23832  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_inertia);
23833  if (value) { values[6] = value; kw_args--; }
23834  }
23835  CYTHON_FALLTHROUGH;
23836  case 7:
23837  if (kw_args > 0) {
23838  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vel);
23839  if (value) { values[7] = value; kw_args--; }
23840  }
23841  CYTHON_FALLTHROUGH;
23842  case 8:
23843  if (kw_args > 0) {
23844  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_acc);
23845  if (value) { values[8] = value; kw_args--; }
23846  }
23847  CYTHON_FALLTHROUGH;
23848  case 9:
23849  if (kw_args > 0) {
23850  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ang_vel);
23851  if (value) { values[9] = value; kw_args--; }
23852  }
23853  CYTHON_FALLTHROUGH;
23854  case 10:
23855  if (kw_args > 0) {
23856  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ang_acc);
23857  if (value) { values[10] = value; kw_args--; }
23858  }
23859  CYTHON_FALLTHROUGH;
23860  case 11:
23861  if (kw_args > 0) {
23862  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_h_predict_2);
23863  if (value) { values[11] = value; kw_args--; }
23864  }
23865  }
23866  if (unlikely(kw_args > 0)) {
23867  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRecordValues") < 0)) __PYX_ERR(0, 1135, __pyx_L3_error)
23868  }
23869  } else {
23870  switch (PyTuple_GET_SIZE(__pyx_args)) {
23871  case 12: values[11] = PyTuple_GET_ITEM(__pyx_args, 11);
23872  CYTHON_FALLTHROUGH;
23873  case 11: values[10] = PyTuple_GET_ITEM(__pyx_args, 10);
23874  CYTHON_FALLTHROUGH;
23875  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
23876  CYTHON_FALLTHROUGH;
23877  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
23878  CYTHON_FALLTHROUGH;
23879  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
23880  CYTHON_FALLTHROUGH;
23881  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
23882  CYTHON_FALLTHROUGH;
23883  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
23884  CYTHON_FALLTHROUGH;
23885  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
23886  CYTHON_FALLTHROUGH;
23887  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
23888  CYTHON_FALLTHROUGH;
23889  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23890  CYTHON_FALLTHROUGH;
23891  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23892  CYTHON_FALLTHROUGH;
23893  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23894  CYTHON_FALLTHROUGH;
23895  case 0: break;
23896  default: goto __pyx_L5_argtuple_error;
23897  }
23898  }
23899  __pyx_v_all_values = values[0];
23900  __pyx_v_pos = values[1];
23901  __pyx_v_rot = values[2];
23902  __pyx_v_ang_disp = values[3];
23903  __pyx_v_F = values[4];
23904  __pyx_v_M = values[5];
23905  __pyx_v_inertia = values[6];
23906  __pyx_v_vel = values[7];
23907  __pyx_v_acc = values[8];
23908  __pyx_v_ang_vel = values[9];
23909  __pyx_v_ang_acc = values[10];
23910  __pyx_v_h_predict = values[11];
23911  }
23912  goto __pyx_L4_argument_unpacking_done;
23913  __pyx_L5_argtuple_error:;
23914  __Pyx_RaiseArgtupleInvalid("setRecordValues", 0, 0, 12, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1135, __pyx_L3_error)
23915  __pyx_L3_error:;
23916  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setRecordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
23917  __Pyx_RefNannyFinishContext();
23918  return NULL;
23919  __pyx_L4_argument_unpacking_done:;
23920  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_102setRecordValues(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_all_values, __pyx_v_pos, __pyx_v_rot, __pyx_v_ang_disp, __pyx_v_F, __pyx_v_M, __pyx_v_inertia, __pyx_v_vel, __pyx_v_acc, __pyx_v_ang_vel, __pyx_v_ang_acc, __pyx_v_h_predict);
23921 
23922  /* "mbd/CouplingFSI.pyx":1135
23923  *
23924  *
23925  * def setRecordValues(self, all_values=False, pos=False, # <<<<<<<<<<<<<<
23926  * rot=False, ang_disp=False, F=False, M=False,
23927  * inertia=False, vel=False, acc=False, ang_vel=False,
23928  */
23929 
23930  /* function exit code */
23931  __Pyx_RefNannyFinishContext();
23932  return __pyx_r;
23933 }
23934 
23935 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_102setRecordValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_all_values, PyObject *__pyx_v_pos, PyObject *__pyx_v_rot, CYTHON_UNUSED PyObject *__pyx_v_ang_disp, PyObject *__pyx_v_F, PyObject *__pyx_v_M, PyObject *__pyx_v_inertia, PyObject *__pyx_v_vel, PyObject *__pyx_v_acc, PyObject *__pyx_v_ang_vel, PyObject *__pyx_v_ang_acc, PyObject *__pyx_v_h_predict) {
23936  CYTHON_UNUSED int __pyx_v_Fx;
23937  CYTHON_UNUSED int __pyx_v_Fy;
23938  CYTHON_UNUSED int __pyx_v_Fz;
23939  PyObject *__pyx_r = NULL;
23940  __Pyx_TraceDeclarations
23941  __Pyx_RefNannyDeclarations
23942  int __pyx_t_1;
23943  int __pyx_t_2;
23944  PyObject *__pyx_t_3 = NULL;
23945  int __pyx_lineno = 0;
23946  const char *__pyx_filename = NULL;
23947  int __pyx_clineno = 0;
23948  __Pyx_TraceFrameInit(__pyx_codeobj__85)
23949  __Pyx_RefNannySetupContext("setRecordValues", 0);
23950  __Pyx_TraceCall("setRecordValues", __pyx_f[0], 1135, 0, __PYX_ERR(0, 1135, __pyx_L1_error));
23951  __Pyx_INCREF(__pyx_v_pos);
23952  __Pyx_INCREF(__pyx_v_rot);
23953  __Pyx_INCREF(__pyx_v_F);
23954  __Pyx_INCREF(__pyx_v_M);
23955  __Pyx_INCREF(__pyx_v_vel);
23956  __Pyx_INCREF(__pyx_v_acc);
23957  __Pyx_INCREF(__pyx_v_ang_vel);
23958  __Pyx_INCREF(__pyx_v_ang_acc);
23959  __Pyx_INCREF(__pyx_v_h_predict);
23960 
23961  /* "mbd/CouplingFSI.pyx":1178
23962  * e.g. self.record_dict['m']['mass', None]
23963  * """
23964  * if all_values is True: # <<<<<<<<<<<<<<
23965  * pos = rot = F = M = acc = vel = ang_acc = ang_vel = h_predict = True
23966  * if pos is True:
23967  */
23968  __pyx_t_1 = (__pyx_v_all_values == Py_True);
23969  __pyx_t_2 = (__pyx_t_1 != 0);
23970  if (__pyx_t_2) {
23971 
23972  /* "mbd/CouplingFSI.pyx":1179
23973  * """
23974  * if all_values is True:
23975  * pos = rot = F = M = acc = vel = ang_acc = ang_vel = h_predict = True # <<<<<<<<<<<<<<
23976  * if pos is True:
23977  * self.record_dict['x'] = ['position', 0]
23978  */
23979  __Pyx_INCREF(Py_True);
23980  __Pyx_DECREF_SET(__pyx_v_pos, Py_True);
23981  __Pyx_INCREF(Py_True);
23982  __Pyx_DECREF_SET(__pyx_v_rot, Py_True);
23983  __Pyx_INCREF(Py_True);
23984  __Pyx_DECREF_SET(__pyx_v_F, Py_True);
23985  __Pyx_INCREF(Py_True);
23986  __Pyx_DECREF_SET(__pyx_v_M, Py_True);
23987  __Pyx_INCREF(Py_True);
23988  __Pyx_DECREF_SET(__pyx_v_acc, Py_True);
23989  __Pyx_INCREF(Py_True);
23990  __Pyx_DECREF_SET(__pyx_v_vel, Py_True);
23991  __Pyx_INCREF(Py_True);
23992  __Pyx_DECREF_SET(__pyx_v_ang_acc, Py_True);
23993  __Pyx_INCREF(Py_True);
23994  __Pyx_DECREF_SET(__pyx_v_ang_vel, Py_True);
23995  __Pyx_INCREF(Py_True);
23996  __Pyx_DECREF_SET(__pyx_v_h_predict, Py_True);
23997 
23998  /* "mbd/CouplingFSI.pyx":1178
23999  * e.g. self.record_dict['m']['mass', None]
24000  * """
24001  * if all_values is True: # <<<<<<<<<<<<<<
24002  * pos = rot = F = M = acc = vel = ang_acc = ang_vel = h_predict = True
24003  * if pos is True:
24004  */
24005  }
24006 
24007  /* "mbd/CouplingFSI.pyx":1180
24008  * if all_values is True:
24009  * pos = rot = F = M = acc = vel = ang_acc = ang_vel = h_predict = True
24010  * if pos is True: # <<<<<<<<<<<<<<
24011  * self.record_dict['x'] = ['position', 0]
24012  * self.record_dict['y'] = ['position', 1]
24013  */
24014  __pyx_t_2 = (__pyx_v_pos == Py_True);
24015  __pyx_t_1 = (__pyx_t_2 != 0);
24016  if (__pyx_t_1) {
24017 
24018  /* "mbd/CouplingFSI.pyx":1181
24019  * pos = rot = F = M = acc = vel = ang_acc = ang_vel = h_predict = True
24020  * if pos is True:
24021  * self.record_dict['x'] = ['position', 0] # <<<<<<<<<<<<<<
24022  * self.record_dict['y'] = ['position', 1]
24023  * self.record_dict['z'] = ['position', 2]
24024  */
24025  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L1_error)
24026  __Pyx_GOTREF(__pyx_t_3);
24027  __Pyx_INCREF(__pyx_n_s_position);
24028  __Pyx_GIVEREF(__pyx_n_s_position);
24029  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_position);
24030  __Pyx_INCREF(__pyx_int_0);
24031  __Pyx_GIVEREF(__pyx_int_0);
24032  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24033  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_x, __pyx_t_3) < 0)) __PYX_ERR(0, 1181, __pyx_L1_error)
24034  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24035 
24036  /* "mbd/CouplingFSI.pyx":1182
24037  * if pos is True:
24038  * self.record_dict['x'] = ['position', 0]
24039  * self.record_dict['y'] = ['position', 1] # <<<<<<<<<<<<<<
24040  * self.record_dict['z'] = ['position', 2]
24041  * if rot is True:
24042  */
24043  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
24044  __Pyx_GOTREF(__pyx_t_3);
24045  __Pyx_INCREF(__pyx_n_s_position);
24046  __Pyx_GIVEREF(__pyx_n_s_position);
24047  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_position);
24048  __Pyx_INCREF(__pyx_int_1);
24049  __Pyx_GIVEREF(__pyx_int_1);
24050  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24051  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_y, __pyx_t_3) < 0)) __PYX_ERR(0, 1182, __pyx_L1_error)
24052  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24053 
24054  /* "mbd/CouplingFSI.pyx":1183
24055  * self.record_dict['x'] = ['position', 0]
24056  * self.record_dict['y'] = ['position', 1]
24057  * self.record_dict['z'] = ['position', 2] # <<<<<<<<<<<<<<
24058  * if rot is True:
24059  * self.record_dict['rotq_e0'] = ['rotq', 0]
24060  */
24061  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L1_error)
24062  __Pyx_GOTREF(__pyx_t_3);
24063  __Pyx_INCREF(__pyx_n_s_position);
24064  __Pyx_GIVEREF(__pyx_n_s_position);
24065  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_position);
24066  __Pyx_INCREF(__pyx_int_2);
24067  __Pyx_GIVEREF(__pyx_int_2);
24068  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24069  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_z, __pyx_t_3) < 0)) __PYX_ERR(0, 1183, __pyx_L1_error)
24070  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24071 
24072  /* "mbd/CouplingFSI.pyx":1180
24073  * if all_values is True:
24074  * pos = rot = F = M = acc = vel = ang_acc = ang_vel = h_predict = True
24075  * if pos is True: # <<<<<<<<<<<<<<
24076  * self.record_dict['x'] = ['position', 0]
24077  * self.record_dict['y'] = ['position', 1]
24078  */
24079  }
24080 
24081  /* "mbd/CouplingFSI.pyx":1184
24082  * self.record_dict['y'] = ['position', 1]
24083  * self.record_dict['z'] = ['position', 2]
24084  * if rot is True: # <<<<<<<<<<<<<<
24085  * self.record_dict['rotq_e0'] = ['rotq', 0]
24086  * self.record_dict['rotq_e1'] = ['rotq', 1]
24087  */
24088  __pyx_t_1 = (__pyx_v_rot == Py_True);
24089  __pyx_t_2 = (__pyx_t_1 != 0);
24090  if (__pyx_t_2) {
24091 
24092  /* "mbd/CouplingFSI.pyx":1185
24093  * self.record_dict['z'] = ['position', 2]
24094  * if rot is True:
24095  * self.record_dict['rotq_e0'] = ['rotq', 0] # <<<<<<<<<<<<<<
24096  * self.record_dict['rotq_e1'] = ['rotq', 1]
24097  * self.record_dict['rotq_e2'] = ['rotq', 2]
24098  */
24099  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1185, __pyx_L1_error)
24100  __Pyx_GOTREF(__pyx_t_3);
24101  __Pyx_INCREF(__pyx_n_s_rotq);
24102  __Pyx_GIVEREF(__pyx_n_s_rotq);
24103  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_rotq);
24104  __Pyx_INCREF(__pyx_int_0);
24105  __Pyx_GIVEREF(__pyx_int_0);
24106  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24107  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_rotq_e0, __pyx_t_3) < 0)) __PYX_ERR(0, 1185, __pyx_L1_error)
24108  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24109 
24110  /* "mbd/CouplingFSI.pyx":1186
24111  * if rot is True:
24112  * self.record_dict['rotq_e0'] = ['rotq', 0]
24113  * self.record_dict['rotq_e1'] = ['rotq', 1] # <<<<<<<<<<<<<<
24114  * self.record_dict['rotq_e2'] = ['rotq', 2]
24115  * self.record_dict['rotq_e3'] = ['rotq', 3]
24116  */
24117  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error)
24118  __Pyx_GOTREF(__pyx_t_3);
24119  __Pyx_INCREF(__pyx_n_s_rotq);
24120  __Pyx_GIVEREF(__pyx_n_s_rotq);
24121  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_rotq);
24122  __Pyx_INCREF(__pyx_int_1);
24123  __Pyx_GIVEREF(__pyx_int_1);
24124  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24125  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_rotq_e1, __pyx_t_3) < 0)) __PYX_ERR(0, 1186, __pyx_L1_error)
24126  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24127 
24128  /* "mbd/CouplingFSI.pyx":1187
24129  * self.record_dict['rotq_e0'] = ['rotq', 0]
24130  * self.record_dict['rotq_e1'] = ['rotq', 1]
24131  * self.record_dict['rotq_e2'] = ['rotq', 2] # <<<<<<<<<<<<<<
24132  * self.record_dict['rotq_e3'] = ['rotq', 3]
24133  * if F is True:
24134  */
24135  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1187, __pyx_L1_error)
24136  __Pyx_GOTREF(__pyx_t_3);
24137  __Pyx_INCREF(__pyx_n_s_rotq);
24138  __Pyx_GIVEREF(__pyx_n_s_rotq);
24139  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_rotq);
24140  __Pyx_INCREF(__pyx_int_2);
24141  __Pyx_GIVEREF(__pyx_int_2);
24142  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24143  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_rotq_e2, __pyx_t_3) < 0)) __PYX_ERR(0, 1187, __pyx_L1_error)
24144  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24145 
24146  /* "mbd/CouplingFSI.pyx":1188
24147  * self.record_dict['rotq_e1'] = ['rotq', 1]
24148  * self.record_dict['rotq_e2'] = ['rotq', 2]
24149  * self.record_dict['rotq_e3'] = ['rotq', 3] # <<<<<<<<<<<<<<
24150  * if F is True:
24151  * self.record_dict['Fx'] = ['F', 0]
24152  */
24153  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L1_error)
24154  __Pyx_GOTREF(__pyx_t_3);
24155  __Pyx_INCREF(__pyx_n_s_rotq);
24156  __Pyx_GIVEREF(__pyx_n_s_rotq);
24157  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_rotq);
24158  __Pyx_INCREF(__pyx_int_3);
24159  __Pyx_GIVEREF(__pyx_int_3);
24160  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_3);
24161  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_rotq_e3, __pyx_t_3) < 0)) __PYX_ERR(0, 1188, __pyx_L1_error)
24162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24163 
24164  /* "mbd/CouplingFSI.pyx":1184
24165  * self.record_dict['y'] = ['position', 1]
24166  * self.record_dict['z'] = ['position', 2]
24167  * if rot is True: # <<<<<<<<<<<<<<
24168  * self.record_dict['rotq_e0'] = ['rotq', 0]
24169  * self.record_dict['rotq_e1'] = ['rotq', 1]
24170  */
24171  }
24172 
24173  /* "mbd/CouplingFSI.pyx":1189
24174  * self.record_dict['rotq_e2'] = ['rotq', 2]
24175  * self.record_dict['rotq_e3'] = ['rotq', 3]
24176  * if F is True: # <<<<<<<<<<<<<<
24177  * self.record_dict['Fx'] = ['F', 0]
24178  * self.record_dict['Fy'] = ['F', 1]
24179  */
24180  __pyx_t_2 = (__pyx_v_F == Py_True);
24181  __pyx_t_1 = (__pyx_t_2 != 0);
24182  if (__pyx_t_1) {
24183 
24184  /* "mbd/CouplingFSI.pyx":1190
24185  * self.record_dict['rotq_e3'] = ['rotq', 3]
24186  * if F is True:
24187  * self.record_dict['Fx'] = ['F', 0] # <<<<<<<<<<<<<<
24188  * self.record_dict['Fy'] = ['F', 1]
24189  * self.record_dict['Fz'] = ['F', 2]
24190  */
24191  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L1_error)
24192  __Pyx_GOTREF(__pyx_t_3);
24193  __Pyx_INCREF(__pyx_n_s_F);
24194  __Pyx_GIVEREF(__pyx_n_s_F);
24195  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F);
24196  __Pyx_INCREF(__pyx_int_0);
24197  __Pyx_GIVEREF(__pyx_int_0);
24198  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24199  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fx, __pyx_t_3) < 0)) __PYX_ERR(0, 1190, __pyx_L1_error)
24200  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24201 
24202  /* "mbd/CouplingFSI.pyx":1191
24203  * if F is True:
24204  * self.record_dict['Fx'] = ['F', 0]
24205  * self.record_dict['Fy'] = ['F', 1] # <<<<<<<<<<<<<<
24206  * self.record_dict['Fz'] = ['F', 2]
24207  * self.record_dict['Fx_prot'] = ['F_prot', 0]
24208  */
24209  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1191, __pyx_L1_error)
24210  __Pyx_GOTREF(__pyx_t_3);
24211  __Pyx_INCREF(__pyx_n_s_F);
24212  __Pyx_GIVEREF(__pyx_n_s_F);
24213  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F);
24214  __Pyx_INCREF(__pyx_int_1);
24215  __Pyx_GIVEREF(__pyx_int_1);
24216  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24217  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fy, __pyx_t_3) < 0)) __PYX_ERR(0, 1191, __pyx_L1_error)
24218  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24219 
24220  /* "mbd/CouplingFSI.pyx":1192
24221  * self.record_dict['Fx'] = ['F', 0]
24222  * self.record_dict['Fy'] = ['F', 1]
24223  * self.record_dict['Fz'] = ['F', 2] # <<<<<<<<<<<<<<
24224  * self.record_dict['Fx_prot'] = ['F_prot', 0]
24225  * self.record_dict['Fy_prot'] = ['F_prot', 1]
24226  */
24227  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1192, __pyx_L1_error)
24228  __Pyx_GOTREF(__pyx_t_3);
24229  __Pyx_INCREF(__pyx_n_s_F);
24230  __Pyx_GIVEREF(__pyx_n_s_F);
24231  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F);
24232  __Pyx_INCREF(__pyx_int_2);
24233  __Pyx_GIVEREF(__pyx_int_2);
24234  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24235  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fz, __pyx_t_3) < 0)) __PYX_ERR(0, 1192, __pyx_L1_error)
24236  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24237 
24238  /* "mbd/CouplingFSI.pyx":1193
24239  * self.record_dict['Fy'] = ['F', 1]
24240  * self.record_dict['Fz'] = ['F', 2]
24241  * self.record_dict['Fx_prot'] = ['F_prot', 0] # <<<<<<<<<<<<<<
24242  * self.record_dict['Fy_prot'] = ['F_prot', 1]
24243  * self.record_dict['Fz_prot'] = ['F_prot', 2]
24244  */
24245  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __pyx_L1_error)
24246  __Pyx_GOTREF(__pyx_t_3);
24247  __Pyx_INCREF(__pyx_n_s_F_prot);
24248  __Pyx_GIVEREF(__pyx_n_s_F_prot);
24249  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_prot);
24250  __Pyx_INCREF(__pyx_int_0);
24251  __Pyx_GIVEREF(__pyx_int_0);
24252  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24253  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fx_prot, __pyx_t_3) < 0)) __PYX_ERR(0, 1193, __pyx_L1_error)
24254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24255 
24256  /* "mbd/CouplingFSI.pyx":1194
24257  * self.record_dict['Fz'] = ['F', 2]
24258  * self.record_dict['Fx_prot'] = ['F_prot', 0]
24259  * self.record_dict['Fy_prot'] = ['F_prot', 1] # <<<<<<<<<<<<<<
24260  * self.record_dict['Fz_prot'] = ['F_prot', 2]
24261  * self.record_dict['Fx_applied'] = ['F_applied', 0]
24262  */
24263  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error)
24264  __Pyx_GOTREF(__pyx_t_3);
24265  __Pyx_INCREF(__pyx_n_s_F_prot);
24266  __Pyx_GIVEREF(__pyx_n_s_F_prot);
24267  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_prot);
24268  __Pyx_INCREF(__pyx_int_1);
24269  __Pyx_GIVEREF(__pyx_int_1);
24270  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24271  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fy_prot, __pyx_t_3) < 0)) __PYX_ERR(0, 1194, __pyx_L1_error)
24272  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24273 
24274  /* "mbd/CouplingFSI.pyx":1195
24275  * self.record_dict['Fx_prot'] = ['F_prot', 0]
24276  * self.record_dict['Fy_prot'] = ['F_prot', 1]
24277  * self.record_dict['Fz_prot'] = ['F_prot', 2] # <<<<<<<<<<<<<<
24278  * self.record_dict['Fx_applied'] = ['F_applied', 0]
24279  * self.record_dict['Fy_applied'] = ['F_applied', 1]
24280  */
24281  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error)
24282  __Pyx_GOTREF(__pyx_t_3);
24283  __Pyx_INCREF(__pyx_n_s_F_prot);
24284  __Pyx_GIVEREF(__pyx_n_s_F_prot);
24285  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_prot);
24286  __Pyx_INCREF(__pyx_int_2);
24287  __Pyx_GIVEREF(__pyx_int_2);
24288  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24289  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fz_prot, __pyx_t_3) < 0)) __PYX_ERR(0, 1195, __pyx_L1_error)
24290  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24291 
24292  /* "mbd/CouplingFSI.pyx":1196
24293  * self.record_dict['Fy_prot'] = ['F_prot', 1]
24294  * self.record_dict['Fz_prot'] = ['F_prot', 2]
24295  * self.record_dict['Fx_applied'] = ['F_applied', 0] # <<<<<<<<<<<<<<
24296  * self.record_dict['Fy_applied'] = ['F_applied', 1]
24297  * self.record_dict['Fz_applied'] = ['F_applied', 2]
24298  */
24299  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1196, __pyx_L1_error)
24300  __Pyx_GOTREF(__pyx_t_3);
24301  __Pyx_INCREF(__pyx_n_s_F_applied_2);
24302  __Pyx_GIVEREF(__pyx_n_s_F_applied_2);
24303  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_applied_2);
24304  __Pyx_INCREF(__pyx_int_0);
24305  __Pyx_GIVEREF(__pyx_int_0);
24306  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24307  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fx_applied, __pyx_t_3) < 0)) __PYX_ERR(0, 1196, __pyx_L1_error)
24308  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24309 
24310  /* "mbd/CouplingFSI.pyx":1197
24311  * self.record_dict['Fz_prot'] = ['F_prot', 2]
24312  * self.record_dict['Fx_applied'] = ['F_applied', 0]
24313  * self.record_dict['Fy_applied'] = ['F_applied', 1] # <<<<<<<<<<<<<<
24314  * self.record_dict['Fz_applied'] = ['F_applied', 2]
24315  * self.record_dict['Fx_Aij'] = ['F_Aij', 0]
24316  */
24317  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error)
24318  __Pyx_GOTREF(__pyx_t_3);
24319  __Pyx_INCREF(__pyx_n_s_F_applied_2);
24320  __Pyx_GIVEREF(__pyx_n_s_F_applied_2);
24321  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_applied_2);
24322  __Pyx_INCREF(__pyx_int_1);
24323  __Pyx_GIVEREF(__pyx_int_1);
24324  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24325  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fy_applied, __pyx_t_3) < 0)) __PYX_ERR(0, 1197, __pyx_L1_error)
24326  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24327 
24328  /* "mbd/CouplingFSI.pyx":1198
24329  * self.record_dict['Fx_applied'] = ['F_applied', 0]
24330  * self.record_dict['Fy_applied'] = ['F_applied', 1]
24331  * self.record_dict['Fz_applied'] = ['F_applied', 2] # <<<<<<<<<<<<<<
24332  * self.record_dict['Fx_Aij'] = ['F_Aij', 0]
24333  * self.record_dict['Fy_Aij'] = ['F_Aij', 1]
24334  */
24335  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error)
24336  __Pyx_GOTREF(__pyx_t_3);
24337  __Pyx_INCREF(__pyx_n_s_F_applied_2);
24338  __Pyx_GIVEREF(__pyx_n_s_F_applied_2);
24339  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_applied_2);
24340  __Pyx_INCREF(__pyx_int_2);
24341  __Pyx_GIVEREF(__pyx_int_2);
24342  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24343  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fz_applied, __pyx_t_3) < 0)) __PYX_ERR(0, 1198, __pyx_L1_error)
24344  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24345 
24346  /* "mbd/CouplingFSI.pyx":1199
24347  * self.record_dict['Fy_applied'] = ['F_applied', 1]
24348  * self.record_dict['Fz_applied'] = ['F_applied', 2]
24349  * self.record_dict['Fx_Aij'] = ['F_Aij', 0] # <<<<<<<<<<<<<<
24350  * self.record_dict['Fy_Aij'] = ['F_Aij', 1]
24351  * self.record_dict['Fz_Aij'] = ['F_Aij', 2]
24352  */
24353  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error)
24354  __Pyx_GOTREF(__pyx_t_3);
24355  __Pyx_INCREF(__pyx_n_s_F_Aij);
24356  __Pyx_GIVEREF(__pyx_n_s_F_Aij);
24357  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_Aij);
24358  __Pyx_INCREF(__pyx_int_0);
24359  __Pyx_GIVEREF(__pyx_int_0);
24360  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24361  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fx_Aij, __pyx_t_3) < 0)) __PYX_ERR(0, 1199, __pyx_L1_error)
24362  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24363 
24364  /* "mbd/CouplingFSI.pyx":1200
24365  * self.record_dict['Fz_applied'] = ['F_applied', 2]
24366  * self.record_dict['Fx_Aij'] = ['F_Aij', 0]
24367  * self.record_dict['Fy_Aij'] = ['F_Aij', 1] # <<<<<<<<<<<<<<
24368  * self.record_dict['Fz_Aij'] = ['F_Aij', 2]
24369  * Fx = Fy = Fz = True
24370  */
24371  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1200, __pyx_L1_error)
24372  __Pyx_GOTREF(__pyx_t_3);
24373  __Pyx_INCREF(__pyx_n_s_F_Aij);
24374  __Pyx_GIVEREF(__pyx_n_s_F_Aij);
24375  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_Aij);
24376  __Pyx_INCREF(__pyx_int_1);
24377  __Pyx_GIVEREF(__pyx_int_1);
24378  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24379  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fy_Aij, __pyx_t_3) < 0)) __PYX_ERR(0, 1200, __pyx_L1_error)
24380  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24381 
24382  /* "mbd/CouplingFSI.pyx":1201
24383  * self.record_dict['Fx_Aij'] = ['F_Aij', 0]
24384  * self.record_dict['Fy_Aij'] = ['F_Aij', 1]
24385  * self.record_dict['Fz_Aij'] = ['F_Aij', 2] # <<<<<<<<<<<<<<
24386  * Fx = Fy = Fz = True
24387  * if M is True:
24388  */
24389  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error)
24390  __Pyx_GOTREF(__pyx_t_3);
24391  __Pyx_INCREF(__pyx_n_s_F_Aij);
24392  __Pyx_GIVEREF(__pyx_n_s_F_Aij);
24393  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_F_Aij);
24394  __Pyx_INCREF(__pyx_int_2);
24395  __Pyx_GIVEREF(__pyx_int_2);
24396  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24397  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Fz_Aij, __pyx_t_3) < 0)) __PYX_ERR(0, 1201, __pyx_L1_error)
24398  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24399 
24400  /* "mbd/CouplingFSI.pyx":1202
24401  * self.record_dict['Fy_Aij'] = ['F_Aij', 1]
24402  * self.record_dict['Fz_Aij'] = ['F_Aij', 2]
24403  * Fx = Fy = Fz = True # <<<<<<<<<<<<<<
24404  * if M is True:
24405  * self.record_dict['Mx'] = ['M', 0]
24406  */
24407  __pyx_v_Fx = 1;
24408  __pyx_v_Fy = 1;
24409  __pyx_v_Fz = 1;
24410 
24411  /* "mbd/CouplingFSI.pyx":1189
24412  * self.record_dict['rotq_e2'] = ['rotq', 2]
24413  * self.record_dict['rotq_e3'] = ['rotq', 3]
24414  * if F is True: # <<<<<<<<<<<<<<
24415  * self.record_dict['Fx'] = ['F', 0]
24416  * self.record_dict['Fy'] = ['F', 1]
24417  */
24418  }
24419 
24420  /* "mbd/CouplingFSI.pyx":1203
24421  * self.record_dict['Fz_Aij'] = ['F_Aij', 2]
24422  * Fx = Fy = Fz = True
24423  * if M is True: # <<<<<<<<<<<<<<
24424  * self.record_dict['Mx'] = ['M', 0]
24425  * self.record_dict['My'] = ['M', 1]
24426  */
24427  __pyx_t_1 = (__pyx_v_M == Py_True);
24428  __pyx_t_2 = (__pyx_t_1 != 0);
24429  if (__pyx_t_2) {
24430 
24431  /* "mbd/CouplingFSI.pyx":1204
24432  * Fx = Fy = Fz = True
24433  * if M is True:
24434  * self.record_dict['Mx'] = ['M', 0] # <<<<<<<<<<<<<<
24435  * self.record_dict['My'] = ['M', 1]
24436  * self.record_dict['Mz'] = ['M', 2]
24437  */
24438  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error)
24439  __Pyx_GOTREF(__pyx_t_3);
24440  __Pyx_INCREF(__pyx_n_s_M);
24441  __Pyx_GIVEREF(__pyx_n_s_M);
24442  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M);
24443  __Pyx_INCREF(__pyx_int_0);
24444  __Pyx_GIVEREF(__pyx_int_0);
24445  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24446  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Mx, __pyx_t_3) < 0)) __PYX_ERR(0, 1204, __pyx_L1_error)
24447  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24448 
24449  /* "mbd/CouplingFSI.pyx":1205
24450  * if M is True:
24451  * self.record_dict['Mx'] = ['M', 0]
24452  * self.record_dict['My'] = ['M', 1] # <<<<<<<<<<<<<<
24453  * self.record_dict['Mz'] = ['M', 2]
24454  * self.record_dict['Mx_prot'] = ['M_prot', 0]
24455  */
24456  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1205, __pyx_L1_error)
24457  __Pyx_GOTREF(__pyx_t_3);
24458  __Pyx_INCREF(__pyx_n_s_M);
24459  __Pyx_GIVEREF(__pyx_n_s_M);
24460  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M);
24461  __Pyx_INCREF(__pyx_int_1);
24462  __Pyx_GIVEREF(__pyx_int_1);
24463  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24464  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_My, __pyx_t_3) < 0)) __PYX_ERR(0, 1205, __pyx_L1_error)
24465  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24466 
24467  /* "mbd/CouplingFSI.pyx":1206
24468  * self.record_dict['Mx'] = ['M', 0]
24469  * self.record_dict['My'] = ['M', 1]
24470  * self.record_dict['Mz'] = ['M', 2] # <<<<<<<<<<<<<<
24471  * self.record_dict['Mx_prot'] = ['M_prot', 0]
24472  * self.record_dict['My_prot'] = ['M_prot', 1]
24473  */
24474  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error)
24475  __Pyx_GOTREF(__pyx_t_3);
24476  __Pyx_INCREF(__pyx_n_s_M);
24477  __Pyx_GIVEREF(__pyx_n_s_M);
24478  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M);
24479  __Pyx_INCREF(__pyx_int_2);
24480  __Pyx_GIVEREF(__pyx_int_2);
24481  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24482  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Mz, __pyx_t_3) < 0)) __PYX_ERR(0, 1206, __pyx_L1_error)
24483  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24484 
24485  /* "mbd/CouplingFSI.pyx":1207
24486  * self.record_dict['My'] = ['M', 1]
24487  * self.record_dict['Mz'] = ['M', 2]
24488  * self.record_dict['Mx_prot'] = ['M_prot', 0] # <<<<<<<<<<<<<<
24489  * self.record_dict['My_prot'] = ['M_prot', 1]
24490  * self.record_dict['Mz_prot'] = ['M_prot', 2]
24491  */
24492  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error)
24493  __Pyx_GOTREF(__pyx_t_3);
24494  __Pyx_INCREF(__pyx_n_s_M_prot);
24495  __Pyx_GIVEREF(__pyx_n_s_M_prot);
24496  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M_prot);
24497  __Pyx_INCREF(__pyx_int_0);
24498  __Pyx_GIVEREF(__pyx_int_0);
24499  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24500  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Mx_prot, __pyx_t_3) < 0)) __PYX_ERR(0, 1207, __pyx_L1_error)
24501  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24502 
24503  /* "mbd/CouplingFSI.pyx":1208
24504  * self.record_dict['Mz'] = ['M', 2]
24505  * self.record_dict['Mx_prot'] = ['M_prot', 0]
24506  * self.record_dict['My_prot'] = ['M_prot', 1] # <<<<<<<<<<<<<<
24507  * self.record_dict['Mz_prot'] = ['M_prot', 2]
24508  * self.record_dict['Mx_applied'] = ['M_applied', 0]
24509  */
24510  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error)
24511  __Pyx_GOTREF(__pyx_t_3);
24512  __Pyx_INCREF(__pyx_n_s_M_prot);
24513  __Pyx_GIVEREF(__pyx_n_s_M_prot);
24514  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M_prot);
24515  __Pyx_INCREF(__pyx_int_1);
24516  __Pyx_GIVEREF(__pyx_int_1);
24517  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24518  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_My_prot, __pyx_t_3) < 0)) __PYX_ERR(0, 1208, __pyx_L1_error)
24519  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24520 
24521  /* "mbd/CouplingFSI.pyx":1209
24522  * self.record_dict['Mx_prot'] = ['M_prot', 0]
24523  * self.record_dict['My_prot'] = ['M_prot', 1]
24524  * self.record_dict['Mz_prot'] = ['M_prot', 2] # <<<<<<<<<<<<<<
24525  * self.record_dict['Mx_applied'] = ['M_applied', 0]
24526  * self.record_dict['My_applied'] = ['M_applied', 1]
24527  */
24528  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error)
24529  __Pyx_GOTREF(__pyx_t_3);
24530  __Pyx_INCREF(__pyx_n_s_M_prot);
24531  __Pyx_GIVEREF(__pyx_n_s_M_prot);
24532  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M_prot);
24533  __Pyx_INCREF(__pyx_int_2);
24534  __Pyx_GIVEREF(__pyx_int_2);
24535  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24536  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Mz_prot, __pyx_t_3) < 0)) __PYX_ERR(0, 1209, __pyx_L1_error)
24537  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24538 
24539  /* "mbd/CouplingFSI.pyx":1210
24540  * self.record_dict['My_prot'] = ['M_prot', 1]
24541  * self.record_dict['Mz_prot'] = ['M_prot', 2]
24542  * self.record_dict['Mx_applied'] = ['M_applied', 0] # <<<<<<<<<<<<<<
24543  * self.record_dict['My_applied'] = ['M_applied', 1]
24544  * self.record_dict['Mz_applied'] = ['M_applied', 2]
24545  */
24546  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L1_error)
24547  __Pyx_GOTREF(__pyx_t_3);
24548  __Pyx_INCREF(__pyx_n_s_M_applied);
24549  __Pyx_GIVEREF(__pyx_n_s_M_applied);
24550  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M_applied);
24551  __Pyx_INCREF(__pyx_int_0);
24552  __Pyx_GIVEREF(__pyx_int_0);
24553  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24554  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Mx_applied, __pyx_t_3) < 0)) __PYX_ERR(0, 1210, __pyx_L1_error)
24555  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24556 
24557  /* "mbd/CouplingFSI.pyx":1211
24558  * self.record_dict['Mz_prot'] = ['M_prot', 2]
24559  * self.record_dict['Mx_applied'] = ['M_applied', 0]
24560  * self.record_dict['My_applied'] = ['M_applied', 1] # <<<<<<<<<<<<<<
24561  * self.record_dict['Mz_applied'] = ['M_applied', 2]
24562  * if acc is True:
24563  */
24564  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error)
24565  __Pyx_GOTREF(__pyx_t_3);
24566  __Pyx_INCREF(__pyx_n_s_M_applied);
24567  __Pyx_GIVEREF(__pyx_n_s_M_applied);
24568  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M_applied);
24569  __Pyx_INCREF(__pyx_int_1);
24570  __Pyx_GIVEREF(__pyx_int_1);
24571  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24572  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_My_applied, __pyx_t_3) < 0)) __PYX_ERR(0, 1211, __pyx_L1_error)
24573  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24574 
24575  /* "mbd/CouplingFSI.pyx":1212
24576  * self.record_dict['Mx_applied'] = ['M_applied', 0]
24577  * self.record_dict['My_applied'] = ['M_applied', 1]
24578  * self.record_dict['Mz_applied'] = ['M_applied', 2] # <<<<<<<<<<<<<<
24579  * if acc is True:
24580  * self.record_dict['ax'] = ['acceleration', 0]
24581  */
24582  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L1_error)
24583  __Pyx_GOTREF(__pyx_t_3);
24584  __Pyx_INCREF(__pyx_n_s_M_applied);
24585  __Pyx_GIVEREF(__pyx_n_s_M_applied);
24586  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_M_applied);
24587  __Pyx_INCREF(__pyx_int_2);
24588  __Pyx_GIVEREF(__pyx_int_2);
24589  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24590  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_Mz_applied, __pyx_t_3) < 0)) __PYX_ERR(0, 1212, __pyx_L1_error)
24591  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24592 
24593  /* "mbd/CouplingFSI.pyx":1203
24594  * self.record_dict['Fz_Aij'] = ['F_Aij', 2]
24595  * Fx = Fy = Fz = True
24596  * if M is True: # <<<<<<<<<<<<<<
24597  * self.record_dict['Mx'] = ['M', 0]
24598  * self.record_dict['My'] = ['M', 1]
24599  */
24600  }
24601 
24602  /* "mbd/CouplingFSI.pyx":1213
24603  * self.record_dict['My_applied'] = ['M_applied', 1]
24604  * self.record_dict['Mz_applied'] = ['M_applied', 2]
24605  * if acc is True: # <<<<<<<<<<<<<<
24606  * self.record_dict['ax'] = ['acceleration', 0]
24607  * self.record_dict['ay'] = ['acceleration', 1]
24608  */
24609  __pyx_t_2 = (__pyx_v_acc == Py_True);
24610  __pyx_t_1 = (__pyx_t_2 != 0);
24611  if (__pyx_t_1) {
24612 
24613  /* "mbd/CouplingFSI.pyx":1214
24614  * self.record_dict['Mz_applied'] = ['M_applied', 2]
24615  * if acc is True:
24616  * self.record_dict['ax'] = ['acceleration', 0] # <<<<<<<<<<<<<<
24617  * self.record_dict['ay'] = ['acceleration', 1]
24618  * self.record_dict['az'] = ['acceleration', 2]
24619  */
24620  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1214, __pyx_L1_error)
24621  __Pyx_GOTREF(__pyx_t_3);
24622  __Pyx_INCREF(__pyx_n_s_acceleration);
24623  __Pyx_GIVEREF(__pyx_n_s_acceleration);
24624  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_acceleration);
24625  __Pyx_INCREF(__pyx_int_0);
24626  __Pyx_GIVEREF(__pyx_int_0);
24627  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24628  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ax, __pyx_t_3) < 0)) __PYX_ERR(0, 1214, __pyx_L1_error)
24629  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24630 
24631  /* "mbd/CouplingFSI.pyx":1215
24632  * if acc is True:
24633  * self.record_dict['ax'] = ['acceleration', 0]
24634  * self.record_dict['ay'] = ['acceleration', 1] # <<<<<<<<<<<<<<
24635  * self.record_dict['az'] = ['acceleration', 2]
24636  * if vel is True:
24637  */
24638  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1215, __pyx_L1_error)
24639  __Pyx_GOTREF(__pyx_t_3);
24640  __Pyx_INCREF(__pyx_n_s_acceleration);
24641  __Pyx_GIVEREF(__pyx_n_s_acceleration);
24642  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_acceleration);
24643  __Pyx_INCREF(__pyx_int_1);
24644  __Pyx_GIVEREF(__pyx_int_1);
24645  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24646  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ay, __pyx_t_3) < 0)) __PYX_ERR(0, 1215, __pyx_L1_error)
24647  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24648 
24649  /* "mbd/CouplingFSI.pyx":1216
24650  * self.record_dict['ax'] = ['acceleration', 0]
24651  * self.record_dict['ay'] = ['acceleration', 1]
24652  * self.record_dict['az'] = ['acceleration', 2] # <<<<<<<<<<<<<<
24653  * if vel is True:
24654  * self.record_dict['ux'] = ['velocity', 0]
24655  */
24656  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1216, __pyx_L1_error)
24657  __Pyx_GOTREF(__pyx_t_3);
24658  __Pyx_INCREF(__pyx_n_s_acceleration);
24659  __Pyx_GIVEREF(__pyx_n_s_acceleration);
24660  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_acceleration);
24661  __Pyx_INCREF(__pyx_int_2);
24662  __Pyx_GIVEREF(__pyx_int_2);
24663  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24664  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_az, __pyx_t_3) < 0)) __PYX_ERR(0, 1216, __pyx_L1_error)
24665  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24666 
24667  /* "mbd/CouplingFSI.pyx":1213
24668  * self.record_dict['My_applied'] = ['M_applied', 1]
24669  * self.record_dict['Mz_applied'] = ['M_applied', 2]
24670  * if acc is True: # <<<<<<<<<<<<<<
24671  * self.record_dict['ax'] = ['acceleration', 0]
24672  * self.record_dict['ay'] = ['acceleration', 1]
24673  */
24674  }
24675 
24676  /* "mbd/CouplingFSI.pyx":1217
24677  * self.record_dict['ay'] = ['acceleration', 1]
24678  * self.record_dict['az'] = ['acceleration', 2]
24679  * if vel is True: # <<<<<<<<<<<<<<
24680  * self.record_dict['ux'] = ['velocity', 0]
24681  * self.record_dict['uy'] = ['velocity', 1]
24682  */
24683  __pyx_t_1 = (__pyx_v_vel == Py_True);
24684  __pyx_t_2 = (__pyx_t_1 != 0);
24685  if (__pyx_t_2) {
24686 
24687  /* "mbd/CouplingFSI.pyx":1218
24688  * self.record_dict['az'] = ['acceleration', 2]
24689  * if vel is True:
24690  * self.record_dict['ux'] = ['velocity', 0] # <<<<<<<<<<<<<<
24691  * self.record_dict['uy'] = ['velocity', 1]
24692  * self.record_dict['uz'] = ['velocity', 2]
24693  */
24694  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error)
24695  __Pyx_GOTREF(__pyx_t_3);
24696  __Pyx_INCREF(__pyx_n_s_velocity);
24697  __Pyx_GIVEREF(__pyx_n_s_velocity);
24698  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_velocity);
24699  __Pyx_INCREF(__pyx_int_0);
24700  __Pyx_GIVEREF(__pyx_int_0);
24701  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24702  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ux, __pyx_t_3) < 0)) __PYX_ERR(0, 1218, __pyx_L1_error)
24703  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24704 
24705  /* "mbd/CouplingFSI.pyx":1219
24706  * if vel is True:
24707  * self.record_dict['ux'] = ['velocity', 0]
24708  * self.record_dict['uy'] = ['velocity', 1] # <<<<<<<<<<<<<<
24709  * self.record_dict['uz'] = ['velocity', 2]
24710  * if ang_acc is True:
24711  */
24712  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1219, __pyx_L1_error)
24713  __Pyx_GOTREF(__pyx_t_3);
24714  __Pyx_INCREF(__pyx_n_s_velocity);
24715  __Pyx_GIVEREF(__pyx_n_s_velocity);
24716  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_velocity);
24717  __Pyx_INCREF(__pyx_int_1);
24718  __Pyx_GIVEREF(__pyx_int_1);
24719  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24720  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_uy, __pyx_t_3) < 0)) __PYX_ERR(0, 1219, __pyx_L1_error)
24721  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24722 
24723  /* "mbd/CouplingFSI.pyx":1220
24724  * self.record_dict['ux'] = ['velocity', 0]
24725  * self.record_dict['uy'] = ['velocity', 1]
24726  * self.record_dict['uz'] = ['velocity', 2] # <<<<<<<<<<<<<<
24727  * if ang_acc is True:
24728  * self.record_dict['ang_ax'] = ['ang_acceleration', 0]
24729  */
24730  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1220, __pyx_L1_error)
24731  __Pyx_GOTREF(__pyx_t_3);
24732  __Pyx_INCREF(__pyx_n_s_velocity);
24733  __Pyx_GIVEREF(__pyx_n_s_velocity);
24734  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_velocity);
24735  __Pyx_INCREF(__pyx_int_2);
24736  __Pyx_GIVEREF(__pyx_int_2);
24737  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24738  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_uz, __pyx_t_3) < 0)) __PYX_ERR(0, 1220, __pyx_L1_error)
24739  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24740 
24741  /* "mbd/CouplingFSI.pyx":1217
24742  * self.record_dict['ay'] = ['acceleration', 1]
24743  * self.record_dict['az'] = ['acceleration', 2]
24744  * if vel is True: # <<<<<<<<<<<<<<
24745  * self.record_dict['ux'] = ['velocity', 0]
24746  * self.record_dict['uy'] = ['velocity', 1]
24747  */
24748  }
24749 
24750  /* "mbd/CouplingFSI.pyx":1221
24751  * self.record_dict['uy'] = ['velocity', 1]
24752  * self.record_dict['uz'] = ['velocity', 2]
24753  * if ang_acc is True: # <<<<<<<<<<<<<<
24754  * self.record_dict['ang_ax'] = ['ang_acceleration', 0]
24755  * self.record_dict['ang_ay'] = ['ang_acceleration', 1]
24756  */
24757  __pyx_t_2 = (__pyx_v_ang_acc == Py_True);
24758  __pyx_t_1 = (__pyx_t_2 != 0);
24759  if (__pyx_t_1) {
24760 
24761  /* "mbd/CouplingFSI.pyx":1222
24762  * self.record_dict['uz'] = ['velocity', 2]
24763  * if ang_acc is True:
24764  * self.record_dict['ang_ax'] = ['ang_acceleration', 0] # <<<<<<<<<<<<<<
24765  * self.record_dict['ang_ay'] = ['ang_acceleration', 1]
24766  * self.record_dict['ang_az'] = ['ang_acceleration', 2]
24767  */
24768  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1222, __pyx_L1_error)
24769  __Pyx_GOTREF(__pyx_t_3);
24770  __Pyx_INCREF(__pyx_n_s_ang_acceleration);
24771  __Pyx_GIVEREF(__pyx_n_s_ang_acceleration);
24772  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ang_acceleration);
24773  __Pyx_INCREF(__pyx_int_0);
24774  __Pyx_GIVEREF(__pyx_int_0);
24775  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24776  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ang_ax, __pyx_t_3) < 0)) __PYX_ERR(0, 1222, __pyx_L1_error)
24777  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24778 
24779  /* "mbd/CouplingFSI.pyx":1223
24780  * if ang_acc is True:
24781  * self.record_dict['ang_ax'] = ['ang_acceleration', 0]
24782  * self.record_dict['ang_ay'] = ['ang_acceleration', 1] # <<<<<<<<<<<<<<
24783  * self.record_dict['ang_az'] = ['ang_acceleration', 2]
24784  * if ang_vel is True:
24785  */
24786  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L1_error)
24787  __Pyx_GOTREF(__pyx_t_3);
24788  __Pyx_INCREF(__pyx_n_s_ang_acceleration);
24789  __Pyx_GIVEREF(__pyx_n_s_ang_acceleration);
24790  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ang_acceleration);
24791  __Pyx_INCREF(__pyx_int_1);
24792  __Pyx_GIVEREF(__pyx_int_1);
24793  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24794  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ang_ay, __pyx_t_3) < 0)) __PYX_ERR(0, 1223, __pyx_L1_error)
24795  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24796 
24797  /* "mbd/CouplingFSI.pyx":1224
24798  * self.record_dict['ang_ax'] = ['ang_acceleration', 0]
24799  * self.record_dict['ang_ay'] = ['ang_acceleration', 1]
24800  * self.record_dict['ang_az'] = ['ang_acceleration', 2] # <<<<<<<<<<<<<<
24801  * if ang_vel is True:
24802  * self.record_dict['ang_ux'] = ['ang_velocity', 0]
24803  */
24804  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error)
24805  __Pyx_GOTREF(__pyx_t_3);
24806  __Pyx_INCREF(__pyx_n_s_ang_acceleration);
24807  __Pyx_GIVEREF(__pyx_n_s_ang_acceleration);
24808  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ang_acceleration);
24809  __Pyx_INCREF(__pyx_int_2);
24810  __Pyx_GIVEREF(__pyx_int_2);
24811  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24812  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ang_az, __pyx_t_3) < 0)) __PYX_ERR(0, 1224, __pyx_L1_error)
24813  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24814 
24815  /* "mbd/CouplingFSI.pyx":1221
24816  * self.record_dict['uy'] = ['velocity', 1]
24817  * self.record_dict['uz'] = ['velocity', 2]
24818  * if ang_acc is True: # <<<<<<<<<<<<<<
24819  * self.record_dict['ang_ax'] = ['ang_acceleration', 0]
24820  * self.record_dict['ang_ay'] = ['ang_acceleration', 1]
24821  */
24822  }
24823 
24824  /* "mbd/CouplingFSI.pyx":1225
24825  * self.record_dict['ang_ay'] = ['ang_acceleration', 1]
24826  * self.record_dict['ang_az'] = ['ang_acceleration', 2]
24827  * if ang_vel is True: # <<<<<<<<<<<<<<
24828  * self.record_dict['ang_ux'] = ['ang_velocity', 0]
24829  * self.record_dict['ang_uy'] = ['ang_velocity', 1]
24830  */
24831  __pyx_t_1 = (__pyx_v_ang_vel == Py_True);
24832  __pyx_t_2 = (__pyx_t_1 != 0);
24833  if (__pyx_t_2) {
24834 
24835  /* "mbd/CouplingFSI.pyx":1226
24836  * self.record_dict['ang_az'] = ['ang_acceleration', 2]
24837  * if ang_vel is True:
24838  * self.record_dict['ang_ux'] = ['ang_velocity', 0] # <<<<<<<<<<<<<<
24839  * self.record_dict['ang_uy'] = ['ang_velocity', 1]
24840  * self.record_dict['ang_uz'] = ['ang_velocity', 2]
24841  */
24842  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1226, __pyx_L1_error)
24843  __Pyx_GOTREF(__pyx_t_3);
24844  __Pyx_INCREF(__pyx_n_s_ang_velocity);
24845  __Pyx_GIVEREF(__pyx_n_s_ang_velocity);
24846  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ang_velocity);
24847  __Pyx_INCREF(__pyx_int_0);
24848  __Pyx_GIVEREF(__pyx_int_0);
24849  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24850  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ang_ux, __pyx_t_3) < 0)) __PYX_ERR(0, 1226, __pyx_L1_error)
24851  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24852 
24853  /* "mbd/CouplingFSI.pyx":1227
24854  * if ang_vel is True:
24855  * self.record_dict['ang_ux'] = ['ang_velocity', 0]
24856  * self.record_dict['ang_uy'] = ['ang_velocity', 1] # <<<<<<<<<<<<<<
24857  * self.record_dict['ang_uz'] = ['ang_velocity', 2]
24858  * if inertia is True:
24859  */
24860  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L1_error)
24861  __Pyx_GOTREF(__pyx_t_3);
24862  __Pyx_INCREF(__pyx_n_s_ang_velocity);
24863  __Pyx_GIVEREF(__pyx_n_s_ang_velocity);
24864  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ang_velocity);
24865  __Pyx_INCREF(__pyx_int_1);
24866  __Pyx_GIVEREF(__pyx_int_1);
24867  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24868  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ang_uy, __pyx_t_3) < 0)) __PYX_ERR(0, 1227, __pyx_L1_error)
24869  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24870 
24871  /* "mbd/CouplingFSI.pyx":1228
24872  * self.record_dict['ang_ux'] = ['ang_velocity', 0]
24873  * self.record_dict['ang_uy'] = ['ang_velocity', 1]
24874  * self.record_dict['ang_uz'] = ['ang_velocity', 2] # <<<<<<<<<<<<<<
24875  * if inertia is True:
24876  * self.record_dict['intertia'] = ['inertia', None]
24877  */
24878  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error)
24879  __Pyx_GOTREF(__pyx_t_3);
24880  __Pyx_INCREF(__pyx_n_s_ang_velocity);
24881  __Pyx_GIVEREF(__pyx_n_s_ang_velocity);
24882  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_ang_velocity);
24883  __Pyx_INCREF(__pyx_int_2);
24884  __Pyx_GIVEREF(__pyx_int_2);
24885  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24886  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_ang_uz, __pyx_t_3) < 0)) __PYX_ERR(0, 1228, __pyx_L1_error)
24887  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24888 
24889  /* "mbd/CouplingFSI.pyx":1225
24890  * self.record_dict['ang_ay'] = ['ang_acceleration', 1]
24891  * self.record_dict['ang_az'] = ['ang_acceleration', 2]
24892  * if ang_vel is True: # <<<<<<<<<<<<<<
24893  * self.record_dict['ang_ux'] = ['ang_velocity', 0]
24894  * self.record_dict['ang_uy'] = ['ang_velocity', 1]
24895  */
24896  }
24897 
24898  /* "mbd/CouplingFSI.pyx":1229
24899  * self.record_dict['ang_uy'] = ['ang_velocity', 1]
24900  * self.record_dict['ang_uz'] = ['ang_velocity', 2]
24901  * if inertia is True: # <<<<<<<<<<<<<<
24902  * self.record_dict['intertia'] = ['inertia', None]
24903  * if h_predict is True:
24904  */
24905  __pyx_t_2 = (__pyx_v_inertia == Py_True);
24906  __pyx_t_1 = (__pyx_t_2 != 0);
24907  if (__pyx_t_1) {
24908 
24909  /* "mbd/CouplingFSI.pyx":1230
24910  * self.record_dict['ang_uz'] = ['ang_velocity', 2]
24911  * if inertia is True:
24912  * self.record_dict['intertia'] = ['inertia', None] # <<<<<<<<<<<<<<
24913  * if h_predict is True:
24914  * self.record_dict['hx'] = ['h_predict', 0]
24915  */
24916  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1230, __pyx_L1_error)
24917  __Pyx_GOTREF(__pyx_t_3);
24918  __Pyx_INCREF(__pyx_n_s_inertia);
24919  __Pyx_GIVEREF(__pyx_n_s_inertia);
24920  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_inertia);
24921  __Pyx_INCREF(Py_None);
24922  __Pyx_GIVEREF(Py_None);
24923  PyList_SET_ITEM(__pyx_t_3, 1, Py_None);
24924  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_intertia, __pyx_t_3) < 0)) __PYX_ERR(0, 1230, __pyx_L1_error)
24925  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24926 
24927  /* "mbd/CouplingFSI.pyx":1229
24928  * self.record_dict['ang_uy'] = ['ang_velocity', 1]
24929  * self.record_dict['ang_uz'] = ['ang_velocity', 2]
24930  * if inertia is True: # <<<<<<<<<<<<<<
24931  * self.record_dict['intertia'] = ['inertia', None]
24932  * if h_predict is True:
24933  */
24934  }
24935 
24936  /* "mbd/CouplingFSI.pyx":1231
24937  * if inertia is True:
24938  * self.record_dict['intertia'] = ['inertia', None]
24939  * if h_predict is True: # <<<<<<<<<<<<<<
24940  * self.record_dict['hx'] = ['h_predict', 0]
24941  * self.record_dict['hy'] = ['h_predict', 1]
24942  */
24943  __pyx_t_1 = (__pyx_v_h_predict == Py_True);
24944  __pyx_t_2 = (__pyx_t_1 != 0);
24945  if (__pyx_t_2) {
24946 
24947  /* "mbd/CouplingFSI.pyx":1232
24948  * self.record_dict['intertia'] = ['inertia', None]
24949  * if h_predict is True:
24950  * self.record_dict['hx'] = ['h_predict', 0] # <<<<<<<<<<<<<<
24951  * self.record_dict['hy'] = ['h_predict', 1]
24952  * self.record_dict['hz'] = ['h_predict', 2]
24953  */
24954  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1232, __pyx_L1_error)
24955  __Pyx_GOTREF(__pyx_t_3);
24956  __Pyx_INCREF(__pyx_n_s_h_predict_2);
24957  __Pyx_GIVEREF(__pyx_n_s_h_predict_2);
24958  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_h_predict_2);
24959  __Pyx_INCREF(__pyx_int_0);
24960  __Pyx_GIVEREF(__pyx_int_0);
24961  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
24962  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_hx, __pyx_t_3) < 0)) __PYX_ERR(0, 1232, __pyx_L1_error)
24963  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24964 
24965  /* "mbd/CouplingFSI.pyx":1233
24966  * if h_predict is True:
24967  * self.record_dict['hx'] = ['h_predict', 0]
24968  * self.record_dict['hy'] = ['h_predict', 1] # <<<<<<<<<<<<<<
24969  * self.record_dict['hz'] = ['h_predict', 2]
24970  *
24971  */
24972  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
24973  __Pyx_GOTREF(__pyx_t_3);
24974  __Pyx_INCREF(__pyx_n_s_h_predict_2);
24975  __Pyx_GIVEREF(__pyx_n_s_h_predict_2);
24976  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_h_predict_2);
24977  __Pyx_INCREF(__pyx_int_1);
24978  __Pyx_GIVEREF(__pyx_int_1);
24979  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
24980  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_hy, __pyx_t_3) < 0)) __PYX_ERR(0, 1233, __pyx_L1_error)
24981  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
24982 
24983  /* "mbd/CouplingFSI.pyx":1234
24984  * self.record_dict['hx'] = ['h_predict', 0]
24985  * self.record_dict['hy'] = ['h_predict', 1]
24986  * self.record_dict['hz'] = ['h_predict', 2] # <<<<<<<<<<<<<<
24987  *
24988  * def _recordValues(self):
24989  */
24990  __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error)
24991  __Pyx_GOTREF(__pyx_t_3);
24992  __Pyx_INCREF(__pyx_n_s_h_predict_2);
24993  __Pyx_GIVEREF(__pyx_n_s_h_predict_2);
24994  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_h_predict_2);
24995  __Pyx_INCREF(__pyx_int_2);
24996  __Pyx_GIVEREF(__pyx_int_2);
24997  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_2);
24998  if (unlikely(PyObject_SetItem(__pyx_v_self->record_dict, __pyx_n_s_hz, __pyx_t_3) < 0)) __PYX_ERR(0, 1234, __pyx_L1_error)
24999  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25000 
25001  /* "mbd/CouplingFSI.pyx":1231
25002  * if inertia is True:
25003  * self.record_dict['intertia'] = ['inertia', None]
25004  * if h_predict is True: # <<<<<<<<<<<<<<
25005  * self.record_dict['hx'] = ['h_predict', 0]
25006  * self.record_dict['hy'] = ['h_predict', 1]
25007  */
25008  }
25009 
25010  /* "mbd/CouplingFSI.pyx":1135
25011  *
25012  *
25013  * def setRecordValues(self, all_values=False, pos=False, # <<<<<<<<<<<<<<
25014  * rot=False, ang_disp=False, F=False, M=False,
25015  * inertia=False, vel=False, acc=False, ang_vel=False,
25016  */
25017 
25018  /* function exit code */
25019  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25020  goto __pyx_L0;
25021  __pyx_L1_error:;
25022  __Pyx_XDECREF(__pyx_t_3);
25023  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setRecordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
25024  __pyx_r = NULL;
25025  __pyx_L0:;
25026  __Pyx_XDECREF(__pyx_v_pos);
25027  __Pyx_XDECREF(__pyx_v_rot);
25028  __Pyx_XDECREF(__pyx_v_F);
25029  __Pyx_XDECREF(__pyx_v_M);
25030  __Pyx_XDECREF(__pyx_v_vel);
25031  __Pyx_XDECREF(__pyx_v_acc);
25032  __Pyx_XDECREF(__pyx_v_ang_vel);
25033  __Pyx_XDECREF(__pyx_v_ang_acc);
25034  __Pyx_XDECREF(__pyx_v_h_predict);
25035  __Pyx_XGIVEREF(__pyx_r);
25036  __Pyx_TraceReturn(__pyx_r, 0);
25037  __Pyx_RefNannyFinishContext();
25038  return __pyx_r;
25039 }
25040 
25041 /* "mbd/CouplingFSI.pyx":1236
25042  * self.record_dict['hz'] = ['h_predict', 2]
25043  *
25044  * def _recordValues(self): # <<<<<<<<<<<<<<
25045  * """Records values of body attributes in a csv file.
25046  * """
25047  */
25048 
25049 /* Python wrapper */
25050 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_105_recordValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
25051 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_104_recordValues[] = "ProtChBody._recordValues(self)\nRecords values of body attributes in a csv file.\n ";
25052 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_105_recordValues = {"_recordValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_105_recordValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_104_recordValues};
25053 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_105_recordValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
25054  PyObject *__pyx_r = 0;
25055  __Pyx_RefNannyDeclarations
25056  __Pyx_RefNannySetupContext("_recordValues (wrapper)", 0);
25057  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_104_recordValues(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
25058 
25059  /* function exit code */
25060  __Pyx_RefNannyFinishContext();
25061  return __pyx_r;
25062 }
25063 
25064 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_104_recordValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
25065  PyObject *__pyx_v_record_file = NULL;
25066  PyObject *__pyx_v_t_chrono = NULL;
25067  PyObject *__pyx_v_t_last = NULL;
25068  CYTHON_UNUSED PyObject *__pyx_v_dt_last = NULL;
25069  PyObject *__pyx_v_t = NULL;
25070  PyObject *__pyx_v_t_sim = NULL;
25071  PyObject *__pyx_v_values_towrite = NULL;
25072  PyObject *__pyx_v_headers = NULL;
25073  PyObject *__pyx_v_key = NULL;
25074  PyObject *__pyx_v_csvfile = NULL;
25075  PyObject *__pyx_v_writer = NULL;
25076  PyObject *__pyx_v_val = NULL;
25077  PyObject *__pyx_v_i = NULL;
25078  PyObject *__pyx_v_j = NULL;
25079  PyObject *__pyx_r = NULL;
25080  __Pyx_TraceDeclarations
25081  __Pyx_RefNannyDeclarations
25082  PyObject *__pyx_t_1 = NULL;
25083  PyObject *__pyx_t_2 = NULL;
25084  PyObject *__pyx_t_3 = NULL;
25085  PyObject *__pyx_t_4 = NULL;
25086  PyObject *__pyx_t_5 = NULL;
25087  int __pyx_t_6;
25088  PyObject *__pyx_t_7 = NULL;
25089  int __pyx_t_8;
25090  int __pyx_t_9;
25091  PyObject *__pyx_t_10 = NULL;
25092  PyObject *__pyx_t_11 = NULL;
25093  PyObject *__pyx_t_12 = NULL;
25094  Py_ssize_t __pyx_t_13;
25095  PyObject *(*__pyx_t_14)(PyObject *);
25096  PyObject *__pyx_t_15 = NULL;
25097  PyObject *__pyx_t_16 = NULL;
25098  PyObject *(*__pyx_t_17)(PyObject *);
25099  long __pyx_t_18;
25100  long __pyx_t_19;
25101  int __pyx_lineno = 0;
25102  const char *__pyx_filename = NULL;
25103  int __pyx_clineno = 0;
25104  __Pyx_TraceFrameInit(__pyx_codeobj__86)
25105  __Pyx_RefNannySetupContext("_recordValues", 0);
25106  __Pyx_TraceCall("_recordValues", __pyx_f[0], 1236, 0, __PYX_ERR(0, 1236, __pyx_L1_error));
25107 
25108  /* "mbd/CouplingFSI.pyx":1239
25109  * """Records values of body attributes in a csv file.
25110  * """
25111  * Profiling.logEvent('recording values file of '+str(self.name)) # <<<<<<<<<<<<<<
25112  * record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
25113  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
25114  */
25115  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error)
25116  __Pyx_GOTREF(__pyx_t_2);
25117  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L1_error)
25118  __Pyx_GOTREF(__pyx_t_3);
25119  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25120  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error)
25121  __Pyx_GOTREF(__pyx_t_2);
25122  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1239, __pyx_L1_error)
25123  __Pyx_GOTREF(__pyx_t_4);
25124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25125  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_recording_values_file_of, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L1_error)
25126  __Pyx_GOTREF(__pyx_t_2);
25127  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25128  __pyx_t_4 = NULL;
25129  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
25130  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
25131  if (likely(__pyx_t_4)) {
25132  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25133  __Pyx_INCREF(__pyx_t_4);
25134  __Pyx_INCREF(function);
25135  __Pyx_DECREF_SET(__pyx_t_3, function);
25136  }
25137  }
25138  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
25139  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25140  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25141  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error)
25142  __Pyx_GOTREF(__pyx_t_1);
25143  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25144  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25145 
25146  /* "mbd/CouplingFSI.pyx":1240
25147  * """
25148  * Profiling.logEvent('recording values file of '+str(self.name))
25149  * record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8') # <<<<<<<<<<<<<<
25150  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
25151  * if self.ProtChSystem.model is not None:
25152  */
25153  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error)
25154  __Pyx_GOTREF(__pyx_t_3);
25155  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error)
25156  __Pyx_GOTREF(__pyx_t_2);
25157  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25158  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error)
25159  __Pyx_GOTREF(__pyx_t_3);
25160  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25161  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error)
25162  __Pyx_GOTREF(__pyx_t_2);
25163  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logDir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error)
25164  __Pyx_GOTREF(__pyx_t_4);
25165  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25166  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error)
25167  __Pyx_GOTREF(__pyx_t_2);
25168  __Pyx_GIVEREF(__pyx_t_4);
25169  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
25170  __Pyx_INCREF(__pyx_kp_s_utf_8);
25171  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
25172  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_utf_8);
25173  __pyx_t_4 = 0;
25174  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error)
25175  __Pyx_GOTREF(__pyx_t_4);
25176  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25177  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error)
25178  __Pyx_GOTREF(__pyx_t_2);
25179  __pyx_t_5 = NULL;
25180  __pyx_t_6 = 0;
25181  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25182  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
25183  if (likely(__pyx_t_5)) {
25184  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25185  __Pyx_INCREF(__pyx_t_5);
25186  __Pyx_INCREF(function);
25187  __Pyx_DECREF_SET(__pyx_t_3, function);
25188  __pyx_t_6 = 1;
25189  }
25190  }
25191  #if CYTHON_FAST_PYCALL
25192  if (PyFunction_Check(__pyx_t_3)) {
25193  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2};
25194  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
25195  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25196  __Pyx_GOTREF(__pyx_t_1);
25197  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25198  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25199  } else
25200  #endif
25201  #if CYTHON_FAST_PYCCALL
25202  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
25203  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2};
25204  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
25205  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25206  __Pyx_GOTREF(__pyx_t_1);
25207  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25208  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25209  } else
25210  #endif
25211  {
25212  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1240, __pyx_L1_error)
25213  __Pyx_GOTREF(__pyx_t_7);
25214  if (__pyx_t_5) {
25215  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
25216  }
25217  __Pyx_GIVEREF(__pyx_t_4);
25218  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
25219  __Pyx_GIVEREF(__pyx_t_2);
25220  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
25221  __pyx_t_4 = 0;
25222  __pyx_t_2 = 0;
25223  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
25224  __Pyx_GOTREF(__pyx_t_1);
25225  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25226  }
25227  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25228  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error)
25229  __Pyx_GOTREF(__pyx_t_3);
25230  __Pyx_GIVEREF(__pyx_t_1);
25231  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
25232  __Pyx_INCREF(__pyx_kp_s_utf_8);
25233  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
25234  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
25235  __pyx_t_1 = 0;
25236  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L1_error)
25237  __Pyx_GOTREF(__pyx_t_1);
25238  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25239  __pyx_v_record_file = __pyx_t_1;
25240  __pyx_t_1 = 0;
25241 
25242  /* "mbd/CouplingFSI.pyx":1241
25243  * Profiling.logEvent('recording values file of '+str(self.name))
25244  * record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
25245  * t_chrono = self.ProtChSystem.ChSystem.GetChTime() # <<<<<<<<<<<<<<
25246  * if self.ProtChSystem.model is not None:
25247  * t_last = self.ProtChSystem.model.stepController.t_model_last
25248  */
25249  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error)
25250  __Pyx_GOTREF(__pyx_t_3);
25251  __pyx_t_7 = NULL;
25252  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
25253  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
25254  if (likely(__pyx_t_7)) {
25255  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25256  __Pyx_INCREF(__pyx_t_7);
25257  __Pyx_INCREF(function);
25258  __Pyx_DECREF_SET(__pyx_t_3, function);
25259  }
25260  }
25261  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
25262  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
25263  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L1_error)
25264  __Pyx_GOTREF(__pyx_t_1);
25265  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25266  __pyx_v_t_chrono = __pyx_t_1;
25267  __pyx_t_1 = 0;
25268 
25269  /* "mbd/CouplingFSI.pyx":1242
25270  * record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
25271  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
25272  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
25273  * t_last = self.ProtChSystem.model.stepController.t_model_last
25274  * try:
25275  */
25276  __pyx_t_8 = (__pyx_v_self->ProtChSystem->model != Py_None);
25277  __pyx_t_9 = (__pyx_t_8 != 0);
25278  if (__pyx_t_9) {
25279 
25280  /* "mbd/CouplingFSI.pyx":1243
25281  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
25282  * if self.ProtChSystem.model is not None:
25283  * t_last = self.ProtChSystem.model.stepController.t_model_last # <<<<<<<<<<<<<<
25284  * try:
25285  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
25286  */
25287  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_stepController); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L1_error)
25288  __Pyx_GOTREF(__pyx_t_1);
25289  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_t_model_last); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L1_error)
25290  __Pyx_GOTREF(__pyx_t_3);
25291  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25292  __pyx_v_t_last = __pyx_t_3;
25293  __pyx_t_3 = 0;
25294 
25295  /* "mbd/CouplingFSI.pyx":1244
25296  * if self.ProtChSystem.model is not None:
25297  * t_last = self.ProtChSystem.model.stepController.t_model_last
25298  * try: # <<<<<<<<<<<<<<
25299  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
25300  * except:
25301  */
25302  {
25303  __Pyx_PyThreadState_declare
25304  __Pyx_PyThreadState_assign
25305  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
25306  __Pyx_XGOTREF(__pyx_t_10);
25307  __Pyx_XGOTREF(__pyx_t_11);
25308  __Pyx_XGOTREF(__pyx_t_12);
25309  /*try:*/ {
25310 
25311  /* "mbd/CouplingFSI.pyx":1245
25312  * t_last = self.ProtChSystem.model.stepController.t_model_last
25313  * try:
25314  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last # <<<<<<<<<<<<<<
25315  * except:
25316  * dt_last = 0
25317  */
25318  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L4_error)
25319  __Pyx_GOTREF(__pyx_t_3);
25320  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L4_error)
25321  __Pyx_GOTREF(__pyx_t_1);
25322  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25323  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dt_last); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L4_error)
25324  __Pyx_GOTREF(__pyx_t_3);
25325  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25326  __pyx_v_dt_last = __pyx_t_3;
25327  __pyx_t_3 = 0;
25328 
25329  /* "mbd/CouplingFSI.pyx":1244
25330  * if self.ProtChSystem.model is not None:
25331  * t_last = self.ProtChSystem.model.stepController.t_model_last
25332  * try: # <<<<<<<<<<<<<<
25333  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
25334  * except:
25335  */
25336  }
25337  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25338  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
25339  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
25340  goto __pyx_L9_try_end;
25341  __pyx_L4_error:;
25342  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25343  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25344  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25345  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25346  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25347  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
25348 
25349  /* "mbd/CouplingFSI.pyx":1246
25350  * try:
25351  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
25352  * except: # <<<<<<<<<<<<<<
25353  * dt_last = 0
25354  * t = t_last
25355  */
25356  /*except:*/ {
25357  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
25358  if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 1246, __pyx_L6_except_error)
25359  __Pyx_GOTREF(__pyx_t_3);
25360  __Pyx_GOTREF(__pyx_t_1);
25361  __Pyx_GOTREF(__pyx_t_7);
25362 
25363  /* "mbd/CouplingFSI.pyx":1247
25364  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
25365  * except:
25366  * dt_last = 0 # <<<<<<<<<<<<<<
25367  * t = t_last
25368  * else:
25369  */
25370  __Pyx_INCREF(__pyx_int_0);
25371  __Pyx_XDECREF_SET(__pyx_v_dt_last, __pyx_int_0);
25372  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25373  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25374  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
25375  goto __pyx_L5_exception_handled;
25376  }
25377  __pyx_L6_except_error:;
25378 
25379  /* "mbd/CouplingFSI.pyx":1244
25380  * if self.ProtChSystem.model is not None:
25381  * t_last = self.ProtChSystem.model.stepController.t_model_last
25382  * try: # <<<<<<<<<<<<<<
25383  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
25384  * except:
25385  */
25386  __Pyx_XGIVEREF(__pyx_t_10);
25387  __Pyx_XGIVEREF(__pyx_t_11);
25388  __Pyx_XGIVEREF(__pyx_t_12);
25389  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
25390  goto __pyx_L1_error;
25391  __pyx_L5_exception_handled:;
25392  __Pyx_XGIVEREF(__pyx_t_10);
25393  __Pyx_XGIVEREF(__pyx_t_11);
25394  __Pyx_XGIVEREF(__pyx_t_12);
25395  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
25396  __pyx_L9_try_end:;
25397  }
25398 
25399  /* "mbd/CouplingFSI.pyx":1248
25400  * except:
25401  * dt_last = 0
25402  * t = t_last # <<<<<<<<<<<<<<
25403  * else:
25404  * t = t_chrono
25405  */
25406  __Pyx_INCREF(__pyx_v_t_last);
25407  __pyx_v_t = __pyx_v_t_last;
25408 
25409  /* "mbd/CouplingFSI.pyx":1242
25410  * record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
25411  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
25412  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
25413  * t_last = self.ProtChSystem.model.stepController.t_model_last
25414  * try:
25415  */
25416  goto __pyx_L3;
25417  }
25418 
25419  /* "mbd/CouplingFSI.pyx":1250
25420  * t = t_last
25421  * else:
25422  * t = t_chrono # <<<<<<<<<<<<<<
25423  * t_sim = Profiling.time()-Profiling.startTime
25424  * values_towrite = [t, t_chrono, t_sim]
25425  */
25426  /*else*/ {
25427  __Pyx_INCREF(__pyx_v_t_chrono);
25428  __pyx_v_t = __pyx_v_t_chrono;
25429  }
25430  __pyx_L3:;
25431 
25432  /* "mbd/CouplingFSI.pyx":1251
25433  * else:
25434  * t = t_chrono
25435  * t_sim = Profiling.time()-Profiling.startTime # <<<<<<<<<<<<<<
25436  * values_towrite = [t, t_chrono, t_sim]
25437  * if t == 0:
25438  */
25439  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
25440  __Pyx_GOTREF(__pyx_t_1);
25441  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
25442  __Pyx_GOTREF(__pyx_t_3);
25443  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25444  __pyx_t_1 = NULL;
25445  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
25446  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
25447  if (likely(__pyx_t_1)) {
25448  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
25449  __Pyx_INCREF(__pyx_t_1);
25450  __Pyx_INCREF(function);
25451  __Pyx_DECREF_SET(__pyx_t_3, function);
25452  }
25453  }
25454  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
25455  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25456  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1251, __pyx_L1_error)
25457  __Pyx_GOTREF(__pyx_t_7);
25458  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25459  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
25460  __Pyx_GOTREF(__pyx_t_3);
25461  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
25462  __Pyx_GOTREF(__pyx_t_1);
25463  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25464  __pyx_t_3 = PyNumber_Subtract(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
25465  __Pyx_GOTREF(__pyx_t_3);
25466  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25467  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25468  __pyx_v_t_sim = __pyx_t_3;
25469  __pyx_t_3 = 0;
25470 
25471  /* "mbd/CouplingFSI.pyx":1252
25472  * t = t_chrono
25473  * t_sim = Profiling.time()-Profiling.startTime
25474  * values_towrite = [t, t_chrono, t_sim] # <<<<<<<<<<<<<<
25475  * if t == 0:
25476  * headers = ['t', 't_ch', 't_sim']
25477  */
25478  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1252, __pyx_L1_error)
25479  __Pyx_GOTREF(__pyx_t_3);
25480  __Pyx_INCREF(__pyx_v_t);
25481  __Pyx_GIVEREF(__pyx_v_t);
25482  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_t);
25483  __Pyx_INCREF(__pyx_v_t_chrono);
25484  __Pyx_GIVEREF(__pyx_v_t_chrono);
25485  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_v_t_chrono);
25486  __Pyx_INCREF(__pyx_v_t_sim);
25487  __Pyx_GIVEREF(__pyx_v_t_sim);
25488  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_v_t_sim);
25489  __pyx_v_values_towrite = ((PyObject*)__pyx_t_3);
25490  __pyx_t_3 = 0;
25491 
25492  /* "mbd/CouplingFSI.pyx":1253
25493  * t_sim = Profiling.time()-Profiling.startTime
25494  * values_towrite = [t, t_chrono, t_sim]
25495  * if t == 0: # <<<<<<<<<<<<<<
25496  * headers = ['t', 't_ch', 't_sim']
25497  * for key in self.record_dict:
25498  */
25499  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_t, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1253, __pyx_L1_error)
25500  __Pyx_GOTREF(__pyx_t_3);
25501  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1253, __pyx_L1_error)
25502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25503  if (__pyx_t_9) {
25504 
25505  /* "mbd/CouplingFSI.pyx":1254
25506  * values_towrite = [t, t_chrono, t_sim]
25507  * if t == 0:
25508  * headers = ['t', 't_ch', 't_sim'] # <<<<<<<<<<<<<<
25509  * for key in self.record_dict:
25510  * headers += [key]
25511  */
25512  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1254, __pyx_L1_error)
25513  __Pyx_GOTREF(__pyx_t_3);
25514  __Pyx_INCREF(__pyx_n_s_t);
25515  __Pyx_GIVEREF(__pyx_n_s_t);
25516  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_t);
25517  __Pyx_INCREF(__pyx_n_s_t_ch);
25518  __Pyx_GIVEREF(__pyx_n_s_t_ch);
25519  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_t_ch);
25520  __Pyx_INCREF(__pyx_n_s_t_sim);
25521  __Pyx_GIVEREF(__pyx_n_s_t_sim);
25522  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_t_sim);
25523  __pyx_v_headers = ((PyObject*)__pyx_t_3);
25524  __pyx_t_3 = 0;
25525 
25526  /* "mbd/CouplingFSI.pyx":1255
25527  * if t == 0:
25528  * headers = ['t', 't_ch', 't_sim']
25529  * for key in self.record_dict: # <<<<<<<<<<<<<<
25530  * headers += [key]
25531  * with open(record_file+'.csv', 'w') as csvfile:
25532  */
25533  if (likely(PyList_CheckExact(__pyx_v_self->record_dict)) || PyTuple_CheckExact(__pyx_v_self->record_dict)) {
25534  __pyx_t_3 = __pyx_v_self->record_dict; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0;
25535  __pyx_t_14 = NULL;
25536  } else {
25537  __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->record_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error)
25538  __Pyx_GOTREF(__pyx_t_3);
25539  __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1255, __pyx_L1_error)
25540  }
25541  for (;;) {
25542  if (likely(!__pyx_t_14)) {
25543  if (likely(PyList_CheckExact(__pyx_t_3))) {
25544  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break;
25545  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25546  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1255, __pyx_L1_error)
25547  #else
25548  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
25549  __Pyx_GOTREF(__pyx_t_1);
25550  #endif
25551  } else {
25552  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
25553  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25554  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1255, __pyx_L1_error)
25555  #else
25556  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
25557  __Pyx_GOTREF(__pyx_t_1);
25558  #endif
25559  }
25560  } else {
25561  __pyx_t_1 = __pyx_t_14(__pyx_t_3);
25562  if (unlikely(!__pyx_t_1)) {
25563  PyObject* exc_type = PyErr_Occurred();
25564  if (exc_type) {
25565  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
25566  else __PYX_ERR(0, 1255, __pyx_L1_error)
25567  }
25568  break;
25569  }
25570  __Pyx_GOTREF(__pyx_t_1);
25571  }
25572  __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
25573  __pyx_t_1 = 0;
25574 
25575  /* "mbd/CouplingFSI.pyx":1256
25576  * headers = ['t', 't_ch', 't_sim']
25577  * for key in self.record_dict:
25578  * headers += [key] # <<<<<<<<<<<<<<
25579  * with open(record_file+'.csv', 'w') as csvfile:
25580  * writer = csv.writer(csvfile, delimiter=',')
25581  */
25582  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error)
25583  __Pyx_GOTREF(__pyx_t_1);
25584  __Pyx_INCREF(__pyx_v_key);
25585  __Pyx_GIVEREF(__pyx_v_key);
25586  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_key);
25587  __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_headers, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1256, __pyx_L1_error)
25588  __Pyx_GOTREF(__pyx_t_7);
25589  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25590  __Pyx_DECREF_SET(__pyx_v_headers, ((PyObject*)__pyx_t_7));
25591  __pyx_t_7 = 0;
25592 
25593  /* "mbd/CouplingFSI.pyx":1255
25594  * if t == 0:
25595  * headers = ['t', 't_ch', 't_sim']
25596  * for key in self.record_dict: # <<<<<<<<<<<<<<
25597  * headers += [key]
25598  * with open(record_file+'.csv', 'w') as csvfile:
25599  */
25600  }
25601  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25602 
25603  /* "mbd/CouplingFSI.pyx":1257
25604  * for key in self.record_dict:
25605  * headers += [key]
25606  * with open(record_file+'.csv', 'w') as csvfile: # <<<<<<<<<<<<<<
25607  * writer = csv.writer(csvfile, delimiter=',')
25608  * writer.writerow(headers)
25609  */
25610  /*with:*/ {
25611  __pyx_t_3 = PyNumber_Add(__pyx_v_record_file, __pyx_kp_s_csv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error)
25612  __Pyx_GOTREF(__pyx_t_3);
25613  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1257, __pyx_L1_error)
25614  __Pyx_GOTREF(__pyx_t_7);
25615  __Pyx_GIVEREF(__pyx_t_3);
25616  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
25617  __Pyx_INCREF(__pyx_n_s_w);
25618  __Pyx_GIVEREF(__pyx_n_s_w);
25619  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_w);
25620  __pyx_t_3 = 0;
25621  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error)
25622  __Pyx_GOTREF(__pyx_t_3);
25623  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25624  __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1257, __pyx_L1_error)
25625  __Pyx_GOTREF(__pyx_t_12);
25626  __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L15_error)
25627  __Pyx_GOTREF(__pyx_t_1);
25628  __pyx_t_2 = NULL;
25629  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
25630  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
25631  if (likely(__pyx_t_2)) {
25632  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
25633  __Pyx_INCREF(__pyx_t_2);
25634  __Pyx_INCREF(function);
25635  __Pyx_DECREF_SET(__pyx_t_1, function);
25636  }
25637  }
25638  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
25639  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25640  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1257, __pyx_L15_error)
25641  __Pyx_GOTREF(__pyx_t_7);
25642  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25643  __pyx_t_1 = __pyx_t_7;
25644  __pyx_t_7 = 0;
25645  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25646  /*try:*/ {
25647  {
25648  __Pyx_PyThreadState_declare
25649  __Pyx_PyThreadState_assign
25650  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_15);
25651  __Pyx_XGOTREF(__pyx_t_11);
25652  __Pyx_XGOTREF(__pyx_t_10);
25653  __Pyx_XGOTREF(__pyx_t_15);
25654  /*try:*/ {
25655  __pyx_v_csvfile = __pyx_t_1;
25656  __pyx_t_1 = 0;
25657 
25658  /* "mbd/CouplingFSI.pyx":1258
25659  * headers += [key]
25660  * with open(record_file+'.csv', 'w') as csvfile:
25661  * writer = csv.writer(csvfile, delimiter=',') # <<<<<<<<<<<<<<
25662  * writer.writerow(headers)
25663  * for key, val in self.record_dict.items():
25664  */
25665  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_csv_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L19_error)
25666  __Pyx_GOTREF(__pyx_t_1);
25667  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L19_error)
25668  __Pyx_GOTREF(__pyx_t_3);
25669  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25670  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L19_error)
25671  __Pyx_GOTREF(__pyx_t_1);
25672  __Pyx_INCREF(__pyx_v_csvfile);
25673  __Pyx_GIVEREF(__pyx_v_csvfile);
25674  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_csvfile);
25675  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1258, __pyx_L19_error)
25676  __Pyx_GOTREF(__pyx_t_7);
25677  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_delimiter, __pyx_kp_s__87) < 0) __PYX_ERR(0, 1258, __pyx_L19_error)
25678  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L19_error)
25679  __Pyx_GOTREF(__pyx_t_2);
25680  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25681  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25682  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25683  __pyx_v_writer = __pyx_t_2;
25684  __pyx_t_2 = 0;
25685 
25686  /* "mbd/CouplingFSI.pyx":1259
25687  * with open(record_file+'.csv', 'w') as csvfile:
25688  * writer = csv.writer(csvfile, delimiter=',')
25689  * writer.writerow(headers) # <<<<<<<<<<<<<<
25690  * for key, val in self.record_dict.items():
25691  * if val[1] is not None:
25692  */
25693  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerow); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1259, __pyx_L19_error)
25694  __Pyx_GOTREF(__pyx_t_7);
25695  __pyx_t_1 = NULL;
25696  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
25697  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
25698  if (likely(__pyx_t_1)) {
25699  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
25700  __Pyx_INCREF(__pyx_t_1);
25701  __Pyx_INCREF(function);
25702  __Pyx_DECREF_SET(__pyx_t_7, function);
25703  }
25704  }
25705  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, __pyx_v_headers) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_headers);
25706  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25707  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1259, __pyx_L19_error)
25708  __Pyx_GOTREF(__pyx_t_2);
25709  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25710  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25711 
25712  /* "mbd/CouplingFSI.pyx":1257
25713  * for key in self.record_dict:
25714  * headers += [key]
25715  * with open(record_file+'.csv', 'w') as csvfile: # <<<<<<<<<<<<<<
25716  * writer = csv.writer(csvfile, delimiter=',')
25717  * writer.writerow(headers)
25718  */
25719  }
25720  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
25721  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
25722  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
25723  goto __pyx_L24_try_end;
25724  __pyx_L19_error:;
25725  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25726  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25727  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
25728  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
25729  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25730  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
25731  /*except:*/ {
25732  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
25733  if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_1) < 0) __PYX_ERR(0, 1257, __pyx_L21_except_error)
25734  __Pyx_GOTREF(__pyx_t_2);
25735  __Pyx_GOTREF(__pyx_t_7);
25736  __Pyx_GOTREF(__pyx_t_1);
25737  __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L21_except_error)
25738  __Pyx_GOTREF(__pyx_t_3);
25739  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL);
25740  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25741  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25742  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1257, __pyx_L21_except_error)
25743  __Pyx_GOTREF(__pyx_t_16);
25744  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_16);
25745  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
25746  if (__pyx_t_9 < 0) __PYX_ERR(0, 1257, __pyx_L21_except_error)
25747  __pyx_t_8 = ((!(__pyx_t_9 != 0)) != 0);
25748  if (__pyx_t_8) {
25749  __Pyx_GIVEREF(__pyx_t_2);
25750  __Pyx_GIVEREF(__pyx_t_7);
25751  __Pyx_XGIVEREF(__pyx_t_1);
25752  __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_7, __pyx_t_1);
25753  __pyx_t_2 = 0; __pyx_t_7 = 0; __pyx_t_1 = 0;
25754  __PYX_ERR(0, 1257, __pyx_L21_except_error)
25755  }
25756  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25757  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
25758  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25759  goto __pyx_L20_exception_handled;
25760  }
25761  __pyx_L21_except_error:;
25762  __Pyx_XGIVEREF(__pyx_t_11);
25763  __Pyx_XGIVEREF(__pyx_t_10);
25764  __Pyx_XGIVEREF(__pyx_t_15);
25765  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_15);
25766  goto __pyx_L1_error;
25767  __pyx_L20_exception_handled:;
25768  __Pyx_XGIVEREF(__pyx_t_11);
25769  __Pyx_XGIVEREF(__pyx_t_10);
25770  __Pyx_XGIVEREF(__pyx_t_15);
25771  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_15);
25772  __pyx_L24_try_end:;
25773  }
25774  }
25775  /*finally:*/ {
25776  /*normal exit:*/{
25777  if (__pyx_t_12) {
25778  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__88, NULL);
25779  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25780  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1257, __pyx_L1_error)
25781  __Pyx_GOTREF(__pyx_t_15);
25782  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
25783  }
25784  goto __pyx_L18;
25785  }
25786  __pyx_L18:;
25787  }
25788  goto __pyx_L28;
25789  __pyx_L15_error:;
25790  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
25791  goto __pyx_L1_error;
25792  __pyx_L28:;
25793  }
25794 
25795  /* "mbd/CouplingFSI.pyx":1253
25796  * t_sim = Profiling.time()-Profiling.startTime
25797  * values_towrite = [t, t_chrono, t_sim]
25798  * if t == 0: # <<<<<<<<<<<<<<
25799  * headers = ['t', 't_ch', 't_sim']
25800  * for key in self.record_dict:
25801  */
25802  }
25803 
25804  /* "mbd/CouplingFSI.pyx":1260
25805  * writer = csv.writer(csvfile, delimiter=',')
25806  * writer.writerow(headers)
25807  * for key, val in self.record_dict.items(): # <<<<<<<<<<<<<<
25808  * if val[1] is not None:
25809  * values_towrite += [getattr(self, val[0])[val[1]]]
25810  */
25811  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->record_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
25812  __Pyx_GOTREF(__pyx_t_7);
25813  __pyx_t_2 = NULL;
25814  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
25815  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
25816  if (likely(__pyx_t_2)) {
25817  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
25818  __Pyx_INCREF(__pyx_t_2);
25819  __Pyx_INCREF(function);
25820  __Pyx_DECREF_SET(__pyx_t_7, function);
25821  }
25822  }
25823  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
25824  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
25825  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error)
25826  __Pyx_GOTREF(__pyx_t_1);
25827  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
25828  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
25829  __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_13 = 0;
25830  __pyx_t_14 = NULL;
25831  } else {
25832  __pyx_t_13 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
25833  __Pyx_GOTREF(__pyx_t_7);
25834  __pyx_t_14 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1260, __pyx_L1_error)
25835  }
25836  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25837  for (;;) {
25838  if (likely(!__pyx_t_14)) {
25839  if (likely(PyList_CheckExact(__pyx_t_7))) {
25840  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break;
25841  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25842  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1260, __pyx_L1_error)
25843  #else
25844  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error)
25845  __Pyx_GOTREF(__pyx_t_1);
25846  #endif
25847  } else {
25848  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
25849  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25850  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1260, __pyx_L1_error)
25851  #else
25852  __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error)
25853  __Pyx_GOTREF(__pyx_t_1);
25854  #endif
25855  }
25856  } else {
25857  __pyx_t_1 = __pyx_t_14(__pyx_t_7);
25858  if (unlikely(!__pyx_t_1)) {
25859  PyObject* exc_type = PyErr_Occurred();
25860  if (exc_type) {
25861  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
25862  else __PYX_ERR(0, 1260, __pyx_L1_error)
25863  }
25864  break;
25865  }
25866  __Pyx_GOTREF(__pyx_t_1);
25867  }
25868  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
25869  PyObject* sequence = __pyx_t_1;
25870  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
25871  if (unlikely(size != 2)) {
25872  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
25873  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
25874  __PYX_ERR(0, 1260, __pyx_L1_error)
25875  }
25876  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
25877  if (likely(PyTuple_CheckExact(sequence))) {
25878  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
25879  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
25880  } else {
25881  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
25882  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
25883  }
25884  __Pyx_INCREF(__pyx_t_2);
25885  __Pyx_INCREF(__pyx_t_3);
25886  #else
25887  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
25888  __Pyx_GOTREF(__pyx_t_2);
25889  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
25890  __Pyx_GOTREF(__pyx_t_3);
25891  #endif
25892  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25893  } else {
25894  Py_ssize_t index = -1;
25895  __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L1_error)
25896  __Pyx_GOTREF(__pyx_t_4);
25897  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25898  __pyx_t_17 = Py_TYPE(__pyx_t_4)->tp_iternext;
25899  index = 0; __pyx_t_2 = __pyx_t_17(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L31_unpacking_failed;
25900  __Pyx_GOTREF(__pyx_t_2);
25901  index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L31_unpacking_failed;
25902  __Pyx_GOTREF(__pyx_t_3);
25903  if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1260, __pyx_L1_error)
25904  __pyx_t_17 = NULL;
25905  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25906  goto __pyx_L32_unpacking_done;
25907  __pyx_L31_unpacking_failed:;
25908  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25909  __pyx_t_17 = NULL;
25910  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
25911  __PYX_ERR(0, 1260, __pyx_L1_error)
25912  __pyx_L32_unpacking_done:;
25913  }
25914  __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
25915  __pyx_t_2 = 0;
25916  __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
25917  __pyx_t_3 = 0;
25918 
25919  /* "mbd/CouplingFSI.pyx":1261
25920  * writer.writerow(headers)
25921  * for key, val in self.record_dict.items():
25922  * if val[1] is not None: # <<<<<<<<<<<<<<
25923  * values_towrite += [getattr(self, val[0])[val[1]]]
25924  * else:
25925  */
25926  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L1_error)
25927  __Pyx_GOTREF(__pyx_t_1);
25928  __pyx_t_8 = (__pyx_t_1 != Py_None);
25929  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25930  __pyx_t_9 = (__pyx_t_8 != 0);
25931  if (__pyx_t_9) {
25932 
25933  /* "mbd/CouplingFSI.pyx":1262
25934  * for key, val in self.record_dict.items():
25935  * if val[1] is not None:
25936  * values_towrite += [getattr(self, val[0])[val[1]]] # <<<<<<<<<<<<<<
25937  * else:
25938  * values_towrite += [getattr(self, val[0])]
25939  */
25940  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error)
25941  __Pyx_GOTREF(__pyx_t_1);
25942  __pyx_t_3 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1262, __pyx_L1_error)
25943  __Pyx_GOTREF(__pyx_t_3);
25944  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25945  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_val, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error)
25946  __Pyx_GOTREF(__pyx_t_1);
25947  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
25948  __Pyx_GOTREF(__pyx_t_2);
25949  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25950  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25951  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error)
25952  __Pyx_GOTREF(__pyx_t_1);
25953  __Pyx_GIVEREF(__pyx_t_2);
25954  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
25955  __pyx_t_2 = 0;
25956  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_values_towrite, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1262, __pyx_L1_error)
25957  __Pyx_GOTREF(__pyx_t_2);
25958  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25959  __Pyx_DECREF_SET(__pyx_v_values_towrite, ((PyObject*)__pyx_t_2));
25960  __pyx_t_2 = 0;
25961 
25962  /* "mbd/CouplingFSI.pyx":1261
25963  * writer.writerow(headers)
25964  * for key, val in self.record_dict.items():
25965  * if val[1] is not None: # <<<<<<<<<<<<<<
25966  * values_towrite += [getattr(self, val[0])[val[1]]]
25967  * else:
25968  */
25969  goto __pyx_L33;
25970  }
25971 
25972  /* "mbd/CouplingFSI.pyx":1264
25973  * values_towrite += [getattr(self, val[0])[val[1]]]
25974  * else:
25975  * values_towrite += [getattr(self, val[0])] # <<<<<<<<<<<<<<
25976  * with open(record_file+'.csv', 'a') as csvfile:
25977  * writer = csv.writer(csvfile, delimiter=',')
25978  */
25979  /*else*/ {
25980  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_val, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
25981  __Pyx_GOTREF(__pyx_t_2);
25982  __pyx_t_1 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error)
25983  __Pyx_GOTREF(__pyx_t_1);
25984  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25985  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error)
25986  __Pyx_GOTREF(__pyx_t_2);
25987  __Pyx_GIVEREF(__pyx_t_1);
25988  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
25989  __pyx_t_1 = 0;
25990  __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_values_towrite, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error)
25991  __Pyx_GOTREF(__pyx_t_1);
25992  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25993  __Pyx_DECREF_SET(__pyx_v_values_towrite, ((PyObject*)__pyx_t_1));
25994  __pyx_t_1 = 0;
25995  }
25996  __pyx_L33:;
25997 
25998  /* "mbd/CouplingFSI.pyx":1260
25999  * writer = csv.writer(csvfile, delimiter=',')
26000  * writer.writerow(headers)
26001  * for key, val in self.record_dict.items(): # <<<<<<<<<<<<<<
26002  * if val[1] is not None:
26003  * values_towrite += [getattr(self, val[0])[val[1]]]
26004  */
26005  }
26006  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26007 
26008  /* "mbd/CouplingFSI.pyx":1265
26009  * else:
26010  * values_towrite += [getattr(self, val[0])]
26011  * with open(record_file+'.csv', 'a') as csvfile: # <<<<<<<<<<<<<<
26012  * writer = csv.writer(csvfile, delimiter=',')
26013  * writer.writerow(values_towrite)
26014  */
26015  /*with:*/ {
26016  __pyx_t_7 = PyNumber_Add(__pyx_v_record_file, __pyx_kp_s_csv); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1265, __pyx_L1_error)
26017  __Pyx_GOTREF(__pyx_t_7);
26018  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error)
26019  __Pyx_GOTREF(__pyx_t_1);
26020  __Pyx_GIVEREF(__pyx_t_7);
26021  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
26022  __Pyx_INCREF(__pyx_n_s_a);
26023  __Pyx_GIVEREF(__pyx_n_s_a);
26024  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_a);
26025  __pyx_t_7 = 0;
26026  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1265, __pyx_L1_error)
26027  __Pyx_GOTREF(__pyx_t_7);
26028  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26029  __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_7, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1265, __pyx_L1_error)
26030  __Pyx_GOTREF(__pyx_t_12);
26031  __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_7, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L34_error)
26032  __Pyx_GOTREF(__pyx_t_2);
26033  __pyx_t_3 = NULL;
26034  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
26035  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
26036  if (likely(__pyx_t_3)) {
26037  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
26038  __Pyx_INCREF(__pyx_t_3);
26039  __Pyx_INCREF(function);
26040  __Pyx_DECREF_SET(__pyx_t_2, function);
26041  }
26042  }
26043  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
26044  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26045  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L34_error)
26046  __Pyx_GOTREF(__pyx_t_1);
26047  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26048  __pyx_t_2 = __pyx_t_1;
26049  __pyx_t_1 = 0;
26050  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26051  /*try:*/ {
26052  {
26053  __Pyx_PyThreadState_declare
26054  __Pyx_PyThreadState_assign
26055  __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_10, &__pyx_t_11);
26056  __Pyx_XGOTREF(__pyx_t_15);
26057  __Pyx_XGOTREF(__pyx_t_10);
26058  __Pyx_XGOTREF(__pyx_t_11);
26059  /*try:*/ {
26060  __Pyx_XDECREF_SET(__pyx_v_csvfile, __pyx_t_2);
26061  __pyx_t_2 = 0;
26062 
26063  /* "mbd/CouplingFSI.pyx":1266
26064  * values_towrite += [getattr(self, val[0])]
26065  * with open(record_file+'.csv', 'a') as csvfile:
26066  * writer = csv.writer(csvfile, delimiter=',') # <<<<<<<<<<<<<<
26067  * writer.writerow(values_towrite)
26068  * ## added mass
26069  */
26070  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_csv_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L38_error)
26071  __Pyx_GOTREF(__pyx_t_2);
26072  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_writer); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1266, __pyx_L38_error)
26073  __Pyx_GOTREF(__pyx_t_7);
26074  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26075  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L38_error)
26076  __Pyx_GOTREF(__pyx_t_2);
26077  __Pyx_INCREF(__pyx_v_csvfile);
26078  __Pyx_GIVEREF(__pyx_v_csvfile);
26079  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_csvfile);
26080  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L38_error)
26081  __Pyx_GOTREF(__pyx_t_1);
26082  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_delimiter, __pyx_kp_s__87) < 0) __PYX_ERR(0, 1266, __pyx_L38_error)
26083  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L38_error)
26084  __Pyx_GOTREF(__pyx_t_3);
26085  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26086  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26087  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26088  __Pyx_XDECREF_SET(__pyx_v_writer, __pyx_t_3);
26089  __pyx_t_3 = 0;
26090 
26091  /* "mbd/CouplingFSI.pyx":1267
26092  * with open(record_file+'.csv', 'a') as csvfile:
26093  * writer = csv.writer(csvfile, delimiter=',')
26094  * writer.writerow(values_towrite) # <<<<<<<<<<<<<<
26095  * ## added mass
26096  * if self.ProtChSystem.model_addedmass is not None:
26097  */
26098  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L38_error)
26099  __Pyx_GOTREF(__pyx_t_1);
26100  __pyx_t_2 = NULL;
26101  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
26102  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
26103  if (likely(__pyx_t_2)) {
26104  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
26105  __Pyx_INCREF(__pyx_t_2);
26106  __Pyx_INCREF(function);
26107  __Pyx_DECREF_SET(__pyx_t_1, function);
26108  }
26109  }
26110  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_values_towrite) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_values_towrite);
26111  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26112  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L38_error)
26113  __Pyx_GOTREF(__pyx_t_3);
26114  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26115  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26116 
26117  /* "mbd/CouplingFSI.pyx":1265
26118  * else:
26119  * values_towrite += [getattr(self, val[0])]
26120  * with open(record_file+'.csv', 'a') as csvfile: # <<<<<<<<<<<<<<
26121  * writer = csv.writer(csvfile, delimiter=',')
26122  * writer.writerow(values_towrite)
26123  */
26124  }
26125  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
26126  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
26127  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
26128  goto __pyx_L43_try_end;
26129  __pyx_L38_error:;
26130  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
26131  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26132  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26133  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
26134  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
26135  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
26136  /*except:*/ {
26137  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
26138  if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 1265, __pyx_L40_except_error)
26139  __Pyx_GOTREF(__pyx_t_3);
26140  __Pyx_GOTREF(__pyx_t_1);
26141  __Pyx_GOTREF(__pyx_t_2);
26142  __pyx_t_7 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1265, __pyx_L40_except_error)
26143  __Pyx_GOTREF(__pyx_t_7);
26144  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_7, NULL);
26145  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26146  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26147  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1265, __pyx_L40_except_error)
26148  __Pyx_GOTREF(__pyx_t_16);
26149  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_16);
26150  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
26151  if (__pyx_t_9 < 0) __PYX_ERR(0, 1265, __pyx_L40_except_error)
26152  __pyx_t_8 = ((!(__pyx_t_9 != 0)) != 0);
26153  if (__pyx_t_8) {
26154  __Pyx_GIVEREF(__pyx_t_3);
26155  __Pyx_GIVEREF(__pyx_t_1);
26156  __Pyx_XGIVEREF(__pyx_t_2);
26157  __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_2);
26158  __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_2 = 0;
26159  __PYX_ERR(0, 1265, __pyx_L40_except_error)
26160  }
26161  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26162  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
26163  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26164  goto __pyx_L39_exception_handled;
26165  }
26166  __pyx_L40_except_error:;
26167  __Pyx_XGIVEREF(__pyx_t_15);
26168  __Pyx_XGIVEREF(__pyx_t_10);
26169  __Pyx_XGIVEREF(__pyx_t_11);
26170  __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_10, __pyx_t_11);
26171  goto __pyx_L1_error;
26172  __pyx_L39_exception_handled:;
26173  __Pyx_XGIVEREF(__pyx_t_15);
26174  __Pyx_XGIVEREF(__pyx_t_10);
26175  __Pyx_XGIVEREF(__pyx_t_11);
26176  __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_10, __pyx_t_11);
26177  __pyx_L43_try_end:;
26178  }
26179  }
26180  /*finally:*/ {
26181  /*normal exit:*/{
26182  if (__pyx_t_12) {
26183  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__88, NULL);
26184  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26185  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1265, __pyx_L1_error)
26186  __Pyx_GOTREF(__pyx_t_11);
26187  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26188  }
26189  goto __pyx_L37;
26190  }
26191  __pyx_L37:;
26192  }
26193  goto __pyx_L47;
26194  __pyx_L34_error:;
26195  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26196  goto __pyx_L1_error;
26197  __pyx_L47:;
26198  }
26199 
26200  /* "mbd/CouplingFSI.pyx":1269
26201  * writer.writerow(values_towrite)
26202  * ## added mass
26203  * if self.ProtChSystem.model_addedmass is not None: # <<<<<<<<<<<<<<
26204  * if t == 0:
26205  * headers = ['t', 't_ch', 't_sim']
26206  */
26207  __pyx_t_8 = (__pyx_v_self->ProtChSystem->model_addedmass != Py_None);
26208  __pyx_t_9 = (__pyx_t_8 != 0);
26209  if (__pyx_t_9) {
26210 
26211  /* "mbd/CouplingFSI.pyx":1270
26212  * ## added mass
26213  * if self.ProtChSystem.model_addedmass is not None:
26214  * if t == 0: # <<<<<<<<<<<<<<
26215  * headers = ['t', 't_ch', 't_sim']
26216  * for i in range(6):
26217  */
26218  __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_t, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
26219  __Pyx_GOTREF(__pyx_t_2);
26220  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1270, __pyx_L1_error)
26221  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26222  if (__pyx_t_9) {
26223 
26224  /* "mbd/CouplingFSI.pyx":1271
26225  * if self.ProtChSystem.model_addedmass is not None:
26226  * if t == 0:
26227  * headers = ['t', 't_ch', 't_sim'] # <<<<<<<<<<<<<<
26228  * for i in range(6):
26229  * for j in range(6):
26230  */
26231  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error)
26232  __Pyx_GOTREF(__pyx_t_2);
26233  __Pyx_INCREF(__pyx_n_s_t);
26234  __Pyx_GIVEREF(__pyx_n_s_t);
26235  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_t);
26236  __Pyx_INCREF(__pyx_n_s_t_ch);
26237  __Pyx_GIVEREF(__pyx_n_s_t_ch);
26238  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_t_ch);
26239  __Pyx_INCREF(__pyx_n_s_t_sim);
26240  __Pyx_GIVEREF(__pyx_n_s_t_sim);
26241  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_t_sim);
26242  __Pyx_XDECREF_SET(__pyx_v_headers, ((PyObject*)__pyx_t_2));
26243  __pyx_t_2 = 0;
26244 
26245  /* "mbd/CouplingFSI.pyx":1272
26246  * if t == 0:
26247  * headers = ['t', 't_ch', 't_sim']
26248  * for i in range(6): # <<<<<<<<<<<<<<
26249  * for j in range(6):
26250  * headers += ['A'+str(i)+str(j)]
26251  */
26252  for (__pyx_t_18 = 0; __pyx_t_18 < 6; __pyx_t_18+=1) {
26253  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_18); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
26254  __Pyx_GOTREF(__pyx_t_2);
26255  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
26256  __pyx_t_2 = 0;
26257 
26258  /* "mbd/CouplingFSI.pyx":1273
26259  * headers = ['t', 't_ch', 't_sim']
26260  * for i in range(6):
26261  * for j in range(6): # <<<<<<<<<<<<<<
26262  * headers += ['A'+str(i)+str(j)]
26263  * with open(record_file+'_Aij.csv', 'w') as csvfile:
26264  */
26265  for (__pyx_t_19 = 0; __pyx_t_19 < 6; __pyx_t_19+=1) {
26266  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_19); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
26267  __Pyx_GOTREF(__pyx_t_2);
26268  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2);
26269  __pyx_t_2 = 0;
26270 
26271  /* "mbd/CouplingFSI.pyx":1274
26272  * for i in range(6):
26273  * for j in range(6):
26274  * headers += ['A'+str(i)+str(j)] # <<<<<<<<<<<<<<
26275  * with open(record_file+'_Aij.csv', 'w') as csvfile:
26276  * writer = csv.writer(csvfile, delimiter=',')
26277  */
26278  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
26279  __Pyx_GOTREF(__pyx_t_2);
26280  __pyx_t_1 = PyNumber_Add(__pyx_n_s_A, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error)
26281  __Pyx_GOTREF(__pyx_t_1);
26282  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26283  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
26284  __Pyx_GOTREF(__pyx_t_2);
26285  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error)
26286  __Pyx_GOTREF(__pyx_t_3);
26287  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26288  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26289  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
26290  __Pyx_GOTREF(__pyx_t_2);
26291  __Pyx_GIVEREF(__pyx_t_3);
26292  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
26293  __pyx_t_3 = 0;
26294  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_headers, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1274, __pyx_L1_error)
26295  __Pyx_GOTREF(__pyx_t_3);
26296  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26297  __Pyx_DECREF_SET(__pyx_v_headers, ((PyObject*)__pyx_t_3));
26298  __pyx_t_3 = 0;
26299  }
26300  }
26301 
26302  /* "mbd/CouplingFSI.pyx":1275
26303  * for j in range(6):
26304  * headers += ['A'+str(i)+str(j)]
26305  * with open(record_file+'_Aij.csv', 'w') as csvfile: # <<<<<<<<<<<<<<
26306  * writer = csv.writer(csvfile, delimiter=',')
26307  * writer.writerow(headers)
26308  */
26309  /*with:*/ {
26310  __pyx_t_3 = PyNumber_Add(__pyx_v_record_file, __pyx_kp_s_Aij_csv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
26311  __Pyx_GOTREF(__pyx_t_3);
26312  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L1_error)
26313  __Pyx_GOTREF(__pyx_t_2);
26314  __Pyx_GIVEREF(__pyx_t_3);
26315  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
26316  __Pyx_INCREF(__pyx_n_s_w);
26317  __Pyx_GIVEREF(__pyx_n_s_w);
26318  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_w);
26319  __pyx_t_3 = 0;
26320  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L1_error)
26321  __Pyx_GOTREF(__pyx_t_3);
26322  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26323  __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1275, __pyx_L1_error)
26324  __Pyx_GOTREF(__pyx_t_12);
26325  __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1275, __pyx_L54_error)
26326  __Pyx_GOTREF(__pyx_t_1);
26327  __pyx_t_7 = NULL;
26328  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
26329  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
26330  if (likely(__pyx_t_7)) {
26331  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
26332  __Pyx_INCREF(__pyx_t_7);
26333  __Pyx_INCREF(function);
26334  __Pyx_DECREF_SET(__pyx_t_1, function);
26335  }
26336  }
26337  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
26338  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
26339  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1275, __pyx_L54_error)
26340  __Pyx_GOTREF(__pyx_t_2);
26341  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26342  __pyx_t_1 = __pyx_t_2;
26343  __pyx_t_2 = 0;
26344  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26345  /*try:*/ {
26346  {
26347  __Pyx_PyThreadState_declare
26348  __Pyx_PyThreadState_assign
26349  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_15);
26350  __Pyx_XGOTREF(__pyx_t_11);
26351  __Pyx_XGOTREF(__pyx_t_10);
26352  __Pyx_XGOTREF(__pyx_t_15);
26353  /*try:*/ {
26354  __Pyx_XDECREF_SET(__pyx_v_csvfile, __pyx_t_1);
26355  __pyx_t_1 = 0;
26356 
26357  /* "mbd/CouplingFSI.pyx":1276
26358  * headers += ['A'+str(i)+str(j)]
26359  * with open(record_file+'_Aij.csv', 'w') as csvfile:
26360  * writer = csv.writer(csvfile, delimiter=',') # <<<<<<<<<<<<<<
26361  * writer.writerow(headers)
26362  * values_towrite = [t, t_chrono, t_sim]
26363  */
26364  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_csv_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L58_error)
26365  __Pyx_GOTREF(__pyx_t_1);
26366  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_writer); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1276, __pyx_L58_error)
26367  __Pyx_GOTREF(__pyx_t_3);
26368  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26369  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L58_error)
26370  __Pyx_GOTREF(__pyx_t_1);
26371  __Pyx_INCREF(__pyx_v_csvfile);
26372  __Pyx_GIVEREF(__pyx_v_csvfile);
26373  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_csvfile);
26374  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1276, __pyx_L58_error)
26375  __Pyx_GOTREF(__pyx_t_2);
26376  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_delimiter, __pyx_kp_s__87) < 0) __PYX_ERR(0, 1276, __pyx_L58_error)
26377  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1276, __pyx_L58_error)
26378  __Pyx_GOTREF(__pyx_t_7);
26379  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26380  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26381  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26382  __Pyx_XDECREF_SET(__pyx_v_writer, __pyx_t_7);
26383  __pyx_t_7 = 0;
26384 
26385  /* "mbd/CouplingFSI.pyx":1277
26386  * with open(record_file+'_Aij.csv', 'w') as csvfile:
26387  * writer = csv.writer(csvfile, delimiter=',')
26388  * writer.writerow(headers) # <<<<<<<<<<<<<<
26389  * values_towrite = [t, t_chrono, t_sim]
26390  * for i in range(6):
26391  */
26392  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L58_error)
26393  __Pyx_GOTREF(__pyx_t_2);
26394  __pyx_t_1 = NULL;
26395  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
26396  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
26397  if (likely(__pyx_t_1)) {
26398  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
26399  __Pyx_INCREF(__pyx_t_1);
26400  __Pyx_INCREF(function);
26401  __Pyx_DECREF_SET(__pyx_t_2, function);
26402  }
26403  }
26404  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_headers) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_headers);
26405  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
26406  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1277, __pyx_L58_error)
26407  __Pyx_GOTREF(__pyx_t_7);
26408  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26409  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26410 
26411  /* "mbd/CouplingFSI.pyx":1275
26412  * for j in range(6):
26413  * headers += ['A'+str(i)+str(j)]
26414  * with open(record_file+'_Aij.csv', 'w') as csvfile: # <<<<<<<<<<<<<<
26415  * writer = csv.writer(csvfile, delimiter=',')
26416  * writer.writerow(headers)
26417  */
26418  }
26419  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
26420  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
26421  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
26422  goto __pyx_L63_try_end;
26423  __pyx_L58_error:;
26424  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
26425  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26426  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26427  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
26428  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
26429  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
26430  /*except:*/ {
26431  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
26432  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1275, __pyx_L60_except_error)
26433  __Pyx_GOTREF(__pyx_t_7);
26434  __Pyx_GOTREF(__pyx_t_2);
26435  __Pyx_GOTREF(__pyx_t_1);
26436  __pyx_t_3 = PyTuple_Pack(3, __pyx_t_7, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1275, __pyx_L60_except_error)
26437  __Pyx_GOTREF(__pyx_t_3);
26438  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL);
26439  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26440  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26441  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1275, __pyx_L60_except_error)
26442  __Pyx_GOTREF(__pyx_t_16);
26443  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_16);
26444  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
26445  if (__pyx_t_9 < 0) __PYX_ERR(0, 1275, __pyx_L60_except_error)
26446  __pyx_t_8 = ((!(__pyx_t_9 != 0)) != 0);
26447  if (__pyx_t_8) {
26448  __Pyx_GIVEREF(__pyx_t_7);
26449  __Pyx_GIVEREF(__pyx_t_2);
26450  __Pyx_XGIVEREF(__pyx_t_1);
26451  __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_2, __pyx_t_1);
26452  __pyx_t_7 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0;
26453  __PYX_ERR(0, 1275, __pyx_L60_except_error)
26454  }
26455  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
26456  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26457  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
26458  goto __pyx_L59_exception_handled;
26459  }
26460  __pyx_L60_except_error:;
26461  __Pyx_XGIVEREF(__pyx_t_11);
26462  __Pyx_XGIVEREF(__pyx_t_10);
26463  __Pyx_XGIVEREF(__pyx_t_15);
26464  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_15);
26465  goto __pyx_L1_error;
26466  __pyx_L59_exception_handled:;
26467  __Pyx_XGIVEREF(__pyx_t_11);
26468  __Pyx_XGIVEREF(__pyx_t_10);
26469  __Pyx_XGIVEREF(__pyx_t_15);
26470  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_15);
26471  __pyx_L63_try_end:;
26472  }
26473  }
26474  /*finally:*/ {
26475  /*normal exit:*/{
26476  if (__pyx_t_12) {
26477  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__88, NULL);
26478  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26479  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1275, __pyx_L1_error)
26480  __Pyx_GOTREF(__pyx_t_15);
26481  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
26482  }
26483  goto __pyx_L57;
26484  }
26485  __pyx_L57:;
26486  }
26487  goto __pyx_L67;
26488  __pyx_L54_error:;
26489  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26490  goto __pyx_L1_error;
26491  __pyx_L67:;
26492  }
26493 
26494  /* "mbd/CouplingFSI.pyx":1270
26495  * ## added mass
26496  * if self.ProtChSystem.model_addedmass is not None:
26497  * if t == 0: # <<<<<<<<<<<<<<
26498  * headers = ['t', 't_ch', 't_sim']
26499  * for i in range(6):
26500  */
26501  }
26502 
26503  /* "mbd/CouplingFSI.pyx":1278
26504  * writer = csv.writer(csvfile, delimiter=',')
26505  * writer.writerow(headers)
26506  * values_towrite = [t, t_chrono, t_sim] # <<<<<<<<<<<<<<
26507  * for i in range(6):
26508  * for j in range(6):
26509  */
26510  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1278, __pyx_L1_error)
26511  __Pyx_GOTREF(__pyx_t_1);
26512  __Pyx_INCREF(__pyx_v_t);
26513  __Pyx_GIVEREF(__pyx_v_t);
26514  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_t);
26515  __Pyx_INCREF(__pyx_v_t_chrono);
26516  __Pyx_GIVEREF(__pyx_v_t_chrono);
26517  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_t_chrono);
26518  __Pyx_INCREF(__pyx_v_t_sim);
26519  __Pyx_GIVEREF(__pyx_v_t_sim);
26520  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_v_t_sim);
26521  __Pyx_DECREF_SET(__pyx_v_values_towrite, ((PyObject*)__pyx_t_1));
26522  __pyx_t_1 = 0;
26523 
26524  /* "mbd/CouplingFSI.pyx":1279
26525  * writer.writerow(headers)
26526  * values_towrite = [t, t_chrono, t_sim]
26527  * for i in range(6): # <<<<<<<<<<<<<<
26528  * for j in range(6):
26529  * values_towrite += [self.Aij[i, j]]
26530  */
26531  for (__pyx_t_18 = 0; __pyx_t_18 < 6; __pyx_t_18+=1) {
26532  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1279, __pyx_L1_error)
26533  __Pyx_GOTREF(__pyx_t_1);
26534  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
26535  __pyx_t_1 = 0;
26536 
26537  /* "mbd/CouplingFSI.pyx":1280
26538  * values_towrite = [t, t_chrono, t_sim]
26539  * for i in range(6):
26540  * for j in range(6): # <<<<<<<<<<<<<<
26541  * values_towrite += [self.Aij[i, j]]
26542  * with open(record_file+'_Aij.csv', 'a') as csvfile:
26543  */
26544  for (__pyx_t_19 = 0; __pyx_t_19 < 6; __pyx_t_19+=1) {
26545  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_t_19); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error)
26546  __Pyx_GOTREF(__pyx_t_1);
26547  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_1);
26548  __pyx_t_1 = 0;
26549 
26550  /* "mbd/CouplingFSI.pyx":1281
26551  * for i in range(6):
26552  * for j in range(6):
26553  * values_towrite += [self.Aij[i, j]] # <<<<<<<<<<<<<<
26554  * with open(record_file+'_Aij.csv', 'a') as csvfile:
26555  * writer = csv.writer(csvfile, delimiter=',')
26556  */
26557  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
26558  __Pyx_GOTREF(__pyx_t_1);
26559  __Pyx_INCREF(__pyx_v_i);
26560  __Pyx_GIVEREF(__pyx_v_i);
26561  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i);
26562  __Pyx_INCREF(__pyx_v_j);
26563  __Pyx_GIVEREF(__pyx_v_j);
26564  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_j);
26565  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self->Aij), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
26566  __Pyx_GOTREF(__pyx_t_2);
26567  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26568  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error)
26569  __Pyx_GOTREF(__pyx_t_1);
26570  __Pyx_GIVEREF(__pyx_t_2);
26571  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
26572  __pyx_t_2 = 0;
26573  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_values_towrite, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
26574  __Pyx_GOTREF(__pyx_t_2);
26575  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26576  __Pyx_DECREF_SET(__pyx_v_values_towrite, ((PyObject*)__pyx_t_2));
26577  __pyx_t_2 = 0;
26578  }
26579  }
26580 
26581  /* "mbd/CouplingFSI.pyx":1282
26582  * for j in range(6):
26583  * values_towrite += [self.Aij[i, j]]
26584  * with open(record_file+'_Aij.csv', 'a') as csvfile: # <<<<<<<<<<<<<<
26585  * writer = csv.writer(csvfile, delimiter=',')
26586  * writer.writerow(values_towrite)
26587  */
26588  /*with:*/ {
26589  __pyx_t_2 = PyNumber_Add(__pyx_v_record_file, __pyx_kp_s_Aij_csv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
26590  __Pyx_GOTREF(__pyx_t_2);
26591  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
26592  __Pyx_GOTREF(__pyx_t_1);
26593  __Pyx_GIVEREF(__pyx_t_2);
26594  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
26595  __Pyx_INCREF(__pyx_n_s_a);
26596  __Pyx_GIVEREF(__pyx_n_s_a);
26597  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_a);
26598  __pyx_t_2 = 0;
26599  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
26600  __Pyx_GOTREF(__pyx_t_2);
26601  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26602  __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1282, __pyx_L1_error)
26603  __Pyx_GOTREF(__pyx_t_12);
26604  __pyx_t_7 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1282, __pyx_L72_error)
26605  __Pyx_GOTREF(__pyx_t_7);
26606  __pyx_t_3 = NULL;
26607  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
26608  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
26609  if (likely(__pyx_t_3)) {
26610  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
26611  __Pyx_INCREF(__pyx_t_3);
26612  __Pyx_INCREF(function);
26613  __Pyx_DECREF_SET(__pyx_t_7, function);
26614  }
26615  }
26616  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
26617  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26618  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L72_error)
26619  __Pyx_GOTREF(__pyx_t_1);
26620  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26621  __pyx_t_7 = __pyx_t_1;
26622  __pyx_t_1 = 0;
26623  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26624  /*try:*/ {
26625  {
26626  __Pyx_PyThreadState_declare
26627  __Pyx_PyThreadState_assign
26628  __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_10, &__pyx_t_11);
26629  __Pyx_XGOTREF(__pyx_t_15);
26630  __Pyx_XGOTREF(__pyx_t_10);
26631  __Pyx_XGOTREF(__pyx_t_11);
26632  /*try:*/ {
26633  __Pyx_XDECREF_SET(__pyx_v_csvfile, __pyx_t_7);
26634  __pyx_t_7 = 0;
26635 
26636  /* "mbd/CouplingFSI.pyx":1283
26637  * values_towrite += [self.Aij[i, j]]
26638  * with open(record_file+'_Aij.csv', 'a') as csvfile:
26639  * writer = csv.writer(csvfile, delimiter=',') # <<<<<<<<<<<<<<
26640  * writer.writerow(values_towrite)
26641  * Profiling.logEvent('finished recording values file of '+str(self.name))
26642  */
26643  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_csv_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1283, __pyx_L76_error)
26644  __Pyx_GOTREF(__pyx_t_7);
26645  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L76_error)
26646  __Pyx_GOTREF(__pyx_t_2);
26647  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26648  __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1283, __pyx_L76_error)
26649  __Pyx_GOTREF(__pyx_t_7);
26650  __Pyx_INCREF(__pyx_v_csvfile);
26651  __Pyx_GIVEREF(__pyx_v_csvfile);
26652  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_csvfile);
26653  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L76_error)
26654  __Pyx_GOTREF(__pyx_t_1);
26655  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_delimiter, __pyx_kp_s__87) < 0) __PYX_ERR(0, 1283, __pyx_L76_error)
26656  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1283, __pyx_L76_error)
26657  __Pyx_GOTREF(__pyx_t_3);
26658  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26659  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26660  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26661  __Pyx_XDECREF_SET(__pyx_v_writer, __pyx_t_3);
26662  __pyx_t_3 = 0;
26663 
26664  /* "mbd/CouplingFSI.pyx":1284
26665  * with open(record_file+'_Aij.csv', 'a') as csvfile:
26666  * writer = csv.writer(csvfile, delimiter=',')
26667  * writer.writerow(values_towrite) # <<<<<<<<<<<<<<
26668  * Profiling.logEvent('finished recording values file of '+str(self.name))
26669  *
26670  */
26671  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L76_error)
26672  __Pyx_GOTREF(__pyx_t_1);
26673  __pyx_t_7 = NULL;
26674  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
26675  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
26676  if (likely(__pyx_t_7)) {
26677  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
26678  __Pyx_INCREF(__pyx_t_7);
26679  __Pyx_INCREF(function);
26680  __Pyx_DECREF_SET(__pyx_t_1, function);
26681  }
26682  }
26683  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_7, __pyx_v_values_towrite) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_values_towrite);
26684  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
26685  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1284, __pyx_L76_error)
26686  __Pyx_GOTREF(__pyx_t_3);
26687  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26689 
26690  /* "mbd/CouplingFSI.pyx":1282
26691  * for j in range(6):
26692  * values_towrite += [self.Aij[i, j]]
26693  * with open(record_file+'_Aij.csv', 'a') as csvfile: # <<<<<<<<<<<<<<
26694  * writer = csv.writer(csvfile, delimiter=',')
26695  * writer.writerow(values_towrite)
26696  */
26697  }
26698  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
26699  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
26700  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
26701  goto __pyx_L81_try_end;
26702  __pyx_L76_error:;
26703  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
26704  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26705  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26706  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
26707  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
26708  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
26709  /*except:*/ {
26710  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
26711  if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 1282, __pyx_L78_except_error)
26712  __Pyx_GOTREF(__pyx_t_3);
26713  __Pyx_GOTREF(__pyx_t_1);
26714  __Pyx_GOTREF(__pyx_t_7);
26715  __pyx_t_2 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L78_except_error)
26716  __Pyx_GOTREF(__pyx_t_2);
26717  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL);
26718  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26719  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26720  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1282, __pyx_L78_except_error)
26721  __Pyx_GOTREF(__pyx_t_16);
26722  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_16);
26723  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
26724  if (__pyx_t_8 < 0) __PYX_ERR(0, 1282, __pyx_L78_except_error)
26725  __pyx_t_9 = ((!(__pyx_t_8 != 0)) != 0);
26726  if (__pyx_t_9) {
26727  __Pyx_GIVEREF(__pyx_t_3);
26728  __Pyx_GIVEREF(__pyx_t_1);
26729  __Pyx_XGIVEREF(__pyx_t_7);
26730  __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_1, __pyx_t_7);
26731  __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_t_7 = 0;
26732  __PYX_ERR(0, 1282, __pyx_L78_except_error)
26733  }
26734  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
26735  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
26736  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
26737  goto __pyx_L77_exception_handled;
26738  }
26739  __pyx_L78_except_error:;
26740  __Pyx_XGIVEREF(__pyx_t_15);
26741  __Pyx_XGIVEREF(__pyx_t_10);
26742  __Pyx_XGIVEREF(__pyx_t_11);
26743  __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_10, __pyx_t_11);
26744  goto __pyx_L1_error;
26745  __pyx_L77_exception_handled:;
26746  __Pyx_XGIVEREF(__pyx_t_15);
26747  __Pyx_XGIVEREF(__pyx_t_10);
26748  __Pyx_XGIVEREF(__pyx_t_11);
26749  __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_10, __pyx_t_11);
26750  __pyx_L81_try_end:;
26751  }
26752  }
26753  /*finally:*/ {
26754  /*normal exit:*/{
26755  if (__pyx_t_12) {
26756  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__88, NULL);
26757  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26758  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1282, __pyx_L1_error)
26759  __Pyx_GOTREF(__pyx_t_11);
26760  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
26761  }
26762  goto __pyx_L75;
26763  }
26764  __pyx_L75:;
26765  }
26766  goto __pyx_L85;
26767  __pyx_L72_error:;
26768  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
26769  goto __pyx_L1_error;
26770  __pyx_L85:;
26771  }
26772 
26773  /* "mbd/CouplingFSI.pyx":1269
26774  * writer.writerow(values_towrite)
26775  * ## added mass
26776  * if self.ProtChSystem.model_addedmass is not None: # <<<<<<<<<<<<<<
26777  * if t == 0:
26778  * headers = ['t', 't_ch', 't_sim']
26779  */
26780  }
26781 
26782  /* "mbd/CouplingFSI.pyx":1285
26783  * writer = csv.writer(csvfile, delimiter=',')
26784  * writer.writerow(values_towrite)
26785  * Profiling.logEvent('finished recording values file of '+str(self.name)) # <<<<<<<<<<<<<<
26786  *
26787  * def _recordH5(self):
26788  */
26789  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
26790  __Pyx_GOTREF(__pyx_t_1);
26791  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L1_error)
26792  __Pyx_GOTREF(__pyx_t_3);
26793  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26794  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
26795  __Pyx_GOTREF(__pyx_t_1);
26796  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error)
26797  __Pyx_GOTREF(__pyx_t_2);
26798  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26799  __pyx_t_1 = PyNumber_Add(__pyx_kp_s_finished_recording_values_file_o, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
26800  __Pyx_GOTREF(__pyx_t_1);
26801  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26802  __pyx_t_2 = NULL;
26803  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
26804  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
26805  if (likely(__pyx_t_2)) {
26806  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
26807  __Pyx_INCREF(__pyx_t_2);
26808  __Pyx_INCREF(function);
26809  __Pyx_DECREF_SET(__pyx_t_3, function);
26810  }
26811  }
26812  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1);
26813  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
26814  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26815  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1285, __pyx_L1_error)
26816  __Pyx_GOTREF(__pyx_t_7);
26817  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26818  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
26819 
26820  /* "mbd/CouplingFSI.pyx":1236
26821  * self.record_dict['hz'] = ['h_predict', 2]
26822  *
26823  * def _recordValues(self): # <<<<<<<<<<<<<<
26824  * """Records values of body attributes in a csv file.
26825  * """
26826  */
26827 
26828  /* function exit code */
26829  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
26830  goto __pyx_L0;
26831  __pyx_L1_error:;
26832  __Pyx_XDECREF(__pyx_t_1);
26833  __Pyx_XDECREF(__pyx_t_2);
26834  __Pyx_XDECREF(__pyx_t_3);
26835  __Pyx_XDECREF(__pyx_t_4);
26836  __Pyx_XDECREF(__pyx_t_5);
26837  __Pyx_XDECREF(__pyx_t_7);
26838  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
26839  __pyx_r = NULL;
26840  __pyx_L0:;
26841  __Pyx_XDECREF(__pyx_v_record_file);
26842  __Pyx_XDECREF(__pyx_v_t_chrono);
26843  __Pyx_XDECREF(__pyx_v_t_last);
26844  __Pyx_XDECREF(__pyx_v_dt_last);
26845  __Pyx_XDECREF(__pyx_v_t);
26846  __Pyx_XDECREF(__pyx_v_t_sim);
26847  __Pyx_XDECREF(__pyx_v_values_towrite);
26848  __Pyx_XDECREF(__pyx_v_headers);
26849  __Pyx_XDECREF(__pyx_v_key);
26850  __Pyx_XDECREF(__pyx_v_csvfile);
26851  __Pyx_XDECREF(__pyx_v_writer);
26852  __Pyx_XDECREF(__pyx_v_val);
26853  __Pyx_XDECREF(__pyx_v_i);
26854  __Pyx_XDECREF(__pyx_v_j);
26855  __Pyx_XGIVEREF(__pyx_r);
26856  __Pyx_TraceReturn(__pyx_r, 0);
26857  __Pyx_RefNannyFinishContext();
26858  return __pyx_r;
26859 }
26860 
26861 /* "mbd/CouplingFSI.pyx":1287
26862  * Profiling.logEvent('finished recording values file of '+str(self.name))
26863  *
26864  * def _recordH5(self): # <<<<<<<<<<<<<<
26865  * Profiling.logEvent('recording h5 file of '+str(self.name))
26866  * tCount = self.ProtChSystem.tCount
26867  */
26868 
26869 /* Python wrapper */
26870 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_107_recordH5(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26871 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_106_recordH5[] = "ProtChBody._recordH5(self)";
26872 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_107_recordH5 = {"_recordH5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_107_recordH5, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_106_recordH5};
26873 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_107_recordH5(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26874  PyObject *__pyx_r = 0;
26875  __Pyx_RefNannyDeclarations
26876  __Pyx_RefNannySetupContext("_recordH5 (wrapper)", 0);
26877  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_106_recordH5(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
26878 
26879  /* function exit code */
26880  __Pyx_RefNannyFinishContext();
26881  return __pyx_r;
26882 }
26883 
26884 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_106_recordH5(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
26885  PyObject *__pyx_v_tCount = NULL;
26886  PyObject *__pyx_v_hdfFileName = NULL;
26887  PyObject *__pyx_v_f = NULL;
26888  PyObject *__pyx_v_poss = NULL;
26889  PyObject *__pyx_v_element_connection = NULL;
26890  PyObject *__pyx_v_pos = NULL;
26891  std::vector<ChVector<double> > ::size_type __pyx_v_i;
26892  PyObject *__pyx_v_dset = NULL;
26893  PyObject *__pyx_r = NULL;
26894  __Pyx_TraceDeclarations
26895  __Pyx_RefNannyDeclarations
26896  PyObject *__pyx_t_1 = NULL;
26897  PyObject *__pyx_t_2 = NULL;
26898  PyObject *__pyx_t_3 = NULL;
26899  PyObject *__pyx_t_4 = NULL;
26900  std::string __pyx_t_5;
26901  PyObject *__pyx_t_6 = NULL;
26902  int __pyx_t_7;
26903  PyObject *__pyx_t_8 = NULL;
26904  int __pyx_t_9;
26905  PyObject *(*__pyx_t_10)(PyObject *);
26906  std::vector<ChVector<double> > ::size_type __pyx_t_11;
26907  std::vector<ChVector<double> > ::size_type __pyx_t_12;
26908  std::vector<ChVector<double> > ::size_type __pyx_t_13;
26909  int __pyx_lineno = 0;
26910  const char *__pyx_filename = NULL;
26911  int __pyx_clineno = 0;
26912  __Pyx_TraceFrameInit(__pyx_codeobj__89)
26913  __Pyx_RefNannySetupContext("_recordH5", 0);
26914  __Pyx_TraceCall("_recordH5", __pyx_f[0], 1287, 0, __PYX_ERR(0, 1287, __pyx_L1_error));
26915 
26916  /* "mbd/CouplingFSI.pyx":1288
26917  *
26918  * def _recordH5(self):
26919  * Profiling.logEvent('recording h5 file of '+str(self.name)) # <<<<<<<<<<<<<<
26920  * tCount = self.ProtChSystem.tCount
26921  * self.hdfFileName = self.name
26922  */
26923  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
26924  __Pyx_GOTREF(__pyx_t_2);
26925  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1288, __pyx_L1_error)
26926  __Pyx_GOTREF(__pyx_t_3);
26927  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26928  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
26929  __Pyx_GOTREF(__pyx_t_2);
26930  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L1_error)
26931  __Pyx_GOTREF(__pyx_t_4);
26932  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26933  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_recording_h5_file_of, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1288, __pyx_L1_error)
26934  __Pyx_GOTREF(__pyx_t_2);
26935  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
26936  __pyx_t_4 = NULL;
26937  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
26938  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
26939  if (likely(__pyx_t_4)) {
26940  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
26941  __Pyx_INCREF(__pyx_t_4);
26942  __Pyx_INCREF(function);
26943  __Pyx_DECREF_SET(__pyx_t_3, function);
26944  }
26945  }
26946  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
26947  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
26948  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26949  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error)
26950  __Pyx_GOTREF(__pyx_t_1);
26951  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26952  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26953 
26954  /* "mbd/CouplingFSI.pyx":1289
26955  * def _recordH5(self):
26956  * Profiling.logEvent('recording h5 file of '+str(self.name))
26957  * tCount = self.ProtChSystem.tCount # <<<<<<<<<<<<<<
26958  * self.hdfFileName = self.name
26959  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
26960  */
26961  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ProtChSystem->tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error)
26962  __Pyx_GOTREF(__pyx_t_1);
26963  __pyx_v_tCount = __pyx_t_1;
26964  __pyx_t_1 = 0;
26965 
26966  /* "mbd/CouplingFSI.pyx":1290
26967  * Profiling.logEvent('recording h5 file of '+str(self.name))
26968  * tCount = self.ProtChSystem.tCount
26969  * self.hdfFileName = self.name # <<<<<<<<<<<<<<
26970  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
26971  * if tCount == 0:
26972  */
26973  __pyx_t_5 = __pyx_v_self->name;
26974  __pyx_v_self->hdfFileName = __pyx_t_5;
26975 
26976  /* "mbd/CouplingFSI.pyx":1291
26977  * tCount = self.ProtChSystem.tCount
26978  * self.hdfFileName = self.name
26979  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5' # <<<<<<<<<<<<<<
26980  * if tCount == 0:
26981  * f = h5py.File(hdfFileName, 'w', libver='latest')
26982  */
26983  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error)
26984  __Pyx_GOTREF(__pyx_t_3);
26985  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
26986  __Pyx_GOTREF(__pyx_t_2);
26987  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26988  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error)
26989  __Pyx_GOTREF(__pyx_t_3);
26990  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26991  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
26992  __Pyx_GOTREF(__pyx_t_2);
26993  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logDir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1291, __pyx_L1_error)
26994  __Pyx_GOTREF(__pyx_t_4);
26995  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26996  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
26997  __Pyx_GOTREF(__pyx_t_2);
26998  __Pyx_GIVEREF(__pyx_t_4);
26999  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
27000  __Pyx_INCREF(__pyx_kp_s_utf_8);
27001  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
27002  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_utf_8);
27003  __pyx_t_4 = 0;
27004  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1291, __pyx_L1_error)
27005  __Pyx_GOTREF(__pyx_t_4);
27006  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27007  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
27008  __Pyx_GOTREF(__pyx_t_2);
27009  __pyx_t_6 = NULL;
27010  __pyx_t_7 = 0;
27011  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
27012  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
27013  if (likely(__pyx_t_6)) {
27014  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
27015  __Pyx_INCREF(__pyx_t_6);
27016  __Pyx_INCREF(function);
27017  __Pyx_DECREF_SET(__pyx_t_3, function);
27018  __pyx_t_7 = 1;
27019  }
27020  }
27021  #if CYTHON_FAST_PYCALL
27022  if (PyFunction_Check(__pyx_t_3)) {
27023  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_2};
27024  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
27025  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27026  __Pyx_GOTREF(__pyx_t_1);
27027  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27028  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27029  } else
27030  #endif
27031  #if CYTHON_FAST_PYCCALL
27032  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
27033  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_2};
27034  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
27035  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
27036  __Pyx_GOTREF(__pyx_t_1);
27037  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27038  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27039  } else
27040  #endif
27041  {
27042  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1291, __pyx_L1_error)
27043  __Pyx_GOTREF(__pyx_t_8);
27044  if (__pyx_t_6) {
27045  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
27046  }
27047  __Pyx_GIVEREF(__pyx_t_4);
27048  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
27049  __Pyx_GIVEREF(__pyx_t_2);
27050  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2);
27051  __pyx_t_4 = 0;
27052  __pyx_t_2 = 0;
27053  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
27054  __Pyx_GOTREF(__pyx_t_1);
27055  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27056  }
27057  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27058  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_b_h5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error)
27059  __Pyx_GOTREF(__pyx_t_3);
27060  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27061  __pyx_v_hdfFileName = __pyx_t_3;
27062  __pyx_t_3 = 0;
27063 
27064  /* "mbd/CouplingFSI.pyx":1292
27065  * self.hdfFileName = self.name
27066  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
27067  * if tCount == 0: # <<<<<<<<<<<<<<
27068  * f = h5py.File(hdfFileName, 'w', libver='latest')
27069  * else:
27070  */
27071  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_tCount, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
27072  __Pyx_GOTREF(__pyx_t_3);
27073  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1292, __pyx_L1_error)
27074  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27075  if (__pyx_t_9) {
27076 
27077  /* "mbd/CouplingFSI.pyx":1293
27078  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
27079  * if tCount == 0:
27080  * f = h5py.File(hdfFileName, 'w', libver='latest') # <<<<<<<<<<<<<<
27081  * else:
27082  * f = h5py.File(hdfFileName, 'a', libver='latest')
27083  */
27084  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_h5py); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error)
27085  __Pyx_GOTREF(__pyx_t_3);
27086  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_File); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
27087  __Pyx_GOTREF(__pyx_t_1);
27088  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27089  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error)
27090  __Pyx_GOTREF(__pyx_t_3);
27091  __Pyx_INCREF(__pyx_v_hdfFileName);
27092  __Pyx_GIVEREF(__pyx_v_hdfFileName);
27093  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_hdfFileName);
27094  __Pyx_INCREF(__pyx_n_s_w);
27095  __Pyx_GIVEREF(__pyx_n_s_w);
27096  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_w);
27097  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1293, __pyx_L1_error)
27098  __Pyx_GOTREF(__pyx_t_8);
27099  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_libver, __pyx_n_s_latest) < 0) __PYX_ERR(0, 1293, __pyx_L1_error)
27100  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error)
27101  __Pyx_GOTREF(__pyx_t_2);
27102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27103  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27104  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27105  __pyx_v_f = __pyx_t_2;
27106  __pyx_t_2 = 0;
27107 
27108  /* "mbd/CouplingFSI.pyx":1292
27109  * self.hdfFileName = self.name
27110  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
27111  * if tCount == 0: # <<<<<<<<<<<<<<
27112  * f = h5py.File(hdfFileName, 'w', libver='latest')
27113  * else:
27114  */
27115  goto __pyx_L3;
27116  }
27117 
27118  /* "mbd/CouplingFSI.pyx":1295
27119  * f = h5py.File(hdfFileName, 'w', libver='latest')
27120  * else:
27121  * f = h5py.File(hdfFileName, 'a', libver='latest') # <<<<<<<<<<<<<<
27122  * poss, element_connection = self.getTriangleMeshInfo()
27123  * pos = np.zeros_like(poss)
27124  */
27125  /*else*/ {
27126  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_h5py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L1_error)
27127  __Pyx_GOTREF(__pyx_t_2);
27128  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_File); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1295, __pyx_L1_error)
27129  __Pyx_GOTREF(__pyx_t_8);
27130  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27131  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L1_error)
27132  __Pyx_GOTREF(__pyx_t_2);
27133  __Pyx_INCREF(__pyx_v_hdfFileName);
27134  __Pyx_GIVEREF(__pyx_v_hdfFileName);
27135  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hdfFileName);
27136  __Pyx_INCREF(__pyx_n_s_a);
27137  __Pyx_GIVEREF(__pyx_n_s_a);
27138  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_a);
27139  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1295, __pyx_L1_error)
27140  __Pyx_GOTREF(__pyx_t_3);
27141  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_libver, __pyx_n_s_latest) < 0) __PYX_ERR(0, 1295, __pyx_L1_error)
27142  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error)
27143  __Pyx_GOTREF(__pyx_t_1);
27144  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27145  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27146  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27147  __pyx_v_f = __pyx_t_1;
27148  __pyx_t_1 = 0;
27149  }
27150  __pyx_L3:;
27151 
27152  /* "mbd/CouplingFSI.pyx":1296
27153  * else:
27154  * f = h5py.File(hdfFileName, 'a', libver='latest')
27155  * poss, element_connection = self.getTriangleMeshInfo() # <<<<<<<<<<<<<<
27156  * pos = np.zeros_like(poss)
27157  * self.thisptr.updateTriangleMeshVisualisationPos()
27158  */
27159  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTriangleMeshInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1296, __pyx_L1_error)
27160  __Pyx_GOTREF(__pyx_t_3);
27161  __pyx_t_2 = NULL;
27162  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
27163  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
27164  if (likely(__pyx_t_2)) {
27165  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
27166  __Pyx_INCREF(__pyx_t_2);
27167  __Pyx_INCREF(function);
27168  __Pyx_DECREF_SET(__pyx_t_3, function);
27169  }
27170  }
27171  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
27172  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27173  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
27174  __Pyx_GOTREF(__pyx_t_1);
27175  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27176  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
27177  PyObject* sequence = __pyx_t_1;
27178  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
27179  if (unlikely(size != 2)) {
27180  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
27181  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
27182  __PYX_ERR(0, 1296, __pyx_L1_error)
27183  }
27184  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27185  if (likely(PyTuple_CheckExact(sequence))) {
27186  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
27187  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
27188  } else {
27189  __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
27190  __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
27191  }
27192  __Pyx_INCREF(__pyx_t_3);
27193  __Pyx_INCREF(__pyx_t_2);
27194  #else
27195  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1296, __pyx_L1_error)
27196  __Pyx_GOTREF(__pyx_t_3);
27197  __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error)
27198  __Pyx_GOTREF(__pyx_t_2);
27199  #endif
27200  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27201  } else {
27202  Py_ssize_t index = -1;
27203  __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1296, __pyx_L1_error)
27204  __Pyx_GOTREF(__pyx_t_8);
27205  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27206  __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext;
27207  index = 0; __pyx_t_3 = __pyx_t_10(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
27208  __Pyx_GOTREF(__pyx_t_3);
27209  index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_8); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
27210  __Pyx_GOTREF(__pyx_t_2);
27211  if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
27212  __pyx_t_10 = NULL;
27213  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27214  goto __pyx_L5_unpacking_done;
27215  __pyx_L4_unpacking_failed:;
27216  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27217  __pyx_t_10 = NULL;
27218  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
27219  __PYX_ERR(0, 1296, __pyx_L1_error)
27220  __pyx_L5_unpacking_done:;
27221  }
27222  __pyx_v_poss = __pyx_t_3;
27223  __pyx_t_3 = 0;
27224  __pyx_v_element_connection = __pyx_t_2;
27225  __pyx_t_2 = 0;
27226 
27227  /* "mbd/CouplingFSI.pyx":1297
27228  * f = h5py.File(hdfFileName, 'a', libver='latest')
27229  * poss, element_connection = self.getTriangleMeshInfo()
27230  * pos = np.zeros_like(poss) # <<<<<<<<<<<<<<
27231  * self.thisptr.updateTriangleMeshVisualisationPos()
27232  * for i in range(self.thisptr.trimesh_pos.size()):
27233  */
27234  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error)
27235  __Pyx_GOTREF(__pyx_t_2);
27236  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros_like); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error)
27237  __Pyx_GOTREF(__pyx_t_3);
27238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27239  __pyx_t_2 = NULL;
27240  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
27241  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
27242  if (likely(__pyx_t_2)) {
27243  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
27244  __Pyx_INCREF(__pyx_t_2);
27245  __Pyx_INCREF(function);
27246  __Pyx_DECREF_SET(__pyx_t_3, function);
27247  }
27248  }
27249  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_poss) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_poss);
27250  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27251  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
27252  __Pyx_GOTREF(__pyx_t_1);
27253  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27254  __pyx_v_pos = __pyx_t_1;
27255  __pyx_t_1 = 0;
27256 
27257  /* "mbd/CouplingFSI.pyx":1298
27258  * poss, element_connection = self.getTriangleMeshInfo()
27259  * pos = np.zeros_like(poss)
27260  * self.thisptr.updateTriangleMeshVisualisationPos() # <<<<<<<<<<<<<<
27261  * for i in range(self.thisptr.trimesh_pos.size()):
27262  * pos[i, 0] = self.thisptr.trimesh_pos[i].x()
27263  */
27264  __pyx_v_self->thisptr->updateTriangleMeshVisualisationPos();
27265 
27266  /* "mbd/CouplingFSI.pyx":1299
27267  * pos = np.zeros_like(poss)
27268  * self.thisptr.updateTriangleMeshVisualisationPos()
27269  * for i in range(self.thisptr.trimesh_pos.size()): # <<<<<<<<<<<<<<
27270  * pos[i, 0] = self.thisptr.trimesh_pos[i].x()
27271  * pos[i, 1] = self.thisptr.trimesh_pos[i].y()
27272  */
27273  __pyx_t_11 = __pyx_v_self->thisptr->trimesh_pos.size();
27274  __pyx_t_12 = __pyx_t_11;
27275  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
27276  __pyx_v_i = __pyx_t_13;
27277 
27278  /* "mbd/CouplingFSI.pyx":1300
27279  * self.thisptr.updateTriangleMeshVisualisationPos()
27280  * for i in range(self.thisptr.trimesh_pos.size()):
27281  * pos[i, 0] = self.thisptr.trimesh_pos[i].x() # <<<<<<<<<<<<<<
27282  * pos[i, 1] = self.thisptr.trimesh_pos[i].y()
27283  * pos[i, 2] = self.thisptr.trimesh_pos[i].z()
27284  */
27285  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->thisptr->trimesh_pos[__pyx_v_i]).x()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error)
27286  __Pyx_GOTREF(__pyx_t_1);
27287  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1300, __pyx_L1_error)
27288  __Pyx_GOTREF(__pyx_t_3);
27289  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error)
27290  __Pyx_GOTREF(__pyx_t_2);
27291  __Pyx_GIVEREF(__pyx_t_3);
27292  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
27293  __Pyx_INCREF(__pyx_int_0);
27294  __Pyx_GIVEREF(__pyx_int_0);
27295  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_0);
27296  __pyx_t_3 = 0;
27297  if (unlikely(PyObject_SetItem(__pyx_v_pos, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 1300, __pyx_L1_error)
27298  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27299  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27300 
27301  /* "mbd/CouplingFSI.pyx":1301
27302  * for i in range(self.thisptr.trimesh_pos.size()):
27303  * pos[i, 0] = self.thisptr.trimesh_pos[i].x()
27304  * pos[i, 1] = self.thisptr.trimesh_pos[i].y() # <<<<<<<<<<<<<<
27305  * pos[i, 2] = self.thisptr.trimesh_pos[i].z()
27306  * dset = f.create_dataset('nodes_t'+str(tCount), pos.shape)
27307  */
27308  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->thisptr->trimesh_pos[__pyx_v_i]).y()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
27309  __Pyx_GOTREF(__pyx_t_1);
27310  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error)
27311  __Pyx_GOTREF(__pyx_t_2);
27312  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1301, __pyx_L1_error)
27313  __Pyx_GOTREF(__pyx_t_3);
27314  __Pyx_GIVEREF(__pyx_t_2);
27315  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
27316  __Pyx_INCREF(__pyx_int_1);
27317  __Pyx_GIVEREF(__pyx_int_1);
27318  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_1);
27319  __pyx_t_2 = 0;
27320  if (unlikely(PyObject_SetItem(__pyx_v_pos, __pyx_t_3, __pyx_t_1) < 0)) __PYX_ERR(0, 1301, __pyx_L1_error)
27321  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27322  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27323 
27324  /* "mbd/CouplingFSI.pyx":1302
27325  * pos[i, 0] = self.thisptr.trimesh_pos[i].x()
27326  * pos[i, 1] = self.thisptr.trimesh_pos[i].y()
27327  * pos[i, 2] = self.thisptr.trimesh_pos[i].z() # <<<<<<<<<<<<<<
27328  * dset = f.create_dataset('nodes_t'+str(tCount), pos.shape)
27329  * dset[...] = pos
27330  */
27331  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->thisptr->trimesh_pos[__pyx_v_i]).z()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
27332  __Pyx_GOTREF(__pyx_t_1);
27333  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L1_error)
27334  __Pyx_GOTREF(__pyx_t_3);
27335  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error)
27336  __Pyx_GOTREF(__pyx_t_2);
27337  __Pyx_GIVEREF(__pyx_t_3);
27338  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
27339  __Pyx_INCREF(__pyx_int_2);
27340  __Pyx_GIVEREF(__pyx_int_2);
27341  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2);
27342  __pyx_t_3 = 0;
27343  if (unlikely(PyObject_SetItem(__pyx_v_pos, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 1302, __pyx_L1_error)
27344  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27345  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27346  }
27347 
27348  /* "mbd/CouplingFSI.pyx":1303
27349  * pos[i, 1] = self.thisptr.trimesh_pos[i].y()
27350  * pos[i, 2] = self.thisptr.trimesh_pos[i].z()
27351  * dset = f.create_dataset('nodes_t'+str(tCount), pos.shape) # <<<<<<<<<<<<<<
27352  * dset[...] = pos
27353  * dset = f.create_dataset('elements_t'+str(tCount), element_connection.shape, dtype='i8')
27354  */
27355  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error)
27356  __Pyx_GOTREF(__pyx_t_2);
27357  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1303, __pyx_L1_error)
27358  __Pyx_GOTREF(__pyx_t_3);
27359  __pyx_t_8 = PyNumber_Add(__pyx_n_s_nodes_t, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1303, __pyx_L1_error)
27360  __Pyx_GOTREF(__pyx_t_8);
27361  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27362  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pos, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1303, __pyx_L1_error)
27363  __Pyx_GOTREF(__pyx_t_3);
27364  __pyx_t_4 = NULL;
27365  __pyx_t_7 = 0;
27366  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
27367  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
27368  if (likely(__pyx_t_4)) {
27369  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
27370  __Pyx_INCREF(__pyx_t_4);
27371  __Pyx_INCREF(function);
27372  __Pyx_DECREF_SET(__pyx_t_2, function);
27373  __pyx_t_7 = 1;
27374  }
27375  }
27376  #if CYTHON_FAST_PYCALL
27377  if (PyFunction_Check(__pyx_t_2)) {
27378  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_3};
27379  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
27380  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27381  __Pyx_GOTREF(__pyx_t_1);
27382  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27383  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27384  } else
27385  #endif
27386  #if CYTHON_FAST_PYCCALL
27387  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
27388  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_3};
27389  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
27390  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27391  __Pyx_GOTREF(__pyx_t_1);
27392  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
27393  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27394  } else
27395  #endif
27396  {
27397  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error)
27398  __Pyx_GOTREF(__pyx_t_6);
27399  if (__pyx_t_4) {
27400  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
27401  }
27402  __Pyx_GIVEREF(__pyx_t_8);
27403  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_8);
27404  __Pyx_GIVEREF(__pyx_t_3);
27405  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_3);
27406  __pyx_t_8 = 0;
27407  __pyx_t_3 = 0;
27408  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
27409  __Pyx_GOTREF(__pyx_t_1);
27410  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27411  }
27412  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27413  __pyx_v_dset = __pyx_t_1;
27414  __pyx_t_1 = 0;
27415 
27416  /* "mbd/CouplingFSI.pyx":1304
27417  * pos[i, 2] = self.thisptr.trimesh_pos[i].z()
27418  * dset = f.create_dataset('nodes_t'+str(tCount), pos.shape)
27419  * dset[...] = pos # <<<<<<<<<<<<<<
27420  * dset = f.create_dataset('elements_t'+str(tCount), element_connection.shape, dtype='i8')
27421  * dset[...] = element_connection
27422  */
27423  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_pos) < 0)) __PYX_ERR(0, 1304, __pyx_L1_error)
27424 
27425  /* "mbd/CouplingFSI.pyx":1305
27426  * dset = f.create_dataset('nodes_t'+str(tCount), pos.shape)
27427  * dset[...] = pos
27428  * dset = f.create_dataset('elements_t'+str(tCount), element_connection.shape, dtype='i8') # <<<<<<<<<<<<<<
27429  * dset[...] = element_connection
27430  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
27431  */
27432  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error)
27433  __Pyx_GOTREF(__pyx_t_1);
27434  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1305, __pyx_L1_error)
27435  __Pyx_GOTREF(__pyx_t_2);
27436  __pyx_t_6 = PyNumber_Add(__pyx_n_s_elements_t, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1305, __pyx_L1_error)
27437  __Pyx_GOTREF(__pyx_t_6);
27438  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27439  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_element_connection, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1305, __pyx_L1_error)
27440  __Pyx_GOTREF(__pyx_t_2);
27441  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1305, __pyx_L1_error)
27442  __Pyx_GOTREF(__pyx_t_3);
27443  __Pyx_GIVEREF(__pyx_t_6);
27444  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
27445  __Pyx_GIVEREF(__pyx_t_2);
27446  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
27447  __pyx_t_6 = 0;
27448  __pyx_t_2 = 0;
27449  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1305, __pyx_L1_error)
27450  __Pyx_GOTREF(__pyx_t_2);
27451  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) __PYX_ERR(0, 1305, __pyx_L1_error)
27452  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1305, __pyx_L1_error)
27453  __Pyx_GOTREF(__pyx_t_6);
27454  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27456  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27457  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_6);
27458  __pyx_t_6 = 0;
27459 
27460  /* "mbd/CouplingFSI.pyx":1306
27461  * dset[...] = pos
27462  * dset = f.create_dataset('elements_t'+str(tCount), element_connection.shape, dtype='i8')
27463  * dset[...] = element_connection # <<<<<<<<<<<<<<
27464  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
27465  *
27466  */
27467  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_element_connection) < 0)) __PYX_ERR(0, 1306, __pyx_L1_error)
27468 
27469  /* "mbd/CouplingFSI.pyx":1307
27470  * dset = f.create_dataset('elements_t'+str(tCount), element_connection.shape, dtype='i8')
27471  * dset[...] = element_connection
27472  * Profiling.logEvent('finished recording h5 file of '+str(self.name)) # <<<<<<<<<<<<<<
27473  *
27474  * def _recordXML(self):
27475  */
27476  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error)
27477  __Pyx_GOTREF(__pyx_t_2);
27478  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1307, __pyx_L1_error)
27479  __Pyx_GOTREF(__pyx_t_3);
27480  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27481  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error)
27482  __Pyx_GOTREF(__pyx_t_2);
27483  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error)
27484  __Pyx_GOTREF(__pyx_t_1);
27485  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27486  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_finished_recording_h5_file_of, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error)
27487  __Pyx_GOTREF(__pyx_t_2);
27488  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27489  __pyx_t_1 = NULL;
27490  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
27491  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
27492  if (likely(__pyx_t_1)) {
27493  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
27494  __Pyx_INCREF(__pyx_t_1);
27495  __Pyx_INCREF(function);
27496  __Pyx_DECREF_SET(__pyx_t_3, function);
27497  }
27498  }
27499  __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
27500  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
27501  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27502  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error)
27503  __Pyx_GOTREF(__pyx_t_6);
27504  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27505  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
27506 
27507  /* "mbd/CouplingFSI.pyx":1287
27508  * Profiling.logEvent('finished recording values file of '+str(self.name))
27509  *
27510  * def _recordH5(self): # <<<<<<<<<<<<<<
27511  * Profiling.logEvent('recording h5 file of '+str(self.name))
27512  * tCount = self.ProtChSystem.tCount
27513  */
27514 
27515  /* function exit code */
27516  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27517  goto __pyx_L0;
27518  __pyx_L1_error:;
27519  __Pyx_XDECREF(__pyx_t_1);
27520  __Pyx_XDECREF(__pyx_t_2);
27521  __Pyx_XDECREF(__pyx_t_3);
27522  __Pyx_XDECREF(__pyx_t_4);
27523  __Pyx_XDECREF(__pyx_t_6);
27524  __Pyx_XDECREF(__pyx_t_8);
27525  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordH5", __pyx_clineno, __pyx_lineno, __pyx_filename);
27526  __pyx_r = NULL;
27527  __pyx_L0:;
27528  __Pyx_XDECREF(__pyx_v_tCount);
27529  __Pyx_XDECREF(__pyx_v_hdfFileName);
27530  __Pyx_XDECREF(__pyx_v_f);
27531  __Pyx_XDECREF(__pyx_v_poss);
27532  __Pyx_XDECREF(__pyx_v_element_connection);
27533  __Pyx_XDECREF(__pyx_v_pos);
27534  __Pyx_XDECREF(__pyx_v_dset);
27535  __Pyx_XGIVEREF(__pyx_r);
27536  __Pyx_TraceReturn(__pyx_r, 0);
27537  __Pyx_RefNannyFinishContext();
27538  return __pyx_r;
27539 }
27540 
27541 /* "mbd/CouplingFSI.pyx":1309
27542  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
27543  *
27544  * def _recordXML(self): # <<<<<<<<<<<<<<
27545  * Profiling.logEvent('recording xml file of '+str(self.name))
27546  * tCount = self.ProtChSystem.tCount
27547  */
27548 
27549 /* Python wrapper */
27550 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_109_recordXML(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
27551 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_108_recordXML[] = "ProtChBody._recordXML(self)";
27552 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_109_recordXML = {"_recordXML", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_109_recordXML, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_108_recordXML};
27553 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_109_recordXML(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
27554  PyObject *__pyx_r = 0;
27555  __Pyx_RefNannyDeclarations
27556  __Pyx_RefNannySetupContext("_recordXML (wrapper)", 0);
27557  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_108_recordXML(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
27558 
27559  /* function exit code */
27560  __Pyx_RefNannyFinishContext();
27561  return __pyx_r;
27562 }
27563 
27564 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_108_recordXML(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
27565  PyObject *__pyx_v_tCount = NULL;
27566  PyObject *__pyx_v_t = NULL;
27567  PyObject *__pyx_v_xmlFile = NULL;
27568  PyObject *__pyx_v_root = NULL;
27569  PyObject *__pyx_v_domain = NULL;
27570  PyObject *__pyx_v_arGridCollection = NULL;
27571  PyObject *__pyx_v_Xdmf_ElementTopology = NULL;
27572  PyObject *__pyx_v_pos = NULL;
27573  PyObject *__pyx_v_el = NULL;
27574  Py_ssize_t __pyx_v_Xdmf_NumberOfElements;
27575  long __pyx_v_Xdmf_NodesPerElement;
27576  PyObject *__pyx_v_dataItemFormat = NULL;
27577  PyObject *__pyx_v_arGrid = NULL;
27578  CYTHON_UNUSED PyObject *__pyx_v_arTime = NULL;
27579  PyObject *__pyx_v_topology = NULL;
27580  PyObject *__pyx_v_elements = NULL;
27581  PyObject *__pyx_v_geometry = NULL;
27582  PyObject *__pyx_v_nodes = NULL;
27583  PyObject *__pyx_v_tree = NULL;
27584  PyObject *__pyx_v_f = NULL;
27585  PyObject *__pyx_v_xmlHeader = NULL;
27586  PyObject *__pyx_v_hdfFileName = NULL;
27587  PyObject *__pyx_v_datav = NULL;
27588  PyObject *__pyx_v_dset = NULL;
27589  PyObject *__pyx_r = NULL;
27590  __Pyx_TraceDeclarations
27591  __Pyx_RefNannyDeclarations
27592  PyObject *__pyx_t_1 = NULL;
27593  PyObject *__pyx_t_2 = NULL;
27594  PyObject *__pyx_t_3 = NULL;
27595  PyObject *__pyx_t_4 = NULL;
27596  PyObject *__pyx_t_5 = NULL;
27597  int __pyx_t_6;
27598  PyObject *__pyx_t_7 = NULL;
27599  PyObject *(*__pyx_t_8)(PyObject *);
27600  Py_ssize_t __pyx_t_9;
27601  PyObject *__pyx_t_10 = NULL;
27602  PyObject *__pyx_t_11 = NULL;
27603  PyObject *__pyx_t_12 = NULL;
27604  PyObject *__pyx_t_13 = NULL;
27605  PyObject *__pyx_t_14 = NULL;
27606  int __pyx_t_15;
27607  int __pyx_t_16;
27608  int __pyx_lineno = 0;
27609  const char *__pyx_filename = NULL;
27610  int __pyx_clineno = 0;
27611  __Pyx_TraceFrameInit(__pyx_codeobj__90)
27612  __Pyx_RefNannySetupContext("_recordXML", 0);
27613  __Pyx_TraceCall("_recordXML", __pyx_f[0], 1309, 0, __PYX_ERR(0, 1309, __pyx_L1_error));
27614 
27615  /* "mbd/CouplingFSI.pyx":1310
27616  *
27617  * def _recordXML(self):
27618  * Profiling.logEvent('recording xml file of '+str(self.name)) # <<<<<<<<<<<<<<
27619  * tCount = self.ProtChSystem.tCount
27620  * t = self.ProtChSystem.ChSystem.GetChTime()
27621  */
27622  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L1_error)
27623  __Pyx_GOTREF(__pyx_t_2);
27624  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L1_error)
27625  __Pyx_GOTREF(__pyx_t_3);
27626  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27627  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L1_error)
27628  __Pyx_GOTREF(__pyx_t_2);
27629  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L1_error)
27630  __Pyx_GOTREF(__pyx_t_4);
27631  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27632  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_recording_xml_file_of, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L1_error)
27633  __Pyx_GOTREF(__pyx_t_2);
27634  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27635  __pyx_t_4 = NULL;
27636  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
27637  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
27638  if (likely(__pyx_t_4)) {
27639  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
27640  __Pyx_INCREF(__pyx_t_4);
27641  __Pyx_INCREF(function);
27642  __Pyx_DECREF_SET(__pyx_t_3, function);
27643  }
27644  }
27645  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
27646  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
27647  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27648  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error)
27649  __Pyx_GOTREF(__pyx_t_1);
27650  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27651  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27652 
27653  /* "mbd/CouplingFSI.pyx":1311
27654  * def _recordXML(self):
27655  * Profiling.logEvent('recording xml file of '+str(self.name))
27656  * tCount = self.ProtChSystem.tCount # <<<<<<<<<<<<<<
27657  * t = self.ProtChSystem.ChSystem.GetChTime()
27658  * xmlFile = os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+'.xmf'
27659  */
27660  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ProtChSystem->tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error)
27661  __Pyx_GOTREF(__pyx_t_1);
27662  __pyx_v_tCount = __pyx_t_1;
27663  __pyx_t_1 = 0;
27664 
27665  /* "mbd/CouplingFSI.pyx":1312
27666  * Profiling.logEvent('recording xml file of '+str(self.name))
27667  * tCount = self.ProtChSystem.tCount
27668  * t = self.ProtChSystem.ChSystem.GetChTime() # <<<<<<<<<<<<<<
27669  * xmlFile = os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+'.xmf'
27670  * # if tCount == 0:
27671  */
27672  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L1_error)
27673  __Pyx_GOTREF(__pyx_t_3);
27674  __pyx_t_2 = NULL;
27675  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
27676  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
27677  if (likely(__pyx_t_2)) {
27678  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
27679  __Pyx_INCREF(__pyx_t_2);
27680  __Pyx_INCREF(function);
27681  __Pyx_DECREF_SET(__pyx_t_3, function);
27682  }
27683  }
27684  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
27685  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27686  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error)
27687  __Pyx_GOTREF(__pyx_t_1);
27688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27689  __pyx_v_t = __pyx_t_1;
27690  __pyx_t_1 = 0;
27691 
27692  /* "mbd/CouplingFSI.pyx":1313
27693  * tCount = self.ProtChSystem.tCount
27694  * t = self.ProtChSystem.ChSystem.GetChTime()
27695  * xmlFile = os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+'.xmf' # <<<<<<<<<<<<<<
27696  * # if tCount == 0:
27697  * root = ET.Element("Xdmf",
27698  */
27699  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
27700  __Pyx_GOTREF(__pyx_t_3);
27701  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
27702  __Pyx_GOTREF(__pyx_t_2);
27703  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27704  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
27705  __Pyx_GOTREF(__pyx_t_3);
27706  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27707  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
27708  __Pyx_GOTREF(__pyx_t_2);
27709  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logDir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error)
27710  __Pyx_GOTREF(__pyx_t_4);
27711  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27712  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
27713  __Pyx_GOTREF(__pyx_t_2);
27714  __Pyx_GIVEREF(__pyx_t_4);
27715  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
27716  __Pyx_INCREF(__pyx_kp_s_utf_8);
27717  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
27718  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_utf_8);
27719  __pyx_t_4 = 0;
27720  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error)
27721  __Pyx_GOTREF(__pyx_t_4);
27722  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27723  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
27724  __Pyx_GOTREF(__pyx_t_2);
27725  __pyx_t_5 = NULL;
27726  __pyx_t_6 = 0;
27727  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
27728  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
27729  if (likely(__pyx_t_5)) {
27730  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
27731  __Pyx_INCREF(__pyx_t_5);
27732  __Pyx_INCREF(function);
27733  __Pyx_DECREF_SET(__pyx_t_3, function);
27734  __pyx_t_6 = 1;
27735  }
27736  }
27737  #if CYTHON_FAST_PYCALL
27738  if (PyFunction_Check(__pyx_t_3)) {
27739  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2};
27740  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
27741  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
27742  __Pyx_GOTREF(__pyx_t_1);
27743  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27744  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27745  } else
27746  #endif
27747  #if CYTHON_FAST_PYCCALL
27748  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
27749  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2};
27750  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
27751  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
27752  __Pyx_GOTREF(__pyx_t_1);
27753  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27754  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27755  } else
27756  #endif
27757  {
27758  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1313, __pyx_L1_error)
27759  __Pyx_GOTREF(__pyx_t_7);
27760  if (__pyx_t_5) {
27761  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
27762  }
27763  __Pyx_GIVEREF(__pyx_t_4);
27764  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
27765  __Pyx_GIVEREF(__pyx_t_2);
27766  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
27767  __pyx_t_4 = 0;
27768  __pyx_t_2 = 0;
27769  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
27770  __Pyx_GOTREF(__pyx_t_1);
27771  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27772  }
27773  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27774  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_xmf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
27775  __Pyx_GOTREF(__pyx_t_3);
27776  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27777  __pyx_v_xmlFile = __pyx_t_3;
27778  __pyx_t_3 = 0;
27779 
27780  /* "mbd/CouplingFSI.pyx":1315
27781  * xmlFile = os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+'.xmf'
27782  * # if tCount == 0:
27783  * root = ET.Element("Xdmf", # <<<<<<<<<<<<<<
27784  * {"Version": "2.0",
27785  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
27786  */
27787  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error)
27788  __Pyx_GOTREF(__pyx_t_1);
27789  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L1_error)
27790  __Pyx_GOTREF(__pyx_t_7);
27791  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27792 
27793  /* "mbd/CouplingFSI.pyx":1316
27794  * # if tCount == 0:
27795  * root = ET.Element("Xdmf",
27796  * {"Version": "2.0", # <<<<<<<<<<<<<<
27797  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
27798  * domain = ET.SubElement(root, "Domain")
27799  */
27800  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error)
27801  __Pyx_GOTREF(__pyx_t_1);
27802  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Version, __pyx_kp_s_2_0) < 0) __PYX_ERR(0, 1316, __pyx_L1_error)
27803  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_xmlns_xi, __pyx_kp_s_http_www_w3_org_2001_XInclude) < 0) __PYX_ERR(0, 1316, __pyx_L1_error)
27804  __pyx_t_2 = NULL;
27805  __pyx_t_6 = 0;
27806  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
27807  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
27808  if (likely(__pyx_t_2)) {
27809  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
27810  __Pyx_INCREF(__pyx_t_2);
27811  __Pyx_INCREF(function);
27812  __Pyx_DECREF_SET(__pyx_t_7, function);
27813  __pyx_t_6 = 1;
27814  }
27815  }
27816  #if CYTHON_FAST_PYCALL
27817  if (PyFunction_Check(__pyx_t_7)) {
27818  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_Xdmf, __pyx_t_1};
27819  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error)
27820  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27821  __Pyx_GOTREF(__pyx_t_3);
27822  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27823  } else
27824  #endif
27825  #if CYTHON_FAST_PYCCALL
27826  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
27827  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_Xdmf, __pyx_t_1};
27828  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error)
27829  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
27830  __Pyx_GOTREF(__pyx_t_3);
27831  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27832  } else
27833  #endif
27834  {
27835  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1315, __pyx_L1_error)
27836  __Pyx_GOTREF(__pyx_t_4);
27837  if (__pyx_t_2) {
27838  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
27839  }
27840  __Pyx_INCREF(__pyx_n_s_Xdmf);
27841  __Pyx_GIVEREF(__pyx_n_s_Xdmf);
27842  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_n_s_Xdmf);
27843  __Pyx_GIVEREF(__pyx_t_1);
27844  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_1);
27845  __pyx_t_1 = 0;
27846  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1315, __pyx_L1_error)
27847  __Pyx_GOTREF(__pyx_t_3);
27848  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27849  }
27850  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27851  __pyx_v_root = __pyx_t_3;
27852  __pyx_t_3 = 0;
27853 
27854  /* "mbd/CouplingFSI.pyx":1318
27855  * {"Version": "2.0",
27856  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
27857  * domain = ET.SubElement(root, "Domain") # <<<<<<<<<<<<<<
27858  * arGridCollection = ET.SubElement(domain,
27859  * "Grid",
27860  */
27861  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ET); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1318, __pyx_L1_error)
27862  __Pyx_GOTREF(__pyx_t_7);
27863  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1318, __pyx_L1_error)
27864  __Pyx_GOTREF(__pyx_t_4);
27865  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27866  __pyx_t_7 = NULL;
27867  __pyx_t_6 = 0;
27868  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
27869  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
27870  if (likely(__pyx_t_7)) {
27871  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
27872  __Pyx_INCREF(__pyx_t_7);
27873  __Pyx_INCREF(function);
27874  __Pyx_DECREF_SET(__pyx_t_4, function);
27875  __pyx_t_6 = 1;
27876  }
27877  }
27878  #if CYTHON_FAST_PYCALL
27879  if (PyFunction_Check(__pyx_t_4)) {
27880  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_root, __pyx_n_s_Domain};
27881  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error)
27882  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
27883  __Pyx_GOTREF(__pyx_t_3);
27884  } else
27885  #endif
27886  #if CYTHON_FAST_PYCCALL
27887  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
27888  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_root, __pyx_n_s_Domain};
27889  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error)
27890  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
27891  __Pyx_GOTREF(__pyx_t_3);
27892  } else
27893  #endif
27894  {
27895  __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
27896  __Pyx_GOTREF(__pyx_t_1);
27897  if (__pyx_t_7) {
27898  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
27899  }
27900  __Pyx_INCREF(__pyx_v_root);
27901  __Pyx_GIVEREF(__pyx_v_root);
27902  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_root);
27903  __Pyx_INCREF(__pyx_n_s_Domain);
27904  __Pyx_GIVEREF(__pyx_n_s_Domain);
27905  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_n_s_Domain);
27906  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error)
27907  __Pyx_GOTREF(__pyx_t_3);
27908  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27909  }
27910  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27911  __pyx_v_domain = __pyx_t_3;
27912  __pyx_t_3 = 0;
27913 
27914  /* "mbd/CouplingFSI.pyx":1319
27915  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
27916  * domain = ET.SubElement(root, "Domain")
27917  * arGridCollection = ET.SubElement(domain, # <<<<<<<<<<<<<<
27918  * "Grid",
27919  * {"Name": "Mesh"+" Spatial_Domain",
27920  */
27921  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1319, __pyx_L1_error)
27922  __Pyx_GOTREF(__pyx_t_4);
27923  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error)
27924  __Pyx_GOTREF(__pyx_t_1);
27925  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27926 
27927  /* "mbd/CouplingFSI.pyx":1321
27928  * arGridCollection = ET.SubElement(domain,
27929  * "Grid",
27930  * {"Name": "Mesh"+" Spatial_Domain", # <<<<<<<<<<<<<<
27931  * "GridType": "Collection",
27932  * "CollectionType": "Temporal"})
27933  */
27934  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1321, __pyx_L1_error)
27935  __Pyx_GOTREF(__pyx_t_4);
27936  __pyx_t_7 = PyNumber_Add(__pyx_n_s_Mesh, __pyx_kp_s_Spatial_Domain); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1321, __pyx_L1_error)
27937  __Pyx_GOTREF(__pyx_t_7);
27938  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Name, __pyx_t_7) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
27939  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27940  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_GridType, __pyx_n_s_Collection) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
27941  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_CollectionType, __pyx_n_s_Temporal) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
27942  __pyx_t_7 = NULL;
27943  __pyx_t_6 = 0;
27944  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
27945  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
27946  if (likely(__pyx_t_7)) {
27947  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
27948  __Pyx_INCREF(__pyx_t_7);
27949  __Pyx_INCREF(function);
27950  __Pyx_DECREF_SET(__pyx_t_1, function);
27951  __pyx_t_6 = 1;
27952  }
27953  }
27954  #if CYTHON_FAST_PYCALL
27955  if (PyFunction_Check(__pyx_t_1)) {
27956  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_domain, __pyx_n_s_Grid, __pyx_t_4};
27957  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error)
27958  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
27959  __Pyx_GOTREF(__pyx_t_3);
27960  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27961  } else
27962  #endif
27963  #if CYTHON_FAST_PYCCALL
27964  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
27965  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_domain, __pyx_n_s_Grid, __pyx_t_4};
27966  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error)
27967  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
27968  __Pyx_GOTREF(__pyx_t_3);
27969  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27970  } else
27971  #endif
27972  {
27973  __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error)
27974  __Pyx_GOTREF(__pyx_t_2);
27975  if (__pyx_t_7) {
27976  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
27977  }
27978  __Pyx_INCREF(__pyx_v_domain);
27979  __Pyx_GIVEREF(__pyx_v_domain);
27980  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_domain);
27981  __Pyx_INCREF(__pyx_n_s_Grid);
27982  __Pyx_GIVEREF(__pyx_n_s_Grid);
27983  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_n_s_Grid);
27984  __Pyx_GIVEREF(__pyx_t_4);
27985  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_t_4);
27986  __pyx_t_4 = 0;
27987  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1319, __pyx_L1_error)
27988  __Pyx_GOTREF(__pyx_t_3);
27989  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
27990  }
27991  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27992  __pyx_v_arGridCollection = __pyx_t_3;
27993  __pyx_t_3 = 0;
27994 
27995  /* "mbd/CouplingFSI.pyx":1329
27996  * # domain = root[0]
27997  * # arGridCollection = domain[0]
27998  * Xdmf_ElementTopology = "Triangle" # <<<<<<<<<<<<<<
27999  * pos, el = self.getTriangleMeshInfo()
28000  * Xdmf_NumberOfElements= len(el)
28001  */
28002  __Pyx_INCREF(__pyx_n_s_Triangle);
28003  __pyx_v_Xdmf_ElementTopology = __pyx_n_s_Triangle;
28004 
28005  /* "mbd/CouplingFSI.pyx":1330
28006  * # arGridCollection = domain[0]
28007  * Xdmf_ElementTopology = "Triangle"
28008  * pos, el = self.getTriangleMeshInfo() # <<<<<<<<<<<<<<
28009  * Xdmf_NumberOfElements= len(el)
28010  * Xdmf_NodesPerElement = 3
28011  */
28012  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTriangleMeshInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error)
28013  __Pyx_GOTREF(__pyx_t_1);
28014  __pyx_t_2 = NULL;
28015  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
28016  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
28017  if (likely(__pyx_t_2)) {
28018  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
28019  __Pyx_INCREF(__pyx_t_2);
28020  __Pyx_INCREF(function);
28021  __Pyx_DECREF_SET(__pyx_t_1, function);
28022  }
28023  }
28024  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
28025  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28026  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1330, __pyx_L1_error)
28027  __Pyx_GOTREF(__pyx_t_3);
28028  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28029  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
28030  PyObject* sequence = __pyx_t_3;
28031  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
28032  if (unlikely(size != 2)) {
28033  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
28034  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
28035  __PYX_ERR(0, 1330, __pyx_L1_error)
28036  }
28037  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
28038  if (likely(PyTuple_CheckExact(sequence))) {
28039  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
28040  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
28041  } else {
28042  __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
28043  __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
28044  }
28045  __Pyx_INCREF(__pyx_t_1);
28046  __Pyx_INCREF(__pyx_t_2);
28047  #else
28048  __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error)
28049  __Pyx_GOTREF(__pyx_t_1);
28050  __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error)
28051  __Pyx_GOTREF(__pyx_t_2);
28052  #endif
28053  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28054  } else {
28055  Py_ssize_t index = -1;
28056  __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L1_error)
28057  __Pyx_GOTREF(__pyx_t_4);
28058  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28059  __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
28060  index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
28061  __Pyx_GOTREF(__pyx_t_1);
28062  index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
28063  __Pyx_GOTREF(__pyx_t_2);
28064  if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1330, __pyx_L1_error)
28065  __pyx_t_8 = NULL;
28066  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28067  goto __pyx_L4_unpacking_done;
28068  __pyx_L3_unpacking_failed:;
28069  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28070  __pyx_t_8 = NULL;
28071  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
28072  __PYX_ERR(0, 1330, __pyx_L1_error)
28073  __pyx_L4_unpacking_done:;
28074  }
28075  __pyx_v_pos = __pyx_t_1;
28076  __pyx_t_1 = 0;
28077  __pyx_v_el = __pyx_t_2;
28078  __pyx_t_2 = 0;
28079 
28080  /* "mbd/CouplingFSI.pyx":1331
28081  * Xdmf_ElementTopology = "Triangle"
28082  * pos, el = self.getTriangleMeshInfo()
28083  * Xdmf_NumberOfElements= len(el) # <<<<<<<<<<<<<<
28084  * Xdmf_NodesPerElement = 3
28085  * dataItemFormat = "HDF"
28086  */
28087  __pyx_t_9 = PyObject_Length(__pyx_v_el); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1331, __pyx_L1_error)
28088  __pyx_v_Xdmf_NumberOfElements = __pyx_t_9;
28089 
28090  /* "mbd/CouplingFSI.pyx":1332
28091  * pos, el = self.getTriangleMeshInfo()
28092  * Xdmf_NumberOfElements= len(el)
28093  * Xdmf_NodesPerElement = 3 # <<<<<<<<<<<<<<
28094  * dataItemFormat = "HDF"
28095  *
28096  */
28097  __pyx_v_Xdmf_NodesPerElement = 3;
28098 
28099  /* "mbd/CouplingFSI.pyx":1333
28100  * Xdmf_NumberOfElements= len(el)
28101  * Xdmf_NodesPerElement = 3
28102  * dataItemFormat = "HDF" # <<<<<<<<<<<<<<
28103  *
28104  * arGrid = ET.SubElement(arGridCollection,
28105  */
28106  __Pyx_INCREF(__pyx_n_s_HDF);
28107  __pyx_v_dataItemFormat = __pyx_n_s_HDF;
28108 
28109  /* "mbd/CouplingFSI.pyx":1335
28110  * dataItemFormat = "HDF"
28111  *
28112  * arGrid = ET.SubElement(arGridCollection, # <<<<<<<<<<<<<<
28113  * "Grid",
28114  * {"GridType": "Uniform"})
28115  */
28116  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
28117  __Pyx_GOTREF(__pyx_t_2);
28118  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
28119  __Pyx_GOTREF(__pyx_t_1);
28120  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28121 
28122  /* "mbd/CouplingFSI.pyx":1337
28123  * arGrid = ET.SubElement(arGridCollection,
28124  * "Grid",
28125  * {"GridType": "Uniform"}) # <<<<<<<<<<<<<<
28126  * arTime = ET.SubElement(arGrid,
28127  * "Time",
28128  */
28129  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1337, __pyx_L1_error)
28130  __Pyx_GOTREF(__pyx_t_2);
28131  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_GridType, __pyx_n_s_Uniform) < 0) __PYX_ERR(0, 1337, __pyx_L1_error)
28132  __pyx_t_4 = NULL;
28133  __pyx_t_6 = 0;
28134  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
28135  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
28136  if (likely(__pyx_t_4)) {
28137  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
28138  __Pyx_INCREF(__pyx_t_4);
28139  __Pyx_INCREF(function);
28140  __Pyx_DECREF_SET(__pyx_t_1, function);
28141  __pyx_t_6 = 1;
28142  }
28143  }
28144  #if CYTHON_FAST_PYCALL
28145  if (PyFunction_Check(__pyx_t_1)) {
28146  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGridCollection, __pyx_n_s_Grid, __pyx_t_2};
28147  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error)
28148  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
28149  __Pyx_GOTREF(__pyx_t_3);
28150  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28151  } else
28152  #endif
28153  #if CYTHON_FAST_PYCCALL
28154  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
28155  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGridCollection, __pyx_n_s_Grid, __pyx_t_2};
28156  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error)
28157  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
28158  __Pyx_GOTREF(__pyx_t_3);
28159  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28160  } else
28161  #endif
28162  {
28163  __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1335, __pyx_L1_error)
28164  __Pyx_GOTREF(__pyx_t_7);
28165  if (__pyx_t_4) {
28166  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
28167  }
28168  __Pyx_INCREF(__pyx_v_arGridCollection);
28169  __Pyx_GIVEREF(__pyx_v_arGridCollection);
28170  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_arGridCollection);
28171  __Pyx_INCREF(__pyx_n_s_Grid);
28172  __Pyx_GIVEREF(__pyx_n_s_Grid);
28173  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_n_s_Grid);
28174  __Pyx_GIVEREF(__pyx_t_2);
28175  PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_2);
28176  __pyx_t_2 = 0;
28177  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error)
28178  __Pyx_GOTREF(__pyx_t_3);
28179  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28180  }
28181  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28182  __pyx_v_arGrid = __pyx_t_3;
28183  __pyx_t_3 = 0;
28184 
28185  /* "mbd/CouplingFSI.pyx":1338
28186  * "Grid",
28187  * {"GridType": "Uniform"})
28188  * arTime = ET.SubElement(arGrid, # <<<<<<<<<<<<<<
28189  * "Time",
28190  * {"Value": str(t),
28191  */
28192  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error)
28193  __Pyx_GOTREF(__pyx_t_1);
28194  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1338, __pyx_L1_error)
28195  __Pyx_GOTREF(__pyx_t_7);
28196  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28197 
28198  /* "mbd/CouplingFSI.pyx":1340
28199  * arTime = ET.SubElement(arGrid,
28200  * "Time",
28201  * {"Value": str(t), # <<<<<<<<<<<<<<
28202  * "Name": str(tCount)})
28203  * topology = ET.SubElement(arGrid,
28204  */
28205  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L1_error)
28206  __Pyx_GOTREF(__pyx_t_1);
28207  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_t); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error)
28208  __Pyx_GOTREF(__pyx_t_2);
28209  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Value, __pyx_t_2) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
28210  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28211 
28212  /* "mbd/CouplingFSI.pyx":1341
28213  * "Time",
28214  * {"Value": str(t),
28215  * "Name": str(tCount)}) # <<<<<<<<<<<<<<
28216  * topology = ET.SubElement(arGrid,
28217  * "Topology",
28218  */
28219  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error)
28220  __Pyx_GOTREF(__pyx_t_2);
28221  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Name, __pyx_t_2) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
28222  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28223  __pyx_t_2 = NULL;
28224  __pyx_t_6 = 0;
28225  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
28226  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
28227  if (likely(__pyx_t_2)) {
28228  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
28229  __Pyx_INCREF(__pyx_t_2);
28230  __Pyx_INCREF(function);
28231  __Pyx_DECREF_SET(__pyx_t_7, function);
28232  __pyx_t_6 = 1;
28233  }
28234  }
28235  #if CYTHON_FAST_PYCALL
28236  if (PyFunction_Check(__pyx_t_7)) {
28237  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_arGrid, __pyx_n_s_Time, __pyx_t_1};
28238  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error)
28239  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28240  __Pyx_GOTREF(__pyx_t_3);
28241  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28242  } else
28243  #endif
28244  #if CYTHON_FAST_PYCCALL
28245  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
28246  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_arGrid, __pyx_n_s_Time, __pyx_t_1};
28247  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error)
28248  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28249  __Pyx_GOTREF(__pyx_t_3);
28250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28251  } else
28252  #endif
28253  {
28254  __pyx_t_4 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1338, __pyx_L1_error)
28255  __Pyx_GOTREF(__pyx_t_4);
28256  if (__pyx_t_2) {
28257  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
28258  }
28259  __Pyx_INCREF(__pyx_v_arGrid);
28260  __Pyx_GIVEREF(__pyx_v_arGrid);
28261  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_arGrid);
28262  __Pyx_INCREF(__pyx_n_s_Time);
28263  __Pyx_GIVEREF(__pyx_n_s_Time);
28264  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_n_s_Time);
28265  __Pyx_GIVEREF(__pyx_t_1);
28266  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_6, __pyx_t_1);
28267  __pyx_t_1 = 0;
28268  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error)
28269  __Pyx_GOTREF(__pyx_t_3);
28270  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28271  }
28272  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28273  __pyx_v_arTime = __pyx_t_3;
28274  __pyx_t_3 = 0;
28275 
28276  /* "mbd/CouplingFSI.pyx":1342
28277  * {"Value": str(t),
28278  * "Name": str(tCount)})
28279  * topology = ET.SubElement(arGrid, # <<<<<<<<<<<<<<
28280  * "Topology",
28281  * {"Type": Xdmf_ElementTopology,
28282  */
28283  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ET); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1342, __pyx_L1_error)
28284  __Pyx_GOTREF(__pyx_t_7);
28285  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1342, __pyx_L1_error)
28286  __Pyx_GOTREF(__pyx_t_4);
28287  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28288 
28289  /* "mbd/CouplingFSI.pyx":1344
28290  * topology = ET.SubElement(arGrid,
28291  * "Topology",
28292  * {"Type": Xdmf_ElementTopology, # <<<<<<<<<<<<<<
28293  * "NumberOfElements": str(Xdmf_NumberOfElements)})
28294  *
28295  */
28296  __pyx_t_7 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1344, __pyx_L1_error)
28297  __Pyx_GOTREF(__pyx_t_7);
28298  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_Type, __pyx_v_Xdmf_ElementTopology) < 0) __PYX_ERR(0, 1344, __pyx_L1_error)
28299 
28300  /* "mbd/CouplingFSI.pyx":1345
28301  * "Topology",
28302  * {"Type": Xdmf_ElementTopology,
28303  * "NumberOfElements": str(Xdmf_NumberOfElements)}) # <<<<<<<<<<<<<<
28304  *
28305  * elements = ET.SubElement(topology,
28306  */
28307  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_Xdmf_NumberOfElements); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
28308  __Pyx_GOTREF(__pyx_t_1);
28309  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1345, __pyx_L1_error)
28310  __Pyx_GOTREF(__pyx_t_2);
28311  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28312  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_NumberOfElements, __pyx_t_2) < 0) __PYX_ERR(0, 1344, __pyx_L1_error)
28313  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28314  __pyx_t_2 = NULL;
28315  __pyx_t_6 = 0;
28316  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
28317  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
28318  if (likely(__pyx_t_2)) {
28319  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
28320  __Pyx_INCREF(__pyx_t_2);
28321  __Pyx_INCREF(function);
28322  __Pyx_DECREF_SET(__pyx_t_4, function);
28323  __pyx_t_6 = 1;
28324  }
28325  }
28326  #if CYTHON_FAST_PYCALL
28327  if (PyFunction_Check(__pyx_t_4)) {
28328  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_arGrid, __pyx_n_s_Topology, __pyx_t_7};
28329  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
28330  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28331  __Pyx_GOTREF(__pyx_t_3);
28332  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28333  } else
28334  #endif
28335  #if CYTHON_FAST_PYCCALL
28336  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
28337  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_arGrid, __pyx_n_s_Topology, __pyx_t_7};
28338  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
28339  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28340  __Pyx_GOTREF(__pyx_t_3);
28341  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28342  } else
28343  #endif
28344  {
28345  __pyx_t_1 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
28346  __Pyx_GOTREF(__pyx_t_1);
28347  if (__pyx_t_2) {
28348  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
28349  }
28350  __Pyx_INCREF(__pyx_v_arGrid);
28351  __Pyx_GIVEREF(__pyx_v_arGrid);
28352  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_arGrid);
28353  __Pyx_INCREF(__pyx_n_s_Topology);
28354  __Pyx_GIVEREF(__pyx_n_s_Topology);
28355  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_n_s_Topology);
28356  __Pyx_GIVEREF(__pyx_t_7);
28357  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_6, __pyx_t_7);
28358  __pyx_t_7 = 0;
28359  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error)
28360  __Pyx_GOTREF(__pyx_t_3);
28361  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28362  }
28363  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28364  __pyx_v_topology = __pyx_t_3;
28365  __pyx_t_3 = 0;
28366 
28367  /* "mbd/CouplingFSI.pyx":1347
28368  * "NumberOfElements": str(Xdmf_NumberOfElements)})
28369  *
28370  * elements = ET.SubElement(topology, # <<<<<<<<<<<<<<
28371  * "DataItem",
28372  * {"Format": dataItemFormat,
28373  */
28374  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1347, __pyx_L1_error)
28375  __Pyx_GOTREF(__pyx_t_4);
28376  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error)
28377  __Pyx_GOTREF(__pyx_t_1);
28378  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28379 
28380  /* "mbd/CouplingFSI.pyx":1349
28381  * elements = ET.SubElement(topology,
28382  * "DataItem",
28383  * {"Format": dataItemFormat, # <<<<<<<<<<<<<<
28384  * "DataType": "UInt",
28385  * "Dimensions": "%i %i" % (Xdmf_NumberOfElements,
28386  */
28387  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1349, __pyx_L1_error)
28388  __Pyx_GOTREF(__pyx_t_4);
28389  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Format, __pyx_v_dataItemFormat) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)
28390  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_DataType, __pyx_n_s_UInt) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)
28391 
28392  /* "mbd/CouplingFSI.pyx":1351
28393  * {"Format": dataItemFormat,
28394  * "DataType": "UInt",
28395  * "Dimensions": "%i %i" % (Xdmf_NumberOfElements, # <<<<<<<<<<<<<<
28396  * Xdmf_NodesPerElement)})
28397  * elements.text = self.hdfFileName+".h5:/elementsSpatial_Domain"+str(tCount)
28398  */
28399  __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_Xdmf_NumberOfElements); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1351, __pyx_L1_error)
28400  __Pyx_GOTREF(__pyx_t_7);
28401 
28402  /* "mbd/CouplingFSI.pyx":1352
28403  * "DataType": "UInt",
28404  * "Dimensions": "%i %i" % (Xdmf_NumberOfElements,
28405  * Xdmf_NodesPerElement)}) # <<<<<<<<<<<<<<
28406  * elements.text = self.hdfFileName+".h5:/elementsSpatial_Domain"+str(tCount)
28407  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"})
28408  */
28409  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_Xdmf_NodesPerElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error)
28410  __Pyx_GOTREF(__pyx_t_2);
28411 
28412  /* "mbd/CouplingFSI.pyx":1351
28413  * {"Format": dataItemFormat,
28414  * "DataType": "UInt",
28415  * "Dimensions": "%i %i" % (Xdmf_NumberOfElements, # <<<<<<<<<<<<<<
28416  * Xdmf_NodesPerElement)})
28417  * elements.text = self.hdfFileName+".h5:/elementsSpatial_Domain"+str(tCount)
28418  */
28419  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1351, __pyx_L1_error)
28420  __Pyx_GOTREF(__pyx_t_5);
28421  __Pyx_GIVEREF(__pyx_t_7);
28422  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
28423  __Pyx_GIVEREF(__pyx_t_2);
28424  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
28425  __pyx_t_7 = 0;
28426  __pyx_t_2 = 0;
28427  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_i_i, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error)
28428  __Pyx_GOTREF(__pyx_t_2);
28429  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28430  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Dimensions, __pyx_t_2) < 0) __PYX_ERR(0, 1349, __pyx_L1_error)
28431  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28432  __pyx_t_2 = NULL;
28433  __pyx_t_6 = 0;
28434  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
28435  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
28436  if (likely(__pyx_t_2)) {
28437  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
28438  __Pyx_INCREF(__pyx_t_2);
28439  __Pyx_INCREF(function);
28440  __Pyx_DECREF_SET(__pyx_t_1, function);
28441  __pyx_t_6 = 1;
28442  }
28443  }
28444  #if CYTHON_FAST_PYCALL
28445  if (PyFunction_Check(__pyx_t_1)) {
28446  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_topology, __pyx_n_s_DataItem, __pyx_t_4};
28447  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1347, __pyx_L1_error)
28448  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28449  __Pyx_GOTREF(__pyx_t_3);
28450  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28451  } else
28452  #endif
28453  #if CYTHON_FAST_PYCCALL
28454  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
28455  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_topology, __pyx_n_s_DataItem, __pyx_t_4};
28456  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1347, __pyx_L1_error)
28457  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28458  __Pyx_GOTREF(__pyx_t_3);
28459  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
28460  } else
28461  #endif
28462  {
28463  __pyx_t_5 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1347, __pyx_L1_error)
28464  __Pyx_GOTREF(__pyx_t_5);
28465  if (__pyx_t_2) {
28466  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
28467  }
28468  __Pyx_INCREF(__pyx_v_topology);
28469  __Pyx_GIVEREF(__pyx_v_topology);
28470  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_6, __pyx_v_topology);
28471  __Pyx_INCREF(__pyx_n_s_DataItem);
28472  __Pyx_GIVEREF(__pyx_n_s_DataItem);
28473  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_6, __pyx_n_s_DataItem);
28474  __Pyx_GIVEREF(__pyx_t_4);
28475  PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_6, __pyx_t_4);
28476  __pyx_t_4 = 0;
28477  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1347, __pyx_L1_error)
28478  __Pyx_GOTREF(__pyx_t_3);
28479  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28480  }
28481  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28482  __pyx_v_elements = __pyx_t_3;
28483  __pyx_t_3 = 0;
28484 
28485  /* "mbd/CouplingFSI.pyx":1353
28486  * "Dimensions": "%i %i" % (Xdmf_NumberOfElements,
28487  * Xdmf_NodesPerElement)})
28488  * elements.text = self.hdfFileName+".h5:/elementsSpatial_Domain"+str(tCount) # <<<<<<<<<<<<<<
28489  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"})
28490  * nodes = ET.SubElement(geometry,
28491  */
28492  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
28493  __Pyx_GOTREF(__pyx_t_3);
28494  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_kp_s_h5_elementsSpatial_Domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
28495  __Pyx_GOTREF(__pyx_t_1);
28496  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28497  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error)
28498  __Pyx_GOTREF(__pyx_t_3);
28499  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __pyx_L1_error)
28500  __Pyx_GOTREF(__pyx_t_5);
28501  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28503  if (__Pyx_PyObject_SetAttrStr(__pyx_v_elements, __pyx_n_s_text, __pyx_t_5) < 0) __PYX_ERR(0, 1353, __pyx_L1_error)
28504  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28505 
28506  /* "mbd/CouplingFSI.pyx":1354
28507  * Xdmf_NodesPerElement)})
28508  * elements.text = self.hdfFileName+".h5:/elementsSpatial_Domain"+str(tCount)
28509  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"}) # <<<<<<<<<<<<<<
28510  * nodes = ET.SubElement(geometry,
28511  * "DataItem",
28512  */
28513  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ET); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1354, __pyx_L1_error)
28514  __Pyx_GOTREF(__pyx_t_3);
28515  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
28516  __Pyx_GOTREF(__pyx_t_1);
28517  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28518  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1354, __pyx_L1_error)
28519  __Pyx_GOTREF(__pyx_t_3);
28520  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_Type, __pyx_n_s_XYZ) < 0) __PYX_ERR(0, 1354, __pyx_L1_error)
28521  __pyx_t_4 = NULL;
28522  __pyx_t_6 = 0;
28523  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
28524  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
28525  if (likely(__pyx_t_4)) {
28526  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
28527  __Pyx_INCREF(__pyx_t_4);
28528  __Pyx_INCREF(function);
28529  __Pyx_DECREF_SET(__pyx_t_1, function);
28530  __pyx_t_6 = 1;
28531  }
28532  }
28533  #if CYTHON_FAST_PYCALL
28534  if (PyFunction_Check(__pyx_t_1)) {
28535  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGrid, __pyx_n_s_Geometry, __pyx_t_3};
28536  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1354, __pyx_L1_error)
28537  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
28538  __Pyx_GOTREF(__pyx_t_5);
28539  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28540  } else
28541  #endif
28542  #if CYTHON_FAST_PYCCALL
28543  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
28544  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGrid, __pyx_n_s_Geometry, __pyx_t_3};
28545  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1354, __pyx_L1_error)
28546  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
28547  __Pyx_GOTREF(__pyx_t_5);
28548  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28549  } else
28550  #endif
28551  {
28552  __pyx_t_2 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1354, __pyx_L1_error)
28553  __Pyx_GOTREF(__pyx_t_2);
28554  if (__pyx_t_4) {
28555  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
28556  }
28557  __Pyx_INCREF(__pyx_v_arGrid);
28558  __Pyx_GIVEREF(__pyx_v_arGrid);
28559  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_6, __pyx_v_arGrid);
28560  __Pyx_INCREF(__pyx_n_s_Geometry);
28561  __Pyx_GIVEREF(__pyx_n_s_Geometry);
28562  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_6, __pyx_n_s_Geometry);
28563  __Pyx_GIVEREF(__pyx_t_3);
28564  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_6, __pyx_t_3);
28565  __pyx_t_3 = 0;
28566  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1354, __pyx_L1_error)
28567  __Pyx_GOTREF(__pyx_t_5);
28568  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28569  }
28570  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28571  __pyx_v_geometry = __pyx_t_5;
28572  __pyx_t_5 = 0;
28573 
28574  /* "mbd/CouplingFSI.pyx":1355
28575  * elements.text = self.hdfFileName+".h5:/elementsSpatial_Domain"+str(tCount)
28576  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"})
28577  * nodes = ET.SubElement(geometry, # <<<<<<<<<<<<<<
28578  * "DataItem",
28579  * {"Format": dataItemFormat,
28580  */
28581  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error)
28582  __Pyx_GOTREF(__pyx_t_1);
28583  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error)
28584  __Pyx_GOTREF(__pyx_t_2);
28585  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28586 
28587  /* "mbd/CouplingFSI.pyx":1357
28588  * nodes = ET.SubElement(geometry,
28589  * "DataItem",
28590  * {"Format": dataItemFormat, # <<<<<<<<<<<<<<
28591  * "DataType": "Float",
28592  * "Precision": "8",
28593  */
28594  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
28595  __Pyx_GOTREF(__pyx_t_1);
28596  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Format, __pyx_v_dataItemFormat) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
28597  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_DataType, __pyx_n_s_Float) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
28598  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Precision, __pyx_kp_s_8) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
28599 
28600  /* "mbd/CouplingFSI.pyx":1360
28601  * "DataType": "Float",
28602  * "Precision": "8",
28603  * "Dimensions": "%i %i" % (pos.shape[0], # <<<<<<<<<<<<<<
28604  * pos.shape[1])})
28605  * nodes.text = self.hdfFileName+".h5:/nodesSpatial_Domain"+str(tCount)
28606  */
28607  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pos, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error)
28608  __Pyx_GOTREF(__pyx_t_3);
28609  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L1_error)
28610  __Pyx_GOTREF(__pyx_t_4);
28611  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28612 
28613  /* "mbd/CouplingFSI.pyx":1361
28614  * "Precision": "8",
28615  * "Dimensions": "%i %i" % (pos.shape[0],
28616  * pos.shape[1])}) # <<<<<<<<<<<<<<
28617  * nodes.text = self.hdfFileName+".h5:/nodesSpatial_Domain"+str(tCount)
28618  *
28619  */
28620  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pos, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1361, __pyx_L1_error)
28621  __Pyx_GOTREF(__pyx_t_3);
28622  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1361, __pyx_L1_error)
28623  __Pyx_GOTREF(__pyx_t_7);
28624  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28625 
28626  /* "mbd/CouplingFSI.pyx":1360
28627  * "DataType": "Float",
28628  * "Precision": "8",
28629  * "Dimensions": "%i %i" % (pos.shape[0], # <<<<<<<<<<<<<<
28630  * pos.shape[1])})
28631  * nodes.text = self.hdfFileName+".h5:/nodesSpatial_Domain"+str(tCount)
28632  */
28633  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error)
28634  __Pyx_GOTREF(__pyx_t_3);
28635  __Pyx_GIVEREF(__pyx_t_4);
28636  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
28637  __Pyx_GIVEREF(__pyx_t_7);
28638  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
28639  __pyx_t_4 = 0;
28640  __pyx_t_7 = 0;
28641  __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_i_i, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L1_error)
28642  __Pyx_GOTREF(__pyx_t_7);
28643  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28644  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Dimensions, __pyx_t_7) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
28645  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
28646  __pyx_t_7 = NULL;
28647  __pyx_t_6 = 0;
28648  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
28649  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
28650  if (likely(__pyx_t_7)) {
28651  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
28652  __Pyx_INCREF(__pyx_t_7);
28653  __Pyx_INCREF(function);
28654  __Pyx_DECREF_SET(__pyx_t_2, function);
28655  __pyx_t_6 = 1;
28656  }
28657  }
28658  #if CYTHON_FAST_PYCALL
28659  if (PyFunction_Check(__pyx_t_2)) {
28660  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_geometry, __pyx_n_s_DataItem, __pyx_t_1};
28661  __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1355, __pyx_L1_error)
28662  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
28663  __Pyx_GOTREF(__pyx_t_5);
28664  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28665  } else
28666  #endif
28667  #if CYTHON_FAST_PYCCALL
28668  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
28669  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_geometry, __pyx_n_s_DataItem, __pyx_t_1};
28670  __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1355, __pyx_L1_error)
28671  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
28672  __Pyx_GOTREF(__pyx_t_5);
28673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28674  } else
28675  #endif
28676  {
28677  __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1355, __pyx_L1_error)
28678  __Pyx_GOTREF(__pyx_t_3);
28679  if (__pyx_t_7) {
28680  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
28681  }
28682  __Pyx_INCREF(__pyx_v_geometry);
28683  __Pyx_GIVEREF(__pyx_v_geometry);
28684  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_geometry);
28685  __Pyx_INCREF(__pyx_n_s_DataItem);
28686  __Pyx_GIVEREF(__pyx_n_s_DataItem);
28687  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_n_s_DataItem);
28688  __Pyx_GIVEREF(__pyx_t_1);
28689  PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_t_1);
28690  __pyx_t_1 = 0;
28691  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1355, __pyx_L1_error)
28692  __Pyx_GOTREF(__pyx_t_5);
28693  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28694  }
28695  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28696  __pyx_v_nodes = __pyx_t_5;
28697  __pyx_t_5 = 0;
28698 
28699  /* "mbd/CouplingFSI.pyx":1362
28700  * "Dimensions": "%i %i" % (pos.shape[0],
28701  * pos.shape[1])})
28702  * nodes.text = self.hdfFileName+".h5:/nodesSpatial_Domain"+str(tCount) # <<<<<<<<<<<<<<
28703  *
28704  * tree = ET.ElementTree(root)
28705  */
28706  __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error)
28707  __Pyx_GOTREF(__pyx_t_5);
28708  __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_h5_nodesSpatial_Domain); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error)
28709  __Pyx_GOTREF(__pyx_t_2);
28710  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28711  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error)
28712  __Pyx_GOTREF(__pyx_t_5);
28713  __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error)
28714  __Pyx_GOTREF(__pyx_t_3);
28715  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28716  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28717  if (__Pyx_PyObject_SetAttrStr(__pyx_v_nodes, __pyx_n_s_text, __pyx_t_3) < 0) __PYX_ERR(0, 1362, __pyx_L1_error)
28718  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28719 
28720  /* "mbd/CouplingFSI.pyx":1364
28721  * nodes.text = self.hdfFileName+".h5:/nodesSpatial_Domain"+str(tCount)
28722  *
28723  * tree = ET.ElementTree(root) # <<<<<<<<<<<<<<
28724  *
28725  * with open(xmlFile, "wb") as f:
28726  */
28727  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ET); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1364, __pyx_L1_error)
28728  __Pyx_GOTREF(__pyx_t_5);
28729  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_ElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
28730  __Pyx_GOTREF(__pyx_t_2);
28731  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28732  __pyx_t_5 = NULL;
28733  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
28734  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
28735  if (likely(__pyx_t_5)) {
28736  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
28737  __Pyx_INCREF(__pyx_t_5);
28738  __Pyx_INCREF(function);
28739  __Pyx_DECREF_SET(__pyx_t_2, function);
28740  }
28741  }
28742  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_root) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_root);
28743  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
28744  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error)
28745  __Pyx_GOTREF(__pyx_t_3);
28746  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28747  __pyx_v_tree = __pyx_t_3;
28748  __pyx_t_3 = 0;
28749 
28750  /* "mbd/CouplingFSI.pyx":1366
28751  * tree = ET.ElementTree(root)
28752  *
28753  * with open(xmlFile, "wb") as f: # <<<<<<<<<<<<<<
28754  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
28755  * f.write(bytes(xmlHeader,"utf-8"))
28756  */
28757  /*with:*/ {
28758  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1366, __pyx_L1_error)
28759  __Pyx_GOTREF(__pyx_t_3);
28760  __Pyx_INCREF(__pyx_v_xmlFile);
28761  __Pyx_GIVEREF(__pyx_v_xmlFile);
28762  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xmlFile);
28763  __Pyx_INCREF(__pyx_n_s_wb);
28764  __Pyx_GIVEREF(__pyx_n_s_wb);
28765  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_wb);
28766  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error)
28767  __Pyx_GOTREF(__pyx_t_2);
28768  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28769  __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1366, __pyx_L1_error)
28770  __Pyx_GOTREF(__pyx_t_10);
28771  __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L5_error)
28772  __Pyx_GOTREF(__pyx_t_5);
28773  __pyx_t_1 = NULL;
28774  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
28775  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
28776  if (likely(__pyx_t_1)) {
28777  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
28778  __Pyx_INCREF(__pyx_t_1);
28779  __Pyx_INCREF(function);
28780  __Pyx_DECREF_SET(__pyx_t_5, function);
28781  }
28782  }
28783  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
28784  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28785  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1366, __pyx_L5_error)
28786  __Pyx_GOTREF(__pyx_t_3);
28787  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28788  __pyx_t_5 = __pyx_t_3;
28789  __pyx_t_3 = 0;
28790  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28791  /*try:*/ {
28792  {
28793  __Pyx_PyThreadState_declare
28794  __Pyx_PyThreadState_assign
28795  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
28796  __Pyx_XGOTREF(__pyx_t_11);
28797  __Pyx_XGOTREF(__pyx_t_12);
28798  __Pyx_XGOTREF(__pyx_t_13);
28799  /*try:*/ {
28800  __pyx_v_f = __pyx_t_5;
28801  __pyx_t_5 = 0;
28802 
28803  /* "mbd/CouplingFSI.pyx":1367
28804  *
28805  * with open(xmlFile, "wb") as f:
28806  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n" # <<<<<<<<<<<<<<
28807  * f.write(bytes(xmlHeader,"utf-8"))
28808  * indentXML(tree.getroot())
28809  */
28810  __Pyx_INCREF(__pyx_kp_s_xml_version_1_0_DOCTYPE_Xdmf_SY);
28811  __pyx_v_xmlHeader = __pyx_kp_s_xml_version_1_0_DOCTYPE_Xdmf_SY;
28812 
28813  /* "mbd/CouplingFSI.pyx":1368
28814  * with open(xmlFile, "wb") as f:
28815  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
28816  * f.write(bytes(xmlHeader,"utf-8")) # <<<<<<<<<<<<<<
28817  * indentXML(tree.getroot())
28818  * tree.write(f)
28819  */
28820  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L9_error)
28821  __Pyx_GOTREF(__pyx_t_2);
28822  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L9_error)
28823  __Pyx_GOTREF(__pyx_t_3);
28824  __Pyx_INCREF(__pyx_v_xmlHeader);
28825  __Pyx_GIVEREF(__pyx_v_xmlHeader);
28826  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xmlHeader);
28827  __Pyx_INCREF(__pyx_kp_s_utf_8);
28828  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
28829  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
28830  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L9_error)
28831  __Pyx_GOTREF(__pyx_t_1);
28832  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28833  __pyx_t_3 = NULL;
28834  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
28835  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
28836  if (likely(__pyx_t_3)) {
28837  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
28838  __Pyx_INCREF(__pyx_t_3);
28839  __Pyx_INCREF(function);
28840  __Pyx_DECREF_SET(__pyx_t_2, function);
28841  }
28842  }
28843  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
28844  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28845  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28846  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1368, __pyx_L9_error)
28847  __Pyx_GOTREF(__pyx_t_5);
28848  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28849  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28850 
28851  /* "mbd/CouplingFSI.pyx":1369
28852  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
28853  * f.write(bytes(xmlHeader,"utf-8"))
28854  * indentXML(tree.getroot()) # <<<<<<<<<<<<<<
28855  * tree.write(f)
28856  *
28857  */
28858  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_indentXML); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L9_error)
28859  __Pyx_GOTREF(__pyx_t_2);
28860  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tree, __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1369, __pyx_L9_error)
28861  __Pyx_GOTREF(__pyx_t_3);
28862  __pyx_t_7 = NULL;
28863  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
28864  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
28865  if (likely(__pyx_t_7)) {
28866  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
28867  __Pyx_INCREF(__pyx_t_7);
28868  __Pyx_INCREF(function);
28869  __Pyx_DECREF_SET(__pyx_t_3, function);
28870  }
28871  }
28872  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
28873  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
28874  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L9_error)
28875  __Pyx_GOTREF(__pyx_t_1);
28876  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28877  __pyx_t_3 = NULL;
28878  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
28879  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
28880  if (likely(__pyx_t_3)) {
28881  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
28882  __Pyx_INCREF(__pyx_t_3);
28883  __Pyx_INCREF(function);
28884  __Pyx_DECREF_SET(__pyx_t_2, function);
28885  }
28886  }
28887  __pyx_t_5 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1);
28888  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28889  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
28890  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L9_error)
28891  __Pyx_GOTREF(__pyx_t_5);
28892  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28893  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28894 
28895  /* "mbd/CouplingFSI.pyx":1370
28896  * f.write(bytes(xmlHeader,"utf-8"))
28897  * indentXML(tree.getroot())
28898  * tree.write(f) # <<<<<<<<<<<<<<
28899  *
28900  * # dump xml str in h5 file
28901  */
28902  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_tree, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L9_error)
28903  __Pyx_GOTREF(__pyx_t_2);
28904  __pyx_t_1 = NULL;
28905  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
28906  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
28907  if (likely(__pyx_t_1)) {
28908  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
28909  __Pyx_INCREF(__pyx_t_1);
28910  __Pyx_INCREF(function);
28911  __Pyx_DECREF_SET(__pyx_t_2, function);
28912  }
28913  }
28914  __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_f);
28915  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28916  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1370, __pyx_L9_error)
28917  __Pyx_GOTREF(__pyx_t_5);
28918  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
28919  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
28920 
28921  /* "mbd/CouplingFSI.pyx":1366
28922  * tree = ET.ElementTree(root)
28923  *
28924  * with open(xmlFile, "wb") as f: # <<<<<<<<<<<<<<
28925  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
28926  * f.write(bytes(xmlHeader,"utf-8"))
28927  */
28928  }
28929  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
28930  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
28931  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
28932  goto __pyx_L14_try_end;
28933  __pyx_L9_error:;
28934  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28935  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28936  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
28937  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
28938  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
28939  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
28940  /*except:*/ {
28941  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
28942  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1366, __pyx_L11_except_error)
28943  __Pyx_GOTREF(__pyx_t_5);
28944  __Pyx_GOTREF(__pyx_t_2);
28945  __Pyx_GOTREF(__pyx_t_1);
28946  __pyx_t_3 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1366, __pyx_L11_except_error)
28947  __Pyx_GOTREF(__pyx_t_3);
28948  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL);
28949  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28950  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28951  if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1366, __pyx_L11_except_error)
28952  __Pyx_GOTREF(__pyx_t_14);
28953  __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_14);
28954  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
28955  if (__pyx_t_15 < 0) __PYX_ERR(0, 1366, __pyx_L11_except_error)
28956  __pyx_t_16 = ((!(__pyx_t_15 != 0)) != 0);
28957  if (__pyx_t_16) {
28958  __Pyx_GIVEREF(__pyx_t_5);
28959  __Pyx_GIVEREF(__pyx_t_2);
28960  __Pyx_XGIVEREF(__pyx_t_1);
28961  __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_2, __pyx_t_1);
28962  __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0;
28963  __PYX_ERR(0, 1366, __pyx_L11_except_error)
28964  }
28965  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
28966  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
28967  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
28968  goto __pyx_L10_exception_handled;
28969  }
28970  __pyx_L11_except_error:;
28971  __Pyx_XGIVEREF(__pyx_t_11);
28972  __Pyx_XGIVEREF(__pyx_t_12);
28973  __Pyx_XGIVEREF(__pyx_t_13);
28974  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
28975  goto __pyx_L1_error;
28976  __pyx_L10_exception_handled:;
28977  __Pyx_XGIVEREF(__pyx_t_11);
28978  __Pyx_XGIVEREF(__pyx_t_12);
28979  __Pyx_XGIVEREF(__pyx_t_13);
28980  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
28981  __pyx_L14_try_end:;
28982  }
28983  }
28984  /*finally:*/ {
28985  /*normal exit:*/{
28986  if (__pyx_t_10) {
28987  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__88, NULL);
28988  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
28989  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1366, __pyx_L1_error)
28990  __Pyx_GOTREF(__pyx_t_13);
28991  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
28992  }
28993  goto __pyx_L8;
28994  }
28995  __pyx_L8:;
28996  }
28997  goto __pyx_L18;
28998  __pyx_L5_error:;
28999  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
29000  goto __pyx_L1_error;
29001  __pyx_L18:;
29002  }
29003 
29004  /* "mbd/CouplingFSI.pyx":1373
29005  *
29006  * # dump xml str in h5 file
29007  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5' # <<<<<<<<<<<<<<
29008  * f = h5py.File(hdfFileName, 'a', libver='latest')
29009  * datav = ET.tostring(arGrid)
29010  */
29011  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
29012  __Pyx_GOTREF(__pyx_t_2);
29013  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
29014  __Pyx_GOTREF(__pyx_t_5);
29015  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29016  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_join); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
29017  __Pyx_GOTREF(__pyx_t_2);
29018  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29019  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
29020  __Pyx_GOTREF(__pyx_t_5);
29021  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1373, __pyx_L1_error)
29022  __Pyx_GOTREF(__pyx_t_3);
29023  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29024  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
29025  __Pyx_GOTREF(__pyx_t_5);
29026  __Pyx_GIVEREF(__pyx_t_3);
29027  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
29028  __Pyx_INCREF(__pyx_kp_s_utf_8);
29029  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
29030  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_s_utf_8);
29031  __pyx_t_3 = 0;
29032  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1373, __pyx_L1_error)
29033  __Pyx_GOTREF(__pyx_t_3);
29034  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29035  __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error)
29036  __Pyx_GOTREF(__pyx_t_5);
29037  __pyx_t_7 = NULL;
29038  __pyx_t_6 = 0;
29039  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
29040  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
29041  if (likely(__pyx_t_7)) {
29042  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
29043  __Pyx_INCREF(__pyx_t_7);
29044  __Pyx_INCREF(function);
29045  __Pyx_DECREF_SET(__pyx_t_2, function);
29046  __pyx_t_6 = 1;
29047  }
29048  }
29049  #if CYTHON_FAST_PYCALL
29050  if (PyFunction_Check(__pyx_t_2)) {
29051  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5};
29052  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
29053  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
29054  __Pyx_GOTREF(__pyx_t_1);
29055  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29056  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29057  } else
29058  #endif
29059  #if CYTHON_FAST_PYCCALL
29060  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
29061  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5};
29062  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
29063  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
29064  __Pyx_GOTREF(__pyx_t_1);
29065  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29066  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29067  } else
29068  #endif
29069  {
29070  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __pyx_L1_error)
29071  __Pyx_GOTREF(__pyx_t_4);
29072  if (__pyx_t_7) {
29073  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
29074  }
29075  __Pyx_GIVEREF(__pyx_t_3);
29076  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_t_3);
29077  __Pyx_GIVEREF(__pyx_t_5);
29078  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_t_5);
29079  __pyx_t_3 = 0;
29080  __pyx_t_5 = 0;
29081  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
29082  __Pyx_GOTREF(__pyx_t_1);
29083  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29084  }
29085  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29086  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_b_h5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
29087  __Pyx_GOTREF(__pyx_t_2);
29088  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29089  __pyx_v_hdfFileName = __pyx_t_2;
29090  __pyx_t_2 = 0;
29091 
29092  /* "mbd/CouplingFSI.pyx":1374
29093  * # dump xml str in h5 file
29094  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
29095  * f = h5py.File(hdfFileName, 'a', libver='latest') # <<<<<<<<<<<<<<
29096  * datav = ET.tostring(arGrid)
29097  * dset = f.create_dataset('Mesh_Spatial_Domain_'+str(tCount),
29098  */
29099  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_h5py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L1_error)
29100  __Pyx_GOTREF(__pyx_t_2);
29101  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_File); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error)
29102  __Pyx_GOTREF(__pyx_t_1);
29103  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29104  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L1_error)
29105  __Pyx_GOTREF(__pyx_t_2);
29106  __Pyx_INCREF(__pyx_v_hdfFileName);
29107  __Pyx_GIVEREF(__pyx_v_hdfFileName);
29108  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hdfFileName);
29109  __Pyx_INCREF(__pyx_n_s_a);
29110  __Pyx_GIVEREF(__pyx_n_s_a);
29111  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_a);
29112  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1374, __pyx_L1_error)
29113  __Pyx_GOTREF(__pyx_t_4);
29114  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_libver, __pyx_n_s_latest) < 0) __PYX_ERR(0, 1374, __pyx_L1_error)
29115  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error)
29116  __Pyx_GOTREF(__pyx_t_5);
29117  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29118  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29119  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29120  __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_5);
29121  __pyx_t_5 = 0;
29122 
29123  /* "mbd/CouplingFSI.pyx":1375
29124  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
29125  * f = h5py.File(hdfFileName, 'a', libver='latest')
29126  * datav = ET.tostring(arGrid) # <<<<<<<<<<<<<<
29127  * dset = f.create_dataset('Mesh_Spatial_Domain_'+str(tCount),
29128  * (1,),
29129  */
29130  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1375, __pyx_L1_error)
29131  __Pyx_GOTREF(__pyx_t_4);
29132  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tostring); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error)
29133  __Pyx_GOTREF(__pyx_t_2);
29134  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29135  __pyx_t_4 = NULL;
29136  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
29137  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
29138  if (likely(__pyx_t_4)) {
29139  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
29140  __Pyx_INCREF(__pyx_t_4);
29141  __Pyx_INCREF(function);
29142  __Pyx_DECREF_SET(__pyx_t_2, function);
29143  }
29144  }
29145  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_arGrid) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arGrid);
29146  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
29147  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1375, __pyx_L1_error)
29148  __Pyx_GOTREF(__pyx_t_5);
29149  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29150  __pyx_v_datav = __pyx_t_5;
29151  __pyx_t_5 = 0;
29152 
29153  /* "mbd/CouplingFSI.pyx":1376
29154  * f = h5py.File(hdfFileName, 'a', libver='latest')
29155  * datav = ET.tostring(arGrid)
29156  * dset = f.create_dataset('Mesh_Spatial_Domain_'+str(tCount), # <<<<<<<<<<<<<<
29157  * (1,),
29158  * dtype=h5py.special_dtype(vlen=str))
29159  */
29160  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1376, __pyx_L1_error)
29161  __Pyx_GOTREF(__pyx_t_5);
29162  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
29163  __Pyx_GOTREF(__pyx_t_2);
29164  __pyx_t_4 = PyNumber_Add(__pyx_n_s_Mesh_Spatial_Domain, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1376, __pyx_L1_error)
29165  __Pyx_GOTREF(__pyx_t_4);
29166  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29167 
29168  /* "mbd/CouplingFSI.pyx":1377
29169  * datav = ET.tostring(arGrid)
29170  * dset = f.create_dataset('Mesh_Spatial_Domain_'+str(tCount),
29171  * (1,), # <<<<<<<<<<<<<<
29172  * dtype=h5py.special_dtype(vlen=str))
29173  * dset[0] = datav
29174  */
29175  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error)
29176  __Pyx_GOTREF(__pyx_t_2);
29177  __Pyx_GIVEREF(__pyx_t_4);
29178  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
29179  __Pyx_INCREF(__pyx_tuple__91);
29180  __Pyx_GIVEREF(__pyx_tuple__91);
29181  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_tuple__91);
29182  __pyx_t_4 = 0;
29183 
29184  /* "mbd/CouplingFSI.pyx":1378
29185  * dset = f.create_dataset('Mesh_Spatial_Domain_'+str(tCount),
29186  * (1,),
29187  * dtype=h5py.special_dtype(vlen=str)) # <<<<<<<<<<<<<<
29188  * dset[0] = datav
29189  * # close file
29190  */
29191  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1378, __pyx_L1_error)
29192  __Pyx_GOTREF(__pyx_t_4);
29193  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_h5py); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
29194  __Pyx_GOTREF(__pyx_t_1);
29195  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_special_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1378, __pyx_L1_error)
29196  __Pyx_GOTREF(__pyx_t_3);
29197  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29198  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error)
29199  __Pyx_GOTREF(__pyx_t_1);
29200  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_vlen, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
29201  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1378, __pyx_L1_error)
29202  __Pyx_GOTREF(__pyx_t_7);
29203  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29204  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29205  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 1378, __pyx_L1_error)
29206  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
29207 
29208  /* "mbd/CouplingFSI.pyx":1376
29209  * f = h5py.File(hdfFileName, 'a', libver='latest')
29210  * datav = ET.tostring(arGrid)
29211  * dset = f.create_dataset('Mesh_Spatial_Domain_'+str(tCount), # <<<<<<<<<<<<<<
29212  * (1,),
29213  * dtype=h5py.special_dtype(vlen=str))
29214  */
29215  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1376, __pyx_L1_error)
29216  __Pyx_GOTREF(__pyx_t_7);
29217  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29218  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29219  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29220  __pyx_v_dset = __pyx_t_7;
29221  __pyx_t_7 = 0;
29222 
29223  /* "mbd/CouplingFSI.pyx":1379
29224  * (1,),
29225  * dtype=h5py.special_dtype(vlen=str))
29226  * dset[0] = datav # <<<<<<<<<<<<<<
29227  * # close file
29228  * f.close()
29229  */
29230  if (unlikely(__Pyx_SetItemInt(__pyx_v_dset, 0, __pyx_v_datav, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 1379, __pyx_L1_error)
29231 
29232  /* "mbd/CouplingFSI.pyx":1381
29233  * dset[0] = datav
29234  * # close file
29235  * f.close() # <<<<<<<<<<<<<<
29236  * Profiling.logEvent('finished recording xml file of '+str(self.name))
29237  *
29238  */
29239  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1381, __pyx_L1_error)
29240  __Pyx_GOTREF(__pyx_t_4);
29241  __pyx_t_2 = NULL;
29242  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
29243  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
29244  if (likely(__pyx_t_2)) {
29245  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
29246  __Pyx_INCREF(__pyx_t_2);
29247  __Pyx_INCREF(function);
29248  __Pyx_DECREF_SET(__pyx_t_4, function);
29249  }
29250  }
29251  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
29252  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
29253  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1381, __pyx_L1_error)
29254  __Pyx_GOTREF(__pyx_t_7);
29255  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29256  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
29257 
29258  /* "mbd/CouplingFSI.pyx":1382
29259  * # close file
29260  * f.close()
29261  * Profiling.logEvent('finished recording xml file of '+str(self.name)) # <<<<<<<<<<<<<<
29262  *
29263  *
29264  */
29265  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L1_error)
29266  __Pyx_GOTREF(__pyx_t_4);
29267  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error)
29268  __Pyx_GOTREF(__pyx_t_2);
29269  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29270  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L1_error)
29271  __Pyx_GOTREF(__pyx_t_4);
29272  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1382, __pyx_L1_error)
29273  __Pyx_GOTREF(__pyx_t_5);
29274  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29275  __pyx_t_4 = PyNumber_Add(__pyx_kp_s_finished_recording_xml_file_of, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1382, __pyx_L1_error)
29276  __Pyx_GOTREF(__pyx_t_4);
29277  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
29278  __pyx_t_5 = NULL;
29279  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
29280  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
29281  if (likely(__pyx_t_5)) {
29282  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
29283  __Pyx_INCREF(__pyx_t_5);
29284  __Pyx_INCREF(function);
29285  __Pyx_DECREF_SET(__pyx_t_2, function);
29286  }
29287  }
29288  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
29289  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
29290  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29291  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error)
29292  __Pyx_GOTREF(__pyx_t_7);
29293  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
29294  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
29295 
29296  /* "mbd/CouplingFSI.pyx":1309
29297  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
29298  *
29299  * def _recordXML(self): # <<<<<<<<<<<<<<
29300  * Profiling.logEvent('recording xml file of '+str(self.name))
29301  * tCount = self.ProtChSystem.tCount
29302  */
29303 
29304  /* function exit code */
29305  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29306  goto __pyx_L0;
29307  __pyx_L1_error:;
29308  __Pyx_XDECREF(__pyx_t_1);
29309  __Pyx_XDECREF(__pyx_t_2);
29310  __Pyx_XDECREF(__pyx_t_3);
29311  __Pyx_XDECREF(__pyx_t_4);
29312  __Pyx_XDECREF(__pyx_t_5);
29313  __Pyx_XDECREF(__pyx_t_7);
29314  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody._recordXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
29315  __pyx_r = NULL;
29316  __pyx_L0:;
29317  __Pyx_XDECREF(__pyx_v_tCount);
29318  __Pyx_XDECREF(__pyx_v_t);
29319  __Pyx_XDECREF(__pyx_v_xmlFile);
29320  __Pyx_XDECREF(__pyx_v_root);
29321  __Pyx_XDECREF(__pyx_v_domain);
29322  __Pyx_XDECREF(__pyx_v_arGridCollection);
29323  __Pyx_XDECREF(__pyx_v_Xdmf_ElementTopology);
29324  __Pyx_XDECREF(__pyx_v_pos);
29325  __Pyx_XDECREF(__pyx_v_el);
29326  __Pyx_XDECREF(__pyx_v_dataItemFormat);
29327  __Pyx_XDECREF(__pyx_v_arGrid);
29328  __Pyx_XDECREF(__pyx_v_arTime);
29329  __Pyx_XDECREF(__pyx_v_topology);
29330  __Pyx_XDECREF(__pyx_v_elements);
29331  __Pyx_XDECREF(__pyx_v_geometry);
29332  __Pyx_XDECREF(__pyx_v_nodes);
29333  __Pyx_XDECREF(__pyx_v_tree);
29334  __Pyx_XDECREF(__pyx_v_f);
29335  __Pyx_XDECREF(__pyx_v_xmlHeader);
29336  __Pyx_XDECREF(__pyx_v_hdfFileName);
29337  __Pyx_XDECREF(__pyx_v_datav);
29338  __Pyx_XDECREF(__pyx_v_dset);
29339  __Pyx_XGIVEREF(__pyx_r);
29340  __Pyx_TraceReturn(__pyx_r, 0);
29341  __Pyx_RefNannyFinishContext();
29342  return __pyx_r;
29343 }
29344 
29345 /* "mbd/CouplingFSI.pyx":1385
29346  *
29347  *
29348  * def addPrismaticLinksWithSpring(self, np.ndarray pris1, # <<<<<<<<<<<<<<
29349  * np.ndarray pris2, double stiffness, double damping,
29350  * double rest_length):
29351  */
29352 
29353 /* Python wrapper */
29354 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_111addPrismaticLinksWithSpring(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
29355 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_110addPrismaticLinksWithSpring[] = "ProtChBody.addPrismaticLinksWithSpring(self, ndarray pris1, ndarray pris2, double stiffness, double damping, double rest_length)\n\n fairlead: barycenter coords\n pris: absolute coords\n pris1-------fairlead(barycenter)\n |\n |\n |\n |\n pris2\n ";
29356 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_111addPrismaticLinksWithSpring = {"addPrismaticLinksWithSpring", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_111addPrismaticLinksWithSpring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_110addPrismaticLinksWithSpring};
29357 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_111addPrismaticLinksWithSpring(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
29358  PyArrayObject *__pyx_v_pris1 = 0;
29359  PyArrayObject *__pyx_v_pris2 = 0;
29360  double __pyx_v_stiffness;
29361  double __pyx_v_damping;
29362  double __pyx_v_rest_length;
29363  int __pyx_lineno = 0;
29364  const char *__pyx_filename = NULL;
29365  int __pyx_clineno = 0;
29366  PyObject *__pyx_r = 0;
29367  __Pyx_RefNannyDeclarations
29368  __Pyx_RefNannySetupContext("addPrismaticLinksWithSpring (wrapper)", 0);
29369  {
29370  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pris1,&__pyx_n_s_pris2,&__pyx_n_s_stiffness,&__pyx_n_s_damping,&__pyx_n_s_rest_length,0};
29371  PyObject* values[5] = {0,0,0,0,0};
29372  if (unlikely(__pyx_kwds)) {
29373  Py_ssize_t kw_args;
29374  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
29375  switch (pos_args) {
29376  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29377  CYTHON_FALLTHROUGH;
29378  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29379  CYTHON_FALLTHROUGH;
29380  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29381  CYTHON_FALLTHROUGH;
29382  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29383  CYTHON_FALLTHROUGH;
29384  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29385  CYTHON_FALLTHROUGH;
29386  case 0: break;
29387  default: goto __pyx_L5_argtuple_error;
29388  }
29389  kw_args = PyDict_Size(__pyx_kwds);
29390  switch (pos_args) {
29391  case 0:
29392  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pris1)) != 0)) kw_args--;
29393  else goto __pyx_L5_argtuple_error;
29394  CYTHON_FALLTHROUGH;
29395  case 1:
29396  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pris2)) != 0)) kw_args--;
29397  else {
29398  __Pyx_RaiseArgtupleInvalid("addPrismaticLinksWithSpring", 1, 5, 5, 1); __PYX_ERR(0, 1385, __pyx_L3_error)
29399  }
29400  CYTHON_FALLTHROUGH;
29401  case 2:
29402  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_stiffness)) != 0)) kw_args--;
29403  else {
29404  __Pyx_RaiseArgtupleInvalid("addPrismaticLinksWithSpring", 1, 5, 5, 2); __PYX_ERR(0, 1385, __pyx_L3_error)
29405  }
29406  CYTHON_FALLTHROUGH;
29407  case 3:
29408  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_damping)) != 0)) kw_args--;
29409  else {
29410  __Pyx_RaiseArgtupleInvalid("addPrismaticLinksWithSpring", 1, 5, 5, 3); __PYX_ERR(0, 1385, __pyx_L3_error)
29411  }
29412  CYTHON_FALLTHROUGH;
29413  case 4:
29414  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rest_length)) != 0)) kw_args--;
29415  else {
29416  __Pyx_RaiseArgtupleInvalid("addPrismaticLinksWithSpring", 1, 5, 5, 4); __PYX_ERR(0, 1385, __pyx_L3_error)
29417  }
29418  }
29419  if (unlikely(kw_args > 0)) {
29420  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "addPrismaticLinksWithSpring") < 0)) __PYX_ERR(0, 1385, __pyx_L3_error)
29421  }
29422  } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
29423  goto __pyx_L5_argtuple_error;
29424  } else {
29425  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
29426  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
29427  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
29428  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
29429  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
29430  }
29431  __pyx_v_pris1 = ((PyArrayObject *)values[0]);
29432  __pyx_v_pris2 = ((PyArrayObject *)values[1]);
29433  __pyx_v_stiffness = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_stiffness == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
29434  __pyx_v_damping = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_damping == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L3_error)
29435  __pyx_v_rest_length = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_rest_length == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1387, __pyx_L3_error)
29436  }
29437  goto __pyx_L4_argument_unpacking_done;
29438  __pyx_L5_argtuple_error:;
29439  __Pyx_RaiseArgtupleInvalid("addPrismaticLinksWithSpring", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1385, __pyx_L3_error)
29440  __pyx_L3_error:;
29441  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addPrismaticLinksWithSpring", __pyx_clineno, __pyx_lineno, __pyx_filename);
29442  __Pyx_RefNannyFinishContext();
29443  return NULL;
29444  __pyx_L4_argument_unpacking_done:;
29445  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pris1), __pyx_ptype_5numpy_ndarray, 1, "pris1", 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
29446  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pris2), __pyx_ptype_5numpy_ndarray, 1, "pris2", 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
29447  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_110addPrismaticLinksWithSpring(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_pris1, __pyx_v_pris2, __pyx_v_stiffness, __pyx_v_damping, __pyx_v_rest_length);
29448 
29449  /* function exit code */
29450  goto __pyx_L0;
29451  __pyx_L1_error:;
29452  __pyx_r = NULL;
29453  __pyx_L0:;
29454  __Pyx_RefNannyFinishContext();
29455  return __pyx_r;
29456 }
29457 
29458 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_110addPrismaticLinksWithSpring(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyArrayObject *__pyx_v_pris1, PyArrayObject *__pyx_v_pris2, double __pyx_v_stiffness, double __pyx_v_damping, double __pyx_v_rest_length) {
29459  PyObject *__pyx_r = NULL;
29460  __Pyx_TraceDeclarations
29461  __Pyx_RefNannyDeclarations
29462  int __pyx_lineno = 0;
29463  const char *__pyx_filename = NULL;
29464  int __pyx_clineno = 0;
29465  __Pyx_TraceFrameInit(__pyx_codeobj__92)
29466  __Pyx_RefNannySetupContext("addPrismaticLinksWithSpring", 0);
29467  __Pyx_TraceCall("addPrismaticLinksWithSpring", __pyx_f[0], 1385, 0, __PYX_ERR(0, 1385, __pyx_L1_error));
29468 
29469  /* "mbd/CouplingFSI.pyx":1398
29470  * pris2
29471  * """
29472  * self.thisptr.addPrismaticLinksWithSpring(<double*> pris1.data, # <<<<<<<<<<<<<<
29473  * <double*> pris2.data,
29474  * stiffness,
29475  */
29476  __pyx_v_self->thisptr->addPrismaticLinksWithSpring(((double *)__pyx_v_pris1->data), ((double *)__pyx_v_pris2->data), __pyx_v_stiffness, __pyx_v_damping, __pyx_v_rest_length);
29477 
29478  /* "mbd/CouplingFSI.pyx":1385
29479  *
29480  *
29481  * def addPrismaticLinksWithSpring(self, np.ndarray pris1, # <<<<<<<<<<<<<<
29482  * np.ndarray pris2, double stiffness, double damping,
29483  * double rest_length):
29484  */
29485 
29486  /* function exit code */
29487  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29488  goto __pyx_L0;
29489  __pyx_L1_error:;
29490  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addPrismaticLinksWithSpring", __pyx_clineno, __pyx_lineno, __pyx_filename);
29491  __pyx_r = NULL;
29492  __pyx_L0:;
29493  __Pyx_XGIVEREF(__pyx_r);
29494  __Pyx_TraceReturn(__pyx_r, 0);
29495  __Pyx_RefNannyFinishContext();
29496  return __pyx_r;
29497 }
29498 
29499 /* "mbd/CouplingFSI.pyx":1403
29500  * damping,
29501  * rest_length)
29502  * def addPrismaticLinkX(self, double[:] pris1): # <<<<<<<<<<<<<<
29503  * self.thisptr.addPrismaticLinkX(&pris1[0]);
29504  *
29505  */
29506 
29507 /* Python wrapper */
29508 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_113addPrismaticLinkX(PyObject *__pyx_v_self, PyObject *__pyx_arg_pris1); /*proto*/
29509 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_112addPrismaticLinkX[] = "ProtChBody.addPrismaticLinkX(self, double[:] pris1)";
29510 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_113addPrismaticLinkX = {"addPrismaticLinkX", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_113addPrismaticLinkX, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_112addPrismaticLinkX};
29511 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_113addPrismaticLinkX(PyObject *__pyx_v_self, PyObject *__pyx_arg_pris1) {
29512  __Pyx_memviewslice __pyx_v_pris1 = { 0, 0, { 0 }, { 0 }, { 0 } };
29513  int __pyx_lineno = 0;
29514  const char *__pyx_filename = NULL;
29515  int __pyx_clineno = 0;
29516  PyObject *__pyx_r = 0;
29517  __Pyx_RefNannyDeclarations
29518  __Pyx_RefNannySetupContext("addPrismaticLinkX (wrapper)", 0);
29519  assert(__pyx_arg_pris1); {
29520  __pyx_v_pris1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_arg_pris1, PyBUF_WRITABLE); if (unlikely(!__pyx_v_pris1.memview)) __PYX_ERR(0, 1403, __pyx_L3_error)
29521  }
29522  goto __pyx_L4_argument_unpacking_done;
29523  __pyx_L3_error:;
29524  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addPrismaticLinkX", __pyx_clineno, __pyx_lineno, __pyx_filename);
29525  __Pyx_RefNannyFinishContext();
29526  return NULL;
29527  __pyx_L4_argument_unpacking_done:;
29528  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_112addPrismaticLinkX(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), __pyx_v_pris1);
29529 
29530  /* function exit code */
29531  __Pyx_RefNannyFinishContext();
29532  return __pyx_r;
29533 }
29534 
29535 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_112addPrismaticLinkX(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, __Pyx_memviewslice __pyx_v_pris1) {
29536  PyObject *__pyx_r = NULL;
29537  __Pyx_TraceDeclarations
29538  __Pyx_RefNannyDeclarations
29539  Py_ssize_t __pyx_t_1;
29540  int __pyx_t_2;
29541  int __pyx_lineno = 0;
29542  const char *__pyx_filename = NULL;
29543  int __pyx_clineno = 0;
29544  __Pyx_TraceFrameInit(__pyx_codeobj__93)
29545  __Pyx_RefNannySetupContext("addPrismaticLinkX", 0);
29546  __Pyx_TraceCall("addPrismaticLinkX", __pyx_f[0], 1403, 0, __PYX_ERR(0, 1403, __pyx_L1_error));
29547 
29548  /* "mbd/CouplingFSI.pyx":1404
29549  * rest_length)
29550  * def addPrismaticLinkX(self, double[:] pris1):
29551  * self.thisptr.addPrismaticLinkX(&pris1[0]); # <<<<<<<<<<<<<<
29552  *
29553  * def setName(self, string name):
29554  */
29555  __pyx_t_1 = 0;
29556  __pyx_t_2 = -1;
29557  if (__pyx_t_1 < 0) {
29558  __pyx_t_1 += __pyx_v_pris1.shape[0];
29559  if (unlikely(__pyx_t_1 < 0)) __pyx_t_2 = 0;
29560  } else if (unlikely(__pyx_t_1 >= __pyx_v_pris1.shape[0])) __pyx_t_2 = 0;
29561  if (unlikely(__pyx_t_2 != -1)) {
29562  __Pyx_RaiseBufferIndexError(__pyx_t_2);
29563  __PYX_ERR(0, 1404, __pyx_L1_error)
29564  }
29565  __pyx_v_self->thisptr->addPrismaticLinkX((&(*((double *) ( /* dim=0 */ (__pyx_v_pris1.data + __pyx_t_1 * __pyx_v_pris1.strides[0]) )))));
29566 
29567  /* "mbd/CouplingFSI.pyx":1403
29568  * damping,
29569  * rest_length)
29570  * def addPrismaticLinkX(self, double[:] pris1): # <<<<<<<<<<<<<<
29571  * self.thisptr.addPrismaticLinkX(&pris1[0]);
29572  *
29573  */
29574 
29575  /* function exit code */
29576  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29577  goto __pyx_L0;
29578  __pyx_L1_error:;
29579  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.addPrismaticLinkX", __pyx_clineno, __pyx_lineno, __pyx_filename);
29580  __pyx_r = NULL;
29581  __pyx_L0:;
29582  __PYX_XDEC_MEMVIEW(&__pyx_v_pris1, 1);
29583  __Pyx_XGIVEREF(__pyx_r);
29584  __Pyx_TraceReturn(__pyx_r, 0);
29585  __Pyx_RefNannyFinishContext();
29586  return __pyx_r;
29587 }
29588 
29589 /* "mbd/CouplingFSI.pyx":1406
29590  * self.thisptr.addPrismaticLinkX(&pris1[0]);
29591  *
29592  * def setName(self, string name): # <<<<<<<<<<<<<<
29593  * """Sets name of body (used for csv file)
29594  *
29595  */
29596 
29597 /* Python wrapper */
29598 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_115setName(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/
29599 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_114setName[] = "ProtChBody.setName(self, string name)\nSets name of body (used for csv file)\n\n Parameters\n ----------\n name: str\n name of the body\n ";
29600 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_115setName = {"setName", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_115setName, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_114setName};
29601 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_115setName(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) {
29602  std::string __pyx_v_name;
29603  int __pyx_lineno = 0;
29604  const char *__pyx_filename = NULL;
29605  int __pyx_clineno = 0;
29606  PyObject *__pyx_r = 0;
29607  __Pyx_RefNannyDeclarations
29608  __Pyx_RefNannySetupContext("setName (wrapper)", 0);
29609  assert(__pyx_arg_name); {
29610  __pyx_v_name = __pyx_convert_string_from_py_std__in_string(__pyx_arg_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1406, __pyx_L3_error)
29611  }
29612  goto __pyx_L4_argument_unpacking_done;
29613  __pyx_L3_error:;
29614  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
29615  __Pyx_RefNannyFinishContext();
29616  return NULL;
29617  __pyx_L4_argument_unpacking_done:;
29618  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_114setName(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((std::string)__pyx_v_name));
29619 
29620  /* function exit code */
29621  __Pyx_RefNannyFinishContext();
29622  return __pyx_r;
29623 }
29624 
29625 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_114setName(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, std::string __pyx_v_name) {
29626  PyObject *__pyx_r = NULL;
29627  __Pyx_TraceDeclarations
29628  __Pyx_RefNannyDeclarations
29629  int __pyx_lineno = 0;
29630  const char *__pyx_filename = NULL;
29631  int __pyx_clineno = 0;
29632  __Pyx_TraceFrameInit(__pyx_codeobj__94)
29633  __Pyx_RefNannySetupContext("setName", 0);
29634  __Pyx_TraceCall("setName", __pyx_f[0], 1406, 0, __PYX_ERR(0, 1406, __pyx_L1_error));
29635 
29636  /* "mbd/CouplingFSI.pyx":1414
29637  * name of the body
29638  * """
29639  * self.name = name # <<<<<<<<<<<<<<
29640  * self.thisptr.setName(self.name)
29641  *
29642  */
29643  __pyx_v_self->name = __pyx_v_name;
29644 
29645  /* "mbd/CouplingFSI.pyx":1415
29646  * """
29647  * self.name = name
29648  * self.thisptr.setName(self.name) # <<<<<<<<<<<<<<
29649  *
29650  *
29651  */
29652  __pyx_v_self->thisptr->setName(__pyx_v_self->name);
29653 
29654  /* "mbd/CouplingFSI.pyx":1406
29655  * self.thisptr.addPrismaticLinkX(&pris1[0]);
29656  *
29657  * def setName(self, string name): # <<<<<<<<<<<<<<
29658  * """Sets name of body (used for csv file)
29659  *
29660  */
29661 
29662  /* function exit code */
29663  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29664  goto __pyx_L0;
29665  __pyx_L1_error:;
29666  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
29667  __pyx_r = NULL;
29668  __pyx_L0:;
29669  __Pyx_XGIVEREF(__pyx_r);
29670  __Pyx_TraceReturn(__pyx_r, 0);
29671  __Pyx_RefNannyFinishContext();
29672  return __pyx_r;
29673 }
29674 
29675 /* "mbd/CouplingFSI.pxd":186
29676  * cdef vector[ch.ChTriangle] trimesh_triangles
29677  * cdef public:
29678  * str record_file # <<<<<<<<<<<<<<
29679  * object model
29680  * ProtChSystem ProtChSystem
29681  */
29682 
29683 /* Python wrapper */
29684 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_1__get__(PyObject *__pyx_v_self); /*proto*/
29685 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_1__get__(PyObject *__pyx_v_self) {
29686  PyObject *__pyx_r = 0;
29687  __Pyx_RefNannyDeclarations
29688  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29689  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
29690 
29691  /* function exit code */
29692  __Pyx_RefNannyFinishContext();
29693  return __pyx_r;
29694 }
29695 
29696 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
29697  PyObject *__pyx_r = NULL;
29698  __Pyx_TraceDeclarations
29699  __Pyx_RefNannyDeclarations
29700  int __pyx_lineno = 0;
29701  const char *__pyx_filename = NULL;
29702  int __pyx_clineno = 0;
29703  __Pyx_RefNannySetupContext("__get__", 0);
29704  __Pyx_TraceCall("__get__", __pyx_f[2], 186, 0, __PYX_ERR(2, 186, __pyx_L1_error));
29705  __Pyx_XDECREF(__pyx_r);
29706  __Pyx_INCREF(__pyx_v_self->record_file);
29707  __pyx_r = __pyx_v_self->record_file;
29708  goto __pyx_L0;
29709 
29710  /* function exit code */
29711  __pyx_L1_error:;
29712  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.record_file.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29713  __pyx_r = NULL;
29714  __pyx_L0:;
29715  __Pyx_XGIVEREF(__pyx_r);
29716  __Pyx_TraceReturn(__pyx_r, 0);
29717  __Pyx_RefNannyFinishContext();
29718  return __pyx_r;
29719 }
29720 
29721 /* Python wrapper */
29722 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
29723 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
29724  int __pyx_r;
29725  __Pyx_RefNannyDeclarations
29726  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
29727  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
29728 
29729  /* function exit code */
29730  __Pyx_RefNannyFinishContext();
29731  return __pyx_r;
29732 }
29733 
29734 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
29735  int __pyx_r;
29736  __Pyx_TraceDeclarations
29737  __Pyx_RefNannyDeclarations
29738  PyObject *__pyx_t_1 = NULL;
29739  int __pyx_lineno = 0;
29740  const char *__pyx_filename = NULL;
29741  int __pyx_clineno = 0;
29742  __Pyx_RefNannySetupContext("__set__", 0);
29743  __Pyx_TraceCall("__set__", __pyx_f[2], 186, 0, __PYX_ERR(2, 186, __pyx_L1_error));
29744  if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 186, __pyx_L1_error)
29745  __pyx_t_1 = __pyx_v_value;
29746  __Pyx_INCREF(__pyx_t_1);
29747  __Pyx_GIVEREF(__pyx_t_1);
29748  __Pyx_GOTREF(__pyx_v_self->record_file);
29749  __Pyx_DECREF(__pyx_v_self->record_file);
29750  __pyx_v_self->record_file = ((PyObject*)__pyx_t_1);
29751  __pyx_t_1 = 0;
29752 
29753  /* function exit code */
29754  __pyx_r = 0;
29755  goto __pyx_L0;
29756  __pyx_L1_error:;
29757  __Pyx_XDECREF(__pyx_t_1);
29758  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.record_file.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29759  __pyx_r = -1;
29760  __pyx_L0:;
29761  __Pyx_TraceReturn(Py_None, 0);
29762  __Pyx_RefNannyFinishContext();
29763  return __pyx_r;
29764 }
29765 
29766 /* Python wrapper */
29767 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_5__del__(PyObject *__pyx_v_self); /*proto*/
29768 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_5__del__(PyObject *__pyx_v_self) {
29769  int __pyx_r;
29770  __Pyx_RefNannyDeclarations
29771  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
29772  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
29773 
29774  /* function exit code */
29775  __Pyx_RefNannyFinishContext();
29776  return __pyx_r;
29777 }
29778 
29779 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_file_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
29780  int __pyx_r;
29781  __Pyx_TraceDeclarations
29782  __Pyx_RefNannyDeclarations
29783  int __pyx_lineno = 0;
29784  const char *__pyx_filename = NULL;
29785  int __pyx_clineno = 0;
29786  __Pyx_RefNannySetupContext("__del__", 0);
29787  __Pyx_TraceCall("__del__", __pyx_f[2], 186, 0, __PYX_ERR(2, 186, __pyx_L1_error));
29788  __Pyx_INCREF(Py_None);
29789  __Pyx_GIVEREF(Py_None);
29790  __Pyx_GOTREF(__pyx_v_self->record_file);
29791  __Pyx_DECREF(__pyx_v_self->record_file);
29792  __pyx_v_self->record_file = ((PyObject*)Py_None);
29793 
29794  /* function exit code */
29795  __pyx_r = 0;
29796  goto __pyx_L0;
29797  __pyx_L1_error:;
29798  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.record_file.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29799  __pyx_r = -1;
29800  __pyx_L0:;
29801  __Pyx_TraceReturn(Py_None, 0);
29802  __Pyx_RefNannyFinishContext();
29803  return __pyx_r;
29804 }
29805 
29806 /* "mbd/CouplingFSI.pxd":187
29807  * cdef public:
29808  * str record_file
29809  * object model # <<<<<<<<<<<<<<
29810  * ProtChSystem ProtChSystem
29811  * object Shape
29812  */
29813 
29814 /* Python wrapper */
29815 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_1__get__(PyObject *__pyx_v_self); /*proto*/
29816 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_1__get__(PyObject *__pyx_v_self) {
29817  PyObject *__pyx_r = 0;
29818  __Pyx_RefNannyDeclarations
29819  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29820  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
29821 
29822  /* function exit code */
29823  __Pyx_RefNannyFinishContext();
29824  return __pyx_r;
29825 }
29826 
29827 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
29828  PyObject *__pyx_r = NULL;
29829  __Pyx_TraceDeclarations
29830  __Pyx_RefNannyDeclarations
29831  int __pyx_lineno = 0;
29832  const char *__pyx_filename = NULL;
29833  int __pyx_clineno = 0;
29834  __Pyx_RefNannySetupContext("__get__", 0);
29835  __Pyx_TraceCall("__get__", __pyx_f[2], 187, 0, __PYX_ERR(2, 187, __pyx_L1_error));
29836  __Pyx_XDECREF(__pyx_r);
29837  __Pyx_INCREF(__pyx_v_self->model);
29838  __pyx_r = __pyx_v_self->model;
29839  goto __pyx_L0;
29840 
29841  /* function exit code */
29842  __pyx_L1_error:;
29843  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.model.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29844  __pyx_r = NULL;
29845  __pyx_L0:;
29846  __Pyx_XGIVEREF(__pyx_r);
29847  __Pyx_TraceReturn(__pyx_r, 0);
29848  __Pyx_RefNannyFinishContext();
29849  return __pyx_r;
29850 }
29851 
29852 /* Python wrapper */
29853 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
29854 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
29855  int __pyx_r;
29856  __Pyx_RefNannyDeclarations
29857  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
29858  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
29859 
29860  /* function exit code */
29861  __Pyx_RefNannyFinishContext();
29862  return __pyx_r;
29863 }
29864 
29865 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
29866  int __pyx_r;
29867  __Pyx_TraceDeclarations
29868  __Pyx_RefNannyDeclarations
29869  int __pyx_lineno = 0;
29870  const char *__pyx_filename = NULL;
29871  int __pyx_clineno = 0;
29872  __Pyx_RefNannySetupContext("__set__", 0);
29873  __Pyx_TraceCall("__set__", __pyx_f[2], 187, 0, __PYX_ERR(2, 187, __pyx_L1_error));
29874  __Pyx_INCREF(__pyx_v_value);
29875  __Pyx_GIVEREF(__pyx_v_value);
29876  __Pyx_GOTREF(__pyx_v_self->model);
29877  __Pyx_DECREF(__pyx_v_self->model);
29878  __pyx_v_self->model = __pyx_v_value;
29879 
29880  /* function exit code */
29881  __pyx_r = 0;
29882  goto __pyx_L0;
29883  __pyx_L1_error:;
29884  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29885  __pyx_r = -1;
29886  __pyx_L0:;
29887  __Pyx_TraceReturn(Py_None, 0);
29888  __Pyx_RefNannyFinishContext();
29889  return __pyx_r;
29890 }
29891 
29892 /* Python wrapper */
29893 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_5__del__(PyObject *__pyx_v_self); /*proto*/
29894 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_5__del__(PyObject *__pyx_v_self) {
29895  int __pyx_r;
29896  __Pyx_RefNannyDeclarations
29897  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
29898  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
29899 
29900  /* function exit code */
29901  __Pyx_RefNannyFinishContext();
29902  return __pyx_r;
29903 }
29904 
29905 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
29906  int __pyx_r;
29907  __Pyx_TraceDeclarations
29908  __Pyx_RefNannyDeclarations
29909  int __pyx_lineno = 0;
29910  const char *__pyx_filename = NULL;
29911  int __pyx_clineno = 0;
29912  __Pyx_RefNannySetupContext("__del__", 0);
29913  __Pyx_TraceCall("__del__", __pyx_f[2], 187, 0, __PYX_ERR(2, 187, __pyx_L1_error));
29914  __Pyx_INCREF(Py_None);
29915  __Pyx_GIVEREF(Py_None);
29916  __Pyx_GOTREF(__pyx_v_self->model);
29917  __Pyx_DECREF(__pyx_v_self->model);
29918  __pyx_v_self->model = Py_None;
29919 
29920  /* function exit code */
29921  __pyx_r = 0;
29922  goto __pyx_L0;
29923  __pyx_L1_error:;
29924  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.model.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29925  __pyx_r = -1;
29926  __pyx_L0:;
29927  __Pyx_TraceReturn(Py_None, 0);
29928  __Pyx_RefNannyFinishContext();
29929  return __pyx_r;
29930 }
29931 
29932 /* "mbd/CouplingFSI.pxd":188
29933  * str record_file
29934  * object model
29935  * ProtChSystem ProtChSystem # <<<<<<<<<<<<<<
29936  * object Shape
29937  * int nd
29938  */
29939 
29940 /* Python wrapper */
29941 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_1__get__(PyObject *__pyx_v_self); /*proto*/
29942 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_1__get__(PyObject *__pyx_v_self) {
29943  PyObject *__pyx_r = 0;
29944  __Pyx_RefNannyDeclarations
29945  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29946  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
29947 
29948  /* function exit code */
29949  __Pyx_RefNannyFinishContext();
29950  return __pyx_r;
29951 }
29952 
29953 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
29954  PyObject *__pyx_r = NULL;
29955  __Pyx_TraceDeclarations
29956  __Pyx_RefNannyDeclarations
29957  int __pyx_lineno = 0;
29958  const char *__pyx_filename = NULL;
29959  int __pyx_clineno = 0;
29960  __Pyx_RefNannySetupContext("__get__", 0);
29961  __Pyx_TraceCall("__get__", __pyx_f[2], 188, 0, __PYX_ERR(2, 188, __pyx_L1_error));
29962  __Pyx_XDECREF(__pyx_r);
29963  __Pyx_INCREF(((PyObject *)__pyx_v_self->ProtChSystem));
29964  __pyx_r = ((PyObject *)__pyx_v_self->ProtChSystem);
29965  goto __pyx_L0;
29966 
29967  /* function exit code */
29968  __pyx_L1_error:;
29969  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ProtChSystem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29970  __pyx_r = NULL;
29971  __pyx_L0:;
29972  __Pyx_XGIVEREF(__pyx_r);
29973  __Pyx_TraceReturn(__pyx_r, 0);
29974  __Pyx_RefNannyFinishContext();
29975  return __pyx_r;
29976 }
29977 
29978 /* Python wrapper */
29979 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
29980 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
29981  int __pyx_r;
29982  __Pyx_RefNannyDeclarations
29983  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
29984  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
29985 
29986  /* function exit code */
29987  __Pyx_RefNannyFinishContext();
29988  return __pyx_r;
29989 }
29990 
29991 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
29992  int __pyx_r;
29993  __Pyx_TraceDeclarations
29994  __Pyx_RefNannyDeclarations
29995  PyObject *__pyx_t_1 = NULL;
29996  int __pyx_lineno = 0;
29997  const char *__pyx_filename = NULL;
29998  int __pyx_clineno = 0;
29999  __Pyx_RefNannySetupContext("__set__", 0);
30000  __Pyx_TraceCall("__set__", __pyx_f[2], 188, 0, __PYX_ERR(2, 188, __pyx_L1_error));
30001  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem))))) __PYX_ERR(2, 188, __pyx_L1_error)
30002  __pyx_t_1 = __pyx_v_value;
30003  __Pyx_INCREF(__pyx_t_1);
30004  __Pyx_GIVEREF(__pyx_t_1);
30005  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
30006  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
30007  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_t_1);
30008  __pyx_t_1 = 0;
30009 
30010  /* function exit code */
30011  __pyx_r = 0;
30012  goto __pyx_L0;
30013  __pyx_L1_error:;
30014  __Pyx_XDECREF(__pyx_t_1);
30015  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ProtChSystem.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30016  __pyx_r = -1;
30017  __pyx_L0:;
30018  __Pyx_TraceReturn(Py_None, 0);
30019  __Pyx_RefNannyFinishContext();
30020  return __pyx_r;
30021 }
30022 
30023 /* Python wrapper */
30024 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_5__del__(PyObject *__pyx_v_self); /*proto*/
30025 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_5__del__(PyObject *__pyx_v_self) {
30026  int __pyx_r;
30027  __Pyx_RefNannyDeclarations
30028  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
30029  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30030 
30031  /* function exit code */
30032  __Pyx_RefNannyFinishContext();
30033  return __pyx_r;
30034 }
30035 
30036 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30037  int __pyx_r;
30038  __Pyx_TraceDeclarations
30039  __Pyx_RefNannyDeclarations
30040  int __pyx_lineno = 0;
30041  const char *__pyx_filename = NULL;
30042  int __pyx_clineno = 0;
30043  __Pyx_RefNannySetupContext("__del__", 0);
30044  __Pyx_TraceCall("__del__", __pyx_f[2], 188, 0, __PYX_ERR(2, 188, __pyx_L1_error));
30045  __Pyx_INCREF(Py_None);
30046  __Pyx_GIVEREF(Py_None);
30047  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
30048  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
30049  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None);
30050 
30051  /* function exit code */
30052  __pyx_r = 0;
30053  goto __pyx_L0;
30054  __pyx_L1_error:;
30055  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ProtChSystem.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30056  __pyx_r = -1;
30057  __pyx_L0:;
30058  __Pyx_TraceReturn(Py_None, 0);
30059  __Pyx_RefNannyFinishContext();
30060  return __pyx_r;
30061 }
30062 
30063 /* "mbd/CouplingFSI.pxd":189
30064  * object model
30065  * ProtChSystem ProtChSystem
30066  * object Shape # <<<<<<<<<<<<<<
30067  * int nd
30068  * double dt
30069  */
30070 
30071 /* Python wrapper */
30072 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_1__get__(PyObject *__pyx_v_self); /*proto*/
30073 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_1__get__(PyObject *__pyx_v_self) {
30074  PyObject *__pyx_r = 0;
30075  __Pyx_RefNannyDeclarations
30076  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30077  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30078 
30079  /* function exit code */
30080  __Pyx_RefNannyFinishContext();
30081  return __pyx_r;
30082 }
30083 
30084 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30085  PyObject *__pyx_r = NULL;
30086  __Pyx_TraceDeclarations
30087  __Pyx_RefNannyDeclarations
30088  int __pyx_lineno = 0;
30089  const char *__pyx_filename = NULL;
30090  int __pyx_clineno = 0;
30091  __Pyx_RefNannySetupContext("__get__", 0);
30092  __Pyx_TraceCall("__get__", __pyx_f[2], 189, 0, __PYX_ERR(2, 189, __pyx_L1_error));
30093  __Pyx_XDECREF(__pyx_r);
30094  __Pyx_INCREF(__pyx_v_self->Shape);
30095  __pyx_r = __pyx_v_self->Shape;
30096  goto __pyx_L0;
30097 
30098  /* function exit code */
30099  __pyx_L1_error:;
30100  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30101  __pyx_r = NULL;
30102  __pyx_L0:;
30103  __Pyx_XGIVEREF(__pyx_r);
30104  __Pyx_TraceReturn(__pyx_r, 0);
30105  __Pyx_RefNannyFinishContext();
30106  return __pyx_r;
30107 }
30108 
30109 /* Python wrapper */
30110 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30111 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30112  int __pyx_r;
30113  __Pyx_RefNannyDeclarations
30114  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30115  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30116 
30117  /* function exit code */
30118  __Pyx_RefNannyFinishContext();
30119  return __pyx_r;
30120 }
30121 
30122 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30123  int __pyx_r;
30124  __Pyx_TraceDeclarations
30125  __Pyx_RefNannyDeclarations
30126  int __pyx_lineno = 0;
30127  const char *__pyx_filename = NULL;
30128  int __pyx_clineno = 0;
30129  __Pyx_RefNannySetupContext("__set__", 0);
30130  __Pyx_TraceCall("__set__", __pyx_f[2], 189, 0, __PYX_ERR(2, 189, __pyx_L1_error));
30131  __Pyx_INCREF(__pyx_v_value);
30132  __Pyx_GIVEREF(__pyx_v_value);
30133  __Pyx_GOTREF(__pyx_v_self->Shape);
30134  __Pyx_DECREF(__pyx_v_self->Shape);
30135  __pyx_v_self->Shape = __pyx_v_value;
30136 
30137  /* function exit code */
30138  __pyx_r = 0;
30139  goto __pyx_L0;
30140  __pyx_L1_error:;
30141  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Shape.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30142  __pyx_r = -1;
30143  __pyx_L0:;
30144  __Pyx_TraceReturn(Py_None, 0);
30145  __Pyx_RefNannyFinishContext();
30146  return __pyx_r;
30147 }
30148 
30149 /* Python wrapper */
30150 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_5__del__(PyObject *__pyx_v_self); /*proto*/
30151 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_5__del__(PyObject *__pyx_v_self) {
30152  int __pyx_r;
30153  __Pyx_RefNannyDeclarations
30154  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
30155  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30156 
30157  /* function exit code */
30158  __Pyx_RefNannyFinishContext();
30159  return __pyx_r;
30160 }
30161 
30162 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5Shape_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30163  int __pyx_r;
30164  __Pyx_TraceDeclarations
30165  __Pyx_RefNannyDeclarations
30166  int __pyx_lineno = 0;
30167  const char *__pyx_filename = NULL;
30168  int __pyx_clineno = 0;
30169  __Pyx_RefNannySetupContext("__del__", 0);
30170  __Pyx_TraceCall("__del__", __pyx_f[2], 189, 0, __PYX_ERR(2, 189, __pyx_L1_error));
30171  __Pyx_INCREF(Py_None);
30172  __Pyx_GIVEREF(Py_None);
30173  __Pyx_GOTREF(__pyx_v_self->Shape);
30174  __Pyx_DECREF(__pyx_v_self->Shape);
30175  __pyx_v_self->Shape = Py_None;
30176 
30177  /* function exit code */
30178  __pyx_r = 0;
30179  goto __pyx_L0;
30180  __pyx_L1_error:;
30181  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Shape.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30182  __pyx_r = -1;
30183  __pyx_L0:;
30184  __Pyx_TraceReturn(Py_None, 0);
30185  __Pyx_RefNannyFinishContext();
30186  return __pyx_r;
30187 }
30188 
30189 /* "mbd/CouplingFSI.pxd":190
30190  * ProtChSystem ProtChSystem
30191  * object Shape
30192  * int nd # <<<<<<<<<<<<<<
30193  * double dt
30194  * double width_2D
30195  */
30196 
30197 /* Python wrapper */
30198 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2nd_1__get__(PyObject *__pyx_v_self); /*proto*/
30199 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2nd_1__get__(PyObject *__pyx_v_self) {
30200  PyObject *__pyx_r = 0;
30201  __Pyx_RefNannyDeclarations
30202  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30203  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2nd___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30204 
30205  /* function exit code */
30206  __Pyx_RefNannyFinishContext();
30207  return __pyx_r;
30208 }
30209 
30210 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2nd___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30211  PyObject *__pyx_r = NULL;
30212  __Pyx_TraceDeclarations
30213  __Pyx_RefNannyDeclarations
30214  PyObject *__pyx_t_1 = NULL;
30215  int __pyx_lineno = 0;
30216  const char *__pyx_filename = NULL;
30217  int __pyx_clineno = 0;
30218  __Pyx_RefNannySetupContext("__get__", 0);
30219  __Pyx_TraceCall("__get__", __pyx_f[2], 190, 0, __PYX_ERR(2, 190, __pyx_L1_error));
30220  __Pyx_XDECREF(__pyx_r);
30221  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 190, __pyx_L1_error)
30222  __Pyx_GOTREF(__pyx_t_1);
30223  __pyx_r = __pyx_t_1;
30224  __pyx_t_1 = 0;
30225  goto __pyx_L0;
30226 
30227  /* function exit code */
30228  __pyx_L1_error:;
30229  __Pyx_XDECREF(__pyx_t_1);
30230  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.nd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30231  __pyx_r = NULL;
30232  __pyx_L0:;
30233  __Pyx_XGIVEREF(__pyx_r);
30234  __Pyx_TraceReturn(__pyx_r, 0);
30235  __Pyx_RefNannyFinishContext();
30236  return __pyx_r;
30237 }
30238 
30239 /* Python wrapper */
30240 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30241 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30242  int __pyx_r;
30243  __Pyx_RefNannyDeclarations
30244  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30245  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2nd_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30246 
30247  /* function exit code */
30248  __Pyx_RefNannyFinishContext();
30249  return __pyx_r;
30250 }
30251 
30252 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2nd_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30253  int __pyx_r;
30254  __Pyx_TraceDeclarations
30255  __Pyx_RefNannyDeclarations
30256  int __pyx_t_1;
30257  int __pyx_lineno = 0;
30258  const char *__pyx_filename = NULL;
30259  int __pyx_clineno = 0;
30260  __Pyx_RefNannySetupContext("__set__", 0);
30261  __Pyx_TraceCall("__set__", __pyx_f[2], 190, 0, __PYX_ERR(2, 190, __pyx_L1_error));
30262  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 190, __pyx_L1_error)
30263  __pyx_v_self->nd = __pyx_t_1;
30264 
30265  /* function exit code */
30266  __pyx_r = 0;
30267  goto __pyx_L0;
30268  __pyx_L1_error:;
30269  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.nd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30270  __pyx_r = -1;
30271  __pyx_L0:;
30272  __Pyx_TraceReturn(Py_None, 0);
30273  __Pyx_RefNannyFinishContext();
30274  return __pyx_r;
30275 }
30276 
30277 /* "mbd/CouplingFSI.pxd":191
30278  * object Shape
30279  * int nd
30280  * double dt # <<<<<<<<<<<<<<
30281  * double width_2D
30282  * object record_dict
30283  */
30284 
30285 /* Python wrapper */
30286 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2dt_1__get__(PyObject *__pyx_v_self); /*proto*/
30287 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2dt_1__get__(PyObject *__pyx_v_self) {
30288  PyObject *__pyx_r = 0;
30289  __Pyx_RefNannyDeclarations
30290  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30291  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2dt___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30292 
30293  /* function exit code */
30294  __Pyx_RefNannyFinishContext();
30295  return __pyx_r;
30296 }
30297 
30298 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2dt___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30299  PyObject *__pyx_r = NULL;
30300  __Pyx_TraceDeclarations
30301  __Pyx_RefNannyDeclarations
30302  PyObject *__pyx_t_1 = NULL;
30303  int __pyx_lineno = 0;
30304  const char *__pyx_filename = NULL;
30305  int __pyx_clineno = 0;
30306  __Pyx_RefNannySetupContext("__get__", 0);
30307  __Pyx_TraceCall("__get__", __pyx_f[2], 191, 0, __PYX_ERR(2, 191, __pyx_L1_error));
30308  __Pyx_XDECREF(__pyx_r);
30309  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 191, __pyx_L1_error)
30310  __Pyx_GOTREF(__pyx_t_1);
30311  __pyx_r = __pyx_t_1;
30312  __pyx_t_1 = 0;
30313  goto __pyx_L0;
30314 
30315  /* function exit code */
30316  __pyx_L1_error:;
30317  __Pyx_XDECREF(__pyx_t_1);
30318  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.dt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30319  __pyx_r = NULL;
30320  __pyx_L0:;
30321  __Pyx_XGIVEREF(__pyx_r);
30322  __Pyx_TraceReturn(__pyx_r, 0);
30323  __Pyx_RefNannyFinishContext();
30324  return __pyx_r;
30325 }
30326 
30327 /* Python wrapper */
30328 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2dt_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30329 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2dt_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30330  int __pyx_r;
30331  __Pyx_RefNannyDeclarations
30332  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30333  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2dt_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30334 
30335  /* function exit code */
30336  __Pyx_RefNannyFinishContext();
30337  return __pyx_r;
30338 }
30339 
30340 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_2dt_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30341  int __pyx_r;
30342  __Pyx_TraceDeclarations
30343  __Pyx_RefNannyDeclarations
30344  double __pyx_t_1;
30345  int __pyx_lineno = 0;
30346  const char *__pyx_filename = NULL;
30347  int __pyx_clineno = 0;
30348  __Pyx_RefNannySetupContext("__set__", 0);
30349  __Pyx_TraceCall("__set__", __pyx_f[2], 191, 0, __PYX_ERR(2, 191, __pyx_L1_error));
30350  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 191, __pyx_L1_error)
30351  __pyx_v_self->dt = __pyx_t_1;
30352 
30353  /* function exit code */
30354  __pyx_r = 0;
30355  goto __pyx_L0;
30356  __pyx_L1_error:;
30357  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.dt.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30358  __pyx_r = -1;
30359  __pyx_L0:;
30360  __Pyx_TraceReturn(Py_None, 0);
30361  __Pyx_RefNannyFinishContext();
30362  return __pyx_r;
30363 }
30364 
30365 /* "mbd/CouplingFSI.pxd":192
30366  * int nd
30367  * double dt
30368  * double width_2D # <<<<<<<<<<<<<<
30369  * object record_dict
30370  * object prescribed_motion_function
30371  */
30372 
30373 /* Python wrapper */
30374 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8width_2D_1__get__(PyObject *__pyx_v_self); /*proto*/
30375 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8width_2D_1__get__(PyObject *__pyx_v_self) {
30376  PyObject *__pyx_r = 0;
30377  __Pyx_RefNannyDeclarations
30378  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30379  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8width_2D___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30380 
30381  /* function exit code */
30382  __Pyx_RefNannyFinishContext();
30383  return __pyx_r;
30384 }
30385 
30386 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8width_2D___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30387  PyObject *__pyx_r = NULL;
30388  __Pyx_TraceDeclarations
30389  __Pyx_RefNannyDeclarations
30390  PyObject *__pyx_t_1 = NULL;
30391  int __pyx_lineno = 0;
30392  const char *__pyx_filename = NULL;
30393  int __pyx_clineno = 0;
30394  __Pyx_RefNannySetupContext("__get__", 0);
30395  __Pyx_TraceCall("__get__", __pyx_f[2], 192, 0, __PYX_ERR(2, 192, __pyx_L1_error));
30396  __Pyx_XDECREF(__pyx_r);
30397  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->width_2D); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 192, __pyx_L1_error)
30398  __Pyx_GOTREF(__pyx_t_1);
30399  __pyx_r = __pyx_t_1;
30400  __pyx_t_1 = 0;
30401  goto __pyx_L0;
30402 
30403  /* function exit code */
30404  __pyx_L1_error:;
30405  __Pyx_XDECREF(__pyx_t_1);
30406  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.width_2D.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30407  __pyx_r = NULL;
30408  __pyx_L0:;
30409  __Pyx_XGIVEREF(__pyx_r);
30410  __Pyx_TraceReturn(__pyx_r, 0);
30411  __Pyx_RefNannyFinishContext();
30412  return __pyx_r;
30413 }
30414 
30415 /* Python wrapper */
30416 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8width_2D_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30417 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8width_2D_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30418  int __pyx_r;
30419  __Pyx_RefNannyDeclarations
30420  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30421  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8width_2D_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30422 
30423  /* function exit code */
30424  __Pyx_RefNannyFinishContext();
30425  return __pyx_r;
30426 }
30427 
30428 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8width_2D_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30429  int __pyx_r;
30430  __Pyx_TraceDeclarations
30431  __Pyx_RefNannyDeclarations
30432  double __pyx_t_1;
30433  int __pyx_lineno = 0;
30434  const char *__pyx_filename = NULL;
30435  int __pyx_clineno = 0;
30436  __Pyx_RefNannySetupContext("__set__", 0);
30437  __Pyx_TraceCall("__set__", __pyx_f[2], 192, 0, __PYX_ERR(2, 192, __pyx_L1_error));
30438  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 192, __pyx_L1_error)
30439  __pyx_v_self->width_2D = __pyx_t_1;
30440 
30441  /* function exit code */
30442  __pyx_r = 0;
30443  goto __pyx_L0;
30444  __pyx_L1_error:;
30445  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.width_2D.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30446  __pyx_r = -1;
30447  __pyx_L0:;
30448  __Pyx_TraceReturn(Py_None, 0);
30449  __Pyx_RefNannyFinishContext();
30450  return __pyx_r;
30451 }
30452 
30453 /* "mbd/CouplingFSI.pxd":193
30454  * double dt
30455  * double width_2D
30456  * object record_dict # <<<<<<<<<<<<<<
30457  * object prescribed_motion_function
30458  * object ChBody
30459  */
30460 
30461 /* Python wrapper */
30462 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_1__get__(PyObject *__pyx_v_self); /*proto*/
30463 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_1__get__(PyObject *__pyx_v_self) {
30464  PyObject *__pyx_r = 0;
30465  __Pyx_RefNannyDeclarations
30466  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30467  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30468 
30469  /* function exit code */
30470  __Pyx_RefNannyFinishContext();
30471  return __pyx_r;
30472 }
30473 
30474 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30475  PyObject *__pyx_r = NULL;
30476  __Pyx_TraceDeclarations
30477  __Pyx_RefNannyDeclarations
30478  int __pyx_lineno = 0;
30479  const char *__pyx_filename = NULL;
30480  int __pyx_clineno = 0;
30481  __Pyx_RefNannySetupContext("__get__", 0);
30482  __Pyx_TraceCall("__get__", __pyx_f[2], 193, 0, __PYX_ERR(2, 193, __pyx_L1_error));
30483  __Pyx_XDECREF(__pyx_r);
30484  __Pyx_INCREF(__pyx_v_self->record_dict);
30485  __pyx_r = __pyx_v_self->record_dict;
30486  goto __pyx_L0;
30487 
30488  /* function exit code */
30489  __pyx_L1_error:;
30490  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.record_dict.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30491  __pyx_r = NULL;
30492  __pyx_L0:;
30493  __Pyx_XGIVEREF(__pyx_r);
30494  __Pyx_TraceReturn(__pyx_r, 0);
30495  __Pyx_RefNannyFinishContext();
30496  return __pyx_r;
30497 }
30498 
30499 /* Python wrapper */
30500 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30501 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30502  int __pyx_r;
30503  __Pyx_RefNannyDeclarations
30504  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30505  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30506 
30507  /* function exit code */
30508  __Pyx_RefNannyFinishContext();
30509  return __pyx_r;
30510 }
30511 
30512 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30513  int __pyx_r;
30514  __Pyx_TraceDeclarations
30515  __Pyx_RefNannyDeclarations
30516  int __pyx_lineno = 0;
30517  const char *__pyx_filename = NULL;
30518  int __pyx_clineno = 0;
30519  __Pyx_RefNannySetupContext("__set__", 0);
30520  __Pyx_TraceCall("__set__", __pyx_f[2], 193, 0, __PYX_ERR(2, 193, __pyx_L1_error));
30521  __Pyx_INCREF(__pyx_v_value);
30522  __Pyx_GIVEREF(__pyx_v_value);
30523  __Pyx_GOTREF(__pyx_v_self->record_dict);
30524  __Pyx_DECREF(__pyx_v_self->record_dict);
30525  __pyx_v_self->record_dict = __pyx_v_value;
30526 
30527  /* function exit code */
30528  __pyx_r = 0;
30529  goto __pyx_L0;
30530  __pyx_L1_error:;
30531  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.record_dict.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30532  __pyx_r = -1;
30533  __pyx_L0:;
30534  __Pyx_TraceReturn(Py_None, 0);
30535  __Pyx_RefNannyFinishContext();
30536  return __pyx_r;
30537 }
30538 
30539 /* Python wrapper */
30540 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_5__del__(PyObject *__pyx_v_self); /*proto*/
30541 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_5__del__(PyObject *__pyx_v_self) {
30542  int __pyx_r;
30543  __Pyx_RefNannyDeclarations
30544  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
30545  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30546 
30547  /* function exit code */
30548  __Pyx_RefNannyFinishContext();
30549  return __pyx_r;
30550 }
30551 
30552 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11record_dict_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30553  int __pyx_r;
30554  __Pyx_TraceDeclarations
30555  __Pyx_RefNannyDeclarations
30556  int __pyx_lineno = 0;
30557  const char *__pyx_filename = NULL;
30558  int __pyx_clineno = 0;
30559  __Pyx_RefNannySetupContext("__del__", 0);
30560  __Pyx_TraceCall("__del__", __pyx_f[2], 193, 0, __PYX_ERR(2, 193, __pyx_L1_error));
30561  __Pyx_INCREF(Py_None);
30562  __Pyx_GIVEREF(Py_None);
30563  __Pyx_GOTREF(__pyx_v_self->record_dict);
30564  __Pyx_DECREF(__pyx_v_self->record_dict);
30565  __pyx_v_self->record_dict = Py_None;
30566 
30567  /* function exit code */
30568  __pyx_r = 0;
30569  goto __pyx_L0;
30570  __pyx_L1_error:;
30571  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.record_dict.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30572  __pyx_r = -1;
30573  __pyx_L0:;
30574  __Pyx_TraceReturn(Py_None, 0);
30575  __Pyx_RefNannyFinishContext();
30576  return __pyx_r;
30577 }
30578 
30579 /* "mbd/CouplingFSI.pxd":194
30580  * double width_2D
30581  * object record_dict
30582  * object prescribed_motion_function # <<<<<<<<<<<<<<
30583  * object ChBody
30584  * ChBodyAddedMass ChBodyAddedMass
30585  */
30586 
30587 /* Python wrapper */
30588 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_1__get__(PyObject *__pyx_v_self); /*proto*/
30589 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_1__get__(PyObject *__pyx_v_self) {
30590  PyObject *__pyx_r = 0;
30591  __Pyx_RefNannyDeclarations
30592  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30593  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30594 
30595  /* function exit code */
30596  __Pyx_RefNannyFinishContext();
30597  return __pyx_r;
30598 }
30599 
30600 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30601  PyObject *__pyx_r = NULL;
30602  __Pyx_TraceDeclarations
30603  __Pyx_RefNannyDeclarations
30604  int __pyx_lineno = 0;
30605  const char *__pyx_filename = NULL;
30606  int __pyx_clineno = 0;
30607  __Pyx_RefNannySetupContext("__get__", 0);
30608  __Pyx_TraceCall("__get__", __pyx_f[2], 194, 0, __PYX_ERR(2, 194, __pyx_L1_error));
30609  __Pyx_XDECREF(__pyx_r);
30610  __Pyx_INCREF(__pyx_v_self->prescribed_motion_function);
30611  __pyx_r = __pyx_v_self->prescribed_motion_function;
30612  goto __pyx_L0;
30613 
30614  /* function exit code */
30615  __pyx_L1_error:;
30616  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.prescribed_motion_function.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30617  __pyx_r = NULL;
30618  __pyx_L0:;
30619  __Pyx_XGIVEREF(__pyx_r);
30620  __Pyx_TraceReturn(__pyx_r, 0);
30621  __Pyx_RefNannyFinishContext();
30622  return __pyx_r;
30623 }
30624 
30625 /* Python wrapper */
30626 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30627 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30628  int __pyx_r;
30629  __Pyx_RefNannyDeclarations
30630  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30631  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30632 
30633  /* function exit code */
30634  __Pyx_RefNannyFinishContext();
30635  return __pyx_r;
30636 }
30637 
30638 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30639  int __pyx_r;
30640  __Pyx_TraceDeclarations
30641  __Pyx_RefNannyDeclarations
30642  int __pyx_lineno = 0;
30643  const char *__pyx_filename = NULL;
30644  int __pyx_clineno = 0;
30645  __Pyx_RefNannySetupContext("__set__", 0);
30646  __Pyx_TraceCall("__set__", __pyx_f[2], 194, 0, __PYX_ERR(2, 194, __pyx_L1_error));
30647  __Pyx_INCREF(__pyx_v_value);
30648  __Pyx_GIVEREF(__pyx_v_value);
30649  __Pyx_GOTREF(__pyx_v_self->prescribed_motion_function);
30650  __Pyx_DECREF(__pyx_v_self->prescribed_motion_function);
30651  __pyx_v_self->prescribed_motion_function = __pyx_v_value;
30652 
30653  /* function exit code */
30654  __pyx_r = 0;
30655  goto __pyx_L0;
30656  __pyx_L1_error:;
30657  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.prescribed_motion_function.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30658  __pyx_r = -1;
30659  __pyx_L0:;
30660  __Pyx_TraceReturn(Py_None, 0);
30661  __Pyx_RefNannyFinishContext();
30662  return __pyx_r;
30663 }
30664 
30665 /* Python wrapper */
30666 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_5__del__(PyObject *__pyx_v_self); /*proto*/
30667 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_5__del__(PyObject *__pyx_v_self) {
30668  int __pyx_r;
30669  __Pyx_RefNannyDeclarations
30670  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
30671  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30672 
30673  /* function exit code */
30674  __Pyx_RefNannyFinishContext();
30675  return __pyx_r;
30676 }
30677 
30678 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30679  int __pyx_r;
30680  __Pyx_TraceDeclarations
30681  __Pyx_RefNannyDeclarations
30682  int __pyx_lineno = 0;
30683  const char *__pyx_filename = NULL;
30684  int __pyx_clineno = 0;
30685  __Pyx_RefNannySetupContext("__del__", 0);
30686  __Pyx_TraceCall("__del__", __pyx_f[2], 194, 0, __PYX_ERR(2, 194, __pyx_L1_error));
30687  __Pyx_INCREF(Py_None);
30688  __Pyx_GIVEREF(Py_None);
30689  __Pyx_GOTREF(__pyx_v_self->prescribed_motion_function);
30690  __Pyx_DECREF(__pyx_v_self->prescribed_motion_function);
30691  __pyx_v_self->prescribed_motion_function = Py_None;
30692 
30693  /* function exit code */
30694  __pyx_r = 0;
30695  goto __pyx_L0;
30696  __pyx_L1_error:;
30697  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.prescribed_motion_function.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30698  __pyx_r = -1;
30699  __pyx_L0:;
30700  __Pyx_TraceReturn(Py_None, 0);
30701  __Pyx_RefNannyFinishContext();
30702  return __pyx_r;
30703 }
30704 
30705 /* "mbd/CouplingFSI.pxd":195
30706  * object record_dict
30707  * object prescribed_motion_function
30708  * object ChBody # <<<<<<<<<<<<<<
30709  * ChBodyAddedMass ChBodyAddedMass
30710  * np.ndarray position
30711  */
30712 
30713 /* Python wrapper */
30714 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_1__get__(PyObject *__pyx_v_self); /*proto*/
30715 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_1__get__(PyObject *__pyx_v_self) {
30716  PyObject *__pyx_r = 0;
30717  __Pyx_RefNannyDeclarations
30718  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30719  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30720 
30721  /* function exit code */
30722  __Pyx_RefNannyFinishContext();
30723  return __pyx_r;
30724 }
30725 
30726 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30727  PyObject *__pyx_r = NULL;
30728  __Pyx_TraceDeclarations
30729  __Pyx_RefNannyDeclarations
30730  int __pyx_lineno = 0;
30731  const char *__pyx_filename = NULL;
30732  int __pyx_clineno = 0;
30733  __Pyx_RefNannySetupContext("__get__", 0);
30734  __Pyx_TraceCall("__get__", __pyx_f[2], 195, 0, __PYX_ERR(2, 195, __pyx_L1_error));
30735  __Pyx_XDECREF(__pyx_r);
30736  __Pyx_INCREF(__pyx_v_self->ChBody);
30737  __pyx_r = __pyx_v_self->ChBody;
30738  goto __pyx_L0;
30739 
30740  /* function exit code */
30741  __pyx_L1_error:;
30742  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ChBody.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30743  __pyx_r = NULL;
30744  __pyx_L0:;
30745  __Pyx_XGIVEREF(__pyx_r);
30746  __Pyx_TraceReturn(__pyx_r, 0);
30747  __Pyx_RefNannyFinishContext();
30748  return __pyx_r;
30749 }
30750 
30751 /* Python wrapper */
30752 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30753 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30754  int __pyx_r;
30755  __Pyx_RefNannyDeclarations
30756  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30757  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30758 
30759  /* function exit code */
30760  __Pyx_RefNannyFinishContext();
30761  return __pyx_r;
30762 }
30763 
30764 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30765  int __pyx_r;
30766  __Pyx_TraceDeclarations
30767  __Pyx_RefNannyDeclarations
30768  int __pyx_lineno = 0;
30769  const char *__pyx_filename = NULL;
30770  int __pyx_clineno = 0;
30771  __Pyx_RefNannySetupContext("__set__", 0);
30772  __Pyx_TraceCall("__set__", __pyx_f[2], 195, 0, __PYX_ERR(2, 195, __pyx_L1_error));
30773  __Pyx_INCREF(__pyx_v_value);
30774  __Pyx_GIVEREF(__pyx_v_value);
30775  __Pyx_GOTREF(__pyx_v_self->ChBody);
30776  __Pyx_DECREF(__pyx_v_self->ChBody);
30777  __pyx_v_self->ChBody = __pyx_v_value;
30778 
30779  /* function exit code */
30780  __pyx_r = 0;
30781  goto __pyx_L0;
30782  __pyx_L1_error:;
30783  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ChBody.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30784  __pyx_r = -1;
30785  __pyx_L0:;
30786  __Pyx_TraceReturn(Py_None, 0);
30787  __Pyx_RefNannyFinishContext();
30788  return __pyx_r;
30789 }
30790 
30791 /* Python wrapper */
30792 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_5__del__(PyObject *__pyx_v_self); /*proto*/
30793 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_5__del__(PyObject *__pyx_v_self) {
30794  int __pyx_r;
30795  __Pyx_RefNannyDeclarations
30796  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
30797  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30798 
30799  /* function exit code */
30800  __Pyx_RefNannyFinishContext();
30801  return __pyx_r;
30802 }
30803 
30804 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6ChBody_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30805  int __pyx_r;
30806  __Pyx_TraceDeclarations
30807  __Pyx_RefNannyDeclarations
30808  int __pyx_lineno = 0;
30809  const char *__pyx_filename = NULL;
30810  int __pyx_clineno = 0;
30811  __Pyx_RefNannySetupContext("__del__", 0);
30812  __Pyx_TraceCall("__del__", __pyx_f[2], 195, 0, __PYX_ERR(2, 195, __pyx_L1_error));
30813  __Pyx_INCREF(Py_None);
30814  __Pyx_GIVEREF(Py_None);
30815  __Pyx_GOTREF(__pyx_v_self->ChBody);
30816  __Pyx_DECREF(__pyx_v_self->ChBody);
30817  __pyx_v_self->ChBody = Py_None;
30818 
30819  /* function exit code */
30820  __pyx_r = 0;
30821  goto __pyx_L0;
30822  __pyx_L1_error:;
30823  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ChBody.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30824  __pyx_r = -1;
30825  __pyx_L0:;
30826  __Pyx_TraceReturn(Py_None, 0);
30827  __Pyx_RefNannyFinishContext();
30828  return __pyx_r;
30829 }
30830 
30831 /* "mbd/CouplingFSI.pxd":196
30832  * object prescribed_motion_function
30833  * object ChBody
30834  * ChBodyAddedMass ChBodyAddedMass # <<<<<<<<<<<<<<
30835  * np.ndarray position
30836  * np.ndarray position_last
30837  */
30838 
30839 /* Python wrapper */
30840 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_1__get__(PyObject *__pyx_v_self); /*proto*/
30841 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_1__get__(PyObject *__pyx_v_self) {
30842  PyObject *__pyx_r = 0;
30843  __Pyx_RefNannyDeclarations
30844  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30845  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30846 
30847  /* function exit code */
30848  __Pyx_RefNannyFinishContext();
30849  return __pyx_r;
30850 }
30851 
30852 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30853  PyObject *__pyx_r = NULL;
30854  __Pyx_TraceDeclarations
30855  __Pyx_RefNannyDeclarations
30856  int __pyx_lineno = 0;
30857  const char *__pyx_filename = NULL;
30858  int __pyx_clineno = 0;
30859  __Pyx_RefNannySetupContext("__get__", 0);
30860  __Pyx_TraceCall("__get__", __pyx_f[2], 196, 0, __PYX_ERR(2, 196, __pyx_L1_error));
30861  __Pyx_XDECREF(__pyx_r);
30862  __Pyx_INCREF(((PyObject *)__pyx_v_self->ChBodyAddedMass));
30863  __pyx_r = ((PyObject *)__pyx_v_self->ChBodyAddedMass);
30864  goto __pyx_L0;
30865 
30866  /* function exit code */
30867  __pyx_L1_error:;
30868  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ChBodyAddedMass.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30869  __pyx_r = NULL;
30870  __pyx_L0:;
30871  __Pyx_XGIVEREF(__pyx_r);
30872  __Pyx_TraceReturn(__pyx_r, 0);
30873  __Pyx_RefNannyFinishContext();
30874  return __pyx_r;
30875 }
30876 
30877 /* Python wrapper */
30878 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
30879 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
30880  int __pyx_r;
30881  __Pyx_RefNannyDeclarations
30882  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
30883  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
30884 
30885  /* function exit code */
30886  __Pyx_RefNannyFinishContext();
30887  return __pyx_r;
30888 }
30889 
30890 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
30891  int __pyx_r;
30892  __Pyx_TraceDeclarations
30893  __Pyx_RefNannyDeclarations
30894  PyObject *__pyx_t_1 = NULL;
30895  int __pyx_lineno = 0;
30896  const char *__pyx_filename = NULL;
30897  int __pyx_clineno = 0;
30898  __Pyx_RefNannySetupContext("__set__", 0);
30899  __Pyx_TraceCall("__set__", __pyx_f[2], 196, 0, __PYX_ERR(2, 196, __pyx_L1_error));
30900  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ChBodyAddedMass))))) __PYX_ERR(2, 196, __pyx_L1_error)
30901  __pyx_t_1 = __pyx_v_value;
30902  __Pyx_INCREF(__pyx_t_1);
30903  __Pyx_GIVEREF(__pyx_t_1);
30904  __Pyx_GOTREF(__pyx_v_self->ChBodyAddedMass);
30905  __Pyx_DECREF(((PyObject *)__pyx_v_self->ChBodyAddedMass));
30906  __pyx_v_self->ChBodyAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_t_1);
30907  __pyx_t_1 = 0;
30908 
30909  /* function exit code */
30910  __pyx_r = 0;
30911  goto __pyx_L0;
30912  __pyx_L1_error:;
30913  __Pyx_XDECREF(__pyx_t_1);
30914  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ChBodyAddedMass.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30915  __pyx_r = -1;
30916  __pyx_L0:;
30917  __Pyx_TraceReturn(Py_None, 0);
30918  __Pyx_RefNannyFinishContext();
30919  return __pyx_r;
30920 }
30921 
30922 /* Python wrapper */
30923 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_5__del__(PyObject *__pyx_v_self); /*proto*/
30924 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_5__del__(PyObject *__pyx_v_self) {
30925  int __pyx_r;
30926  __Pyx_RefNannyDeclarations
30927  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
30928  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30929 
30930  /* function exit code */
30931  __Pyx_RefNannyFinishContext();
30932  return __pyx_r;
30933 }
30934 
30935 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30936  int __pyx_r;
30937  __Pyx_TraceDeclarations
30938  __Pyx_RefNannyDeclarations
30939  int __pyx_lineno = 0;
30940  const char *__pyx_filename = NULL;
30941  int __pyx_clineno = 0;
30942  __Pyx_RefNannySetupContext("__del__", 0);
30943  __Pyx_TraceCall("__del__", __pyx_f[2], 196, 0, __PYX_ERR(2, 196, __pyx_L1_error));
30944  __Pyx_INCREF(Py_None);
30945  __Pyx_GIVEREF(Py_None);
30946  __Pyx_GOTREF(__pyx_v_self->ChBodyAddedMass);
30947  __Pyx_DECREF(((PyObject *)__pyx_v_self->ChBodyAddedMass));
30948  __pyx_v_self->ChBodyAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)Py_None);
30949 
30950  /* function exit code */
30951  __pyx_r = 0;
30952  goto __pyx_L0;
30953  __pyx_L1_error:;
30954  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ChBodyAddedMass.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
30955  __pyx_r = -1;
30956  __pyx_L0:;
30957  __Pyx_TraceReturn(Py_None, 0);
30958  __Pyx_RefNannyFinishContext();
30959  return __pyx_r;
30960 }
30961 
30962 /* "mbd/CouplingFSI.pxd":197
30963  * object ChBody
30964  * ChBodyAddedMass ChBodyAddedMass
30965  * np.ndarray position # <<<<<<<<<<<<<<
30966  * np.ndarray position_last
30967  * np.ndarray F # force as retrieved from Chrono
30968  */
30969 
30970 /* Python wrapper */
30971 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_1__get__(PyObject *__pyx_v_self); /*proto*/
30972 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_1__get__(PyObject *__pyx_v_self) {
30973  PyObject *__pyx_r = 0;
30974  __Pyx_RefNannyDeclarations
30975  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
30976  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
30977 
30978  /* function exit code */
30979  __Pyx_RefNannyFinishContext();
30980  return __pyx_r;
30981 }
30982 
30983 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
30984  PyObject *__pyx_r = NULL;
30985  __Pyx_TraceDeclarations
30986  __Pyx_RefNannyDeclarations
30987  int __pyx_lineno = 0;
30988  const char *__pyx_filename = NULL;
30989  int __pyx_clineno = 0;
30990  __Pyx_RefNannySetupContext("__get__", 0);
30991  __Pyx_TraceCall("__get__", __pyx_f[2], 197, 0, __PYX_ERR(2, 197, __pyx_L1_error));
30992  __Pyx_XDECREF(__pyx_r);
30993  __Pyx_INCREF(((PyObject *)__pyx_v_self->position));
30994  __pyx_r = ((PyObject *)__pyx_v_self->position);
30995  goto __pyx_L0;
30996 
30997  /* function exit code */
30998  __pyx_L1_error:;
30999  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.position.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31000  __pyx_r = NULL;
31001  __pyx_L0:;
31002  __Pyx_XGIVEREF(__pyx_r);
31003  __Pyx_TraceReturn(__pyx_r, 0);
31004  __Pyx_RefNannyFinishContext();
31005  return __pyx_r;
31006 }
31007 
31008 /* Python wrapper */
31009 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31010 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31011  int __pyx_r;
31012  __Pyx_RefNannyDeclarations
31013  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31014  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31015 
31016  /* function exit code */
31017  __Pyx_RefNannyFinishContext();
31018  return __pyx_r;
31019 }
31020 
31021 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31022  int __pyx_r;
31023  __Pyx_TraceDeclarations
31024  __Pyx_RefNannyDeclarations
31025  PyObject *__pyx_t_1 = NULL;
31026  int __pyx_lineno = 0;
31027  const char *__pyx_filename = NULL;
31028  int __pyx_clineno = 0;
31029  __Pyx_RefNannySetupContext("__set__", 0);
31030  __Pyx_TraceCall("__set__", __pyx_f[2], 197, 0, __PYX_ERR(2, 197, __pyx_L1_error));
31031  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 197, __pyx_L1_error)
31032  __pyx_t_1 = __pyx_v_value;
31033  __Pyx_INCREF(__pyx_t_1);
31034  __Pyx_GIVEREF(__pyx_t_1);
31035  __Pyx_GOTREF(__pyx_v_self->position);
31036  __Pyx_DECREF(((PyObject *)__pyx_v_self->position));
31037  __pyx_v_self->position = ((PyArrayObject *)__pyx_t_1);
31038  __pyx_t_1 = 0;
31039 
31040  /* function exit code */
31041  __pyx_r = 0;
31042  goto __pyx_L0;
31043  __pyx_L1_error:;
31044  __Pyx_XDECREF(__pyx_t_1);
31045  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.position.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31046  __pyx_r = -1;
31047  __pyx_L0:;
31048  __Pyx_TraceReturn(Py_None, 0);
31049  __Pyx_RefNannyFinishContext();
31050  return __pyx_r;
31051 }
31052 
31053 /* Python wrapper */
31054 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_5__del__(PyObject *__pyx_v_self); /*proto*/
31055 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_5__del__(PyObject *__pyx_v_self) {
31056  int __pyx_r;
31057  __Pyx_RefNannyDeclarations
31058  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31059  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31060 
31061  /* function exit code */
31062  __Pyx_RefNannyFinishContext();
31063  return __pyx_r;
31064 }
31065 
31066 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8position_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31067  int __pyx_r;
31068  __Pyx_TraceDeclarations
31069  __Pyx_RefNannyDeclarations
31070  int __pyx_lineno = 0;
31071  const char *__pyx_filename = NULL;
31072  int __pyx_clineno = 0;
31073  __Pyx_RefNannySetupContext("__del__", 0);
31074  __Pyx_TraceCall("__del__", __pyx_f[2], 197, 0, __PYX_ERR(2, 197, __pyx_L1_error));
31075  __Pyx_INCREF(Py_None);
31076  __Pyx_GIVEREF(Py_None);
31077  __Pyx_GOTREF(__pyx_v_self->position);
31078  __Pyx_DECREF(((PyObject *)__pyx_v_self->position));
31079  __pyx_v_self->position = ((PyArrayObject *)Py_None);
31080 
31081  /* function exit code */
31082  __pyx_r = 0;
31083  goto __pyx_L0;
31084  __pyx_L1_error:;
31085  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.position.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31086  __pyx_r = -1;
31087  __pyx_L0:;
31088  __Pyx_TraceReturn(Py_None, 0);
31089  __Pyx_RefNannyFinishContext();
31090  return __pyx_r;
31091 }
31092 
31093 /* "mbd/CouplingFSI.pxd":198
31094  * ChBodyAddedMass ChBodyAddedMass
31095  * np.ndarray position
31096  * np.ndarray position_last # <<<<<<<<<<<<<<
31097  * np.ndarray F # force as retrieved from Chrono
31098  * np.ndarray M # moment as retreived from Chrono
31099  */
31100 
31101 /* Python wrapper */
31102 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_1__get__(PyObject *__pyx_v_self); /*proto*/
31103 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_1__get__(PyObject *__pyx_v_self) {
31104  PyObject *__pyx_r = 0;
31105  __Pyx_RefNannyDeclarations
31106  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
31107  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31108 
31109  /* function exit code */
31110  __Pyx_RefNannyFinishContext();
31111  return __pyx_r;
31112 }
31113 
31114 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31115  PyObject *__pyx_r = NULL;
31116  __Pyx_TraceDeclarations
31117  __Pyx_RefNannyDeclarations
31118  int __pyx_lineno = 0;
31119  const char *__pyx_filename = NULL;
31120  int __pyx_clineno = 0;
31121  __Pyx_RefNannySetupContext("__get__", 0);
31122  __Pyx_TraceCall("__get__", __pyx_f[2], 198, 0, __PYX_ERR(2, 198, __pyx_L1_error));
31123  __Pyx_XDECREF(__pyx_r);
31124  __Pyx_INCREF(((PyObject *)__pyx_v_self->position_last));
31125  __pyx_r = ((PyObject *)__pyx_v_self->position_last);
31126  goto __pyx_L0;
31127 
31128  /* function exit code */
31129  __pyx_L1_error:;
31130  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.position_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31131  __pyx_r = NULL;
31132  __pyx_L0:;
31133  __Pyx_XGIVEREF(__pyx_r);
31134  __Pyx_TraceReturn(__pyx_r, 0);
31135  __Pyx_RefNannyFinishContext();
31136  return __pyx_r;
31137 }
31138 
31139 /* Python wrapper */
31140 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31141 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31142  int __pyx_r;
31143  __Pyx_RefNannyDeclarations
31144  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31145  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31146 
31147  /* function exit code */
31148  __Pyx_RefNannyFinishContext();
31149  return __pyx_r;
31150 }
31151 
31152 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31153  int __pyx_r;
31154  __Pyx_TraceDeclarations
31155  __Pyx_RefNannyDeclarations
31156  PyObject *__pyx_t_1 = NULL;
31157  int __pyx_lineno = 0;
31158  const char *__pyx_filename = NULL;
31159  int __pyx_clineno = 0;
31160  __Pyx_RefNannySetupContext("__set__", 0);
31161  __Pyx_TraceCall("__set__", __pyx_f[2], 198, 0, __PYX_ERR(2, 198, __pyx_L1_error));
31162  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 198, __pyx_L1_error)
31163  __pyx_t_1 = __pyx_v_value;
31164  __Pyx_INCREF(__pyx_t_1);
31165  __Pyx_GIVEREF(__pyx_t_1);
31166  __Pyx_GOTREF(__pyx_v_self->position_last);
31167  __Pyx_DECREF(((PyObject *)__pyx_v_self->position_last));
31168  __pyx_v_self->position_last = ((PyArrayObject *)__pyx_t_1);
31169  __pyx_t_1 = 0;
31170 
31171  /* function exit code */
31172  __pyx_r = 0;
31173  goto __pyx_L0;
31174  __pyx_L1_error:;
31175  __Pyx_XDECREF(__pyx_t_1);
31176  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.position_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31177  __pyx_r = -1;
31178  __pyx_L0:;
31179  __Pyx_TraceReturn(Py_None, 0);
31180  __Pyx_RefNannyFinishContext();
31181  return __pyx_r;
31182 }
31183 
31184 /* Python wrapper */
31185 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_5__del__(PyObject *__pyx_v_self); /*proto*/
31186 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_5__del__(PyObject *__pyx_v_self) {
31187  int __pyx_r;
31188  __Pyx_RefNannyDeclarations
31189  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31190  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31191 
31192  /* function exit code */
31193  __Pyx_RefNannyFinishContext();
31194  return __pyx_r;
31195 }
31196 
31197 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13position_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31198  int __pyx_r;
31199  __Pyx_TraceDeclarations
31200  __Pyx_RefNannyDeclarations
31201  int __pyx_lineno = 0;
31202  const char *__pyx_filename = NULL;
31203  int __pyx_clineno = 0;
31204  __Pyx_RefNannySetupContext("__del__", 0);
31205  __Pyx_TraceCall("__del__", __pyx_f[2], 198, 0, __PYX_ERR(2, 198, __pyx_L1_error));
31206  __Pyx_INCREF(Py_None);
31207  __Pyx_GIVEREF(Py_None);
31208  __Pyx_GOTREF(__pyx_v_self->position_last);
31209  __Pyx_DECREF(((PyObject *)__pyx_v_self->position_last));
31210  __pyx_v_self->position_last = ((PyArrayObject *)Py_None);
31211 
31212  /* function exit code */
31213  __pyx_r = 0;
31214  goto __pyx_L0;
31215  __pyx_L1_error:;
31216  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.position_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31217  __pyx_r = -1;
31218  __pyx_L0:;
31219  __Pyx_TraceReturn(Py_None, 0);
31220  __Pyx_RefNannyFinishContext();
31221  return __pyx_r;
31222 }
31223 
31224 /* "mbd/CouplingFSI.pxd":199
31225  * np.ndarray position
31226  * np.ndarray position_last
31227  * np.ndarray F # force as retrieved from Chrono # <<<<<<<<<<<<<<
31228  * np.ndarray M # moment as retreived from Chrono
31229  * np.ndarray F_last
31230  */
31231 
31232 /* Python wrapper */
31233 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_1__get__(PyObject *__pyx_v_self); /*proto*/
31234 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_1__get__(PyObject *__pyx_v_self) {
31235  PyObject *__pyx_r = 0;
31236  __Pyx_RefNannyDeclarations
31237  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
31238  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31239 
31240  /* function exit code */
31241  __Pyx_RefNannyFinishContext();
31242  return __pyx_r;
31243 }
31244 
31245 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31246  PyObject *__pyx_r = NULL;
31247  __Pyx_TraceDeclarations
31248  __Pyx_RefNannyDeclarations
31249  int __pyx_lineno = 0;
31250  const char *__pyx_filename = NULL;
31251  int __pyx_clineno = 0;
31252  __Pyx_RefNannySetupContext("__get__", 0);
31253  __Pyx_TraceCall("__get__", __pyx_f[2], 199, 0, __PYX_ERR(2, 199, __pyx_L1_error));
31254  __Pyx_XDECREF(__pyx_r);
31255  __Pyx_INCREF(((PyObject *)__pyx_v_self->F));
31256  __pyx_r = ((PyObject *)__pyx_v_self->F);
31257  goto __pyx_L0;
31258 
31259  /* function exit code */
31260  __pyx_L1_error:;
31261  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31262  __pyx_r = NULL;
31263  __pyx_L0:;
31264  __Pyx_XGIVEREF(__pyx_r);
31265  __Pyx_TraceReturn(__pyx_r, 0);
31266  __Pyx_RefNannyFinishContext();
31267  return __pyx_r;
31268 }
31269 
31270 /* Python wrapper */
31271 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31272 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31273  int __pyx_r;
31274  __Pyx_RefNannyDeclarations
31275  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31276  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31277 
31278  /* function exit code */
31279  __Pyx_RefNannyFinishContext();
31280  return __pyx_r;
31281 }
31282 
31283 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31284  int __pyx_r;
31285  __Pyx_TraceDeclarations
31286  __Pyx_RefNannyDeclarations
31287  PyObject *__pyx_t_1 = NULL;
31288  int __pyx_lineno = 0;
31289  const char *__pyx_filename = NULL;
31290  int __pyx_clineno = 0;
31291  __Pyx_RefNannySetupContext("__set__", 0);
31292  __Pyx_TraceCall("__set__", __pyx_f[2], 199, 0, __PYX_ERR(2, 199, __pyx_L1_error));
31293  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 199, __pyx_L1_error)
31294  __pyx_t_1 = __pyx_v_value;
31295  __Pyx_INCREF(__pyx_t_1);
31296  __Pyx_GIVEREF(__pyx_t_1);
31297  __Pyx_GOTREF(__pyx_v_self->F);
31298  __Pyx_DECREF(((PyObject *)__pyx_v_self->F));
31299  __pyx_v_self->F = ((PyArrayObject *)__pyx_t_1);
31300  __pyx_t_1 = 0;
31301 
31302  /* function exit code */
31303  __pyx_r = 0;
31304  goto __pyx_L0;
31305  __pyx_L1_error:;
31306  __Pyx_XDECREF(__pyx_t_1);
31307  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31308  __pyx_r = -1;
31309  __pyx_L0:;
31310  __Pyx_TraceReturn(Py_None, 0);
31311  __Pyx_RefNannyFinishContext();
31312  return __pyx_r;
31313 }
31314 
31315 /* Python wrapper */
31316 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_5__del__(PyObject *__pyx_v_self); /*proto*/
31317 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_5__del__(PyObject *__pyx_v_self) {
31318  int __pyx_r;
31319  __Pyx_RefNannyDeclarations
31320  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31321  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31322 
31323  /* function exit code */
31324  __Pyx_RefNannyFinishContext();
31325  return __pyx_r;
31326 }
31327 
31328 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1F_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31329  int __pyx_r;
31330  __Pyx_TraceDeclarations
31331  __Pyx_RefNannyDeclarations
31332  int __pyx_lineno = 0;
31333  const char *__pyx_filename = NULL;
31334  int __pyx_clineno = 0;
31335  __Pyx_RefNannySetupContext("__del__", 0);
31336  __Pyx_TraceCall("__del__", __pyx_f[2], 199, 0, __PYX_ERR(2, 199, __pyx_L1_error));
31337  __Pyx_INCREF(Py_None);
31338  __Pyx_GIVEREF(Py_None);
31339  __Pyx_GOTREF(__pyx_v_self->F);
31340  __Pyx_DECREF(((PyObject *)__pyx_v_self->F));
31341  __pyx_v_self->F = ((PyArrayObject *)Py_None);
31342 
31343  /* function exit code */
31344  __pyx_r = 0;
31345  goto __pyx_L0;
31346  __pyx_L1_error:;
31347  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31348  __pyx_r = -1;
31349  __pyx_L0:;
31350  __Pyx_TraceReturn(Py_None, 0);
31351  __Pyx_RefNannyFinishContext();
31352  return __pyx_r;
31353 }
31354 
31355 /* "mbd/CouplingFSI.pxd":200
31356  * np.ndarray position_last
31357  * np.ndarray F # force as retrieved from Chrono
31358  * np.ndarray M # moment as retreived from Chrono # <<<<<<<<<<<<<<
31359  * np.ndarray F_last
31360  * np.ndarray M_last
31361  */
31362 
31363 /* Python wrapper */
31364 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_1__get__(PyObject *__pyx_v_self); /*proto*/
31365 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_1__get__(PyObject *__pyx_v_self) {
31366  PyObject *__pyx_r = 0;
31367  __Pyx_RefNannyDeclarations
31368  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
31369  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31370 
31371  /* function exit code */
31372  __Pyx_RefNannyFinishContext();
31373  return __pyx_r;
31374 }
31375 
31376 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31377  PyObject *__pyx_r = NULL;
31378  __Pyx_TraceDeclarations
31379  __Pyx_RefNannyDeclarations
31380  int __pyx_lineno = 0;
31381  const char *__pyx_filename = NULL;
31382  int __pyx_clineno = 0;
31383  __Pyx_RefNannySetupContext("__get__", 0);
31384  __Pyx_TraceCall("__get__", __pyx_f[2], 200, 0, __PYX_ERR(2, 200, __pyx_L1_error));
31385  __Pyx_XDECREF(__pyx_r);
31386  __Pyx_INCREF(((PyObject *)__pyx_v_self->M));
31387  __pyx_r = ((PyObject *)__pyx_v_self->M);
31388  goto __pyx_L0;
31389 
31390  /* function exit code */
31391  __pyx_L1_error:;
31392  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31393  __pyx_r = NULL;
31394  __pyx_L0:;
31395  __Pyx_XGIVEREF(__pyx_r);
31396  __Pyx_TraceReturn(__pyx_r, 0);
31397  __Pyx_RefNannyFinishContext();
31398  return __pyx_r;
31399 }
31400 
31401 /* Python wrapper */
31402 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31403 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31404  int __pyx_r;
31405  __Pyx_RefNannyDeclarations
31406  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31407  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31408 
31409  /* function exit code */
31410  __Pyx_RefNannyFinishContext();
31411  return __pyx_r;
31412 }
31413 
31414 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31415  int __pyx_r;
31416  __Pyx_TraceDeclarations
31417  __Pyx_RefNannyDeclarations
31418  PyObject *__pyx_t_1 = NULL;
31419  int __pyx_lineno = 0;
31420  const char *__pyx_filename = NULL;
31421  int __pyx_clineno = 0;
31422  __Pyx_RefNannySetupContext("__set__", 0);
31423  __Pyx_TraceCall("__set__", __pyx_f[2], 200, 0, __PYX_ERR(2, 200, __pyx_L1_error));
31424  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 200, __pyx_L1_error)
31425  __pyx_t_1 = __pyx_v_value;
31426  __Pyx_INCREF(__pyx_t_1);
31427  __Pyx_GIVEREF(__pyx_t_1);
31428  __Pyx_GOTREF(__pyx_v_self->M);
31429  __Pyx_DECREF(((PyObject *)__pyx_v_self->M));
31430  __pyx_v_self->M = ((PyArrayObject *)__pyx_t_1);
31431  __pyx_t_1 = 0;
31432 
31433  /* function exit code */
31434  __pyx_r = 0;
31435  goto __pyx_L0;
31436  __pyx_L1_error:;
31437  __Pyx_XDECREF(__pyx_t_1);
31438  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31439  __pyx_r = -1;
31440  __pyx_L0:;
31441  __Pyx_TraceReturn(Py_None, 0);
31442  __Pyx_RefNannyFinishContext();
31443  return __pyx_r;
31444 }
31445 
31446 /* Python wrapper */
31447 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_5__del__(PyObject *__pyx_v_self); /*proto*/
31448 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_5__del__(PyObject *__pyx_v_self) {
31449  int __pyx_r;
31450  __Pyx_RefNannyDeclarations
31451  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31452  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31453 
31454  /* function exit code */
31455  __Pyx_RefNannyFinishContext();
31456  return __pyx_r;
31457 }
31458 
31459 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_1M_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31460  int __pyx_r;
31461  __Pyx_TraceDeclarations
31462  __Pyx_RefNannyDeclarations
31463  int __pyx_lineno = 0;
31464  const char *__pyx_filename = NULL;
31465  int __pyx_clineno = 0;
31466  __Pyx_RefNannySetupContext("__del__", 0);
31467  __Pyx_TraceCall("__del__", __pyx_f[2], 200, 0, __PYX_ERR(2, 200, __pyx_L1_error));
31468  __Pyx_INCREF(Py_None);
31469  __Pyx_GIVEREF(Py_None);
31470  __Pyx_GOTREF(__pyx_v_self->M);
31471  __Pyx_DECREF(((PyObject *)__pyx_v_self->M));
31472  __pyx_v_self->M = ((PyArrayObject *)Py_None);
31473 
31474  /* function exit code */
31475  __pyx_r = 0;
31476  goto __pyx_L0;
31477  __pyx_L1_error:;
31478  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31479  __pyx_r = -1;
31480  __pyx_L0:;
31481  __Pyx_TraceReturn(Py_None, 0);
31482  __Pyx_RefNannyFinishContext();
31483  return __pyx_r;
31484 }
31485 
31486 /* "mbd/CouplingFSI.pxd":201
31487  * np.ndarray F # force as retrieved from Chrono
31488  * np.ndarray M # moment as retreived from Chrono
31489  * np.ndarray F_last # <<<<<<<<<<<<<<
31490  * np.ndarray M_last
31491  * np.ndarray F_prot # force retrieved from Proteus (fluid)
31492  */
31493 
31494 /* Python wrapper */
31495 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_1__get__(PyObject *__pyx_v_self); /*proto*/
31496 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_1__get__(PyObject *__pyx_v_self) {
31497  PyObject *__pyx_r = 0;
31498  __Pyx_RefNannyDeclarations
31499  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
31500  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31501 
31502  /* function exit code */
31503  __Pyx_RefNannyFinishContext();
31504  return __pyx_r;
31505 }
31506 
31507 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31508  PyObject *__pyx_r = NULL;
31509  __Pyx_TraceDeclarations
31510  __Pyx_RefNannyDeclarations
31511  int __pyx_lineno = 0;
31512  const char *__pyx_filename = NULL;
31513  int __pyx_clineno = 0;
31514  __Pyx_RefNannySetupContext("__get__", 0);
31515  __Pyx_TraceCall("__get__", __pyx_f[2], 201, 0, __PYX_ERR(2, 201, __pyx_L1_error));
31516  __Pyx_XDECREF(__pyx_r);
31517  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_last));
31518  __pyx_r = ((PyObject *)__pyx_v_self->F_last);
31519  goto __pyx_L0;
31520 
31521  /* function exit code */
31522  __pyx_L1_error:;
31523  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31524  __pyx_r = NULL;
31525  __pyx_L0:;
31526  __Pyx_XGIVEREF(__pyx_r);
31527  __Pyx_TraceReturn(__pyx_r, 0);
31528  __Pyx_RefNannyFinishContext();
31529  return __pyx_r;
31530 }
31531 
31532 /* Python wrapper */
31533 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31534 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31535  int __pyx_r;
31536  __Pyx_RefNannyDeclarations
31537  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31538  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31539 
31540  /* function exit code */
31541  __Pyx_RefNannyFinishContext();
31542  return __pyx_r;
31543 }
31544 
31545 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31546  int __pyx_r;
31547  __Pyx_TraceDeclarations
31548  __Pyx_RefNannyDeclarations
31549  PyObject *__pyx_t_1 = NULL;
31550  int __pyx_lineno = 0;
31551  const char *__pyx_filename = NULL;
31552  int __pyx_clineno = 0;
31553  __Pyx_RefNannySetupContext("__set__", 0);
31554  __Pyx_TraceCall("__set__", __pyx_f[2], 201, 0, __PYX_ERR(2, 201, __pyx_L1_error));
31555  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 201, __pyx_L1_error)
31556  __pyx_t_1 = __pyx_v_value;
31557  __Pyx_INCREF(__pyx_t_1);
31558  __Pyx_GIVEREF(__pyx_t_1);
31559  __Pyx_GOTREF(__pyx_v_self->F_last);
31560  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_last));
31561  __pyx_v_self->F_last = ((PyArrayObject *)__pyx_t_1);
31562  __pyx_t_1 = 0;
31563 
31564  /* function exit code */
31565  __pyx_r = 0;
31566  goto __pyx_L0;
31567  __pyx_L1_error:;
31568  __Pyx_XDECREF(__pyx_t_1);
31569  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31570  __pyx_r = -1;
31571  __pyx_L0:;
31572  __Pyx_TraceReturn(Py_None, 0);
31573  __Pyx_RefNannyFinishContext();
31574  return __pyx_r;
31575 }
31576 
31577 /* Python wrapper */
31578 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_5__del__(PyObject *__pyx_v_self); /*proto*/
31579 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_5__del__(PyObject *__pyx_v_self) {
31580  int __pyx_r;
31581  __Pyx_RefNannyDeclarations
31582  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31583  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31584 
31585  /* function exit code */
31586  __Pyx_RefNannyFinishContext();
31587  return __pyx_r;
31588 }
31589 
31590 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31591  int __pyx_r;
31592  __Pyx_TraceDeclarations
31593  __Pyx_RefNannyDeclarations
31594  int __pyx_lineno = 0;
31595  const char *__pyx_filename = NULL;
31596  int __pyx_clineno = 0;
31597  __Pyx_RefNannySetupContext("__del__", 0);
31598  __Pyx_TraceCall("__del__", __pyx_f[2], 201, 0, __PYX_ERR(2, 201, __pyx_L1_error));
31599  __Pyx_INCREF(Py_None);
31600  __Pyx_GIVEREF(Py_None);
31601  __Pyx_GOTREF(__pyx_v_self->F_last);
31602  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_last));
31603  __pyx_v_self->F_last = ((PyArrayObject *)Py_None);
31604 
31605  /* function exit code */
31606  __pyx_r = 0;
31607  goto __pyx_L0;
31608  __pyx_L1_error:;
31609  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31610  __pyx_r = -1;
31611  __pyx_L0:;
31612  __Pyx_TraceReturn(Py_None, 0);
31613  __Pyx_RefNannyFinishContext();
31614  return __pyx_r;
31615 }
31616 
31617 /* "mbd/CouplingFSI.pxd":202
31618  * np.ndarray M # moment as retreived from Chrono
31619  * np.ndarray F_last
31620  * np.ndarray M_last # <<<<<<<<<<<<<<
31621  * np.ndarray F_prot # force retrieved from Proteus (fluid)
31622  * np.ndarray M_prot # moment retrieved from Proteus (fluid)
31623  */
31624 
31625 /* Python wrapper */
31626 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_1__get__(PyObject *__pyx_v_self); /*proto*/
31627 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_1__get__(PyObject *__pyx_v_self) {
31628  PyObject *__pyx_r = 0;
31629  __Pyx_RefNannyDeclarations
31630  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
31631  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31632 
31633  /* function exit code */
31634  __Pyx_RefNannyFinishContext();
31635  return __pyx_r;
31636 }
31637 
31638 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31639  PyObject *__pyx_r = NULL;
31640  __Pyx_TraceDeclarations
31641  __Pyx_RefNannyDeclarations
31642  int __pyx_lineno = 0;
31643  const char *__pyx_filename = NULL;
31644  int __pyx_clineno = 0;
31645  __Pyx_RefNannySetupContext("__get__", 0);
31646  __Pyx_TraceCall("__get__", __pyx_f[2], 202, 0, __PYX_ERR(2, 202, __pyx_L1_error));
31647  __Pyx_XDECREF(__pyx_r);
31648  __Pyx_INCREF(((PyObject *)__pyx_v_self->M_last));
31649  __pyx_r = ((PyObject *)__pyx_v_self->M_last);
31650  goto __pyx_L0;
31651 
31652  /* function exit code */
31653  __pyx_L1_error:;
31654  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31655  __pyx_r = NULL;
31656  __pyx_L0:;
31657  __Pyx_XGIVEREF(__pyx_r);
31658  __Pyx_TraceReturn(__pyx_r, 0);
31659  __Pyx_RefNannyFinishContext();
31660  return __pyx_r;
31661 }
31662 
31663 /* Python wrapper */
31664 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31665 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31666  int __pyx_r;
31667  __Pyx_RefNannyDeclarations
31668  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31669  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31670 
31671  /* function exit code */
31672  __Pyx_RefNannyFinishContext();
31673  return __pyx_r;
31674 }
31675 
31676 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31677  int __pyx_r;
31678  __Pyx_TraceDeclarations
31679  __Pyx_RefNannyDeclarations
31680  PyObject *__pyx_t_1 = NULL;
31681  int __pyx_lineno = 0;
31682  const char *__pyx_filename = NULL;
31683  int __pyx_clineno = 0;
31684  __Pyx_RefNannySetupContext("__set__", 0);
31685  __Pyx_TraceCall("__set__", __pyx_f[2], 202, 0, __PYX_ERR(2, 202, __pyx_L1_error));
31686  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 202, __pyx_L1_error)
31687  __pyx_t_1 = __pyx_v_value;
31688  __Pyx_INCREF(__pyx_t_1);
31689  __Pyx_GIVEREF(__pyx_t_1);
31690  __Pyx_GOTREF(__pyx_v_self->M_last);
31691  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_last));
31692  __pyx_v_self->M_last = ((PyArrayObject *)__pyx_t_1);
31693  __pyx_t_1 = 0;
31694 
31695  /* function exit code */
31696  __pyx_r = 0;
31697  goto __pyx_L0;
31698  __pyx_L1_error:;
31699  __Pyx_XDECREF(__pyx_t_1);
31700  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31701  __pyx_r = -1;
31702  __pyx_L0:;
31703  __Pyx_TraceReturn(Py_None, 0);
31704  __Pyx_RefNannyFinishContext();
31705  return __pyx_r;
31706 }
31707 
31708 /* Python wrapper */
31709 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_5__del__(PyObject *__pyx_v_self); /*proto*/
31710 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_5__del__(PyObject *__pyx_v_self) {
31711  int __pyx_r;
31712  __Pyx_RefNannyDeclarations
31713  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31714  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31715 
31716  /* function exit code */
31717  __Pyx_RefNannyFinishContext();
31718  return __pyx_r;
31719 }
31720 
31721 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31722  int __pyx_r;
31723  __Pyx_TraceDeclarations
31724  __Pyx_RefNannyDeclarations
31725  int __pyx_lineno = 0;
31726  const char *__pyx_filename = NULL;
31727  int __pyx_clineno = 0;
31728  __Pyx_RefNannySetupContext("__del__", 0);
31729  __Pyx_TraceCall("__del__", __pyx_f[2], 202, 0, __PYX_ERR(2, 202, __pyx_L1_error));
31730  __Pyx_INCREF(Py_None);
31731  __Pyx_GIVEREF(Py_None);
31732  __Pyx_GOTREF(__pyx_v_self->M_last);
31733  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_last));
31734  __pyx_v_self->M_last = ((PyArrayObject *)Py_None);
31735 
31736  /* function exit code */
31737  __pyx_r = 0;
31738  goto __pyx_L0;
31739  __pyx_L1_error:;
31740  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31741  __pyx_r = -1;
31742  __pyx_L0:;
31743  __Pyx_TraceReturn(Py_None, 0);
31744  __Pyx_RefNannyFinishContext();
31745  return __pyx_r;
31746 }
31747 
31748 /* "mbd/CouplingFSI.pxd":203
31749  * np.ndarray F_last
31750  * np.ndarray M_last
31751  * np.ndarray F_prot # force retrieved from Proteus (fluid) # <<<<<<<<<<<<<<
31752  * np.ndarray M_prot # moment retrieved from Proteus (fluid)
31753  * np.ndarray F_prot_last
31754  */
31755 
31756 /* Python wrapper */
31757 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_1__get__(PyObject *__pyx_v_self); /*proto*/
31758 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_1__get__(PyObject *__pyx_v_self) {
31759  PyObject *__pyx_r = 0;
31760  __Pyx_RefNannyDeclarations
31761  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
31762  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31763 
31764  /* function exit code */
31765  __Pyx_RefNannyFinishContext();
31766  return __pyx_r;
31767 }
31768 
31769 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31770  PyObject *__pyx_r = NULL;
31771  __Pyx_TraceDeclarations
31772  __Pyx_RefNannyDeclarations
31773  int __pyx_lineno = 0;
31774  const char *__pyx_filename = NULL;
31775  int __pyx_clineno = 0;
31776  __Pyx_RefNannySetupContext("__get__", 0);
31777  __Pyx_TraceCall("__get__", __pyx_f[2], 203, 0, __PYX_ERR(2, 203, __pyx_L1_error));
31778  __Pyx_XDECREF(__pyx_r);
31779  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_prot));
31780  __pyx_r = ((PyObject *)__pyx_v_self->F_prot);
31781  goto __pyx_L0;
31782 
31783  /* function exit code */
31784  __pyx_L1_error:;
31785  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_prot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31786  __pyx_r = NULL;
31787  __pyx_L0:;
31788  __Pyx_XGIVEREF(__pyx_r);
31789  __Pyx_TraceReturn(__pyx_r, 0);
31790  __Pyx_RefNannyFinishContext();
31791  return __pyx_r;
31792 }
31793 
31794 /* Python wrapper */
31795 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31796 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31797  int __pyx_r;
31798  __Pyx_RefNannyDeclarations
31799  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31800  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31801 
31802  /* function exit code */
31803  __Pyx_RefNannyFinishContext();
31804  return __pyx_r;
31805 }
31806 
31807 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31808  int __pyx_r;
31809  __Pyx_TraceDeclarations
31810  __Pyx_RefNannyDeclarations
31811  PyObject *__pyx_t_1 = NULL;
31812  int __pyx_lineno = 0;
31813  const char *__pyx_filename = NULL;
31814  int __pyx_clineno = 0;
31815  __Pyx_RefNannySetupContext("__set__", 0);
31816  __Pyx_TraceCall("__set__", __pyx_f[2], 203, 0, __PYX_ERR(2, 203, __pyx_L1_error));
31817  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 203, __pyx_L1_error)
31818  __pyx_t_1 = __pyx_v_value;
31819  __Pyx_INCREF(__pyx_t_1);
31820  __Pyx_GIVEREF(__pyx_t_1);
31821  __Pyx_GOTREF(__pyx_v_self->F_prot);
31822  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot));
31823  __pyx_v_self->F_prot = ((PyArrayObject *)__pyx_t_1);
31824  __pyx_t_1 = 0;
31825 
31826  /* function exit code */
31827  __pyx_r = 0;
31828  goto __pyx_L0;
31829  __pyx_L1_error:;
31830  __Pyx_XDECREF(__pyx_t_1);
31831  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_prot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31832  __pyx_r = -1;
31833  __pyx_L0:;
31834  __Pyx_TraceReturn(Py_None, 0);
31835  __Pyx_RefNannyFinishContext();
31836  return __pyx_r;
31837 }
31838 
31839 /* Python wrapper */
31840 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_5__del__(PyObject *__pyx_v_self); /*proto*/
31841 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_5__del__(PyObject *__pyx_v_self) {
31842  int __pyx_r;
31843  __Pyx_RefNannyDeclarations
31844  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31845  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31846 
31847  /* function exit code */
31848  __Pyx_RefNannyFinishContext();
31849  return __pyx_r;
31850 }
31851 
31852 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6F_prot_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31853  int __pyx_r;
31854  __Pyx_TraceDeclarations
31855  __Pyx_RefNannyDeclarations
31856  int __pyx_lineno = 0;
31857  const char *__pyx_filename = NULL;
31858  int __pyx_clineno = 0;
31859  __Pyx_RefNannySetupContext("__del__", 0);
31860  __Pyx_TraceCall("__del__", __pyx_f[2], 203, 0, __PYX_ERR(2, 203, __pyx_L1_error));
31861  __Pyx_INCREF(Py_None);
31862  __Pyx_GIVEREF(Py_None);
31863  __Pyx_GOTREF(__pyx_v_self->F_prot);
31864  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot));
31865  __pyx_v_self->F_prot = ((PyArrayObject *)Py_None);
31866 
31867  /* function exit code */
31868  __pyx_r = 0;
31869  goto __pyx_L0;
31870  __pyx_L1_error:;
31871  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_prot.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31872  __pyx_r = -1;
31873  __pyx_L0:;
31874  __Pyx_TraceReturn(Py_None, 0);
31875  __Pyx_RefNannyFinishContext();
31876  return __pyx_r;
31877 }
31878 
31879 /* "mbd/CouplingFSI.pxd":204
31880  * np.ndarray M_last
31881  * np.ndarray F_prot # force retrieved from Proteus (fluid)
31882  * np.ndarray M_prot # moment retrieved from Proteus (fluid) # <<<<<<<<<<<<<<
31883  * np.ndarray F_prot_last
31884  * np.ndarray M_prot_last
31885  */
31886 
31887 /* Python wrapper */
31888 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_1__get__(PyObject *__pyx_v_self); /*proto*/
31889 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_1__get__(PyObject *__pyx_v_self) {
31890  PyObject *__pyx_r = 0;
31891  __Pyx_RefNannyDeclarations
31892  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
31893  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31894 
31895  /* function exit code */
31896  __Pyx_RefNannyFinishContext();
31897  return __pyx_r;
31898 }
31899 
31900 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31901  PyObject *__pyx_r = NULL;
31902  __Pyx_TraceDeclarations
31903  __Pyx_RefNannyDeclarations
31904  int __pyx_lineno = 0;
31905  const char *__pyx_filename = NULL;
31906  int __pyx_clineno = 0;
31907  __Pyx_RefNannySetupContext("__get__", 0);
31908  __Pyx_TraceCall("__get__", __pyx_f[2], 204, 0, __PYX_ERR(2, 204, __pyx_L1_error));
31909  __Pyx_XDECREF(__pyx_r);
31910  __Pyx_INCREF(((PyObject *)__pyx_v_self->M_prot));
31911  __pyx_r = ((PyObject *)__pyx_v_self->M_prot);
31912  goto __pyx_L0;
31913 
31914  /* function exit code */
31915  __pyx_L1_error:;
31916  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_prot.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31917  __pyx_r = NULL;
31918  __pyx_L0:;
31919  __Pyx_XGIVEREF(__pyx_r);
31920  __Pyx_TraceReturn(__pyx_r, 0);
31921  __Pyx_RefNannyFinishContext();
31922  return __pyx_r;
31923 }
31924 
31925 /* Python wrapper */
31926 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
31927 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
31928  int __pyx_r;
31929  __Pyx_RefNannyDeclarations
31930  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
31931  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
31932 
31933  /* function exit code */
31934  __Pyx_RefNannyFinishContext();
31935  return __pyx_r;
31936 }
31937 
31938 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
31939  int __pyx_r;
31940  __Pyx_TraceDeclarations
31941  __Pyx_RefNannyDeclarations
31942  PyObject *__pyx_t_1 = NULL;
31943  int __pyx_lineno = 0;
31944  const char *__pyx_filename = NULL;
31945  int __pyx_clineno = 0;
31946  __Pyx_RefNannySetupContext("__set__", 0);
31947  __Pyx_TraceCall("__set__", __pyx_f[2], 204, 0, __PYX_ERR(2, 204, __pyx_L1_error));
31948  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 204, __pyx_L1_error)
31949  __pyx_t_1 = __pyx_v_value;
31950  __Pyx_INCREF(__pyx_t_1);
31951  __Pyx_GIVEREF(__pyx_t_1);
31952  __Pyx_GOTREF(__pyx_v_self->M_prot);
31953  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot));
31954  __pyx_v_self->M_prot = ((PyArrayObject *)__pyx_t_1);
31955  __pyx_t_1 = 0;
31956 
31957  /* function exit code */
31958  __pyx_r = 0;
31959  goto __pyx_L0;
31960  __pyx_L1_error:;
31961  __Pyx_XDECREF(__pyx_t_1);
31962  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_prot.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
31963  __pyx_r = -1;
31964  __pyx_L0:;
31965  __Pyx_TraceReturn(Py_None, 0);
31966  __Pyx_RefNannyFinishContext();
31967  return __pyx_r;
31968 }
31969 
31970 /* Python wrapper */
31971 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_5__del__(PyObject *__pyx_v_self); /*proto*/
31972 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_5__del__(PyObject *__pyx_v_self) {
31973  int __pyx_r;
31974  __Pyx_RefNannyDeclarations
31975  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
31976  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
31977 
31978  /* function exit code */
31979  __Pyx_RefNannyFinishContext();
31980  return __pyx_r;
31981 }
31982 
31983 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6M_prot_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
31984  int __pyx_r;
31985  __Pyx_TraceDeclarations
31986  __Pyx_RefNannyDeclarations
31987  int __pyx_lineno = 0;
31988  const char *__pyx_filename = NULL;
31989  int __pyx_clineno = 0;
31990  __Pyx_RefNannySetupContext("__del__", 0);
31991  __Pyx_TraceCall("__del__", __pyx_f[2], 204, 0, __PYX_ERR(2, 204, __pyx_L1_error));
31992  __Pyx_INCREF(Py_None);
31993  __Pyx_GIVEREF(Py_None);
31994  __Pyx_GOTREF(__pyx_v_self->M_prot);
31995  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot));
31996  __pyx_v_self->M_prot = ((PyArrayObject *)Py_None);
31997 
31998  /* function exit code */
31999  __pyx_r = 0;
32000  goto __pyx_L0;
32001  __pyx_L1_error:;
32002  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_prot.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32003  __pyx_r = -1;
32004  __pyx_L0:;
32005  __Pyx_TraceReturn(Py_None, 0);
32006  __Pyx_RefNannyFinishContext();
32007  return __pyx_r;
32008 }
32009 
32010 /* "mbd/CouplingFSI.pxd":205
32011  * np.ndarray F_prot # force retrieved from Proteus (fluid)
32012  * np.ndarray M_prot # moment retrieved from Proteus (fluid)
32013  * np.ndarray F_prot_last # <<<<<<<<<<<<<<
32014  * np.ndarray M_prot_last
32015  * np.ndarray F_applied # force applied and passed to Chrono
32016  */
32017 
32018 /* Python wrapper */
32019 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_1__get__(PyObject *__pyx_v_self); /*proto*/
32020 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_1__get__(PyObject *__pyx_v_self) {
32021  PyObject *__pyx_r = 0;
32022  __Pyx_RefNannyDeclarations
32023  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32024  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32025 
32026  /* function exit code */
32027  __Pyx_RefNannyFinishContext();
32028  return __pyx_r;
32029 }
32030 
32031 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32032  PyObject *__pyx_r = NULL;
32033  __Pyx_TraceDeclarations
32034  __Pyx_RefNannyDeclarations
32035  int __pyx_lineno = 0;
32036  const char *__pyx_filename = NULL;
32037  int __pyx_clineno = 0;
32038  __Pyx_RefNannySetupContext("__get__", 0);
32039  __Pyx_TraceCall("__get__", __pyx_f[2], 205, 0, __PYX_ERR(2, 205, __pyx_L1_error));
32040  __Pyx_XDECREF(__pyx_r);
32041  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_prot_last));
32042  __pyx_r = ((PyObject *)__pyx_v_self->F_prot_last);
32043  goto __pyx_L0;
32044 
32045  /* function exit code */
32046  __pyx_L1_error:;
32047  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_prot_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32048  __pyx_r = NULL;
32049  __pyx_L0:;
32050  __Pyx_XGIVEREF(__pyx_r);
32051  __Pyx_TraceReturn(__pyx_r, 0);
32052  __Pyx_RefNannyFinishContext();
32053  return __pyx_r;
32054 }
32055 
32056 /* Python wrapper */
32057 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32058 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32059  int __pyx_r;
32060  __Pyx_RefNannyDeclarations
32061  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32062  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32063 
32064  /* function exit code */
32065  __Pyx_RefNannyFinishContext();
32066  return __pyx_r;
32067 }
32068 
32069 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32070  int __pyx_r;
32071  __Pyx_TraceDeclarations
32072  __Pyx_RefNannyDeclarations
32073  PyObject *__pyx_t_1 = NULL;
32074  int __pyx_lineno = 0;
32075  const char *__pyx_filename = NULL;
32076  int __pyx_clineno = 0;
32077  __Pyx_RefNannySetupContext("__set__", 0);
32078  __Pyx_TraceCall("__set__", __pyx_f[2], 205, 0, __PYX_ERR(2, 205, __pyx_L1_error));
32079  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 205, __pyx_L1_error)
32080  __pyx_t_1 = __pyx_v_value;
32081  __Pyx_INCREF(__pyx_t_1);
32082  __Pyx_GIVEREF(__pyx_t_1);
32083  __Pyx_GOTREF(__pyx_v_self->F_prot_last);
32084  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot_last));
32085  __pyx_v_self->F_prot_last = ((PyArrayObject *)__pyx_t_1);
32086  __pyx_t_1 = 0;
32087 
32088  /* function exit code */
32089  __pyx_r = 0;
32090  goto __pyx_L0;
32091  __pyx_L1_error:;
32092  __Pyx_XDECREF(__pyx_t_1);
32093  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_prot_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32094  __pyx_r = -1;
32095  __pyx_L0:;
32096  __Pyx_TraceReturn(Py_None, 0);
32097  __Pyx_RefNannyFinishContext();
32098  return __pyx_r;
32099 }
32100 
32101 /* Python wrapper */
32102 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_5__del__(PyObject *__pyx_v_self); /*proto*/
32103 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_5__del__(PyObject *__pyx_v_self) {
32104  int __pyx_r;
32105  __Pyx_RefNannyDeclarations
32106  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
32107  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32108 
32109  /* function exit code */
32110  __Pyx_RefNannyFinishContext();
32111  return __pyx_r;
32112 }
32113 
32114 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32115  int __pyx_r;
32116  __Pyx_TraceDeclarations
32117  __Pyx_RefNannyDeclarations
32118  int __pyx_lineno = 0;
32119  const char *__pyx_filename = NULL;
32120  int __pyx_clineno = 0;
32121  __Pyx_RefNannySetupContext("__del__", 0);
32122  __Pyx_TraceCall("__del__", __pyx_f[2], 205, 0, __PYX_ERR(2, 205, __pyx_L1_error));
32123  __Pyx_INCREF(Py_None);
32124  __Pyx_GIVEREF(Py_None);
32125  __Pyx_GOTREF(__pyx_v_self->F_prot_last);
32126  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_prot_last));
32127  __pyx_v_self->F_prot_last = ((PyArrayObject *)Py_None);
32128 
32129  /* function exit code */
32130  __pyx_r = 0;
32131  goto __pyx_L0;
32132  __pyx_L1_error:;
32133  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_prot_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32134  __pyx_r = -1;
32135  __pyx_L0:;
32136  __Pyx_TraceReturn(Py_None, 0);
32137  __Pyx_RefNannyFinishContext();
32138  return __pyx_r;
32139 }
32140 
32141 /* "mbd/CouplingFSI.pxd":206
32142  * np.ndarray M_prot # moment retrieved from Proteus (fluid)
32143  * np.ndarray F_prot_last
32144  * np.ndarray M_prot_last # <<<<<<<<<<<<<<
32145  * np.ndarray F_applied # force applied and passed to Chrono
32146  * np.ndarray M_applied # moment applied and passed to Chrono
32147  */
32148 
32149 /* Python wrapper */
32150 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_1__get__(PyObject *__pyx_v_self); /*proto*/
32151 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_1__get__(PyObject *__pyx_v_self) {
32152  PyObject *__pyx_r = 0;
32153  __Pyx_RefNannyDeclarations
32154  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32155  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32156 
32157  /* function exit code */
32158  __Pyx_RefNannyFinishContext();
32159  return __pyx_r;
32160 }
32161 
32162 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32163  PyObject *__pyx_r = NULL;
32164  __Pyx_TraceDeclarations
32165  __Pyx_RefNannyDeclarations
32166  int __pyx_lineno = 0;
32167  const char *__pyx_filename = NULL;
32168  int __pyx_clineno = 0;
32169  __Pyx_RefNannySetupContext("__get__", 0);
32170  __Pyx_TraceCall("__get__", __pyx_f[2], 206, 0, __PYX_ERR(2, 206, __pyx_L1_error));
32171  __Pyx_XDECREF(__pyx_r);
32172  __Pyx_INCREF(((PyObject *)__pyx_v_self->M_prot_last));
32173  __pyx_r = ((PyObject *)__pyx_v_self->M_prot_last);
32174  goto __pyx_L0;
32175 
32176  /* function exit code */
32177  __pyx_L1_error:;
32178  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_prot_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32179  __pyx_r = NULL;
32180  __pyx_L0:;
32181  __Pyx_XGIVEREF(__pyx_r);
32182  __Pyx_TraceReturn(__pyx_r, 0);
32183  __Pyx_RefNannyFinishContext();
32184  return __pyx_r;
32185 }
32186 
32187 /* Python wrapper */
32188 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32189 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32190  int __pyx_r;
32191  __Pyx_RefNannyDeclarations
32192  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32193  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32194 
32195  /* function exit code */
32196  __Pyx_RefNannyFinishContext();
32197  return __pyx_r;
32198 }
32199 
32200 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32201  int __pyx_r;
32202  __Pyx_TraceDeclarations
32203  __Pyx_RefNannyDeclarations
32204  PyObject *__pyx_t_1 = NULL;
32205  int __pyx_lineno = 0;
32206  const char *__pyx_filename = NULL;
32207  int __pyx_clineno = 0;
32208  __Pyx_RefNannySetupContext("__set__", 0);
32209  __Pyx_TraceCall("__set__", __pyx_f[2], 206, 0, __PYX_ERR(2, 206, __pyx_L1_error));
32210  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 206, __pyx_L1_error)
32211  __pyx_t_1 = __pyx_v_value;
32212  __Pyx_INCREF(__pyx_t_1);
32213  __Pyx_GIVEREF(__pyx_t_1);
32214  __Pyx_GOTREF(__pyx_v_self->M_prot_last);
32215  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot_last));
32216  __pyx_v_self->M_prot_last = ((PyArrayObject *)__pyx_t_1);
32217  __pyx_t_1 = 0;
32218 
32219  /* function exit code */
32220  __pyx_r = 0;
32221  goto __pyx_L0;
32222  __pyx_L1_error:;
32223  __Pyx_XDECREF(__pyx_t_1);
32224  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_prot_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32225  __pyx_r = -1;
32226  __pyx_L0:;
32227  __Pyx_TraceReturn(Py_None, 0);
32228  __Pyx_RefNannyFinishContext();
32229  return __pyx_r;
32230 }
32231 
32232 /* Python wrapper */
32233 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_5__del__(PyObject *__pyx_v_self); /*proto*/
32234 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_5__del__(PyObject *__pyx_v_self) {
32235  int __pyx_r;
32236  __Pyx_RefNannyDeclarations
32237  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
32238  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32239 
32240  /* function exit code */
32241  __Pyx_RefNannyFinishContext();
32242  return __pyx_r;
32243 }
32244 
32245 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32246  int __pyx_r;
32247  __Pyx_TraceDeclarations
32248  __Pyx_RefNannyDeclarations
32249  int __pyx_lineno = 0;
32250  const char *__pyx_filename = NULL;
32251  int __pyx_clineno = 0;
32252  __Pyx_RefNannySetupContext("__del__", 0);
32253  __Pyx_TraceCall("__del__", __pyx_f[2], 206, 0, __PYX_ERR(2, 206, __pyx_L1_error));
32254  __Pyx_INCREF(Py_None);
32255  __Pyx_GIVEREF(Py_None);
32256  __Pyx_GOTREF(__pyx_v_self->M_prot_last);
32257  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_prot_last));
32258  __pyx_v_self->M_prot_last = ((PyArrayObject *)Py_None);
32259 
32260  /* function exit code */
32261  __pyx_r = 0;
32262  goto __pyx_L0;
32263  __pyx_L1_error:;
32264  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_prot_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32265  __pyx_r = -1;
32266  __pyx_L0:;
32267  __Pyx_TraceReturn(Py_None, 0);
32268  __Pyx_RefNannyFinishContext();
32269  return __pyx_r;
32270 }
32271 
32272 /* "mbd/CouplingFSI.pxd":207
32273  * np.ndarray F_prot_last
32274  * np.ndarray M_prot_last
32275  * np.ndarray F_applied # force applied and passed to Chrono # <<<<<<<<<<<<<<
32276  * np.ndarray M_applied # moment applied and passed to Chrono
32277  * np.ndarray F_applied_last
32278  */
32279 
32280 /* Python wrapper */
32281 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_1__get__(PyObject *__pyx_v_self); /*proto*/
32282 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_1__get__(PyObject *__pyx_v_self) {
32283  PyObject *__pyx_r = 0;
32284  __Pyx_RefNannyDeclarations
32285  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32286  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32287 
32288  /* function exit code */
32289  __Pyx_RefNannyFinishContext();
32290  return __pyx_r;
32291 }
32292 
32293 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32294  PyObject *__pyx_r = NULL;
32295  __Pyx_TraceDeclarations
32296  __Pyx_RefNannyDeclarations
32297  int __pyx_lineno = 0;
32298  const char *__pyx_filename = NULL;
32299  int __pyx_clineno = 0;
32300  __Pyx_RefNannySetupContext("__get__", 0);
32301  __Pyx_TraceCall("__get__", __pyx_f[2], 207, 0, __PYX_ERR(2, 207, __pyx_L1_error));
32302  __Pyx_XDECREF(__pyx_r);
32303  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_applied));
32304  __pyx_r = ((PyObject *)__pyx_v_self->F_applied);
32305  goto __pyx_L0;
32306 
32307  /* function exit code */
32308  __pyx_L1_error:;
32309  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_applied.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32310  __pyx_r = NULL;
32311  __pyx_L0:;
32312  __Pyx_XGIVEREF(__pyx_r);
32313  __Pyx_TraceReturn(__pyx_r, 0);
32314  __Pyx_RefNannyFinishContext();
32315  return __pyx_r;
32316 }
32317 
32318 /* Python wrapper */
32319 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32320 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32321  int __pyx_r;
32322  __Pyx_RefNannyDeclarations
32323  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32324  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32325 
32326  /* function exit code */
32327  __Pyx_RefNannyFinishContext();
32328  return __pyx_r;
32329 }
32330 
32331 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32332  int __pyx_r;
32333  __Pyx_TraceDeclarations
32334  __Pyx_RefNannyDeclarations
32335  PyObject *__pyx_t_1 = NULL;
32336  int __pyx_lineno = 0;
32337  const char *__pyx_filename = NULL;
32338  int __pyx_clineno = 0;
32339  __Pyx_RefNannySetupContext("__set__", 0);
32340  __Pyx_TraceCall("__set__", __pyx_f[2], 207, 0, __PYX_ERR(2, 207, __pyx_L1_error));
32341  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 207, __pyx_L1_error)
32342  __pyx_t_1 = __pyx_v_value;
32343  __Pyx_INCREF(__pyx_t_1);
32344  __Pyx_GIVEREF(__pyx_t_1);
32345  __Pyx_GOTREF(__pyx_v_self->F_applied);
32346  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_applied));
32347  __pyx_v_self->F_applied = ((PyArrayObject *)__pyx_t_1);
32348  __pyx_t_1 = 0;
32349 
32350  /* function exit code */
32351  __pyx_r = 0;
32352  goto __pyx_L0;
32353  __pyx_L1_error:;
32354  __Pyx_XDECREF(__pyx_t_1);
32355  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_applied.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32356  __pyx_r = -1;
32357  __pyx_L0:;
32358  __Pyx_TraceReturn(Py_None, 0);
32359  __Pyx_RefNannyFinishContext();
32360  return __pyx_r;
32361 }
32362 
32363 /* Python wrapper */
32364 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_5__del__(PyObject *__pyx_v_self); /*proto*/
32365 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_5__del__(PyObject *__pyx_v_self) {
32366  int __pyx_r;
32367  __Pyx_RefNannyDeclarations
32368  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
32369  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32370 
32371  /* function exit code */
32372  __Pyx_RefNannyFinishContext();
32373  return __pyx_r;
32374 }
32375 
32376 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9F_applied_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32377  int __pyx_r;
32378  __Pyx_TraceDeclarations
32379  __Pyx_RefNannyDeclarations
32380  int __pyx_lineno = 0;
32381  const char *__pyx_filename = NULL;
32382  int __pyx_clineno = 0;
32383  __Pyx_RefNannySetupContext("__del__", 0);
32384  __Pyx_TraceCall("__del__", __pyx_f[2], 207, 0, __PYX_ERR(2, 207, __pyx_L1_error));
32385  __Pyx_INCREF(Py_None);
32386  __Pyx_GIVEREF(Py_None);
32387  __Pyx_GOTREF(__pyx_v_self->F_applied);
32388  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_applied));
32389  __pyx_v_self->F_applied = ((PyArrayObject *)Py_None);
32390 
32391  /* function exit code */
32392  __pyx_r = 0;
32393  goto __pyx_L0;
32394  __pyx_L1_error:;
32395  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_applied.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32396  __pyx_r = -1;
32397  __pyx_L0:;
32398  __Pyx_TraceReturn(Py_None, 0);
32399  __Pyx_RefNannyFinishContext();
32400  return __pyx_r;
32401 }
32402 
32403 /* "mbd/CouplingFSI.pxd":208
32404  * np.ndarray M_prot_last
32405  * np.ndarray F_applied # force applied and passed to Chrono
32406  * np.ndarray M_applied # moment applied and passed to Chrono # <<<<<<<<<<<<<<
32407  * np.ndarray F_applied_last
32408  * np.ndarray M_applied_last
32409  */
32410 
32411 /* Python wrapper */
32412 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_1__get__(PyObject *__pyx_v_self); /*proto*/
32413 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_1__get__(PyObject *__pyx_v_self) {
32414  PyObject *__pyx_r = 0;
32415  __Pyx_RefNannyDeclarations
32416  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32417  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32418 
32419  /* function exit code */
32420  __Pyx_RefNannyFinishContext();
32421  return __pyx_r;
32422 }
32423 
32424 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32425  PyObject *__pyx_r = NULL;
32426  __Pyx_TraceDeclarations
32427  __Pyx_RefNannyDeclarations
32428  int __pyx_lineno = 0;
32429  const char *__pyx_filename = NULL;
32430  int __pyx_clineno = 0;
32431  __Pyx_RefNannySetupContext("__get__", 0);
32432  __Pyx_TraceCall("__get__", __pyx_f[2], 208, 0, __PYX_ERR(2, 208, __pyx_L1_error));
32433  __Pyx_XDECREF(__pyx_r);
32434  __Pyx_INCREF(((PyObject *)__pyx_v_self->M_applied));
32435  __pyx_r = ((PyObject *)__pyx_v_self->M_applied);
32436  goto __pyx_L0;
32437 
32438  /* function exit code */
32439  __pyx_L1_error:;
32440  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_applied.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32441  __pyx_r = NULL;
32442  __pyx_L0:;
32443  __Pyx_XGIVEREF(__pyx_r);
32444  __Pyx_TraceReturn(__pyx_r, 0);
32445  __Pyx_RefNannyFinishContext();
32446  return __pyx_r;
32447 }
32448 
32449 /* Python wrapper */
32450 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32451 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32452  int __pyx_r;
32453  __Pyx_RefNannyDeclarations
32454  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32455  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32456 
32457  /* function exit code */
32458  __Pyx_RefNannyFinishContext();
32459  return __pyx_r;
32460 }
32461 
32462 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32463  int __pyx_r;
32464  __Pyx_TraceDeclarations
32465  __Pyx_RefNannyDeclarations
32466  PyObject *__pyx_t_1 = NULL;
32467  int __pyx_lineno = 0;
32468  const char *__pyx_filename = NULL;
32469  int __pyx_clineno = 0;
32470  __Pyx_RefNannySetupContext("__set__", 0);
32471  __Pyx_TraceCall("__set__", __pyx_f[2], 208, 0, __PYX_ERR(2, 208, __pyx_L1_error));
32472  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 208, __pyx_L1_error)
32473  __pyx_t_1 = __pyx_v_value;
32474  __Pyx_INCREF(__pyx_t_1);
32475  __Pyx_GIVEREF(__pyx_t_1);
32476  __Pyx_GOTREF(__pyx_v_self->M_applied);
32477  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_applied));
32478  __pyx_v_self->M_applied = ((PyArrayObject *)__pyx_t_1);
32479  __pyx_t_1 = 0;
32480 
32481  /* function exit code */
32482  __pyx_r = 0;
32483  goto __pyx_L0;
32484  __pyx_L1_error:;
32485  __Pyx_XDECREF(__pyx_t_1);
32486  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_applied.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32487  __pyx_r = -1;
32488  __pyx_L0:;
32489  __Pyx_TraceReturn(Py_None, 0);
32490  __Pyx_RefNannyFinishContext();
32491  return __pyx_r;
32492 }
32493 
32494 /* Python wrapper */
32495 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_5__del__(PyObject *__pyx_v_self); /*proto*/
32496 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_5__del__(PyObject *__pyx_v_self) {
32497  int __pyx_r;
32498  __Pyx_RefNannyDeclarations
32499  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
32500  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32501 
32502  /* function exit code */
32503  __Pyx_RefNannyFinishContext();
32504  return __pyx_r;
32505 }
32506 
32507 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9M_applied_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32508  int __pyx_r;
32509  __Pyx_TraceDeclarations
32510  __Pyx_RefNannyDeclarations
32511  int __pyx_lineno = 0;
32512  const char *__pyx_filename = NULL;
32513  int __pyx_clineno = 0;
32514  __Pyx_RefNannySetupContext("__del__", 0);
32515  __Pyx_TraceCall("__del__", __pyx_f[2], 208, 0, __PYX_ERR(2, 208, __pyx_L1_error));
32516  __Pyx_INCREF(Py_None);
32517  __Pyx_GIVEREF(Py_None);
32518  __Pyx_GOTREF(__pyx_v_self->M_applied);
32519  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_applied));
32520  __pyx_v_self->M_applied = ((PyArrayObject *)Py_None);
32521 
32522  /* function exit code */
32523  __pyx_r = 0;
32524  goto __pyx_L0;
32525  __pyx_L1_error:;
32526  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_applied.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32527  __pyx_r = -1;
32528  __pyx_L0:;
32529  __Pyx_TraceReturn(Py_None, 0);
32530  __Pyx_RefNannyFinishContext();
32531  return __pyx_r;
32532 }
32533 
32534 /* "mbd/CouplingFSI.pxd":209
32535  * np.ndarray F_applied # force applied and passed to Chrono
32536  * np.ndarray M_applied # moment applied and passed to Chrono
32537  * np.ndarray F_applied_last # <<<<<<<<<<<<<<
32538  * np.ndarray M_applied_last
32539  * np.ndarray F_Aij
32540  */
32541 
32542 /* Python wrapper */
32543 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_1__get__(PyObject *__pyx_v_self); /*proto*/
32544 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_1__get__(PyObject *__pyx_v_self) {
32545  PyObject *__pyx_r = 0;
32546  __Pyx_RefNannyDeclarations
32547  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32548  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32549 
32550  /* function exit code */
32551  __Pyx_RefNannyFinishContext();
32552  return __pyx_r;
32553 }
32554 
32555 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32556  PyObject *__pyx_r = NULL;
32557  __Pyx_TraceDeclarations
32558  __Pyx_RefNannyDeclarations
32559  int __pyx_lineno = 0;
32560  const char *__pyx_filename = NULL;
32561  int __pyx_clineno = 0;
32562  __Pyx_RefNannySetupContext("__get__", 0);
32563  __Pyx_TraceCall("__get__", __pyx_f[2], 209, 0, __PYX_ERR(2, 209, __pyx_L1_error));
32564  __Pyx_XDECREF(__pyx_r);
32565  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_applied_last));
32566  __pyx_r = ((PyObject *)__pyx_v_self->F_applied_last);
32567  goto __pyx_L0;
32568 
32569  /* function exit code */
32570  __pyx_L1_error:;
32571  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_applied_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32572  __pyx_r = NULL;
32573  __pyx_L0:;
32574  __Pyx_XGIVEREF(__pyx_r);
32575  __Pyx_TraceReturn(__pyx_r, 0);
32576  __Pyx_RefNannyFinishContext();
32577  return __pyx_r;
32578 }
32579 
32580 /* Python wrapper */
32581 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32582 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32583  int __pyx_r;
32584  __Pyx_RefNannyDeclarations
32585  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32586  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32587 
32588  /* function exit code */
32589  __Pyx_RefNannyFinishContext();
32590  return __pyx_r;
32591 }
32592 
32593 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32594  int __pyx_r;
32595  __Pyx_TraceDeclarations
32596  __Pyx_RefNannyDeclarations
32597  PyObject *__pyx_t_1 = NULL;
32598  int __pyx_lineno = 0;
32599  const char *__pyx_filename = NULL;
32600  int __pyx_clineno = 0;
32601  __Pyx_RefNannySetupContext("__set__", 0);
32602  __Pyx_TraceCall("__set__", __pyx_f[2], 209, 0, __PYX_ERR(2, 209, __pyx_L1_error));
32603  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 209, __pyx_L1_error)
32604  __pyx_t_1 = __pyx_v_value;
32605  __Pyx_INCREF(__pyx_t_1);
32606  __Pyx_GIVEREF(__pyx_t_1);
32607  __Pyx_GOTREF(__pyx_v_self->F_applied_last);
32608  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_applied_last));
32609  __pyx_v_self->F_applied_last = ((PyArrayObject *)__pyx_t_1);
32610  __pyx_t_1 = 0;
32611 
32612  /* function exit code */
32613  __pyx_r = 0;
32614  goto __pyx_L0;
32615  __pyx_L1_error:;
32616  __Pyx_XDECREF(__pyx_t_1);
32617  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_applied_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32618  __pyx_r = -1;
32619  __pyx_L0:;
32620  __Pyx_TraceReturn(Py_None, 0);
32621  __Pyx_RefNannyFinishContext();
32622  return __pyx_r;
32623 }
32624 
32625 /* Python wrapper */
32626 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_5__del__(PyObject *__pyx_v_self); /*proto*/
32627 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_5__del__(PyObject *__pyx_v_self) {
32628  int __pyx_r;
32629  __Pyx_RefNannyDeclarations
32630  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
32631  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32632 
32633  /* function exit code */
32634  __Pyx_RefNannyFinishContext();
32635  return __pyx_r;
32636 }
32637 
32638 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32639  int __pyx_r;
32640  __Pyx_TraceDeclarations
32641  __Pyx_RefNannyDeclarations
32642  int __pyx_lineno = 0;
32643  const char *__pyx_filename = NULL;
32644  int __pyx_clineno = 0;
32645  __Pyx_RefNannySetupContext("__del__", 0);
32646  __Pyx_TraceCall("__del__", __pyx_f[2], 209, 0, __PYX_ERR(2, 209, __pyx_L1_error));
32647  __Pyx_INCREF(Py_None);
32648  __Pyx_GIVEREF(Py_None);
32649  __Pyx_GOTREF(__pyx_v_self->F_applied_last);
32650  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_applied_last));
32651  __pyx_v_self->F_applied_last = ((PyArrayObject *)Py_None);
32652 
32653  /* function exit code */
32654  __pyx_r = 0;
32655  goto __pyx_L0;
32656  __pyx_L1_error:;
32657  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_applied_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32658  __pyx_r = -1;
32659  __pyx_L0:;
32660  __Pyx_TraceReturn(Py_None, 0);
32661  __Pyx_RefNannyFinishContext();
32662  return __pyx_r;
32663 }
32664 
32665 /* "mbd/CouplingFSI.pxd":210
32666  * np.ndarray M_applied # moment applied and passed to Chrono
32667  * np.ndarray F_applied_last
32668  * np.ndarray M_applied_last # <<<<<<<<<<<<<<
32669  * np.ndarray F_Aij
32670  * np.ndarray M_Aij
32671  */
32672 
32673 /* Python wrapper */
32674 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_1__get__(PyObject *__pyx_v_self); /*proto*/
32675 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_1__get__(PyObject *__pyx_v_self) {
32676  PyObject *__pyx_r = 0;
32677  __Pyx_RefNannyDeclarations
32678  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32679  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32680 
32681  /* function exit code */
32682  __Pyx_RefNannyFinishContext();
32683  return __pyx_r;
32684 }
32685 
32686 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32687  PyObject *__pyx_r = NULL;
32688  __Pyx_TraceDeclarations
32689  __Pyx_RefNannyDeclarations
32690  int __pyx_lineno = 0;
32691  const char *__pyx_filename = NULL;
32692  int __pyx_clineno = 0;
32693  __Pyx_RefNannySetupContext("__get__", 0);
32694  __Pyx_TraceCall("__get__", __pyx_f[2], 210, 0, __PYX_ERR(2, 210, __pyx_L1_error));
32695  __Pyx_XDECREF(__pyx_r);
32696  __Pyx_INCREF(((PyObject *)__pyx_v_self->M_applied_last));
32697  __pyx_r = ((PyObject *)__pyx_v_self->M_applied_last);
32698  goto __pyx_L0;
32699 
32700  /* function exit code */
32701  __pyx_L1_error:;
32702  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_applied_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32703  __pyx_r = NULL;
32704  __pyx_L0:;
32705  __Pyx_XGIVEREF(__pyx_r);
32706  __Pyx_TraceReturn(__pyx_r, 0);
32707  __Pyx_RefNannyFinishContext();
32708  return __pyx_r;
32709 }
32710 
32711 /* Python wrapper */
32712 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32713 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32714  int __pyx_r;
32715  __Pyx_RefNannyDeclarations
32716  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32717  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32718 
32719  /* function exit code */
32720  __Pyx_RefNannyFinishContext();
32721  return __pyx_r;
32722 }
32723 
32724 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32725  int __pyx_r;
32726  __Pyx_TraceDeclarations
32727  __Pyx_RefNannyDeclarations
32728  PyObject *__pyx_t_1 = NULL;
32729  int __pyx_lineno = 0;
32730  const char *__pyx_filename = NULL;
32731  int __pyx_clineno = 0;
32732  __Pyx_RefNannySetupContext("__set__", 0);
32733  __Pyx_TraceCall("__set__", __pyx_f[2], 210, 0, __PYX_ERR(2, 210, __pyx_L1_error));
32734  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 210, __pyx_L1_error)
32735  __pyx_t_1 = __pyx_v_value;
32736  __Pyx_INCREF(__pyx_t_1);
32737  __Pyx_GIVEREF(__pyx_t_1);
32738  __Pyx_GOTREF(__pyx_v_self->M_applied_last);
32739  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_applied_last));
32740  __pyx_v_self->M_applied_last = ((PyArrayObject *)__pyx_t_1);
32741  __pyx_t_1 = 0;
32742 
32743  /* function exit code */
32744  __pyx_r = 0;
32745  goto __pyx_L0;
32746  __pyx_L1_error:;
32747  __Pyx_XDECREF(__pyx_t_1);
32748  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_applied_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32749  __pyx_r = -1;
32750  __pyx_L0:;
32751  __Pyx_TraceReturn(Py_None, 0);
32752  __Pyx_RefNannyFinishContext();
32753  return __pyx_r;
32754 }
32755 
32756 /* Python wrapper */
32757 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_5__del__(PyObject *__pyx_v_self); /*proto*/
32758 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_5__del__(PyObject *__pyx_v_self) {
32759  int __pyx_r;
32760  __Pyx_RefNannyDeclarations
32761  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
32762  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32763 
32764  /* function exit code */
32765  __Pyx_RefNannyFinishContext();
32766  return __pyx_r;
32767 }
32768 
32769 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32770  int __pyx_r;
32771  __Pyx_TraceDeclarations
32772  __Pyx_RefNannyDeclarations
32773  int __pyx_lineno = 0;
32774  const char *__pyx_filename = NULL;
32775  int __pyx_clineno = 0;
32776  __Pyx_RefNannySetupContext("__del__", 0);
32777  __Pyx_TraceCall("__del__", __pyx_f[2], 210, 0, __PYX_ERR(2, 210, __pyx_L1_error));
32778  __Pyx_INCREF(Py_None);
32779  __Pyx_GIVEREF(Py_None);
32780  __Pyx_GOTREF(__pyx_v_self->M_applied_last);
32781  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_applied_last));
32782  __pyx_v_self->M_applied_last = ((PyArrayObject *)Py_None);
32783 
32784  /* function exit code */
32785  __pyx_r = 0;
32786  goto __pyx_L0;
32787  __pyx_L1_error:;
32788  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_applied_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32789  __pyx_r = -1;
32790  __pyx_L0:;
32791  __Pyx_TraceReturn(Py_None, 0);
32792  __Pyx_RefNannyFinishContext();
32793  return __pyx_r;
32794 }
32795 
32796 /* "mbd/CouplingFSI.pxd":211
32797  * np.ndarray F_applied_last
32798  * np.ndarray M_applied_last
32799  * np.ndarray F_Aij # <<<<<<<<<<<<<<
32800  * np.ndarray M_Aij
32801  * np.ndarray F_Aij_last
32802  */
32803 
32804 /* Python wrapper */
32805 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_1__get__(PyObject *__pyx_v_self); /*proto*/
32806 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_1__get__(PyObject *__pyx_v_self) {
32807  PyObject *__pyx_r = 0;
32808  __Pyx_RefNannyDeclarations
32809  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32810  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32811 
32812  /* function exit code */
32813  __Pyx_RefNannyFinishContext();
32814  return __pyx_r;
32815 }
32816 
32817 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32818  PyObject *__pyx_r = NULL;
32819  __Pyx_TraceDeclarations
32820  __Pyx_RefNannyDeclarations
32821  int __pyx_lineno = 0;
32822  const char *__pyx_filename = NULL;
32823  int __pyx_clineno = 0;
32824  __Pyx_RefNannySetupContext("__get__", 0);
32825  __Pyx_TraceCall("__get__", __pyx_f[2], 211, 0, __PYX_ERR(2, 211, __pyx_L1_error));
32826  __Pyx_XDECREF(__pyx_r);
32827  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_Aij));
32828  __pyx_r = ((PyObject *)__pyx_v_self->F_Aij);
32829  goto __pyx_L0;
32830 
32831  /* function exit code */
32832  __pyx_L1_error:;
32833  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_Aij.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32834  __pyx_r = NULL;
32835  __pyx_L0:;
32836  __Pyx_XGIVEREF(__pyx_r);
32837  __Pyx_TraceReturn(__pyx_r, 0);
32838  __Pyx_RefNannyFinishContext();
32839  return __pyx_r;
32840 }
32841 
32842 /* Python wrapper */
32843 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32844 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32845  int __pyx_r;
32846  __Pyx_RefNannyDeclarations
32847  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32848  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32849 
32850  /* function exit code */
32851  __Pyx_RefNannyFinishContext();
32852  return __pyx_r;
32853 }
32854 
32855 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32856  int __pyx_r;
32857  __Pyx_TraceDeclarations
32858  __Pyx_RefNannyDeclarations
32859  PyObject *__pyx_t_1 = NULL;
32860  int __pyx_lineno = 0;
32861  const char *__pyx_filename = NULL;
32862  int __pyx_clineno = 0;
32863  __Pyx_RefNannySetupContext("__set__", 0);
32864  __Pyx_TraceCall("__set__", __pyx_f[2], 211, 0, __PYX_ERR(2, 211, __pyx_L1_error));
32865  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 211, __pyx_L1_error)
32866  __pyx_t_1 = __pyx_v_value;
32867  __Pyx_INCREF(__pyx_t_1);
32868  __Pyx_GIVEREF(__pyx_t_1);
32869  __Pyx_GOTREF(__pyx_v_self->F_Aij);
32870  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_Aij));
32871  __pyx_v_self->F_Aij = ((PyArrayObject *)__pyx_t_1);
32872  __pyx_t_1 = 0;
32873 
32874  /* function exit code */
32875  __pyx_r = 0;
32876  goto __pyx_L0;
32877  __pyx_L1_error:;
32878  __Pyx_XDECREF(__pyx_t_1);
32879  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_Aij.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32880  __pyx_r = -1;
32881  __pyx_L0:;
32882  __Pyx_TraceReturn(Py_None, 0);
32883  __Pyx_RefNannyFinishContext();
32884  return __pyx_r;
32885 }
32886 
32887 /* Python wrapper */
32888 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_5__del__(PyObject *__pyx_v_self); /*proto*/
32889 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_5__del__(PyObject *__pyx_v_self) {
32890  int __pyx_r;
32891  __Pyx_RefNannyDeclarations
32892  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
32893  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32894 
32895  /* function exit code */
32896  __Pyx_RefNannyFinishContext();
32897  return __pyx_r;
32898 }
32899 
32900 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32901  int __pyx_r;
32902  __Pyx_TraceDeclarations
32903  __Pyx_RefNannyDeclarations
32904  int __pyx_lineno = 0;
32905  const char *__pyx_filename = NULL;
32906  int __pyx_clineno = 0;
32907  __Pyx_RefNannySetupContext("__del__", 0);
32908  __Pyx_TraceCall("__del__", __pyx_f[2], 211, 0, __PYX_ERR(2, 211, __pyx_L1_error));
32909  __Pyx_INCREF(Py_None);
32910  __Pyx_GIVEREF(Py_None);
32911  __Pyx_GOTREF(__pyx_v_self->F_Aij);
32912  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_Aij));
32913  __pyx_v_self->F_Aij = ((PyArrayObject *)Py_None);
32914 
32915  /* function exit code */
32916  __pyx_r = 0;
32917  goto __pyx_L0;
32918  __pyx_L1_error:;
32919  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_Aij.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32920  __pyx_r = -1;
32921  __pyx_L0:;
32922  __Pyx_TraceReturn(Py_None, 0);
32923  __Pyx_RefNannyFinishContext();
32924  return __pyx_r;
32925 }
32926 
32927 /* "mbd/CouplingFSI.pxd":212
32928  * np.ndarray M_applied_last
32929  * np.ndarray F_Aij
32930  * np.ndarray M_Aij # <<<<<<<<<<<<<<
32931  * np.ndarray F_Aij_last
32932  * np.ndarray M_Aij_last
32933  */
32934 
32935 /* Python wrapper */
32936 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_1__get__(PyObject *__pyx_v_self); /*proto*/
32937 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_1__get__(PyObject *__pyx_v_self) {
32938  PyObject *__pyx_r = 0;
32939  __Pyx_RefNannyDeclarations
32940  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
32941  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
32942 
32943  /* function exit code */
32944  __Pyx_RefNannyFinishContext();
32945  return __pyx_r;
32946 }
32947 
32948 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
32949  PyObject *__pyx_r = NULL;
32950  __Pyx_TraceDeclarations
32951  __Pyx_RefNannyDeclarations
32952  int __pyx_lineno = 0;
32953  const char *__pyx_filename = NULL;
32954  int __pyx_clineno = 0;
32955  __Pyx_RefNannySetupContext("__get__", 0);
32956  __Pyx_TraceCall("__get__", __pyx_f[2], 212, 0, __PYX_ERR(2, 212, __pyx_L1_error));
32957  __Pyx_XDECREF(__pyx_r);
32958  __Pyx_INCREF(((PyObject *)__pyx_v_self->M_Aij));
32959  __pyx_r = ((PyObject *)__pyx_v_self->M_Aij);
32960  goto __pyx_L0;
32961 
32962  /* function exit code */
32963  __pyx_L1_error:;
32964  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_Aij.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
32965  __pyx_r = NULL;
32966  __pyx_L0:;
32967  __Pyx_XGIVEREF(__pyx_r);
32968  __Pyx_TraceReturn(__pyx_r, 0);
32969  __Pyx_RefNannyFinishContext();
32970  return __pyx_r;
32971 }
32972 
32973 /* Python wrapper */
32974 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
32975 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
32976  int __pyx_r;
32977  __Pyx_RefNannyDeclarations
32978  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
32979  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
32980 
32981  /* function exit code */
32982  __Pyx_RefNannyFinishContext();
32983  return __pyx_r;
32984 }
32985 
32986 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
32987  int __pyx_r;
32988  __Pyx_TraceDeclarations
32989  __Pyx_RefNannyDeclarations
32990  PyObject *__pyx_t_1 = NULL;
32991  int __pyx_lineno = 0;
32992  const char *__pyx_filename = NULL;
32993  int __pyx_clineno = 0;
32994  __Pyx_RefNannySetupContext("__set__", 0);
32995  __Pyx_TraceCall("__set__", __pyx_f[2], 212, 0, __PYX_ERR(2, 212, __pyx_L1_error));
32996  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 212, __pyx_L1_error)
32997  __pyx_t_1 = __pyx_v_value;
32998  __Pyx_INCREF(__pyx_t_1);
32999  __Pyx_GIVEREF(__pyx_t_1);
33000  __Pyx_GOTREF(__pyx_v_self->M_Aij);
33001  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_Aij));
33002  __pyx_v_self->M_Aij = ((PyArrayObject *)__pyx_t_1);
33003  __pyx_t_1 = 0;
33004 
33005  /* function exit code */
33006  __pyx_r = 0;
33007  goto __pyx_L0;
33008  __pyx_L1_error:;
33009  __Pyx_XDECREF(__pyx_t_1);
33010  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_Aij.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33011  __pyx_r = -1;
33012  __pyx_L0:;
33013  __Pyx_TraceReturn(Py_None, 0);
33014  __Pyx_RefNannyFinishContext();
33015  return __pyx_r;
33016 }
33017 
33018 /* Python wrapper */
33019 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_5__del__(PyObject *__pyx_v_self); /*proto*/
33020 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_5__del__(PyObject *__pyx_v_self) {
33021  int __pyx_r;
33022  __Pyx_RefNannyDeclarations
33023  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33024  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33025 
33026  /* function exit code */
33027  __Pyx_RefNannyFinishContext();
33028  return __pyx_r;
33029 }
33030 
33031 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33032  int __pyx_r;
33033  __Pyx_TraceDeclarations
33034  __Pyx_RefNannyDeclarations
33035  int __pyx_lineno = 0;
33036  const char *__pyx_filename = NULL;
33037  int __pyx_clineno = 0;
33038  __Pyx_RefNannySetupContext("__del__", 0);
33039  __Pyx_TraceCall("__del__", __pyx_f[2], 212, 0, __PYX_ERR(2, 212, __pyx_L1_error));
33040  __Pyx_INCREF(Py_None);
33041  __Pyx_GIVEREF(Py_None);
33042  __Pyx_GOTREF(__pyx_v_self->M_Aij);
33043  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_Aij));
33044  __pyx_v_self->M_Aij = ((PyArrayObject *)Py_None);
33045 
33046  /* function exit code */
33047  __pyx_r = 0;
33048  goto __pyx_L0;
33049  __pyx_L1_error:;
33050  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_Aij.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33051  __pyx_r = -1;
33052  __pyx_L0:;
33053  __Pyx_TraceReturn(Py_None, 0);
33054  __Pyx_RefNannyFinishContext();
33055  return __pyx_r;
33056 }
33057 
33058 /* "mbd/CouplingFSI.pxd":213
33059  * np.ndarray F_Aij
33060  * np.ndarray M_Aij
33061  * np.ndarray F_Aij_last # <<<<<<<<<<<<<<
33062  * np.ndarray M_Aij_last
33063  * np.ndarray acceleration
33064  */
33065 
33066 /* Python wrapper */
33067 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_1__get__(PyObject *__pyx_v_self); /*proto*/
33068 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_1__get__(PyObject *__pyx_v_self) {
33069  PyObject *__pyx_r = 0;
33070  __Pyx_RefNannyDeclarations
33071  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33072  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33073 
33074  /* function exit code */
33075  __Pyx_RefNannyFinishContext();
33076  return __pyx_r;
33077 }
33078 
33079 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33080  PyObject *__pyx_r = NULL;
33081  __Pyx_TraceDeclarations
33082  __Pyx_RefNannyDeclarations
33083  int __pyx_lineno = 0;
33084  const char *__pyx_filename = NULL;
33085  int __pyx_clineno = 0;
33086  __Pyx_RefNannySetupContext("__get__", 0);
33087  __Pyx_TraceCall("__get__", __pyx_f[2], 213, 0, __PYX_ERR(2, 213, __pyx_L1_error));
33088  __Pyx_XDECREF(__pyx_r);
33089  __Pyx_INCREF(((PyObject *)__pyx_v_self->F_Aij_last));
33090  __pyx_r = ((PyObject *)__pyx_v_self->F_Aij_last);
33091  goto __pyx_L0;
33092 
33093  /* function exit code */
33094  __pyx_L1_error:;
33095  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_Aij_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33096  __pyx_r = NULL;
33097  __pyx_L0:;
33098  __Pyx_XGIVEREF(__pyx_r);
33099  __Pyx_TraceReturn(__pyx_r, 0);
33100  __Pyx_RefNannyFinishContext();
33101  return __pyx_r;
33102 }
33103 
33104 /* Python wrapper */
33105 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
33106 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
33107  int __pyx_r;
33108  __Pyx_RefNannyDeclarations
33109  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
33110  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
33111 
33112  /* function exit code */
33113  __Pyx_RefNannyFinishContext();
33114  return __pyx_r;
33115 }
33116 
33117 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
33118  int __pyx_r;
33119  __Pyx_TraceDeclarations
33120  __Pyx_RefNannyDeclarations
33121  PyObject *__pyx_t_1 = NULL;
33122  int __pyx_lineno = 0;
33123  const char *__pyx_filename = NULL;
33124  int __pyx_clineno = 0;
33125  __Pyx_RefNannySetupContext("__set__", 0);
33126  __Pyx_TraceCall("__set__", __pyx_f[2], 213, 0, __PYX_ERR(2, 213, __pyx_L1_error));
33127  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 213, __pyx_L1_error)
33128  __pyx_t_1 = __pyx_v_value;
33129  __Pyx_INCREF(__pyx_t_1);
33130  __Pyx_GIVEREF(__pyx_t_1);
33131  __Pyx_GOTREF(__pyx_v_self->F_Aij_last);
33132  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_Aij_last));
33133  __pyx_v_self->F_Aij_last = ((PyArrayObject *)__pyx_t_1);
33134  __pyx_t_1 = 0;
33135 
33136  /* function exit code */
33137  __pyx_r = 0;
33138  goto __pyx_L0;
33139  __pyx_L1_error:;
33140  __Pyx_XDECREF(__pyx_t_1);
33141  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_Aij_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33142  __pyx_r = -1;
33143  __pyx_L0:;
33144  __Pyx_TraceReturn(Py_None, 0);
33145  __Pyx_RefNannyFinishContext();
33146  return __pyx_r;
33147 }
33148 
33149 /* Python wrapper */
33150 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_5__del__(PyObject *__pyx_v_self); /*proto*/
33151 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_5__del__(PyObject *__pyx_v_self) {
33152  int __pyx_r;
33153  __Pyx_RefNannyDeclarations
33154  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33155  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33156 
33157  /* function exit code */
33158  __Pyx_RefNannyFinishContext();
33159  return __pyx_r;
33160 }
33161 
33162 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33163  int __pyx_r;
33164  __Pyx_TraceDeclarations
33165  __Pyx_RefNannyDeclarations
33166  int __pyx_lineno = 0;
33167  const char *__pyx_filename = NULL;
33168  int __pyx_clineno = 0;
33169  __Pyx_RefNannySetupContext("__del__", 0);
33170  __Pyx_TraceCall("__del__", __pyx_f[2], 213, 0, __PYX_ERR(2, 213, __pyx_L1_error));
33171  __Pyx_INCREF(Py_None);
33172  __Pyx_GIVEREF(Py_None);
33173  __Pyx_GOTREF(__pyx_v_self->F_Aij_last);
33174  __Pyx_DECREF(((PyObject *)__pyx_v_self->F_Aij_last));
33175  __pyx_v_self->F_Aij_last = ((PyArrayObject *)Py_None);
33176 
33177  /* function exit code */
33178  __pyx_r = 0;
33179  goto __pyx_L0;
33180  __pyx_L1_error:;
33181  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.F_Aij_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33182  __pyx_r = -1;
33183  __pyx_L0:;
33184  __Pyx_TraceReturn(Py_None, 0);
33185  __Pyx_RefNannyFinishContext();
33186  return __pyx_r;
33187 }
33188 
33189 /* "mbd/CouplingFSI.pxd":214
33190  * np.ndarray M_Aij
33191  * np.ndarray F_Aij_last
33192  * np.ndarray M_Aij_last # <<<<<<<<<<<<<<
33193  * np.ndarray acceleration
33194  * np.ndarray acceleration_last
33195  */
33196 
33197 /* Python wrapper */
33198 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_1__get__(PyObject *__pyx_v_self); /*proto*/
33199 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_1__get__(PyObject *__pyx_v_self) {
33200  PyObject *__pyx_r = 0;
33201  __Pyx_RefNannyDeclarations
33202  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33203  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33204 
33205  /* function exit code */
33206  __Pyx_RefNannyFinishContext();
33207  return __pyx_r;
33208 }
33209 
33210 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33211  PyObject *__pyx_r = NULL;
33212  __Pyx_TraceDeclarations
33213  __Pyx_RefNannyDeclarations
33214  int __pyx_lineno = 0;
33215  const char *__pyx_filename = NULL;
33216  int __pyx_clineno = 0;
33217  __Pyx_RefNannySetupContext("__get__", 0);
33218  __Pyx_TraceCall("__get__", __pyx_f[2], 214, 0, __PYX_ERR(2, 214, __pyx_L1_error));
33219  __Pyx_XDECREF(__pyx_r);
33220  __Pyx_INCREF(((PyObject *)__pyx_v_self->M_Aij_last));
33221  __pyx_r = ((PyObject *)__pyx_v_self->M_Aij_last);
33222  goto __pyx_L0;
33223 
33224  /* function exit code */
33225  __pyx_L1_error:;
33226  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_Aij_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33227  __pyx_r = NULL;
33228  __pyx_L0:;
33229  __Pyx_XGIVEREF(__pyx_r);
33230  __Pyx_TraceReturn(__pyx_r, 0);
33231  __Pyx_RefNannyFinishContext();
33232  return __pyx_r;
33233 }
33234 
33235 /* Python wrapper */
33236 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
33237 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
33238  int __pyx_r;
33239  __Pyx_RefNannyDeclarations
33240  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
33241  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
33242 
33243  /* function exit code */
33244  __Pyx_RefNannyFinishContext();
33245  return __pyx_r;
33246 }
33247 
33248 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
33249  int __pyx_r;
33250  __Pyx_TraceDeclarations
33251  __Pyx_RefNannyDeclarations
33252  PyObject *__pyx_t_1 = NULL;
33253  int __pyx_lineno = 0;
33254  const char *__pyx_filename = NULL;
33255  int __pyx_clineno = 0;
33256  __Pyx_RefNannySetupContext("__set__", 0);
33257  __Pyx_TraceCall("__set__", __pyx_f[2], 214, 0, __PYX_ERR(2, 214, __pyx_L1_error));
33258  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 214, __pyx_L1_error)
33259  __pyx_t_1 = __pyx_v_value;
33260  __Pyx_INCREF(__pyx_t_1);
33261  __Pyx_GIVEREF(__pyx_t_1);
33262  __Pyx_GOTREF(__pyx_v_self->M_Aij_last);
33263  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_Aij_last));
33264  __pyx_v_self->M_Aij_last = ((PyArrayObject *)__pyx_t_1);
33265  __pyx_t_1 = 0;
33266 
33267  /* function exit code */
33268  __pyx_r = 0;
33269  goto __pyx_L0;
33270  __pyx_L1_error:;
33271  __Pyx_XDECREF(__pyx_t_1);
33272  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_Aij_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33273  __pyx_r = -1;
33274  __pyx_L0:;
33275  __Pyx_TraceReturn(Py_None, 0);
33276  __Pyx_RefNannyFinishContext();
33277  return __pyx_r;
33278 }
33279 
33280 /* Python wrapper */
33281 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_5__del__(PyObject *__pyx_v_self); /*proto*/
33282 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_5__del__(PyObject *__pyx_v_self) {
33283  int __pyx_r;
33284  __Pyx_RefNannyDeclarations
33285  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33286  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33287 
33288  /* function exit code */
33289  __Pyx_RefNannyFinishContext();
33290  return __pyx_r;
33291 }
33292 
33293 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33294  int __pyx_r;
33295  __Pyx_TraceDeclarations
33296  __Pyx_RefNannyDeclarations
33297  int __pyx_lineno = 0;
33298  const char *__pyx_filename = NULL;
33299  int __pyx_clineno = 0;
33300  __Pyx_RefNannySetupContext("__del__", 0);
33301  __Pyx_TraceCall("__del__", __pyx_f[2], 214, 0, __PYX_ERR(2, 214, __pyx_L1_error));
33302  __Pyx_INCREF(Py_None);
33303  __Pyx_GIVEREF(Py_None);
33304  __Pyx_GOTREF(__pyx_v_self->M_Aij_last);
33305  __Pyx_DECREF(((PyObject *)__pyx_v_self->M_Aij_last));
33306  __pyx_v_self->M_Aij_last = ((PyArrayObject *)Py_None);
33307 
33308  /* function exit code */
33309  __pyx_r = 0;
33310  goto __pyx_L0;
33311  __pyx_L1_error:;
33312  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.M_Aij_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33313  __pyx_r = -1;
33314  __pyx_L0:;
33315  __Pyx_TraceReturn(Py_None, 0);
33316  __Pyx_RefNannyFinishContext();
33317  return __pyx_r;
33318 }
33319 
33320 /* "mbd/CouplingFSI.pxd":215
33321  * np.ndarray F_Aij_last
33322  * np.ndarray M_Aij_last
33323  * np.ndarray acceleration # <<<<<<<<<<<<<<
33324  * np.ndarray acceleration_last
33325  * np.ndarray velocity
33326  */
33327 
33328 /* Python wrapper */
33329 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_1__get__(PyObject *__pyx_v_self); /*proto*/
33330 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_1__get__(PyObject *__pyx_v_self) {
33331  PyObject *__pyx_r = 0;
33332  __Pyx_RefNannyDeclarations
33333  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33334  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33335 
33336  /* function exit code */
33337  __Pyx_RefNannyFinishContext();
33338  return __pyx_r;
33339 }
33340 
33341 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33342  PyObject *__pyx_r = NULL;
33343  __Pyx_TraceDeclarations
33344  __Pyx_RefNannyDeclarations
33345  int __pyx_lineno = 0;
33346  const char *__pyx_filename = NULL;
33347  int __pyx_clineno = 0;
33348  __Pyx_RefNannySetupContext("__get__", 0);
33349  __Pyx_TraceCall("__get__", __pyx_f[2], 215, 0, __PYX_ERR(2, 215, __pyx_L1_error));
33350  __Pyx_XDECREF(__pyx_r);
33351  __Pyx_INCREF(((PyObject *)__pyx_v_self->acceleration));
33352  __pyx_r = ((PyObject *)__pyx_v_self->acceleration);
33353  goto __pyx_L0;
33354 
33355  /* function exit code */
33356  __pyx_L1_error:;
33357  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.acceleration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33358  __pyx_r = NULL;
33359  __pyx_L0:;
33360  __Pyx_XGIVEREF(__pyx_r);
33361  __Pyx_TraceReturn(__pyx_r, 0);
33362  __Pyx_RefNannyFinishContext();
33363  return __pyx_r;
33364 }
33365 
33366 /* Python wrapper */
33367 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
33368 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
33369  int __pyx_r;
33370  __Pyx_RefNannyDeclarations
33371  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
33372  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
33373 
33374  /* function exit code */
33375  __Pyx_RefNannyFinishContext();
33376  return __pyx_r;
33377 }
33378 
33379 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
33380  int __pyx_r;
33381  __Pyx_TraceDeclarations
33382  __Pyx_RefNannyDeclarations
33383  PyObject *__pyx_t_1 = NULL;
33384  int __pyx_lineno = 0;
33385  const char *__pyx_filename = NULL;
33386  int __pyx_clineno = 0;
33387  __Pyx_RefNannySetupContext("__set__", 0);
33388  __Pyx_TraceCall("__set__", __pyx_f[2], 215, 0, __PYX_ERR(2, 215, __pyx_L1_error));
33389  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 215, __pyx_L1_error)
33390  __pyx_t_1 = __pyx_v_value;
33391  __Pyx_INCREF(__pyx_t_1);
33392  __Pyx_GIVEREF(__pyx_t_1);
33393  __Pyx_GOTREF(__pyx_v_self->acceleration);
33394  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration));
33395  __pyx_v_self->acceleration = ((PyArrayObject *)__pyx_t_1);
33396  __pyx_t_1 = 0;
33397 
33398  /* function exit code */
33399  __pyx_r = 0;
33400  goto __pyx_L0;
33401  __pyx_L1_error:;
33402  __Pyx_XDECREF(__pyx_t_1);
33403  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.acceleration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33404  __pyx_r = -1;
33405  __pyx_L0:;
33406  __Pyx_TraceReturn(Py_None, 0);
33407  __Pyx_RefNannyFinishContext();
33408  return __pyx_r;
33409 }
33410 
33411 /* Python wrapper */
33412 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_5__del__(PyObject *__pyx_v_self); /*proto*/
33413 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_5__del__(PyObject *__pyx_v_self) {
33414  int __pyx_r;
33415  __Pyx_RefNannyDeclarations
33416  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33417  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33418 
33419  /* function exit code */
33420  __Pyx_RefNannyFinishContext();
33421  return __pyx_r;
33422 }
33423 
33424 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12acceleration_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33425  int __pyx_r;
33426  __Pyx_TraceDeclarations
33427  __Pyx_RefNannyDeclarations
33428  int __pyx_lineno = 0;
33429  const char *__pyx_filename = NULL;
33430  int __pyx_clineno = 0;
33431  __Pyx_RefNannySetupContext("__del__", 0);
33432  __Pyx_TraceCall("__del__", __pyx_f[2], 215, 0, __PYX_ERR(2, 215, __pyx_L1_error));
33433  __Pyx_INCREF(Py_None);
33434  __Pyx_GIVEREF(Py_None);
33435  __Pyx_GOTREF(__pyx_v_self->acceleration);
33436  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration));
33437  __pyx_v_self->acceleration = ((PyArrayObject *)Py_None);
33438 
33439  /* function exit code */
33440  __pyx_r = 0;
33441  goto __pyx_L0;
33442  __pyx_L1_error:;
33443  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.acceleration.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33444  __pyx_r = -1;
33445  __pyx_L0:;
33446  __Pyx_TraceReturn(Py_None, 0);
33447  __Pyx_RefNannyFinishContext();
33448  return __pyx_r;
33449 }
33450 
33451 /* "mbd/CouplingFSI.pxd":216
33452  * np.ndarray M_Aij_last
33453  * np.ndarray acceleration
33454  * np.ndarray acceleration_last # <<<<<<<<<<<<<<
33455  * np.ndarray velocity
33456  * np.ndarray velocity_last
33457  */
33458 
33459 /* Python wrapper */
33460 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_1__get__(PyObject *__pyx_v_self); /*proto*/
33461 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_1__get__(PyObject *__pyx_v_self) {
33462  PyObject *__pyx_r = 0;
33463  __Pyx_RefNannyDeclarations
33464  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33465  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33466 
33467  /* function exit code */
33468  __Pyx_RefNannyFinishContext();
33469  return __pyx_r;
33470 }
33471 
33472 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33473  PyObject *__pyx_r = NULL;
33474  __Pyx_TraceDeclarations
33475  __Pyx_RefNannyDeclarations
33476  int __pyx_lineno = 0;
33477  const char *__pyx_filename = NULL;
33478  int __pyx_clineno = 0;
33479  __Pyx_RefNannySetupContext("__get__", 0);
33480  __Pyx_TraceCall("__get__", __pyx_f[2], 216, 0, __PYX_ERR(2, 216, __pyx_L1_error));
33481  __Pyx_XDECREF(__pyx_r);
33482  __Pyx_INCREF(((PyObject *)__pyx_v_self->acceleration_last));
33483  __pyx_r = ((PyObject *)__pyx_v_self->acceleration_last);
33484  goto __pyx_L0;
33485 
33486  /* function exit code */
33487  __pyx_L1_error:;
33488  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.acceleration_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33489  __pyx_r = NULL;
33490  __pyx_L0:;
33491  __Pyx_XGIVEREF(__pyx_r);
33492  __Pyx_TraceReturn(__pyx_r, 0);
33493  __Pyx_RefNannyFinishContext();
33494  return __pyx_r;
33495 }
33496 
33497 /* Python wrapper */
33498 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
33499 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
33500  int __pyx_r;
33501  __Pyx_RefNannyDeclarations
33502  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
33503  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
33504 
33505  /* function exit code */
33506  __Pyx_RefNannyFinishContext();
33507  return __pyx_r;
33508 }
33509 
33510 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
33511  int __pyx_r;
33512  __Pyx_TraceDeclarations
33513  __Pyx_RefNannyDeclarations
33514  PyObject *__pyx_t_1 = NULL;
33515  int __pyx_lineno = 0;
33516  const char *__pyx_filename = NULL;
33517  int __pyx_clineno = 0;
33518  __Pyx_RefNannySetupContext("__set__", 0);
33519  __Pyx_TraceCall("__set__", __pyx_f[2], 216, 0, __PYX_ERR(2, 216, __pyx_L1_error));
33520  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 216, __pyx_L1_error)
33521  __pyx_t_1 = __pyx_v_value;
33522  __Pyx_INCREF(__pyx_t_1);
33523  __Pyx_GIVEREF(__pyx_t_1);
33524  __Pyx_GOTREF(__pyx_v_self->acceleration_last);
33525  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration_last));
33526  __pyx_v_self->acceleration_last = ((PyArrayObject *)__pyx_t_1);
33527  __pyx_t_1 = 0;
33528 
33529  /* function exit code */
33530  __pyx_r = 0;
33531  goto __pyx_L0;
33532  __pyx_L1_error:;
33533  __Pyx_XDECREF(__pyx_t_1);
33534  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.acceleration_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33535  __pyx_r = -1;
33536  __pyx_L0:;
33537  __Pyx_TraceReturn(Py_None, 0);
33538  __Pyx_RefNannyFinishContext();
33539  return __pyx_r;
33540 }
33541 
33542 /* Python wrapper */
33543 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_5__del__(PyObject *__pyx_v_self); /*proto*/
33544 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_5__del__(PyObject *__pyx_v_self) {
33545  int __pyx_r;
33546  __Pyx_RefNannyDeclarations
33547  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33548  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33549 
33550  /* function exit code */
33551  __Pyx_RefNannyFinishContext();
33552  return __pyx_r;
33553 }
33554 
33555 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33556  int __pyx_r;
33557  __Pyx_TraceDeclarations
33558  __Pyx_RefNannyDeclarations
33559  int __pyx_lineno = 0;
33560  const char *__pyx_filename = NULL;
33561  int __pyx_clineno = 0;
33562  __Pyx_RefNannySetupContext("__del__", 0);
33563  __Pyx_TraceCall("__del__", __pyx_f[2], 216, 0, __PYX_ERR(2, 216, __pyx_L1_error));
33564  __Pyx_INCREF(Py_None);
33565  __Pyx_GIVEREF(Py_None);
33566  __Pyx_GOTREF(__pyx_v_self->acceleration_last);
33567  __Pyx_DECREF(((PyObject *)__pyx_v_self->acceleration_last));
33568  __pyx_v_self->acceleration_last = ((PyArrayObject *)Py_None);
33569 
33570  /* function exit code */
33571  __pyx_r = 0;
33572  goto __pyx_L0;
33573  __pyx_L1_error:;
33574  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.acceleration_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33575  __pyx_r = -1;
33576  __pyx_L0:;
33577  __Pyx_TraceReturn(Py_None, 0);
33578  __Pyx_RefNannyFinishContext();
33579  return __pyx_r;
33580 }
33581 
33582 /* "mbd/CouplingFSI.pxd":217
33583  * np.ndarray acceleration
33584  * np.ndarray acceleration_last
33585  * np.ndarray velocity # <<<<<<<<<<<<<<
33586  * np.ndarray velocity_last
33587  * np.ndarray ang_acceleration_last
33588  */
33589 
33590 /* Python wrapper */
33591 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_1__get__(PyObject *__pyx_v_self); /*proto*/
33592 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_1__get__(PyObject *__pyx_v_self) {
33593  PyObject *__pyx_r = 0;
33594  __Pyx_RefNannyDeclarations
33595  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33596  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33597 
33598  /* function exit code */
33599  __Pyx_RefNannyFinishContext();
33600  return __pyx_r;
33601 }
33602 
33603 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33604  PyObject *__pyx_r = NULL;
33605  __Pyx_TraceDeclarations
33606  __Pyx_RefNannyDeclarations
33607  int __pyx_lineno = 0;
33608  const char *__pyx_filename = NULL;
33609  int __pyx_clineno = 0;
33610  __Pyx_RefNannySetupContext("__get__", 0);
33611  __Pyx_TraceCall("__get__", __pyx_f[2], 217, 0, __PYX_ERR(2, 217, __pyx_L1_error));
33612  __Pyx_XDECREF(__pyx_r);
33613  __Pyx_INCREF(((PyObject *)__pyx_v_self->velocity));
33614  __pyx_r = ((PyObject *)__pyx_v_self->velocity);
33615  goto __pyx_L0;
33616 
33617  /* function exit code */
33618  __pyx_L1_error:;
33619  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.velocity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33620  __pyx_r = NULL;
33621  __pyx_L0:;
33622  __Pyx_XGIVEREF(__pyx_r);
33623  __Pyx_TraceReturn(__pyx_r, 0);
33624  __Pyx_RefNannyFinishContext();
33625  return __pyx_r;
33626 }
33627 
33628 /* Python wrapper */
33629 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
33630 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
33631  int __pyx_r;
33632  __Pyx_RefNannyDeclarations
33633  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
33634  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
33635 
33636  /* function exit code */
33637  __Pyx_RefNannyFinishContext();
33638  return __pyx_r;
33639 }
33640 
33641 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
33642  int __pyx_r;
33643  __Pyx_TraceDeclarations
33644  __Pyx_RefNannyDeclarations
33645  PyObject *__pyx_t_1 = NULL;
33646  int __pyx_lineno = 0;
33647  const char *__pyx_filename = NULL;
33648  int __pyx_clineno = 0;
33649  __Pyx_RefNannySetupContext("__set__", 0);
33650  __Pyx_TraceCall("__set__", __pyx_f[2], 217, 0, __PYX_ERR(2, 217, __pyx_L1_error));
33651  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 217, __pyx_L1_error)
33652  __pyx_t_1 = __pyx_v_value;
33653  __Pyx_INCREF(__pyx_t_1);
33654  __Pyx_GIVEREF(__pyx_t_1);
33655  __Pyx_GOTREF(__pyx_v_self->velocity);
33656  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity));
33657  __pyx_v_self->velocity = ((PyArrayObject *)__pyx_t_1);
33658  __pyx_t_1 = 0;
33659 
33660  /* function exit code */
33661  __pyx_r = 0;
33662  goto __pyx_L0;
33663  __pyx_L1_error:;
33664  __Pyx_XDECREF(__pyx_t_1);
33665  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.velocity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33666  __pyx_r = -1;
33667  __pyx_L0:;
33668  __Pyx_TraceReturn(Py_None, 0);
33669  __Pyx_RefNannyFinishContext();
33670  return __pyx_r;
33671 }
33672 
33673 /* Python wrapper */
33674 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_5__del__(PyObject *__pyx_v_self); /*proto*/
33675 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_5__del__(PyObject *__pyx_v_self) {
33676  int __pyx_r;
33677  __Pyx_RefNannyDeclarations
33678  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33679  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33680 
33681  /* function exit code */
33682  __Pyx_RefNannyFinishContext();
33683  return __pyx_r;
33684 }
33685 
33686 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_8velocity_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33687  int __pyx_r;
33688  __Pyx_TraceDeclarations
33689  __Pyx_RefNannyDeclarations
33690  int __pyx_lineno = 0;
33691  const char *__pyx_filename = NULL;
33692  int __pyx_clineno = 0;
33693  __Pyx_RefNannySetupContext("__del__", 0);
33694  __Pyx_TraceCall("__del__", __pyx_f[2], 217, 0, __PYX_ERR(2, 217, __pyx_L1_error));
33695  __Pyx_INCREF(Py_None);
33696  __Pyx_GIVEREF(Py_None);
33697  __Pyx_GOTREF(__pyx_v_self->velocity);
33698  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity));
33699  __pyx_v_self->velocity = ((PyArrayObject *)Py_None);
33700 
33701  /* function exit code */
33702  __pyx_r = 0;
33703  goto __pyx_L0;
33704  __pyx_L1_error:;
33705  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.velocity.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33706  __pyx_r = -1;
33707  __pyx_L0:;
33708  __Pyx_TraceReturn(Py_None, 0);
33709  __Pyx_RefNannyFinishContext();
33710  return __pyx_r;
33711 }
33712 
33713 /* "mbd/CouplingFSI.pxd":218
33714  * np.ndarray acceleration_last
33715  * np.ndarray velocity
33716  * np.ndarray velocity_last # <<<<<<<<<<<<<<
33717  * np.ndarray ang_acceleration_last
33718  * np.ndarray ang_acceleration
33719  */
33720 
33721 /* Python wrapper */
33722 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_1__get__(PyObject *__pyx_v_self); /*proto*/
33723 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_1__get__(PyObject *__pyx_v_self) {
33724  PyObject *__pyx_r = 0;
33725  __Pyx_RefNannyDeclarations
33726  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33727  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33728 
33729  /* function exit code */
33730  __Pyx_RefNannyFinishContext();
33731  return __pyx_r;
33732 }
33733 
33734 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33735  PyObject *__pyx_r = NULL;
33736  __Pyx_TraceDeclarations
33737  __Pyx_RefNannyDeclarations
33738  int __pyx_lineno = 0;
33739  const char *__pyx_filename = NULL;
33740  int __pyx_clineno = 0;
33741  __Pyx_RefNannySetupContext("__get__", 0);
33742  __Pyx_TraceCall("__get__", __pyx_f[2], 218, 0, __PYX_ERR(2, 218, __pyx_L1_error));
33743  __Pyx_XDECREF(__pyx_r);
33744  __Pyx_INCREF(((PyObject *)__pyx_v_self->velocity_last));
33745  __pyx_r = ((PyObject *)__pyx_v_self->velocity_last);
33746  goto __pyx_L0;
33747 
33748  /* function exit code */
33749  __pyx_L1_error:;
33750  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.velocity_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33751  __pyx_r = NULL;
33752  __pyx_L0:;
33753  __Pyx_XGIVEREF(__pyx_r);
33754  __Pyx_TraceReturn(__pyx_r, 0);
33755  __Pyx_RefNannyFinishContext();
33756  return __pyx_r;
33757 }
33758 
33759 /* Python wrapper */
33760 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
33761 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
33762  int __pyx_r;
33763  __Pyx_RefNannyDeclarations
33764  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
33765  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
33766 
33767  /* function exit code */
33768  __Pyx_RefNannyFinishContext();
33769  return __pyx_r;
33770 }
33771 
33772 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
33773  int __pyx_r;
33774  __Pyx_TraceDeclarations
33775  __Pyx_RefNannyDeclarations
33776  PyObject *__pyx_t_1 = NULL;
33777  int __pyx_lineno = 0;
33778  const char *__pyx_filename = NULL;
33779  int __pyx_clineno = 0;
33780  __Pyx_RefNannySetupContext("__set__", 0);
33781  __Pyx_TraceCall("__set__", __pyx_f[2], 218, 0, __PYX_ERR(2, 218, __pyx_L1_error));
33782  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 218, __pyx_L1_error)
33783  __pyx_t_1 = __pyx_v_value;
33784  __Pyx_INCREF(__pyx_t_1);
33785  __Pyx_GIVEREF(__pyx_t_1);
33786  __Pyx_GOTREF(__pyx_v_self->velocity_last);
33787  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity_last));
33788  __pyx_v_self->velocity_last = ((PyArrayObject *)__pyx_t_1);
33789  __pyx_t_1 = 0;
33790 
33791  /* function exit code */
33792  __pyx_r = 0;
33793  goto __pyx_L0;
33794  __pyx_L1_error:;
33795  __Pyx_XDECREF(__pyx_t_1);
33796  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.velocity_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33797  __pyx_r = -1;
33798  __pyx_L0:;
33799  __Pyx_TraceReturn(Py_None, 0);
33800  __Pyx_RefNannyFinishContext();
33801  return __pyx_r;
33802 }
33803 
33804 /* Python wrapper */
33805 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_5__del__(PyObject *__pyx_v_self); /*proto*/
33806 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_5__del__(PyObject *__pyx_v_self) {
33807  int __pyx_r;
33808  __Pyx_RefNannyDeclarations
33809  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33810  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33811 
33812  /* function exit code */
33813  __Pyx_RefNannyFinishContext();
33814  return __pyx_r;
33815 }
33816 
33817 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33818  int __pyx_r;
33819  __Pyx_TraceDeclarations
33820  __Pyx_RefNannyDeclarations
33821  int __pyx_lineno = 0;
33822  const char *__pyx_filename = NULL;
33823  int __pyx_clineno = 0;
33824  __Pyx_RefNannySetupContext("__del__", 0);
33825  __Pyx_TraceCall("__del__", __pyx_f[2], 218, 0, __PYX_ERR(2, 218, __pyx_L1_error));
33826  __Pyx_INCREF(Py_None);
33827  __Pyx_GIVEREF(Py_None);
33828  __Pyx_GOTREF(__pyx_v_self->velocity_last);
33829  __Pyx_DECREF(((PyObject *)__pyx_v_self->velocity_last));
33830  __pyx_v_self->velocity_last = ((PyArrayObject *)Py_None);
33831 
33832  /* function exit code */
33833  __pyx_r = 0;
33834  goto __pyx_L0;
33835  __pyx_L1_error:;
33836  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.velocity_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33837  __pyx_r = -1;
33838  __pyx_L0:;
33839  __Pyx_TraceReturn(Py_None, 0);
33840  __Pyx_RefNannyFinishContext();
33841  return __pyx_r;
33842 }
33843 
33844 /* "mbd/CouplingFSI.pxd":219
33845  * np.ndarray velocity
33846  * np.ndarray velocity_last
33847  * np.ndarray ang_acceleration_last # <<<<<<<<<<<<<<
33848  * np.ndarray ang_acceleration
33849  * np.ndarray ang_velocity_last
33850  */
33851 
33852 /* Python wrapper */
33853 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_1__get__(PyObject *__pyx_v_self); /*proto*/
33854 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_1__get__(PyObject *__pyx_v_self) {
33855  PyObject *__pyx_r = 0;
33856  __Pyx_RefNannyDeclarations
33857  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33858  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33859 
33860  /* function exit code */
33861  __Pyx_RefNannyFinishContext();
33862  return __pyx_r;
33863 }
33864 
33865 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33866  PyObject *__pyx_r = NULL;
33867  __Pyx_TraceDeclarations
33868  __Pyx_RefNannyDeclarations
33869  int __pyx_lineno = 0;
33870  const char *__pyx_filename = NULL;
33871  int __pyx_clineno = 0;
33872  __Pyx_RefNannySetupContext("__get__", 0);
33873  __Pyx_TraceCall("__get__", __pyx_f[2], 219, 0, __PYX_ERR(2, 219, __pyx_L1_error));
33874  __Pyx_XDECREF(__pyx_r);
33875  __Pyx_INCREF(((PyObject *)__pyx_v_self->ang_acceleration_last));
33876  __pyx_r = ((PyObject *)__pyx_v_self->ang_acceleration_last);
33877  goto __pyx_L0;
33878 
33879  /* function exit code */
33880  __pyx_L1_error:;
33881  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_acceleration_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33882  __pyx_r = NULL;
33883  __pyx_L0:;
33884  __Pyx_XGIVEREF(__pyx_r);
33885  __Pyx_TraceReturn(__pyx_r, 0);
33886  __Pyx_RefNannyFinishContext();
33887  return __pyx_r;
33888 }
33889 
33890 /* Python wrapper */
33891 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
33892 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
33893  int __pyx_r;
33894  __Pyx_RefNannyDeclarations
33895  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
33896  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
33897 
33898  /* function exit code */
33899  __Pyx_RefNannyFinishContext();
33900  return __pyx_r;
33901 }
33902 
33903 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
33904  int __pyx_r;
33905  __Pyx_TraceDeclarations
33906  __Pyx_RefNannyDeclarations
33907  PyObject *__pyx_t_1 = NULL;
33908  int __pyx_lineno = 0;
33909  const char *__pyx_filename = NULL;
33910  int __pyx_clineno = 0;
33911  __Pyx_RefNannySetupContext("__set__", 0);
33912  __Pyx_TraceCall("__set__", __pyx_f[2], 219, 0, __PYX_ERR(2, 219, __pyx_L1_error));
33913  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 219, __pyx_L1_error)
33914  __pyx_t_1 = __pyx_v_value;
33915  __Pyx_INCREF(__pyx_t_1);
33916  __Pyx_GIVEREF(__pyx_t_1);
33917  __Pyx_GOTREF(__pyx_v_self->ang_acceleration_last);
33918  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_acceleration_last));
33919  __pyx_v_self->ang_acceleration_last = ((PyArrayObject *)__pyx_t_1);
33920  __pyx_t_1 = 0;
33921 
33922  /* function exit code */
33923  __pyx_r = 0;
33924  goto __pyx_L0;
33925  __pyx_L1_error:;
33926  __Pyx_XDECREF(__pyx_t_1);
33927  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_acceleration_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33928  __pyx_r = -1;
33929  __pyx_L0:;
33930  __Pyx_TraceReturn(Py_None, 0);
33931  __Pyx_RefNannyFinishContext();
33932  return __pyx_r;
33933 }
33934 
33935 /* Python wrapper */
33936 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_5__del__(PyObject *__pyx_v_self); /*proto*/
33937 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_5__del__(PyObject *__pyx_v_self) {
33938  int __pyx_r;
33939  __Pyx_RefNannyDeclarations
33940  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
33941  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33942 
33943  /* function exit code */
33944  __Pyx_RefNannyFinishContext();
33945  return __pyx_r;
33946 }
33947 
33948 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33949  int __pyx_r;
33950  __Pyx_TraceDeclarations
33951  __Pyx_RefNannyDeclarations
33952  int __pyx_lineno = 0;
33953  const char *__pyx_filename = NULL;
33954  int __pyx_clineno = 0;
33955  __Pyx_RefNannySetupContext("__del__", 0);
33956  __Pyx_TraceCall("__del__", __pyx_f[2], 219, 0, __PYX_ERR(2, 219, __pyx_L1_error));
33957  __Pyx_INCREF(Py_None);
33958  __Pyx_GIVEREF(Py_None);
33959  __Pyx_GOTREF(__pyx_v_self->ang_acceleration_last);
33960  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_acceleration_last));
33961  __pyx_v_self->ang_acceleration_last = ((PyArrayObject *)Py_None);
33962 
33963  /* function exit code */
33964  __pyx_r = 0;
33965  goto __pyx_L0;
33966  __pyx_L1_error:;
33967  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_acceleration_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
33968  __pyx_r = -1;
33969  __pyx_L0:;
33970  __Pyx_TraceReturn(Py_None, 0);
33971  __Pyx_RefNannyFinishContext();
33972  return __pyx_r;
33973 }
33974 
33975 /* "mbd/CouplingFSI.pxd":220
33976  * np.ndarray velocity_last
33977  * np.ndarray ang_acceleration_last
33978  * np.ndarray ang_acceleration # <<<<<<<<<<<<<<
33979  * np.ndarray ang_velocity_last
33980  * np.ndarray ang_velocity
33981  */
33982 
33983 /* Python wrapper */
33984 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_1__get__(PyObject *__pyx_v_self); /*proto*/
33985 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_1__get__(PyObject *__pyx_v_self) {
33986  PyObject *__pyx_r = 0;
33987  __Pyx_RefNannyDeclarations
33988  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
33989  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
33990 
33991  /* function exit code */
33992  __Pyx_RefNannyFinishContext();
33993  return __pyx_r;
33994 }
33995 
33996 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
33997  PyObject *__pyx_r = NULL;
33998  __Pyx_TraceDeclarations
33999  __Pyx_RefNannyDeclarations
34000  int __pyx_lineno = 0;
34001  const char *__pyx_filename = NULL;
34002  int __pyx_clineno = 0;
34003  __Pyx_RefNannySetupContext("__get__", 0);
34004  __Pyx_TraceCall("__get__", __pyx_f[2], 220, 0, __PYX_ERR(2, 220, __pyx_L1_error));
34005  __Pyx_XDECREF(__pyx_r);
34006  __Pyx_INCREF(((PyObject *)__pyx_v_self->ang_acceleration));
34007  __pyx_r = ((PyObject *)__pyx_v_self->ang_acceleration);
34008  goto __pyx_L0;
34009 
34010  /* function exit code */
34011  __pyx_L1_error:;
34012  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_acceleration.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34013  __pyx_r = NULL;
34014  __pyx_L0:;
34015  __Pyx_XGIVEREF(__pyx_r);
34016  __Pyx_TraceReturn(__pyx_r, 0);
34017  __Pyx_RefNannyFinishContext();
34018  return __pyx_r;
34019 }
34020 
34021 /* Python wrapper */
34022 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34023 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34024  int __pyx_r;
34025  __Pyx_RefNannyDeclarations
34026  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34027  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34028 
34029  /* function exit code */
34030  __Pyx_RefNannyFinishContext();
34031  return __pyx_r;
34032 }
34033 
34034 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34035  int __pyx_r;
34036  __Pyx_TraceDeclarations
34037  __Pyx_RefNannyDeclarations
34038  PyObject *__pyx_t_1 = NULL;
34039  int __pyx_lineno = 0;
34040  const char *__pyx_filename = NULL;
34041  int __pyx_clineno = 0;
34042  __Pyx_RefNannySetupContext("__set__", 0);
34043  __Pyx_TraceCall("__set__", __pyx_f[2], 220, 0, __PYX_ERR(2, 220, __pyx_L1_error));
34044  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 220, __pyx_L1_error)
34045  __pyx_t_1 = __pyx_v_value;
34046  __Pyx_INCREF(__pyx_t_1);
34047  __Pyx_GIVEREF(__pyx_t_1);
34048  __Pyx_GOTREF(__pyx_v_self->ang_acceleration);
34049  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_acceleration));
34050  __pyx_v_self->ang_acceleration = ((PyArrayObject *)__pyx_t_1);
34051  __pyx_t_1 = 0;
34052 
34053  /* function exit code */
34054  __pyx_r = 0;
34055  goto __pyx_L0;
34056  __pyx_L1_error:;
34057  __Pyx_XDECREF(__pyx_t_1);
34058  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_acceleration.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34059  __pyx_r = -1;
34060  __pyx_L0:;
34061  __Pyx_TraceReturn(Py_None, 0);
34062  __Pyx_RefNannyFinishContext();
34063  return __pyx_r;
34064 }
34065 
34066 /* Python wrapper */
34067 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_5__del__(PyObject *__pyx_v_self); /*proto*/
34068 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_5__del__(PyObject *__pyx_v_self) {
34069  int __pyx_r;
34070  __Pyx_RefNannyDeclarations
34071  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
34072  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34073 
34074  /* function exit code */
34075  __Pyx_RefNannyFinishContext();
34076  return __pyx_r;
34077 }
34078 
34079 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34080  int __pyx_r;
34081  __Pyx_TraceDeclarations
34082  __Pyx_RefNannyDeclarations
34083  int __pyx_lineno = 0;
34084  const char *__pyx_filename = NULL;
34085  int __pyx_clineno = 0;
34086  __Pyx_RefNannySetupContext("__del__", 0);
34087  __Pyx_TraceCall("__del__", __pyx_f[2], 220, 0, __PYX_ERR(2, 220, __pyx_L1_error));
34088  __Pyx_INCREF(Py_None);
34089  __Pyx_GIVEREF(Py_None);
34090  __Pyx_GOTREF(__pyx_v_self->ang_acceleration);
34091  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_acceleration));
34092  __pyx_v_self->ang_acceleration = ((PyArrayObject *)Py_None);
34093 
34094  /* function exit code */
34095  __pyx_r = 0;
34096  goto __pyx_L0;
34097  __pyx_L1_error:;
34098  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_acceleration.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34099  __pyx_r = -1;
34100  __pyx_L0:;
34101  __Pyx_TraceReturn(Py_None, 0);
34102  __Pyx_RefNannyFinishContext();
34103  return __pyx_r;
34104 }
34105 
34106 /* "mbd/CouplingFSI.pxd":221
34107  * np.ndarray ang_acceleration_last
34108  * np.ndarray ang_acceleration
34109  * np.ndarray ang_velocity_last # <<<<<<<<<<<<<<
34110  * np.ndarray ang_velocity
34111  * double ang_vel_norm
34112  */
34113 
34114 /* Python wrapper */
34115 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_1__get__(PyObject *__pyx_v_self); /*proto*/
34116 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_1__get__(PyObject *__pyx_v_self) {
34117  PyObject *__pyx_r = 0;
34118  __Pyx_RefNannyDeclarations
34119  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34120  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34121 
34122  /* function exit code */
34123  __Pyx_RefNannyFinishContext();
34124  return __pyx_r;
34125 }
34126 
34127 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34128  PyObject *__pyx_r = NULL;
34129  __Pyx_TraceDeclarations
34130  __Pyx_RefNannyDeclarations
34131  int __pyx_lineno = 0;
34132  const char *__pyx_filename = NULL;
34133  int __pyx_clineno = 0;
34134  __Pyx_RefNannySetupContext("__get__", 0);
34135  __Pyx_TraceCall("__get__", __pyx_f[2], 221, 0, __PYX_ERR(2, 221, __pyx_L1_error));
34136  __Pyx_XDECREF(__pyx_r);
34137  __Pyx_INCREF(((PyObject *)__pyx_v_self->ang_velocity_last));
34138  __pyx_r = ((PyObject *)__pyx_v_self->ang_velocity_last);
34139  goto __pyx_L0;
34140 
34141  /* function exit code */
34142  __pyx_L1_error:;
34143  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_velocity_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34144  __pyx_r = NULL;
34145  __pyx_L0:;
34146  __Pyx_XGIVEREF(__pyx_r);
34147  __Pyx_TraceReturn(__pyx_r, 0);
34148  __Pyx_RefNannyFinishContext();
34149  return __pyx_r;
34150 }
34151 
34152 /* Python wrapper */
34153 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34154 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34155  int __pyx_r;
34156  __Pyx_RefNannyDeclarations
34157  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34158  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34159 
34160  /* function exit code */
34161  __Pyx_RefNannyFinishContext();
34162  return __pyx_r;
34163 }
34164 
34165 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34166  int __pyx_r;
34167  __Pyx_TraceDeclarations
34168  __Pyx_RefNannyDeclarations
34169  PyObject *__pyx_t_1 = NULL;
34170  int __pyx_lineno = 0;
34171  const char *__pyx_filename = NULL;
34172  int __pyx_clineno = 0;
34173  __Pyx_RefNannySetupContext("__set__", 0);
34174  __Pyx_TraceCall("__set__", __pyx_f[2], 221, 0, __PYX_ERR(2, 221, __pyx_L1_error));
34175  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 221, __pyx_L1_error)
34176  __pyx_t_1 = __pyx_v_value;
34177  __Pyx_INCREF(__pyx_t_1);
34178  __Pyx_GIVEREF(__pyx_t_1);
34179  __Pyx_GOTREF(__pyx_v_self->ang_velocity_last);
34180  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_velocity_last));
34181  __pyx_v_self->ang_velocity_last = ((PyArrayObject *)__pyx_t_1);
34182  __pyx_t_1 = 0;
34183 
34184  /* function exit code */
34185  __pyx_r = 0;
34186  goto __pyx_L0;
34187  __pyx_L1_error:;
34188  __Pyx_XDECREF(__pyx_t_1);
34189  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_velocity_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34190  __pyx_r = -1;
34191  __pyx_L0:;
34192  __Pyx_TraceReturn(Py_None, 0);
34193  __Pyx_RefNannyFinishContext();
34194  return __pyx_r;
34195 }
34196 
34197 /* Python wrapper */
34198 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_5__del__(PyObject *__pyx_v_self); /*proto*/
34199 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_5__del__(PyObject *__pyx_v_self) {
34200  int __pyx_r;
34201  __Pyx_RefNannyDeclarations
34202  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
34203  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34204 
34205  /* function exit code */
34206  __Pyx_RefNannyFinishContext();
34207  return __pyx_r;
34208 }
34209 
34210 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34211  int __pyx_r;
34212  __Pyx_TraceDeclarations
34213  __Pyx_RefNannyDeclarations
34214  int __pyx_lineno = 0;
34215  const char *__pyx_filename = NULL;
34216  int __pyx_clineno = 0;
34217  __Pyx_RefNannySetupContext("__del__", 0);
34218  __Pyx_TraceCall("__del__", __pyx_f[2], 221, 0, __PYX_ERR(2, 221, __pyx_L1_error));
34219  __Pyx_INCREF(Py_None);
34220  __Pyx_GIVEREF(Py_None);
34221  __Pyx_GOTREF(__pyx_v_self->ang_velocity_last);
34222  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_velocity_last));
34223  __pyx_v_self->ang_velocity_last = ((PyArrayObject *)Py_None);
34224 
34225  /* function exit code */
34226  __pyx_r = 0;
34227  goto __pyx_L0;
34228  __pyx_L1_error:;
34229  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_velocity_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34230  __pyx_r = -1;
34231  __pyx_L0:;
34232  __Pyx_TraceReturn(Py_None, 0);
34233  __Pyx_RefNannyFinishContext();
34234  return __pyx_r;
34235 }
34236 
34237 /* "mbd/CouplingFSI.pxd":222
34238  * np.ndarray ang_acceleration
34239  * np.ndarray ang_velocity_last
34240  * np.ndarray ang_velocity # <<<<<<<<<<<<<<
34241  * double ang_vel_norm
34242  * double ang_vel_norm_last
34243  */
34244 
34245 /* Python wrapper */
34246 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_1__get__(PyObject *__pyx_v_self); /*proto*/
34247 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_1__get__(PyObject *__pyx_v_self) {
34248  PyObject *__pyx_r = 0;
34249  __Pyx_RefNannyDeclarations
34250  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34251  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34252 
34253  /* function exit code */
34254  __Pyx_RefNannyFinishContext();
34255  return __pyx_r;
34256 }
34257 
34258 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34259  PyObject *__pyx_r = NULL;
34260  __Pyx_TraceDeclarations
34261  __Pyx_RefNannyDeclarations
34262  int __pyx_lineno = 0;
34263  const char *__pyx_filename = NULL;
34264  int __pyx_clineno = 0;
34265  __Pyx_RefNannySetupContext("__get__", 0);
34266  __Pyx_TraceCall("__get__", __pyx_f[2], 222, 0, __PYX_ERR(2, 222, __pyx_L1_error));
34267  __Pyx_XDECREF(__pyx_r);
34268  __Pyx_INCREF(((PyObject *)__pyx_v_self->ang_velocity));
34269  __pyx_r = ((PyObject *)__pyx_v_self->ang_velocity);
34270  goto __pyx_L0;
34271 
34272  /* function exit code */
34273  __pyx_L1_error:;
34274  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_velocity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34275  __pyx_r = NULL;
34276  __pyx_L0:;
34277  __Pyx_XGIVEREF(__pyx_r);
34278  __Pyx_TraceReturn(__pyx_r, 0);
34279  __Pyx_RefNannyFinishContext();
34280  return __pyx_r;
34281 }
34282 
34283 /* Python wrapper */
34284 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34285 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34286  int __pyx_r;
34287  __Pyx_RefNannyDeclarations
34288  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34289  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34290 
34291  /* function exit code */
34292  __Pyx_RefNannyFinishContext();
34293  return __pyx_r;
34294 }
34295 
34296 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34297  int __pyx_r;
34298  __Pyx_TraceDeclarations
34299  __Pyx_RefNannyDeclarations
34300  PyObject *__pyx_t_1 = NULL;
34301  int __pyx_lineno = 0;
34302  const char *__pyx_filename = NULL;
34303  int __pyx_clineno = 0;
34304  __Pyx_RefNannySetupContext("__set__", 0);
34305  __Pyx_TraceCall("__set__", __pyx_f[2], 222, 0, __PYX_ERR(2, 222, __pyx_L1_error));
34306  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 222, __pyx_L1_error)
34307  __pyx_t_1 = __pyx_v_value;
34308  __Pyx_INCREF(__pyx_t_1);
34309  __Pyx_GIVEREF(__pyx_t_1);
34310  __Pyx_GOTREF(__pyx_v_self->ang_velocity);
34311  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_velocity));
34312  __pyx_v_self->ang_velocity = ((PyArrayObject *)__pyx_t_1);
34313  __pyx_t_1 = 0;
34314 
34315  /* function exit code */
34316  __pyx_r = 0;
34317  goto __pyx_L0;
34318  __pyx_L1_error:;
34319  __Pyx_XDECREF(__pyx_t_1);
34320  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_velocity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34321  __pyx_r = -1;
34322  __pyx_L0:;
34323  __Pyx_TraceReturn(Py_None, 0);
34324  __Pyx_RefNannyFinishContext();
34325  return __pyx_r;
34326 }
34327 
34328 /* Python wrapper */
34329 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_5__del__(PyObject *__pyx_v_self); /*proto*/
34330 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_5__del__(PyObject *__pyx_v_self) {
34331  int __pyx_r;
34332  __Pyx_RefNannyDeclarations
34333  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
34334  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34335 
34336  /* function exit code */
34337  __Pyx_RefNannyFinishContext();
34338  return __pyx_r;
34339 }
34340 
34341 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34342  int __pyx_r;
34343  __Pyx_TraceDeclarations
34344  __Pyx_RefNannyDeclarations
34345  int __pyx_lineno = 0;
34346  const char *__pyx_filename = NULL;
34347  int __pyx_clineno = 0;
34348  __Pyx_RefNannySetupContext("__del__", 0);
34349  __Pyx_TraceCall("__del__", __pyx_f[2], 222, 0, __PYX_ERR(2, 222, __pyx_L1_error));
34350  __Pyx_INCREF(Py_None);
34351  __Pyx_GIVEREF(Py_None);
34352  __Pyx_GOTREF(__pyx_v_self->ang_velocity);
34353  __Pyx_DECREF(((PyObject *)__pyx_v_self->ang_velocity));
34354  __pyx_v_self->ang_velocity = ((PyArrayObject *)Py_None);
34355 
34356  /* function exit code */
34357  __pyx_r = 0;
34358  goto __pyx_L0;
34359  __pyx_L1_error:;
34360  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_velocity.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34361  __pyx_r = -1;
34362  __pyx_L0:;
34363  __Pyx_TraceReturn(Py_None, 0);
34364  __Pyx_RefNannyFinishContext();
34365  return __pyx_r;
34366 }
34367 
34368 /* "mbd/CouplingFSI.pxd":223
34369  * np.ndarray ang_velocity_last
34370  * np.ndarray ang_velocity
34371  * double ang_vel_norm # <<<<<<<<<<<<<<
34372  * double ang_vel_norm_last
34373  * np.ndarray barycenter0
34374  */
34375 
34376 /* Python wrapper */
34377 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_1__get__(PyObject *__pyx_v_self); /*proto*/
34378 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_1__get__(PyObject *__pyx_v_self) {
34379  PyObject *__pyx_r = 0;
34380  __Pyx_RefNannyDeclarations
34381  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34382  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34383 
34384  /* function exit code */
34385  __Pyx_RefNannyFinishContext();
34386  return __pyx_r;
34387 }
34388 
34389 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34390  PyObject *__pyx_r = NULL;
34391  __Pyx_TraceDeclarations
34392  __Pyx_RefNannyDeclarations
34393  PyObject *__pyx_t_1 = NULL;
34394  int __pyx_lineno = 0;
34395  const char *__pyx_filename = NULL;
34396  int __pyx_clineno = 0;
34397  __Pyx_RefNannySetupContext("__get__", 0);
34398  __Pyx_TraceCall("__get__", __pyx_f[2], 223, 0, __PYX_ERR(2, 223, __pyx_L1_error));
34399  __Pyx_XDECREF(__pyx_r);
34400  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ang_vel_norm); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 223, __pyx_L1_error)
34401  __Pyx_GOTREF(__pyx_t_1);
34402  __pyx_r = __pyx_t_1;
34403  __pyx_t_1 = 0;
34404  goto __pyx_L0;
34405 
34406  /* function exit code */
34407  __pyx_L1_error:;
34408  __Pyx_XDECREF(__pyx_t_1);
34409  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_vel_norm.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34410  __pyx_r = NULL;
34411  __pyx_L0:;
34412  __Pyx_XGIVEREF(__pyx_r);
34413  __Pyx_TraceReturn(__pyx_r, 0);
34414  __Pyx_RefNannyFinishContext();
34415  return __pyx_r;
34416 }
34417 
34418 /* Python wrapper */
34419 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34420 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34421  int __pyx_r;
34422  __Pyx_RefNannyDeclarations
34423  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34424  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34425 
34426  /* function exit code */
34427  __Pyx_RefNannyFinishContext();
34428  return __pyx_r;
34429 }
34430 
34431 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34432  int __pyx_r;
34433  __Pyx_TraceDeclarations
34434  __Pyx_RefNannyDeclarations
34435  double __pyx_t_1;
34436  int __pyx_lineno = 0;
34437  const char *__pyx_filename = NULL;
34438  int __pyx_clineno = 0;
34439  __Pyx_RefNannySetupContext("__set__", 0);
34440  __Pyx_TraceCall("__set__", __pyx_f[2], 223, 0, __PYX_ERR(2, 223, __pyx_L1_error));
34441  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 223, __pyx_L1_error)
34442  __pyx_v_self->ang_vel_norm = __pyx_t_1;
34443 
34444  /* function exit code */
34445  __pyx_r = 0;
34446  goto __pyx_L0;
34447  __pyx_L1_error:;
34448  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_vel_norm.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34449  __pyx_r = -1;
34450  __pyx_L0:;
34451  __Pyx_TraceReturn(Py_None, 0);
34452  __Pyx_RefNannyFinishContext();
34453  return __pyx_r;
34454 }
34455 
34456 /* "mbd/CouplingFSI.pxd":224
34457  * np.ndarray ang_velocity
34458  * double ang_vel_norm
34459  * double ang_vel_norm_last # <<<<<<<<<<<<<<
34460  * np.ndarray barycenter0
34461  * np.ndarray rotation_init
34462  */
34463 
34464 /* Python wrapper */
34465 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_1__get__(PyObject *__pyx_v_self); /*proto*/
34466 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_1__get__(PyObject *__pyx_v_self) {
34467  PyObject *__pyx_r = 0;
34468  __Pyx_RefNannyDeclarations
34469  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34470  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34471 
34472  /* function exit code */
34473  __Pyx_RefNannyFinishContext();
34474  return __pyx_r;
34475 }
34476 
34477 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34478  PyObject *__pyx_r = NULL;
34479  __Pyx_TraceDeclarations
34480  __Pyx_RefNannyDeclarations
34481  PyObject *__pyx_t_1 = NULL;
34482  int __pyx_lineno = 0;
34483  const char *__pyx_filename = NULL;
34484  int __pyx_clineno = 0;
34485  __Pyx_RefNannySetupContext("__get__", 0);
34486  __Pyx_TraceCall("__get__", __pyx_f[2], 224, 0, __PYX_ERR(2, 224, __pyx_L1_error));
34487  __Pyx_XDECREF(__pyx_r);
34488  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->ang_vel_norm_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 224, __pyx_L1_error)
34489  __Pyx_GOTREF(__pyx_t_1);
34490  __pyx_r = __pyx_t_1;
34491  __pyx_t_1 = 0;
34492  goto __pyx_L0;
34493 
34494  /* function exit code */
34495  __pyx_L1_error:;
34496  __Pyx_XDECREF(__pyx_t_1);
34497  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_vel_norm_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34498  __pyx_r = NULL;
34499  __pyx_L0:;
34500  __Pyx_XGIVEREF(__pyx_r);
34501  __Pyx_TraceReturn(__pyx_r, 0);
34502  __Pyx_RefNannyFinishContext();
34503  return __pyx_r;
34504 }
34505 
34506 /* Python wrapper */
34507 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34508 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34509  int __pyx_r;
34510  __Pyx_RefNannyDeclarations
34511  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34512  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34513 
34514  /* function exit code */
34515  __Pyx_RefNannyFinishContext();
34516  return __pyx_r;
34517 }
34518 
34519 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34520  int __pyx_r;
34521  __Pyx_TraceDeclarations
34522  __Pyx_RefNannyDeclarations
34523  double __pyx_t_1;
34524  int __pyx_lineno = 0;
34525  const char *__pyx_filename = NULL;
34526  int __pyx_clineno = 0;
34527  __Pyx_RefNannySetupContext("__set__", 0);
34528  __Pyx_TraceCall("__set__", __pyx_f[2], 224, 0, __PYX_ERR(2, 224, __pyx_L1_error));
34529  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 224, __pyx_L1_error)
34530  __pyx_v_self->ang_vel_norm_last = __pyx_t_1;
34531 
34532  /* function exit code */
34533  __pyx_r = 0;
34534  goto __pyx_L0;
34535  __pyx_L1_error:;
34536  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.ang_vel_norm_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34537  __pyx_r = -1;
34538  __pyx_L0:;
34539  __Pyx_TraceReturn(Py_None, 0);
34540  __Pyx_RefNannyFinishContext();
34541  return __pyx_r;
34542 }
34543 
34544 /* "mbd/CouplingFSI.pxd":225
34545  * double ang_vel_norm
34546  * double ang_vel_norm_last
34547  * np.ndarray barycenter0 # <<<<<<<<<<<<<<
34548  * np.ndarray rotation_init
34549  * np.ndarray rotm
34550  */
34551 
34552 /* Python wrapper */
34553 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_1__get__(PyObject *__pyx_v_self); /*proto*/
34554 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_1__get__(PyObject *__pyx_v_self) {
34555  PyObject *__pyx_r = 0;
34556  __Pyx_RefNannyDeclarations
34557  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34558  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34559 
34560  /* function exit code */
34561  __Pyx_RefNannyFinishContext();
34562  return __pyx_r;
34563 }
34564 
34565 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34566  PyObject *__pyx_r = NULL;
34567  __Pyx_TraceDeclarations
34568  __Pyx_RefNannyDeclarations
34569  int __pyx_lineno = 0;
34570  const char *__pyx_filename = NULL;
34571  int __pyx_clineno = 0;
34572  __Pyx_RefNannySetupContext("__get__", 0);
34573  __Pyx_TraceCall("__get__", __pyx_f[2], 225, 0, __PYX_ERR(2, 225, __pyx_L1_error));
34574  __Pyx_XDECREF(__pyx_r);
34575  __Pyx_INCREF(((PyObject *)__pyx_v_self->barycenter0));
34576  __pyx_r = ((PyObject *)__pyx_v_self->barycenter0);
34577  goto __pyx_L0;
34578 
34579  /* function exit code */
34580  __pyx_L1_error:;
34581  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.barycenter0.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34582  __pyx_r = NULL;
34583  __pyx_L0:;
34584  __Pyx_XGIVEREF(__pyx_r);
34585  __Pyx_TraceReturn(__pyx_r, 0);
34586  __Pyx_RefNannyFinishContext();
34587  return __pyx_r;
34588 }
34589 
34590 /* Python wrapper */
34591 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34592 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34593  int __pyx_r;
34594  __Pyx_RefNannyDeclarations
34595  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34596  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34597 
34598  /* function exit code */
34599  __Pyx_RefNannyFinishContext();
34600  return __pyx_r;
34601 }
34602 
34603 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34604  int __pyx_r;
34605  __Pyx_TraceDeclarations
34606  __Pyx_RefNannyDeclarations
34607  PyObject *__pyx_t_1 = NULL;
34608  int __pyx_lineno = 0;
34609  const char *__pyx_filename = NULL;
34610  int __pyx_clineno = 0;
34611  __Pyx_RefNannySetupContext("__set__", 0);
34612  __Pyx_TraceCall("__set__", __pyx_f[2], 225, 0, __PYX_ERR(2, 225, __pyx_L1_error));
34613  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 225, __pyx_L1_error)
34614  __pyx_t_1 = __pyx_v_value;
34615  __Pyx_INCREF(__pyx_t_1);
34616  __Pyx_GIVEREF(__pyx_t_1);
34617  __Pyx_GOTREF(__pyx_v_self->barycenter0);
34618  __Pyx_DECREF(((PyObject *)__pyx_v_self->barycenter0));
34619  __pyx_v_self->barycenter0 = ((PyArrayObject *)__pyx_t_1);
34620  __pyx_t_1 = 0;
34621 
34622  /* function exit code */
34623  __pyx_r = 0;
34624  goto __pyx_L0;
34625  __pyx_L1_error:;
34626  __Pyx_XDECREF(__pyx_t_1);
34627  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.barycenter0.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34628  __pyx_r = -1;
34629  __pyx_L0:;
34630  __Pyx_TraceReturn(Py_None, 0);
34631  __Pyx_RefNannyFinishContext();
34632  return __pyx_r;
34633 }
34634 
34635 /* Python wrapper */
34636 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_5__del__(PyObject *__pyx_v_self); /*proto*/
34637 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_5__del__(PyObject *__pyx_v_self) {
34638  int __pyx_r;
34639  __Pyx_RefNannyDeclarations
34640  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
34641  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34642 
34643  /* function exit code */
34644  __Pyx_RefNannyFinishContext();
34645  return __pyx_r;
34646 }
34647 
34648 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34649  int __pyx_r;
34650  __Pyx_TraceDeclarations
34651  __Pyx_RefNannyDeclarations
34652  int __pyx_lineno = 0;
34653  const char *__pyx_filename = NULL;
34654  int __pyx_clineno = 0;
34655  __Pyx_RefNannySetupContext("__del__", 0);
34656  __Pyx_TraceCall("__del__", __pyx_f[2], 225, 0, __PYX_ERR(2, 225, __pyx_L1_error));
34657  __Pyx_INCREF(Py_None);
34658  __Pyx_GIVEREF(Py_None);
34659  __Pyx_GOTREF(__pyx_v_self->barycenter0);
34660  __Pyx_DECREF(((PyObject *)__pyx_v_self->barycenter0));
34661  __pyx_v_self->barycenter0 = ((PyArrayObject *)Py_None);
34662 
34663  /* function exit code */
34664  __pyx_r = 0;
34665  goto __pyx_L0;
34666  __pyx_L1_error:;
34667  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.barycenter0.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34668  __pyx_r = -1;
34669  __pyx_L0:;
34670  __Pyx_TraceReturn(Py_None, 0);
34671  __Pyx_RefNannyFinishContext();
34672  return __pyx_r;
34673 }
34674 
34675 /* "mbd/CouplingFSI.pxd":226
34676  * double ang_vel_norm_last
34677  * np.ndarray barycenter0
34678  * np.ndarray rotation_init # <<<<<<<<<<<<<<
34679  * np.ndarray rotm
34680  * np.ndarray rotm_last
34681  */
34682 
34683 /* Python wrapper */
34684 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_1__get__(PyObject *__pyx_v_self); /*proto*/
34685 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_1__get__(PyObject *__pyx_v_self) {
34686  PyObject *__pyx_r = 0;
34687  __Pyx_RefNannyDeclarations
34688  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34689  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34690 
34691  /* function exit code */
34692  __Pyx_RefNannyFinishContext();
34693  return __pyx_r;
34694 }
34695 
34696 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34697  PyObject *__pyx_r = NULL;
34698  __Pyx_TraceDeclarations
34699  __Pyx_RefNannyDeclarations
34700  int __pyx_lineno = 0;
34701  const char *__pyx_filename = NULL;
34702  int __pyx_clineno = 0;
34703  __Pyx_RefNannySetupContext("__get__", 0);
34704  __Pyx_TraceCall("__get__", __pyx_f[2], 226, 0, __PYX_ERR(2, 226, __pyx_L1_error));
34705  __Pyx_XDECREF(__pyx_r);
34706  __Pyx_INCREF(((PyObject *)__pyx_v_self->rotation_init));
34707  __pyx_r = ((PyObject *)__pyx_v_self->rotation_init);
34708  goto __pyx_L0;
34709 
34710  /* function exit code */
34711  __pyx_L1_error:;
34712  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotation_init.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34713  __pyx_r = NULL;
34714  __pyx_L0:;
34715  __Pyx_XGIVEREF(__pyx_r);
34716  __Pyx_TraceReturn(__pyx_r, 0);
34717  __Pyx_RefNannyFinishContext();
34718  return __pyx_r;
34719 }
34720 
34721 /* Python wrapper */
34722 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34723 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34724  int __pyx_r;
34725  __Pyx_RefNannyDeclarations
34726  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34727  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34728 
34729  /* function exit code */
34730  __Pyx_RefNannyFinishContext();
34731  return __pyx_r;
34732 }
34733 
34734 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34735  int __pyx_r;
34736  __Pyx_TraceDeclarations
34737  __Pyx_RefNannyDeclarations
34738  PyObject *__pyx_t_1 = NULL;
34739  int __pyx_lineno = 0;
34740  const char *__pyx_filename = NULL;
34741  int __pyx_clineno = 0;
34742  __Pyx_RefNannySetupContext("__set__", 0);
34743  __Pyx_TraceCall("__set__", __pyx_f[2], 226, 0, __PYX_ERR(2, 226, __pyx_L1_error));
34744  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 226, __pyx_L1_error)
34745  __pyx_t_1 = __pyx_v_value;
34746  __Pyx_INCREF(__pyx_t_1);
34747  __Pyx_GIVEREF(__pyx_t_1);
34748  __Pyx_GOTREF(__pyx_v_self->rotation_init);
34749  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotation_init));
34750  __pyx_v_self->rotation_init = ((PyArrayObject *)__pyx_t_1);
34751  __pyx_t_1 = 0;
34752 
34753  /* function exit code */
34754  __pyx_r = 0;
34755  goto __pyx_L0;
34756  __pyx_L1_error:;
34757  __Pyx_XDECREF(__pyx_t_1);
34758  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotation_init.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34759  __pyx_r = -1;
34760  __pyx_L0:;
34761  __Pyx_TraceReturn(Py_None, 0);
34762  __Pyx_RefNannyFinishContext();
34763  return __pyx_r;
34764 }
34765 
34766 /* Python wrapper */
34767 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_5__del__(PyObject *__pyx_v_self); /*proto*/
34768 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_5__del__(PyObject *__pyx_v_self) {
34769  int __pyx_r;
34770  __Pyx_RefNannyDeclarations
34771  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
34772  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34773 
34774  /* function exit code */
34775  __Pyx_RefNannyFinishContext();
34776  return __pyx_r;
34777 }
34778 
34779 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34780  int __pyx_r;
34781  __Pyx_TraceDeclarations
34782  __Pyx_RefNannyDeclarations
34783  int __pyx_lineno = 0;
34784  const char *__pyx_filename = NULL;
34785  int __pyx_clineno = 0;
34786  __Pyx_RefNannySetupContext("__del__", 0);
34787  __Pyx_TraceCall("__del__", __pyx_f[2], 226, 0, __PYX_ERR(2, 226, __pyx_L1_error));
34788  __Pyx_INCREF(Py_None);
34789  __Pyx_GIVEREF(Py_None);
34790  __Pyx_GOTREF(__pyx_v_self->rotation_init);
34791  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotation_init));
34792  __pyx_v_self->rotation_init = ((PyArrayObject *)Py_None);
34793 
34794  /* function exit code */
34795  __pyx_r = 0;
34796  goto __pyx_L0;
34797  __pyx_L1_error:;
34798  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotation_init.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34799  __pyx_r = -1;
34800  __pyx_L0:;
34801  __Pyx_TraceReturn(Py_None, 0);
34802  __Pyx_RefNannyFinishContext();
34803  return __pyx_r;
34804 }
34805 
34806 /* "mbd/CouplingFSI.pxd":227
34807  * np.ndarray barycenter0
34808  * np.ndarray rotation_init
34809  * np.ndarray rotm # <<<<<<<<<<<<<<
34810  * np.ndarray rotm_last
34811  * np.ndarray rotq
34812  */
34813 
34814 /* Python wrapper */
34815 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_1__get__(PyObject *__pyx_v_self); /*proto*/
34816 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_1__get__(PyObject *__pyx_v_self) {
34817  PyObject *__pyx_r = 0;
34818  __Pyx_RefNannyDeclarations
34819  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34820  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34821 
34822  /* function exit code */
34823  __Pyx_RefNannyFinishContext();
34824  return __pyx_r;
34825 }
34826 
34827 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34828  PyObject *__pyx_r = NULL;
34829  __Pyx_TraceDeclarations
34830  __Pyx_RefNannyDeclarations
34831  int __pyx_lineno = 0;
34832  const char *__pyx_filename = NULL;
34833  int __pyx_clineno = 0;
34834  __Pyx_RefNannySetupContext("__get__", 0);
34835  __Pyx_TraceCall("__get__", __pyx_f[2], 227, 0, __PYX_ERR(2, 227, __pyx_L1_error));
34836  __Pyx_XDECREF(__pyx_r);
34837  __Pyx_INCREF(((PyObject *)__pyx_v_self->rotm));
34838  __pyx_r = ((PyObject *)__pyx_v_self->rotm);
34839  goto __pyx_L0;
34840 
34841  /* function exit code */
34842  __pyx_L1_error:;
34843  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotm.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34844  __pyx_r = NULL;
34845  __pyx_L0:;
34846  __Pyx_XGIVEREF(__pyx_r);
34847  __Pyx_TraceReturn(__pyx_r, 0);
34848  __Pyx_RefNannyFinishContext();
34849  return __pyx_r;
34850 }
34851 
34852 /* Python wrapper */
34853 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34854 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34855  int __pyx_r;
34856  __Pyx_RefNannyDeclarations
34857  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34858  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34859 
34860  /* function exit code */
34861  __Pyx_RefNannyFinishContext();
34862  return __pyx_r;
34863 }
34864 
34865 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34866  int __pyx_r;
34867  __Pyx_TraceDeclarations
34868  __Pyx_RefNannyDeclarations
34869  PyObject *__pyx_t_1 = NULL;
34870  int __pyx_lineno = 0;
34871  const char *__pyx_filename = NULL;
34872  int __pyx_clineno = 0;
34873  __Pyx_RefNannySetupContext("__set__", 0);
34874  __Pyx_TraceCall("__set__", __pyx_f[2], 227, 0, __PYX_ERR(2, 227, __pyx_L1_error));
34875  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 227, __pyx_L1_error)
34876  __pyx_t_1 = __pyx_v_value;
34877  __Pyx_INCREF(__pyx_t_1);
34878  __Pyx_GIVEREF(__pyx_t_1);
34879  __Pyx_GOTREF(__pyx_v_self->rotm);
34880  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotm));
34881  __pyx_v_self->rotm = ((PyArrayObject *)__pyx_t_1);
34882  __pyx_t_1 = 0;
34883 
34884  /* function exit code */
34885  __pyx_r = 0;
34886  goto __pyx_L0;
34887  __pyx_L1_error:;
34888  __Pyx_XDECREF(__pyx_t_1);
34889  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotm.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34890  __pyx_r = -1;
34891  __pyx_L0:;
34892  __Pyx_TraceReturn(Py_None, 0);
34893  __Pyx_RefNannyFinishContext();
34894  return __pyx_r;
34895 }
34896 
34897 /* Python wrapper */
34898 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_5__del__(PyObject *__pyx_v_self); /*proto*/
34899 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_5__del__(PyObject *__pyx_v_self) {
34900  int __pyx_r;
34901  __Pyx_RefNannyDeclarations
34902  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
34903  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34904 
34905  /* function exit code */
34906  __Pyx_RefNannyFinishContext();
34907  return __pyx_r;
34908 }
34909 
34910 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotm_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34911  int __pyx_r;
34912  __Pyx_TraceDeclarations
34913  __Pyx_RefNannyDeclarations
34914  int __pyx_lineno = 0;
34915  const char *__pyx_filename = NULL;
34916  int __pyx_clineno = 0;
34917  __Pyx_RefNannySetupContext("__del__", 0);
34918  __Pyx_TraceCall("__del__", __pyx_f[2], 227, 0, __PYX_ERR(2, 227, __pyx_L1_error));
34919  __Pyx_INCREF(Py_None);
34920  __Pyx_GIVEREF(Py_None);
34921  __Pyx_GOTREF(__pyx_v_self->rotm);
34922  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotm));
34923  __pyx_v_self->rotm = ((PyArrayObject *)Py_None);
34924 
34925  /* function exit code */
34926  __pyx_r = 0;
34927  goto __pyx_L0;
34928  __pyx_L1_error:;
34929  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotm.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34930  __pyx_r = -1;
34931  __pyx_L0:;
34932  __Pyx_TraceReturn(Py_None, 0);
34933  __Pyx_RefNannyFinishContext();
34934  return __pyx_r;
34935 }
34936 
34937 /* "mbd/CouplingFSI.pxd":228
34938  * np.ndarray rotation_init
34939  * np.ndarray rotm
34940  * np.ndarray rotm_last # <<<<<<<<<<<<<<
34941  * np.ndarray rotq
34942  * np.ndarray rotq_last
34943  */
34944 
34945 /* Python wrapper */
34946 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_1__get__(PyObject *__pyx_v_self); /*proto*/
34947 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_1__get__(PyObject *__pyx_v_self) {
34948  PyObject *__pyx_r = 0;
34949  __Pyx_RefNannyDeclarations
34950  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
34951  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
34952 
34953  /* function exit code */
34954  __Pyx_RefNannyFinishContext();
34955  return __pyx_r;
34956 }
34957 
34958 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
34959  PyObject *__pyx_r = NULL;
34960  __Pyx_TraceDeclarations
34961  __Pyx_RefNannyDeclarations
34962  int __pyx_lineno = 0;
34963  const char *__pyx_filename = NULL;
34964  int __pyx_clineno = 0;
34965  __Pyx_RefNannySetupContext("__get__", 0);
34966  __Pyx_TraceCall("__get__", __pyx_f[2], 228, 0, __PYX_ERR(2, 228, __pyx_L1_error));
34967  __Pyx_XDECREF(__pyx_r);
34968  __Pyx_INCREF(((PyObject *)__pyx_v_self->rotm_last));
34969  __pyx_r = ((PyObject *)__pyx_v_self->rotm_last);
34970  goto __pyx_L0;
34971 
34972  /* function exit code */
34973  __pyx_L1_error:;
34974  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotm_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
34975  __pyx_r = NULL;
34976  __pyx_L0:;
34977  __Pyx_XGIVEREF(__pyx_r);
34978  __Pyx_TraceReturn(__pyx_r, 0);
34979  __Pyx_RefNannyFinishContext();
34980  return __pyx_r;
34981 }
34982 
34983 /* Python wrapper */
34984 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
34985 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
34986  int __pyx_r;
34987  __Pyx_RefNannyDeclarations
34988  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
34989  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
34990 
34991  /* function exit code */
34992  __Pyx_RefNannyFinishContext();
34993  return __pyx_r;
34994 }
34995 
34996 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
34997  int __pyx_r;
34998  __Pyx_TraceDeclarations
34999  __Pyx_RefNannyDeclarations
35000  PyObject *__pyx_t_1 = NULL;
35001  int __pyx_lineno = 0;
35002  const char *__pyx_filename = NULL;
35003  int __pyx_clineno = 0;
35004  __Pyx_RefNannySetupContext("__set__", 0);
35005  __Pyx_TraceCall("__set__", __pyx_f[2], 228, 0, __PYX_ERR(2, 228, __pyx_L1_error));
35006  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 228, __pyx_L1_error)
35007  __pyx_t_1 = __pyx_v_value;
35008  __Pyx_INCREF(__pyx_t_1);
35009  __Pyx_GIVEREF(__pyx_t_1);
35010  __Pyx_GOTREF(__pyx_v_self->rotm_last);
35011  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotm_last));
35012  __pyx_v_self->rotm_last = ((PyArrayObject *)__pyx_t_1);
35013  __pyx_t_1 = 0;
35014 
35015  /* function exit code */
35016  __pyx_r = 0;
35017  goto __pyx_L0;
35018  __pyx_L1_error:;
35019  __Pyx_XDECREF(__pyx_t_1);
35020  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotm_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35021  __pyx_r = -1;
35022  __pyx_L0:;
35023  __Pyx_TraceReturn(Py_None, 0);
35024  __Pyx_RefNannyFinishContext();
35025  return __pyx_r;
35026 }
35027 
35028 /* Python wrapper */
35029 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_5__del__(PyObject *__pyx_v_self); /*proto*/
35030 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_5__del__(PyObject *__pyx_v_self) {
35031  int __pyx_r;
35032  __Pyx_RefNannyDeclarations
35033  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
35034  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35035 
35036  /* function exit code */
35037  __Pyx_RefNannyFinishContext();
35038  return __pyx_r;
35039 }
35040 
35041 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35042  int __pyx_r;
35043  __Pyx_TraceDeclarations
35044  __Pyx_RefNannyDeclarations
35045  int __pyx_lineno = 0;
35046  const char *__pyx_filename = NULL;
35047  int __pyx_clineno = 0;
35048  __Pyx_RefNannySetupContext("__del__", 0);
35049  __Pyx_TraceCall("__del__", __pyx_f[2], 228, 0, __PYX_ERR(2, 228, __pyx_L1_error));
35050  __Pyx_INCREF(Py_None);
35051  __Pyx_GIVEREF(Py_None);
35052  __Pyx_GOTREF(__pyx_v_self->rotm_last);
35053  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotm_last));
35054  __pyx_v_self->rotm_last = ((PyArrayObject *)Py_None);
35055 
35056  /* function exit code */
35057  __pyx_r = 0;
35058  goto __pyx_L0;
35059  __pyx_L1_error:;
35060  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotm_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35061  __pyx_r = -1;
35062  __pyx_L0:;
35063  __Pyx_TraceReturn(Py_None, 0);
35064  __Pyx_RefNannyFinishContext();
35065  return __pyx_r;
35066 }
35067 
35068 /* "mbd/CouplingFSI.pxd":229
35069  * np.ndarray rotm
35070  * np.ndarray rotm_last
35071  * np.ndarray rotq # <<<<<<<<<<<<<<
35072  * np.ndarray rotq_last
35073  * np.ndarray adams_vel
35074  */
35075 
35076 /* Python wrapper */
35077 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_1__get__(PyObject *__pyx_v_self); /*proto*/
35078 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_1__get__(PyObject *__pyx_v_self) {
35079  PyObject *__pyx_r = 0;
35080  __Pyx_RefNannyDeclarations
35081  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35082  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35083 
35084  /* function exit code */
35085  __Pyx_RefNannyFinishContext();
35086  return __pyx_r;
35087 }
35088 
35089 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35090  PyObject *__pyx_r = NULL;
35091  __Pyx_TraceDeclarations
35092  __Pyx_RefNannyDeclarations
35093  int __pyx_lineno = 0;
35094  const char *__pyx_filename = NULL;
35095  int __pyx_clineno = 0;
35096  __Pyx_RefNannySetupContext("__get__", 0);
35097  __Pyx_TraceCall("__get__", __pyx_f[2], 229, 0, __PYX_ERR(2, 229, __pyx_L1_error));
35098  __Pyx_XDECREF(__pyx_r);
35099  __Pyx_INCREF(((PyObject *)__pyx_v_self->rotq));
35100  __pyx_r = ((PyObject *)__pyx_v_self->rotq);
35101  goto __pyx_L0;
35102 
35103  /* function exit code */
35104  __pyx_L1_error:;
35105  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotq.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35106  __pyx_r = NULL;
35107  __pyx_L0:;
35108  __Pyx_XGIVEREF(__pyx_r);
35109  __Pyx_TraceReturn(__pyx_r, 0);
35110  __Pyx_RefNannyFinishContext();
35111  return __pyx_r;
35112 }
35113 
35114 /* Python wrapper */
35115 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35116 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35117  int __pyx_r;
35118  __Pyx_RefNannyDeclarations
35119  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35120  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35121 
35122  /* function exit code */
35123  __Pyx_RefNannyFinishContext();
35124  return __pyx_r;
35125 }
35126 
35127 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35128  int __pyx_r;
35129  __Pyx_TraceDeclarations
35130  __Pyx_RefNannyDeclarations
35131  PyObject *__pyx_t_1 = NULL;
35132  int __pyx_lineno = 0;
35133  const char *__pyx_filename = NULL;
35134  int __pyx_clineno = 0;
35135  __Pyx_RefNannySetupContext("__set__", 0);
35136  __Pyx_TraceCall("__set__", __pyx_f[2], 229, 0, __PYX_ERR(2, 229, __pyx_L1_error));
35137  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 229, __pyx_L1_error)
35138  __pyx_t_1 = __pyx_v_value;
35139  __Pyx_INCREF(__pyx_t_1);
35140  __Pyx_GIVEREF(__pyx_t_1);
35141  __Pyx_GOTREF(__pyx_v_self->rotq);
35142  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotq));
35143  __pyx_v_self->rotq = ((PyArrayObject *)__pyx_t_1);
35144  __pyx_t_1 = 0;
35145 
35146  /* function exit code */
35147  __pyx_r = 0;
35148  goto __pyx_L0;
35149  __pyx_L1_error:;
35150  __Pyx_XDECREF(__pyx_t_1);
35151  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotq.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35152  __pyx_r = -1;
35153  __pyx_L0:;
35154  __Pyx_TraceReturn(Py_None, 0);
35155  __Pyx_RefNannyFinishContext();
35156  return __pyx_r;
35157 }
35158 
35159 /* Python wrapper */
35160 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_5__del__(PyObject *__pyx_v_self); /*proto*/
35161 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_5__del__(PyObject *__pyx_v_self) {
35162  int __pyx_r;
35163  __Pyx_RefNannyDeclarations
35164  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
35165  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35166 
35167  /* function exit code */
35168  __Pyx_RefNannyFinishContext();
35169  return __pyx_r;
35170 }
35171 
35172 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4rotq_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35173  int __pyx_r;
35174  __Pyx_TraceDeclarations
35175  __Pyx_RefNannyDeclarations
35176  int __pyx_lineno = 0;
35177  const char *__pyx_filename = NULL;
35178  int __pyx_clineno = 0;
35179  __Pyx_RefNannySetupContext("__del__", 0);
35180  __Pyx_TraceCall("__del__", __pyx_f[2], 229, 0, __PYX_ERR(2, 229, __pyx_L1_error));
35181  __Pyx_INCREF(Py_None);
35182  __Pyx_GIVEREF(Py_None);
35183  __Pyx_GOTREF(__pyx_v_self->rotq);
35184  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotq));
35185  __pyx_v_self->rotq = ((PyArrayObject *)Py_None);
35186 
35187  /* function exit code */
35188  __pyx_r = 0;
35189  goto __pyx_L0;
35190  __pyx_L1_error:;
35191  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotq.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35192  __pyx_r = -1;
35193  __pyx_L0:;
35194  __Pyx_TraceReturn(Py_None, 0);
35195  __Pyx_RefNannyFinishContext();
35196  return __pyx_r;
35197 }
35198 
35199 /* "mbd/CouplingFSI.pxd":230
35200  * np.ndarray rotm_last
35201  * np.ndarray rotq
35202  * np.ndarray rotq_last # <<<<<<<<<<<<<<
35203  * np.ndarray adams_vel
35204  * string name
35205  */
35206 
35207 /* Python wrapper */
35208 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_1__get__(PyObject *__pyx_v_self); /*proto*/
35209 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_1__get__(PyObject *__pyx_v_self) {
35210  PyObject *__pyx_r = 0;
35211  __Pyx_RefNannyDeclarations
35212  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35213  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35214 
35215  /* function exit code */
35216  __Pyx_RefNannyFinishContext();
35217  return __pyx_r;
35218 }
35219 
35220 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35221  PyObject *__pyx_r = NULL;
35222  __Pyx_TraceDeclarations
35223  __Pyx_RefNannyDeclarations
35224  int __pyx_lineno = 0;
35225  const char *__pyx_filename = NULL;
35226  int __pyx_clineno = 0;
35227  __Pyx_RefNannySetupContext("__get__", 0);
35228  __Pyx_TraceCall("__get__", __pyx_f[2], 230, 0, __PYX_ERR(2, 230, __pyx_L1_error));
35229  __Pyx_XDECREF(__pyx_r);
35230  __Pyx_INCREF(((PyObject *)__pyx_v_self->rotq_last));
35231  __pyx_r = ((PyObject *)__pyx_v_self->rotq_last);
35232  goto __pyx_L0;
35233 
35234  /* function exit code */
35235  __pyx_L1_error:;
35236  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotq_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35237  __pyx_r = NULL;
35238  __pyx_L0:;
35239  __Pyx_XGIVEREF(__pyx_r);
35240  __Pyx_TraceReturn(__pyx_r, 0);
35241  __Pyx_RefNannyFinishContext();
35242  return __pyx_r;
35243 }
35244 
35245 /* Python wrapper */
35246 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35247 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35248  int __pyx_r;
35249  __Pyx_RefNannyDeclarations
35250  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35251  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35252 
35253  /* function exit code */
35254  __Pyx_RefNannyFinishContext();
35255  return __pyx_r;
35256 }
35257 
35258 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35259  int __pyx_r;
35260  __Pyx_TraceDeclarations
35261  __Pyx_RefNannyDeclarations
35262  PyObject *__pyx_t_1 = NULL;
35263  int __pyx_lineno = 0;
35264  const char *__pyx_filename = NULL;
35265  int __pyx_clineno = 0;
35266  __Pyx_RefNannySetupContext("__set__", 0);
35267  __Pyx_TraceCall("__set__", __pyx_f[2], 230, 0, __PYX_ERR(2, 230, __pyx_L1_error));
35268  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 230, __pyx_L1_error)
35269  __pyx_t_1 = __pyx_v_value;
35270  __Pyx_INCREF(__pyx_t_1);
35271  __Pyx_GIVEREF(__pyx_t_1);
35272  __Pyx_GOTREF(__pyx_v_self->rotq_last);
35273  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotq_last));
35274  __pyx_v_self->rotq_last = ((PyArrayObject *)__pyx_t_1);
35275  __pyx_t_1 = 0;
35276 
35277  /* function exit code */
35278  __pyx_r = 0;
35279  goto __pyx_L0;
35280  __pyx_L1_error:;
35281  __Pyx_XDECREF(__pyx_t_1);
35282  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotq_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35283  __pyx_r = -1;
35284  __pyx_L0:;
35285  __Pyx_TraceReturn(Py_None, 0);
35286  __Pyx_RefNannyFinishContext();
35287  return __pyx_r;
35288 }
35289 
35290 /* Python wrapper */
35291 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_5__del__(PyObject *__pyx_v_self); /*proto*/
35292 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_5__del__(PyObject *__pyx_v_self) {
35293  int __pyx_r;
35294  __Pyx_RefNannyDeclarations
35295  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
35296  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35297 
35298  /* function exit code */
35299  __Pyx_RefNannyFinishContext();
35300  return __pyx_r;
35301 }
35302 
35303 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35304  int __pyx_r;
35305  __Pyx_TraceDeclarations
35306  __Pyx_RefNannyDeclarations
35307  int __pyx_lineno = 0;
35308  const char *__pyx_filename = NULL;
35309  int __pyx_clineno = 0;
35310  __Pyx_RefNannySetupContext("__del__", 0);
35311  __Pyx_TraceCall("__del__", __pyx_f[2], 230, 0, __PYX_ERR(2, 230, __pyx_L1_error));
35312  __Pyx_INCREF(Py_None);
35313  __Pyx_GIVEREF(Py_None);
35314  __Pyx_GOTREF(__pyx_v_self->rotq_last);
35315  __Pyx_DECREF(((PyObject *)__pyx_v_self->rotq_last));
35316  __pyx_v_self->rotq_last = ((PyArrayObject *)Py_None);
35317 
35318  /* function exit code */
35319  __pyx_r = 0;
35320  goto __pyx_L0;
35321  __pyx_L1_error:;
35322  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.rotq_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35323  __pyx_r = -1;
35324  __pyx_L0:;
35325  __Pyx_TraceReturn(Py_None, 0);
35326  __Pyx_RefNannyFinishContext();
35327  return __pyx_r;
35328 }
35329 
35330 /* "mbd/CouplingFSI.pxd":231
35331  * np.ndarray rotq
35332  * np.ndarray rotq_last
35333  * np.ndarray adams_vel # <<<<<<<<<<<<<<
35334  * string name
35335  * bool predicted
35336  */
35337 
35338 /* Python wrapper */
35339 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_1__get__(PyObject *__pyx_v_self); /*proto*/
35340 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_1__get__(PyObject *__pyx_v_self) {
35341  PyObject *__pyx_r = 0;
35342  __Pyx_RefNannyDeclarations
35343  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35344  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35345 
35346  /* function exit code */
35347  __Pyx_RefNannyFinishContext();
35348  return __pyx_r;
35349 }
35350 
35351 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35352  PyObject *__pyx_r = NULL;
35353  __Pyx_TraceDeclarations
35354  __Pyx_RefNannyDeclarations
35355  int __pyx_lineno = 0;
35356  const char *__pyx_filename = NULL;
35357  int __pyx_clineno = 0;
35358  __Pyx_RefNannySetupContext("__get__", 0);
35359  __Pyx_TraceCall("__get__", __pyx_f[2], 231, 0, __PYX_ERR(2, 231, __pyx_L1_error));
35360  __Pyx_XDECREF(__pyx_r);
35361  __Pyx_INCREF(((PyObject *)__pyx_v_self->adams_vel));
35362  __pyx_r = ((PyObject *)__pyx_v_self->adams_vel);
35363  goto __pyx_L0;
35364 
35365  /* function exit code */
35366  __pyx_L1_error:;
35367  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.adams_vel.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35368  __pyx_r = NULL;
35369  __pyx_L0:;
35370  __Pyx_XGIVEREF(__pyx_r);
35371  __Pyx_TraceReturn(__pyx_r, 0);
35372  __Pyx_RefNannyFinishContext();
35373  return __pyx_r;
35374 }
35375 
35376 /* Python wrapper */
35377 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35378 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35379  int __pyx_r;
35380  __Pyx_RefNannyDeclarations
35381  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35382  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35383 
35384  /* function exit code */
35385  __Pyx_RefNannyFinishContext();
35386  return __pyx_r;
35387 }
35388 
35389 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35390  int __pyx_r;
35391  __Pyx_TraceDeclarations
35392  __Pyx_RefNannyDeclarations
35393  PyObject *__pyx_t_1 = NULL;
35394  int __pyx_lineno = 0;
35395  const char *__pyx_filename = NULL;
35396  int __pyx_clineno = 0;
35397  __Pyx_RefNannySetupContext("__set__", 0);
35398  __Pyx_TraceCall("__set__", __pyx_f[2], 231, 0, __PYX_ERR(2, 231, __pyx_L1_error));
35399  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 231, __pyx_L1_error)
35400  __pyx_t_1 = __pyx_v_value;
35401  __Pyx_INCREF(__pyx_t_1);
35402  __Pyx_GIVEREF(__pyx_t_1);
35403  __Pyx_GOTREF(__pyx_v_self->adams_vel);
35404  __Pyx_DECREF(((PyObject *)__pyx_v_self->adams_vel));
35405  __pyx_v_self->adams_vel = ((PyArrayObject *)__pyx_t_1);
35406  __pyx_t_1 = 0;
35407 
35408  /* function exit code */
35409  __pyx_r = 0;
35410  goto __pyx_L0;
35411  __pyx_L1_error:;
35412  __Pyx_XDECREF(__pyx_t_1);
35413  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.adams_vel.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35414  __pyx_r = -1;
35415  __pyx_L0:;
35416  __Pyx_TraceReturn(Py_None, 0);
35417  __Pyx_RefNannyFinishContext();
35418  return __pyx_r;
35419 }
35420 
35421 /* Python wrapper */
35422 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_5__del__(PyObject *__pyx_v_self); /*proto*/
35423 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_5__del__(PyObject *__pyx_v_self) {
35424  int __pyx_r;
35425  __Pyx_RefNannyDeclarations
35426  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
35427  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35428 
35429  /* function exit code */
35430  __Pyx_RefNannyFinishContext();
35431  return __pyx_r;
35432 }
35433 
35434 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35435  int __pyx_r;
35436  __Pyx_TraceDeclarations
35437  __Pyx_RefNannyDeclarations
35438  int __pyx_lineno = 0;
35439  const char *__pyx_filename = NULL;
35440  int __pyx_clineno = 0;
35441  __Pyx_RefNannySetupContext("__del__", 0);
35442  __Pyx_TraceCall("__del__", __pyx_f[2], 231, 0, __PYX_ERR(2, 231, __pyx_L1_error));
35443  __Pyx_INCREF(Py_None);
35444  __Pyx_GIVEREF(Py_None);
35445  __Pyx_GOTREF(__pyx_v_self->adams_vel);
35446  __Pyx_DECREF(((PyObject *)__pyx_v_self->adams_vel));
35447  __pyx_v_self->adams_vel = ((PyArrayObject *)Py_None);
35448 
35449  /* function exit code */
35450  __pyx_r = 0;
35451  goto __pyx_L0;
35452  __pyx_L1_error:;
35453  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.adams_vel.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35454  __pyx_r = -1;
35455  __pyx_L0:;
35456  __Pyx_TraceReturn(Py_None, 0);
35457  __Pyx_RefNannyFinishContext();
35458  return __pyx_r;
35459 }
35460 
35461 /* "mbd/CouplingFSI.pxd":232
35462  * np.ndarray rotq_last
35463  * np.ndarray adams_vel
35464  * string name # <<<<<<<<<<<<<<
35465  * bool predicted
35466  * double dt_predict
35467  */
35468 
35469 /* Python wrapper */
35470 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
35471 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4name_1__get__(PyObject *__pyx_v_self) {
35472  PyObject *__pyx_r = 0;
35473  __Pyx_RefNannyDeclarations
35474  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35475  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4name___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35476 
35477  /* function exit code */
35478  __Pyx_RefNannyFinishContext();
35479  return __pyx_r;
35480 }
35481 
35482 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4name___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35483  PyObject *__pyx_r = NULL;
35484  __Pyx_TraceDeclarations
35485  __Pyx_RefNannyDeclarations
35486  PyObject *__pyx_t_1 = NULL;
35487  int __pyx_lineno = 0;
35488  const char *__pyx_filename = NULL;
35489  int __pyx_clineno = 0;
35490  __Pyx_RefNannySetupContext("__get__", 0);
35491  __Pyx_TraceCall("__get__", __pyx_f[2], 232, 0, __PYX_ERR(2, 232, __pyx_L1_error));
35492  __Pyx_XDECREF(__pyx_r);
35493  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 232, __pyx_L1_error)
35494  __Pyx_GOTREF(__pyx_t_1);
35495  __pyx_r = __pyx_t_1;
35496  __pyx_t_1 = 0;
35497  goto __pyx_L0;
35498 
35499  /* function exit code */
35500  __pyx_L1_error:;
35501  __Pyx_XDECREF(__pyx_t_1);
35502  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35503  __pyx_r = NULL;
35504  __pyx_L0:;
35505  __Pyx_XGIVEREF(__pyx_r);
35506  __Pyx_TraceReturn(__pyx_r, 0);
35507  __Pyx_RefNannyFinishContext();
35508  return __pyx_r;
35509 }
35510 
35511 /* Python wrapper */
35512 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35513 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35514  int __pyx_r;
35515  __Pyx_RefNannyDeclarations
35516  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35517  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4name_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35518 
35519  /* function exit code */
35520  __Pyx_RefNannyFinishContext();
35521  return __pyx_r;
35522 }
35523 
35524 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_4name_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35525  int __pyx_r;
35526  __Pyx_TraceDeclarations
35527  __Pyx_RefNannyDeclarations
35528  std::string __pyx_t_1;
35529  int __pyx_lineno = 0;
35530  const char *__pyx_filename = NULL;
35531  int __pyx_clineno = 0;
35532  __Pyx_RefNannySetupContext("__set__", 0);
35533  __Pyx_TraceCall("__set__", __pyx_f[2], 232, 0, __PYX_ERR(2, 232, __pyx_L1_error));
35534  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 232, __pyx_L1_error)
35535  __pyx_v_self->name = __pyx_t_1;
35536 
35537  /* function exit code */
35538  __pyx_r = 0;
35539  goto __pyx_L0;
35540  __pyx_L1_error:;
35541  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35542  __pyx_r = -1;
35543  __pyx_L0:;
35544  __Pyx_TraceReturn(Py_None, 0);
35545  __Pyx_RefNannyFinishContext();
35546  return __pyx_r;
35547 }
35548 
35549 /* "mbd/CouplingFSI.pxd":233
35550  * np.ndarray adams_vel
35551  * string name
35552  * bool predicted # <<<<<<<<<<<<<<
35553  * double dt_predict
35554  * np.ndarray h_predict # predicted displacement
35555  */
35556 
35557 /* Python wrapper */
35558 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9predicted_1__get__(PyObject *__pyx_v_self); /*proto*/
35559 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9predicted_1__get__(PyObject *__pyx_v_self) {
35560  PyObject *__pyx_r = 0;
35561  __Pyx_RefNannyDeclarations
35562  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35563  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9predicted___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35564 
35565  /* function exit code */
35566  __Pyx_RefNannyFinishContext();
35567  return __pyx_r;
35568 }
35569 
35570 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9predicted___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35571  PyObject *__pyx_r = NULL;
35572  __Pyx_TraceDeclarations
35573  __Pyx_RefNannyDeclarations
35574  PyObject *__pyx_t_1 = NULL;
35575  int __pyx_lineno = 0;
35576  const char *__pyx_filename = NULL;
35577  int __pyx_clineno = 0;
35578  __Pyx_RefNannySetupContext("__get__", 0);
35579  __Pyx_TraceCall("__get__", __pyx_f[2], 233, 0, __PYX_ERR(2, 233, __pyx_L1_error));
35580  __Pyx_XDECREF(__pyx_r);
35581  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->predicted); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 233, __pyx_L1_error)
35582  __Pyx_GOTREF(__pyx_t_1);
35583  __pyx_r = __pyx_t_1;
35584  __pyx_t_1 = 0;
35585  goto __pyx_L0;
35586 
35587  /* function exit code */
35588  __pyx_L1_error:;
35589  __Pyx_XDECREF(__pyx_t_1);
35590  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.predicted.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35591  __pyx_r = NULL;
35592  __pyx_L0:;
35593  __Pyx_XGIVEREF(__pyx_r);
35594  __Pyx_TraceReturn(__pyx_r, 0);
35595  __Pyx_RefNannyFinishContext();
35596  return __pyx_r;
35597 }
35598 
35599 /* Python wrapper */
35600 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9predicted_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35601 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9predicted_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35602  int __pyx_r;
35603  __Pyx_RefNannyDeclarations
35604  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35605  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9predicted_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35606 
35607  /* function exit code */
35608  __Pyx_RefNannyFinishContext();
35609  return __pyx_r;
35610 }
35611 
35612 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9predicted_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35613  int __pyx_r;
35614  __Pyx_TraceDeclarations
35615  __Pyx_RefNannyDeclarations
35616  bool __pyx_t_1;
35617  int __pyx_lineno = 0;
35618  const char *__pyx_filename = NULL;
35619  int __pyx_clineno = 0;
35620  __Pyx_RefNannySetupContext("__set__", 0);
35621  __Pyx_TraceCall("__set__", __pyx_f[2], 233, 0, __PYX_ERR(2, 233, __pyx_L1_error));
35622  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 233, __pyx_L1_error)
35623  __pyx_v_self->predicted = __pyx_t_1;
35624 
35625  /* function exit code */
35626  __pyx_r = 0;
35627  goto __pyx_L0;
35628  __pyx_L1_error:;
35629  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.predicted.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35630  __pyx_r = -1;
35631  __pyx_L0:;
35632  __Pyx_TraceReturn(Py_None, 0);
35633  __Pyx_RefNannyFinishContext();
35634  return __pyx_r;
35635 }
35636 
35637 /* "mbd/CouplingFSI.pxd":234
35638  * string name
35639  * bool predicted
35640  * double dt_predict # <<<<<<<<<<<<<<
35641  * np.ndarray h_predict # predicted displacement
35642  * double h_ang_predict # predicted angular displacement (angle)
35643  */
35644 
35645 /* Python wrapper */
35646 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_1__get__(PyObject *__pyx_v_self); /*proto*/
35647 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_1__get__(PyObject *__pyx_v_self) {
35648  PyObject *__pyx_r = 0;
35649  __Pyx_RefNannyDeclarations
35650  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35651  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10dt_predict___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35652 
35653  /* function exit code */
35654  __Pyx_RefNannyFinishContext();
35655  return __pyx_r;
35656 }
35657 
35658 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10dt_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35659  PyObject *__pyx_r = NULL;
35660  __Pyx_TraceDeclarations
35661  __Pyx_RefNannyDeclarations
35662  PyObject *__pyx_t_1 = NULL;
35663  int __pyx_lineno = 0;
35664  const char *__pyx_filename = NULL;
35665  int __pyx_clineno = 0;
35666  __Pyx_RefNannySetupContext("__get__", 0);
35667  __Pyx_TraceCall("__get__", __pyx_f[2], 234, 0, __PYX_ERR(2, 234, __pyx_L1_error));
35668  __Pyx_XDECREF(__pyx_r);
35669  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dt_predict); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 234, __pyx_L1_error)
35670  __Pyx_GOTREF(__pyx_t_1);
35671  __pyx_r = __pyx_t_1;
35672  __pyx_t_1 = 0;
35673  goto __pyx_L0;
35674 
35675  /* function exit code */
35676  __pyx_L1_error:;
35677  __Pyx_XDECREF(__pyx_t_1);
35678  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.dt_predict.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35679  __pyx_r = NULL;
35680  __pyx_L0:;
35681  __Pyx_XGIVEREF(__pyx_r);
35682  __Pyx_TraceReturn(__pyx_r, 0);
35683  __Pyx_RefNannyFinishContext();
35684  return __pyx_r;
35685 }
35686 
35687 /* Python wrapper */
35688 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35689 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35690  int __pyx_r;
35691  __Pyx_RefNannyDeclarations
35692  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35693  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35694 
35695  /* function exit code */
35696  __Pyx_RefNannyFinishContext();
35697  return __pyx_r;
35698 }
35699 
35700 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35701  int __pyx_r;
35702  __Pyx_TraceDeclarations
35703  __Pyx_RefNannyDeclarations
35704  double __pyx_t_1;
35705  int __pyx_lineno = 0;
35706  const char *__pyx_filename = NULL;
35707  int __pyx_clineno = 0;
35708  __Pyx_RefNannySetupContext("__set__", 0);
35709  __Pyx_TraceCall("__set__", __pyx_f[2], 234, 0, __PYX_ERR(2, 234, __pyx_L1_error));
35710  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 234, __pyx_L1_error)
35711  __pyx_v_self->dt_predict = __pyx_t_1;
35712 
35713  /* function exit code */
35714  __pyx_r = 0;
35715  goto __pyx_L0;
35716  __pyx_L1_error:;
35717  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.dt_predict.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35718  __pyx_r = -1;
35719  __pyx_L0:;
35720  __Pyx_TraceReturn(Py_None, 0);
35721  __Pyx_RefNannyFinishContext();
35722  return __pyx_r;
35723 }
35724 
35725 /* "mbd/CouplingFSI.pxd":235
35726  * bool predicted
35727  * double dt_predict
35728  * np.ndarray h_predict # predicted displacement # <<<<<<<<<<<<<<
35729  * double h_ang_predict # predicted angular displacement (angle)
35730  * np.ndarray h_ang_vel_predict # predicted angular velocity
35731  */
35732 
35733 /* Python wrapper */
35734 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_1__get__(PyObject *__pyx_v_self); /*proto*/
35735 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_1__get__(PyObject *__pyx_v_self) {
35736  PyObject *__pyx_r = 0;
35737  __Pyx_RefNannyDeclarations
35738  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35739  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35740 
35741  /* function exit code */
35742  __Pyx_RefNannyFinishContext();
35743  return __pyx_r;
35744 }
35745 
35746 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35747  PyObject *__pyx_r = NULL;
35748  __Pyx_TraceDeclarations
35749  __Pyx_RefNannyDeclarations
35750  int __pyx_lineno = 0;
35751  const char *__pyx_filename = NULL;
35752  int __pyx_clineno = 0;
35753  __Pyx_RefNannySetupContext("__get__", 0);
35754  __Pyx_TraceCall("__get__", __pyx_f[2], 235, 0, __PYX_ERR(2, 235, __pyx_L1_error));
35755  __Pyx_XDECREF(__pyx_r);
35756  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_predict));
35757  __pyx_r = ((PyObject *)__pyx_v_self->h_predict);
35758  goto __pyx_L0;
35759 
35760  /* function exit code */
35761  __pyx_L1_error:;
35762  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_predict.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35763  __pyx_r = NULL;
35764  __pyx_L0:;
35765  __Pyx_XGIVEREF(__pyx_r);
35766  __Pyx_TraceReturn(__pyx_r, 0);
35767  __Pyx_RefNannyFinishContext();
35768  return __pyx_r;
35769 }
35770 
35771 /* Python wrapper */
35772 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35773 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35774  int __pyx_r;
35775  __Pyx_RefNannyDeclarations
35776  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35777  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35778 
35779  /* function exit code */
35780  __Pyx_RefNannyFinishContext();
35781  return __pyx_r;
35782 }
35783 
35784 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35785  int __pyx_r;
35786  __Pyx_TraceDeclarations
35787  __Pyx_RefNannyDeclarations
35788  PyObject *__pyx_t_1 = NULL;
35789  int __pyx_lineno = 0;
35790  const char *__pyx_filename = NULL;
35791  int __pyx_clineno = 0;
35792  __Pyx_RefNannySetupContext("__set__", 0);
35793  __Pyx_TraceCall("__set__", __pyx_f[2], 235, 0, __PYX_ERR(2, 235, __pyx_L1_error));
35794  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 235, __pyx_L1_error)
35795  __pyx_t_1 = __pyx_v_value;
35796  __Pyx_INCREF(__pyx_t_1);
35797  __Pyx_GIVEREF(__pyx_t_1);
35798  __Pyx_GOTREF(__pyx_v_self->h_predict);
35799  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_predict));
35800  __pyx_v_self->h_predict = ((PyArrayObject *)__pyx_t_1);
35801  __pyx_t_1 = 0;
35802 
35803  /* function exit code */
35804  __pyx_r = 0;
35805  goto __pyx_L0;
35806  __pyx_L1_error:;
35807  __Pyx_XDECREF(__pyx_t_1);
35808  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_predict.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35809  __pyx_r = -1;
35810  __pyx_L0:;
35811  __Pyx_TraceReturn(Py_None, 0);
35812  __Pyx_RefNannyFinishContext();
35813  return __pyx_r;
35814 }
35815 
35816 /* Python wrapper */
35817 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_5__del__(PyObject *__pyx_v_self); /*proto*/
35818 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_5__del__(PyObject *__pyx_v_self) {
35819  int __pyx_r;
35820  __Pyx_RefNannyDeclarations
35821  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
35822  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35823 
35824  /* function exit code */
35825  __Pyx_RefNannyFinishContext();
35826  return __pyx_r;
35827 }
35828 
35829 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9h_predict_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35830  int __pyx_r;
35831  __Pyx_TraceDeclarations
35832  __Pyx_RefNannyDeclarations
35833  int __pyx_lineno = 0;
35834  const char *__pyx_filename = NULL;
35835  int __pyx_clineno = 0;
35836  __Pyx_RefNannySetupContext("__del__", 0);
35837  __Pyx_TraceCall("__del__", __pyx_f[2], 235, 0, __PYX_ERR(2, 235, __pyx_L1_error));
35838  __Pyx_INCREF(Py_None);
35839  __Pyx_GIVEREF(Py_None);
35840  __Pyx_GOTREF(__pyx_v_self->h_predict);
35841  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_predict));
35842  __pyx_v_self->h_predict = ((PyArrayObject *)Py_None);
35843 
35844  /* function exit code */
35845  __pyx_r = 0;
35846  goto __pyx_L0;
35847  __pyx_L1_error:;
35848  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_predict.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35849  __pyx_r = -1;
35850  __pyx_L0:;
35851  __Pyx_TraceReturn(Py_None, 0);
35852  __Pyx_RefNannyFinishContext();
35853  return __pyx_r;
35854 }
35855 
35856 /* "mbd/CouplingFSI.pxd":236
35857  * double dt_predict
35858  * np.ndarray h_predict # predicted displacement
35859  * double h_ang_predict # predicted angular displacement (angle) # <<<<<<<<<<<<<<
35860  * np.ndarray h_ang_vel_predict # predicted angular velocity
35861  * np.ndarray h_predict_last # predicted displacement
35862  */
35863 
35864 /* Python wrapper */
35865 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_1__get__(PyObject *__pyx_v_self); /*proto*/
35866 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_1__get__(PyObject *__pyx_v_self) {
35867  PyObject *__pyx_r = 0;
35868  __Pyx_RefNannyDeclarations
35869  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35870  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35871 
35872  /* function exit code */
35873  __Pyx_RefNannyFinishContext();
35874  return __pyx_r;
35875 }
35876 
35877 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35878  PyObject *__pyx_r = NULL;
35879  __Pyx_TraceDeclarations
35880  __Pyx_RefNannyDeclarations
35881  PyObject *__pyx_t_1 = NULL;
35882  int __pyx_lineno = 0;
35883  const char *__pyx_filename = NULL;
35884  int __pyx_clineno = 0;
35885  __Pyx_RefNannySetupContext("__get__", 0);
35886  __Pyx_TraceCall("__get__", __pyx_f[2], 236, 0, __PYX_ERR(2, 236, __pyx_L1_error));
35887  __Pyx_XDECREF(__pyx_r);
35888  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->h_ang_predict); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 236, __pyx_L1_error)
35889  __Pyx_GOTREF(__pyx_t_1);
35890  __pyx_r = __pyx_t_1;
35891  __pyx_t_1 = 0;
35892  goto __pyx_L0;
35893 
35894  /* function exit code */
35895  __pyx_L1_error:;
35896  __Pyx_XDECREF(__pyx_t_1);
35897  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_predict.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35898  __pyx_r = NULL;
35899  __pyx_L0:;
35900  __Pyx_XGIVEREF(__pyx_r);
35901  __Pyx_TraceReturn(__pyx_r, 0);
35902  __Pyx_RefNannyFinishContext();
35903  return __pyx_r;
35904 }
35905 
35906 /* Python wrapper */
35907 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35908 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35909  int __pyx_r;
35910  __Pyx_RefNannyDeclarations
35911  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35912  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35913 
35914  /* function exit code */
35915  __Pyx_RefNannyFinishContext();
35916  return __pyx_r;
35917 }
35918 
35919 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
35920  int __pyx_r;
35921  __Pyx_TraceDeclarations
35922  __Pyx_RefNannyDeclarations
35923  double __pyx_t_1;
35924  int __pyx_lineno = 0;
35925  const char *__pyx_filename = NULL;
35926  int __pyx_clineno = 0;
35927  __Pyx_RefNannySetupContext("__set__", 0);
35928  __Pyx_TraceCall("__set__", __pyx_f[2], 236, 0, __PYX_ERR(2, 236, __pyx_L1_error));
35929  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 236, __pyx_L1_error)
35930  __pyx_v_self->h_ang_predict = __pyx_t_1;
35931 
35932  /* function exit code */
35933  __pyx_r = 0;
35934  goto __pyx_L0;
35935  __pyx_L1_error:;
35936  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_predict.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35937  __pyx_r = -1;
35938  __pyx_L0:;
35939  __Pyx_TraceReturn(Py_None, 0);
35940  __Pyx_RefNannyFinishContext();
35941  return __pyx_r;
35942 }
35943 
35944 /* "mbd/CouplingFSI.pxd":237
35945  * np.ndarray h_predict # predicted displacement
35946  * double h_ang_predict # predicted angular displacement (angle)
35947  * np.ndarray h_ang_vel_predict # predicted angular velocity # <<<<<<<<<<<<<<
35948  * np.ndarray h_predict_last # predicted displacement
35949  * double h_ang_predict_last # predicted angular displacement (angle)
35950  */
35951 
35952 /* Python wrapper */
35953 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_1__get__(PyObject *__pyx_v_self); /*proto*/
35954 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_1__get__(PyObject *__pyx_v_self) {
35955  PyObject *__pyx_r = 0;
35956  __Pyx_RefNannyDeclarations
35957  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
35958  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
35959 
35960  /* function exit code */
35961  __Pyx_RefNannyFinishContext();
35962  return __pyx_r;
35963 }
35964 
35965 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
35966  PyObject *__pyx_r = NULL;
35967  __Pyx_TraceDeclarations
35968  __Pyx_RefNannyDeclarations
35969  int __pyx_lineno = 0;
35970  const char *__pyx_filename = NULL;
35971  int __pyx_clineno = 0;
35972  __Pyx_RefNannySetupContext("__get__", 0);
35973  __Pyx_TraceCall("__get__", __pyx_f[2], 237, 0, __PYX_ERR(2, 237, __pyx_L1_error));
35974  __Pyx_XDECREF(__pyx_r);
35975  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_ang_vel_predict));
35976  __pyx_r = ((PyObject *)__pyx_v_self->h_ang_vel_predict);
35977  goto __pyx_L0;
35978 
35979  /* function exit code */
35980  __pyx_L1_error:;
35981  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_vel_predict.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
35982  __pyx_r = NULL;
35983  __pyx_L0:;
35984  __Pyx_XGIVEREF(__pyx_r);
35985  __Pyx_TraceReturn(__pyx_r, 0);
35986  __Pyx_RefNannyFinishContext();
35987  return __pyx_r;
35988 }
35989 
35990 /* Python wrapper */
35991 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
35992 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
35993  int __pyx_r;
35994  __Pyx_RefNannyDeclarations
35995  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
35996  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
35997 
35998  /* function exit code */
35999  __Pyx_RefNannyFinishContext();
36000  return __pyx_r;
36001 }
36002 
36003 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36004  int __pyx_r;
36005  __Pyx_TraceDeclarations
36006  __Pyx_RefNannyDeclarations
36007  PyObject *__pyx_t_1 = NULL;
36008  int __pyx_lineno = 0;
36009  const char *__pyx_filename = NULL;
36010  int __pyx_clineno = 0;
36011  __Pyx_RefNannySetupContext("__set__", 0);
36012  __Pyx_TraceCall("__set__", __pyx_f[2], 237, 0, __PYX_ERR(2, 237, __pyx_L1_error));
36013  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 237, __pyx_L1_error)
36014  __pyx_t_1 = __pyx_v_value;
36015  __Pyx_INCREF(__pyx_t_1);
36016  __Pyx_GIVEREF(__pyx_t_1);
36017  __Pyx_GOTREF(__pyx_v_self->h_ang_vel_predict);
36018  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_ang_vel_predict));
36019  __pyx_v_self->h_ang_vel_predict = ((PyArrayObject *)__pyx_t_1);
36020  __pyx_t_1 = 0;
36021 
36022  /* function exit code */
36023  __pyx_r = 0;
36024  goto __pyx_L0;
36025  __pyx_L1_error:;
36026  __Pyx_XDECREF(__pyx_t_1);
36027  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_vel_predict.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36028  __pyx_r = -1;
36029  __pyx_L0:;
36030  __Pyx_TraceReturn(Py_None, 0);
36031  __Pyx_RefNannyFinishContext();
36032  return __pyx_r;
36033 }
36034 
36035 /* Python wrapper */
36036 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_5__del__(PyObject *__pyx_v_self); /*proto*/
36037 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_5__del__(PyObject *__pyx_v_self) {
36038  int __pyx_r;
36039  __Pyx_RefNannyDeclarations
36040  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
36041  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36042 
36043  /* function exit code */
36044  __Pyx_RefNannyFinishContext();
36045  return __pyx_r;
36046 }
36047 
36048 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36049  int __pyx_r;
36050  __Pyx_TraceDeclarations
36051  __Pyx_RefNannyDeclarations
36052  int __pyx_lineno = 0;
36053  const char *__pyx_filename = NULL;
36054  int __pyx_clineno = 0;
36055  __Pyx_RefNannySetupContext("__del__", 0);
36056  __Pyx_TraceCall("__del__", __pyx_f[2], 237, 0, __PYX_ERR(2, 237, __pyx_L1_error));
36057  __Pyx_INCREF(Py_None);
36058  __Pyx_GIVEREF(Py_None);
36059  __Pyx_GOTREF(__pyx_v_self->h_ang_vel_predict);
36060  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_ang_vel_predict));
36061  __pyx_v_self->h_ang_vel_predict = ((PyArrayObject *)Py_None);
36062 
36063  /* function exit code */
36064  __pyx_r = 0;
36065  goto __pyx_L0;
36066  __pyx_L1_error:;
36067  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_vel_predict.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36068  __pyx_r = -1;
36069  __pyx_L0:;
36070  __Pyx_TraceReturn(Py_None, 0);
36071  __Pyx_RefNannyFinishContext();
36072  return __pyx_r;
36073 }
36074 
36075 /* "mbd/CouplingFSI.pxd":238
36076  * double h_ang_predict # predicted angular displacement (angle)
36077  * np.ndarray h_ang_vel_predict # predicted angular velocity
36078  * np.ndarray h_predict_last # predicted displacement # <<<<<<<<<<<<<<
36079  * double h_ang_predict_last # predicted angular displacement (angle)
36080  * np.ndarray h_ang_vel_predict_last # predicted angular velocity
36081  */
36082 
36083 /* Python wrapper */
36084 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_1__get__(PyObject *__pyx_v_self); /*proto*/
36085 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_1__get__(PyObject *__pyx_v_self) {
36086  PyObject *__pyx_r = 0;
36087  __Pyx_RefNannyDeclarations
36088  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36089  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36090 
36091  /* function exit code */
36092  __Pyx_RefNannyFinishContext();
36093  return __pyx_r;
36094 }
36095 
36096 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36097  PyObject *__pyx_r = NULL;
36098  __Pyx_TraceDeclarations
36099  __Pyx_RefNannyDeclarations
36100  int __pyx_lineno = 0;
36101  const char *__pyx_filename = NULL;
36102  int __pyx_clineno = 0;
36103  __Pyx_RefNannySetupContext("__get__", 0);
36104  __Pyx_TraceCall("__get__", __pyx_f[2], 238, 0, __PYX_ERR(2, 238, __pyx_L1_error));
36105  __Pyx_XDECREF(__pyx_r);
36106  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_predict_last));
36107  __pyx_r = ((PyObject *)__pyx_v_self->h_predict_last);
36108  goto __pyx_L0;
36109 
36110  /* function exit code */
36111  __pyx_L1_error:;
36112  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_predict_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36113  __pyx_r = NULL;
36114  __pyx_L0:;
36115  __Pyx_XGIVEREF(__pyx_r);
36116  __Pyx_TraceReturn(__pyx_r, 0);
36117  __Pyx_RefNannyFinishContext();
36118  return __pyx_r;
36119 }
36120 
36121 /* Python wrapper */
36122 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36123 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36124  int __pyx_r;
36125  __Pyx_RefNannyDeclarations
36126  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36127  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36128 
36129  /* function exit code */
36130  __Pyx_RefNannyFinishContext();
36131  return __pyx_r;
36132 }
36133 
36134 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36135  int __pyx_r;
36136  __Pyx_TraceDeclarations
36137  __Pyx_RefNannyDeclarations
36138  PyObject *__pyx_t_1 = NULL;
36139  int __pyx_lineno = 0;
36140  const char *__pyx_filename = NULL;
36141  int __pyx_clineno = 0;
36142  __Pyx_RefNannySetupContext("__set__", 0);
36143  __Pyx_TraceCall("__set__", __pyx_f[2], 238, 0, __PYX_ERR(2, 238, __pyx_L1_error));
36144  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 238, __pyx_L1_error)
36145  __pyx_t_1 = __pyx_v_value;
36146  __Pyx_INCREF(__pyx_t_1);
36147  __Pyx_GIVEREF(__pyx_t_1);
36148  __Pyx_GOTREF(__pyx_v_self->h_predict_last);
36149  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_predict_last));
36150  __pyx_v_self->h_predict_last = ((PyArrayObject *)__pyx_t_1);
36151  __pyx_t_1 = 0;
36152 
36153  /* function exit code */
36154  __pyx_r = 0;
36155  goto __pyx_L0;
36156  __pyx_L1_error:;
36157  __Pyx_XDECREF(__pyx_t_1);
36158  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_predict_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36159  __pyx_r = -1;
36160  __pyx_L0:;
36161  __Pyx_TraceReturn(Py_None, 0);
36162  __Pyx_RefNannyFinishContext();
36163  return __pyx_r;
36164 }
36165 
36166 /* Python wrapper */
36167 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_5__del__(PyObject *__pyx_v_self); /*proto*/
36168 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_5__del__(PyObject *__pyx_v_self) {
36169  int __pyx_r;
36170  __Pyx_RefNannyDeclarations
36171  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
36172  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36173 
36174  /* function exit code */
36175  __Pyx_RefNannyFinishContext();
36176  return __pyx_r;
36177 }
36178 
36179 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36180  int __pyx_r;
36181  __Pyx_TraceDeclarations
36182  __Pyx_RefNannyDeclarations
36183  int __pyx_lineno = 0;
36184  const char *__pyx_filename = NULL;
36185  int __pyx_clineno = 0;
36186  __Pyx_RefNannySetupContext("__del__", 0);
36187  __Pyx_TraceCall("__del__", __pyx_f[2], 238, 0, __PYX_ERR(2, 238, __pyx_L1_error));
36188  __Pyx_INCREF(Py_None);
36189  __Pyx_GIVEREF(Py_None);
36190  __Pyx_GOTREF(__pyx_v_self->h_predict_last);
36191  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_predict_last));
36192  __pyx_v_self->h_predict_last = ((PyArrayObject *)Py_None);
36193 
36194  /* function exit code */
36195  __pyx_r = 0;
36196  goto __pyx_L0;
36197  __pyx_L1_error:;
36198  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_predict_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36199  __pyx_r = -1;
36200  __pyx_L0:;
36201  __Pyx_TraceReturn(Py_None, 0);
36202  __Pyx_RefNannyFinishContext();
36203  return __pyx_r;
36204 }
36205 
36206 /* "mbd/CouplingFSI.pxd":239
36207  * np.ndarray h_ang_vel_predict # predicted angular velocity
36208  * np.ndarray h_predict_last # predicted displacement
36209  * double h_ang_predict_last # predicted angular displacement (angle) # <<<<<<<<<<<<<<
36210  * np.ndarray h_ang_vel_predict_last # predicted angular velocity
36211  * np.ndarray Aij # added mass array
36212  */
36213 
36214 /* Python wrapper */
36215 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_1__get__(PyObject *__pyx_v_self); /*proto*/
36216 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_1__get__(PyObject *__pyx_v_self) {
36217  PyObject *__pyx_r = 0;
36218  __Pyx_RefNannyDeclarations
36219  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36220  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36221 
36222  /* function exit code */
36223  __Pyx_RefNannyFinishContext();
36224  return __pyx_r;
36225 }
36226 
36227 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36228  PyObject *__pyx_r = NULL;
36229  __Pyx_TraceDeclarations
36230  __Pyx_RefNannyDeclarations
36231  PyObject *__pyx_t_1 = NULL;
36232  int __pyx_lineno = 0;
36233  const char *__pyx_filename = NULL;
36234  int __pyx_clineno = 0;
36235  __Pyx_RefNannySetupContext("__get__", 0);
36236  __Pyx_TraceCall("__get__", __pyx_f[2], 239, 0, __PYX_ERR(2, 239, __pyx_L1_error));
36237  __Pyx_XDECREF(__pyx_r);
36238  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->h_ang_predict_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 239, __pyx_L1_error)
36239  __Pyx_GOTREF(__pyx_t_1);
36240  __pyx_r = __pyx_t_1;
36241  __pyx_t_1 = 0;
36242  goto __pyx_L0;
36243 
36244  /* function exit code */
36245  __pyx_L1_error:;
36246  __Pyx_XDECREF(__pyx_t_1);
36247  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_predict_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36248  __pyx_r = NULL;
36249  __pyx_L0:;
36250  __Pyx_XGIVEREF(__pyx_r);
36251  __Pyx_TraceReturn(__pyx_r, 0);
36252  __Pyx_RefNannyFinishContext();
36253  return __pyx_r;
36254 }
36255 
36256 /* Python wrapper */
36257 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36258 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36259  int __pyx_r;
36260  __Pyx_RefNannyDeclarations
36261  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36262  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36263 
36264  /* function exit code */
36265  __Pyx_RefNannyFinishContext();
36266  return __pyx_r;
36267 }
36268 
36269 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36270  int __pyx_r;
36271  __Pyx_TraceDeclarations
36272  __Pyx_RefNannyDeclarations
36273  double __pyx_t_1;
36274  int __pyx_lineno = 0;
36275  const char *__pyx_filename = NULL;
36276  int __pyx_clineno = 0;
36277  __Pyx_RefNannySetupContext("__set__", 0);
36278  __Pyx_TraceCall("__set__", __pyx_f[2], 239, 0, __PYX_ERR(2, 239, __pyx_L1_error));
36279  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 239, __pyx_L1_error)
36280  __pyx_v_self->h_ang_predict_last = __pyx_t_1;
36281 
36282  /* function exit code */
36283  __pyx_r = 0;
36284  goto __pyx_L0;
36285  __pyx_L1_error:;
36286  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_predict_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36287  __pyx_r = -1;
36288  __pyx_L0:;
36289  __Pyx_TraceReturn(Py_None, 0);
36290  __Pyx_RefNannyFinishContext();
36291  return __pyx_r;
36292 }
36293 
36294 /* "mbd/CouplingFSI.pxd":240
36295  * np.ndarray h_predict_last # predicted displacement
36296  * double h_ang_predict_last # predicted angular displacement (angle)
36297  * np.ndarray h_ang_vel_predict_last # predicted angular velocity # <<<<<<<<<<<<<<
36298  * np.ndarray Aij # added mass array
36299  * bool applyAddedMass # will apply added mass if True (default)
36300  */
36301 
36302 /* Python wrapper */
36303 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_1__get__(PyObject *__pyx_v_self); /*proto*/
36304 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_1__get__(PyObject *__pyx_v_self) {
36305  PyObject *__pyx_r = 0;
36306  __Pyx_RefNannyDeclarations
36307  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36308  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36309 
36310  /* function exit code */
36311  __Pyx_RefNannyFinishContext();
36312  return __pyx_r;
36313 }
36314 
36315 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36316  PyObject *__pyx_r = NULL;
36317  __Pyx_TraceDeclarations
36318  __Pyx_RefNannyDeclarations
36319  int __pyx_lineno = 0;
36320  const char *__pyx_filename = NULL;
36321  int __pyx_clineno = 0;
36322  __Pyx_RefNannySetupContext("__get__", 0);
36323  __Pyx_TraceCall("__get__", __pyx_f[2], 240, 0, __PYX_ERR(2, 240, __pyx_L1_error));
36324  __Pyx_XDECREF(__pyx_r);
36325  __Pyx_INCREF(((PyObject *)__pyx_v_self->h_ang_vel_predict_last));
36326  __pyx_r = ((PyObject *)__pyx_v_self->h_ang_vel_predict_last);
36327  goto __pyx_L0;
36328 
36329  /* function exit code */
36330  __pyx_L1_error:;
36331  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_vel_predict_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36332  __pyx_r = NULL;
36333  __pyx_L0:;
36334  __Pyx_XGIVEREF(__pyx_r);
36335  __Pyx_TraceReturn(__pyx_r, 0);
36336  __Pyx_RefNannyFinishContext();
36337  return __pyx_r;
36338 }
36339 
36340 /* Python wrapper */
36341 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36342 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36343  int __pyx_r;
36344  __Pyx_RefNannyDeclarations
36345  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36346  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36347 
36348  /* function exit code */
36349  __Pyx_RefNannyFinishContext();
36350  return __pyx_r;
36351 }
36352 
36353 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36354  int __pyx_r;
36355  __Pyx_TraceDeclarations
36356  __Pyx_RefNannyDeclarations
36357  PyObject *__pyx_t_1 = NULL;
36358  int __pyx_lineno = 0;
36359  const char *__pyx_filename = NULL;
36360  int __pyx_clineno = 0;
36361  __Pyx_RefNannySetupContext("__set__", 0);
36362  __Pyx_TraceCall("__set__", __pyx_f[2], 240, 0, __PYX_ERR(2, 240, __pyx_L1_error));
36363  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 240, __pyx_L1_error)
36364  __pyx_t_1 = __pyx_v_value;
36365  __Pyx_INCREF(__pyx_t_1);
36366  __Pyx_GIVEREF(__pyx_t_1);
36367  __Pyx_GOTREF(__pyx_v_self->h_ang_vel_predict_last);
36368  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_ang_vel_predict_last));
36369  __pyx_v_self->h_ang_vel_predict_last = ((PyArrayObject *)__pyx_t_1);
36370  __pyx_t_1 = 0;
36371 
36372  /* function exit code */
36373  __pyx_r = 0;
36374  goto __pyx_L0;
36375  __pyx_L1_error:;
36376  __Pyx_XDECREF(__pyx_t_1);
36377  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_vel_predict_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36378  __pyx_r = -1;
36379  __pyx_L0:;
36380  __Pyx_TraceReturn(Py_None, 0);
36381  __Pyx_RefNannyFinishContext();
36382  return __pyx_r;
36383 }
36384 
36385 /* Python wrapper */
36386 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_5__del__(PyObject *__pyx_v_self); /*proto*/
36387 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_5__del__(PyObject *__pyx_v_self) {
36388  int __pyx_r;
36389  __Pyx_RefNannyDeclarations
36390  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
36391  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36392 
36393  /* function exit code */
36394  __Pyx_RefNannyFinishContext();
36395  return __pyx_r;
36396 }
36397 
36398 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36399  int __pyx_r;
36400  __Pyx_TraceDeclarations
36401  __Pyx_RefNannyDeclarations
36402  int __pyx_lineno = 0;
36403  const char *__pyx_filename = NULL;
36404  int __pyx_clineno = 0;
36405  __Pyx_RefNannySetupContext("__del__", 0);
36406  __Pyx_TraceCall("__del__", __pyx_f[2], 240, 0, __PYX_ERR(2, 240, __pyx_L1_error));
36407  __Pyx_INCREF(Py_None);
36408  __Pyx_GIVEREF(Py_None);
36409  __Pyx_GOTREF(__pyx_v_self->h_ang_vel_predict_last);
36410  __Pyx_DECREF(((PyObject *)__pyx_v_self->h_ang_vel_predict_last));
36411  __pyx_v_self->h_ang_vel_predict_last = ((PyArrayObject *)Py_None);
36412 
36413  /* function exit code */
36414  __pyx_r = 0;
36415  goto __pyx_L0;
36416  __pyx_L1_error:;
36417  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.h_ang_vel_predict_last.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36418  __pyx_r = -1;
36419  __pyx_L0:;
36420  __Pyx_TraceReturn(Py_None, 0);
36421  __Pyx_RefNannyFinishContext();
36422  return __pyx_r;
36423 }
36424 
36425 /* "mbd/CouplingFSI.pxd":241
36426  * double h_ang_predict_last # predicted angular displacement (angle)
36427  * np.ndarray h_ang_vel_predict_last # predicted angular velocity
36428  * np.ndarray Aij # added mass array # <<<<<<<<<<<<<<
36429  * bool applyAddedMass # will apply added mass if True (default)
36430  * bool Aij_updated_global # True if added-mass was updated in global coords
36431  */
36432 
36433 /* Python wrapper */
36434 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_1__get__(PyObject *__pyx_v_self); /*proto*/
36435 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_1__get__(PyObject *__pyx_v_self) {
36436  PyObject *__pyx_r = 0;
36437  __Pyx_RefNannyDeclarations
36438  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36439  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36440 
36441  /* function exit code */
36442  __Pyx_RefNannyFinishContext();
36443  return __pyx_r;
36444 }
36445 
36446 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36447  PyObject *__pyx_r = NULL;
36448  __Pyx_TraceDeclarations
36449  __Pyx_RefNannyDeclarations
36450  int __pyx_lineno = 0;
36451  const char *__pyx_filename = NULL;
36452  int __pyx_clineno = 0;
36453  __Pyx_RefNannySetupContext("__get__", 0);
36454  __Pyx_TraceCall("__get__", __pyx_f[2], 241, 0, __PYX_ERR(2, 241, __pyx_L1_error));
36455  __Pyx_XDECREF(__pyx_r);
36456  __Pyx_INCREF(((PyObject *)__pyx_v_self->Aij));
36457  __pyx_r = ((PyObject *)__pyx_v_self->Aij);
36458  goto __pyx_L0;
36459 
36460  /* function exit code */
36461  __pyx_L1_error:;
36462  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36463  __pyx_r = NULL;
36464  __pyx_L0:;
36465  __Pyx_XGIVEREF(__pyx_r);
36466  __Pyx_TraceReturn(__pyx_r, 0);
36467  __Pyx_RefNannyFinishContext();
36468  return __pyx_r;
36469 }
36470 
36471 /* Python wrapper */
36472 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36473 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36474  int __pyx_r;
36475  __Pyx_RefNannyDeclarations
36476  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36477  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36478 
36479  /* function exit code */
36480  __Pyx_RefNannyFinishContext();
36481  return __pyx_r;
36482 }
36483 
36484 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36485  int __pyx_r;
36486  __Pyx_TraceDeclarations
36487  __Pyx_RefNannyDeclarations
36488  PyObject *__pyx_t_1 = NULL;
36489  int __pyx_lineno = 0;
36490  const char *__pyx_filename = NULL;
36491  int __pyx_clineno = 0;
36492  __Pyx_RefNannySetupContext("__set__", 0);
36493  __Pyx_TraceCall("__set__", __pyx_f[2], 241, 0, __PYX_ERR(2, 241, __pyx_L1_error));
36494  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 241, __pyx_L1_error)
36495  __pyx_t_1 = __pyx_v_value;
36496  __Pyx_INCREF(__pyx_t_1);
36497  __Pyx_GIVEREF(__pyx_t_1);
36498  __Pyx_GOTREF(__pyx_v_self->Aij);
36499  __Pyx_DECREF(((PyObject *)__pyx_v_self->Aij));
36500  __pyx_v_self->Aij = ((PyArrayObject *)__pyx_t_1);
36501  __pyx_t_1 = 0;
36502 
36503  /* function exit code */
36504  __pyx_r = 0;
36505  goto __pyx_L0;
36506  __pyx_L1_error:;
36507  __Pyx_XDECREF(__pyx_t_1);
36508  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36509  __pyx_r = -1;
36510  __pyx_L0:;
36511  __Pyx_TraceReturn(Py_None, 0);
36512  __Pyx_RefNannyFinishContext();
36513  return __pyx_r;
36514 }
36515 
36516 /* Python wrapper */
36517 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_5__del__(PyObject *__pyx_v_self); /*proto*/
36518 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_5__del__(PyObject *__pyx_v_self) {
36519  int __pyx_r;
36520  __Pyx_RefNannyDeclarations
36521  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
36522  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36523 
36524  /* function exit code */
36525  __Pyx_RefNannyFinishContext();
36526  return __pyx_r;
36527 }
36528 
36529 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_3Aij_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36530  int __pyx_r;
36531  __Pyx_TraceDeclarations
36532  __Pyx_RefNannyDeclarations
36533  int __pyx_lineno = 0;
36534  const char *__pyx_filename = NULL;
36535  int __pyx_clineno = 0;
36536  __Pyx_RefNannySetupContext("__del__", 0);
36537  __Pyx_TraceCall("__del__", __pyx_f[2], 241, 0, __PYX_ERR(2, 241, __pyx_L1_error));
36538  __Pyx_INCREF(Py_None);
36539  __Pyx_GIVEREF(Py_None);
36540  __Pyx_GOTREF(__pyx_v_self->Aij);
36541  __Pyx_DECREF(((PyObject *)__pyx_v_self->Aij));
36542  __pyx_v_self->Aij = ((PyArrayObject *)Py_None);
36543 
36544  /* function exit code */
36545  __pyx_r = 0;
36546  goto __pyx_L0;
36547  __pyx_L1_error:;
36548  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36549  __pyx_r = -1;
36550  __pyx_L0:;
36551  __Pyx_TraceReturn(Py_None, 0);
36552  __Pyx_RefNannyFinishContext();
36553  return __pyx_r;
36554 }
36555 
36556 /* "mbd/CouplingFSI.pxd":242
36557  * np.ndarray h_ang_vel_predict_last # predicted angular velocity
36558  * np.ndarray Aij # added mass array
36559  * bool applyAddedMass # will apply added mass if True (default) # <<<<<<<<<<<<<<
36560  * bool Aij_updated_global # True if added-mass was updated in global coords
36561  * bool Aij_transform_local # True for transforming global Aij to local
36562  */
36563 
36564 /* Python wrapper */
36565 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_1__get__(PyObject *__pyx_v_self); /*proto*/
36566 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_1__get__(PyObject *__pyx_v_self) {
36567  PyObject *__pyx_r = 0;
36568  __Pyx_RefNannyDeclarations
36569  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36570  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36571 
36572  /* function exit code */
36573  __Pyx_RefNannyFinishContext();
36574  return __pyx_r;
36575 }
36576 
36577 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36578  PyObject *__pyx_r = NULL;
36579  __Pyx_TraceDeclarations
36580  __Pyx_RefNannyDeclarations
36581  PyObject *__pyx_t_1 = NULL;
36582  int __pyx_lineno = 0;
36583  const char *__pyx_filename = NULL;
36584  int __pyx_clineno = 0;
36585  __Pyx_RefNannySetupContext("__get__", 0);
36586  __Pyx_TraceCall("__get__", __pyx_f[2], 242, 0, __PYX_ERR(2, 242, __pyx_L1_error));
36587  __Pyx_XDECREF(__pyx_r);
36588  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->applyAddedMass); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 242, __pyx_L1_error)
36589  __Pyx_GOTREF(__pyx_t_1);
36590  __pyx_r = __pyx_t_1;
36591  __pyx_t_1 = 0;
36592  goto __pyx_L0;
36593 
36594  /* function exit code */
36595  __pyx_L1_error:;
36596  __Pyx_XDECREF(__pyx_t_1);
36597  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.applyAddedMass.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36598  __pyx_r = NULL;
36599  __pyx_L0:;
36600  __Pyx_XGIVEREF(__pyx_r);
36601  __Pyx_TraceReturn(__pyx_r, 0);
36602  __Pyx_RefNannyFinishContext();
36603  return __pyx_r;
36604 }
36605 
36606 /* Python wrapper */
36607 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36608 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36609  int __pyx_r;
36610  __Pyx_RefNannyDeclarations
36611  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36612  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36613 
36614  /* function exit code */
36615  __Pyx_RefNannyFinishContext();
36616  return __pyx_r;
36617 }
36618 
36619 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36620  int __pyx_r;
36621  __Pyx_TraceDeclarations
36622  __Pyx_RefNannyDeclarations
36623  bool __pyx_t_1;
36624  int __pyx_lineno = 0;
36625  const char *__pyx_filename = NULL;
36626  int __pyx_clineno = 0;
36627  __Pyx_RefNannySetupContext("__set__", 0);
36628  __Pyx_TraceCall("__set__", __pyx_f[2], 242, 0, __PYX_ERR(2, 242, __pyx_L1_error));
36629  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 242, __pyx_L1_error)
36630  __pyx_v_self->applyAddedMass = __pyx_t_1;
36631 
36632  /* function exit code */
36633  __pyx_r = 0;
36634  goto __pyx_L0;
36635  __pyx_L1_error:;
36636  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.applyAddedMass.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36637  __pyx_r = -1;
36638  __pyx_L0:;
36639  __Pyx_TraceReturn(Py_None, 0);
36640  __Pyx_RefNannyFinishContext();
36641  return __pyx_r;
36642 }
36643 
36644 /* "mbd/CouplingFSI.pxd":243
36645  * np.ndarray Aij # added mass array
36646  * bool applyAddedMass # will apply added mass if True (default)
36647  * bool Aij_updated_global # True if added-mass was updated in global coords # <<<<<<<<<<<<<<
36648  * bool Aij_transform_local # True for transforming global Aij to local
36649  * bool useIBM
36650  */
36651 
36652 /* Python wrapper */
36653 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_1__get__(PyObject *__pyx_v_self); /*proto*/
36654 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_1__get__(PyObject *__pyx_v_self) {
36655  PyObject *__pyx_r = 0;
36656  __Pyx_RefNannyDeclarations
36657  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36658  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36659 
36660  /* function exit code */
36661  __Pyx_RefNannyFinishContext();
36662  return __pyx_r;
36663 }
36664 
36665 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36666  PyObject *__pyx_r = NULL;
36667  __Pyx_TraceDeclarations
36668  __Pyx_RefNannyDeclarations
36669  PyObject *__pyx_t_1 = NULL;
36670  int __pyx_lineno = 0;
36671  const char *__pyx_filename = NULL;
36672  int __pyx_clineno = 0;
36673  __Pyx_RefNannySetupContext("__get__", 0);
36674  __Pyx_TraceCall("__get__", __pyx_f[2], 243, 0, __PYX_ERR(2, 243, __pyx_L1_error));
36675  __Pyx_XDECREF(__pyx_r);
36676  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->Aij_updated_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 243, __pyx_L1_error)
36677  __Pyx_GOTREF(__pyx_t_1);
36678  __pyx_r = __pyx_t_1;
36679  __pyx_t_1 = 0;
36680  goto __pyx_L0;
36681 
36682  /* function exit code */
36683  __pyx_L1_error:;
36684  __Pyx_XDECREF(__pyx_t_1);
36685  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij_updated_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36686  __pyx_r = NULL;
36687  __pyx_L0:;
36688  __Pyx_XGIVEREF(__pyx_r);
36689  __Pyx_TraceReturn(__pyx_r, 0);
36690  __Pyx_RefNannyFinishContext();
36691  return __pyx_r;
36692 }
36693 
36694 /* Python wrapper */
36695 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36696 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36697  int __pyx_r;
36698  __Pyx_RefNannyDeclarations
36699  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36700  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36701 
36702  /* function exit code */
36703  __Pyx_RefNannyFinishContext();
36704  return __pyx_r;
36705 }
36706 
36707 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36708  int __pyx_r;
36709  __Pyx_TraceDeclarations
36710  __Pyx_RefNannyDeclarations
36711  bool __pyx_t_1;
36712  int __pyx_lineno = 0;
36713  const char *__pyx_filename = NULL;
36714  int __pyx_clineno = 0;
36715  __Pyx_RefNannySetupContext("__set__", 0);
36716  __Pyx_TraceCall("__set__", __pyx_f[2], 243, 0, __PYX_ERR(2, 243, __pyx_L1_error));
36717  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 243, __pyx_L1_error)
36718  __pyx_v_self->Aij_updated_global = __pyx_t_1;
36719 
36720  /* function exit code */
36721  __pyx_r = 0;
36722  goto __pyx_L0;
36723  __pyx_L1_error:;
36724  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij_updated_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36725  __pyx_r = -1;
36726  __pyx_L0:;
36727  __Pyx_TraceReturn(Py_None, 0);
36728  __Pyx_RefNannyFinishContext();
36729  return __pyx_r;
36730 }
36731 
36732 /* "mbd/CouplingFSI.pxd":244
36733  * bool applyAddedMass # will apply added mass if True (default)
36734  * bool Aij_updated_global # True if added-mass was updated in global coords
36735  * bool Aij_transform_local # True for transforming global Aij to local # <<<<<<<<<<<<<<
36736  * bool useIBM
36737  * double radiusIBM
36738  */
36739 
36740 /* Python wrapper */
36741 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_1__get__(PyObject *__pyx_v_self); /*proto*/
36742 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_1__get__(PyObject *__pyx_v_self) {
36743  PyObject *__pyx_r = 0;
36744  __Pyx_RefNannyDeclarations
36745  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36746  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36747 
36748  /* function exit code */
36749  __Pyx_RefNannyFinishContext();
36750  return __pyx_r;
36751 }
36752 
36753 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36754  PyObject *__pyx_r = NULL;
36755  __Pyx_TraceDeclarations
36756  __Pyx_RefNannyDeclarations
36757  PyObject *__pyx_t_1 = NULL;
36758  int __pyx_lineno = 0;
36759  const char *__pyx_filename = NULL;
36760  int __pyx_clineno = 0;
36761  __Pyx_RefNannySetupContext("__get__", 0);
36762  __Pyx_TraceCall("__get__", __pyx_f[2], 244, 0, __PYX_ERR(2, 244, __pyx_L1_error));
36763  __Pyx_XDECREF(__pyx_r);
36764  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->Aij_transform_local); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 244, __pyx_L1_error)
36765  __Pyx_GOTREF(__pyx_t_1);
36766  __pyx_r = __pyx_t_1;
36767  __pyx_t_1 = 0;
36768  goto __pyx_L0;
36769 
36770  /* function exit code */
36771  __pyx_L1_error:;
36772  __Pyx_XDECREF(__pyx_t_1);
36773  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij_transform_local.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36774  __pyx_r = NULL;
36775  __pyx_L0:;
36776  __Pyx_XGIVEREF(__pyx_r);
36777  __Pyx_TraceReturn(__pyx_r, 0);
36778  __Pyx_RefNannyFinishContext();
36779  return __pyx_r;
36780 }
36781 
36782 /* Python wrapper */
36783 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36784 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36785  int __pyx_r;
36786  __Pyx_RefNannyDeclarations
36787  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36788  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36789 
36790  /* function exit code */
36791  __Pyx_RefNannyFinishContext();
36792  return __pyx_r;
36793 }
36794 
36795 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36796  int __pyx_r;
36797  __Pyx_TraceDeclarations
36798  __Pyx_RefNannyDeclarations
36799  bool __pyx_t_1;
36800  int __pyx_lineno = 0;
36801  const char *__pyx_filename = NULL;
36802  int __pyx_clineno = 0;
36803  __Pyx_RefNannySetupContext("__set__", 0);
36804  __Pyx_TraceCall("__set__", __pyx_f[2], 244, 0, __PYX_ERR(2, 244, __pyx_L1_error));
36805  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 244, __pyx_L1_error)
36806  __pyx_v_self->Aij_transform_local = __pyx_t_1;
36807 
36808  /* function exit code */
36809  __pyx_r = 0;
36810  goto __pyx_L0;
36811  __pyx_L1_error:;
36812  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij_transform_local.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36813  __pyx_r = -1;
36814  __pyx_L0:;
36815  __Pyx_TraceReturn(Py_None, 0);
36816  __Pyx_RefNannyFinishContext();
36817  return __pyx_r;
36818 }
36819 
36820 /* "mbd/CouplingFSI.pxd":245
36821  * bool Aij_updated_global # True if added-mass was updated in global coords
36822  * bool Aij_transform_local # True for transforming global Aij to local
36823  * bool useIBM # <<<<<<<<<<<<<<
36824  * double radiusIBM
36825  * object sdfIBM
36826  */
36827 
36828 /* Python wrapper */
36829 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6useIBM_1__get__(PyObject *__pyx_v_self); /*proto*/
36830 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6useIBM_1__get__(PyObject *__pyx_v_self) {
36831  PyObject *__pyx_r = 0;
36832  __Pyx_RefNannyDeclarations
36833  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36834  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6useIBM___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36835 
36836  /* function exit code */
36837  __Pyx_RefNannyFinishContext();
36838  return __pyx_r;
36839 }
36840 
36841 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6useIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36842  PyObject *__pyx_r = NULL;
36843  __Pyx_TraceDeclarations
36844  __Pyx_RefNannyDeclarations
36845  PyObject *__pyx_t_1 = NULL;
36846  int __pyx_lineno = 0;
36847  const char *__pyx_filename = NULL;
36848  int __pyx_clineno = 0;
36849  __Pyx_RefNannySetupContext("__get__", 0);
36850  __Pyx_TraceCall("__get__", __pyx_f[2], 245, 0, __PYX_ERR(2, 245, __pyx_L1_error));
36851  __Pyx_XDECREF(__pyx_r);
36852  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->useIBM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 245, __pyx_L1_error)
36853  __Pyx_GOTREF(__pyx_t_1);
36854  __pyx_r = __pyx_t_1;
36855  __pyx_t_1 = 0;
36856  goto __pyx_L0;
36857 
36858  /* function exit code */
36859  __pyx_L1_error:;
36860  __Pyx_XDECREF(__pyx_t_1);
36861  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.useIBM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36862  __pyx_r = NULL;
36863  __pyx_L0:;
36864  __Pyx_XGIVEREF(__pyx_r);
36865  __Pyx_TraceReturn(__pyx_r, 0);
36866  __Pyx_RefNannyFinishContext();
36867  return __pyx_r;
36868 }
36869 
36870 /* Python wrapper */
36871 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6useIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36872 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6useIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36873  int __pyx_r;
36874  __Pyx_RefNannyDeclarations
36875  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36876  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6useIBM_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36877 
36878  /* function exit code */
36879  __Pyx_RefNannyFinishContext();
36880  return __pyx_r;
36881 }
36882 
36883 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6useIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36884  int __pyx_r;
36885  __Pyx_TraceDeclarations
36886  __Pyx_RefNannyDeclarations
36887  bool __pyx_t_1;
36888  int __pyx_lineno = 0;
36889  const char *__pyx_filename = NULL;
36890  int __pyx_clineno = 0;
36891  __Pyx_RefNannySetupContext("__set__", 0);
36892  __Pyx_TraceCall("__set__", __pyx_f[2], 245, 0, __PYX_ERR(2, 245, __pyx_L1_error));
36893  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 245, __pyx_L1_error)
36894  __pyx_v_self->useIBM = __pyx_t_1;
36895 
36896  /* function exit code */
36897  __pyx_r = 0;
36898  goto __pyx_L0;
36899  __pyx_L1_error:;
36900  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.useIBM.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36901  __pyx_r = -1;
36902  __pyx_L0:;
36903  __Pyx_TraceReturn(Py_None, 0);
36904  __Pyx_RefNannyFinishContext();
36905  return __pyx_r;
36906 }
36907 
36908 /* "mbd/CouplingFSI.pxd":246
36909  * bool Aij_transform_local # True for transforming global Aij to local
36910  * bool useIBM
36911  * double radiusIBM # <<<<<<<<<<<<<<
36912  * object sdfIBM
36913  * string hdfFileName
36914  */
36915 
36916 /* Python wrapper */
36917 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_1__get__(PyObject *__pyx_v_self); /*proto*/
36918 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_1__get__(PyObject *__pyx_v_self) {
36919  PyObject *__pyx_r = 0;
36920  __Pyx_RefNannyDeclarations
36921  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
36922  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
36923 
36924  /* function exit code */
36925  __Pyx_RefNannyFinishContext();
36926  return __pyx_r;
36927 }
36928 
36929 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
36930  PyObject *__pyx_r = NULL;
36931  __Pyx_TraceDeclarations
36932  __Pyx_RefNannyDeclarations
36933  PyObject *__pyx_t_1 = NULL;
36934  int __pyx_lineno = 0;
36935  const char *__pyx_filename = NULL;
36936  int __pyx_clineno = 0;
36937  __Pyx_RefNannySetupContext("__get__", 0);
36938  __Pyx_TraceCall("__get__", __pyx_f[2], 246, 0, __PYX_ERR(2, 246, __pyx_L1_error));
36939  __Pyx_XDECREF(__pyx_r);
36940  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->radiusIBM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 246, __pyx_L1_error)
36941  __Pyx_GOTREF(__pyx_t_1);
36942  __pyx_r = __pyx_t_1;
36943  __pyx_t_1 = 0;
36944  goto __pyx_L0;
36945 
36946  /* function exit code */
36947  __pyx_L1_error:;
36948  __Pyx_XDECREF(__pyx_t_1);
36949  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.radiusIBM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36950  __pyx_r = NULL;
36951  __pyx_L0:;
36952  __Pyx_XGIVEREF(__pyx_r);
36953  __Pyx_TraceReturn(__pyx_r, 0);
36954  __Pyx_RefNannyFinishContext();
36955  return __pyx_r;
36956 }
36957 
36958 /* Python wrapper */
36959 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
36960 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
36961  int __pyx_r;
36962  __Pyx_RefNannyDeclarations
36963  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
36964  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
36965 
36966  /* function exit code */
36967  __Pyx_RefNannyFinishContext();
36968  return __pyx_r;
36969 }
36970 
36971 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
36972  int __pyx_r;
36973  __Pyx_TraceDeclarations
36974  __Pyx_RefNannyDeclarations
36975  double __pyx_t_1;
36976  int __pyx_lineno = 0;
36977  const char *__pyx_filename = NULL;
36978  int __pyx_clineno = 0;
36979  __Pyx_RefNannySetupContext("__set__", 0);
36980  __Pyx_TraceCall("__set__", __pyx_f[2], 246, 0, __PYX_ERR(2, 246, __pyx_L1_error));
36981  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 246, __pyx_L1_error)
36982  __pyx_v_self->radiusIBM = __pyx_t_1;
36983 
36984  /* function exit code */
36985  __pyx_r = 0;
36986  goto __pyx_L0;
36987  __pyx_L1_error:;
36988  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.radiusIBM.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
36989  __pyx_r = -1;
36990  __pyx_L0:;
36991  __Pyx_TraceReturn(Py_None, 0);
36992  __Pyx_RefNannyFinishContext();
36993  return __pyx_r;
36994 }
36995 
36996 /* "mbd/CouplingFSI.pxd":247
36997  * bool useIBM
36998  * double radiusIBM
36999  * object sdfIBM # <<<<<<<<<<<<<<
37000  * string hdfFileName
37001  * double Aij_factor
37002  */
37003 
37004 /* Python wrapper */
37005 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_1__get__(PyObject *__pyx_v_self); /*proto*/
37006 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_1__get__(PyObject *__pyx_v_self) {
37007  PyObject *__pyx_r = 0;
37008  __Pyx_RefNannyDeclarations
37009  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37010  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
37011 
37012  /* function exit code */
37013  __Pyx_RefNannyFinishContext();
37014  return __pyx_r;
37015 }
37016 
37017 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
37018  PyObject *__pyx_r = NULL;
37019  __Pyx_TraceDeclarations
37020  __Pyx_RefNannyDeclarations
37021  int __pyx_lineno = 0;
37022  const char *__pyx_filename = NULL;
37023  int __pyx_clineno = 0;
37024  __Pyx_RefNannySetupContext("__get__", 0);
37025  __Pyx_TraceCall("__get__", __pyx_f[2], 247, 0, __PYX_ERR(2, 247, __pyx_L1_error));
37026  __Pyx_XDECREF(__pyx_r);
37027  __Pyx_INCREF(__pyx_v_self->sdfIBM);
37028  __pyx_r = __pyx_v_self->sdfIBM;
37029  goto __pyx_L0;
37030 
37031  /* function exit code */
37032  __pyx_L1_error:;
37033  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.sdfIBM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37034  __pyx_r = NULL;
37035  __pyx_L0:;
37036  __Pyx_XGIVEREF(__pyx_r);
37037  __Pyx_TraceReturn(__pyx_r, 0);
37038  __Pyx_RefNannyFinishContext();
37039  return __pyx_r;
37040 }
37041 
37042 /* Python wrapper */
37043 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
37044 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
37045  int __pyx_r;
37046  __Pyx_RefNannyDeclarations
37047  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
37048  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
37049 
37050  /* function exit code */
37051  __Pyx_RefNannyFinishContext();
37052  return __pyx_r;
37053 }
37054 
37055 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
37056  int __pyx_r;
37057  __Pyx_TraceDeclarations
37058  __Pyx_RefNannyDeclarations
37059  int __pyx_lineno = 0;
37060  const char *__pyx_filename = NULL;
37061  int __pyx_clineno = 0;
37062  __Pyx_RefNannySetupContext("__set__", 0);
37063  __Pyx_TraceCall("__set__", __pyx_f[2], 247, 0, __PYX_ERR(2, 247, __pyx_L1_error));
37064  __Pyx_INCREF(__pyx_v_value);
37065  __Pyx_GIVEREF(__pyx_v_value);
37066  __Pyx_GOTREF(__pyx_v_self->sdfIBM);
37067  __Pyx_DECREF(__pyx_v_self->sdfIBM);
37068  __pyx_v_self->sdfIBM = __pyx_v_value;
37069 
37070  /* function exit code */
37071  __pyx_r = 0;
37072  goto __pyx_L0;
37073  __pyx_L1_error:;
37074  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.sdfIBM.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37075  __pyx_r = -1;
37076  __pyx_L0:;
37077  __Pyx_TraceReturn(Py_None, 0);
37078  __Pyx_RefNannyFinishContext();
37079  return __pyx_r;
37080 }
37081 
37082 /* Python wrapper */
37083 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_5__del__(PyObject *__pyx_v_self); /*proto*/
37084 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_5__del__(PyObject *__pyx_v_self) {
37085  int __pyx_r;
37086  __Pyx_RefNannyDeclarations
37087  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
37088  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
37089 
37090  /* function exit code */
37091  __Pyx_RefNannyFinishContext();
37092  return __pyx_r;
37093 }
37094 
37095 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
37096  int __pyx_r;
37097  __Pyx_TraceDeclarations
37098  __Pyx_RefNannyDeclarations
37099  int __pyx_lineno = 0;
37100  const char *__pyx_filename = NULL;
37101  int __pyx_clineno = 0;
37102  __Pyx_RefNannySetupContext("__del__", 0);
37103  __Pyx_TraceCall("__del__", __pyx_f[2], 247, 0, __PYX_ERR(2, 247, __pyx_L1_error));
37104  __Pyx_INCREF(Py_None);
37105  __Pyx_GIVEREF(Py_None);
37106  __Pyx_GOTREF(__pyx_v_self->sdfIBM);
37107  __Pyx_DECREF(__pyx_v_self->sdfIBM);
37108  __pyx_v_self->sdfIBM = Py_None;
37109 
37110  /* function exit code */
37111  __pyx_r = 0;
37112  goto __pyx_L0;
37113  __pyx_L1_error:;
37114  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.sdfIBM.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37115  __pyx_r = -1;
37116  __pyx_L0:;
37117  __Pyx_TraceReturn(Py_None, 0);
37118  __Pyx_RefNannyFinishContext();
37119  return __pyx_r;
37120 }
37121 
37122 /* "mbd/CouplingFSI.pxd":248
37123  * double radiusIBM
37124  * object sdfIBM
37125  * string hdfFileName # <<<<<<<<<<<<<<
37126  * double Aij_factor
37127  * np.ndarray boundaryFlags
37128  */
37129 
37130 /* Python wrapper */
37131 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_1__get__(PyObject *__pyx_v_self); /*proto*/
37132 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_1__get__(PyObject *__pyx_v_self) {
37133  PyObject *__pyx_r = 0;
37134  __Pyx_RefNannyDeclarations
37135  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37136  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
37137 
37138  /* function exit code */
37139  __Pyx_RefNannyFinishContext();
37140  return __pyx_r;
37141 }
37142 
37143 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
37144  PyObject *__pyx_r = NULL;
37145  __Pyx_TraceDeclarations
37146  __Pyx_RefNannyDeclarations
37147  PyObject *__pyx_t_1 = NULL;
37148  int __pyx_lineno = 0;
37149  const char *__pyx_filename = NULL;
37150  int __pyx_clineno = 0;
37151  __Pyx_RefNannySetupContext("__get__", 0);
37152  __Pyx_TraceCall("__get__", __pyx_f[2], 248, 0, __PYX_ERR(2, 248, __pyx_L1_error));
37153  __Pyx_XDECREF(__pyx_r);
37154  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 248, __pyx_L1_error)
37155  __Pyx_GOTREF(__pyx_t_1);
37156  __pyx_r = __pyx_t_1;
37157  __pyx_t_1 = 0;
37158  goto __pyx_L0;
37159 
37160  /* function exit code */
37161  __pyx_L1_error:;
37162  __Pyx_XDECREF(__pyx_t_1);
37163  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hdfFileName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37164  __pyx_r = NULL;
37165  __pyx_L0:;
37166  __Pyx_XGIVEREF(__pyx_r);
37167  __Pyx_TraceReturn(__pyx_r, 0);
37168  __Pyx_RefNannyFinishContext();
37169  return __pyx_r;
37170 }
37171 
37172 /* Python wrapper */
37173 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
37174 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
37175  int __pyx_r;
37176  __Pyx_RefNannyDeclarations
37177  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
37178  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
37179 
37180  /* function exit code */
37181  __Pyx_RefNannyFinishContext();
37182  return __pyx_r;
37183 }
37184 
37185 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
37186  int __pyx_r;
37187  __Pyx_TraceDeclarations
37188  __Pyx_RefNannyDeclarations
37189  std::string __pyx_t_1;
37190  int __pyx_lineno = 0;
37191  const char *__pyx_filename = NULL;
37192  int __pyx_clineno = 0;
37193  __Pyx_RefNannySetupContext("__set__", 0);
37194  __Pyx_TraceCall("__set__", __pyx_f[2], 248, 0, __PYX_ERR(2, 248, __pyx_L1_error));
37195  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 248, __pyx_L1_error)
37196  __pyx_v_self->hdfFileName = __pyx_t_1;
37197 
37198  /* function exit code */
37199  __pyx_r = 0;
37200  goto __pyx_L0;
37201  __pyx_L1_error:;
37202  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.hdfFileName.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37203  __pyx_r = -1;
37204  __pyx_L0:;
37205  __Pyx_TraceReturn(Py_None, 0);
37206  __Pyx_RefNannyFinishContext();
37207  return __pyx_r;
37208 }
37209 
37210 /* "mbd/CouplingFSI.pxd":249
37211  * object sdfIBM
37212  * string hdfFileName
37213  * double Aij_factor # <<<<<<<<<<<<<<
37214  * np.ndarray boundaryFlags
37215  * cdef np.ndarray callPrescribedMotion(self, double t)
37216  */
37217 
37218 /* Python wrapper */
37219 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_1__get__(PyObject *__pyx_v_self); /*proto*/
37220 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_1__get__(PyObject *__pyx_v_self) {
37221  PyObject *__pyx_r = 0;
37222  __Pyx_RefNannyDeclarations
37223  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37224  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
37225 
37226  /* function exit code */
37227  __Pyx_RefNannyFinishContext();
37228  return __pyx_r;
37229 }
37230 
37231 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
37232  PyObject *__pyx_r = NULL;
37233  __Pyx_TraceDeclarations
37234  __Pyx_RefNannyDeclarations
37235  PyObject *__pyx_t_1 = NULL;
37236  int __pyx_lineno = 0;
37237  const char *__pyx_filename = NULL;
37238  int __pyx_clineno = 0;
37239  __Pyx_RefNannySetupContext("__get__", 0);
37240  __Pyx_TraceCall("__get__", __pyx_f[2], 249, 0, __PYX_ERR(2, 249, __pyx_L1_error));
37241  __Pyx_XDECREF(__pyx_r);
37242  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->Aij_factor); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 249, __pyx_L1_error)
37243  __Pyx_GOTREF(__pyx_t_1);
37244  __pyx_r = __pyx_t_1;
37245  __pyx_t_1 = 0;
37246  goto __pyx_L0;
37247 
37248  /* function exit code */
37249  __pyx_L1_error:;
37250  __Pyx_XDECREF(__pyx_t_1);
37251  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij_factor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37252  __pyx_r = NULL;
37253  __pyx_L0:;
37254  __Pyx_XGIVEREF(__pyx_r);
37255  __Pyx_TraceReturn(__pyx_r, 0);
37256  __Pyx_RefNannyFinishContext();
37257  return __pyx_r;
37258 }
37259 
37260 /* Python wrapper */
37261 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
37262 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
37263  int __pyx_r;
37264  __Pyx_RefNannyDeclarations
37265  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
37266  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
37267 
37268  /* function exit code */
37269  __Pyx_RefNannyFinishContext();
37270  return __pyx_r;
37271 }
37272 
37273 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
37274  int __pyx_r;
37275  __Pyx_TraceDeclarations
37276  __Pyx_RefNannyDeclarations
37277  double __pyx_t_1;
37278  int __pyx_lineno = 0;
37279  const char *__pyx_filename = NULL;
37280  int __pyx_clineno = 0;
37281  __Pyx_RefNannySetupContext("__set__", 0);
37282  __Pyx_TraceCall("__set__", __pyx_f[2], 249, 0, __PYX_ERR(2, 249, __pyx_L1_error));
37283  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 249, __pyx_L1_error)
37284  __pyx_v_self->Aij_factor = __pyx_t_1;
37285 
37286  /* function exit code */
37287  __pyx_r = 0;
37288  goto __pyx_L0;
37289  __pyx_L1_error:;
37290  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.Aij_factor.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37291  __pyx_r = -1;
37292  __pyx_L0:;
37293  __Pyx_TraceReturn(Py_None, 0);
37294  __Pyx_RefNannyFinishContext();
37295  return __pyx_r;
37296 }
37297 
37298 /* "mbd/CouplingFSI.pxd":250
37299  * string hdfFileName
37300  * double Aij_factor
37301  * np.ndarray boundaryFlags # <<<<<<<<<<<<<<
37302  * cdef np.ndarray callPrescribedMotion(self, double t)
37303  *
37304  */
37305 
37306 /* Python wrapper */
37307 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_1__get__(PyObject *__pyx_v_self); /*proto*/
37308 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_1__get__(PyObject *__pyx_v_self) {
37309  PyObject *__pyx_r = 0;
37310  __Pyx_RefNannyDeclarations
37311  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
37312  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
37313 
37314  /* function exit code */
37315  __Pyx_RefNannyFinishContext();
37316  return __pyx_r;
37317 }
37318 
37319 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
37320  PyObject *__pyx_r = NULL;
37321  __Pyx_TraceDeclarations
37322  __Pyx_RefNannyDeclarations
37323  int __pyx_lineno = 0;
37324  const char *__pyx_filename = NULL;
37325  int __pyx_clineno = 0;
37326  __Pyx_RefNannySetupContext("__get__", 0);
37327  __Pyx_TraceCall("__get__", __pyx_f[2], 250, 0, __PYX_ERR(2, 250, __pyx_L1_error));
37328  __Pyx_XDECREF(__pyx_r);
37329  __Pyx_INCREF(((PyObject *)__pyx_v_self->boundaryFlags));
37330  __pyx_r = ((PyObject *)__pyx_v_self->boundaryFlags);
37331  goto __pyx_L0;
37332 
37333  /* function exit code */
37334  __pyx_L1_error:;
37335  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.boundaryFlags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37336  __pyx_r = NULL;
37337  __pyx_L0:;
37338  __Pyx_XGIVEREF(__pyx_r);
37339  __Pyx_TraceReturn(__pyx_r, 0);
37340  __Pyx_RefNannyFinishContext();
37341  return __pyx_r;
37342 }
37343 
37344 /* Python wrapper */
37345 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
37346 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
37347  int __pyx_r;
37348  __Pyx_RefNannyDeclarations
37349  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
37350  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v_value));
37351 
37352  /* function exit code */
37353  __Pyx_RefNannyFinishContext();
37354  return __pyx_r;
37355 }
37356 
37357 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, PyObject *__pyx_v_value) {
37358  int __pyx_r;
37359  __Pyx_TraceDeclarations
37360  __Pyx_RefNannyDeclarations
37361  PyObject *__pyx_t_1 = NULL;
37362  int __pyx_lineno = 0;
37363  const char *__pyx_filename = NULL;
37364  int __pyx_clineno = 0;
37365  __Pyx_RefNannySetupContext("__set__", 0);
37366  __Pyx_TraceCall("__set__", __pyx_f[2], 250, 0, __PYX_ERR(2, 250, __pyx_L1_error));
37367  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 250, __pyx_L1_error)
37368  __pyx_t_1 = __pyx_v_value;
37369  __Pyx_INCREF(__pyx_t_1);
37370  __Pyx_GIVEREF(__pyx_t_1);
37371  __Pyx_GOTREF(__pyx_v_self->boundaryFlags);
37372  __Pyx_DECREF(((PyObject *)__pyx_v_self->boundaryFlags));
37373  __pyx_v_self->boundaryFlags = ((PyArrayObject *)__pyx_t_1);
37374  __pyx_t_1 = 0;
37375 
37376  /* function exit code */
37377  __pyx_r = 0;
37378  goto __pyx_L0;
37379  __pyx_L1_error:;
37380  __Pyx_XDECREF(__pyx_t_1);
37381  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.boundaryFlags.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37382  __pyx_r = -1;
37383  __pyx_L0:;
37384  __Pyx_TraceReturn(Py_None, 0);
37385  __Pyx_RefNannyFinishContext();
37386  return __pyx_r;
37387 }
37388 
37389 /* Python wrapper */
37390 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_5__del__(PyObject *__pyx_v_self); /*proto*/
37391 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_5__del__(PyObject *__pyx_v_self) {
37392  int __pyx_r;
37393  __Pyx_RefNannyDeclarations
37394  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
37395  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
37396 
37397  /* function exit code */
37398  __Pyx_RefNannyFinishContext();
37399  return __pyx_r;
37400 }
37401 
37402 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
37403  int __pyx_r;
37404  __Pyx_TraceDeclarations
37405  __Pyx_RefNannyDeclarations
37406  int __pyx_lineno = 0;
37407  const char *__pyx_filename = NULL;
37408  int __pyx_clineno = 0;
37409  __Pyx_RefNannySetupContext("__del__", 0);
37410  __Pyx_TraceCall("__del__", __pyx_f[2], 250, 0, __PYX_ERR(2, 250, __pyx_L1_error));
37411  __Pyx_INCREF(Py_None);
37412  __Pyx_GIVEREF(Py_None);
37413  __Pyx_GOTREF(__pyx_v_self->boundaryFlags);
37414  __Pyx_DECREF(((PyObject *)__pyx_v_self->boundaryFlags));
37415  __pyx_v_self->boundaryFlags = ((PyArrayObject *)Py_None);
37416 
37417  /* function exit code */
37418  __pyx_r = 0;
37419  goto __pyx_L0;
37420  __pyx_L1_error:;
37421  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.boundaryFlags.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37422  __pyx_r = -1;
37423  __pyx_L0:;
37424  __Pyx_TraceReturn(Py_None, 0);
37425  __Pyx_RefNannyFinishContext();
37426  return __pyx_r;
37427 }
37428 
37429 /* "(tree fragment)":1
37430  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
37431  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37432  * def __setstate_cython__(self, __pyx_state):
37433  */
37434 
37435 /* Python wrapper */
37436 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_117__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
37437 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_116__reduce_cython__[] = "ProtChBody.__reduce_cython__(self)";
37438 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_117__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_117__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_116__reduce_cython__};
37439 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_117__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
37440  PyObject *__pyx_r = 0;
37441  __Pyx_RefNannyDeclarations
37442  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
37443  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_116__reduce_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self));
37444 
37445  /* function exit code */
37446  __Pyx_RefNannyFinishContext();
37447  return __pyx_r;
37448 }
37449 
37450 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_116__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self) {
37451  PyObject *__pyx_r = NULL;
37452  __Pyx_TraceDeclarations
37453  __Pyx_RefNannyDeclarations
37454  PyObject *__pyx_t_1 = NULL;
37455  int __pyx_lineno = 0;
37456  const char *__pyx_filename = NULL;
37457  int __pyx_clineno = 0;
37458  __Pyx_TraceFrameInit(__pyx_codeobj__95)
37459  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
37460  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
37461 
37462  /* "(tree fragment)":2
37463  * def __reduce_cython__(self):
37464  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
37465  * def __setstate_cython__(self, __pyx_state):
37466  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37467  */
37468  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
37469  __Pyx_GOTREF(__pyx_t_1);
37470  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
37471  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37472  __PYX_ERR(1, 2, __pyx_L1_error)
37473 
37474  /* "(tree fragment)":1
37475  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
37476  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37477  * def __setstate_cython__(self, __pyx_state):
37478  */
37479 
37480  /* function exit code */
37481  __pyx_L1_error:;
37482  __Pyx_XDECREF(__pyx_t_1);
37483  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37484  __pyx_r = NULL;
37485  __Pyx_XGIVEREF(__pyx_r);
37486  __Pyx_TraceReturn(__pyx_r, 0);
37487  __Pyx_RefNannyFinishContext();
37488  return __pyx_r;
37489 }
37490 
37491 /* "(tree fragment)":3
37492  * def __reduce_cython__(self):
37493  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37494  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
37495  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37496  */
37497 
37498 /* Python wrapper */
37499 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_119__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
37500 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_118__setstate_cython__[] = "ProtChBody.__setstate_cython__(self, __pyx_state)";
37501 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_119__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_119__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_118__setstate_cython__};
37502 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_119__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
37503  PyObject *__pyx_r = 0;
37504  __Pyx_RefNannyDeclarations
37505  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
37506  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChBody_118__setstate_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
37507 
37508  /* function exit code */
37509  __Pyx_RefNannyFinishContext();
37510  return __pyx_r;
37511 }
37512 
37513 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChBody_118__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
37514  PyObject *__pyx_r = NULL;
37515  __Pyx_TraceDeclarations
37516  __Pyx_RefNannyDeclarations
37517  PyObject *__pyx_t_1 = NULL;
37518  int __pyx_lineno = 0;
37519  const char *__pyx_filename = NULL;
37520  int __pyx_clineno = 0;
37521  __Pyx_TraceFrameInit(__pyx_codeobj__97)
37522  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
37523  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
37524 
37525  /* "(tree fragment)":4
37526  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37527  * def __setstate_cython__(self, __pyx_state):
37528  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
37529  */
37530  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
37531  __Pyx_GOTREF(__pyx_t_1);
37532  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
37533  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37534  __PYX_ERR(1, 4, __pyx_L1_error)
37535 
37536  /* "(tree fragment)":3
37537  * def __reduce_cython__(self):
37538  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37539  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
37540  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
37541  */
37542 
37543  /* function exit code */
37544  __pyx_L1_error:;
37545  __Pyx_XDECREF(__pyx_t_1);
37546  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChBody.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37547  __pyx_r = NULL;
37548  __Pyx_XGIVEREF(__pyx_r);
37549  __Pyx_TraceReturn(__pyx_r, 0);
37550  __Pyx_RefNannyFinishContext();
37551  return __pyx_r;
37552 }
37553 
37554 /* "mbd/CouplingFSI.pyx":1420
37555  * cdef class ProtChSystem:
37556  *
37557  * def __cinit__(self, int nd=3, dt_init=0., sampleRate=0): # <<<<<<<<<<<<<<
37558  * self.thisptr = newSystem()
37559  * self.subcomponents = []
37560  */
37561 
37562 /* Python wrapper */
37563 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
37564 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
37565  int __pyx_v_nd;
37566  PyObject *__pyx_v_dt_init = 0;
37567  PyObject *__pyx_v_sampleRate = 0;
37568  int __pyx_lineno = 0;
37569  const char *__pyx_filename = NULL;
37570  int __pyx_clineno = 0;
37571  int __pyx_r;
37572  __Pyx_RefNannyDeclarations
37573  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
37574  {
37575  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nd,&__pyx_n_s_dt_init,&__pyx_n_s_sampleRate,0};
37576  PyObject* values[3] = {0,0,0};
37577  values[1] = ((PyObject *)__pyx_float_0_);
37578  values[2] = ((PyObject *)__pyx_int_0);
37579  if (unlikely(__pyx_kwds)) {
37580  Py_ssize_t kw_args;
37581  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
37582  switch (pos_args) {
37583  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37584  CYTHON_FALLTHROUGH;
37585  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37586  CYTHON_FALLTHROUGH;
37587  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37588  CYTHON_FALLTHROUGH;
37589  case 0: break;
37590  default: goto __pyx_L5_argtuple_error;
37591  }
37592  kw_args = PyDict_Size(__pyx_kwds);
37593  switch (pos_args) {
37594  case 0:
37595  if (kw_args > 0) {
37596  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nd);
37597  if (value) { values[0] = value; kw_args--; }
37598  }
37599  CYTHON_FALLTHROUGH;
37600  case 1:
37601  if (kw_args > 0) {
37602  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dt_init);
37603  if (value) { values[1] = value; kw_args--; }
37604  }
37605  CYTHON_FALLTHROUGH;
37606  case 2:
37607  if (kw_args > 0) {
37608  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sampleRate);
37609  if (value) { values[2] = value; kw_args--; }
37610  }
37611  }
37612  if (unlikely(kw_args > 0)) {
37613  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1420, __pyx_L3_error)
37614  }
37615  } else {
37616  switch (PyTuple_GET_SIZE(__pyx_args)) {
37617  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
37618  CYTHON_FALLTHROUGH;
37619  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
37620  CYTHON_FALLTHROUGH;
37621  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
37622  CYTHON_FALLTHROUGH;
37623  case 0: break;
37624  default: goto __pyx_L5_argtuple_error;
37625  }
37626  }
37627  if (values[0]) {
37628  __pyx_v_nd = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nd == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L3_error)
37629  } else {
37630  __pyx_v_nd = ((int)3);
37631  }
37632  __pyx_v_dt_init = values[1];
37633  __pyx_v_sampleRate = values[2];
37634  }
37635  goto __pyx_L4_argument_unpacking_done;
37636  __pyx_L5_argtuple_error:;
37637  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1420, __pyx_L3_error)
37638  __pyx_L3_error:;
37639  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
37640  __Pyx_RefNannyFinishContext();
37641  return -1;
37642  __pyx_L4_argument_unpacking_done:;
37643  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem___cinit__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_nd, __pyx_v_dt_init, __pyx_v_sampleRate);
37644 
37645  /* function exit code */
37646  __Pyx_RefNannyFinishContext();
37647  return __pyx_r;
37648 }
37649 
37650 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, int __pyx_v_nd, PyObject *__pyx_v_dt_init, PyObject *__pyx_v_sampleRate) {
37651  SwigPyObject *__pyx_v_swig_obj;
37652  std::shared_ptr<ChSystemSMC> *__pyx_v_pt_to_shp;
37653  int __pyx_r;
37654  __Pyx_TraceDeclarations
37655  __Pyx_RefNannyDeclarations
37656  PyObject *__pyx_t_1 = NULL;
37657  PyObject *__pyx_t_2 = NULL;
37658  PyObject *__pyx_t_3 = NULL;
37659  double __pyx_t_4;
37660  std::string __pyx_t_5;
37661  int __pyx_lineno = 0;
37662  const char *__pyx_filename = NULL;
37663  int __pyx_clineno = 0;
37664  __Pyx_RefNannySetupContext("__cinit__", 0);
37665  __Pyx_TraceCall("__cinit__", __pyx_f[0], 1420, 0, __PYX_ERR(0, 1420, __pyx_L1_error));
37666 
37667  /* "mbd/CouplingFSI.pyx":1421
37668  *
37669  * def __cinit__(self, int nd=3, dt_init=0., sampleRate=0):
37670  * self.thisptr = newSystem() # <<<<<<<<<<<<<<
37671  * self.subcomponents = []
37672  * # cannot call it self.ChSystem or self.ChSystemSMC (conflict in C++ - unknown reason)
37673  */
37674  __pyx_v_self->thisptr = newSystem();
37675 
37676  /* "mbd/CouplingFSI.pyx":1422
37677  * def __cinit__(self, int nd=3, dt_init=0., sampleRate=0):
37678  * self.thisptr = newSystem()
37679  * self.subcomponents = [] # <<<<<<<<<<<<<<
37680  * # cannot call it self.ChSystem or self.ChSystemSMC (conflict in C++ - unknown reason)
37681  * self.ChSystemSMC = chrono.ChSystemSMC()
37682  */
37683  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
37684  __Pyx_GOTREF(__pyx_t_1);
37685  __Pyx_GIVEREF(__pyx_t_1);
37686  __Pyx_GOTREF(__pyx_v_self->subcomponents);
37687  __Pyx_DECREF(__pyx_v_self->subcomponents);
37688  __pyx_v_self->subcomponents = __pyx_t_1;
37689  __pyx_t_1 = 0;
37690 
37691  /* "mbd/CouplingFSI.pyx":1424
37692  * self.subcomponents = []
37693  * # cannot call it self.ChSystem or self.ChSystemSMC (conflict in C++ - unknown reason)
37694  * self.ChSystemSMC = chrono.ChSystemSMC() # <<<<<<<<<<<<<<
37695  * self.ChSystem = self.ChSystemSMC
37696  * # self.ChSystemSMC.this.disown()
37697  */
37698  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chrono); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error)
37699  __Pyx_GOTREF(__pyx_t_2);
37700  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChSystemSMC); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1424, __pyx_L1_error)
37701  __Pyx_GOTREF(__pyx_t_3);
37702  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
37703  __pyx_t_2 = NULL;
37704  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
37705  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
37706  if (likely(__pyx_t_2)) {
37707  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
37708  __Pyx_INCREF(__pyx_t_2);
37709  __Pyx_INCREF(function);
37710  __Pyx_DECREF_SET(__pyx_t_3, function);
37711  }
37712  }
37713  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
37714  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
37715  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error)
37716  __Pyx_GOTREF(__pyx_t_1);
37717  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
37718  __Pyx_GIVEREF(__pyx_t_1);
37719  __Pyx_GOTREF(__pyx_v_self->ChSystemSMC);
37720  __Pyx_DECREF(__pyx_v_self->ChSystemSMC);
37721  __pyx_v_self->ChSystemSMC = __pyx_t_1;
37722  __pyx_t_1 = 0;
37723 
37724  /* "mbd/CouplingFSI.pyx":1425
37725  * # cannot call it self.ChSystem or self.ChSystemSMC (conflict in C++ - unknown reason)
37726  * self.ChSystemSMC = chrono.ChSystemSMC()
37727  * self.ChSystem = self.ChSystemSMC # <<<<<<<<<<<<<<
37728  * # self.ChSystemSMC.this.disown()
37729  * cdef SwigPyObject *swig_obj = <SwigPyObject*>self.ChSystemSMC.this
37730  */
37731  __pyx_t_1 = __pyx_v_self->ChSystemSMC;
37732  __Pyx_INCREF(__pyx_t_1);
37733  __Pyx_GIVEREF(__pyx_t_1);
37734  __Pyx_GOTREF(__pyx_v_self->ChSystem);
37735  __Pyx_DECREF(__pyx_v_self->ChSystem);
37736  __pyx_v_self->ChSystem = __pyx_t_1;
37737  __pyx_t_1 = 0;
37738 
37739  /* "mbd/CouplingFSI.pyx":1427
37740  * self.ChSystem = self.ChSystemSMC
37741  * # self.ChSystemSMC.this.disown()
37742  * cdef SwigPyObject *swig_obj = <SwigPyObject*>self.ChSystemSMC.this # <<<<<<<<<<<<<<
37743  * cdef shared_ptr[ch.ChSystemSMC]* pt_to_shp = <shared_ptr[ch.ChSystemSMC]*> swig_obj.ptr;
37744  * self.thisptr.systemSMC = pt_to_shp[0]
37745  */
37746  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystemSMC, __pyx_n_s_this); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error)
37747  __Pyx_GOTREF(__pyx_t_1);
37748  __pyx_v_swig_obj = ((SwigPyObject *)__pyx_t_1);
37749  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37750 
37751  /* "mbd/CouplingFSI.pyx":1428
37752  * # self.ChSystemSMC.this.disown()
37753  * cdef SwigPyObject *swig_obj = <SwigPyObject*>self.ChSystemSMC.this
37754  * cdef shared_ptr[ch.ChSystemSMC]* pt_to_shp = <shared_ptr[ch.ChSystemSMC]*> swig_obj.ptr; # <<<<<<<<<<<<<<
37755  * self.thisptr.systemSMC = pt_to_shp[0]
37756  * self.thisptr.system = <shared_ptr[ch.ChSystem]> pt_to_shp[0]
37757  */
37758  __pyx_v_pt_to_shp = ((std::shared_ptr<ChSystemSMC> *)__pyx_v_swig_obj->ptr);
37759 
37760  /* "mbd/CouplingFSI.pyx":1429
37761  * cdef SwigPyObject *swig_obj = <SwigPyObject*>self.ChSystemSMC.this
37762  * cdef shared_ptr[ch.ChSystemSMC]* pt_to_shp = <shared_ptr[ch.ChSystemSMC]*> swig_obj.ptr;
37763  * self.thisptr.systemSMC = pt_to_shp[0] # <<<<<<<<<<<<<<
37764  * self.thisptr.system = <shared_ptr[ch.ChSystem]> pt_to_shp[0]
37765  * self.dt_init = dt_init
37766  */
37767  __pyx_v_self->thisptr->systemSMC = (__pyx_v_pt_to_shp[0]);
37768 
37769  /* "mbd/CouplingFSI.pyx":1430
37770  * cdef shared_ptr[ch.ChSystemSMC]* pt_to_shp = <shared_ptr[ch.ChSystemSMC]*> swig_obj.ptr;
37771  * self.thisptr.systemSMC = pt_to_shp[0]
37772  * self.thisptr.system = <shared_ptr[ch.ChSystem]> pt_to_shp[0] # <<<<<<<<<<<<<<
37773  * self.dt_init = dt_init
37774  * self.model = None
37775  */
37776  __pyx_v_self->thisptr->system = ((std::shared_ptr<ChSystem> )(__pyx_v_pt_to_shp[0]));
37777 
37778  /* "mbd/CouplingFSI.pyx":1431
37779  * self.thisptr.systemSMC = pt_to_shp[0]
37780  * self.thisptr.system = <shared_ptr[ch.ChSystem]> pt_to_shp[0]
37781  * self.dt_init = dt_init # <<<<<<<<<<<<<<
37782  * self.model = None
37783  * self.nd = nd
37784  */
37785  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_dt_init); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1431, __pyx_L1_error)
37786  __pyx_v_self->dt_init = __pyx_t_4;
37787 
37788  /* "mbd/CouplingFSI.pyx":1432
37789  * self.thisptr.system = <shared_ptr[ch.ChSystem]> pt_to_shp[0]
37790  * self.dt_init = dt_init
37791  * self.model = None # <<<<<<<<<<<<<<
37792  * self.nd = nd
37793  * self.build_kdtree = True
37794  */
37795  __Pyx_INCREF(Py_None);
37796  __Pyx_GIVEREF(Py_None);
37797  __Pyx_GOTREF(__pyx_v_self->model);
37798  __Pyx_DECREF(__pyx_v_self->model);
37799  __pyx_v_self->model = Py_None;
37800 
37801  /* "mbd/CouplingFSI.pyx":1433
37802  * self.dt_init = dt_init
37803  * self.model = None
37804  * self.nd = nd # <<<<<<<<<<<<<<
37805  * self.build_kdtree = True
37806  * self.dist_search = True
37807  */
37808  __pyx_v_self->nd = __pyx_v_nd;
37809 
37810  /* "mbd/CouplingFSI.pyx":1434
37811  * self.model = None
37812  * self.nd = nd
37813  * self.build_kdtree = True # <<<<<<<<<<<<<<
37814  * self.dist_search = True
37815  * self.min_nb_steps = 1 # minimum number of chrono substeps
37816  */
37817  __pyx_v_self->build_kdtree = 1;
37818 
37819  /* "mbd/CouplingFSI.pyx":1435
37820  * self.nd = nd
37821  * self.build_kdtree = True
37822  * self.dist_search = True # <<<<<<<<<<<<<<
37823  * self.min_nb_steps = 1 # minimum number of chrono substeps
37824  * self.proteus_dt = 1.
37825  */
37826  __pyx_v_self->dist_search = 1;
37827 
37828  /* "mbd/CouplingFSI.pyx":1436
37829  * self.build_kdtree = True
37830  * self.dist_search = True
37831  * self.min_nb_steps = 1 # minimum number of chrono substeps # <<<<<<<<<<<<<<
37832  * self.proteus_dt = 1.
37833  * self.first_step = True # just to know if first step
37834  */
37835  __pyx_v_self->min_nb_steps = 1;
37836 
37837  /* "mbd/CouplingFSI.pyx":1437
37838  * self.dist_search = True
37839  * self.min_nb_steps = 1 # minimum number of chrono substeps
37840  * self.proteus_dt = 1. # <<<<<<<<<<<<<<
37841  * self.first_step = True # just to know if first step
37842  * self.setCouplingScheme(b"CSS")
37843  */
37844  __pyx_v_self->proteus_dt = 1.;
37845 
37846  /* "mbd/CouplingFSI.pyx":1438
37847  * self.min_nb_steps = 1 # minimum number of chrono substeps
37848  * self.proteus_dt = 1.
37849  * self.first_step = True # just to know if first step # <<<<<<<<<<<<<<
37850  * self.setCouplingScheme(b"CSS")
37851  * self.dt_fluid = 1.
37852  */
37853  __pyx_v_self->first_step = 1;
37854 
37855  /* "mbd/CouplingFSI.pyx":1439
37856  * self.proteus_dt = 1.
37857  * self.first_step = True # just to know if first step
37858  * self.setCouplingScheme(b"CSS") # <<<<<<<<<<<<<<
37859  * self.dt_fluid = 1.
37860  * self.dt_fluid_next = 1.
37861  */
37862  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setCouplingScheme); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1439, __pyx_L1_error)
37863  __Pyx_GOTREF(__pyx_t_3);
37864  __pyx_t_2 = NULL;
37865  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
37866  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
37867  if (likely(__pyx_t_2)) {
37868  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
37869  __Pyx_INCREF(__pyx_t_2);
37870  __Pyx_INCREF(function);
37871  __Pyx_DECREF_SET(__pyx_t_3, function);
37872  }
37873  }
37874  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_b_CSS) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_b_CSS);
37875  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
37876  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
37877  __Pyx_GOTREF(__pyx_t_1);
37878  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
37879  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37880 
37881  /* "mbd/CouplingFSI.pyx":1440
37882  * self.first_step = True # just to know if first step
37883  * self.setCouplingScheme(b"CSS")
37884  * self.dt_fluid = 1. # <<<<<<<<<<<<<<
37885  * self.dt_fluid_next = 1.
37886  * self.proteus_dt_next = 1.
37887  */
37888  __pyx_v_self->dt_fluid = 1.;
37889 
37890  /* "mbd/CouplingFSI.pyx":1441
37891  * self.setCouplingScheme(b"CSS")
37892  * self.dt_fluid = 1.
37893  * self.dt_fluid_next = 1. # <<<<<<<<<<<<<<
37894  * self.proteus_dt_next = 1.
37895  * self.dt = 0.
37896  */
37897  __pyx_v_self->dt_fluid_next = 1.;
37898 
37899  /* "mbd/CouplingFSI.pyx":1442
37900  * self.dt_fluid = 1.
37901  * self.dt_fluid_next = 1.
37902  * self.proteus_dt_next = 1. # <<<<<<<<<<<<<<
37903  * self.dt = 0.
37904  * self.step_nb = 0
37905  */
37906  __pyx_v_self->proteus_dt_next = 1.;
37907 
37908  /* "mbd/CouplingFSI.pyx":1443
37909  * self.dt_fluid_next = 1.
37910  * self.proteus_dt_next = 1.
37911  * self.dt = 0. # <<<<<<<<<<<<<<
37912  * self.step_nb = 0
37913  * self.step_start = 0
37914  */
37915  __pyx_v_self->dt = 0.;
37916 
37917  /* "mbd/CouplingFSI.pyx":1444
37918  * self.proteus_dt_next = 1.
37919  * self.dt = 0.
37920  * self.step_nb = 0 # <<<<<<<<<<<<<<
37921  * self.step_start = 0
37922  * self.sampleRate = sampleRate
37923  */
37924  __pyx_v_self->step_nb = 0;
37925 
37926  /* "mbd/CouplingFSI.pyx":1445
37927  * self.dt = 0.
37928  * self.step_nb = 0
37929  * self.step_start = 0 # <<<<<<<<<<<<<<
37930  * self.sampleRate = sampleRate
37931  * self.next_sample = 0.
37932  */
37933  __pyx_v_self->step_start = 0;
37934 
37935  /* "mbd/CouplingFSI.pyx":1446
37936  * self.step_nb = 0
37937  * self.step_start = 0
37938  * self.sampleRate = sampleRate # <<<<<<<<<<<<<<
37939  * self.next_sample = 0.
37940  * self.record_values = True
37941  */
37942  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_v_sampleRate); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1446, __pyx_L1_error)
37943  __pyx_v_self->sampleRate = __pyx_t_4;
37944 
37945  /* "mbd/CouplingFSI.pyx":1447
37946  * self.step_start = 0
37947  * self.sampleRate = sampleRate
37948  * self.next_sample = 0. # <<<<<<<<<<<<<<
37949  * self.record_values = True
37950  * self.t = 0.
37951  */
37952  __pyx_v_self->next_sample = 0.;
37953 
37954  /* "mbd/CouplingFSI.pyx":1448
37955  * self.sampleRate = sampleRate
37956  * self.next_sample = 0.
37957  * self.record_values = True # <<<<<<<<<<<<<<
37958  * self.t = 0.
37959  * self.chrono_dt = 1.
37960  */
37961  __pyx_v_self->record_values = 1;
37962 
37963  /* "mbd/CouplingFSI.pyx":1449
37964  * self.next_sample = 0.
37965  * self.record_values = True
37966  * self.t = 0. # <<<<<<<<<<<<<<
37967  * self.chrono_dt = 1.
37968  * self.ProtChAddedMass = ProtChAddedMass(self)
37969  */
37970  __pyx_v_self->t = 0.;
37971 
37972  /* "mbd/CouplingFSI.pyx":1450
37973  * self.record_values = True
37974  * self.t = 0.
37975  * self.chrono_dt = 1. # <<<<<<<<<<<<<<
37976  * self.ProtChAddedMass = ProtChAddedMass(self)
37977  * self.tCount = 0
37978  */
37979  __pyx_v_self->chrono_dt = 1.;
37980 
37981  /* "mbd/CouplingFSI.pyx":1451
37982  * self.t = 0.
37983  * self.chrono_dt = 1.
37984  * self.ProtChAddedMass = ProtChAddedMass(self) # <<<<<<<<<<<<<<
37985  * self.tCount = 0
37986  * self.initialized = False
37987  */
37988  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass), ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
37989  __Pyx_GOTREF(__pyx_t_1);
37990  __Pyx_GIVEREF(__pyx_t_1);
37991  __Pyx_GOTREF(__pyx_v_self->ProtChAddedMass);
37992  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChAddedMass));
37993  __pyx_v_self->ProtChAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_t_1);
37994  __pyx_t_1 = 0;
37995 
37996  /* "mbd/CouplingFSI.pyx":1452
37997  * self.chrono_dt = 1.
37998  * self.ProtChAddedMass = ProtChAddedMass(self)
37999  * self.tCount = 0 # <<<<<<<<<<<<<<
38000  * self.initialized = False
38001  * self.update_substeps = False
38002  */
38003  __pyx_v_self->tCount = 0;
38004 
38005  /* "mbd/CouplingFSI.pyx":1453
38006  * self.ProtChAddedMass = ProtChAddedMass(self)
38007  * self.tCount = 0
38008  * self.initialized = False # <<<<<<<<<<<<<<
38009  * self.update_substeps = False
38010  *
38011  */
38012  __pyx_v_self->initialized = 0;
38013 
38014  /* "mbd/CouplingFSI.pyx":1454
38015  * self.tCount = 0
38016  * self.initialized = False
38017  * self.update_substeps = False # <<<<<<<<<<<<<<
38018  *
38019  * # Set the chrono logging values
38020  */
38021  __pyx_v_self->update_substeps = 0;
38022 
38023  /* "mbd/CouplingFSI.pyx":1457
38024  *
38025  * # Set the chrono logging values
38026  * self.log_chrono_format = 'h5' # <<<<<<<<<<<<<<
38027  * self.log_chrono_bodies = None
38028  * self.log_chrono_springs = None
38029  */
38030  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_h5_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error)
38031  __pyx_v_self->log_chrono_format = __pyx_t_5;
38032 
38033  /* "mbd/CouplingFSI.pyx":1458
38034  * # Set the chrono logging values
38035  * self.log_chrono_format = 'h5'
38036  * self.log_chrono_bodies = None # <<<<<<<<<<<<<<
38037  * self.log_chrono_springs = None
38038  * self.log_chrono_residuals = None
38039  */
38040  __Pyx_INCREF(Py_None);
38041  __Pyx_GIVEREF(Py_None);
38042  __Pyx_GOTREF(__pyx_v_self->log_chrono_bodies);
38043  __Pyx_DECREF(__pyx_v_self->log_chrono_bodies);
38044  __pyx_v_self->log_chrono_bodies = Py_None;
38045 
38046  /* "mbd/CouplingFSI.pyx":1459
38047  * self.log_chrono_format = 'h5'
38048  * self.log_chrono_bodies = None
38049  * self.log_chrono_springs = None # <<<<<<<<<<<<<<
38050  * self.log_chrono_residuals = None
38051  *
38052  */
38053  __Pyx_INCREF(Py_None);
38054  __Pyx_GIVEREF(Py_None);
38055  __Pyx_GOTREF(__pyx_v_self->log_chrono_springs);
38056  __Pyx_DECREF(__pyx_v_self->log_chrono_springs);
38057  __pyx_v_self->log_chrono_springs = Py_None;
38058 
38059  /* "mbd/CouplingFSI.pyx":1460
38060  * self.log_chrono_bodies = None
38061  * self.log_chrono_springs = None
38062  * self.log_chrono_residuals = None # <<<<<<<<<<<<<<
38063  *
38064  * def getChronoObject(self):
38065  */
38066  __Pyx_INCREF(Py_None);
38067  __Pyx_GIVEREF(Py_None);
38068  __Pyx_GOTREF(__pyx_v_self->log_chrono_residuals);
38069  __Pyx_DECREF(__pyx_v_self->log_chrono_residuals);
38070  __pyx_v_self->log_chrono_residuals = Py_None;
38071 
38072  /* "mbd/CouplingFSI.pyx":1420
38073  * cdef class ProtChSystem:
38074  *
38075  * def __cinit__(self, int nd=3, dt_init=0., sampleRate=0): # <<<<<<<<<<<<<<
38076  * self.thisptr = newSystem()
38077  * self.subcomponents = []
38078  */
38079 
38080  /* function exit code */
38081  __pyx_r = 0;
38082  goto __pyx_L0;
38083  __pyx_L1_error:;
38084  __Pyx_XDECREF(__pyx_t_1);
38085  __Pyx_XDECREF(__pyx_t_2);
38086  __Pyx_XDECREF(__pyx_t_3);
38087  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
38088  __pyx_r = -1;
38089  __pyx_L0:;
38090  __Pyx_TraceReturn(Py_None, 0);
38091  __Pyx_RefNannyFinishContext();
38092  return __pyx_r;
38093 }
38094 
38095 /* "mbd/CouplingFSI.pyx":1462
38096  * self.log_chrono_residuals = None
38097  *
38098  * def getChronoObject(self): # <<<<<<<<<<<<<<
38099  * return self.ChSystem
38100  *
38101  */
38102 
38103 /* Python wrapper */
38104 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_3getChronoObject(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
38105 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_2getChronoObject[] = "ProtChSystem.getChronoObject(self)";
38106 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_3getChronoObject = {"getChronoObject", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_3getChronoObject, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_2getChronoObject};
38107 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_3getChronoObject(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
38108  PyObject *__pyx_r = 0;
38109  __Pyx_RefNannyDeclarations
38110  __Pyx_RefNannySetupContext("getChronoObject (wrapper)", 0);
38111  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_2getChronoObject(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
38112 
38113  /* function exit code */
38114  __Pyx_RefNannyFinishContext();
38115  return __pyx_r;
38116 }
38117 
38118 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_2getChronoObject(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
38119  PyObject *__pyx_r = NULL;
38120  __Pyx_TraceDeclarations
38121  __Pyx_RefNannyDeclarations
38122  int __pyx_lineno = 0;
38123  const char *__pyx_filename = NULL;
38124  int __pyx_clineno = 0;
38125  __Pyx_TraceFrameInit(__pyx_codeobj__99)
38126  __Pyx_RefNannySetupContext("getChronoObject", 0);
38127  __Pyx_TraceCall("getChronoObject", __pyx_f[0], 1462, 0, __PYX_ERR(0, 1462, __pyx_L1_error));
38128 
38129  /* "mbd/CouplingFSI.pyx":1463
38130  *
38131  * def getChronoObject(self):
38132  * return self.ChSystem # <<<<<<<<<<<<<<
38133  *
38134  * def setTimeStep(self, double dt):
38135  */
38136  __Pyx_XDECREF(__pyx_r);
38137  __Pyx_INCREF(__pyx_v_self->ChSystem);
38138  __pyx_r = __pyx_v_self->ChSystem;
38139  goto __pyx_L0;
38140 
38141  /* "mbd/CouplingFSI.pyx":1462
38142  * self.log_chrono_residuals = None
38143  *
38144  * def getChronoObject(self): # <<<<<<<<<<<<<<
38145  * return self.ChSystem
38146  *
38147  */
38148 
38149  /* function exit code */
38150  __pyx_L1_error:;
38151  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.getChronoObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
38152  __pyx_r = NULL;
38153  __pyx_L0:;
38154  __Pyx_XGIVEREF(__pyx_r);
38155  __Pyx_TraceReturn(__pyx_r, 0);
38156  __Pyx_RefNannyFinishContext();
38157  return __pyx_r;
38158 }
38159 
38160 /* "mbd/CouplingFSI.pyx":1465
38161  * return self.ChSystem
38162  *
38163  * def setTimeStep(self, double dt): # <<<<<<<<<<<<<<
38164  * """Sets time step for Chrono solver.
38165  * Calculations in Chrono will use this time step within the
38166  */
38167 
38168 /* Python wrapper */
38169 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5setTimeStep(PyObject *__pyx_v_self, PyObject *__pyx_arg_dt); /*proto*/
38170 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_4setTimeStep[] = "ProtChSystem.setTimeStep(self, double dt)\nSets time step for Chrono solver.\n Calculations in Chrono will use this time step within the\n Proteus time step (if bigger)\n Parameters\n ----------\n dt: float\n Chrono time step size\n ";
38171 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_5setTimeStep = {"setTimeStep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5setTimeStep, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_4setTimeStep};
38172 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5setTimeStep(PyObject *__pyx_v_self, PyObject *__pyx_arg_dt) {
38173  double __pyx_v_dt;
38174  int __pyx_lineno = 0;
38175  const char *__pyx_filename = NULL;
38176  int __pyx_clineno = 0;
38177  PyObject *__pyx_r = 0;
38178  __Pyx_RefNannyDeclarations
38179  __Pyx_RefNannySetupContext("setTimeStep (wrapper)", 0);
38180  assert(__pyx_arg_dt); {
38181  __pyx_v_dt = __pyx_PyFloat_AsDouble(__pyx_arg_dt); if (unlikely((__pyx_v_dt == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1465, __pyx_L3_error)
38182  }
38183  goto __pyx_L4_argument_unpacking_done;
38184  __pyx_L3_error:;
38185  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setTimeStep", __pyx_clineno, __pyx_lineno, __pyx_filename);
38186  __Pyx_RefNannyFinishContext();
38187  return NULL;
38188  __pyx_L4_argument_unpacking_done:;
38189  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_4setTimeStep(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((double)__pyx_v_dt));
38190 
38191  /* function exit code */
38192  __Pyx_RefNannyFinishContext();
38193  return __pyx_r;
38194 }
38195 
38196 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_4setTimeStep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, double __pyx_v_dt) {
38197  PyObject *__pyx_r = NULL;
38198  __Pyx_TraceDeclarations
38199  __Pyx_RefNannyDeclarations
38200  int __pyx_lineno = 0;
38201  const char *__pyx_filename = NULL;
38202  int __pyx_clineno = 0;
38203  __Pyx_TraceFrameInit(__pyx_codeobj__100)
38204  __Pyx_RefNannySetupContext("setTimeStep", 0);
38205  __Pyx_TraceCall("setTimeStep", __pyx_f[0], 1465, 0, __PYX_ERR(0, 1465, __pyx_L1_error));
38206 
38207  /* "mbd/CouplingFSI.pyx":1474
38208  * Chrono time step size
38209  * """
38210  * self.chrono_dt = dt # <<<<<<<<<<<<<<
38211  * self.thisptr.chrono_dt = dt
38212  *
38213  */
38214  __pyx_v_self->chrono_dt = __pyx_v_dt;
38215 
38216  /* "mbd/CouplingFSI.pyx":1475
38217  * """
38218  * self.chrono_dt = dt
38219  * self.thisptr.chrono_dt = dt # <<<<<<<<<<<<<<
38220  *
38221  * def setSampleRate(self, sampleRate):
38222  */
38223  __pyx_v_self->thisptr->chrono_dt = __pyx_v_dt;
38224 
38225  /* "mbd/CouplingFSI.pyx":1465
38226  * return self.ChSystem
38227  *
38228  * def setTimeStep(self, double dt): # <<<<<<<<<<<<<<
38229  * """Sets time step for Chrono solver.
38230  * Calculations in Chrono will use this time step within the
38231  */
38232 
38233  /* function exit code */
38234  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38235  goto __pyx_L0;
38236  __pyx_L1_error:;
38237  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setTimeStep", __pyx_clineno, __pyx_lineno, __pyx_filename);
38238  __pyx_r = NULL;
38239  __pyx_L0:;
38240  __Pyx_XGIVEREF(__pyx_r);
38241  __Pyx_TraceReturn(__pyx_r, 0);
38242  __Pyx_RefNannyFinishContext();
38243  return __pyx_r;
38244 }
38245 
38246 /* "mbd/CouplingFSI.pyx":1477
38247  * self.thisptr.chrono_dt = dt
38248  *
38249  * def setSampleRate(self, sampleRate): # <<<<<<<<<<<<<<
38250  * self.sampleRate = sampleRate
38251  *
38252  */
38253 
38254 /* Python wrapper */
38255 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7setSampleRate(PyObject *__pyx_v_self, PyObject *__pyx_v_sampleRate); /*proto*/
38256 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_6setSampleRate[] = "ProtChSystem.setSampleRate(self, sampleRate)";
38257 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_7setSampleRate = {"setSampleRate", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7setSampleRate, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_6setSampleRate};
38258 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7setSampleRate(PyObject *__pyx_v_self, PyObject *__pyx_v_sampleRate) {
38259  PyObject *__pyx_r = 0;
38260  __Pyx_RefNannyDeclarations
38261  __Pyx_RefNannySetupContext("setSampleRate (wrapper)", 0);
38262  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6setSampleRate(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_sampleRate));
38263 
38264  /* function exit code */
38265  __Pyx_RefNannyFinishContext();
38266  return __pyx_r;
38267 }
38268 
38269 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6setSampleRate(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_sampleRate) {
38270  PyObject *__pyx_r = NULL;
38271  __Pyx_TraceDeclarations
38272  __Pyx_RefNannyDeclarations
38273  double __pyx_t_1;
38274  int __pyx_lineno = 0;
38275  const char *__pyx_filename = NULL;
38276  int __pyx_clineno = 0;
38277  __Pyx_TraceFrameInit(__pyx_codeobj__101)
38278  __Pyx_RefNannySetupContext("setSampleRate", 0);
38279  __Pyx_TraceCall("setSampleRate", __pyx_f[0], 1477, 0, __PYX_ERR(0, 1477, __pyx_L1_error));
38280 
38281  /* "mbd/CouplingFSI.pyx":1478
38282  *
38283  * def setSampleRate(self, sampleRate):
38284  * self.sampleRate = sampleRate # <<<<<<<<<<<<<<
38285  *
38286  * def addProtChBody(self, ProtChBody body):
38287  */
38288  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_sampleRate); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error)
38289  __pyx_v_self->sampleRate = __pyx_t_1;
38290 
38291  /* "mbd/CouplingFSI.pyx":1477
38292  * self.thisptr.chrono_dt = dt
38293  *
38294  * def setSampleRate(self, sampleRate): # <<<<<<<<<<<<<<
38295  * self.sampleRate = sampleRate
38296  *
38297  */
38298 
38299  /* function exit code */
38300  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38301  goto __pyx_L0;
38302  __pyx_L1_error:;
38303  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setSampleRate", __pyx_clineno, __pyx_lineno, __pyx_filename);
38304  __pyx_r = NULL;
38305  __pyx_L0:;
38306  __Pyx_XGIVEREF(__pyx_r);
38307  __Pyx_TraceReturn(__pyx_r, 0);
38308  __Pyx_RefNannyFinishContext();
38309  return __pyx_r;
38310 }
38311 
38312 /* "mbd/CouplingFSI.pyx":1480
38313  * self.sampleRate = sampleRate
38314  *
38315  * def addProtChBody(self, ProtChBody body): # <<<<<<<<<<<<<<
38316  * # self.ChSystemSMC.Add(body.ChBody)
38317  * self.ChSystem.Add(body.ChBody)
38318  */
38319 
38320 /* Python wrapper */
38321 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9addProtChBody(PyObject *__pyx_v_self, PyObject *__pyx_v_body); /*proto*/
38322 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_8addProtChBody[] = "ProtChSystem.addProtChBody(self, ProtChBody body)";
38323 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_9addProtChBody = {"addProtChBody", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9addProtChBody, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_8addProtChBody};
38324 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9addProtChBody(PyObject *__pyx_v_self, PyObject *__pyx_v_body) {
38325  int __pyx_lineno = 0;
38326  const char *__pyx_filename = NULL;
38327  int __pyx_clineno = 0;
38328  PyObject *__pyx_r = 0;
38329  __Pyx_RefNannyDeclarations
38330  __Pyx_RefNannySetupContext("addProtChBody (wrapper)", 0);
38331  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body), __pyx_ptype_3mbd_11CouplingFSI_ProtChBody, 1, "body", 0))) __PYX_ERR(0, 1480, __pyx_L1_error)
38332  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8addProtChBody(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_body));
38333 
38334  /* function exit code */
38335  goto __pyx_L0;
38336  __pyx_L1_error:;
38337  __pyx_r = NULL;
38338  __pyx_L0:;
38339  __Pyx_RefNannyFinishContext();
38340  return __pyx_r;
38341 }
38342 
38343 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8addProtChBody(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_body) {
38344  PyObject *__pyx_r = NULL;
38345  __Pyx_TraceDeclarations
38346  __Pyx_RefNannyDeclarations
38347  PyObject *__pyx_t_1 = NULL;
38348  PyObject *__pyx_t_2 = NULL;
38349  PyObject *__pyx_t_3 = NULL;
38350  int __pyx_lineno = 0;
38351  const char *__pyx_filename = NULL;
38352  int __pyx_clineno = 0;
38353  __Pyx_TraceFrameInit(__pyx_codeobj__102)
38354  __Pyx_RefNannySetupContext("addProtChBody", 0);
38355  __Pyx_TraceCall("addProtChBody", __pyx_f[0], 1480, 0, __PYX_ERR(0, 1480, __pyx_L1_error));
38356 
38357  /* "mbd/CouplingFSI.pyx":1482
38358  * def addProtChBody(self, ProtChBody body):
38359  * # self.ChSystemSMC.Add(body.ChBody)
38360  * self.ChSystem.Add(body.ChBody) # <<<<<<<<<<<<<<
38361  * body.ProtChSystem = self
38362  * self.addSubcomponent(body) # add body to system (for pre and post steps)
38363  */
38364  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystem, __pyx_n_s_Add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1482, __pyx_L1_error)
38365  __Pyx_GOTREF(__pyx_t_2);
38366  __pyx_t_3 = NULL;
38367  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
38368  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
38369  if (likely(__pyx_t_3)) {
38370  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
38371  __Pyx_INCREF(__pyx_t_3);
38372  __Pyx_INCREF(function);
38373  __Pyx_DECREF_SET(__pyx_t_2, function);
38374  }
38375  }
38376  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_body->ChBody) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_body->ChBody);
38377  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
38378  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L1_error)
38379  __Pyx_GOTREF(__pyx_t_1);
38380  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38381  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
38382 
38383  /* "mbd/CouplingFSI.pyx":1483
38384  * # self.ChSystemSMC.Add(body.ChBody)
38385  * self.ChSystem.Add(body.ChBody)
38386  * body.ProtChSystem = self # <<<<<<<<<<<<<<
38387  * self.addSubcomponent(body) # add body to system (for pre and post steps)
38388  *
38389  */
38390  __Pyx_INCREF(((PyObject *)__pyx_v_self));
38391  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
38392  __Pyx_GOTREF(__pyx_v_body->ProtChSystem);
38393  __Pyx_DECREF(((PyObject *)__pyx_v_body->ProtChSystem));
38394  __pyx_v_body->ProtChSystem = __pyx_v_self;
38395 
38396  /* "mbd/CouplingFSI.pyx":1484
38397  * self.ChSystem.Add(body.ChBody)
38398  * body.ProtChSystem = self
38399  * self.addSubcomponent(body) # add body to system (for pre and post steps) # <<<<<<<<<<<<<<
38400  *
38401  * def addProtChMesh(self, ProtChMesh mesh):
38402  */
38403  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_addSubcomponent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1484, __pyx_L1_error)
38404  __Pyx_GOTREF(__pyx_t_2);
38405  __pyx_t_3 = NULL;
38406  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
38407  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
38408  if (likely(__pyx_t_3)) {
38409  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
38410  __Pyx_INCREF(__pyx_t_3);
38411  __Pyx_INCREF(function);
38412  __Pyx_DECREF_SET(__pyx_t_2, function);
38413  }
38414  }
38415  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_body)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_body));
38416  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
38417  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error)
38418  __Pyx_GOTREF(__pyx_t_1);
38419  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38420  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
38421 
38422  /* "mbd/CouplingFSI.pyx":1480
38423  * self.sampleRate = sampleRate
38424  *
38425  * def addProtChBody(self, ProtChBody body): # <<<<<<<<<<<<<<
38426  * # self.ChSystemSMC.Add(body.ChBody)
38427  * self.ChSystem.Add(body.ChBody)
38428  */
38429 
38430  /* function exit code */
38431  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38432  goto __pyx_L0;
38433  __pyx_L1_error:;
38434  __Pyx_XDECREF(__pyx_t_1);
38435  __Pyx_XDECREF(__pyx_t_2);
38436  __Pyx_XDECREF(__pyx_t_3);
38437  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.addProtChBody", __pyx_clineno, __pyx_lineno, __pyx_filename);
38438  __pyx_r = NULL;
38439  __pyx_L0:;
38440  __Pyx_XGIVEREF(__pyx_r);
38441  __Pyx_TraceReturn(__pyx_r, 0);
38442  __Pyx_RefNannyFinishContext();
38443  return __pyx_r;
38444 }
38445 
38446 /* "mbd/CouplingFSI.pyx":1486
38447  * self.addSubcomponent(body) # add body to system (for pre and post steps)
38448  *
38449  * def addProtChMesh(self, ProtChMesh mesh): # <<<<<<<<<<<<<<
38450  * self.thisptr.addMesh(mesh.mesh)
38451  * mesh.ProtChSystem = self
38452  */
38453 
38454 /* Python wrapper */
38455 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11addProtChMesh(PyObject *__pyx_v_self, PyObject *__pyx_v_mesh); /*proto*/
38456 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_10addProtChMesh[] = "ProtChSystem.addProtChMesh(self, ProtChMesh mesh)";
38457 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_11addProtChMesh = {"addProtChMesh", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11addProtChMesh, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_10addProtChMesh};
38458 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11addProtChMesh(PyObject *__pyx_v_self, PyObject *__pyx_v_mesh) {
38459  int __pyx_lineno = 0;
38460  const char *__pyx_filename = NULL;
38461  int __pyx_clineno = 0;
38462  PyObject *__pyx_r = 0;
38463  __Pyx_RefNannyDeclarations
38464  __Pyx_RefNannySetupContext("addProtChMesh (wrapper)", 0);
38465  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh), __pyx_ptype_3mbd_11CouplingFSI_ProtChMesh, 1, "mesh", 0))) __PYX_ERR(0, 1486, __pyx_L1_error)
38466  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10addProtChMesh(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_mesh));
38467 
38468  /* function exit code */
38469  goto __pyx_L0;
38470  __pyx_L1_error:;
38471  __pyx_r = NULL;
38472  __pyx_L0:;
38473  __Pyx_RefNannyFinishContext();
38474  return __pyx_r;
38475 }
38476 
38477 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10addProtChMesh(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_mesh) {
38478  PyObject *__pyx_r = NULL;
38479  __Pyx_TraceDeclarations
38480  __Pyx_RefNannyDeclarations
38481  int __pyx_lineno = 0;
38482  const char *__pyx_filename = NULL;
38483  int __pyx_clineno = 0;
38484  __Pyx_TraceFrameInit(__pyx_codeobj__103)
38485  __Pyx_RefNannySetupContext("addProtChMesh", 0);
38486  __Pyx_TraceCall("addProtChMesh", __pyx_f[0], 1486, 0, __PYX_ERR(0, 1486, __pyx_L1_error));
38487 
38488  /* "mbd/CouplingFSI.pyx":1487
38489  *
38490  * def addProtChMesh(self, ProtChMesh mesh):
38491  * self.thisptr.addMesh(mesh.mesh) # <<<<<<<<<<<<<<
38492  * mesh.ProtChSystem = self
38493  *
38494  */
38495  __pyx_v_self->thisptr->addMesh(__pyx_v_mesh->mesh);
38496 
38497  /* "mbd/CouplingFSI.pyx":1488
38498  * def addProtChMesh(self, ProtChMesh mesh):
38499  * self.thisptr.addMesh(mesh.mesh)
38500  * mesh.ProtChSystem = self # <<<<<<<<<<<<<<
38501  *
38502  * def setGravitationalAcceleration(self, g):
38503  */
38504  __Pyx_INCREF(((PyObject *)__pyx_v_self));
38505  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
38506  __Pyx_GOTREF(__pyx_v_mesh->ProtChSystem);
38507  __Pyx_DECREF(((PyObject *)__pyx_v_mesh->ProtChSystem));
38508  __pyx_v_mesh->ProtChSystem = __pyx_v_self;
38509 
38510  /* "mbd/CouplingFSI.pyx":1486
38511  * self.addSubcomponent(body) # add body to system (for pre and post steps)
38512  *
38513  * def addProtChMesh(self, ProtChMesh mesh): # <<<<<<<<<<<<<<
38514  * self.thisptr.addMesh(mesh.mesh)
38515  * mesh.ProtChSystem = self
38516  */
38517 
38518  /* function exit code */
38519  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38520  goto __pyx_L0;
38521  __pyx_L1_error:;
38522  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.addProtChMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
38523  __pyx_r = NULL;
38524  __pyx_L0:;
38525  __Pyx_XGIVEREF(__pyx_r);
38526  __Pyx_TraceReturn(__pyx_r, 0);
38527  __Pyx_RefNannyFinishContext();
38528  return __pyx_r;
38529 }
38530 
38531 /* "mbd/CouplingFSI.pyx":1490
38532  * mesh.ProtChSystem = self
38533  *
38534  * def setGravitationalAcceleration(self, g): # <<<<<<<<<<<<<<
38535  * chvec = chrono.ChVectorD(g[0], g[1], g[2])
38536  * self.ChSystem.Set_G_acc(chvec)
38537  */
38538 
38539 /* Python wrapper */
38540 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13setGravitationalAcceleration(PyObject *__pyx_v_self, PyObject *__pyx_v_g); /*proto*/
38541 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_12setGravitationalAcceleration[] = "ProtChSystem.setGravitationalAcceleration(self, g)";
38542 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_13setGravitationalAcceleration = {"setGravitationalAcceleration", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13setGravitationalAcceleration, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_12setGravitationalAcceleration};
38543 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13setGravitationalAcceleration(PyObject *__pyx_v_self, PyObject *__pyx_v_g) {
38544  PyObject *__pyx_r = 0;
38545  __Pyx_RefNannyDeclarations
38546  __Pyx_RefNannySetupContext("setGravitationalAcceleration (wrapper)", 0);
38547  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12setGravitationalAcceleration(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_g));
38548 
38549  /* function exit code */
38550  __Pyx_RefNannyFinishContext();
38551  return __pyx_r;
38552 }
38553 
38554 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12setGravitationalAcceleration(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_g) {
38555  PyObject *__pyx_v_chvec = NULL;
38556  PyObject *__pyx_r = NULL;
38557  __Pyx_TraceDeclarations
38558  __Pyx_RefNannyDeclarations
38559  PyObject *__pyx_t_1 = NULL;
38560  PyObject *__pyx_t_2 = NULL;
38561  PyObject *__pyx_t_3 = NULL;
38562  PyObject *__pyx_t_4 = NULL;
38563  PyObject *__pyx_t_5 = NULL;
38564  PyObject *__pyx_t_6 = NULL;
38565  int __pyx_t_7;
38566  PyObject *__pyx_t_8 = NULL;
38567  int __pyx_lineno = 0;
38568  const char *__pyx_filename = NULL;
38569  int __pyx_clineno = 0;
38570  __Pyx_TraceFrameInit(__pyx_codeobj__104)
38571  __Pyx_RefNannySetupContext("setGravitationalAcceleration", 0);
38572  __Pyx_TraceCall("setGravitationalAcceleration", __pyx_f[0], 1490, 0, __PYX_ERR(0, 1490, __pyx_L1_error));
38573 
38574  /* "mbd/CouplingFSI.pyx":1491
38575  *
38576  * def setGravitationalAcceleration(self, g):
38577  * chvec = chrono.ChVectorD(g[0], g[1], g[2]) # <<<<<<<<<<<<<<
38578  * self.ChSystem.Set_G_acc(chvec)
38579  *
38580  */
38581  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chrono); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1491, __pyx_L1_error)
38582  __Pyx_GOTREF(__pyx_t_2);
38583  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChVectorD); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __pyx_L1_error)
38584  __Pyx_GOTREF(__pyx_t_3);
38585  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38586  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_g, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1491, __pyx_L1_error)
38587  __Pyx_GOTREF(__pyx_t_2);
38588  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_g, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1491, __pyx_L1_error)
38589  __Pyx_GOTREF(__pyx_t_4);
38590  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_g, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1491, __pyx_L1_error)
38591  __Pyx_GOTREF(__pyx_t_5);
38592  __pyx_t_6 = NULL;
38593  __pyx_t_7 = 0;
38594  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
38595  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
38596  if (likely(__pyx_t_6)) {
38597  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
38598  __Pyx_INCREF(__pyx_t_6);
38599  __Pyx_INCREF(function);
38600  __Pyx_DECREF_SET(__pyx_t_3, function);
38601  __pyx_t_7 = 1;
38602  }
38603  }
38604  #if CYTHON_FAST_PYCALL
38605  if (PyFunction_Check(__pyx_t_3)) {
38606  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
38607  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error)
38608  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
38609  __Pyx_GOTREF(__pyx_t_1);
38610  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38611  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
38612  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
38613  } else
38614  #endif
38615  #if CYTHON_FAST_PYCCALL
38616  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
38617  PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
38618  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error)
38619  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
38620  __Pyx_GOTREF(__pyx_t_1);
38621  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38622  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
38623  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
38624  } else
38625  #endif
38626  {
38627  __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1491, __pyx_L1_error)
38628  __Pyx_GOTREF(__pyx_t_8);
38629  if (__pyx_t_6) {
38630  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
38631  }
38632  __Pyx_GIVEREF(__pyx_t_2);
38633  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_2);
38634  __Pyx_GIVEREF(__pyx_t_4);
38635  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
38636  __Pyx_GIVEREF(__pyx_t_5);
38637  PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
38638  __pyx_t_2 = 0;
38639  __pyx_t_4 = 0;
38640  __pyx_t_5 = 0;
38641  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L1_error)
38642  __Pyx_GOTREF(__pyx_t_1);
38643  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
38644  }
38645  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
38646  __pyx_v_chvec = __pyx_t_1;
38647  __pyx_t_1 = 0;
38648 
38649  /* "mbd/CouplingFSI.pyx":1492
38650  * def setGravitationalAcceleration(self, g):
38651  * chvec = chrono.ChVectorD(g[0], g[1], g[2])
38652  * self.ChSystem.Set_G_acc(chvec) # <<<<<<<<<<<<<<
38653  *
38654  * def getGravitationalAcceleration(self):
38655  */
38656  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystem, __pyx_n_s_Set_G_acc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1492, __pyx_L1_error)
38657  __Pyx_GOTREF(__pyx_t_3);
38658  __pyx_t_8 = NULL;
38659  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
38660  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
38661  if (likely(__pyx_t_8)) {
38662  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
38663  __Pyx_INCREF(__pyx_t_8);
38664  __Pyx_INCREF(function);
38665  __Pyx_DECREF_SET(__pyx_t_3, function);
38666  }
38667  }
38668  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_8, __pyx_v_chvec) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_chvec);
38669  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
38670  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1492, __pyx_L1_error)
38671  __Pyx_GOTREF(__pyx_t_1);
38672  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
38673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
38674 
38675  /* "mbd/CouplingFSI.pyx":1490
38676  * mesh.ProtChSystem = self
38677  *
38678  * def setGravitationalAcceleration(self, g): # <<<<<<<<<<<<<<
38679  * chvec = chrono.ChVectorD(g[0], g[1], g[2])
38680  * self.ChSystem.Set_G_acc(chvec)
38681  */
38682 
38683  /* function exit code */
38684  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38685  goto __pyx_L0;
38686  __pyx_L1_error:;
38687  __Pyx_XDECREF(__pyx_t_1);
38688  __Pyx_XDECREF(__pyx_t_2);
38689  __Pyx_XDECREF(__pyx_t_3);
38690  __Pyx_XDECREF(__pyx_t_4);
38691  __Pyx_XDECREF(__pyx_t_5);
38692  __Pyx_XDECREF(__pyx_t_6);
38693  __Pyx_XDECREF(__pyx_t_8);
38694  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setGravitationalAcceleration", __pyx_clineno, __pyx_lineno, __pyx_filename);
38695  __pyx_r = NULL;
38696  __pyx_L0:;
38697  __Pyx_XDECREF(__pyx_v_chvec);
38698  __Pyx_XGIVEREF(__pyx_r);
38699  __Pyx_TraceReturn(__pyx_r, 0);
38700  __Pyx_RefNannyFinishContext();
38701  return __pyx_r;
38702 }
38703 
38704 /* "mbd/CouplingFSI.pyx":1494
38705  * self.ChSystem.Set_G_acc(chvec)
38706  *
38707  * def getGravitationalAcceleration(self): # <<<<<<<<<<<<<<
38708  * return pyvec2array(self.ChSystem.Get_G_acc())
38709  *
38710  */
38711 
38712 /* Python wrapper */
38713 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15getGravitationalAcceleration(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
38714 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_14getGravitationalAcceleration[] = "ProtChSystem.getGravitationalAcceleration(self)";
38715 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_15getGravitationalAcceleration = {"getGravitationalAcceleration", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15getGravitationalAcceleration, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_14getGravitationalAcceleration};
38716 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15getGravitationalAcceleration(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
38717  PyObject *__pyx_r = 0;
38718  __Pyx_RefNannyDeclarations
38719  __Pyx_RefNannySetupContext("getGravitationalAcceleration (wrapper)", 0);
38720  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_14getGravitationalAcceleration(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
38721 
38722  /* function exit code */
38723  __Pyx_RefNannyFinishContext();
38724  return __pyx_r;
38725 }
38726 
38727 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_14getGravitationalAcceleration(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
38728  PyObject *__pyx_r = NULL;
38729  __Pyx_TraceDeclarations
38730  __Pyx_RefNannyDeclarations
38731  PyObject *__pyx_t_1 = NULL;
38732  PyObject *__pyx_t_2 = NULL;
38733  PyObject *__pyx_t_3 = NULL;
38734  PyObject *__pyx_t_4 = NULL;
38735  PyObject *__pyx_t_5 = NULL;
38736  int __pyx_lineno = 0;
38737  const char *__pyx_filename = NULL;
38738  int __pyx_clineno = 0;
38739  __Pyx_TraceFrameInit(__pyx_codeobj__105)
38740  __Pyx_RefNannySetupContext("getGravitationalAcceleration", 0);
38741  __Pyx_TraceCall("getGravitationalAcceleration", __pyx_f[0], 1494, 0, __PYX_ERR(0, 1494, __pyx_L1_error));
38742 
38743  /* "mbd/CouplingFSI.pyx":1495
38744  *
38745  * def getGravitationalAcceleration(self):
38746  * return pyvec2array(self.ChSystem.Get_G_acc()) # <<<<<<<<<<<<<<
38747  *
38748  * def setCouplingScheme(self, string scheme, string prediction='backwardEuler'):
38749  */
38750  __Pyx_XDECREF(__pyx_r);
38751  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyvec2array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error)
38752  __Pyx_GOTREF(__pyx_t_2);
38753  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystem, __pyx_n_s_Get_G_acc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1495, __pyx_L1_error)
38754  __Pyx_GOTREF(__pyx_t_4);
38755  __pyx_t_5 = NULL;
38756  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
38757  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
38758  if (likely(__pyx_t_5)) {
38759  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
38760  __Pyx_INCREF(__pyx_t_5);
38761  __Pyx_INCREF(function);
38762  __Pyx_DECREF_SET(__pyx_t_4, function);
38763  }
38764  }
38765  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
38766  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
38767  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1495, __pyx_L1_error)
38768  __Pyx_GOTREF(__pyx_t_3);
38769  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
38770  __pyx_t_4 = NULL;
38771  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
38772  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
38773  if (likely(__pyx_t_4)) {
38774  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
38775  __Pyx_INCREF(__pyx_t_4);
38776  __Pyx_INCREF(function);
38777  __Pyx_DECREF_SET(__pyx_t_2, function);
38778  }
38779  }
38780  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
38781  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
38782  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
38783  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1495, __pyx_L1_error)
38784  __Pyx_GOTREF(__pyx_t_1);
38785  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
38786  __pyx_r = __pyx_t_1;
38787  __pyx_t_1 = 0;
38788  goto __pyx_L0;
38789 
38790  /* "mbd/CouplingFSI.pyx":1494
38791  * self.ChSystem.Set_G_acc(chvec)
38792  *
38793  * def getGravitationalAcceleration(self): # <<<<<<<<<<<<<<
38794  * return pyvec2array(self.ChSystem.Get_G_acc())
38795  *
38796  */
38797 
38798  /* function exit code */
38799  __pyx_L1_error:;
38800  __Pyx_XDECREF(__pyx_t_1);
38801  __Pyx_XDECREF(__pyx_t_2);
38802  __Pyx_XDECREF(__pyx_t_3);
38803  __Pyx_XDECREF(__pyx_t_4);
38804  __Pyx_XDECREF(__pyx_t_5);
38805  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.getGravitationalAcceleration", __pyx_clineno, __pyx_lineno, __pyx_filename);
38806  __pyx_r = NULL;
38807  __pyx_L0:;
38808  __Pyx_XGIVEREF(__pyx_r);
38809  __Pyx_TraceReturn(__pyx_r, 0);
38810  __Pyx_RefNannyFinishContext();
38811  return __pyx_r;
38812 }
38813 
38814 /* "mbd/CouplingFSI.pyx":1497
38815  * return pyvec2array(self.ChSystem.Get_G_acc())
38816  *
38817  * def setCouplingScheme(self, string scheme, string prediction='backwardEuler'): # <<<<<<<<<<<<<<
38818  * assert scheme == "CSS" or scheme == "ISS", "Coupling scheme requested unknown"
38819  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown"
38820  */
38821 
38822 /* Python wrapper */
38823 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17setCouplingScheme(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
38824 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_16setCouplingScheme[] = "ProtChSystem.setCouplingScheme(self, string scheme, string prediction='backwardEuler')";
38825 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_17setCouplingScheme = {"setCouplingScheme", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17setCouplingScheme, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_16setCouplingScheme};
38826 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17setCouplingScheme(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
38827  std::string __pyx_v_scheme;
38828  std::string __pyx_v_prediction;
38829  int __pyx_lineno = 0;
38830  const char *__pyx_filename = NULL;
38831  int __pyx_clineno = 0;
38832  PyObject *__pyx_r = 0;
38833  __Pyx_RefNannyDeclarations
38834  __Pyx_RefNannySetupContext("setCouplingScheme (wrapper)", 0);
38835  {
38836  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_scheme,&__pyx_n_s_prediction,0};
38837  PyObject* values[2] = {0,0};
38838  if (unlikely(__pyx_kwds)) {
38839  Py_ssize_t kw_args;
38840  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
38841  switch (pos_args) {
38842  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38843  CYTHON_FALLTHROUGH;
38844  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38845  CYTHON_FALLTHROUGH;
38846  case 0: break;
38847  default: goto __pyx_L5_argtuple_error;
38848  }
38849  kw_args = PyDict_Size(__pyx_kwds);
38850  switch (pos_args) {
38851  case 0:
38852  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scheme)) != 0)) kw_args--;
38853  else goto __pyx_L5_argtuple_error;
38854  CYTHON_FALLTHROUGH;
38855  case 1:
38856  if (kw_args > 0) {
38857  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prediction);
38858  if (value) { values[1] = value; kw_args--; }
38859  }
38860  }
38861  if (unlikely(kw_args > 0)) {
38862  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCouplingScheme") < 0)) __PYX_ERR(0, 1497, __pyx_L3_error)
38863  }
38864  } else {
38865  switch (PyTuple_GET_SIZE(__pyx_args)) {
38866  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
38867  CYTHON_FALLTHROUGH;
38868  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
38869  break;
38870  default: goto __pyx_L5_argtuple_error;
38871  }
38872  }
38873  __pyx_v_scheme = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L3_error)
38874  if (values[1]) {
38875  __pyx_v_prediction = __pyx_convert_string_from_py_std__in_string(values[1]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L3_error)
38876  } else {
38877  __pyx_v_prediction = __pyx_k__106;
38878  }
38879  }
38880  goto __pyx_L4_argument_unpacking_done;
38881  __pyx_L5_argtuple_error:;
38882  __Pyx_RaiseArgtupleInvalid("setCouplingScheme", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1497, __pyx_L3_error)
38883  __pyx_L3_error:;
38884  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setCouplingScheme", __pyx_clineno, __pyx_lineno, __pyx_filename);
38885  __Pyx_RefNannyFinishContext();
38886  return NULL;
38887  __pyx_L4_argument_unpacking_done:;
38888  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_16setCouplingScheme(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_scheme, __pyx_v_prediction);
38889 
38890  /* function exit code */
38891  __Pyx_RefNannyFinishContext();
38892  return __pyx_r;
38893 }
38894 
38895 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_16setCouplingScheme(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, std::string __pyx_v_scheme, std::string __pyx_v_prediction) {
38896  PyObject *__pyx_r = NULL;
38897  __Pyx_TraceDeclarations
38898  __Pyx_RefNannyDeclarations
38899  int __pyx_t_1;
38900  int __pyx_t_2;
38901  int __pyx_lineno = 0;
38902  const char *__pyx_filename = NULL;
38903  int __pyx_clineno = 0;
38904  __Pyx_TraceFrameInit(__pyx_codeobj__107)
38905  __Pyx_RefNannySetupContext("setCouplingScheme", 0);
38906  __Pyx_TraceCall("setCouplingScheme", __pyx_f[0], 1497, 0, __PYX_ERR(0, 1497, __pyx_L1_error));
38907 
38908  /* "mbd/CouplingFSI.pyx":1498
38909  *
38910  * def setCouplingScheme(self, string scheme, string prediction='backwardEuler'):
38911  * assert scheme == "CSS" or scheme == "ISS", "Coupling scheme requested unknown" # <<<<<<<<<<<<<<
38912  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown"
38913  * self.scheme = scheme
38914  */
38915  #ifndef CYTHON_WITHOUT_ASSERTIONS
38916  if (unlikely(!Py_OptimizeFlag)) {
38917  __pyx_t_2 = ((__pyx_v_scheme == ((char const *)"CSS")) != 0);
38918  if (!__pyx_t_2) {
38919  } else {
38920  __pyx_t_1 = __pyx_t_2;
38921  goto __pyx_L3_bool_binop_done;
38922  }
38923  __pyx_t_2 = ((__pyx_v_scheme == ((char const *)"ISS")) != 0);
38924  __pyx_t_1 = __pyx_t_2;
38925  __pyx_L3_bool_binop_done:;
38926  if (unlikely(!__pyx_t_1)) {
38927  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Coupling_scheme_requested_unknow);
38928  __PYX_ERR(0, 1498, __pyx_L1_error)
38929  }
38930  }
38931  #endif
38932 
38933  /* "mbd/CouplingFSI.pyx":1499
38934  * def setCouplingScheme(self, string scheme, string prediction='backwardEuler'):
38935  * assert scheme == "CSS" or scheme == "ISS", "Coupling scheme requested unknown"
38936  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown" # <<<<<<<<<<<<<<
38937  * self.scheme = scheme
38938  * self.prediction = prediction
38939  */
38940  #ifndef CYTHON_WITHOUT_ASSERTIONS
38941  if (unlikely(!Py_OptimizeFlag)) {
38942  __pyx_t_2 = ((__pyx_v_prediction == ((char const *)"backwardEuler")) != 0);
38943  if (!__pyx_t_2) {
38944  } else {
38945  __pyx_t_1 = __pyx_t_2;
38946  goto __pyx_L5_bool_binop_done;
38947  }
38948  __pyx_t_2 = ((__pyx_v_prediction == ((char const *)"forwardEuler")) != 0);
38949  if (!__pyx_t_2) {
38950  } else {
38951  __pyx_t_1 = __pyx_t_2;
38952  goto __pyx_L5_bool_binop_done;
38953  }
38954  __pyx_t_2 = ((__pyx_v_prediction == ((char const *)"implicitOrder2")) != 0);
38955  __pyx_t_1 = __pyx_t_2;
38956  __pyx_L5_bool_binop_done:;
38957  if (unlikely(!__pyx_t_1)) {
38958  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_Prediction_requested_unknown);
38959  __PYX_ERR(0, 1499, __pyx_L1_error)
38960  }
38961  }
38962  #endif
38963 
38964  /* "mbd/CouplingFSI.pyx":1500
38965  * assert scheme == "CSS" or scheme == "ISS", "Coupling scheme requested unknown"
38966  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown"
38967  * self.scheme = scheme # <<<<<<<<<<<<<<
38968  * self.prediction = prediction
38969  *
38970  */
38971  __pyx_v_self->scheme = __pyx_v_scheme;
38972 
38973  /* "mbd/CouplingFSI.pyx":1501
38974  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown"
38975  * self.scheme = scheme
38976  * self.prediction = prediction # <<<<<<<<<<<<<<
38977  *
38978  * def attachModel(self, model, ar):
38979  */
38980  __pyx_v_self->prediction = __pyx_v_prediction;
38981 
38982  /* "mbd/CouplingFSI.pyx":1497
38983  * return pyvec2array(self.ChSystem.Get_G_acc())
38984  *
38985  * def setCouplingScheme(self, string scheme, string prediction='backwardEuler'): # <<<<<<<<<<<<<<
38986  * assert scheme == "CSS" or scheme == "ISS", "Coupling scheme requested unknown"
38987  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown"
38988  */
38989 
38990  /* function exit code */
38991  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
38992  goto __pyx_L0;
38993  __pyx_L1_error:;
38994  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setCouplingScheme", __pyx_clineno, __pyx_lineno, __pyx_filename);
38995  __pyx_r = NULL;
38996  __pyx_L0:;
38997  __Pyx_XGIVEREF(__pyx_r);
38998  __Pyx_TraceReturn(__pyx_r, 0);
38999  __Pyx_RefNannyFinishContext();
39000  return __pyx_r;
39001 }
39002 
39003 /* "mbd/CouplingFSI.pyx":1503
39004  * self.prediction = prediction
39005  *
39006  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
39007  * """Attaches Proteus model to auxiliary variable
39008  * """
39009  */
39010 
39011 /* Python wrapper */
39012 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_19attachModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
39013 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_18attachModel[] = "ProtChSystem.attachModel(self, model, ar)\nAttaches Proteus model to auxiliary variable\n ";
39014 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_19attachModel = {"attachModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_19attachModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_18attachModel};
39015 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_19attachModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
39016  PyObject *__pyx_v_model = 0;
39017  CYTHON_UNUSED PyObject *__pyx_v_ar = 0;
39018  int __pyx_lineno = 0;
39019  const char *__pyx_filename = NULL;
39020  int __pyx_clineno = 0;
39021  PyObject *__pyx_r = 0;
39022  __Pyx_RefNannyDeclarations
39023  __Pyx_RefNannySetupContext("attachModel (wrapper)", 0);
39024  {
39025  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_model,&__pyx_n_s_ar,0};
39026  PyObject* values[2] = {0,0};
39027  if (unlikely(__pyx_kwds)) {
39028  Py_ssize_t kw_args;
39029  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
39030  switch (pos_args) {
39031  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39032  CYTHON_FALLTHROUGH;
39033  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39034  CYTHON_FALLTHROUGH;
39035  case 0: break;
39036  default: goto __pyx_L5_argtuple_error;
39037  }
39038  kw_args = PyDict_Size(__pyx_kwds);
39039  switch (pos_args) {
39040  case 0:
39041  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_model)) != 0)) kw_args--;
39042  else goto __pyx_L5_argtuple_error;
39043  CYTHON_FALLTHROUGH;
39044  case 1:
39045  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ar)) != 0)) kw_args--;
39046  else {
39047  __Pyx_RaiseArgtupleInvalid("attachModel", 1, 2, 2, 1); __PYX_ERR(0, 1503, __pyx_L3_error)
39048  }
39049  }
39050  if (unlikely(kw_args > 0)) {
39051  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attachModel") < 0)) __PYX_ERR(0, 1503, __pyx_L3_error)
39052  }
39053  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
39054  goto __pyx_L5_argtuple_error;
39055  } else {
39056  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
39057  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
39058  }
39059  __pyx_v_model = values[0];
39060  __pyx_v_ar = values[1];
39061  }
39062  goto __pyx_L4_argument_unpacking_done;
39063  __pyx_L5_argtuple_error:;
39064  __Pyx_RaiseArgtupleInvalid("attachModel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1503, __pyx_L3_error)
39065  __pyx_L3_error:;
39066  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.attachModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
39067  __Pyx_RefNannyFinishContext();
39068  return NULL;
39069  __pyx_L4_argument_unpacking_done:;
39070  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18attachModel(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_model, __pyx_v_ar);
39071 
39072  /* function exit code */
39073  __Pyx_RefNannyFinishContext();
39074  return __pyx_r;
39075 }
39076 
39077 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18attachModel(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_model, CYTHON_UNUSED PyObject *__pyx_v_ar) {
39078  CYTHON_UNUSED PyObject *__pyx_v_c = NULL;
39079  PyObject *__pyx_r = NULL;
39080  __Pyx_TraceDeclarations
39081  __Pyx_RefNannyDeclarations
39082  PyObject *__pyx_t_1 = NULL;
39083  PyObject *__pyx_t_2 = NULL;
39084  int __pyx_lineno = 0;
39085  const char *__pyx_filename = NULL;
39086  int __pyx_clineno = 0;
39087  __Pyx_TraceFrameInit(__pyx_codeobj__108)
39088  __Pyx_RefNannySetupContext("attachModel", 0);
39089  __Pyx_TraceCall("attachModel", __pyx_f[0], 1503, 0, __PYX_ERR(0, 1503, __pyx_L1_error));
39090 
39091  /* "mbd/CouplingFSI.pyx":1506
39092  * """Attaches Proteus model to auxiliary variable
39093  * """
39094  * c = model.levelModelList[-1].coefficients # <<<<<<<<<<<<<<
39095  * self.model = model
39096  * return self
39097  */
39098  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
39099  __Pyx_GOTREF(__pyx_t_1);
39100  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1506, __pyx_L1_error)
39101  __Pyx_GOTREF(__pyx_t_2);
39102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
39103  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error)
39104  __Pyx_GOTREF(__pyx_t_1);
39105  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
39106  __pyx_v_c = __pyx_t_1;
39107  __pyx_t_1 = 0;
39108 
39109  /* "mbd/CouplingFSI.pyx":1507
39110  * """
39111  * c = model.levelModelList[-1].coefficients
39112  * self.model = model # <<<<<<<<<<<<<<
39113  * return self
39114  *
39115  */
39116  __Pyx_INCREF(__pyx_v_model);
39117  __Pyx_GIVEREF(__pyx_v_model);
39118  __Pyx_GOTREF(__pyx_v_self->model);
39119  __Pyx_DECREF(__pyx_v_self->model);
39120  __pyx_v_self->model = __pyx_v_model;
39121 
39122  /* "mbd/CouplingFSI.pyx":1508
39123  * c = model.levelModelList[-1].coefficients
39124  * self.model = model
39125  * return self # <<<<<<<<<<<<<<
39126  *
39127  * def attachAuxiliaryVariables(self,avDict):
39128  */
39129  __Pyx_XDECREF(__pyx_r);
39130  __Pyx_INCREF(((PyObject *)__pyx_v_self));
39131  __pyx_r = ((PyObject *)__pyx_v_self);
39132  goto __pyx_L0;
39133 
39134  /* "mbd/CouplingFSI.pyx":1503
39135  * self.prediction = prediction
39136  *
39137  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
39138  * """Attaches Proteus model to auxiliary variable
39139  * """
39140  */
39141 
39142  /* function exit code */
39143  __pyx_L1_error:;
39144  __Pyx_XDECREF(__pyx_t_1);
39145  __Pyx_XDECREF(__pyx_t_2);
39146  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.attachModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
39147  __pyx_r = NULL;
39148  __pyx_L0:;
39149  __Pyx_XDECREF(__pyx_v_c);
39150  __Pyx_XGIVEREF(__pyx_r);
39151  __Pyx_TraceReturn(__pyx_r, 0);
39152  __Pyx_RefNannyFinishContext();
39153  return __pyx_r;
39154 }
39155 
39156 /* "mbd/CouplingFSI.pyx":1510
39157  * return self
39158  *
39159  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
39160  * pass
39161  *
39162  */
39163 
39164 /* Python wrapper */
39165 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_21attachAuxiliaryVariables(PyObject *__pyx_v_self, PyObject *__pyx_v_avDict); /*proto*/
39166 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_20attachAuxiliaryVariables[] = "ProtChSystem.attachAuxiliaryVariables(self, avDict)";
39167 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_21attachAuxiliaryVariables = {"attachAuxiliaryVariables", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_21attachAuxiliaryVariables, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_20attachAuxiliaryVariables};
39168 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_21attachAuxiliaryVariables(PyObject *__pyx_v_self, PyObject *__pyx_v_avDict) {
39169  PyObject *__pyx_r = 0;
39170  __Pyx_RefNannyDeclarations
39171  __Pyx_RefNannySetupContext("attachAuxiliaryVariables (wrapper)", 0);
39172  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20attachAuxiliaryVariables(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_avDict));
39173 
39174  /* function exit code */
39175  __Pyx_RefNannyFinishContext();
39176  return __pyx_r;
39177 }
39178 
39179 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20attachAuxiliaryVariables(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_avDict) {
39180  PyObject *__pyx_r = NULL;
39181  __Pyx_TraceDeclarations
39182  __Pyx_RefNannyDeclarations
39183  int __pyx_lineno = 0;
39184  const char *__pyx_filename = NULL;
39185  int __pyx_clineno = 0;
39186  __Pyx_TraceFrameInit(__pyx_codeobj__109)
39187  __Pyx_RefNannySetupContext("attachAuxiliaryVariables", 0);
39188  __Pyx_TraceCall("attachAuxiliaryVariables", __pyx_f[0], 1510, 0, __PYX_ERR(0, 1510, __pyx_L1_error));
39189 
39190  /* function exit code */
39191  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
39192  goto __pyx_L0;
39193  __pyx_L1_error:;
39194  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.attachAuxiliaryVariables", __pyx_clineno, __pyx_lineno, __pyx_filename);
39195  __pyx_r = NULL;
39196  __pyx_L0:;
39197  __Pyx_XGIVEREF(__pyx_r);
39198  __Pyx_TraceReturn(__pyx_r, 0);
39199  __Pyx_RefNannyFinishContext();
39200  return __pyx_r;
39201 }
39202 
39203 /* "mbd/CouplingFSI.pyx":1513
39204  * pass
39205  *
39206  * def setMinimumSubsteps(self, int nb): # <<<<<<<<<<<<<<
39207  * """Sets the minimum nb of chrono substeps per proteus step
39208  * if prot_dt=0.001 and ch_dt=0.002, there will be <nb>
39209  */
39210 
39211 /* Python wrapper */
39212 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_23setMinimumSubsteps(PyObject *__pyx_v_self, PyObject *__pyx_arg_nb); /*proto*/
39213 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_22setMinimumSubsteps[] = "ProtChSystem.setMinimumSubsteps(self, int nb)\nSets the minimum nb of chrono substeps per proteus step\n if prot_dt=0.001 and ch_dt=0.002, there will be <nb>\n substeps of chrono instead of just 1.\n\n Parameters\n ----------\n nb: int\n Minimum number of chrono substeps.\n ";
39214 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_23setMinimumSubsteps = {"setMinimumSubsteps", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_23setMinimumSubsteps, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_22setMinimumSubsteps};
39215 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_23setMinimumSubsteps(PyObject *__pyx_v_self, PyObject *__pyx_arg_nb) {
39216  int __pyx_v_nb;
39217  int __pyx_lineno = 0;
39218  const char *__pyx_filename = NULL;
39219  int __pyx_clineno = 0;
39220  PyObject *__pyx_r = 0;
39221  __Pyx_RefNannyDeclarations
39222  __Pyx_RefNannySetupContext("setMinimumSubsteps (wrapper)", 0);
39223  assert(__pyx_arg_nb); {
39224  __pyx_v_nb = __Pyx_PyInt_As_int(__pyx_arg_nb); if (unlikely((__pyx_v_nb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1513, __pyx_L3_error)
39225  }
39226  goto __pyx_L4_argument_unpacking_done;
39227  __pyx_L3_error:;
39228  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setMinimumSubsteps", __pyx_clineno, __pyx_lineno, __pyx_filename);
39229  __Pyx_RefNannyFinishContext();
39230  return NULL;
39231  __pyx_L4_argument_unpacking_done:;
39232  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_22setMinimumSubsteps(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((int)__pyx_v_nb));
39233 
39234  /* function exit code */
39235  __Pyx_RefNannyFinishContext();
39236  return __pyx_r;
39237 }
39238 
39239 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_22setMinimumSubsteps(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, int __pyx_v_nb) {
39240  PyObject *__pyx_r = NULL;
39241  __Pyx_TraceDeclarations
39242  __Pyx_RefNannyDeclarations
39243  int __pyx_lineno = 0;
39244  const char *__pyx_filename = NULL;
39245  int __pyx_clineno = 0;
39246  __Pyx_TraceFrameInit(__pyx_codeobj__110)
39247  __Pyx_RefNannySetupContext("setMinimumSubsteps", 0);
39248  __Pyx_TraceCall("setMinimumSubsteps", __pyx_f[0], 1513, 0, __PYX_ERR(0, 1513, __pyx_L1_error));
39249 
39250  /* "mbd/CouplingFSI.pyx":1523
39251  * Minimum number of chrono substeps.
39252  * """
39253  * self.min_nb_steps = nb # <<<<<<<<<<<<<<
39254  *
39255  * def step(self, dt):
39256  */
39257  __pyx_v_self->min_nb_steps = __pyx_v_nb;
39258 
39259  /* "mbd/CouplingFSI.pyx":1513
39260  * pass
39261  *
39262  * def setMinimumSubsteps(self, int nb): # <<<<<<<<<<<<<<
39263  * """Sets the minimum nb of chrono substeps per proteus step
39264  * if prot_dt=0.001 and ch_dt=0.002, there will be <nb>
39265  */
39266 
39267  /* function exit code */
39268  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
39269  goto __pyx_L0;
39270  __pyx_L1_error:;
39271  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setMinimumSubsteps", __pyx_clineno, __pyx_lineno, __pyx_filename);
39272  __pyx_r = NULL;
39273  __pyx_L0:;
39274  __Pyx_XGIVEREF(__pyx_r);
39275  __Pyx_TraceReturn(__pyx_r, 0);
39276  __Pyx_RefNannyFinishContext();
39277  return __pyx_r;
39278 }
39279 
39280 /* "mbd/CouplingFSI.pyx":1525
39281  * self.min_nb_steps = nb
39282  *
39283  * def step(self, dt): # <<<<<<<<<<<<<<
39284  * self.dt_fluid_last = self.dt_fluid
39285  * self.dt_fluid = dt
39286  */
39287 
39288 /* Python wrapper */
39289 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_25step(PyObject *__pyx_v_self, PyObject *__pyx_v_dt); /*proto*/
39290 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_24step[] = "ProtChSystem.step(self, dt)";
39291 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_25step = {"step", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_25step, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_24step};
39292 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_25step(PyObject *__pyx_v_self, PyObject *__pyx_v_dt) {
39293  PyObject *__pyx_r = 0;
39294  __Pyx_RefNannyDeclarations
39295  __Pyx_RefNannySetupContext("step (wrapper)", 0);
39296  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_24step(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_dt));
39297 
39298  /* function exit code */
39299  __Pyx_RefNannyFinishContext();
39300  return __pyx_r;
39301 }
39302 
39303 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_24step(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_dt) {
39304  PyObject *__pyx_v_nb_steps = NULL;
39305  CYTHON_UNUSED PyObject *__pyx_v_comm = NULL;
39306  PyObject *__pyx_v_t = NULL;
39307  PyObject *__pyx_v_dt_substep = NULL;
39308  CYTHON_UNUSED PyObject *__pyx_v_i = NULL;
39309  PyObject *__pyx_v_s = NULL;
39310  PyObject *__pyx_r = NULL;
39311  __Pyx_TraceDeclarations
39312  __Pyx_RefNannyDeclarations
39313  double __pyx_t_1;
39314  int __pyx_t_2;
39315  long __pyx_t_3;
39316  PyObject *__pyx_t_4 = NULL;
39317  PyObject *__pyx_t_5 = NULL;
39318  PyObject *__pyx_t_6 = NULL;
39319  PyObject *__pyx_t_7 = NULL;
39320  PyObject *__pyx_t_8 = NULL;
39321  int __pyx_t_9;
39322  Py_ssize_t __pyx_t_10;
39323  PyObject *(*__pyx_t_11)(PyObject *);
39324  Py_ssize_t __pyx_t_12;
39325  PyObject *(*__pyx_t_13)(PyObject *);
39326  int __pyx_t_14;
39327  int __pyx_lineno = 0;
39328  const char *__pyx_filename = NULL;
39329  int __pyx_clineno = 0;
39330  __Pyx_TraceFrameInit(__pyx_codeobj__111)
39331  __Pyx_RefNannySetupContext("step", 0);
39332  __Pyx_TraceCall("step", __pyx_f[0], 1525, 0, __PYX_ERR(0, 1525, __pyx_L1_error));
39333 
39334  /* "mbd/CouplingFSI.pyx":1526
39335  *
39336  * def step(self, dt):
39337  * self.dt_fluid_last = self.dt_fluid # <<<<<<<<<<<<<<
39338  * self.dt_fluid = dt
39339  * self.dt_fluid_next = self.proteus_dt_next
39340  */
39341  __pyx_t_1 = __pyx_v_self->dt_fluid;
39342  __pyx_v_self->dt_fluid_last = __pyx_t_1;
39343 
39344  /* "mbd/CouplingFSI.pyx":1527
39345  * def step(self, dt):
39346  * self.dt_fluid_last = self.dt_fluid
39347  * self.dt_fluid = dt # <<<<<<<<<<<<<<
39348  * self.dt_fluid_next = self.proteus_dt_next
39349  * self.dt_last = self.dt
39350  */
39351  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_dt); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1527, __pyx_L1_error)
39352  __pyx_v_self->dt_fluid = __pyx_t_1;
39353 
39354  /* "mbd/CouplingFSI.pyx":1528
39355  * self.dt_fluid_last = self.dt_fluid
39356  * self.dt_fluid = dt
39357  * self.dt_fluid_next = self.proteus_dt_next # <<<<<<<<<<<<<<
39358  * self.dt_last = self.dt
39359  * if self.scheme == "ISS":
39360  */
39361  __pyx_t_1 = __pyx_v_self->proteus_dt_next;
39362  __pyx_v_self->dt_fluid_next = __pyx_t_1;
39363 
39364  /* "mbd/CouplingFSI.pyx":1529
39365  * self.dt_fluid = dt
39366  * self.dt_fluid_next = self.proteus_dt_next
39367  * self.dt_last = self.dt # <<<<<<<<<<<<<<
39368  * if self.scheme == "ISS":
39369  * self.dt = (self.dt_fluid+self.dt_fluid_last)/2.
39370  */
39371  __pyx_t_1 = __pyx_v_self->dt;
39372  __pyx_v_self->dt_last = __pyx_t_1;
39373 
39374  /* "mbd/CouplingFSI.pyx":1530
39375  * self.dt_fluid_next = self.proteus_dt_next
39376  * self.dt_last = self.dt
39377  * if self.scheme == "ISS": # <<<<<<<<<<<<<<
39378  * self.dt = (self.dt_fluid+self.dt_fluid_last)/2.
39379  * elif self.scheme == "CSS":
39380  */
39381  __pyx_t_2 = ((__pyx_v_self->scheme == ((char const *)"ISS")) != 0);
39382  if (__pyx_t_2) {
39383 
39384  /* "mbd/CouplingFSI.pyx":1531
39385  * self.dt_last = self.dt
39386  * if self.scheme == "ISS":
39387  * self.dt = (self.dt_fluid+self.dt_fluid_last)/2. # <<<<<<<<<<<<<<
39388  * elif self.scheme == "CSS":
39389  * self.dt = dt
39390  */
39391  __pyx_v_self->dt = ((__pyx_v_self->dt_fluid + __pyx_v_self->dt_fluid_last) / 2.);
39392 
39393  /* "mbd/CouplingFSI.pyx":1530
39394  * self.dt_fluid_next = self.proteus_dt_next
39395  * self.dt_last = self.dt
39396  * if self.scheme == "ISS": # <<<<<<<<<<<<<<
39397  * self.dt = (self.dt_fluid+self.dt_fluid_last)/2.
39398  * elif self.scheme == "CSS":
39399  */
39400  goto __pyx_L3;
39401  }
39402 
39403  /* "mbd/CouplingFSI.pyx":1532
39404  * if self.scheme == "ISS":
39405  * self.dt = (self.dt_fluid+self.dt_fluid_last)/2.
39406  * elif self.scheme == "CSS": # <<<<<<<<<<<<<<
39407  * self.dt = dt
39408  * # calculate number of time steps
39409  */
39410  __pyx_t_2 = ((__pyx_v_self->scheme == ((char const *)"CSS")) != 0);
39411  if (__pyx_t_2) {
39412 
39413  /* "mbd/CouplingFSI.pyx":1533
39414  * self.dt = (self.dt_fluid+self.dt_fluid_last)/2.
39415  * elif self.scheme == "CSS":
39416  * self.dt = dt # <<<<<<<<<<<<<<
39417  * # calculate number of time steps
39418  * nb_steps = max(int(dt/self.chrono_dt), 1)
39419  */
39420  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_dt); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1533, __pyx_L1_error)
39421  __pyx_v_self->dt = __pyx_t_1;
39422 
39423  /* "mbd/CouplingFSI.pyx":1532
39424  * if self.scheme == "ISS":
39425  * self.dt = (self.dt_fluid+self.dt_fluid_last)/2.
39426  * elif self.scheme == "CSS": # <<<<<<<<<<<<<<
39427  * self.dt = dt
39428  * # calculate number of time steps
39429  */
39430  }
39431  __pyx_L3:;
39432 
39433  /* "mbd/CouplingFSI.pyx":1535
39434  * self.dt = dt
39435  * # calculate number of time steps
39436  * nb_steps = max(int(dt/self.chrono_dt), 1) # <<<<<<<<<<<<<<
39437  * if nb_steps < self.min_nb_steps:
39438  * nb_steps = self.min_nb_steps
39439  */
39440  __pyx_t_3 = 1;
39441  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->chrono_dt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1535, __pyx_L1_error)
39442  __Pyx_GOTREF(__pyx_t_4);
39443  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_v_dt, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1535, __pyx_L1_error)
39444  __Pyx_GOTREF(__pyx_t_5);
39445  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39446  __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1535, __pyx_L1_error)
39447  __Pyx_GOTREF(__pyx_t_4);
39448  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39449  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1535, __pyx_L1_error)
39450  __Pyx_GOTREF(__pyx_t_6);
39451  __pyx_t_7 = PyObject_RichCompare(__pyx_t_6, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1535, __pyx_L1_error)
39452  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39453  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1535, __pyx_L1_error)
39454  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39455  if (__pyx_t_2) {
39456  __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1535, __pyx_L1_error)
39457  __Pyx_GOTREF(__pyx_t_7);
39458  __pyx_t_5 = __pyx_t_7;
39459  __pyx_t_7 = 0;
39460  } else {
39461  __Pyx_INCREF(__pyx_t_4);
39462  __pyx_t_5 = __pyx_t_4;
39463  }
39464  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39465  __pyx_t_4 = __pyx_t_5;
39466  __Pyx_INCREF(__pyx_t_4);
39467  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39468  __pyx_v_nb_steps = __pyx_t_4;
39469  __pyx_t_4 = 0;
39470 
39471  /* "mbd/CouplingFSI.pyx":1536
39472  * # calculate number of time steps
39473  * nb_steps = max(int(dt/self.chrono_dt), 1)
39474  * if nb_steps < self.min_nb_steps: # <<<<<<<<<<<<<<
39475  * nb_steps = self.min_nb_steps
39476  * # solve Chrono system
39477  */
39478  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->min_nb_steps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L1_error)
39479  __Pyx_GOTREF(__pyx_t_4);
39480  __pyx_t_5 = PyObject_RichCompare(__pyx_v_nb_steps, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1536, __pyx_L1_error)
39481  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39482  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1536, __pyx_L1_error)
39483  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39484  if (__pyx_t_2) {
39485 
39486  /* "mbd/CouplingFSI.pyx":1537
39487  * nb_steps = max(int(dt/self.chrono_dt), 1)
39488  * if nb_steps < self.min_nb_steps:
39489  * nb_steps = self.min_nb_steps # <<<<<<<<<<<<<<
39490  * # solve Chrono system
39491  * self.step_nb += 1
39492  */
39493  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->min_nb_steps); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1537, __pyx_L1_error)
39494  __Pyx_GOTREF(__pyx_t_5);
39495  __Pyx_DECREF_SET(__pyx_v_nb_steps, __pyx_t_5);
39496  __pyx_t_5 = 0;
39497 
39498  /* "mbd/CouplingFSI.pyx":1536
39499  * # calculate number of time steps
39500  * nb_steps = max(int(dt/self.chrono_dt), 1)
39501  * if nb_steps < self.min_nb_steps: # <<<<<<<<<<<<<<
39502  * nb_steps = self.min_nb_steps
39503  * # solve Chrono system
39504  */
39505  }
39506 
39507  /* "mbd/CouplingFSI.pyx":1539
39508  * nb_steps = self.min_nb_steps
39509  * # solve Chrono system
39510  * self.step_nb += 1 # <<<<<<<<<<<<<<
39511  * # self.thisptr.system.setChTime()
39512  * comm = Comm.get().comm.tompi4py()
39513  */
39514  __pyx_v_self->step_nb = (__pyx_v_self->step_nb + 1);
39515 
39516  /* "mbd/CouplingFSI.pyx":1541
39517  * self.step_nb += 1
39518  * # self.thisptr.system.setChTime()
39519  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
39520  * t = self.ChSystem.GetChTime()
39521  * Profiling.logEvent('Solving Chrono system from t='
39522  */
39523  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Comm); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1541, __pyx_L1_error)
39524  __Pyx_GOTREF(__pyx_t_7);
39525  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1541, __pyx_L1_error)
39526  __Pyx_GOTREF(__pyx_t_6);
39527  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39528  __pyx_t_7 = NULL;
39529  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
39530  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
39531  if (likely(__pyx_t_7)) {
39532  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
39533  __Pyx_INCREF(__pyx_t_7);
39534  __Pyx_INCREF(function);
39535  __Pyx_DECREF_SET(__pyx_t_6, function);
39536  }
39537  }
39538  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
39539  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
39540  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L1_error)
39541  __Pyx_GOTREF(__pyx_t_4);
39542  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39543  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_comm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1541, __pyx_L1_error)
39544  __Pyx_GOTREF(__pyx_t_6);
39545  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39546  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1541, __pyx_L1_error)
39547  __Pyx_GOTREF(__pyx_t_4);
39548  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39549  __pyx_t_6 = NULL;
39550  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
39551  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
39552  if (likely(__pyx_t_6)) {
39553  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
39554  __Pyx_INCREF(__pyx_t_6);
39555  __Pyx_INCREF(function);
39556  __Pyx_DECREF_SET(__pyx_t_4, function);
39557  }
39558  }
39559  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
39560  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
39561  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1541, __pyx_L1_error)
39562  __Pyx_GOTREF(__pyx_t_5);
39563  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39564  __pyx_v_comm = __pyx_t_5;
39565  __pyx_t_5 = 0;
39566 
39567  /* "mbd/CouplingFSI.pyx":1542
39568  * # self.thisptr.system.setChTime()
39569  * comm = Comm.get().comm.tompi4py()
39570  * t = self.ChSystem.GetChTime() # <<<<<<<<<<<<<<
39571  * Profiling.logEvent('Solving Chrono system from t='
39572  * +str(t)
39573  */
39574  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1542, __pyx_L1_error)
39575  __Pyx_GOTREF(__pyx_t_4);
39576  __pyx_t_6 = NULL;
39577  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
39578  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
39579  if (likely(__pyx_t_6)) {
39580  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
39581  __Pyx_INCREF(__pyx_t_6);
39582  __Pyx_INCREF(function);
39583  __Pyx_DECREF_SET(__pyx_t_4, function);
39584  }
39585  }
39586  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
39587  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
39588  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1542, __pyx_L1_error)
39589  __Pyx_GOTREF(__pyx_t_5);
39590  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39591  __pyx_v_t = __pyx_t_5;
39592  __pyx_t_5 = 0;
39593 
39594  /* "mbd/CouplingFSI.pyx":1543
39595  * comm = Comm.get().comm.tompi4py()
39596  * t = self.ChSystem.GetChTime()
39597  * Profiling.logEvent('Solving Chrono system from t=' # <<<<<<<<<<<<<<
39598  * +str(t)
39599  * +' with dt='+str(self.dt)
39600  */
39601  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1543, __pyx_L1_error)
39602  __Pyx_GOTREF(__pyx_t_4);
39603  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1543, __pyx_L1_error)
39604  __Pyx_GOTREF(__pyx_t_6);
39605  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39606 
39607  /* "mbd/CouplingFSI.pyx":1544
39608  * t = self.ChSystem.GetChTime()
39609  * Profiling.logEvent('Solving Chrono system from t='
39610  * +str(t) # <<<<<<<<<<<<<<
39611  * +' with dt='+str(self.dt)
39612  * +'('+str(nb_steps)+' substeps)')
39613  */
39614  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_t); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1544, __pyx_L1_error)
39615  __Pyx_GOTREF(__pyx_t_4);
39616  __pyx_t_7 = PyNumber_Add(__pyx_kp_s_Solving_Chrono_system_from_t, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1544, __pyx_L1_error)
39617  __Pyx_GOTREF(__pyx_t_7);
39618  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39619 
39620  /* "mbd/CouplingFSI.pyx":1545
39621  * Profiling.logEvent('Solving Chrono system from t='
39622  * +str(t)
39623  * +' with dt='+str(self.dt) # <<<<<<<<<<<<<<
39624  * +'('+str(nb_steps)+' substeps)')
39625  * if dt > 0:
39626  */
39627  __pyx_t_4 = PyNumber_Add(__pyx_t_7, __pyx_kp_s_with_dt); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error)
39628  __Pyx_GOTREF(__pyx_t_4);
39629  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39630  __pyx_t_7 = PyFloat_FromDouble(__pyx_v_self->dt); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1545, __pyx_L1_error)
39631  __Pyx_GOTREF(__pyx_t_7);
39632  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1545, __pyx_L1_error)
39633  __Pyx_GOTREF(__pyx_t_8);
39634  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39635  __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1545, __pyx_L1_error)
39636  __Pyx_GOTREF(__pyx_t_7);
39637  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39638  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
39639 
39640  /* "mbd/CouplingFSI.pyx":1546
39641  * +str(t)
39642  * +' with dt='+str(self.dt)
39643  * +'('+str(nb_steps)+' substeps)') # <<<<<<<<<<<<<<
39644  * if dt > 0:
39645  * if self.update_substeps is False:
39646  */
39647  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__112); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1546, __pyx_L1_error)
39648  __Pyx_GOTREF(__pyx_t_8);
39649  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39650  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_nb_steps); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1546, __pyx_L1_error)
39651  __Pyx_GOTREF(__pyx_t_7);
39652  __pyx_t_4 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1546, __pyx_L1_error)
39653  __Pyx_GOTREF(__pyx_t_4);
39654  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
39655  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39656  __pyx_t_7 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_substeps); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1546, __pyx_L1_error)
39657  __Pyx_GOTREF(__pyx_t_7);
39658  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39659  __pyx_t_4 = NULL;
39660  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
39661  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
39662  if (likely(__pyx_t_4)) {
39663  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
39664  __Pyx_INCREF(__pyx_t_4);
39665  __Pyx_INCREF(function);
39666  __Pyx_DECREF_SET(__pyx_t_6, function);
39667  }
39668  }
39669  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7);
39670  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
39671  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39672  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1543, __pyx_L1_error)
39673  __Pyx_GOTREF(__pyx_t_5);
39674  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39675  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39676 
39677  /* "mbd/CouplingFSI.pyx":1547
39678  * +' with dt='+str(self.dt)
39679  * +'('+str(nb_steps)+' substeps)')
39680  * if dt > 0: # <<<<<<<<<<<<<<
39681  * if self.update_substeps is False:
39682  * self.thisptr.step(<double> self.dt, nb_steps)
39683  */
39684  __pyx_t_5 = PyObject_RichCompare(__pyx_v_dt, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1547, __pyx_L1_error)
39685  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1547, __pyx_L1_error)
39686  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39687  if (__pyx_t_2) {
39688 
39689  /* "mbd/CouplingFSI.pyx":1548
39690  * +'('+str(nb_steps)+' substeps)')
39691  * if dt > 0:
39692  * if self.update_substeps is False: # <<<<<<<<<<<<<<
39693  * self.thisptr.step(<double> self.dt, nb_steps)
39694  * else:
39695  */
39696  __pyx_t_2 = ((__pyx_v_self->update_substeps == 0) != 0);
39697  if (__pyx_t_2) {
39698 
39699  /* "mbd/CouplingFSI.pyx":1549
39700  * if dt > 0:
39701  * if self.update_substeps is False:
39702  * self.thisptr.step(<double> self.dt, nb_steps) # <<<<<<<<<<<<<<
39703  * else:
39704  * dt_substep = self.dt/nb_steps
39705  */
39706  __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_v_nb_steps); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1549, __pyx_L1_error)
39707  __pyx_v_self->thisptr->step(((double)__pyx_v_self->dt), __pyx_t_9);
39708 
39709  /* "mbd/CouplingFSI.pyx":1548
39710  * +'('+str(nb_steps)+' substeps)')
39711  * if dt > 0:
39712  * if self.update_substeps is False: # <<<<<<<<<<<<<<
39713  * self.thisptr.step(<double> self.dt, nb_steps)
39714  * else:
39715  */
39716  goto __pyx_L6;
39717  }
39718 
39719  /* "mbd/CouplingFSI.pyx":1551
39720  * self.thisptr.step(<double> self.dt, nb_steps)
39721  * else:
39722  * dt_substep = self.dt/nb_steps # <<<<<<<<<<<<<<
39723  * for i in range(nb_steps):
39724  * self.thisptr.step(<double> dt_substep, 1)
39725  */
39726  /*else*/ {
39727  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->dt); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1551, __pyx_L1_error)
39728  __Pyx_GOTREF(__pyx_t_5);
39729  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_5, __pyx_v_nb_steps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1551, __pyx_L1_error)
39730  __Pyx_GOTREF(__pyx_t_6);
39731  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39732  __pyx_v_dt_substep = __pyx_t_6;
39733  __pyx_t_6 = 0;
39734 
39735  /* "mbd/CouplingFSI.pyx":1552
39736  * else:
39737  * dt_substep = self.dt/nb_steps
39738  * for i in range(nb_steps): # <<<<<<<<<<<<<<
39739  * self.thisptr.step(<double> dt_substep, 1)
39740  * # tri: hack to update forces on cables
39741  */
39742  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nb_steps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1552, __pyx_L1_error)
39743  __Pyx_GOTREF(__pyx_t_6);
39744  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
39745  __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
39746  __pyx_t_11 = NULL;
39747  } else {
39748  __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1552, __pyx_L1_error)
39749  __Pyx_GOTREF(__pyx_t_5);
39750  __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1552, __pyx_L1_error)
39751  }
39752  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39753  for (;;) {
39754  if (likely(!__pyx_t_11)) {
39755  if (likely(PyList_CheckExact(__pyx_t_5))) {
39756  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
39757  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
39758  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1552, __pyx_L1_error)
39759  #else
39760  __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1552, __pyx_L1_error)
39761  __Pyx_GOTREF(__pyx_t_6);
39762  #endif
39763  } else {
39764  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
39765  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
39766  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_6); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 1552, __pyx_L1_error)
39767  #else
39768  __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1552, __pyx_L1_error)
39769  __Pyx_GOTREF(__pyx_t_6);
39770  #endif
39771  }
39772  } else {
39773  __pyx_t_6 = __pyx_t_11(__pyx_t_5);
39774  if (unlikely(!__pyx_t_6)) {
39775  PyObject* exc_type = PyErr_Occurred();
39776  if (exc_type) {
39777  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
39778  else __PYX_ERR(0, 1552, __pyx_L1_error)
39779  }
39780  break;
39781  }
39782  __Pyx_GOTREF(__pyx_t_6);
39783  }
39784  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
39785  __pyx_t_6 = 0;
39786 
39787  /* "mbd/CouplingFSI.pyx":1553
39788  * dt_substep = self.dt/nb_steps
39789  * for i in range(nb_steps):
39790  * self.thisptr.step(<double> dt_substep, 1) # <<<<<<<<<<<<<<
39791  * # tri: hack to update forces on cables
39792  * for s in self.subcomponents:
39793  */
39794  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_dt_substep); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1553, __pyx_L1_error)
39795  __pyx_v_self->thisptr->step(((double)__pyx_t_1), 1);
39796 
39797  /* "mbd/CouplingFSI.pyx":1555
39798  * self.thisptr.step(<double> dt_substep, 1)
39799  * # tri: hack to update forces on cables
39800  * for s in self.subcomponents: # <<<<<<<<<<<<<<
39801  * if type(s) is ProtChMoorings:
39802  * # update forces keeping same fluid vel/acc
39803  */
39804  if (likely(PyList_CheckExact(__pyx_v_self->subcomponents)) || PyTuple_CheckExact(__pyx_v_self->subcomponents)) {
39805  __pyx_t_6 = __pyx_v_self->subcomponents; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0;
39806  __pyx_t_13 = NULL;
39807  } else {
39808  __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_self->subcomponents); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1555, __pyx_L1_error)
39809  __Pyx_GOTREF(__pyx_t_6);
39810  __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1555, __pyx_L1_error)
39811  }
39812  for (;;) {
39813  if (likely(!__pyx_t_13)) {
39814  if (likely(PyList_CheckExact(__pyx_t_6))) {
39815  if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break;
39816  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
39817  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1555, __pyx_L1_error)
39818  #else
39819  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1555, __pyx_L1_error)
39820  __Pyx_GOTREF(__pyx_t_7);
39821  #endif
39822  } else {
39823  if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
39824  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
39825  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_7); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1555, __pyx_L1_error)
39826  #else
39827  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1555, __pyx_L1_error)
39828  __Pyx_GOTREF(__pyx_t_7);
39829  #endif
39830  }
39831  } else {
39832  __pyx_t_7 = __pyx_t_13(__pyx_t_6);
39833  if (unlikely(!__pyx_t_7)) {
39834  PyObject* exc_type = PyErr_Occurred();
39835  if (exc_type) {
39836  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
39837  else __PYX_ERR(0, 1555, __pyx_L1_error)
39838  }
39839  break;
39840  }
39841  __Pyx_GOTREF(__pyx_t_7);
39842  }
39843  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_7);
39844  __pyx_t_7 = 0;
39845 
39846  /* "mbd/CouplingFSI.pyx":1556
39847  * # tri: hack to update forces on cables
39848  * for s in self.subcomponents:
39849  * if type(s) is ProtChMoorings: # <<<<<<<<<<<<<<
39850  * # update forces keeping same fluid vel/acc
39851  * s.updateForces()
39852  */
39853  __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_s)) == ((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings));
39854  __pyx_t_14 = (__pyx_t_2 != 0);
39855  if (__pyx_t_14) {
39856 
39857  /* "mbd/CouplingFSI.pyx":1558
39858  * if type(s) is ProtChMoorings:
39859  * # update forces keeping same fluid vel/acc
39860  * s.updateForces() # <<<<<<<<<<<<<<
39861  * t = self.ChSystem.GetChTime()
39862  * Profiling.logEvent('Solved Chrono system to t='+str(t))
39863  */
39864  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_updateForces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error)
39865  __Pyx_GOTREF(__pyx_t_4);
39866  __pyx_t_8 = NULL;
39867  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
39868  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
39869  if (likely(__pyx_t_8)) {
39870  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
39871  __Pyx_INCREF(__pyx_t_8);
39872  __Pyx_INCREF(function);
39873  __Pyx_DECREF_SET(__pyx_t_4, function);
39874  }
39875  }
39876  __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
39877  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
39878  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1558, __pyx_L1_error)
39879  __Pyx_GOTREF(__pyx_t_7);
39880  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39881  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39882 
39883  /* "mbd/CouplingFSI.pyx":1556
39884  * # tri: hack to update forces on cables
39885  * for s in self.subcomponents:
39886  * if type(s) is ProtChMoorings: # <<<<<<<<<<<<<<
39887  * # update forces keeping same fluid vel/acc
39888  * s.updateForces()
39889  */
39890  }
39891 
39892  /* "mbd/CouplingFSI.pyx":1555
39893  * self.thisptr.step(<double> dt_substep, 1)
39894  * # tri: hack to update forces on cables
39895  * for s in self.subcomponents: # <<<<<<<<<<<<<<
39896  * if type(s) is ProtChMoorings:
39897  * # update forces keeping same fluid vel/acc
39898  */
39899  }
39900  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39901 
39902  /* "mbd/CouplingFSI.pyx":1552
39903  * else:
39904  * dt_substep = self.dt/nb_steps
39905  * for i in range(nb_steps): # <<<<<<<<<<<<<<
39906  * self.thisptr.step(<double> dt_substep, 1)
39907  * # tri: hack to update forces on cables
39908  */
39909  }
39910  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39911  }
39912  __pyx_L6:;
39913 
39914  /* "mbd/CouplingFSI.pyx":1547
39915  * +' with dt='+str(self.dt)
39916  * +'('+str(nb_steps)+' substeps)')
39917  * if dt > 0: # <<<<<<<<<<<<<<
39918  * if self.update_substeps is False:
39919  * self.thisptr.step(<double> self.dt, nb_steps)
39920  */
39921  }
39922 
39923  /* "mbd/CouplingFSI.pyx":1559
39924  * # update forces keeping same fluid vel/acc
39925  * s.updateForces()
39926  * t = self.ChSystem.GetChTime() # <<<<<<<<<<<<<<
39927  * Profiling.logEvent('Solved Chrono system to t='+str(t))
39928  * if self.scheme == "ISS":
39929  */
39930  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1559, __pyx_L1_error)
39931  __Pyx_GOTREF(__pyx_t_6);
39932  __pyx_t_7 = NULL;
39933  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
39934  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
39935  if (likely(__pyx_t_7)) {
39936  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
39937  __Pyx_INCREF(__pyx_t_7);
39938  __Pyx_INCREF(function);
39939  __Pyx_DECREF_SET(__pyx_t_6, function);
39940  }
39941  }
39942  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
39943  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
39944  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1559, __pyx_L1_error)
39945  __Pyx_GOTREF(__pyx_t_5);
39946  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39947  __Pyx_DECREF_SET(__pyx_v_t, __pyx_t_5);
39948  __pyx_t_5 = 0;
39949 
39950  /* "mbd/CouplingFSI.pyx":1560
39951  * s.updateForces()
39952  * t = self.ChSystem.GetChTime()
39953  * Profiling.logEvent('Solved Chrono system to t='+str(t)) # <<<<<<<<<<<<<<
39954  * if self.scheme == "ISS":
39955  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.))
39956  */
39957  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1560, __pyx_L1_error)
39958  __Pyx_GOTREF(__pyx_t_6);
39959  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1560, __pyx_L1_error)
39960  __Pyx_GOTREF(__pyx_t_7);
39961  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39962  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1560, __pyx_L1_error)
39963  __Pyx_GOTREF(__pyx_t_6);
39964  __pyx_t_4 = PyNumber_Add(__pyx_kp_s_Solved_Chrono_system_to_t, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1560, __pyx_L1_error)
39965  __Pyx_GOTREF(__pyx_t_4);
39966  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
39967  __pyx_t_6 = NULL;
39968  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
39969  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
39970  if (likely(__pyx_t_6)) {
39971  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
39972  __Pyx_INCREF(__pyx_t_6);
39973  __Pyx_INCREF(function);
39974  __Pyx_DECREF_SET(__pyx_t_7, function);
39975  }
39976  }
39977  __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4);
39978  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
39979  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
39980  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1560, __pyx_L1_error)
39981  __Pyx_GOTREF(__pyx_t_5);
39982  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
39983  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
39984 
39985  /* "mbd/CouplingFSI.pyx":1561
39986  * t = self.ChSystem.GetChTime()
39987  * Profiling.logEvent('Solved Chrono system to t='+str(t))
39988  * if self.scheme == "ISS": # <<<<<<<<<<<<<<
39989  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.))
39990  *
39991  */
39992  __pyx_t_14 = ((__pyx_v_self->scheme == ((char const *)"ISS")) != 0);
39993  if (__pyx_t_14) {
39994 
39995  /* "mbd/CouplingFSI.pyx":1562
39996  * Profiling.logEvent('Solved Chrono system to t='+str(t))
39997  * if self.scheme == "ISS":
39998  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.)) # <<<<<<<<<<<<<<
39999  *
40000  * def calculate(self, proteus_dt=None):
40001  */
40002  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1562, __pyx_L1_error)
40003  __Pyx_GOTREF(__pyx_t_7);
40004  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error)
40005  __Pyx_GOTREF(__pyx_t_4);
40006  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40007  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_self->dt_fluid_next / 2.)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1562, __pyx_L1_error)
40008  __Pyx_GOTREF(__pyx_t_7);
40009  __pyx_t_6 = PyNumber_Add(__pyx_v_t, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1562, __pyx_L1_error)
40010  __Pyx_GOTREF(__pyx_t_6);
40011  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40012  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1562, __pyx_L1_error)
40013  __Pyx_GOTREF(__pyx_t_7);
40014  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
40015  __pyx_t_6 = PyNumber_Add(__pyx_kp_s_Chrono_system_to_t, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1562, __pyx_L1_error)
40016  __Pyx_GOTREF(__pyx_t_6);
40017  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40018  __pyx_t_7 = NULL;
40019  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
40020  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
40021  if (likely(__pyx_t_7)) {
40022  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
40023  __Pyx_INCREF(__pyx_t_7);
40024  __Pyx_INCREF(function);
40025  __Pyx_DECREF_SET(__pyx_t_4, function);
40026  }
40027  }
40028  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
40029  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40030  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
40031  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1562, __pyx_L1_error)
40032  __Pyx_GOTREF(__pyx_t_5);
40033  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
40034  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
40035 
40036  /* "mbd/CouplingFSI.pyx":1561
40037  * t = self.ChSystem.GetChTime()
40038  * Profiling.logEvent('Solved Chrono system to t='+str(t))
40039  * if self.scheme == "ISS": # <<<<<<<<<<<<<<
40040  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.))
40041  *
40042  */
40043  }
40044 
40045  /* "mbd/CouplingFSI.pyx":1525
40046  * self.min_nb_steps = nb
40047  *
40048  * def step(self, dt): # <<<<<<<<<<<<<<
40049  * self.dt_fluid_last = self.dt_fluid
40050  * self.dt_fluid = dt
40051  */
40052 
40053  /* function exit code */
40054  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
40055  goto __pyx_L0;
40056  __pyx_L1_error:;
40057  __Pyx_XDECREF(__pyx_t_4);
40058  __Pyx_XDECREF(__pyx_t_5);
40059  __Pyx_XDECREF(__pyx_t_6);
40060  __Pyx_XDECREF(__pyx_t_7);
40061  __Pyx_XDECREF(__pyx_t_8);
40062  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.step", __pyx_clineno, __pyx_lineno, __pyx_filename);
40063  __pyx_r = NULL;
40064  __pyx_L0:;
40065  __Pyx_XDECREF(__pyx_v_nb_steps);
40066  __Pyx_XDECREF(__pyx_v_comm);
40067  __Pyx_XDECREF(__pyx_v_t);
40068  __Pyx_XDECREF(__pyx_v_dt_substep);
40069  __Pyx_XDECREF(__pyx_v_i);
40070  __Pyx_XDECREF(__pyx_v_s);
40071  __Pyx_XGIVEREF(__pyx_r);
40072  __Pyx_TraceReturn(__pyx_r, 0);
40073  __Pyx_RefNannyFinishContext();
40074  return __pyx_r;
40075 }
40076 
40077 /* "mbd/CouplingFSI.pyx":1564
40078  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.))
40079  *
40080  * def calculate(self, proteus_dt=None): # <<<<<<<<<<<<<<
40081  * """Does chrono system calculation for a Proteus time step
40082  * Calls prestep and poststep on all subcomponents (bodies,
40083  */
40084 
40085 /* Python wrapper */
40086 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_27calculate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
40087 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_26calculate[] = "ProtChSystem.calculate(self, proteus_dt=None)\nDoes chrono system calculation for a Proteus time step\n Calls prestep and poststep on all subcomponents (bodies,\n moorings, etc) attached to the system.\n\n Parameters\n ----------\n proteus_dt: Optional[proteus_dt]\n Manually sets a time step. The time step is set\n automatically when coupled with a Proteus simulation\n ";
40088 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_27calculate = {"calculate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_27calculate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_26calculate};
40089 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_27calculate(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
40090  PyObject *__pyx_v_proteus_dt = 0;
40091  int __pyx_lineno = 0;
40092  const char *__pyx_filename = NULL;
40093  int __pyx_clineno = 0;
40094  PyObject *__pyx_r = 0;
40095  __Pyx_RefNannyDeclarations
40096  __Pyx_RefNannySetupContext("calculate (wrapper)", 0);
40097  {
40098  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_proteus_dt,0};
40099  PyObject* values[1] = {0};
40100  values[0] = ((PyObject *)Py_None);
40101  if (unlikely(__pyx_kwds)) {
40102  Py_ssize_t kw_args;
40103  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
40104  switch (pos_args) {
40105  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40106  CYTHON_FALLTHROUGH;
40107  case 0: break;
40108  default: goto __pyx_L5_argtuple_error;
40109  }
40110  kw_args = PyDict_Size(__pyx_kwds);
40111  switch (pos_args) {
40112  case 0:
40113  if (kw_args > 0) {
40114  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_proteus_dt);
40115  if (value) { values[0] = value; kw_args--; }
40116  }
40117  }
40118  if (unlikely(kw_args > 0)) {
40119  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate") < 0)) __PYX_ERR(0, 1564, __pyx_L3_error)
40120  }
40121  } else {
40122  switch (PyTuple_GET_SIZE(__pyx_args)) {
40123  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
40124  CYTHON_FALLTHROUGH;
40125  case 0: break;
40126  default: goto __pyx_L5_argtuple_error;
40127  }
40128  }
40129  __pyx_v_proteus_dt = values[0];
40130  }
40131  goto __pyx_L4_argument_unpacking_done;
40132  __pyx_L5_argtuple_error:;
40133  __Pyx_RaiseArgtupleInvalid("calculate", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1564, __pyx_L3_error)
40134  __pyx_L3_error:;
40135  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
40136  __Pyx_RefNannyFinishContext();
40137  return NULL;
40138  __pyx_L4_argument_unpacking_done:;
40139  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_26calculate(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_proteus_dt);
40140 
40141  /* function exit code */
40142  __Pyx_RefNannyFinishContext();
40143  return __pyx_r;
40144 }
40145 
40146 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_26calculate(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_proteus_dt) {
40147  PyObject *__pyx_v_t = NULL;
40148  CYTHON_UNUSED PyObject *__pyx_v_time = NULL;
40149  PyObject *__pyx_v_s = NULL;
40150  PyObject *__pyx_r = NULL;
40151  __Pyx_TraceDeclarations
40152  __Pyx_RefNannyDeclarations
40153  double __pyx_t_1;
40154  int __pyx_t_2;
40155  int __pyx_t_3;
40156  PyObject *__pyx_t_4 = NULL;
40157  PyObject *__pyx_t_5 = NULL;
40158  PyObject *__pyx_t_6 = NULL;
40159  PyObject *__pyx_t_7 = NULL;
40160  PyObject *__pyx_t_8 = NULL;
40161  PyObject *__pyx_t_9 = NULL;
40162  PyObject *__pyx_t_10 = NULL;
40163  Py_ssize_t __pyx_t_11;
40164  PyObject *(*__pyx_t_12)(PyObject *);
40165  int __pyx_t_13;
40166  PyObject *__pyx_t_14 = NULL;
40167  int __pyx_lineno = 0;
40168  const char *__pyx_filename = NULL;
40169  int __pyx_clineno = 0;
40170  __Pyx_TraceFrameInit(__pyx_codeobj__113)
40171  __Pyx_RefNannySetupContext("calculate", 0);
40172  __Pyx_TraceCall("calculate", __pyx_f[0], 1564, 0, __PYX_ERR(0, 1564, __pyx_L1_error));
40173 
40174  /* "mbd/CouplingFSI.pyx":1575
40175  * automatically when coupled with a Proteus simulation
40176  * """
40177  * self.proteus_dt_last = self.proteus_dt # <<<<<<<<<<<<<<
40178  * if self.model is not None:
40179  * try:
40180  */
40181  __pyx_t_1 = __pyx_v_self->proteus_dt;
40182  __pyx_v_self->proteus_dt_last = __pyx_t_1;
40183 
40184  /* "mbd/CouplingFSI.pyx":1576
40185  * """
40186  * self.proteus_dt_last = self.proteus_dt
40187  * if self.model is not None: # <<<<<<<<<<<<<<
40188  * try:
40189  * self.proteus_dt = self.model.levelModelList[-1].dt_last
40190  */
40191  __pyx_t_2 = (__pyx_v_self->model != Py_None);
40192  __pyx_t_3 = (__pyx_t_2 != 0);
40193  if (__pyx_t_3) {
40194 
40195  /* "mbd/CouplingFSI.pyx":1577
40196  * self.proteus_dt_last = self.proteus_dt
40197  * if self.model is not None:
40198  * try: # <<<<<<<<<<<<<<
40199  * self.proteus_dt = self.model.levelModelList[-1].dt_last
40200  * self.proteus_dt_next = self.model.levelModelList[-1].dt_last # wrong prediction is varying time step
40201  */
40202  {
40203  __Pyx_PyThreadState_declare
40204  __Pyx_PyThreadState_assign
40205  __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
40206  __Pyx_XGOTREF(__pyx_t_4);
40207  __Pyx_XGOTREF(__pyx_t_5);
40208  __Pyx_XGOTREF(__pyx_t_6);
40209  /*try:*/ {
40210 
40211  /* "mbd/CouplingFSI.pyx":1578
40212  * if self.model is not None:
40213  * try:
40214  * self.proteus_dt = self.model.levelModelList[-1].dt_last # <<<<<<<<<<<<<<
40215  * self.proteus_dt_next = self.model.levelModelList[-1].dt_last # wrong prediction is varying time step
40216  * self.t = t = self.model.stepController.t_model_last
40217  */
40218  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1578, __pyx_L4_error)
40219  __Pyx_GOTREF(__pyx_t_7);
40220  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1578, __pyx_L4_error)
40221  __Pyx_GOTREF(__pyx_t_8);
40222  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40223  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_dt_last); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1578, __pyx_L4_error)
40224  __Pyx_GOTREF(__pyx_t_7);
40225  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40226  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1578, __pyx_L4_error)
40227  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40228  __pyx_v_self->proteus_dt = __pyx_t_1;
40229 
40230  /* "mbd/CouplingFSI.pyx":1579
40231  * try:
40232  * self.proteus_dt = self.model.levelModelList[-1].dt_last
40233  * self.proteus_dt_next = self.model.levelModelList[-1].dt_last # wrong prediction is varying time step # <<<<<<<<<<<<<<
40234  * self.t = t = self.model.stepController.t_model_last
40235  * except:
40236  */
40237  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1579, __pyx_L4_error)
40238  __Pyx_GOTREF(__pyx_t_7);
40239  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1579, __pyx_L4_error)
40240  __Pyx_GOTREF(__pyx_t_8);
40241  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40242  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_dt_last); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1579, __pyx_L4_error)
40243  __Pyx_GOTREF(__pyx_t_7);
40244  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40245  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_7); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1579, __pyx_L4_error)
40246  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40247  __pyx_v_self->proteus_dt_next = __pyx_t_1;
40248 
40249  /* "mbd/CouplingFSI.pyx":1580
40250  * self.proteus_dt = self.model.levelModelList[-1].dt_last
40251  * self.proteus_dt_next = self.model.levelModelList[-1].dt_last # wrong prediction is varying time step
40252  * self.t = t = self.model.stepController.t_model_last # <<<<<<<<<<<<<<
40253  * except:
40254  * self.proteus_dt = self.dt_init
40255  */
40256  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_stepController); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1580, __pyx_L4_error)
40257  __Pyx_GOTREF(__pyx_t_7);
40258  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_t_model_last); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1580, __pyx_L4_error)
40259  __Pyx_GOTREF(__pyx_t_8);
40260  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40261  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_8); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1580, __pyx_L4_error)
40262  __pyx_v_self->t = __pyx_t_1;
40263  __Pyx_INCREF(__pyx_t_8);
40264  __pyx_v_t = __pyx_t_8;
40265  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40266 
40267  /* "mbd/CouplingFSI.pyx":1577
40268  * self.proteus_dt_last = self.proteus_dt
40269  * if self.model is not None:
40270  * try: # <<<<<<<<<<<<<<
40271  * self.proteus_dt = self.model.levelModelList[-1].dt_last
40272  * self.proteus_dt_next = self.model.levelModelList[-1].dt_last # wrong prediction is varying time step
40273  */
40274  }
40275  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
40276  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
40277  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
40278  goto __pyx_L9_try_end;
40279  __pyx_L4_error:;
40280  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40281  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
40282 
40283  /* "mbd/CouplingFSI.pyx":1581
40284  * self.proteus_dt_next = self.model.levelModelList[-1].dt_last # wrong prediction is varying time step
40285  * self.t = t = self.model.stepController.t_model_last
40286  * except: # <<<<<<<<<<<<<<
40287  * self.proteus_dt = self.dt_init
40288  * self.t = t = 0.
40289  */
40290  /*except:*/ {
40291  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
40292  if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_9) < 0) __PYX_ERR(0, 1581, __pyx_L6_except_error)
40293  __Pyx_GOTREF(__pyx_t_8);
40294  __Pyx_GOTREF(__pyx_t_7);
40295  __Pyx_GOTREF(__pyx_t_9);
40296 
40297  /* "mbd/CouplingFSI.pyx":1582
40298  * self.t = t = self.model.stepController.t_model_last
40299  * except:
40300  * self.proteus_dt = self.dt_init # <<<<<<<<<<<<<<
40301  * self.t = t = 0.
40302  * elif proteus_dt is not None:
40303  */
40304  __pyx_t_1 = __pyx_v_self->dt_init;
40305  __pyx_v_self->proteus_dt = __pyx_t_1;
40306 
40307  /* "mbd/CouplingFSI.pyx":1583
40308  * except:
40309  * self.proteus_dt = self.dt_init
40310  * self.t = t = 0. # <<<<<<<<<<<<<<
40311  * elif proteus_dt is not None:
40312  * self.proteus_dt = proteus_dt
40313  */
40314  __pyx_v_self->t = 0.;
40315  __Pyx_INCREF(__pyx_float_0_);
40316  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_float_0_);
40317  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
40318  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40319  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
40320  goto __pyx_L5_exception_handled;
40321  }
40322  __pyx_L6_except_error:;
40323 
40324  /* "mbd/CouplingFSI.pyx":1577
40325  * self.proteus_dt_last = self.proteus_dt
40326  * if self.model is not None:
40327  * try: # <<<<<<<<<<<<<<
40328  * self.proteus_dt = self.model.levelModelList[-1].dt_last
40329  * self.proteus_dt_next = self.model.levelModelList[-1].dt_last # wrong prediction is varying time step
40330  */
40331  __Pyx_XGIVEREF(__pyx_t_4);
40332  __Pyx_XGIVEREF(__pyx_t_5);
40333  __Pyx_XGIVEREF(__pyx_t_6);
40334  __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
40335  goto __pyx_L1_error;
40336  __pyx_L5_exception_handled:;
40337  __Pyx_XGIVEREF(__pyx_t_4);
40338  __Pyx_XGIVEREF(__pyx_t_5);
40339  __Pyx_XGIVEREF(__pyx_t_6);
40340  __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
40341  __pyx_L9_try_end:;
40342  }
40343 
40344  /* "mbd/CouplingFSI.pyx":1576
40345  * """
40346  * self.proteus_dt_last = self.proteus_dt
40347  * if self.model is not None: # <<<<<<<<<<<<<<
40348  * try:
40349  * self.proteus_dt = self.model.levelModelList[-1].dt_last
40350  */
40351  goto __pyx_L3;
40352  }
40353 
40354  /* "mbd/CouplingFSI.pyx":1584
40355  * self.proteus_dt = self.dt_init
40356  * self.t = t = 0.
40357  * elif proteus_dt is not None: # <<<<<<<<<<<<<<
40358  * self.proteus_dt = proteus_dt
40359  * self.proteus_dt_next = proteus_dt # BAD PREDICTION IF TIME STEP NOT REGULAR
40360  */
40361  __pyx_t_3 = (__pyx_v_proteus_dt != Py_None);
40362  __pyx_t_2 = (__pyx_t_3 != 0);
40363  if (__pyx_t_2) {
40364 
40365  /* "mbd/CouplingFSI.pyx":1585
40366  * self.t = t = 0.
40367  * elif proteus_dt is not None:
40368  * self.proteus_dt = proteus_dt # <<<<<<<<<<<<<<
40369  * self.proteus_dt_next = proteus_dt # BAD PREDICTION IF TIME STEP NOT REGULAR
40370  * self.t = t = self.ChSystem.GetChTime()
40371  */
40372  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_proteus_dt); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L1_error)
40373  __pyx_v_self->proteus_dt = __pyx_t_1;
40374 
40375  /* "mbd/CouplingFSI.pyx":1586
40376  * elif proteus_dt is not None:
40377  * self.proteus_dt = proteus_dt
40378  * self.proteus_dt_next = proteus_dt # BAD PREDICTION IF TIME STEP NOT REGULAR # <<<<<<<<<<<<<<
40379  * self.t = t = self.ChSystem.GetChTime()
40380  * else:
40381  */
40382  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_proteus_dt); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1586, __pyx_L1_error)
40383  __pyx_v_self->proteus_dt_next = __pyx_t_1;
40384 
40385  /* "mbd/CouplingFSI.pyx":1587
40386  * self.proteus_dt = proteus_dt
40387  * self.proteus_dt_next = proteus_dt # BAD PREDICTION IF TIME STEP NOT REGULAR
40388  * self.t = t = self.ChSystem.GetChTime() # <<<<<<<<<<<<<<
40389  * else:
40390  * sys.exit('ProtChSystem: no time step set in calculate()')
40391  */
40392  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1587, __pyx_L1_error)
40393  __Pyx_GOTREF(__pyx_t_7);
40394  __pyx_t_8 = NULL;
40395  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
40396  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
40397  if (likely(__pyx_t_8)) {
40398  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
40399  __Pyx_INCREF(__pyx_t_8);
40400  __Pyx_INCREF(function);
40401  __Pyx_DECREF_SET(__pyx_t_7, function);
40402  }
40403  }
40404  __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
40405  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
40406  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1587, __pyx_L1_error)
40407  __Pyx_GOTREF(__pyx_t_9);
40408  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40409  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_t_9); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1587, __pyx_L1_error)
40410  __pyx_v_self->t = __pyx_t_1;
40411  __Pyx_INCREF(__pyx_t_9);
40412  __pyx_v_t = __pyx_t_9;
40413  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40414 
40415  /* "mbd/CouplingFSI.pyx":1584
40416  * self.proteus_dt = self.dt_init
40417  * self.t = t = 0.
40418  * elif proteus_dt is not None: # <<<<<<<<<<<<<<
40419  * self.proteus_dt = proteus_dt
40420  * self.proteus_dt_next = proteus_dt # BAD PREDICTION IF TIME STEP NOT REGULAR
40421  */
40422  goto __pyx_L3;
40423  }
40424 
40425  /* "mbd/CouplingFSI.pyx":1589
40426  * self.t = t = self.ChSystem.GetChTime()
40427  * else:
40428  * sys.exit('ProtChSystem: no time step set in calculate()') # <<<<<<<<<<<<<<
40429  * if self.model is not None:
40430  * if self.build_kdtree is True:
40431  */
40432  /*else*/ {
40433  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1589, __pyx_L1_error)
40434  __Pyx_GOTREF(__pyx_t_7);
40435  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_exit_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1589, __pyx_L1_error)
40436  __Pyx_GOTREF(__pyx_t_8);
40437  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40438  __pyx_t_7 = NULL;
40439  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
40440  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
40441  if (likely(__pyx_t_7)) {
40442  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
40443  __Pyx_INCREF(__pyx_t_7);
40444  __Pyx_INCREF(function);
40445  __Pyx_DECREF_SET(__pyx_t_8, function);
40446  }
40447  }
40448  __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_kp_s_ProtChSystem_no_time_step_set_in) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s_ProtChSystem_no_time_step_set_in);
40449  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40450  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1589, __pyx_L1_error)
40451  __Pyx_GOTREF(__pyx_t_9);
40452  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40453  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40454  }
40455  __pyx_L3:;
40456 
40457  /* "mbd/CouplingFSI.pyx":1590
40458  * else:
40459  * sys.exit('ProtChSystem: no time step set in calculate()')
40460  * if self.model is not None: # <<<<<<<<<<<<<<
40461  * if self.build_kdtree is True:
40462  * Profiling.logEvent("Building k-d tree for mooring nodes lookup")
40463  */
40464  __pyx_t_2 = (__pyx_v_self->model != Py_None);
40465  __pyx_t_3 = (__pyx_t_2 != 0);
40466  if (__pyx_t_3) {
40467 
40468  /* "mbd/CouplingFSI.pyx":1591
40469  * sys.exit('ProtChSystem: no time step set in calculate()')
40470  * if self.model is not None:
40471  * if self.build_kdtree is True: # <<<<<<<<<<<<<<
40472  * Profiling.logEvent("Building k-d tree for mooring nodes lookup")
40473  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
40474  */
40475  __pyx_t_3 = ((__pyx_v_self->build_kdtree == 1) != 0);
40476  if (__pyx_t_3) {
40477 
40478  /* "mbd/CouplingFSI.pyx":1592
40479  * if self.model is not None:
40480  * if self.build_kdtree is True:
40481  * Profiling.logEvent("Building k-d tree for mooring nodes lookup") # <<<<<<<<<<<<<<
40482  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
40483  * if t >= self.next_sample:
40484  */
40485  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1592, __pyx_L1_error)
40486  __Pyx_GOTREF(__pyx_t_8);
40487  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1592, __pyx_L1_error)
40488  __Pyx_GOTREF(__pyx_t_7);
40489  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40490  __pyx_t_8 = NULL;
40491  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
40492  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
40493  if (likely(__pyx_t_8)) {
40494  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
40495  __Pyx_INCREF(__pyx_t_8);
40496  __Pyx_INCREF(function);
40497  __Pyx_DECREF_SET(__pyx_t_7, function);
40498  }
40499  }
40500  __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_kp_s_Building_k_d_tree_for_mooring_no) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_kp_s_Building_k_d_tree_for_mooring_no);
40501  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
40502  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1592, __pyx_L1_error)
40503  __Pyx_GOTREF(__pyx_t_9);
40504  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40505  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40506 
40507  /* "mbd/CouplingFSI.pyx":1593
40508  * if self.build_kdtree is True:
40509  * Profiling.logEvent("Building k-d tree for mooring nodes lookup")
40510  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray) # <<<<<<<<<<<<<<
40511  * if t >= self.next_sample:
40512  * self.record_values = True
40513  */
40514  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_spatial); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1593, __pyx_L1_error)
40515  __Pyx_GOTREF(__pyx_t_7);
40516  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_cKDTree); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1593, __pyx_L1_error)
40517  __Pyx_GOTREF(__pyx_t_8);
40518  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40519  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1593, __pyx_L1_error)
40520  __Pyx_GOTREF(__pyx_t_7);
40521  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_7, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1593, __pyx_L1_error)
40522  __Pyx_GOTREF(__pyx_t_10);
40523  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40524  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_mesh); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1593, __pyx_L1_error)
40525  __Pyx_GOTREF(__pyx_t_7);
40526  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40527  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1593, __pyx_L1_error)
40528  __Pyx_GOTREF(__pyx_t_10);
40529  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
40530  __pyx_t_7 = NULL;
40531  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
40532  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
40533  if (likely(__pyx_t_7)) {
40534  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
40535  __Pyx_INCREF(__pyx_t_7);
40536  __Pyx_INCREF(function);
40537  __Pyx_DECREF_SET(__pyx_t_8, function);
40538  }
40539  }
40540  __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10);
40541  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40542  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40543  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1593, __pyx_L1_error)
40544  __Pyx_GOTREF(__pyx_t_9);
40545  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40546  __Pyx_GIVEREF(__pyx_t_9);
40547  __Pyx_GOTREF(__pyx_v_self->nodes_kdtree);
40548  __Pyx_DECREF(__pyx_v_self->nodes_kdtree);
40549  __pyx_v_self->nodes_kdtree = __pyx_t_9;
40550  __pyx_t_9 = 0;
40551 
40552  /* "mbd/CouplingFSI.pyx":1591
40553  * sys.exit('ProtChSystem: no time step set in calculate()')
40554  * if self.model is not None:
40555  * if self.build_kdtree is True: # <<<<<<<<<<<<<<
40556  * Profiling.logEvent("Building k-d tree for mooring nodes lookup")
40557  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
40558  */
40559  }
40560 
40561  /* "mbd/CouplingFSI.pyx":1590
40562  * else:
40563  * sys.exit('ProtChSystem: no time step set in calculate()')
40564  * if self.model is not None: # <<<<<<<<<<<<<<
40565  * if self.build_kdtree is True:
40566  * Profiling.logEvent("Building k-d tree for mooring nodes lookup")
40567  */
40568  }
40569 
40570  /* "mbd/CouplingFSI.pyx":1594
40571  * Profiling.logEvent("Building k-d tree for mooring nodes lookup")
40572  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
40573  * if t >= self.next_sample: # <<<<<<<<<<<<<<
40574  * self.record_values = True
40575  * self.next_sample += self.sampleRate
40576  */
40577  if (unlikely(!__pyx_v_t)) { __Pyx_RaiseUnboundLocalError("t"); __PYX_ERR(0, 1594, __pyx_L1_error) }
40578  __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->next_sample); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1594, __pyx_L1_error)
40579  __Pyx_GOTREF(__pyx_t_9);
40580  __pyx_t_8 = PyObject_RichCompare(__pyx_v_t, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1594, __pyx_L1_error)
40581  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40582  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1594, __pyx_L1_error)
40583  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40584  if (__pyx_t_3) {
40585 
40586  /* "mbd/CouplingFSI.pyx":1595
40587  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
40588  * if t >= self.next_sample:
40589  * self.record_values = True # <<<<<<<<<<<<<<
40590  * self.next_sample += self.sampleRate
40591  * import time
40592  */
40593  __pyx_v_self->record_values = 1;
40594 
40595  /* "mbd/CouplingFSI.pyx":1596
40596  * if t >= self.next_sample:
40597  * self.record_values = True
40598  * self.next_sample += self.sampleRate # <<<<<<<<<<<<<<
40599  * import time
40600  * Profiling.logEvent("Chrono prestep")
40601  */
40602  __pyx_v_self->next_sample = (__pyx_v_self->next_sample + __pyx_v_self->sampleRate);
40603 
40604  /* "mbd/CouplingFSI.pyx":1594
40605  * Profiling.logEvent("Building k-d tree for mooring nodes lookup")
40606  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
40607  * if t >= self.next_sample: # <<<<<<<<<<<<<<
40608  * self.record_values = True
40609  * self.next_sample += self.sampleRate
40610  */
40611  }
40612 
40613  /* "mbd/CouplingFSI.pyx":1597
40614  * self.record_values = True
40615  * self.next_sample += self.sampleRate
40616  * import time # <<<<<<<<<<<<<<
40617  * Profiling.logEvent("Chrono prestep")
40618  * for s in self.subcomponents:
40619  */
40620  __pyx_t_8 = __Pyx_Import(__pyx_n_s_time, 0, -1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1597, __pyx_L1_error)
40621  __Pyx_GOTREF(__pyx_t_8);
40622  __pyx_v_time = __pyx_t_8;
40623  __pyx_t_8 = 0;
40624 
40625  /* "mbd/CouplingFSI.pyx":1598
40626  * self.next_sample += self.sampleRate
40627  * import time
40628  * Profiling.logEvent("Chrono prestep") # <<<<<<<<<<<<<<
40629  * for s in self.subcomponents:
40630  * s.prestep()
40631  */
40632  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1598, __pyx_L1_error)
40633  __Pyx_GOTREF(__pyx_t_9);
40634  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1598, __pyx_L1_error)
40635  __Pyx_GOTREF(__pyx_t_10);
40636  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40637  __pyx_t_9 = NULL;
40638  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
40639  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
40640  if (likely(__pyx_t_9)) {
40641  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
40642  __Pyx_INCREF(__pyx_t_9);
40643  __Pyx_INCREF(function);
40644  __Pyx_DECREF_SET(__pyx_t_10, function);
40645  }
40646  }
40647  __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_kp_s_Chrono_prestep) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_s_Chrono_prestep);
40648  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
40649  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1598, __pyx_L1_error)
40650  __Pyx_GOTREF(__pyx_t_8);
40651  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40652  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40653 
40654  /* "mbd/CouplingFSI.pyx":1599
40655  * import time
40656  * Profiling.logEvent("Chrono prestep")
40657  * for s in self.subcomponents: # <<<<<<<<<<<<<<
40658  * s.prestep()
40659  * self.step(self.proteus_dt)
40660  */
40661  if (likely(PyList_CheckExact(__pyx_v_self->subcomponents)) || PyTuple_CheckExact(__pyx_v_self->subcomponents)) {
40662  __pyx_t_8 = __pyx_v_self->subcomponents; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0;
40663  __pyx_t_12 = NULL;
40664  } else {
40665  __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_self->subcomponents); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1599, __pyx_L1_error)
40666  __Pyx_GOTREF(__pyx_t_8);
40667  __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1599, __pyx_L1_error)
40668  }
40669  for (;;) {
40670  if (likely(!__pyx_t_12)) {
40671  if (likely(PyList_CheckExact(__pyx_t_8))) {
40672  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_8)) break;
40673  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
40674  __pyx_t_10 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1599, __pyx_L1_error)
40675  #else
40676  __pyx_t_10 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1599, __pyx_L1_error)
40677  __Pyx_GOTREF(__pyx_t_10);
40678  #endif
40679  } else {
40680  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
40681  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
40682  __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1599, __pyx_L1_error)
40683  #else
40684  __pyx_t_10 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1599, __pyx_L1_error)
40685  __Pyx_GOTREF(__pyx_t_10);
40686  #endif
40687  }
40688  } else {
40689  __pyx_t_10 = __pyx_t_12(__pyx_t_8);
40690  if (unlikely(!__pyx_t_10)) {
40691  PyObject* exc_type = PyErr_Occurred();
40692  if (exc_type) {
40693  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
40694  else __PYX_ERR(0, 1599, __pyx_L1_error)
40695  }
40696  break;
40697  }
40698  __Pyx_GOTREF(__pyx_t_10);
40699  }
40700  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_10);
40701  __pyx_t_10 = 0;
40702 
40703  /* "mbd/CouplingFSI.pyx":1600
40704  * Profiling.logEvent("Chrono prestep")
40705  * for s in self.subcomponents:
40706  * s.prestep() # <<<<<<<<<<<<<<
40707  * self.step(self.proteus_dt)
40708  * Profiling.logEvent("Chrono poststep")
40709  */
40710  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_prestep); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1600, __pyx_L1_error)
40711  __Pyx_GOTREF(__pyx_t_9);
40712  __pyx_t_7 = NULL;
40713  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
40714  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
40715  if (likely(__pyx_t_7)) {
40716  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
40717  __Pyx_INCREF(__pyx_t_7);
40718  __Pyx_INCREF(function);
40719  __Pyx_DECREF_SET(__pyx_t_9, function);
40720  }
40721  }
40722  __pyx_t_10 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
40723  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40724  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1600, __pyx_L1_error)
40725  __Pyx_GOTREF(__pyx_t_10);
40726  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40727  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40728 
40729  /* "mbd/CouplingFSI.pyx":1599
40730  * import time
40731  * Profiling.logEvent("Chrono prestep")
40732  * for s in self.subcomponents: # <<<<<<<<<<<<<<
40733  * s.prestep()
40734  * self.step(self.proteus_dt)
40735  */
40736  }
40737  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40738 
40739  /* "mbd/CouplingFSI.pyx":1601
40740  * for s in self.subcomponents:
40741  * s.prestep()
40742  * self.step(self.proteus_dt) # <<<<<<<<<<<<<<
40743  * Profiling.logEvent("Chrono poststep")
40744  * for s in self.subcomponents:
40745  */
40746  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_step); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1601, __pyx_L1_error)
40747  __Pyx_GOTREF(__pyx_t_10);
40748  __pyx_t_9 = PyFloat_FromDouble(__pyx_v_self->proteus_dt); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1601, __pyx_L1_error)
40749  __Pyx_GOTREF(__pyx_t_9);
40750  __pyx_t_7 = NULL;
40751  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
40752  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
40753  if (likely(__pyx_t_7)) {
40754  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
40755  __Pyx_INCREF(__pyx_t_7);
40756  __Pyx_INCREF(function);
40757  __Pyx_DECREF_SET(__pyx_t_10, function);
40758  }
40759  }
40760  __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_7, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9);
40761  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40762  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40763  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1601, __pyx_L1_error)
40764  __Pyx_GOTREF(__pyx_t_8);
40765  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40766  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40767 
40768  /* "mbd/CouplingFSI.pyx":1602
40769  * s.prestep()
40770  * self.step(self.proteus_dt)
40771  * Profiling.logEvent("Chrono poststep") # <<<<<<<<<<<<<<
40772  * for s in self.subcomponents:
40773  * s.poststep()
40774  */
40775  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1602, __pyx_L1_error)
40776  __Pyx_GOTREF(__pyx_t_10);
40777  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1602, __pyx_L1_error)
40778  __Pyx_GOTREF(__pyx_t_9);
40779  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40780  __pyx_t_10 = NULL;
40781  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
40782  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
40783  if (likely(__pyx_t_10)) {
40784  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
40785  __Pyx_INCREF(__pyx_t_10);
40786  __Pyx_INCREF(function);
40787  __Pyx_DECREF_SET(__pyx_t_9, function);
40788  }
40789  }
40790  __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_s_Chrono_poststep) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_Chrono_poststep);
40791  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
40792  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1602, __pyx_L1_error)
40793  __Pyx_GOTREF(__pyx_t_8);
40794  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40795  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40796 
40797  /* "mbd/CouplingFSI.pyx":1603
40798  * self.step(self.proteus_dt)
40799  * Profiling.logEvent("Chrono poststep")
40800  * for s in self.subcomponents: # <<<<<<<<<<<<<<
40801  * s.poststep()
40802  *
40803  */
40804  if (likely(PyList_CheckExact(__pyx_v_self->subcomponents)) || PyTuple_CheckExact(__pyx_v_self->subcomponents)) {
40805  __pyx_t_8 = __pyx_v_self->subcomponents; __Pyx_INCREF(__pyx_t_8); __pyx_t_11 = 0;
40806  __pyx_t_12 = NULL;
40807  } else {
40808  __pyx_t_11 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_v_self->subcomponents); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1603, __pyx_L1_error)
40809  __Pyx_GOTREF(__pyx_t_8);
40810  __pyx_t_12 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1603, __pyx_L1_error)
40811  }
40812  for (;;) {
40813  if (likely(!__pyx_t_12)) {
40814  if (likely(PyList_CheckExact(__pyx_t_8))) {
40815  if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_8)) break;
40816  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
40817  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_9); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1603, __pyx_L1_error)
40818  #else
40819  __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1603, __pyx_L1_error)
40820  __Pyx_GOTREF(__pyx_t_9);
40821  #endif
40822  } else {
40823  if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
40824  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
40825  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_11); __Pyx_INCREF(__pyx_t_9); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1603, __pyx_L1_error)
40826  #else
40827  __pyx_t_9 = PySequence_ITEM(__pyx_t_8, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1603, __pyx_L1_error)
40828  __Pyx_GOTREF(__pyx_t_9);
40829  #endif
40830  }
40831  } else {
40832  __pyx_t_9 = __pyx_t_12(__pyx_t_8);
40833  if (unlikely(!__pyx_t_9)) {
40834  PyObject* exc_type = PyErr_Occurred();
40835  if (exc_type) {
40836  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
40837  else __PYX_ERR(0, 1603, __pyx_L1_error)
40838  }
40839  break;
40840  }
40841  __Pyx_GOTREF(__pyx_t_9);
40842  }
40843  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_9);
40844  __pyx_t_9 = 0;
40845 
40846  /* "mbd/CouplingFSI.pyx":1604
40847  * Profiling.logEvent("Chrono poststep")
40848  * for s in self.subcomponents:
40849  * s.poststep() # <<<<<<<<<<<<<<
40850  *
40851  * # Log the chrono phyics of interest
40852  */
40853  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_poststep); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1604, __pyx_L1_error)
40854  __Pyx_GOTREF(__pyx_t_10);
40855  __pyx_t_7 = NULL;
40856  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
40857  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_10);
40858  if (likely(__pyx_t_7)) {
40859  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
40860  __Pyx_INCREF(__pyx_t_7);
40861  __Pyx_INCREF(function);
40862  __Pyx_DECREF_SET(__pyx_t_10, function);
40863  }
40864  }
40865  __pyx_t_9 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
40866  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40867  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1604, __pyx_L1_error)
40868  __Pyx_GOTREF(__pyx_t_9);
40869  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40870  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40871 
40872  /* "mbd/CouplingFSI.pyx":1603
40873  * self.step(self.proteus_dt)
40874  * Profiling.logEvent("Chrono poststep")
40875  * for s in self.subcomponents: # <<<<<<<<<<<<<<
40876  * s.poststep()
40877  *
40878  */
40879  }
40880  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40881 
40882  /* "mbd/CouplingFSI.pyx":1607
40883  *
40884  * # Log the chrono phyics of interest
40885  * if self.log_chrono_bodies: # <<<<<<<<<<<<<<
40886  * if self.log_chrono_format == 'h5':
40887  * self.log_bodies_h5(self.log_chrono_bodies)
40888  */
40889  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->log_chrono_bodies); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1607, __pyx_L1_error)
40890  if (__pyx_t_3) {
40891 
40892  /* "mbd/CouplingFSI.pyx":1608
40893  * # Log the chrono phyics of interest
40894  * if self.log_chrono_bodies:
40895  * if self.log_chrono_format == 'h5': # <<<<<<<<<<<<<<
40896  * self.log_bodies_h5(self.log_chrono_bodies)
40897  * else:
40898  */
40899  __pyx_t_3 = ((__pyx_v_self->log_chrono_format == ((char const *)"h5")) != 0);
40900  if (__pyx_t_3) {
40901 
40902  /* "mbd/CouplingFSI.pyx":1609
40903  * if self.log_chrono_bodies:
40904  * if self.log_chrono_format == 'h5':
40905  * self.log_bodies_h5(self.log_chrono_bodies) # <<<<<<<<<<<<<<
40906  * else:
40907  * self.log_bodies_text(self.t + self.proteus_dt, self.log_chrono_bodies)
40908  */
40909  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_bodies_h5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1609, __pyx_L1_error)
40910  __Pyx_GOTREF(__pyx_t_9);
40911  __pyx_t_10 = NULL;
40912  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
40913  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
40914  if (likely(__pyx_t_10)) {
40915  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
40916  __Pyx_INCREF(__pyx_t_10);
40917  __Pyx_INCREF(function);
40918  __Pyx_DECREF_SET(__pyx_t_9, function);
40919  }
40920  }
40921  __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_v_self->log_chrono_bodies) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_self->log_chrono_bodies);
40922  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
40923  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1609, __pyx_L1_error)
40924  __Pyx_GOTREF(__pyx_t_8);
40925  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40926  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40927 
40928  /* "mbd/CouplingFSI.pyx":1608
40929  * # Log the chrono phyics of interest
40930  * if self.log_chrono_bodies:
40931  * if self.log_chrono_format == 'h5': # <<<<<<<<<<<<<<
40932  * self.log_bodies_h5(self.log_chrono_bodies)
40933  * else:
40934  */
40935  goto __pyx_L20;
40936  }
40937 
40938  /* "mbd/CouplingFSI.pyx":1611
40939  * self.log_bodies_h5(self.log_chrono_bodies)
40940  * else:
40941  * self.log_bodies_text(self.t + self.proteus_dt, self.log_chrono_bodies) # <<<<<<<<<<<<<<
40942  *
40943  * if self.log_chrono_springs:
40944  */
40945  /*else*/ {
40946  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_bodies_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1611, __pyx_L1_error)
40947  __Pyx_GOTREF(__pyx_t_9);
40948  __pyx_t_10 = PyFloat_FromDouble((__pyx_v_self->t + __pyx_v_self->proteus_dt)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1611, __pyx_L1_error)
40949  __Pyx_GOTREF(__pyx_t_10);
40950  __pyx_t_7 = NULL;
40951  __pyx_t_13 = 0;
40952  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
40953  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
40954  if (likely(__pyx_t_7)) {
40955  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
40956  __Pyx_INCREF(__pyx_t_7);
40957  __Pyx_INCREF(function);
40958  __Pyx_DECREF_SET(__pyx_t_9, function);
40959  __pyx_t_13 = 1;
40960  }
40961  }
40962  #if CYTHON_FAST_PYCALL
40963  if (PyFunction_Check(__pyx_t_9)) {
40964  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_v_self->log_chrono_bodies};
40965  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1611, __pyx_L1_error)
40966  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40967  __Pyx_GOTREF(__pyx_t_8);
40968  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40969  } else
40970  #endif
40971  #if CYTHON_FAST_PYCCALL
40972  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
40973  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_10, __pyx_v_self->log_chrono_bodies};
40974  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1611, __pyx_L1_error)
40975  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
40976  __Pyx_GOTREF(__pyx_t_8);
40977  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
40978  } else
40979  #endif
40980  {
40981  __pyx_t_14 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1611, __pyx_L1_error)
40982  __Pyx_GOTREF(__pyx_t_14);
40983  if (__pyx_t_7) {
40984  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_7); __pyx_t_7 = NULL;
40985  }
40986  __Pyx_GIVEREF(__pyx_t_10);
40987  PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_t_10);
40988  __Pyx_INCREF(__pyx_v_self->log_chrono_bodies);
40989  __Pyx_GIVEREF(__pyx_v_self->log_chrono_bodies);
40990  PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_v_self->log_chrono_bodies);
40991  __pyx_t_10 = 0;
40992  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1611, __pyx_L1_error)
40993  __Pyx_GOTREF(__pyx_t_8);
40994  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
40995  }
40996  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
40997  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
40998  }
40999  __pyx_L20:;
41000 
41001  /* "mbd/CouplingFSI.pyx":1607
41002  *
41003  * # Log the chrono phyics of interest
41004  * if self.log_chrono_bodies: # <<<<<<<<<<<<<<
41005  * if self.log_chrono_format == 'h5':
41006  * self.log_bodies_h5(self.log_chrono_bodies)
41007  */
41008  }
41009 
41010  /* "mbd/CouplingFSI.pyx":1613
41011  * self.log_bodies_text(self.t + self.proteus_dt, self.log_chrono_bodies)
41012  *
41013  * if self.log_chrono_springs: # <<<<<<<<<<<<<<
41014  * if self.log_chrono_format == 'h5':
41015  * self.log_springs_h5(self.log_chrono_springs)
41016  */
41017  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->log_chrono_springs); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1613, __pyx_L1_error)
41018  if (__pyx_t_3) {
41019 
41020  /* "mbd/CouplingFSI.pyx":1614
41021  *
41022  * if self.log_chrono_springs:
41023  * if self.log_chrono_format == 'h5': # <<<<<<<<<<<<<<
41024  * self.log_springs_h5(self.log_chrono_springs)
41025  * else:
41026  */
41027  __pyx_t_3 = ((__pyx_v_self->log_chrono_format == ((char const *)"h5")) != 0);
41028  if (__pyx_t_3) {
41029 
41030  /* "mbd/CouplingFSI.pyx":1615
41031  * if self.log_chrono_springs:
41032  * if self.log_chrono_format == 'h5':
41033  * self.log_springs_h5(self.log_chrono_springs) # <<<<<<<<<<<<<<
41034  * else:
41035  * self.log_springs_text(self.t + self.proteus_dt, self.log_chrono_springs)
41036  */
41037  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_springs_h5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1615, __pyx_L1_error)
41038  __Pyx_GOTREF(__pyx_t_9);
41039  __pyx_t_14 = NULL;
41040  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
41041  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
41042  if (likely(__pyx_t_14)) {
41043  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
41044  __Pyx_INCREF(__pyx_t_14);
41045  __Pyx_INCREF(function);
41046  __Pyx_DECREF_SET(__pyx_t_9, function);
41047  }
41048  }
41049  __pyx_t_8 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_14, __pyx_v_self->log_chrono_springs) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_self->log_chrono_springs);
41050  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
41051  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1615, __pyx_L1_error)
41052  __Pyx_GOTREF(__pyx_t_8);
41053  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41054  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
41055 
41056  /* "mbd/CouplingFSI.pyx":1614
41057  *
41058  * if self.log_chrono_springs:
41059  * if self.log_chrono_format == 'h5': # <<<<<<<<<<<<<<
41060  * self.log_springs_h5(self.log_chrono_springs)
41061  * else:
41062  */
41063  goto __pyx_L22;
41064  }
41065 
41066  /* "mbd/CouplingFSI.pyx":1617
41067  * self.log_springs_h5(self.log_chrono_springs)
41068  * else:
41069  * self.log_springs_text(self.t + self.proteus_dt, self.log_chrono_springs) # <<<<<<<<<<<<<<
41070  *
41071  * if self.log_chrono_residuals:
41072  */
41073  /*else*/ {
41074  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_springs_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1617, __pyx_L1_error)
41075  __Pyx_GOTREF(__pyx_t_9);
41076  __pyx_t_14 = PyFloat_FromDouble((__pyx_v_self->t + __pyx_v_self->proteus_dt)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1617, __pyx_L1_error)
41077  __Pyx_GOTREF(__pyx_t_14);
41078  __pyx_t_10 = NULL;
41079  __pyx_t_13 = 0;
41080  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
41081  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
41082  if (likely(__pyx_t_10)) {
41083  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
41084  __Pyx_INCREF(__pyx_t_10);
41085  __Pyx_INCREF(function);
41086  __Pyx_DECREF_SET(__pyx_t_9, function);
41087  __pyx_t_13 = 1;
41088  }
41089  }
41090  #if CYTHON_FAST_PYCALL
41091  if (PyFunction_Check(__pyx_t_9)) {
41092  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_14, __pyx_v_self->log_chrono_springs};
41093  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1617, __pyx_L1_error)
41094  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
41095  __Pyx_GOTREF(__pyx_t_8);
41096  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
41097  } else
41098  #endif
41099  #if CYTHON_FAST_PYCCALL
41100  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
41101  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_14, __pyx_v_self->log_chrono_springs};
41102  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1617, __pyx_L1_error)
41103  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
41104  __Pyx_GOTREF(__pyx_t_8);
41105  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
41106  } else
41107  #endif
41108  {
41109  __pyx_t_7 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1617, __pyx_L1_error)
41110  __Pyx_GOTREF(__pyx_t_7);
41111  if (__pyx_t_10) {
41112  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
41113  }
41114  __Pyx_GIVEREF(__pyx_t_14);
41115  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_13, __pyx_t_14);
41116  __Pyx_INCREF(__pyx_v_self->log_chrono_springs);
41117  __Pyx_GIVEREF(__pyx_v_self->log_chrono_springs);
41118  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_13, __pyx_v_self->log_chrono_springs);
41119  __pyx_t_14 = 0;
41120  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1617, __pyx_L1_error)
41121  __Pyx_GOTREF(__pyx_t_8);
41122  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
41123  }
41124  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41125  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
41126  }
41127  __pyx_L22:;
41128 
41129  /* "mbd/CouplingFSI.pyx":1613
41130  * self.log_bodies_text(self.t + self.proteus_dt, self.log_chrono_bodies)
41131  *
41132  * if self.log_chrono_springs: # <<<<<<<<<<<<<<
41133  * if self.log_chrono_format == 'h5':
41134  * self.log_springs_h5(self.log_chrono_springs)
41135  */
41136  }
41137 
41138  /* "mbd/CouplingFSI.pyx":1619
41139  * self.log_springs_text(self.t + self.proteus_dt, self.log_chrono_springs)
41140  *
41141  * if self.log_chrono_residuals: # <<<<<<<<<<<<<<
41142  * if self.log_chrono_format == 'h5':
41143  * self.log_residuals_h5(self.log_chrono_residuals)
41144  */
41145  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->log_chrono_residuals); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1619, __pyx_L1_error)
41146  if (__pyx_t_3) {
41147 
41148  /* "mbd/CouplingFSI.pyx":1620
41149  *
41150  * if self.log_chrono_residuals:
41151  * if self.log_chrono_format == 'h5': # <<<<<<<<<<<<<<
41152  * self.log_residuals_h5(self.log_chrono_residuals)
41153  * else:
41154  */
41155  __pyx_t_3 = ((__pyx_v_self->log_chrono_format == ((char const *)"h5")) != 0);
41156  if (__pyx_t_3) {
41157 
41158  /* "mbd/CouplingFSI.pyx":1621
41159  * if self.log_chrono_residuals:
41160  * if self.log_chrono_format == 'h5':
41161  * self.log_residuals_h5(self.log_chrono_residuals) # <<<<<<<<<<<<<<
41162  * else:
41163  * self.log_residuals_text(self.t + self.proteus_dt, self.log_chrono_residuals)
41164  */
41165  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_residuals_h5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1621, __pyx_L1_error)
41166  __Pyx_GOTREF(__pyx_t_9);
41167  __pyx_t_7 = NULL;
41168  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
41169  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
41170  if (likely(__pyx_t_7)) {
41171  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
41172  __Pyx_INCREF(__pyx_t_7);
41173  __Pyx_INCREF(function);
41174  __Pyx_DECREF_SET(__pyx_t_9, function);
41175  }
41176  }
41177  __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_7, __pyx_v_self->log_chrono_residuals) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_v_self->log_chrono_residuals);
41178  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
41179  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1621, __pyx_L1_error)
41180  __Pyx_GOTREF(__pyx_t_8);
41181  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41182  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
41183 
41184  /* "mbd/CouplingFSI.pyx":1620
41185  *
41186  * if self.log_chrono_residuals:
41187  * if self.log_chrono_format == 'h5': # <<<<<<<<<<<<<<
41188  * self.log_residuals_h5(self.log_chrono_residuals)
41189  * else:
41190  */
41191  goto __pyx_L24;
41192  }
41193 
41194  /* "mbd/CouplingFSI.pyx":1623
41195  * self.log_residuals_h5(self.log_chrono_residuals)
41196  * else:
41197  * self.log_residuals_text(self.t + self.proteus_dt, self.log_chrono_residuals) # <<<<<<<<<<<<<<
41198  *
41199  * if (self.log_chrono_bodies or self.log_chrono_springs or self.log_chrono_residuals) \
41200  */
41201  /*else*/ {
41202  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_residuals_text); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L1_error)
41203  __Pyx_GOTREF(__pyx_t_9);
41204  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_self->t + __pyx_v_self->proteus_dt)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1623, __pyx_L1_error)
41205  __Pyx_GOTREF(__pyx_t_7);
41206  __pyx_t_14 = NULL;
41207  __pyx_t_13 = 0;
41208  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
41209  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_9);
41210  if (likely(__pyx_t_14)) {
41211  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
41212  __Pyx_INCREF(__pyx_t_14);
41213  __Pyx_INCREF(function);
41214  __Pyx_DECREF_SET(__pyx_t_9, function);
41215  __pyx_t_13 = 1;
41216  }
41217  }
41218  #if CYTHON_FAST_PYCALL
41219  if (PyFunction_Check(__pyx_t_9)) {
41220  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_v_self->log_chrono_residuals};
41221  __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1623, __pyx_L1_error)
41222  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
41223  __Pyx_GOTREF(__pyx_t_8);
41224  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
41225  } else
41226  #endif
41227  #if CYTHON_FAST_PYCCALL
41228  if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
41229  PyObject *__pyx_temp[3] = {__pyx_t_14, __pyx_t_7, __pyx_v_self->log_chrono_residuals};
41230  __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1623, __pyx_L1_error)
41231  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
41232  __Pyx_GOTREF(__pyx_t_8);
41233  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
41234  } else
41235  #endif
41236  {
41237  __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1623, __pyx_L1_error)
41238  __Pyx_GOTREF(__pyx_t_10);
41239  if (__pyx_t_14) {
41240  __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_14); __pyx_t_14 = NULL;
41241  }
41242  __Pyx_GIVEREF(__pyx_t_7);
41243  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_t_7);
41244  __Pyx_INCREF(__pyx_v_self->log_chrono_residuals);
41245  __Pyx_GIVEREF(__pyx_v_self->log_chrono_residuals);
41246  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_v_self->log_chrono_residuals);
41247  __pyx_t_7 = 0;
41248  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1623, __pyx_L1_error)
41249  __Pyx_GOTREF(__pyx_t_8);
41250  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41251  }
41252  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41253  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
41254  }
41255  __pyx_L24:;
41256 
41257  /* "mbd/CouplingFSI.pyx":1619
41258  * self.log_springs_text(self.t + self.proteus_dt, self.log_chrono_springs)
41259  *
41260  * if self.log_chrono_residuals: # <<<<<<<<<<<<<<
41261  * if self.log_chrono_format == 'h5':
41262  * self.log_residuals_h5(self.log_chrono_residuals)
41263  */
41264  }
41265 
41266  /* "mbd/CouplingFSI.pyx":1625
41267  * self.log_residuals_text(self.t + self.proteus_dt, self.log_chrono_residuals)
41268  *
41269  * if (self.log_chrono_bodies or self.log_chrono_springs or self.log_chrono_residuals) \ # <<<<<<<<<<<<<<
41270  * and self.log_chrono_format == 'h5':
41271  * self.log_times_h5(self.t + self.proteus_dt)
41272  */
41273  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->log_chrono_bodies); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1625, __pyx_L1_error)
41274  if (!__pyx_t_2) {
41275  } else {
41276  goto __pyx_L27_next_and;
41277  }
41278  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->log_chrono_springs); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1625, __pyx_L1_error)
41279  if (!__pyx_t_2) {
41280  } else {
41281  goto __pyx_L27_next_and;
41282  }
41283  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_self->log_chrono_residuals); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1625, __pyx_L1_error)
41284  if (__pyx_t_2) {
41285  } else {
41286  __pyx_t_3 = __pyx_t_2;
41287  goto __pyx_L26_bool_binop_done;
41288  }
41289  __pyx_L27_next_and:;
41290 
41291  /* "mbd/CouplingFSI.pyx":1626
41292  *
41293  * if (self.log_chrono_bodies or self.log_chrono_springs or self.log_chrono_residuals) \
41294  * and self.log_chrono_format == 'h5': # <<<<<<<<<<<<<<
41295  * self.log_times_h5(self.t + self.proteus_dt)
41296  *
41297  */
41298  __pyx_t_2 = ((__pyx_v_self->log_chrono_format == ((char const *)"h5")) != 0);
41299  __pyx_t_3 = __pyx_t_2;
41300  __pyx_L26_bool_binop_done:;
41301 
41302  /* "mbd/CouplingFSI.pyx":1625
41303  * self.log_residuals_text(self.t + self.proteus_dt, self.log_chrono_residuals)
41304  *
41305  * if (self.log_chrono_bodies or self.log_chrono_springs or self.log_chrono_residuals) \ # <<<<<<<<<<<<<<
41306  * and self.log_chrono_format == 'h5':
41307  * self.log_times_h5(self.t + self.proteus_dt)
41308  */
41309  if (__pyx_t_3) {
41310 
41311  /* "mbd/CouplingFSI.pyx":1627
41312  * if (self.log_chrono_bodies or self.log_chrono_springs or self.log_chrono_residuals) \
41313  * and self.log_chrono_format == 'h5':
41314  * self.log_times_h5(self.t + self.proteus_dt) # <<<<<<<<<<<<<<
41315  *
41316  * self.record_values = False
41317  */
41318  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log_times_h5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1627, __pyx_L1_error)
41319  __Pyx_GOTREF(__pyx_t_9);
41320  __pyx_t_10 = PyFloat_FromDouble((__pyx_v_self->t + __pyx_v_self->proteus_dt)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1627, __pyx_L1_error)
41321  __Pyx_GOTREF(__pyx_t_10);
41322  __pyx_t_7 = NULL;
41323  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
41324  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
41325  if (likely(__pyx_t_7)) {
41326  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
41327  __Pyx_INCREF(__pyx_t_7);
41328  __Pyx_INCREF(function);
41329  __Pyx_DECREF_SET(__pyx_t_9, function);
41330  }
41331  }
41332  __pyx_t_8 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_7, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10);
41333  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
41334  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41335  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1627, __pyx_L1_error)
41336  __Pyx_GOTREF(__pyx_t_8);
41337  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41338  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
41339 
41340  /* "mbd/CouplingFSI.pyx":1625
41341  * self.log_residuals_text(self.t + self.proteus_dt, self.log_chrono_residuals)
41342  *
41343  * if (self.log_chrono_bodies or self.log_chrono_springs or self.log_chrono_residuals) \ # <<<<<<<<<<<<<<
41344  * and self.log_chrono_format == 'h5':
41345  * self.log_times_h5(self.t + self.proteus_dt)
41346  */
41347  }
41348 
41349  /* "mbd/CouplingFSI.pyx":1629
41350  * self.log_times_h5(self.t + self.proteus_dt)
41351  *
41352  * self.record_values = False # <<<<<<<<<<<<<<
41353  * self.first_step = False # first step passed
41354  * self.tCount += 1
41355  */
41356  __pyx_v_self->record_values = 0;
41357 
41358  /* "mbd/CouplingFSI.pyx":1630
41359  *
41360  * self.record_values = False
41361  * self.first_step = False # first step passed # <<<<<<<<<<<<<<
41362  * self.tCount += 1
41363  * Profiling.logEvent("Chrono poststep finished")
41364  */
41365  __pyx_v_self->first_step = 0;
41366 
41367  /* "mbd/CouplingFSI.pyx":1631
41368  * self.record_values = False
41369  * self.first_step = False # first step passed
41370  * self.tCount += 1 # <<<<<<<<<<<<<<
41371  * Profiling.logEvent("Chrono poststep finished")
41372  *
41373  */
41374  __pyx_v_self->tCount = (__pyx_v_self->tCount + 1);
41375 
41376  /* "mbd/CouplingFSI.pyx":1632
41377  * self.first_step = False # first step passed
41378  * self.tCount += 1
41379  * Profiling.logEvent("Chrono poststep finished") # <<<<<<<<<<<<<<
41380  *
41381  * def calculate_init(self):
41382  */
41383  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1632, __pyx_L1_error)
41384  __Pyx_GOTREF(__pyx_t_9);
41385  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1632, __pyx_L1_error)
41386  __Pyx_GOTREF(__pyx_t_10);
41387  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
41388  __pyx_t_9 = NULL;
41389  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
41390  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
41391  if (likely(__pyx_t_9)) {
41392  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
41393  __Pyx_INCREF(__pyx_t_9);
41394  __Pyx_INCREF(function);
41395  __Pyx_DECREF_SET(__pyx_t_10, function);
41396  }
41397  }
41398  __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_9, __pyx_kp_s_Chrono_poststep_finished) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_kp_s_Chrono_poststep_finished);
41399  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
41400  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1632, __pyx_L1_error)
41401  __Pyx_GOTREF(__pyx_t_8);
41402  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
41403  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
41404 
41405  /* "mbd/CouplingFSI.pyx":1564
41406  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.))
41407  *
41408  * def calculate(self, proteus_dt=None): # <<<<<<<<<<<<<<
41409  * """Does chrono system calculation for a Proteus time step
41410  * Calls prestep and poststep on all subcomponents (bodies,
41411  */
41412 
41413  /* function exit code */
41414  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
41415  goto __pyx_L0;
41416  __pyx_L1_error:;
41417  __Pyx_XDECREF(__pyx_t_7);
41418  __Pyx_XDECREF(__pyx_t_8);
41419  __Pyx_XDECREF(__pyx_t_9);
41420  __Pyx_XDECREF(__pyx_t_10);
41421  __Pyx_XDECREF(__pyx_t_14);
41422  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
41423  __pyx_r = NULL;
41424  __pyx_L0:;
41425  __Pyx_XDECREF(__pyx_v_t);
41426  __Pyx_XDECREF(__pyx_v_time);
41427  __Pyx_XDECREF(__pyx_v_s);
41428  __Pyx_XGIVEREF(__pyx_r);
41429  __Pyx_TraceReturn(__pyx_r, 0);
41430  __Pyx_RefNannyFinishContext();
41431  return __pyx_r;
41432 }
41433 
41434 /* "mbd/CouplingFSI.pyx":1634
41435  * Profiling.logEvent("Chrono poststep finished")
41436  *
41437  * def calculate_init(self): # <<<<<<<<<<<<<<
41438  * """Does chrono system initialisation
41439  * (!) Must be called before the first calculate() call.
41440  */
41441 
41442 /* Python wrapper */
41443 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_29calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
41444 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_28calculate_init[] = "ProtChSystem.calculate_init(self)\nDoes chrono system initialisation\n (!) Must be called before the first calculate() call.\n Calls calculate_init and poststep on all subcomponents\n (bodies, moorings, etc) attached to the system.\n ";
41445 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_29calculate_init = {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_29calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_28calculate_init};
41446 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_29calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
41447  PyObject *__pyx_r = 0;
41448  __Pyx_RefNannyDeclarations
41449  __Pyx_RefNannySetupContext("calculate_init (wrapper)", 0);
41450  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_28calculate_init(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
41451 
41452  /* function exit code */
41453  __Pyx_RefNannyFinishContext();
41454  return __pyx_r;
41455 }
41456 
41457 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_28calculate_init(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
41458  PyObject *__pyx_v_s = NULL;
41459  PyObject *__pyx_v_c = NULL;
41460  CYTHON_UNUSED int __pyx_v_i;
41461  PyObject *__pyx_r = NULL;
41462  __Pyx_TraceDeclarations
41463  __Pyx_RefNannyDeclarations
41464  int __pyx_t_1;
41465  int __pyx_t_2;
41466  PyObject *__pyx_t_3 = NULL;
41467  PyObject *__pyx_t_4 = NULL;
41468  PyObject *__pyx_t_5 = NULL;
41469  PyObject *__pyx_t_6 = NULL;
41470  Py_ssize_t __pyx_t_7;
41471  PyObject *(*__pyx_t_8)(PyObject *);
41472  std::string __pyx_t_9;
41473  int __pyx_t_10;
41474  PyObject *__pyx_t_11 = NULL;
41475  int __pyx_t_12;
41476  int __pyx_t_13;
41477  int __pyx_lineno = 0;
41478  const char *__pyx_filename = NULL;
41479  int __pyx_clineno = 0;
41480  __Pyx_TraceFrameInit(__pyx_codeobj__114)
41481  __Pyx_RefNannySetupContext("calculate_init", 0);
41482  __Pyx_TraceCall("calculate_init", __pyx_f[0], 1634, 0, __PYX_ERR(0, 1634, __pyx_L1_error));
41483 
41484  /* "mbd/CouplingFSI.pyx":1640
41485  * (bodies, moorings, etc) attached to the system.
41486  * """
41487  * if self.model is not None: # <<<<<<<<<<<<<<
41488  * self.model_mesh = self.model.levelModelList[-1].mesh
41489  * if self.build_kdtree is True:
41490  */
41491  __pyx_t_1 = (__pyx_v_self->model != Py_None);
41492  __pyx_t_2 = (__pyx_t_1 != 0);
41493  if (__pyx_t_2) {
41494 
41495  /* "mbd/CouplingFSI.pyx":1641
41496  * """
41497  * if self.model is not None:
41498  * self.model_mesh = self.model.levelModelList[-1].mesh # <<<<<<<<<<<<<<
41499  * if self.build_kdtree is True:
41500  * Profiling.logEvent("Building k-d tree for mooring nodes lookup on first time step")
41501  */
41502  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
41503  __Pyx_GOTREF(__pyx_t_3);
41504  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1641, __pyx_L1_error)
41505  __Pyx_GOTREF(__pyx_t_4);
41506  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41507  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
41508  __Pyx_GOTREF(__pyx_t_3);
41509  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41510  __Pyx_GIVEREF(__pyx_t_3);
41511  __Pyx_GOTREF(__pyx_v_self->model_mesh);
41512  __Pyx_DECREF(__pyx_v_self->model_mesh);
41513  __pyx_v_self->model_mesh = __pyx_t_3;
41514  __pyx_t_3 = 0;
41515 
41516  /* "mbd/CouplingFSI.pyx":1642
41517  * if self.model is not None:
41518  * self.model_mesh = self.model.levelModelList[-1].mesh
41519  * if self.build_kdtree is True: # <<<<<<<<<<<<<<
41520  * Profiling.logEvent("Building k-d tree for mooring nodes lookup on first time step")
41521  * self.u = self.model.levelModelList[-1].u
41522  */
41523  __pyx_t_2 = ((__pyx_v_self->build_kdtree == 1) != 0);
41524  if (__pyx_t_2) {
41525 
41526  /* "mbd/CouplingFSI.pyx":1643
41527  * self.model_mesh = self.model.levelModelList[-1].mesh
41528  * if self.build_kdtree is True:
41529  * Profiling.logEvent("Building k-d tree for mooring nodes lookup on first time step") # <<<<<<<<<<<<<<
41530  * self.u = self.model.levelModelList[-1].u
41531  * # finite element space (! linear for p, quadratic for velocity)
41532  */
41533  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L1_error)
41534  __Pyx_GOTREF(__pyx_t_4);
41535  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1643, __pyx_L1_error)
41536  __Pyx_GOTREF(__pyx_t_5);
41537  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41538  __pyx_t_4 = NULL;
41539  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
41540  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
41541  if (likely(__pyx_t_4)) {
41542  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
41543  __Pyx_INCREF(__pyx_t_4);
41544  __Pyx_INCREF(function);
41545  __Pyx_DECREF_SET(__pyx_t_5, function);
41546  }
41547  }
41548  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_kp_s_Building_k_d_tree_for_mooring_no_2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s_Building_k_d_tree_for_mooring_no_2);
41549  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
41550  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1643, __pyx_L1_error)
41551  __Pyx_GOTREF(__pyx_t_3);
41552  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41553  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41554 
41555  /* "mbd/CouplingFSI.pyx":1644
41556  * if self.build_kdtree is True:
41557  * Profiling.logEvent("Building k-d tree for mooring nodes lookup on first time step")
41558  * self.u = self.model.levelModelList[-1].u # <<<<<<<<<<<<<<
41559  * # finite element space (! linear for p, quadratic for velocity)
41560  * self.femSpace_velocity = self.u[1].femSpace
41561  */
41562  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1644, __pyx_L1_error)
41563  __Pyx_GOTREF(__pyx_t_3);
41564  __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1644, __pyx_L1_error)
41565  __Pyx_GOTREF(__pyx_t_5);
41566  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41567  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_u); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1644, __pyx_L1_error)
41568  __Pyx_GOTREF(__pyx_t_3);
41569  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41570  __Pyx_GIVEREF(__pyx_t_3);
41571  __Pyx_GOTREF(__pyx_v_self->u);
41572  __Pyx_DECREF(__pyx_v_self->u);
41573  __pyx_v_self->u = __pyx_t_3;
41574  __pyx_t_3 = 0;
41575 
41576  /* "mbd/CouplingFSI.pyx":1646
41577  * self.u = self.model.levelModelList[-1].u
41578  * # finite element space (! linear for p, quadratic for velocity)
41579  * self.femSpace_velocity = self.u[1].femSpace # <<<<<<<<<<<<<<
41580  * self.femSpace_pressure = self.u[0].femSpace
41581  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
41582  */
41583  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->u, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1646, __pyx_L1_error)
41584  __Pyx_GOTREF(__pyx_t_3);
41585  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1646, __pyx_L1_error)
41586  __Pyx_GOTREF(__pyx_t_5);
41587  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41588  __Pyx_GIVEREF(__pyx_t_5);
41589  __Pyx_GOTREF(__pyx_v_self->femSpace_velocity);
41590  __Pyx_DECREF(__pyx_v_self->femSpace_velocity);
41591  __pyx_v_self->femSpace_velocity = __pyx_t_5;
41592  __pyx_t_5 = 0;
41593 
41594  /* "mbd/CouplingFSI.pyx":1647
41595  * # finite element space (! linear for p, quadratic for velocity)
41596  * self.femSpace_velocity = self.u[1].femSpace
41597  * self.femSpace_pressure = self.u[0].femSpace # <<<<<<<<<<<<<<
41598  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
41599  * if not self.initialized:
41600  */
41601  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_self->u, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1647, __pyx_L1_error)
41602  __Pyx_GOTREF(__pyx_t_5);
41603  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_femSpace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1647, __pyx_L1_error)
41604  __Pyx_GOTREF(__pyx_t_3);
41605  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41606  __Pyx_GIVEREF(__pyx_t_3);
41607  __Pyx_GOTREF(__pyx_v_self->femSpace_pressure);
41608  __Pyx_DECREF(__pyx_v_self->femSpace_pressure);
41609  __pyx_v_self->femSpace_pressure = __pyx_t_3;
41610  __pyx_t_3 = 0;
41611 
41612  /* "mbd/CouplingFSI.pyx":1648
41613  * self.femSpace_velocity = self.u[1].femSpace
41614  * self.femSpace_pressure = self.u[0].femSpace
41615  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray) # <<<<<<<<<<<<<<
41616  * if not self.initialized:
41617  * self.nBodiesIBM = 0 # will be incremented by bodies calculate_init()
41618  */
41619  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_spatial); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
41620  __Pyx_GOTREF(__pyx_t_5);
41621  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_cKDTree); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
41622  __Pyx_GOTREF(__pyx_t_4);
41623  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41624  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
41625  __Pyx_GOTREF(__pyx_t_5);
41626  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1648, __pyx_L1_error)
41627  __Pyx_GOTREF(__pyx_t_6);
41628  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41629  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_mesh); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
41630  __Pyx_GOTREF(__pyx_t_5);
41631  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41632  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1648, __pyx_L1_error)
41633  __Pyx_GOTREF(__pyx_t_6);
41634  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41635  __pyx_t_5 = NULL;
41636  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
41637  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
41638  if (likely(__pyx_t_5)) {
41639  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
41640  __Pyx_INCREF(__pyx_t_5);
41641  __Pyx_INCREF(function);
41642  __Pyx_DECREF_SET(__pyx_t_4, function);
41643  }
41644  }
41645  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
41646  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
41647  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41648  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1648, __pyx_L1_error)
41649  __Pyx_GOTREF(__pyx_t_3);
41650  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41651  __Pyx_GIVEREF(__pyx_t_3);
41652  __Pyx_GOTREF(__pyx_v_self->nodes_kdtree);
41653  __Pyx_DECREF(__pyx_v_self->nodes_kdtree);
41654  __pyx_v_self->nodes_kdtree = __pyx_t_3;
41655  __pyx_t_3 = 0;
41656 
41657  /* "mbd/CouplingFSI.pyx":1642
41658  * if self.model is not None:
41659  * self.model_mesh = self.model.levelModelList[-1].mesh
41660  * if self.build_kdtree is True: # <<<<<<<<<<<<<<
41661  * Profiling.logEvent("Building k-d tree for mooring nodes lookup on first time step")
41662  * self.u = self.model.levelModelList[-1].u
41663  */
41664  }
41665 
41666  /* "mbd/CouplingFSI.pyx":1640
41667  * (bodies, moorings, etc) attached to the system.
41668  * """
41669  * if self.model is not None: # <<<<<<<<<<<<<<
41670  * self.model_mesh = self.model.levelModelList[-1].mesh
41671  * if self.build_kdtree is True:
41672  */
41673  }
41674 
41675  /* "mbd/CouplingFSI.pyx":1649
41676  * self.femSpace_pressure = self.u[0].femSpace
41677  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
41678  * if not self.initialized: # <<<<<<<<<<<<<<
41679  * self.nBodiesIBM = 0 # will be incremented by bodies calculate_init()
41680  * for s in self.subcomponents:
41681  */
41682  __pyx_t_2 = ((!(__pyx_v_self->initialized != 0)) != 0);
41683  if (__pyx_t_2) {
41684 
41685  /* "mbd/CouplingFSI.pyx":1650
41686  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
41687  * if not self.initialized:
41688  * self.nBodiesIBM = 0 # will be incremented by bodies calculate_init() # <<<<<<<<<<<<<<
41689  * for s in self.subcomponents:
41690  * s.calculate_init()
41691  */
41692  __pyx_v_self->nBodiesIBM = 0;
41693 
41694  /* "mbd/CouplingFSI.pyx":1651
41695  * if not self.initialized:
41696  * self.nBodiesIBM = 0 # will be incremented by bodies calculate_init()
41697  * for s in self.subcomponents: # <<<<<<<<<<<<<<
41698  * s.calculate_init()
41699  * Profiling.logEvent("Setup initial"+str(self.next_sample))
41700  */
41701  if (likely(PyList_CheckExact(__pyx_v_self->subcomponents)) || PyTuple_CheckExact(__pyx_v_self->subcomponents)) {
41702  __pyx_t_3 = __pyx_v_self->subcomponents; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
41703  __pyx_t_8 = NULL;
41704  } else {
41705  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->subcomponents); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1651, __pyx_L1_error)
41706  __Pyx_GOTREF(__pyx_t_3);
41707  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1651, __pyx_L1_error)
41708  }
41709  for (;;) {
41710  if (likely(!__pyx_t_8)) {
41711  if (likely(PyList_CheckExact(__pyx_t_3))) {
41712  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
41713  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
41714  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1651, __pyx_L1_error)
41715  #else
41716  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L1_error)
41717  __Pyx_GOTREF(__pyx_t_4);
41718  #endif
41719  } else {
41720  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
41721  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
41722  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1651, __pyx_L1_error)
41723  #else
41724  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1651, __pyx_L1_error)
41725  __Pyx_GOTREF(__pyx_t_4);
41726  #endif
41727  }
41728  } else {
41729  __pyx_t_4 = __pyx_t_8(__pyx_t_3);
41730  if (unlikely(!__pyx_t_4)) {
41731  PyObject* exc_type = PyErr_Occurred();
41732  if (exc_type) {
41733  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
41734  else __PYX_ERR(0, 1651, __pyx_L1_error)
41735  }
41736  break;
41737  }
41738  __Pyx_GOTREF(__pyx_t_4);
41739  }
41740  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
41741  __pyx_t_4 = 0;
41742 
41743  /* "mbd/CouplingFSI.pyx":1652
41744  * self.nBodiesIBM = 0 # will be incremented by bodies calculate_init()
41745  * for s in self.subcomponents:
41746  * s.calculate_init() # <<<<<<<<<<<<<<
41747  * Profiling.logEvent("Setup initial"+str(self.next_sample))
41748  * self.ChSystem.Setup()
41749  */
41750  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_calculate_init); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1652, __pyx_L1_error)
41751  __Pyx_GOTREF(__pyx_t_6);
41752  __pyx_t_5 = NULL;
41753  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
41754  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
41755  if (likely(__pyx_t_5)) {
41756  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
41757  __Pyx_INCREF(__pyx_t_5);
41758  __Pyx_INCREF(function);
41759  __Pyx_DECREF_SET(__pyx_t_6, function);
41760  }
41761  }
41762  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
41763  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
41764  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1652, __pyx_L1_error)
41765  __Pyx_GOTREF(__pyx_t_4);
41766  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41767  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41768 
41769  /* "mbd/CouplingFSI.pyx":1651
41770  * if not self.initialized:
41771  * self.nBodiesIBM = 0 # will be incremented by bodies calculate_init()
41772  * for s in self.subcomponents: # <<<<<<<<<<<<<<
41773  * s.calculate_init()
41774  * Profiling.logEvent("Setup initial"+str(self.next_sample))
41775  */
41776  }
41777  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41778 
41779  /* "mbd/CouplingFSI.pyx":1653
41780  * for s in self.subcomponents:
41781  * s.calculate_init()
41782  * Profiling.logEvent("Setup initial"+str(self.next_sample)) # <<<<<<<<<<<<<<
41783  * self.ChSystem.Setup()
41784  * Profiling.logEvent("Finished init"+str(self.next_sample))
41785  */
41786  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1653, __pyx_L1_error)
41787  __Pyx_GOTREF(__pyx_t_4);
41788  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1653, __pyx_L1_error)
41789  __Pyx_GOTREF(__pyx_t_6);
41790  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41791  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->next_sample); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1653, __pyx_L1_error)
41792  __Pyx_GOTREF(__pyx_t_4);
41793  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1653, __pyx_L1_error)
41794  __Pyx_GOTREF(__pyx_t_5);
41795  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41796  __pyx_t_4 = PyNumber_Add(__pyx_kp_s_Setup_initial, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1653, __pyx_L1_error)
41797  __Pyx_GOTREF(__pyx_t_4);
41798  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41799  __pyx_t_5 = NULL;
41800  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
41801  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
41802  if (likely(__pyx_t_5)) {
41803  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
41804  __Pyx_INCREF(__pyx_t_5);
41805  __Pyx_INCREF(function);
41806  __Pyx_DECREF_SET(__pyx_t_6, function);
41807  }
41808  }
41809  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
41810  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
41811  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41812  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1653, __pyx_L1_error)
41813  __Pyx_GOTREF(__pyx_t_3);
41814  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41815  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41816 
41817  /* "mbd/CouplingFSI.pyx":1654
41818  * s.calculate_init()
41819  * Profiling.logEvent("Setup initial"+str(self.next_sample))
41820  * self.ChSystem.Setup() # <<<<<<<<<<<<<<
41821  * Profiling.logEvent("Finished init"+str(self.next_sample))
41822  * self.initialized = True
41823  */
41824  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChSystem, __pyx_n_s_Setup); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1654, __pyx_L1_error)
41825  __Pyx_GOTREF(__pyx_t_6);
41826  __pyx_t_4 = NULL;
41827  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
41828  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
41829  if (likely(__pyx_t_4)) {
41830  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
41831  __Pyx_INCREF(__pyx_t_4);
41832  __Pyx_INCREF(function);
41833  __Pyx_DECREF_SET(__pyx_t_6, function);
41834  }
41835  }
41836  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
41837  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
41838  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1654, __pyx_L1_error)
41839  __Pyx_GOTREF(__pyx_t_3);
41840  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41841  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41842 
41843  /* "mbd/CouplingFSI.pyx":1655
41844  * Profiling.logEvent("Setup initial"+str(self.next_sample))
41845  * self.ChSystem.Setup()
41846  * Profiling.logEvent("Finished init"+str(self.next_sample)) # <<<<<<<<<<<<<<
41847  * self.initialized = True
41848  * else:
41849  */
41850  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1655, __pyx_L1_error)
41851  __Pyx_GOTREF(__pyx_t_6);
41852  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __pyx_L1_error)
41853  __Pyx_GOTREF(__pyx_t_4);
41854  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41855  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->next_sample); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1655, __pyx_L1_error)
41856  __Pyx_GOTREF(__pyx_t_6);
41857  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
41858  __Pyx_GOTREF(__pyx_t_5);
41859  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41860  __pyx_t_6 = PyNumber_Add(__pyx_kp_s_Finished_init, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1655, __pyx_L1_error)
41861  __Pyx_GOTREF(__pyx_t_6);
41862  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41863  __pyx_t_5 = NULL;
41864  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
41865  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
41866  if (likely(__pyx_t_5)) {
41867  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
41868  __Pyx_INCREF(__pyx_t_5);
41869  __Pyx_INCREF(function);
41870  __Pyx_DECREF_SET(__pyx_t_4, function);
41871  }
41872  }
41873  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
41874  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
41875  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41876  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1655, __pyx_L1_error)
41877  __Pyx_GOTREF(__pyx_t_3);
41878  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41879  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41880 
41881  /* "mbd/CouplingFSI.pyx":1656
41882  * self.ChSystem.Setup()
41883  * Profiling.logEvent("Finished init"+str(self.next_sample))
41884  * self.initialized = True # <<<<<<<<<<<<<<
41885  * else:
41886  * Profiling.logEvent("Warning: Chrono system was already initialized")
41887  */
41888  __pyx_v_self->initialized = 1;
41889 
41890  /* "mbd/CouplingFSI.pyx":1649
41891  * self.femSpace_pressure = self.u[0].femSpace
41892  * self.nodes_kdtree = spatial.cKDTree(self.model.levelModelList[-1].mesh.nodeArray)
41893  * if not self.initialized: # <<<<<<<<<<<<<<
41894  * self.nBodiesIBM = 0 # will be incremented by bodies calculate_init()
41895  * for s in self.subcomponents:
41896  */
41897  goto __pyx_L5;
41898  }
41899 
41900  /* "mbd/CouplingFSI.pyx":1658
41901  * self.initialized = True
41902  * else:
41903  * Profiling.logEvent("Warning: Chrono system was already initialized") # <<<<<<<<<<<<<<
41904  * Profiling.logEvent("Starting init"+str(self.next_sample))
41905  * self.directory = bytes(Profiling.logDir+str("/"),'utf-8')
41906  */
41907  /*else*/ {
41908  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error)
41909  __Pyx_GOTREF(__pyx_t_4);
41910  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1658, __pyx_L1_error)
41911  __Pyx_GOTREF(__pyx_t_6);
41912  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41913  __pyx_t_4 = NULL;
41914  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
41915  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
41916  if (likely(__pyx_t_4)) {
41917  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
41918  __Pyx_INCREF(__pyx_t_4);
41919  __Pyx_INCREF(function);
41920  __Pyx_DECREF_SET(__pyx_t_6, function);
41921  }
41922  }
41923  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_kp_s_Warning_Chrono_system_was_alread) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_s_Warning_Chrono_system_was_alread);
41924  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
41925  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error)
41926  __Pyx_GOTREF(__pyx_t_3);
41927  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41928  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41929  }
41930  __pyx_L5:;
41931 
41932  /* "mbd/CouplingFSI.pyx":1659
41933  * else:
41934  * Profiling.logEvent("Warning: Chrono system was already initialized")
41935  * Profiling.logEvent("Starting init"+str(self.next_sample)) # <<<<<<<<<<<<<<
41936  * self.directory = bytes(Profiling.logDir+str("/"),'utf-8')
41937  * self.thisptr.setDirectory(self.directory)
41938  */
41939  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1659, __pyx_L1_error)
41940  __Pyx_GOTREF(__pyx_t_6);
41941  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1659, __pyx_L1_error)
41942  __Pyx_GOTREF(__pyx_t_4);
41943  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41944  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->next_sample); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1659, __pyx_L1_error)
41945  __Pyx_GOTREF(__pyx_t_6);
41946  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1659, __pyx_L1_error)
41947  __Pyx_GOTREF(__pyx_t_5);
41948  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41949  __pyx_t_6 = PyNumber_Add(__pyx_kp_s_Starting_init, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1659, __pyx_L1_error)
41950  __Pyx_GOTREF(__pyx_t_6);
41951  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
41952  __pyx_t_5 = NULL;
41953  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
41954  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
41955  if (likely(__pyx_t_5)) {
41956  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
41957  __Pyx_INCREF(__pyx_t_5);
41958  __Pyx_INCREF(function);
41959  __Pyx_DECREF_SET(__pyx_t_4, function);
41960  }
41961  }
41962  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
41963  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
41964  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
41965  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1659, __pyx_L1_error)
41966  __Pyx_GOTREF(__pyx_t_3);
41967  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41968  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41969 
41970  /* "mbd/CouplingFSI.pyx":1660
41971  * Profiling.logEvent("Warning: Chrono system was already initialized")
41972  * Profiling.logEvent("Starting init"+str(self.next_sample))
41973  * self.directory = bytes(Profiling.logDir+str("/"),'utf-8') # <<<<<<<<<<<<<<
41974  * self.thisptr.setDirectory(self.directory)
41975  * if self.nBodiesIBM > 0:
41976  */
41977  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1660, __pyx_L1_error)
41978  __Pyx_GOTREF(__pyx_t_3);
41979  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logDir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1660, __pyx_L1_error)
41980  __Pyx_GOTREF(__pyx_t_4);
41981  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41982  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__116, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1660, __pyx_L1_error)
41983  __Pyx_GOTREF(__pyx_t_3);
41984  __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1660, __pyx_L1_error)
41985  __Pyx_GOTREF(__pyx_t_6);
41986  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
41987  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41988  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1660, __pyx_L1_error)
41989  __Pyx_GOTREF(__pyx_t_3);
41990  __Pyx_GIVEREF(__pyx_t_6);
41991  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
41992  __Pyx_INCREF(__pyx_kp_s_utf_8);
41993  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
41994  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
41995  __pyx_t_6 = 0;
41996  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1660, __pyx_L1_error)
41997  __Pyx_GOTREF(__pyx_t_6);
41998  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
41999  __pyx_t_9 = __pyx_convert_string_from_py_std__in_string(__pyx_t_6); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1660, __pyx_L1_error)
42000  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42001  __pyx_v_self->directory = __pyx_t_9;
42002 
42003  /* "mbd/CouplingFSI.pyx":1661
42004  * Profiling.logEvent("Starting init"+str(self.next_sample))
42005  * self.directory = bytes(Profiling.logDir+str("/"),'utf-8')
42006  * self.thisptr.setDirectory(self.directory) # <<<<<<<<<<<<<<
42007  * if self.nBodiesIBM > 0:
42008  * assert self.model is not None, 'IBM set to be used in bodies but model is not attached. Attach rans model BEFORE calling calculate_init() on chrono system'
42009  */
42010  __pyx_v_self->thisptr->setDirectory(__pyx_v_self->directory);
42011 
42012  /* "mbd/CouplingFSI.pyx":1662
42013  * self.directory = bytes(Profiling.logDir+str("/"),'utf-8')
42014  * self.thisptr.setDirectory(self.directory)
42015  * if self.nBodiesIBM > 0: # <<<<<<<<<<<<<<
42016  * assert self.model is not None, 'IBM set to be used in bodies but model is not attached. Attach rans model BEFORE calling calculate_init() on chrono system'
42017  * c = self.model.levelModelList[-1].coefficients
42018  */
42019  __pyx_t_2 = ((__pyx_v_self->nBodiesIBM > 0) != 0);
42020  if (__pyx_t_2) {
42021 
42022  /* "mbd/CouplingFSI.pyx":1663
42023  * self.thisptr.setDirectory(self.directory)
42024  * if self.nBodiesIBM > 0:
42025  * assert self.model is not None, 'IBM set to be used in bodies but model is not attached. Attach rans model BEFORE calling calculate_init() on chrono system' # <<<<<<<<<<<<<<
42026  * c = self.model.levelModelList[-1].coefficients
42027  * # set it only if it was not set manually before
42028  */
42029  #ifndef CYTHON_WITHOUT_ASSERTIONS
42030  if (unlikely(!Py_OptimizeFlag)) {
42031  __pyx_t_2 = (__pyx_v_self->model != Py_None);
42032  if (unlikely(!(__pyx_t_2 != 0))) {
42033  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_IBM_set_to_be_used_in_bodies_but);
42034  __PYX_ERR(0, 1663, __pyx_L1_error)
42035  }
42036  }
42037  #endif
42038 
42039  /* "mbd/CouplingFSI.pyx":1664
42040  * if self.nBodiesIBM > 0:
42041  * assert self.model is not None, 'IBM set to be used in bodies but model is not attached. Attach rans model BEFORE calling calculate_init() on chrono system'
42042  * c = self.model.levelModelList[-1].coefficients # <<<<<<<<<<<<<<
42043  * # set it only if it was not set manually before
42044  * if not c.nParticles:
42045  */
42046  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1664, __pyx_L1_error)
42047  __Pyx_GOTREF(__pyx_t_6);
42048  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_6, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1664, __pyx_L1_error)
42049  __Pyx_GOTREF(__pyx_t_3);
42050  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42051  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_coefficients); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1664, __pyx_L1_error)
42052  __Pyx_GOTREF(__pyx_t_6);
42053  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42054  __pyx_v_c = __pyx_t_6;
42055  __pyx_t_6 = 0;
42056 
42057  /* "mbd/CouplingFSI.pyx":1666
42058  * c = self.model.levelModelList[-1].coefficients
42059  * # set it only if it was not set manually before
42060  * if not c.nParticles: # <<<<<<<<<<<<<<
42061  * c.nParticles = self.nBodiesIBM
42062  * else:
42063  */
42064  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_nParticles); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1666, __pyx_L1_error)
42065  __Pyx_GOTREF(__pyx_t_6);
42066  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1666, __pyx_L1_error)
42067  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42068  __pyx_t_1 = ((!__pyx_t_2) != 0);
42069  if (__pyx_t_1) {
42070 
42071  /* "mbd/CouplingFSI.pyx":1667
42072  * # set it only if it was not set manually before
42073  * if not c.nParticles:
42074  * c.nParticles = self.nBodiesIBM # <<<<<<<<<<<<<<
42075  * else:
42076  * assert c.nParticles == self.nBodiesIBM, 'number of RANS particles {nP} != number of IBM bodies {nB}'.format(nP=c.nParticles, nB=self.nBodiesIBM)
42077  */
42078  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1667, __pyx_L1_error)
42079  __Pyx_GOTREF(__pyx_t_6);
42080  if (__Pyx_PyObject_SetAttrStr(__pyx_v_c, __pyx_n_s_nParticles, __pyx_t_6) < 0) __PYX_ERR(0, 1667, __pyx_L1_error)
42081  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42082 
42083  /* "mbd/CouplingFSI.pyx":1666
42084  * c = self.model.levelModelList[-1].coefficients
42085  * # set it only if it was not set manually before
42086  * if not c.nParticles: # <<<<<<<<<<<<<<
42087  * c.nParticles = self.nBodiesIBM
42088  * else:
42089  */
42090  goto __pyx_L9;
42091  }
42092 
42093  /* "mbd/CouplingFSI.pyx":1669
42094  * c.nParticles = self.nBodiesIBM
42095  * else:
42096  * assert c.nParticles == self.nBodiesIBM, 'number of RANS particles {nP} != number of IBM bodies {nB}'.format(nP=c.nParticles, nB=self.nBodiesIBM) # <<<<<<<<<<<<<<
42097  * if c.use_ball_as_particle:
42098  * if c.ball_radius is None:
42099  */
42100  /*else*/ {
42101  #ifndef CYTHON_WITHOUT_ASSERTIONS
42102  if (unlikely(!Py_OptimizeFlag)) {
42103  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_nParticles); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1669, __pyx_L1_error)
42104  __Pyx_GOTREF(__pyx_t_6);
42105  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
42106  __Pyx_GOTREF(__pyx_t_3);
42107  __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
42108  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42109  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42110  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1669, __pyx_L1_error)
42111  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42112  if (unlikely(!__pyx_t_1)) {
42113  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_number_of_RANS_particles_nP_numb, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error)
42114  __Pyx_GOTREF(__pyx_t_4);
42115  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
42116  __Pyx_GOTREF(__pyx_t_3);
42117  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_nParticles); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1669, __pyx_L1_error)
42118  __Pyx_GOTREF(__pyx_t_6);
42119  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nP, __pyx_t_6) < 0) __PYX_ERR(0, 1669, __pyx_L1_error)
42120  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42121  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1669, __pyx_L1_error)
42122  __Pyx_GOTREF(__pyx_t_6);
42123  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nB, __pyx_t_6) < 0) __PYX_ERR(0, 1669, __pyx_L1_error)
42124  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42125  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1669, __pyx_L1_error)
42126  __Pyx_GOTREF(__pyx_t_6);
42127  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42128  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42129  __pyx_t_3 = PyTuple_Pack(1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
42130  __Pyx_GOTREF(__pyx_t_3);
42131  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42132  PyErr_SetObject(PyExc_AssertionError, __pyx_t_3);
42133  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42134  __PYX_ERR(0, 1669, __pyx_L1_error)
42135  }
42136  }
42137  #endif
42138  }
42139  __pyx_L9:;
42140 
42141  /* "mbd/CouplingFSI.pyx":1670
42142  * else:
42143  * assert c.nParticles == self.nBodiesIBM, 'number of RANS particles {nP} != number of IBM bodies {nB}'.format(nP=c.nParticles, nB=self.nBodiesIBM)
42144  * if c.use_ball_as_particle: # <<<<<<<<<<<<<<
42145  * if c.ball_radius is None:
42146  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd')
42147  */
42148  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_use_ball_as_particle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1670, __pyx_L1_error)
42149  __Pyx_GOTREF(__pyx_t_3);
42150  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1670, __pyx_L1_error)
42151  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42152  if (__pyx_t_1) {
42153 
42154  /* "mbd/CouplingFSI.pyx":1671
42155  * assert c.nParticles == self.nBodiesIBM, 'number of RANS particles {nP} != number of IBM bodies {nB}'.format(nP=c.nParticles, nB=self.nBodiesIBM)
42156  * if c.use_ball_as_particle:
42157  * if c.ball_radius is None: # <<<<<<<<<<<<<<
42158  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd')
42159  * if c.ball_center is None:
42160  */
42161  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_radius); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error)
42162  __Pyx_GOTREF(__pyx_t_3);
42163  __pyx_t_1 = (__pyx_t_3 == Py_None);
42164  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42165  __pyx_t_2 = (__pyx_t_1 != 0);
42166  if (__pyx_t_2) {
42167 
42168  /* "mbd/CouplingFSI.pyx":1672
42169  * if c.use_ball_as_particle:
42170  * if c.ball_radius is None:
42171  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd') # <<<<<<<<<<<<<<
42172  * if c.ball_center is None:
42173  * c.ball_center = np.zeros((self.nBodiesIBM, 3), 'd')
42174  */
42175  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L1_error)
42176  __Pyx_GOTREF(__pyx_t_6);
42177  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error)
42178  __Pyx_GOTREF(__pyx_t_4);
42179  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42180  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L1_error)
42181  __Pyx_GOTREF(__pyx_t_6);
42182  __pyx_t_5 = NULL;
42183  __pyx_t_10 = 0;
42184  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
42185  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
42186  if (likely(__pyx_t_5)) {
42187  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
42188  __Pyx_INCREF(__pyx_t_5);
42189  __Pyx_INCREF(function);
42190  __Pyx_DECREF_SET(__pyx_t_4, function);
42191  __pyx_t_10 = 1;
42192  }
42193  }
42194  #if CYTHON_FAST_PYCALL
42195  if (PyFunction_Check(__pyx_t_4)) {
42196  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_n_s_d};
42197  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
42198  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
42199  __Pyx_GOTREF(__pyx_t_3);
42200  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42201  } else
42202  #endif
42203  #if CYTHON_FAST_PYCCALL
42204  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
42205  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_n_s_d};
42206  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
42207  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
42208  __Pyx_GOTREF(__pyx_t_3);
42209  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42210  } else
42211  #endif
42212  {
42213  __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1672, __pyx_L1_error)
42214  __Pyx_GOTREF(__pyx_t_11);
42215  if (__pyx_t_5) {
42216  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
42217  }
42218  __Pyx_GIVEREF(__pyx_t_6);
42219  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_6);
42220  __Pyx_INCREF(__pyx_n_s_d);
42221  __Pyx_GIVEREF(__pyx_n_s_d);
42222  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_n_s_d);
42223  __pyx_t_6 = 0;
42224  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error)
42225  __Pyx_GOTREF(__pyx_t_3);
42226  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
42227  }
42228  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42229  if (__Pyx_PyObject_SetAttrStr(__pyx_v_c, __pyx_n_s_ball_radius, __pyx_t_3) < 0) __PYX_ERR(0, 1672, __pyx_L1_error)
42230  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42231 
42232  /* "mbd/CouplingFSI.pyx":1671
42233  * assert c.nParticles == self.nBodiesIBM, 'number of RANS particles {nP} != number of IBM bodies {nB}'.format(nP=c.nParticles, nB=self.nBodiesIBM)
42234  * if c.use_ball_as_particle:
42235  * if c.ball_radius is None: # <<<<<<<<<<<<<<
42236  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd')
42237  * if c.ball_center is None:
42238  */
42239  }
42240 
42241  /* "mbd/CouplingFSI.pyx":1673
42242  * if c.ball_radius is None:
42243  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd')
42244  * if c.ball_center is None: # <<<<<<<<<<<<<<
42245  * c.ball_center = np.zeros((self.nBodiesIBM, 3), 'd')
42246  * if c.ball_velocity is None:
42247  */
42248  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_center); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1673, __pyx_L1_error)
42249  __Pyx_GOTREF(__pyx_t_3);
42250  __pyx_t_2 = (__pyx_t_3 == Py_None);
42251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42252  __pyx_t_1 = (__pyx_t_2 != 0);
42253  if (__pyx_t_1) {
42254 
42255  /* "mbd/CouplingFSI.pyx":1674
42256  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd')
42257  * if c.ball_center is None:
42258  * c.ball_center = np.zeros((self.nBodiesIBM, 3), 'd') # <<<<<<<<<<<<<<
42259  * if c.ball_velocity is None:
42260  * c.ball_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42261  */
42262  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
42263  __Pyx_GOTREF(__pyx_t_4);
42264  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1674, __pyx_L1_error)
42265  __Pyx_GOTREF(__pyx_t_11);
42266  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42267  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1674, __pyx_L1_error)
42268  __Pyx_GOTREF(__pyx_t_4);
42269  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1674, __pyx_L1_error)
42270  __Pyx_GOTREF(__pyx_t_6);
42271  __Pyx_GIVEREF(__pyx_t_4);
42272  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
42273  __Pyx_INCREF(__pyx_int_3);
42274  __Pyx_GIVEREF(__pyx_int_3);
42275  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
42276  __pyx_t_4 = 0;
42277  __pyx_t_4 = NULL;
42278  __pyx_t_10 = 0;
42279  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
42280  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
42281  if (likely(__pyx_t_4)) {
42282  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
42283  __Pyx_INCREF(__pyx_t_4);
42284  __Pyx_INCREF(function);
42285  __Pyx_DECREF_SET(__pyx_t_11, function);
42286  __pyx_t_10 = 1;
42287  }
42288  }
42289  #if CYTHON_FAST_PYCALL
42290  if (PyFunction_Check(__pyx_t_11)) {
42291  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_n_s_d};
42292  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error)
42293  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
42294  __Pyx_GOTREF(__pyx_t_3);
42295  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42296  } else
42297  #endif
42298  #if CYTHON_FAST_PYCCALL
42299  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
42300  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_n_s_d};
42301  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error)
42302  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
42303  __Pyx_GOTREF(__pyx_t_3);
42304  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42305  } else
42306  #endif
42307  {
42308  __pyx_t_5 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L1_error)
42309  __Pyx_GOTREF(__pyx_t_5);
42310  if (__pyx_t_4) {
42311  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
42312  }
42313  __Pyx_GIVEREF(__pyx_t_6);
42314  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_10, __pyx_t_6);
42315  __Pyx_INCREF(__pyx_n_s_d);
42316  __Pyx_GIVEREF(__pyx_n_s_d);
42317  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_10, __pyx_n_s_d);
42318  __pyx_t_6 = 0;
42319  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1674, __pyx_L1_error)
42320  __Pyx_GOTREF(__pyx_t_3);
42321  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42322  }
42323  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
42324  if (__Pyx_PyObject_SetAttrStr(__pyx_v_c, __pyx_n_s_ball_center, __pyx_t_3) < 0) __PYX_ERR(0, 1674, __pyx_L1_error)
42325  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42326 
42327  /* "mbd/CouplingFSI.pyx":1673
42328  * if c.ball_radius is None:
42329  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd')
42330  * if c.ball_center is None: # <<<<<<<<<<<<<<
42331  * c.ball_center = np.zeros((self.nBodiesIBM, 3), 'd')
42332  * if c.ball_velocity is None:
42333  */
42334  }
42335 
42336  /* "mbd/CouplingFSI.pyx":1675
42337  * if c.ball_center is None:
42338  * c.ball_center = np.zeros((self.nBodiesIBM, 3), 'd')
42339  * if c.ball_velocity is None: # <<<<<<<<<<<<<<
42340  * c.ball_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42341  * if c.ball_angular_velocity is None:
42342  */
42343  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_velocity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L1_error)
42344  __Pyx_GOTREF(__pyx_t_3);
42345  __pyx_t_1 = (__pyx_t_3 == Py_None);
42346  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42347  __pyx_t_2 = (__pyx_t_1 != 0);
42348  if (__pyx_t_2) {
42349 
42350  /* "mbd/CouplingFSI.pyx":1676
42351  * c.ball_center = np.zeros((self.nBodiesIBM, 3), 'd')
42352  * if c.ball_velocity is None:
42353  * c.ball_velocity = np.zeros((self.nBodiesIBM, 3), 'd') # <<<<<<<<<<<<<<
42354  * if c.ball_angular_velocity is None:
42355  * c.ball_angular_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42356  */
42357  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1676, __pyx_L1_error)
42358  __Pyx_GOTREF(__pyx_t_11);
42359  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1676, __pyx_L1_error)
42360  __Pyx_GOTREF(__pyx_t_5);
42361  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
42362  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1676, __pyx_L1_error)
42363  __Pyx_GOTREF(__pyx_t_11);
42364  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error)
42365  __Pyx_GOTREF(__pyx_t_6);
42366  __Pyx_GIVEREF(__pyx_t_11);
42367  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11);
42368  __Pyx_INCREF(__pyx_int_3);
42369  __Pyx_GIVEREF(__pyx_int_3);
42370  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
42371  __pyx_t_11 = 0;
42372  __pyx_t_11 = NULL;
42373  __pyx_t_10 = 0;
42374  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
42375  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
42376  if (likely(__pyx_t_11)) {
42377  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
42378  __Pyx_INCREF(__pyx_t_11);
42379  __Pyx_INCREF(function);
42380  __Pyx_DECREF_SET(__pyx_t_5, function);
42381  __pyx_t_10 = 1;
42382  }
42383  }
42384  #if CYTHON_FAST_PYCALL
42385  if (PyFunction_Check(__pyx_t_5)) {
42386  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_n_s_d};
42387  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error)
42388  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
42389  __Pyx_GOTREF(__pyx_t_3);
42390  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42391  } else
42392  #endif
42393  #if CYTHON_FAST_PYCCALL
42394  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
42395  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_n_s_d};
42396  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error)
42397  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
42398  __Pyx_GOTREF(__pyx_t_3);
42399  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42400  } else
42401  #endif
42402  {
42403  __pyx_t_4 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1676, __pyx_L1_error)
42404  __Pyx_GOTREF(__pyx_t_4);
42405  if (__pyx_t_11) {
42406  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
42407  }
42408  __Pyx_GIVEREF(__pyx_t_6);
42409  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_10, __pyx_t_6);
42410  __Pyx_INCREF(__pyx_n_s_d);
42411  __Pyx_GIVEREF(__pyx_n_s_d);
42412  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_10, __pyx_n_s_d);
42413  __pyx_t_6 = 0;
42414  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error)
42415  __Pyx_GOTREF(__pyx_t_3);
42416  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42417  }
42418  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42419  if (__Pyx_PyObject_SetAttrStr(__pyx_v_c, __pyx_n_s_ball_velocity, __pyx_t_3) < 0) __PYX_ERR(0, 1676, __pyx_L1_error)
42420  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42421 
42422  /* "mbd/CouplingFSI.pyx":1675
42423  * if c.ball_center is None:
42424  * c.ball_center = np.zeros((self.nBodiesIBM, 3), 'd')
42425  * if c.ball_velocity is None: # <<<<<<<<<<<<<<
42426  * c.ball_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42427  * if c.ball_angular_velocity is None:
42428  */
42429  }
42430 
42431  /* "mbd/CouplingFSI.pyx":1677
42432  * if c.ball_velocity is None:
42433  * c.ball_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42434  * if c.ball_angular_velocity is None: # <<<<<<<<<<<<<<
42435  * c.ball_angular_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42436  * else:
42437  */
42438  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_ball_angular_velocity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L1_error)
42439  __Pyx_GOTREF(__pyx_t_3);
42440  __pyx_t_2 = (__pyx_t_3 == Py_None);
42441  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42442  __pyx_t_1 = (__pyx_t_2 != 0);
42443  if (__pyx_t_1) {
42444 
42445  /* "mbd/CouplingFSI.pyx":1678
42446  * c.ball_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42447  * if c.ball_angular_velocity is None:
42448  * c.ball_angular_velocity = np.zeros((self.nBodiesIBM, 3), 'd') # <<<<<<<<<<<<<<
42449  * else:
42450  * if c.particle_sdfList is None:
42451  */
42452  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1678, __pyx_L1_error)
42453  __Pyx_GOTREF(__pyx_t_5);
42454  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1678, __pyx_L1_error)
42455  __Pyx_GOTREF(__pyx_t_4);
42456  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
42457  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1678, __pyx_L1_error)
42458  __Pyx_GOTREF(__pyx_t_5);
42459  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1678, __pyx_L1_error)
42460  __Pyx_GOTREF(__pyx_t_6);
42461  __Pyx_GIVEREF(__pyx_t_5);
42462  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
42463  __Pyx_INCREF(__pyx_int_3);
42464  __Pyx_GIVEREF(__pyx_int_3);
42465  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
42466  __pyx_t_5 = 0;
42467  __pyx_t_5 = NULL;
42468  __pyx_t_10 = 0;
42469  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
42470  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
42471  if (likely(__pyx_t_5)) {
42472  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
42473  __Pyx_INCREF(__pyx_t_5);
42474  __Pyx_INCREF(function);
42475  __Pyx_DECREF_SET(__pyx_t_4, function);
42476  __pyx_t_10 = 1;
42477  }
42478  }
42479  #if CYTHON_FAST_PYCALL
42480  if (PyFunction_Check(__pyx_t_4)) {
42481  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_n_s_d};
42482  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1678, __pyx_L1_error)
42483  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
42484  __Pyx_GOTREF(__pyx_t_3);
42485  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42486  } else
42487  #endif
42488  #if CYTHON_FAST_PYCCALL
42489  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
42490  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_n_s_d};
42491  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1678, __pyx_L1_error)
42492  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
42493  __Pyx_GOTREF(__pyx_t_3);
42494  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
42495  } else
42496  #endif
42497  {
42498  __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1678, __pyx_L1_error)
42499  __Pyx_GOTREF(__pyx_t_11);
42500  if (__pyx_t_5) {
42501  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
42502  }
42503  __Pyx_GIVEREF(__pyx_t_6);
42504  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_6);
42505  __Pyx_INCREF(__pyx_n_s_d);
42506  __Pyx_GIVEREF(__pyx_n_s_d);
42507  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_n_s_d);
42508  __pyx_t_6 = 0;
42509  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1678, __pyx_L1_error)
42510  __Pyx_GOTREF(__pyx_t_3);
42511  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
42512  }
42513  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42514  if (__Pyx_PyObject_SetAttrStr(__pyx_v_c, __pyx_n_s_ball_angular_velocity, __pyx_t_3) < 0) __PYX_ERR(0, 1678, __pyx_L1_error)
42515  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42516 
42517  /* "mbd/CouplingFSI.pyx":1677
42518  * if c.ball_velocity is None:
42519  * c.ball_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42520  * if c.ball_angular_velocity is None: # <<<<<<<<<<<<<<
42521  * c.ball_angular_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42522  * else:
42523  */
42524  }
42525 
42526  /* "mbd/CouplingFSI.pyx":1670
42527  * else:
42528  * assert c.nParticles == self.nBodiesIBM, 'number of RANS particles {nP} != number of IBM bodies {nB}'.format(nP=c.nParticles, nB=self.nBodiesIBM)
42529  * if c.use_ball_as_particle: # <<<<<<<<<<<<<<
42530  * if c.ball_radius is None:
42531  * c.ball_radius = np.zeros(self.nBodiesIBM, 'd')
42532  */
42533  goto __pyx_L10;
42534  }
42535 
42536  /* "mbd/CouplingFSI.pyx":1680
42537  * c.ball_angular_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42538  * else:
42539  * if c.particle_sdfList is None: # <<<<<<<<<<<<<<
42540  * c.particle_sdfList = [None for i in range(self.nBodiesIBM)]
42541  * if c.particle_velocityList is None:
42542  */
42543  /*else*/ {
42544  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_particle_sdfList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1680, __pyx_L1_error)
42545  __Pyx_GOTREF(__pyx_t_3);
42546  __pyx_t_1 = (__pyx_t_3 == Py_None);
42547  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42548  __pyx_t_2 = (__pyx_t_1 != 0);
42549  if (__pyx_t_2) {
42550 
42551  /* "mbd/CouplingFSI.pyx":1681
42552  * else:
42553  * if c.particle_sdfList is None:
42554  * c.particle_sdfList = [None for i in range(self.nBodiesIBM)] # <<<<<<<<<<<<<<
42555  * if c.particle_velocityList is None:
42556  * c.particle_velocityList = [None for i in range(self.nBodiesIBM)]
42557  */
42558  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1681, __pyx_L1_error)
42559  __Pyx_GOTREF(__pyx_t_3);
42560  __pyx_t_10 = __pyx_v_self->nBodiesIBM;
42561  __pyx_t_12 = __pyx_t_10;
42562  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
42563  __pyx_v_i = __pyx_t_13;
42564  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)Py_None))) __PYX_ERR(0, 1681, __pyx_L1_error)
42565  }
42566  if (__Pyx_PyObject_SetAttrStr(__pyx_v_c, __pyx_n_s_particle_sdfList, __pyx_t_3) < 0) __PYX_ERR(0, 1681, __pyx_L1_error)
42567  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42568 
42569  /* "mbd/CouplingFSI.pyx":1680
42570  * c.ball_angular_velocity = np.zeros((self.nBodiesIBM, 3), 'd')
42571  * else:
42572  * if c.particle_sdfList is None: # <<<<<<<<<<<<<<
42573  * c.particle_sdfList = [None for i in range(self.nBodiesIBM)]
42574  * if c.particle_velocityList is None:
42575  */
42576  }
42577 
42578  /* "mbd/CouplingFSI.pyx":1682
42579  * if c.particle_sdfList is None:
42580  * c.particle_sdfList = [None for i in range(self.nBodiesIBM)]
42581  * if c.particle_velocityList is None: # <<<<<<<<<<<<<<
42582  * c.particle_velocityList = [None for i in range(self.nBodiesIBM)]
42583  * for s in self.subcomponents:
42584  */
42585  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_particle_velocityList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1682, __pyx_L1_error)
42586  __Pyx_GOTREF(__pyx_t_3);
42587  __pyx_t_2 = (__pyx_t_3 == Py_None);
42588  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42589  __pyx_t_1 = (__pyx_t_2 != 0);
42590  if (__pyx_t_1) {
42591 
42592  /* "mbd/CouplingFSI.pyx":1683
42593  * c.particle_sdfList = [None for i in range(self.nBodiesIBM)]
42594  * if c.particle_velocityList is None:
42595  * c.particle_velocityList = [None for i in range(self.nBodiesIBM)] # <<<<<<<<<<<<<<
42596  * for s in self.subcomponents:
42597  * s.poststep()
42598  */
42599  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1683, __pyx_L1_error)
42600  __Pyx_GOTREF(__pyx_t_3);
42601  __pyx_t_10 = __pyx_v_self->nBodiesIBM;
42602  __pyx_t_12 = __pyx_t_10;
42603  for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) {
42604  __pyx_v_i = __pyx_t_13;
42605  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)Py_None))) __PYX_ERR(0, 1683, __pyx_L1_error)
42606  }
42607  if (__Pyx_PyObject_SetAttrStr(__pyx_v_c, __pyx_n_s_particle_velocityList, __pyx_t_3) < 0) __PYX_ERR(0, 1683, __pyx_L1_error)
42608  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42609 
42610  /* "mbd/CouplingFSI.pyx":1682
42611  * if c.particle_sdfList is None:
42612  * c.particle_sdfList = [None for i in range(self.nBodiesIBM)]
42613  * if c.particle_velocityList is None: # <<<<<<<<<<<<<<
42614  * c.particle_velocityList = [None for i in range(self.nBodiesIBM)]
42615  * for s in self.subcomponents:
42616  */
42617  }
42618  }
42619  __pyx_L10:;
42620 
42621  /* "mbd/CouplingFSI.pyx":1662
42622  * self.directory = bytes(Profiling.logDir+str("/"),'utf-8')
42623  * self.thisptr.setDirectory(self.directory)
42624  * if self.nBodiesIBM > 0: # <<<<<<<<<<<<<<
42625  * assert self.model is not None, 'IBM set to be used in bodies but model is not attached. Attach rans model BEFORE calling calculate_init() on chrono system'
42626  * c = self.model.levelModelList[-1].coefficients
42627  */
42628  }
42629 
42630  /* "mbd/CouplingFSI.pyx":1684
42631  * if c.particle_velocityList is None:
42632  * c.particle_velocityList = [None for i in range(self.nBodiesIBM)]
42633  * for s in self.subcomponents: # <<<<<<<<<<<<<<
42634  * s.poststep()
42635  *
42636  */
42637  if (likely(PyList_CheckExact(__pyx_v_self->subcomponents)) || PyTuple_CheckExact(__pyx_v_self->subcomponents)) {
42638  __pyx_t_3 = __pyx_v_self->subcomponents; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
42639  __pyx_t_8 = NULL;
42640  } else {
42641  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_self->subcomponents); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1684, __pyx_L1_error)
42642  __Pyx_GOTREF(__pyx_t_3);
42643  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1684, __pyx_L1_error)
42644  }
42645  for (;;) {
42646  if (likely(!__pyx_t_8)) {
42647  if (likely(PyList_CheckExact(__pyx_t_3))) {
42648  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
42649  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
42650  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1684, __pyx_L1_error)
42651  #else
42652  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1684, __pyx_L1_error)
42653  __Pyx_GOTREF(__pyx_t_4);
42654  #endif
42655  } else {
42656  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
42657  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
42658  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1684, __pyx_L1_error)
42659  #else
42660  __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1684, __pyx_L1_error)
42661  __Pyx_GOTREF(__pyx_t_4);
42662  #endif
42663  }
42664  } else {
42665  __pyx_t_4 = __pyx_t_8(__pyx_t_3);
42666  if (unlikely(!__pyx_t_4)) {
42667  PyObject* exc_type = PyErr_Occurred();
42668  if (exc_type) {
42669  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
42670  else __PYX_ERR(0, 1684, __pyx_L1_error)
42671  }
42672  break;
42673  }
42674  __Pyx_GOTREF(__pyx_t_4);
42675  }
42676  __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4);
42677  __pyx_t_4 = 0;
42678 
42679  /* "mbd/CouplingFSI.pyx":1685
42680  * c.particle_velocityList = [None for i in range(self.nBodiesIBM)]
42681  * for s in self.subcomponents:
42682  * s.poststep() # <<<<<<<<<<<<<<
42683  *
42684  * def setTimestepperType(self, string tstype, bool verbose=False):
42685  */
42686  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_poststep); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1685, __pyx_L1_error)
42687  __Pyx_GOTREF(__pyx_t_11);
42688  __pyx_t_6 = NULL;
42689  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
42690  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
42691  if (likely(__pyx_t_6)) {
42692  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
42693  __Pyx_INCREF(__pyx_t_6);
42694  __Pyx_INCREF(function);
42695  __Pyx_DECREF_SET(__pyx_t_11, function);
42696  }
42697  }
42698  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
42699  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
42700  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1685, __pyx_L1_error)
42701  __Pyx_GOTREF(__pyx_t_4);
42702  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
42703  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
42704 
42705  /* "mbd/CouplingFSI.pyx":1684
42706  * if c.particle_velocityList is None:
42707  * c.particle_velocityList = [None for i in range(self.nBodiesIBM)]
42708  * for s in self.subcomponents: # <<<<<<<<<<<<<<
42709  * s.poststep()
42710  *
42711  */
42712  }
42713  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
42714 
42715  /* "mbd/CouplingFSI.pyx":1634
42716  * Profiling.logEvent("Chrono poststep finished")
42717  *
42718  * def calculate_init(self): # <<<<<<<<<<<<<<
42719  * """Does chrono system initialisation
42720  * (!) Must be called before the first calculate() call.
42721  */
42722 
42723  /* function exit code */
42724  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42725  goto __pyx_L0;
42726  __pyx_L1_error:;
42727  __Pyx_XDECREF(__pyx_t_3);
42728  __Pyx_XDECREF(__pyx_t_4);
42729  __Pyx_XDECREF(__pyx_t_5);
42730  __Pyx_XDECREF(__pyx_t_6);
42731  __Pyx_XDECREF(__pyx_t_11);
42732  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.calculate_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
42733  __pyx_r = NULL;
42734  __pyx_L0:;
42735  __Pyx_XDECREF(__pyx_v_s);
42736  __Pyx_XDECREF(__pyx_v_c);
42737  __Pyx_XGIVEREF(__pyx_r);
42738  __Pyx_TraceReturn(__pyx_r, 0);
42739  __Pyx_RefNannyFinishContext();
42740  return __pyx_r;
42741 }
42742 
42743 /* "mbd/CouplingFSI.pyx":1687
42744  * s.poststep()
42745  *
42746  * def setTimestepperType(self, string tstype, bool verbose=False): # <<<<<<<<<<<<<<
42747  * """Change timestepper (default: Euler)
42748  *
42749  */
42750 
42751 /* Python wrapper */
42752 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_31setTimestepperType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
42753 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_30setTimestepperType[] = "ProtChSystem.setTimestepperType(self, string tstype, bool verbose=False)\nChange timestepper (default: Euler)\n\n Parameters\n ----------\n tstype: str\n type of timestepper ('Euler' or 'HHT')\n ";
42754 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_31setTimestepperType = {"setTimestepperType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_31setTimestepperType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_30setTimestepperType};
42755 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_31setTimestepperType(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
42756  std::string __pyx_v_tstype;
42757  bool __pyx_v_verbose;
42758  int __pyx_lineno = 0;
42759  const char *__pyx_filename = NULL;
42760  int __pyx_clineno = 0;
42761  PyObject *__pyx_r = 0;
42762  __Pyx_RefNannyDeclarations
42763  __Pyx_RefNannySetupContext("setTimestepperType (wrapper)", 0);
42764  {
42765  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tstype,&__pyx_n_s_verbose,0};
42766  PyObject* values[2] = {0,0};
42767  if (unlikely(__pyx_kwds)) {
42768  Py_ssize_t kw_args;
42769  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
42770  switch (pos_args) {
42771  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42772  CYTHON_FALLTHROUGH;
42773  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42774  CYTHON_FALLTHROUGH;
42775  case 0: break;
42776  default: goto __pyx_L5_argtuple_error;
42777  }
42778  kw_args = PyDict_Size(__pyx_kwds);
42779  switch (pos_args) {
42780  case 0:
42781  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tstype)) != 0)) kw_args--;
42782  else goto __pyx_L5_argtuple_error;
42783  CYTHON_FALLTHROUGH;
42784  case 1:
42785  if (kw_args > 0) {
42786  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_verbose);
42787  if (value) { values[1] = value; kw_args--; }
42788  }
42789  }
42790  if (unlikely(kw_args > 0)) {
42791  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTimestepperType") < 0)) __PYX_ERR(0, 1687, __pyx_L3_error)
42792  }
42793  } else {
42794  switch (PyTuple_GET_SIZE(__pyx_args)) {
42795  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
42796  CYTHON_FALLTHROUGH;
42797  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
42798  break;
42799  default: goto __pyx_L5_argtuple_error;
42800  }
42801  }
42802  __pyx_v_tstype = __pyx_convert_string_from_py_std__in_string(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
42803  if (values[1]) {
42804  __pyx_v_verbose = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_verbose == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1687, __pyx_L3_error)
42805  } else {
42806  __pyx_v_verbose = ((bool)0);
42807  }
42808  }
42809  goto __pyx_L4_argument_unpacking_done;
42810  __pyx_L5_argtuple_error:;
42811  __Pyx_RaiseArgtupleInvalid("setTimestepperType", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1687, __pyx_L3_error)
42812  __pyx_L3_error:;
42813  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setTimestepperType", __pyx_clineno, __pyx_lineno, __pyx_filename);
42814  __Pyx_RefNannyFinishContext();
42815  return NULL;
42816  __pyx_L4_argument_unpacking_done:;
42817  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_30setTimestepperType(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_tstype, __pyx_v_verbose);
42818 
42819  /* function exit code */
42820  __Pyx_RefNannyFinishContext();
42821  return __pyx_r;
42822 }
42823 
42824 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_30setTimestepperType(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, std::string __pyx_v_tstype, bool __pyx_v_verbose) {
42825  PyObject *__pyx_v_tstypes = NULL;
42826  PyObject *__pyx_r = NULL;
42827  __Pyx_TraceDeclarations
42828  __Pyx_RefNannyDeclarations
42829  PyObject *__pyx_t_1 = NULL;
42830  PyObject *__pyx_t_2 = NULL;
42831  int __pyx_t_3;
42832  int __pyx_lineno = 0;
42833  const char *__pyx_filename = NULL;
42834  int __pyx_clineno = 0;
42835  __Pyx_TraceFrameInit(__pyx_codeobj__117)
42836  __Pyx_RefNannySetupContext("setTimestepperType", 0);
42837  __Pyx_TraceCall("setTimestepperType", __pyx_f[0], 1687, 0, __PYX_ERR(0, 1687, __pyx_L1_error));
42838 
42839  /* "mbd/CouplingFSI.pyx":1695
42840  * type of timestepper ('Euler' or 'HHT')
42841  * """
42842  * tstypes = ["Euler", "HHT", "Trapezoidal"] # <<<<<<<<<<<<<<
42843  * assert str(tstype) in tstypes, str(tstype)+" not a valid choice."
42844  * self.thisptr.setTimestepperType(tstype, verbose)
42845  */
42846  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error)
42847  __Pyx_GOTREF(__pyx_t_1);
42848  __Pyx_INCREF(__pyx_n_s_Euler);
42849  __Pyx_GIVEREF(__pyx_n_s_Euler);
42850  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Euler);
42851  __Pyx_INCREF(__pyx_n_s_HHT);
42852  __Pyx_GIVEREF(__pyx_n_s_HHT);
42853  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_HHT);
42854  __Pyx_INCREF(__pyx_n_s_Trapezoidal);
42855  __Pyx_GIVEREF(__pyx_n_s_Trapezoidal);
42856  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_Trapezoidal);
42857  __pyx_v_tstypes = ((PyObject*)__pyx_t_1);
42858  __pyx_t_1 = 0;
42859 
42860  /* "mbd/CouplingFSI.pyx":1696
42861  * """
42862  * tstypes = ["Euler", "HHT", "Trapezoidal"]
42863  * assert str(tstype) in tstypes, str(tstype)+" not a valid choice." # <<<<<<<<<<<<<<
42864  * self.thisptr.setTimestepperType(tstype, verbose)
42865  *
42866  */
42867  #ifndef CYTHON_WITHOUT_ASSERTIONS
42868  if (unlikely(!Py_OptimizeFlag)) {
42869  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_tstype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error)
42870  __Pyx_GOTREF(__pyx_t_1);
42871  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
42872  __Pyx_GOTREF(__pyx_t_2);
42873  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42874  __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_v_tstypes, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1696, __pyx_L1_error)
42875  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42876  if (unlikely(!(__pyx_t_3 != 0))) {
42877  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_tstype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
42878  __Pyx_GOTREF(__pyx_t_2);
42879  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error)
42880  __Pyx_GOTREF(__pyx_t_1);
42881  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42882  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_not_a_valid_choice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error)
42883  __Pyx_GOTREF(__pyx_t_2);
42884  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42885  __pyx_t_1 = PyTuple_Pack(1, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error)
42886  __Pyx_GOTREF(__pyx_t_1);
42887  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
42888  PyErr_SetObject(PyExc_AssertionError, __pyx_t_1);
42889  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42890  __PYX_ERR(0, 1696, __pyx_L1_error)
42891  }
42892  }
42893  #endif
42894 
42895  /* "mbd/CouplingFSI.pyx":1697
42896  * tstypes = ["Euler", "HHT", "Trapezoidal"]
42897  * assert str(tstype) in tstypes, str(tstype)+" not a valid choice."
42898  * self.thisptr.setTimestepperType(tstype, verbose) # <<<<<<<<<<<<<<
42899  *
42900  * def addSubcomponent(self, subcomponent):
42901  */
42902  __pyx_v_self->thisptr->setTimestepperType(__pyx_v_tstype, __pyx_v_verbose);
42903 
42904  /* "mbd/CouplingFSI.pyx":1687
42905  * s.poststep()
42906  *
42907  * def setTimestepperType(self, string tstype, bool verbose=False): # <<<<<<<<<<<<<<
42908  * """Change timestepper (default: Euler)
42909  *
42910  */
42911 
42912  /* function exit code */
42913  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42914  goto __pyx_L0;
42915  __pyx_L1_error:;
42916  __Pyx_XDECREF(__pyx_t_1);
42917  __Pyx_XDECREF(__pyx_t_2);
42918  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setTimestepperType", __pyx_clineno, __pyx_lineno, __pyx_filename);
42919  __pyx_r = NULL;
42920  __pyx_L0:;
42921  __Pyx_XDECREF(__pyx_v_tstypes);
42922  __Pyx_XGIVEREF(__pyx_r);
42923  __Pyx_TraceReturn(__pyx_r, 0);
42924  __Pyx_RefNannyFinishContext();
42925  return __pyx_r;
42926 }
42927 
42928 /* "mbd/CouplingFSI.pyx":1699
42929  * self.thisptr.setTimestepperType(tstype, verbose)
42930  *
42931  * def addSubcomponent(self, subcomponent): # <<<<<<<<<<<<<<
42932  * """Adds subcomponent to system
42933  * calculate_init() of subcomponent called before initial timestep
42934  */
42935 
42936 /* Python wrapper */
42937 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_33addSubcomponent(PyObject *__pyx_v_self, PyObject *__pyx_v_subcomponent); /*proto*/
42938 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_32addSubcomponent[] = "ProtChSystem.addSubcomponent(self, subcomponent)\nAdds subcomponent to system\n calculate_init() of subcomponent called before initial timestep\n prestep() and poststep of subcomponent() called at all timestep\n\n Parameters\n ----------\n subcomponent: class instance\n class instance of subcomponent\n ";
42939 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_33addSubcomponent = {"addSubcomponent", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_33addSubcomponent, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_32addSubcomponent};
42940 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_33addSubcomponent(PyObject *__pyx_v_self, PyObject *__pyx_v_subcomponent) {
42941  PyObject *__pyx_r = 0;
42942  __Pyx_RefNannyDeclarations
42943  __Pyx_RefNannySetupContext("addSubcomponent (wrapper)", 0);
42944  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_32addSubcomponent(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_subcomponent));
42945 
42946  /* function exit code */
42947  __Pyx_RefNannyFinishContext();
42948  return __pyx_r;
42949 }
42950 
42951 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_32addSubcomponent(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_subcomponent) {
42952  PyObject *__pyx_r = NULL;
42953  __Pyx_TraceDeclarations
42954  __Pyx_RefNannyDeclarations
42955  PyObject *__pyx_t_1 = NULL;
42956  PyObject *__pyx_t_2 = NULL;
42957  int __pyx_lineno = 0;
42958  const char *__pyx_filename = NULL;
42959  int __pyx_clineno = 0;
42960  __Pyx_TraceFrameInit(__pyx_codeobj__118)
42961  __Pyx_RefNannySetupContext("addSubcomponent", 0);
42962  __Pyx_TraceCall("addSubcomponent", __pyx_f[0], 1699, 0, __PYX_ERR(0, 1699, __pyx_L1_error));
42963 
42964  /* "mbd/CouplingFSI.pyx":1709
42965  * class instance of subcomponent
42966  * """
42967  * self.subcomponents += [subcomponent] # <<<<<<<<<<<<<<
42968  *
42969  * def findElementContainingCoordsKD(self, coords):
42970  */
42971  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
42972  __Pyx_GOTREF(__pyx_t_1);
42973  __Pyx_INCREF(__pyx_v_subcomponent);
42974  __Pyx_GIVEREF(__pyx_v_subcomponent);
42975  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_subcomponent);
42976  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->subcomponents, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
42977  __Pyx_GOTREF(__pyx_t_2);
42978  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
42979  __Pyx_GIVEREF(__pyx_t_2);
42980  __Pyx_GOTREF(__pyx_v_self->subcomponents);
42981  __Pyx_DECREF(__pyx_v_self->subcomponents);
42982  __pyx_v_self->subcomponents = __pyx_t_2;
42983  __pyx_t_2 = 0;
42984 
42985  /* "mbd/CouplingFSI.pyx":1699
42986  * self.thisptr.setTimestepperType(tstype, verbose)
42987  *
42988  * def addSubcomponent(self, subcomponent): # <<<<<<<<<<<<<<
42989  * """Adds subcomponent to system
42990  * calculate_init() of subcomponent called before initial timestep
42991  */
42992 
42993  /* function exit code */
42994  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
42995  goto __pyx_L0;
42996  __pyx_L1_error:;
42997  __Pyx_XDECREF(__pyx_t_1);
42998  __Pyx_XDECREF(__pyx_t_2);
42999  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.addSubcomponent", __pyx_clineno, __pyx_lineno, __pyx_filename);
43000  __pyx_r = NULL;
43001  __pyx_L0:;
43002  __Pyx_XGIVEREF(__pyx_r);
43003  __Pyx_TraceReturn(__pyx_r, 0);
43004  __Pyx_RefNannyFinishContext();
43005  return __pyx_r;
43006 }
43007 
43008 /* "mbd/CouplingFSI.pyx":1711
43009  * self.subcomponents += [subcomponent]
43010  *
43011  * def findElementContainingCoordsKD(self, coords): # <<<<<<<<<<<<<<
43012  * """
43013  * k-d tree search of nearest node, element containing coords, and owning
43014  */
43015 
43016 /* Python wrapper */
43017 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_35findElementContainingCoordsKD(PyObject *__pyx_v_self, PyObject *__pyx_v_coords); /*proto*/
43018 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_34findElementContainingCoordsKD[] = "ProtChSystem.findElementContainingCoordsKD(self, coords)\n\n k-d tree search of nearest node, element containing coords, and owning\n rank.\n\n Parameters\n ----------\n coords: array_like\n global coordinates to look for\n\n Returns\n -------\n xi:\n local coordinates\n node: int\n nearest node\n eN: int\n (local) element number\n rank: int\n processor rank containing element\n ";
43019 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_35findElementContainingCoordsKD = {"findElementContainingCoordsKD", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_35findElementContainingCoordsKD, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_34findElementContainingCoordsKD};
43020 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_35findElementContainingCoordsKD(PyObject *__pyx_v_self, PyObject *__pyx_v_coords) {
43021  PyObject *__pyx_r = 0;
43022  __Pyx_RefNannyDeclarations
43023  __Pyx_RefNannySetupContext("findElementContainingCoordsKD (wrapper)", 0);
43024  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_34findElementContainingCoordsKD(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_coords));
43025 
43026  /* function exit code */
43027  __Pyx_RefNannyFinishContext();
43028  return __pyx_r;
43029 }
43030 
43031 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_34findElementContainingCoordsKD(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_coords) {
43032  PyObject *__pyx_v_comm = NULL;
43033  PyObject *__pyx_v_owning_proc = NULL;
43034  PyObject *__pyx_v_xi = NULL;
43035  CYTHON_UNUSED PyObject *__pyx_v_element = NULL;
43036  PyObject *__pyx_v_local_element = NULL;
43037  PyObject *__pyx_v_nearest_node = NULL;
43038  PyObject *__pyx_v_nearest_node_distance = NULL;
43039  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
43040  PyObject *__pyx_v_eN = NULL;
43041  PyObject *__pyx_v_rank = NULL;
43042  PyObject *__pyx_v_node = NULL;
43043  PyObject *__pyx_r = NULL;
43044  __Pyx_TraceDeclarations
43045  __Pyx_RefNannyDeclarations
43046  PyObject *__pyx_t_1 = NULL;
43047  PyObject *__pyx_t_2 = NULL;
43048  PyObject *__pyx_t_3 = NULL;
43049  PyObject *__pyx_t_4 = NULL;
43050  int __pyx_t_5;
43051  PyObject *(*__pyx_t_6)(PyObject *);
43052  int __pyx_t_7;
43053  PyObject *__pyx_t_8 = NULL;
43054  int __pyx_t_9;
43055  int __pyx_lineno = 0;
43056  const char *__pyx_filename = NULL;
43057  int __pyx_clineno = 0;
43058  __Pyx_TraceFrameInit(__pyx_codeobj__119)
43059  __Pyx_RefNannySetupContext("findElementContainingCoordsKD", 0);
43060  __Pyx_TraceCall("findElementContainingCoordsKD", __pyx_f[0], 1711, 0, __PYX_ERR(0, 1711, __pyx_L1_error));
43061 
43062  /* "mbd/CouplingFSI.pyx":1732
43063  * processor rank containing element
43064  * """
43065  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
43066  * owning_proc = 0
43067  * xi = element = None # initialised as None
43068  */
43069  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1732, __pyx_L1_error)
43070  __Pyx_GOTREF(__pyx_t_3);
43071  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1732, __pyx_L1_error)
43072  __Pyx_GOTREF(__pyx_t_4);
43073  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43074  __pyx_t_3 = NULL;
43075  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
43076  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
43077  if (likely(__pyx_t_3)) {
43078  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
43079  __Pyx_INCREF(__pyx_t_3);
43080  __Pyx_INCREF(function);
43081  __Pyx_DECREF_SET(__pyx_t_4, function);
43082  }
43083  }
43084  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
43085  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
43086  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error)
43087  __Pyx_GOTREF(__pyx_t_2);
43088  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43089  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1732, __pyx_L1_error)
43090  __Pyx_GOTREF(__pyx_t_4);
43091  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43092  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error)
43093  __Pyx_GOTREF(__pyx_t_2);
43094  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43095  __pyx_t_4 = NULL;
43096  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43097  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
43098  if (likely(__pyx_t_4)) {
43099  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43100  __Pyx_INCREF(__pyx_t_4);
43101  __Pyx_INCREF(function);
43102  __Pyx_DECREF_SET(__pyx_t_2, function);
43103  }
43104  }
43105  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
43106  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
43107  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error)
43108  __Pyx_GOTREF(__pyx_t_1);
43109  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43110  __pyx_v_comm = __pyx_t_1;
43111  __pyx_t_1 = 0;
43112 
43113  /* "mbd/CouplingFSI.pyx":1733
43114  * """
43115  * comm = Comm.get().comm.tompi4py()
43116  * owning_proc = 0 # <<<<<<<<<<<<<<
43117  * xi = element = None # initialised as None
43118  * local_element = None
43119  */
43120  __Pyx_INCREF(__pyx_int_0);
43121  __pyx_v_owning_proc = __pyx_int_0;
43122 
43123  /* "mbd/CouplingFSI.pyx":1734
43124  * comm = Comm.get().comm.tompi4py()
43125  * owning_proc = 0
43126  * xi = element = None # initialised as None # <<<<<<<<<<<<<<
43127  * local_element = None
43128  * # get nearest node on each processor
43129  */
43130  __Pyx_INCREF(Py_None);
43131  __pyx_v_xi = Py_None;
43132  __Pyx_INCREF(Py_None);
43133  __pyx_v_element = Py_None;
43134 
43135  /* "mbd/CouplingFSI.pyx":1735
43136  * owning_proc = 0
43137  * xi = element = None # initialised as None
43138  * local_element = None # <<<<<<<<<<<<<<
43139  * # get nearest node on each processor
43140  * comm.barrier()
43141  */
43142  __Pyx_INCREF(Py_None);
43143  __pyx_v_local_element = Py_None;
43144 
43145  /* "mbd/CouplingFSI.pyx":1737
43146  * local_element = None
43147  * # get nearest node on each processor
43148  * comm.barrier() # <<<<<<<<<<<<<<
43149  * nearest_node, nearest_node_distance = getLocalNearestNode(coords, self.nodes_kdtree)
43150  * # look for element containing coords on each processor (if it exists)
43151  */
43152  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1737, __pyx_L1_error)
43153  __Pyx_GOTREF(__pyx_t_2);
43154  __pyx_t_4 = NULL;
43155  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43156  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
43157  if (likely(__pyx_t_4)) {
43158  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43159  __Pyx_INCREF(__pyx_t_4);
43160  __Pyx_INCREF(function);
43161  __Pyx_DECREF_SET(__pyx_t_2, function);
43162  }
43163  }
43164  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
43165  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
43166  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L1_error)
43167  __Pyx_GOTREF(__pyx_t_1);
43168  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43169  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43170 
43171  /* "mbd/CouplingFSI.pyx":1738
43172  * # get nearest node on each processor
43173  * comm.barrier()
43174  * nearest_node, nearest_node_distance = getLocalNearestNode(coords, self.nodes_kdtree) # <<<<<<<<<<<<<<
43175  * # look for element containing coords on each processor (if it exists)
43176  * comm.barrier()
43177  */
43178  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getLocalNearestNode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error)
43179  __Pyx_GOTREF(__pyx_t_2);
43180  __pyx_t_4 = NULL;
43181  __pyx_t_5 = 0;
43182  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
43183  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
43184  if (likely(__pyx_t_4)) {
43185  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43186  __Pyx_INCREF(__pyx_t_4);
43187  __Pyx_INCREF(function);
43188  __Pyx_DECREF_SET(__pyx_t_2, function);
43189  __pyx_t_5 = 1;
43190  }
43191  }
43192  #if CYTHON_FAST_PYCALL
43193  if (PyFunction_Check(__pyx_t_2)) {
43194  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_coords, __pyx_v_self->nodes_kdtree};
43195  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1738, __pyx_L1_error)
43196  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
43197  __Pyx_GOTREF(__pyx_t_1);
43198  } else
43199  #endif
43200  #if CYTHON_FAST_PYCCALL
43201  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
43202  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_coords, __pyx_v_self->nodes_kdtree};
43203  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1738, __pyx_L1_error)
43204  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
43205  __Pyx_GOTREF(__pyx_t_1);
43206  } else
43207  #endif
43208  {
43209  __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1738, __pyx_L1_error)
43210  __Pyx_GOTREF(__pyx_t_3);
43211  if (__pyx_t_4) {
43212  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
43213  }
43214  __Pyx_INCREF(__pyx_v_coords);
43215  __Pyx_GIVEREF(__pyx_v_coords);
43216  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_coords);
43217  __Pyx_INCREF(__pyx_v_self->nodes_kdtree);
43218  __Pyx_GIVEREF(__pyx_v_self->nodes_kdtree);
43219  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_self->nodes_kdtree);
43220  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1738, __pyx_L1_error)
43221  __Pyx_GOTREF(__pyx_t_1);
43222  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43223  }
43224  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43225  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
43226  PyObject* sequence = __pyx_t_1;
43227  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
43228  if (unlikely(size != 2)) {
43229  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
43230  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
43231  __PYX_ERR(0, 1738, __pyx_L1_error)
43232  }
43233  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
43234  if (likely(PyTuple_CheckExact(sequence))) {
43235  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
43236  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
43237  } else {
43238  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
43239  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
43240  }
43241  __Pyx_INCREF(__pyx_t_2);
43242  __Pyx_INCREF(__pyx_t_3);
43243  #else
43244  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error)
43245  __Pyx_GOTREF(__pyx_t_2);
43246  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1738, __pyx_L1_error)
43247  __Pyx_GOTREF(__pyx_t_3);
43248  #endif
43249  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43250  } else {
43251  Py_ssize_t index = -1;
43252  __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1738, __pyx_L1_error)
43253  __Pyx_GOTREF(__pyx_t_4);
43254  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43255  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext;
43256  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
43257  __Pyx_GOTREF(__pyx_t_2);
43258  index = 1; __pyx_t_3 = __pyx_t_6(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
43259  __Pyx_GOTREF(__pyx_t_3);
43260  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1738, __pyx_L1_error)
43261  __pyx_t_6 = NULL;
43262  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43263  goto __pyx_L4_unpacking_done;
43264  __pyx_L3_unpacking_failed:;
43265  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43266  __pyx_t_6 = NULL;
43267  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
43268  __PYX_ERR(0, 1738, __pyx_L1_error)
43269  __pyx_L4_unpacking_done:;
43270  }
43271  __pyx_v_nearest_node = __pyx_t_2;
43272  __pyx_t_2 = 0;
43273  __pyx_v_nearest_node_distance = __pyx_t_3;
43274  __pyx_t_3 = 0;
43275 
43276  /* "mbd/CouplingFSI.pyx":1740
43277  * nearest_node, nearest_node_distance = getLocalNearestNode(coords, self.nodes_kdtree)
43278  * # look for element containing coords on each processor (if it exists)
43279  * comm.barrier() # <<<<<<<<<<<<<<
43280  * # make sure that processor owns nearest node
43281  * if nearest_node < self.model_mesh.nNodes_owned:
43282  */
43283  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L1_error)
43284  __Pyx_GOTREF(__pyx_t_3);
43285  __pyx_t_2 = NULL;
43286  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
43287  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
43288  if (likely(__pyx_t_2)) {
43289  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
43290  __Pyx_INCREF(__pyx_t_2);
43291  __Pyx_INCREF(function);
43292  __Pyx_DECREF_SET(__pyx_t_3, function);
43293  }
43294  }
43295  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
43296  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
43297  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1740, __pyx_L1_error)
43298  __Pyx_GOTREF(__pyx_t_1);
43299  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43300  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43301 
43302  /* "mbd/CouplingFSI.pyx":1742
43303  * comm.barrier()
43304  * # make sure that processor owns nearest node
43305  * if nearest_node < self.model_mesh.nNodes_owned: # <<<<<<<<<<<<<<
43306  * local_element = getLocalElement(self.femSpace_velocity, coords, nearest_node)
43307  *
43308  */
43309  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model_mesh, __pyx_n_s_nNodes_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L1_error)
43310  __Pyx_GOTREF(__pyx_t_1);
43311  __pyx_t_3 = PyObject_RichCompare(__pyx_v_nearest_node, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1742, __pyx_L1_error)
43312  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43313  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1742, __pyx_L1_error)
43314  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43315  if (__pyx_t_7) {
43316 
43317  /* "mbd/CouplingFSI.pyx":1743
43318  * # make sure that processor owns nearest node
43319  * if nearest_node < self.model_mesh.nNodes_owned:
43320  * local_element = getLocalElement(self.femSpace_velocity, coords, nearest_node) # <<<<<<<<<<<<<<
43321  *
43322  * else:
43323  */
43324  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_getLocalElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error)
43325  __Pyx_GOTREF(__pyx_t_1);
43326  __pyx_t_2 = NULL;
43327  __pyx_t_5 = 0;
43328  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
43329  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
43330  if (likely(__pyx_t_2)) {
43331  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
43332  __Pyx_INCREF(__pyx_t_2);
43333  __Pyx_INCREF(function);
43334  __Pyx_DECREF_SET(__pyx_t_1, function);
43335  __pyx_t_5 = 1;
43336  }
43337  }
43338  #if CYTHON_FAST_PYCALL
43339  if (PyFunction_Check(__pyx_t_1)) {
43340  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_self->femSpace_velocity, __pyx_v_coords, __pyx_v_nearest_node};
43341  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L1_error)
43342  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
43343  __Pyx_GOTREF(__pyx_t_3);
43344  } else
43345  #endif
43346  #if CYTHON_FAST_PYCCALL
43347  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
43348  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_self->femSpace_velocity, __pyx_v_coords, __pyx_v_nearest_node};
43349  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L1_error)
43350  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
43351  __Pyx_GOTREF(__pyx_t_3);
43352  } else
43353  #endif
43354  {
43355  __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error)
43356  __Pyx_GOTREF(__pyx_t_4);
43357  if (__pyx_t_2) {
43358  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
43359  }
43360  __Pyx_INCREF(__pyx_v_self->femSpace_velocity);
43361  __Pyx_GIVEREF(__pyx_v_self->femSpace_velocity);
43362  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_self->femSpace_velocity);
43363  __Pyx_INCREF(__pyx_v_coords);
43364  __Pyx_GIVEREF(__pyx_v_coords);
43365  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_coords);
43366  __Pyx_INCREF(__pyx_v_nearest_node);
43367  __Pyx_GIVEREF(__pyx_v_nearest_node);
43368  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_v_nearest_node);
43369  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1743, __pyx_L1_error)
43370  __Pyx_GOTREF(__pyx_t_3);
43371  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43372  }
43373  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43374  __Pyx_DECREF_SET(__pyx_v_local_element, __pyx_t_3);
43375  __pyx_t_3 = 0;
43376 
43377  /* "mbd/CouplingFSI.pyx":1742
43378  * comm.barrier()
43379  * # make sure that processor owns nearest node
43380  * if nearest_node < self.model_mesh.nNodes_owned: # <<<<<<<<<<<<<<
43381  * local_element = getLocalElement(self.femSpace_velocity, coords, nearest_node)
43382  *
43383  */
43384  goto __pyx_L5;
43385  }
43386 
43387  /* "mbd/CouplingFSI.pyx":1746
43388  *
43389  * else:
43390  * nearest_node_distance = 0 # <<<<<<<<<<<<<<
43391  * _, owning_proc = comm.allreduce((-nearest_node_distance, comm.rank),
43392  * op=MPI.MINLOC)
43393  */
43394  /*else*/ {
43395  __Pyx_INCREF(__pyx_int_0);
43396  __Pyx_DECREF_SET(__pyx_v_nearest_node_distance, __pyx_int_0);
43397  }
43398  __pyx_L5:;
43399 
43400  /* "mbd/CouplingFSI.pyx":1747
43401  * else:
43402  * nearest_node_distance = 0
43403  * _, owning_proc = comm.allreduce((-nearest_node_distance, comm.rank), # <<<<<<<<<<<<<<
43404  * op=MPI.MINLOC)
43405  * comm.barrier()
43406  */
43407  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_allreduce); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L1_error)
43408  __Pyx_GOTREF(__pyx_t_3);
43409  __pyx_t_1 = PyNumber_Negative(__pyx_v_nearest_node_distance); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1747, __pyx_L1_error)
43410  __Pyx_GOTREF(__pyx_t_1);
43411  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1747, __pyx_L1_error)
43412  __Pyx_GOTREF(__pyx_t_4);
43413  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L1_error)
43414  __Pyx_GOTREF(__pyx_t_2);
43415  __Pyx_GIVEREF(__pyx_t_1);
43416  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
43417  __Pyx_GIVEREF(__pyx_t_4);
43418  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
43419  __pyx_t_1 = 0;
43420  __pyx_t_4 = 0;
43421  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1747, __pyx_L1_error)
43422  __Pyx_GOTREF(__pyx_t_4);
43423  __Pyx_GIVEREF(__pyx_t_2);
43424  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
43425  __pyx_t_2 = 0;
43426 
43427  /* "mbd/CouplingFSI.pyx":1748
43428  * nearest_node_distance = 0
43429  * _, owning_proc = comm.allreduce((-nearest_node_distance, comm.rank),
43430  * op=MPI.MINLOC) # <<<<<<<<<<<<<<
43431  * comm.barrier()
43432  * if comm.rank == owning_proc and local_element:
43433  */
43434  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1748, __pyx_L1_error)
43435  __Pyx_GOTREF(__pyx_t_2);
43436  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1748, __pyx_L1_error)
43437  __Pyx_GOTREF(__pyx_t_1);
43438  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MINLOC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1748, __pyx_L1_error)
43439  __Pyx_GOTREF(__pyx_t_8);
43440  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
43441  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_op, __pyx_t_8) < 0) __PYX_ERR(0, 1748, __pyx_L1_error)
43442  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43443 
43444  /* "mbd/CouplingFSI.pyx":1747
43445  * else:
43446  * nearest_node_distance = 0
43447  * _, owning_proc = comm.allreduce((-nearest_node_distance, comm.rank), # <<<<<<<<<<<<<<
43448  * op=MPI.MINLOC)
43449  * comm.barrier()
43450  */
43451  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1747, __pyx_L1_error)
43452  __Pyx_GOTREF(__pyx_t_8);
43453  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43454  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43455  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43456  if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
43457  PyObject* sequence = __pyx_t_8;
43458  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
43459  if (unlikely(size != 2)) {
43460  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
43461  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
43462  __PYX_ERR(0, 1747, __pyx_L1_error)
43463  }
43464  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
43465  if (likely(PyTuple_CheckExact(sequence))) {
43466  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
43467  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
43468  } else {
43469  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
43470  __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
43471  }
43472  __Pyx_INCREF(__pyx_t_2);
43473  __Pyx_INCREF(__pyx_t_4);
43474  #else
43475  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L1_error)
43476  __Pyx_GOTREF(__pyx_t_2);
43477  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1747, __pyx_L1_error)
43478  __Pyx_GOTREF(__pyx_t_4);
43479  #endif
43480  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43481  } else {
43482  Py_ssize_t index = -1;
43483  __pyx_t_3 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L1_error)
43484  __Pyx_GOTREF(__pyx_t_3);
43485  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43486  __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext;
43487  index = 0; __pyx_t_2 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
43488  __Pyx_GOTREF(__pyx_t_2);
43489  index = 1; __pyx_t_4 = __pyx_t_6(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed;
43490  __Pyx_GOTREF(__pyx_t_4);
43491  if (__Pyx_IternextUnpackEndCheck(__pyx_t_6(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1747, __pyx_L1_error)
43492  __pyx_t_6 = NULL;
43493  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43494  goto __pyx_L7_unpacking_done;
43495  __pyx_L6_unpacking_failed:;
43496  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43497  __pyx_t_6 = NULL;
43498  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
43499  __PYX_ERR(0, 1747, __pyx_L1_error)
43500  __pyx_L7_unpacking_done:;
43501  }
43502  __pyx_v__ = __pyx_t_2;
43503  __pyx_t_2 = 0;
43504  __Pyx_DECREF_SET(__pyx_v_owning_proc, __pyx_t_4);
43505  __pyx_t_4 = 0;
43506 
43507  /* "mbd/CouplingFSI.pyx":1749
43508  * _, owning_proc = comm.allreduce((-nearest_node_distance, comm.rank),
43509  * op=MPI.MINLOC)
43510  * comm.barrier() # <<<<<<<<<<<<<<
43511  * if comm.rank == owning_proc and local_element:
43512  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element,
43513  */
43514  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1749, __pyx_L1_error)
43515  __Pyx_GOTREF(__pyx_t_4);
43516  __pyx_t_2 = NULL;
43517  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
43518  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
43519  if (likely(__pyx_t_2)) {
43520  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
43521  __Pyx_INCREF(__pyx_t_2);
43522  __Pyx_INCREF(function);
43523  __Pyx_DECREF_SET(__pyx_t_4, function);
43524  }
43525  }
43526  __pyx_t_8 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
43527  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
43528  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1749, __pyx_L1_error)
43529  __Pyx_GOTREF(__pyx_t_8);
43530  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43531  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43532 
43533  /* "mbd/CouplingFSI.pyx":1750
43534  * op=MPI.MINLOC)
43535  * comm.barrier()
43536  * if comm.rank == owning_proc and local_element: # <<<<<<<<<<<<<<
43537  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element,
43538  * coords)
43539  */
43540  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1750, __pyx_L1_error)
43541  __Pyx_GOTREF(__pyx_t_8);
43542  __pyx_t_4 = PyObject_RichCompare(__pyx_t_8, __pyx_v_owning_proc, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1750, __pyx_L1_error)
43543  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43544  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1750, __pyx_L1_error)
43545  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43546  if (__pyx_t_9) {
43547  } else {
43548  __pyx_t_7 = __pyx_t_9;
43549  goto __pyx_L9_bool_binop_done;
43550  }
43551  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_local_element); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1750, __pyx_L1_error)
43552  __pyx_t_7 = __pyx_t_9;
43553  __pyx_L9_bool_binop_done:;
43554  if (__pyx_t_7) {
43555 
43556  /* "mbd/CouplingFSI.pyx":1751
43557  * comm.barrier()
43558  * if comm.rank == owning_proc and local_element:
43559  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element, # <<<<<<<<<<<<<<
43560  * coords)
43561  * comm.barrier()
43562  */
43563  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->femSpace_velocity, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1751, __pyx_L1_error)
43564  __Pyx_GOTREF(__pyx_t_8);
43565  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_getInverseValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1751, __pyx_L1_error)
43566  __Pyx_GOTREF(__pyx_t_2);
43567  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43568 
43569  /* "mbd/CouplingFSI.pyx":1752
43570  * if comm.rank == owning_proc and local_element:
43571  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element,
43572  * coords) # <<<<<<<<<<<<<<
43573  * comm.barrier()
43574  * xi = comm.bcast(xi, owning_proc)
43575  */
43576  __pyx_t_8 = NULL;
43577  __pyx_t_5 = 0;
43578  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43579  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
43580  if (likely(__pyx_t_8)) {
43581  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43582  __Pyx_INCREF(__pyx_t_8);
43583  __Pyx_INCREF(function);
43584  __Pyx_DECREF_SET(__pyx_t_2, function);
43585  __pyx_t_5 = 1;
43586  }
43587  }
43588  #if CYTHON_FAST_PYCALL
43589  if (PyFunction_Check(__pyx_t_2)) {
43590  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_local_element, __pyx_v_coords};
43591  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L1_error)
43592  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43593  __Pyx_GOTREF(__pyx_t_4);
43594  } else
43595  #endif
43596  #if CYTHON_FAST_PYCCALL
43597  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
43598  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_local_element, __pyx_v_coords};
43599  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L1_error)
43600  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43601  __Pyx_GOTREF(__pyx_t_4);
43602  } else
43603  #endif
43604  {
43605  __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1751, __pyx_L1_error)
43606  __Pyx_GOTREF(__pyx_t_3);
43607  if (__pyx_t_8) {
43608  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL;
43609  }
43610  __Pyx_INCREF(__pyx_v_local_element);
43611  __Pyx_GIVEREF(__pyx_v_local_element);
43612  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_local_element);
43613  __Pyx_INCREF(__pyx_v_coords);
43614  __Pyx_GIVEREF(__pyx_v_coords);
43615  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_coords);
43616  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1751, __pyx_L1_error)
43617  __Pyx_GOTREF(__pyx_t_4);
43618  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43619  }
43620  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43621  __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_4);
43622  __pyx_t_4 = 0;
43623 
43624  /* "mbd/CouplingFSI.pyx":1750
43625  * op=MPI.MINLOC)
43626  * comm.barrier()
43627  * if comm.rank == owning_proc and local_element: # <<<<<<<<<<<<<<
43628  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element,
43629  * coords)
43630  */
43631  }
43632 
43633  /* "mbd/CouplingFSI.pyx":1753
43634  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element,
43635  * coords)
43636  * comm.barrier() # <<<<<<<<<<<<<<
43637  * xi = comm.bcast(xi, owning_proc)
43638  * eN = comm.bcast(local_element, owning_proc)
43639  */
43640  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1753, __pyx_L1_error)
43641  __Pyx_GOTREF(__pyx_t_2);
43642  __pyx_t_3 = NULL;
43643  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43644  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
43645  if (likely(__pyx_t_3)) {
43646  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43647  __Pyx_INCREF(__pyx_t_3);
43648  __Pyx_INCREF(function);
43649  __Pyx_DECREF_SET(__pyx_t_2, function);
43650  }
43651  }
43652  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
43653  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
43654  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1753, __pyx_L1_error)
43655  __Pyx_GOTREF(__pyx_t_4);
43656  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43657  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
43658 
43659  /* "mbd/CouplingFSI.pyx":1754
43660  * coords)
43661  * comm.barrier()
43662  * xi = comm.bcast(xi, owning_proc) # <<<<<<<<<<<<<<
43663  * eN = comm.bcast(local_element, owning_proc)
43664  * rank = comm.bcast(owning_proc, owning_proc)
43665  */
43666  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1754, __pyx_L1_error)
43667  __Pyx_GOTREF(__pyx_t_2);
43668  __pyx_t_3 = NULL;
43669  __pyx_t_5 = 0;
43670  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43671  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
43672  if (likely(__pyx_t_3)) {
43673  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43674  __Pyx_INCREF(__pyx_t_3);
43675  __Pyx_INCREF(function);
43676  __Pyx_DECREF_SET(__pyx_t_2, function);
43677  __pyx_t_5 = 1;
43678  }
43679  }
43680  #if CYTHON_FAST_PYCALL
43681  if (PyFunction_Check(__pyx_t_2)) {
43682  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_xi, __pyx_v_owning_proc};
43683  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1754, __pyx_L1_error)
43684  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
43685  __Pyx_GOTREF(__pyx_t_4);
43686  } else
43687  #endif
43688  #if CYTHON_FAST_PYCCALL
43689  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
43690  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_xi, __pyx_v_owning_proc};
43691  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1754, __pyx_L1_error)
43692  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
43693  __Pyx_GOTREF(__pyx_t_4);
43694  } else
43695  #endif
43696  {
43697  __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1754, __pyx_L1_error)
43698  __Pyx_GOTREF(__pyx_t_8);
43699  if (__pyx_t_3) {
43700  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
43701  }
43702  __Pyx_INCREF(__pyx_v_xi);
43703  __Pyx_GIVEREF(__pyx_v_xi);
43704  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_v_xi);
43705  __Pyx_INCREF(__pyx_v_owning_proc);
43706  __Pyx_GIVEREF(__pyx_v_owning_proc);
43707  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_v_owning_proc);
43708  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1754, __pyx_L1_error)
43709  __Pyx_GOTREF(__pyx_t_4);
43710  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43711  }
43712  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43713  __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_4);
43714  __pyx_t_4 = 0;
43715 
43716  /* "mbd/CouplingFSI.pyx":1755
43717  * comm.barrier()
43718  * xi = comm.bcast(xi, owning_proc)
43719  * eN = comm.bcast(local_element, owning_proc) # <<<<<<<<<<<<<<
43720  * rank = comm.bcast(owning_proc, owning_proc)
43721  * node = comm.bcast(nearest_node, owning_proc)
43722  */
43723  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1755, __pyx_L1_error)
43724  __Pyx_GOTREF(__pyx_t_2);
43725  __pyx_t_8 = NULL;
43726  __pyx_t_5 = 0;
43727  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43728  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
43729  if (likely(__pyx_t_8)) {
43730  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43731  __Pyx_INCREF(__pyx_t_8);
43732  __Pyx_INCREF(function);
43733  __Pyx_DECREF_SET(__pyx_t_2, function);
43734  __pyx_t_5 = 1;
43735  }
43736  }
43737  #if CYTHON_FAST_PYCALL
43738  if (PyFunction_Check(__pyx_t_2)) {
43739  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_local_element, __pyx_v_owning_proc};
43740  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
43741  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43742  __Pyx_GOTREF(__pyx_t_4);
43743  } else
43744  #endif
43745  #if CYTHON_FAST_PYCCALL
43746  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
43747  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_local_element, __pyx_v_owning_proc};
43748  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
43749  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43750  __Pyx_GOTREF(__pyx_t_4);
43751  } else
43752  #endif
43753  {
43754  __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error)
43755  __Pyx_GOTREF(__pyx_t_3);
43756  if (__pyx_t_8) {
43757  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL;
43758  }
43759  __Pyx_INCREF(__pyx_v_local_element);
43760  __Pyx_GIVEREF(__pyx_v_local_element);
43761  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_local_element);
43762  __Pyx_INCREF(__pyx_v_owning_proc);
43763  __Pyx_GIVEREF(__pyx_v_owning_proc);
43764  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_owning_proc);
43765  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error)
43766  __Pyx_GOTREF(__pyx_t_4);
43767  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43768  }
43769  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43770  __pyx_v_eN = __pyx_t_4;
43771  __pyx_t_4 = 0;
43772 
43773  /* "mbd/CouplingFSI.pyx":1756
43774  * xi = comm.bcast(xi, owning_proc)
43775  * eN = comm.bcast(local_element, owning_proc)
43776  * rank = comm.bcast(owning_proc, owning_proc) # <<<<<<<<<<<<<<
43777  * node = comm.bcast(nearest_node, owning_proc)
43778  * return xi, node, eN, rank
43779  */
43780  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L1_error)
43781  __Pyx_GOTREF(__pyx_t_2);
43782  __pyx_t_3 = NULL;
43783  __pyx_t_5 = 0;
43784  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43785  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
43786  if (likely(__pyx_t_3)) {
43787  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43788  __Pyx_INCREF(__pyx_t_3);
43789  __Pyx_INCREF(function);
43790  __Pyx_DECREF_SET(__pyx_t_2, function);
43791  __pyx_t_5 = 1;
43792  }
43793  }
43794  #if CYTHON_FAST_PYCALL
43795  if (PyFunction_Check(__pyx_t_2)) {
43796  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_owning_proc, __pyx_v_owning_proc};
43797  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L1_error)
43798  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
43799  __Pyx_GOTREF(__pyx_t_4);
43800  } else
43801  #endif
43802  #if CYTHON_FAST_PYCCALL
43803  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
43804  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_owning_proc, __pyx_v_owning_proc};
43805  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L1_error)
43806  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
43807  __Pyx_GOTREF(__pyx_t_4);
43808  } else
43809  #endif
43810  {
43811  __pyx_t_8 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1756, __pyx_L1_error)
43812  __Pyx_GOTREF(__pyx_t_8);
43813  if (__pyx_t_3) {
43814  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
43815  }
43816  __Pyx_INCREF(__pyx_v_owning_proc);
43817  __Pyx_GIVEREF(__pyx_v_owning_proc);
43818  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_5, __pyx_v_owning_proc);
43819  __Pyx_INCREF(__pyx_v_owning_proc);
43820  __Pyx_GIVEREF(__pyx_v_owning_proc);
43821  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_5, __pyx_v_owning_proc);
43822  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L1_error)
43823  __Pyx_GOTREF(__pyx_t_4);
43824  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
43825  }
43826  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43827  __pyx_v_rank = __pyx_t_4;
43828  __pyx_t_4 = 0;
43829 
43830  /* "mbd/CouplingFSI.pyx":1757
43831  * eN = comm.bcast(local_element, owning_proc)
43832  * rank = comm.bcast(owning_proc, owning_proc)
43833  * node = comm.bcast(nearest_node, owning_proc) # <<<<<<<<<<<<<<
43834  * return xi, node, eN, rank
43835  *
43836  */
43837  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1757, __pyx_L1_error)
43838  __Pyx_GOTREF(__pyx_t_2);
43839  __pyx_t_8 = NULL;
43840  __pyx_t_5 = 0;
43841  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
43842  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
43843  if (likely(__pyx_t_8)) {
43844  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
43845  __Pyx_INCREF(__pyx_t_8);
43846  __Pyx_INCREF(function);
43847  __Pyx_DECREF_SET(__pyx_t_2, function);
43848  __pyx_t_5 = 1;
43849  }
43850  }
43851  #if CYTHON_FAST_PYCALL
43852  if (PyFunction_Check(__pyx_t_2)) {
43853  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_nearest_node, __pyx_v_owning_proc};
43854  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1757, __pyx_L1_error)
43855  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43856  __Pyx_GOTREF(__pyx_t_4);
43857  } else
43858  #endif
43859  #if CYTHON_FAST_PYCCALL
43860  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
43861  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_nearest_node, __pyx_v_owning_proc};
43862  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1757, __pyx_L1_error)
43863  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
43864  __Pyx_GOTREF(__pyx_t_4);
43865  } else
43866  #endif
43867  {
43868  __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error)
43869  __Pyx_GOTREF(__pyx_t_3);
43870  if (__pyx_t_8) {
43871  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL;
43872  }
43873  __Pyx_INCREF(__pyx_v_nearest_node);
43874  __Pyx_GIVEREF(__pyx_v_nearest_node);
43875  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_nearest_node);
43876  __Pyx_INCREF(__pyx_v_owning_proc);
43877  __Pyx_GIVEREF(__pyx_v_owning_proc);
43878  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_v_owning_proc);
43879  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1757, __pyx_L1_error)
43880  __Pyx_GOTREF(__pyx_t_4);
43881  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
43882  }
43883  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
43884  __pyx_v_node = __pyx_t_4;
43885  __pyx_t_4 = 0;
43886 
43887  /* "mbd/CouplingFSI.pyx":1758
43888  * rank = comm.bcast(owning_proc, owning_proc)
43889  * node = comm.bcast(nearest_node, owning_proc)
43890  * return xi, node, eN, rank # <<<<<<<<<<<<<<
43891  *
43892  *
43893  */
43894  __Pyx_XDECREF(__pyx_r);
43895  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1758, __pyx_L1_error)
43896  __Pyx_GOTREF(__pyx_t_4);
43897  __Pyx_INCREF(__pyx_v_xi);
43898  __Pyx_GIVEREF(__pyx_v_xi);
43899  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_xi);
43900  __Pyx_INCREF(__pyx_v_node);
43901  __Pyx_GIVEREF(__pyx_v_node);
43902  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_node);
43903  __Pyx_INCREF(__pyx_v_eN);
43904  __Pyx_GIVEREF(__pyx_v_eN);
43905  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_eN);
43906  __Pyx_INCREF(__pyx_v_rank);
43907  __Pyx_GIVEREF(__pyx_v_rank);
43908  PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_rank);
43909  __pyx_r = __pyx_t_4;
43910  __pyx_t_4 = 0;
43911  goto __pyx_L0;
43912 
43913  /* "mbd/CouplingFSI.pyx":1711
43914  * self.subcomponents += [subcomponent]
43915  *
43916  * def findElementContainingCoordsKD(self, coords): # <<<<<<<<<<<<<<
43917  * """
43918  * k-d tree search of nearest node, element containing coords, and owning
43919  */
43920 
43921  /* function exit code */
43922  __pyx_L1_error:;
43923  __Pyx_XDECREF(__pyx_t_1);
43924  __Pyx_XDECREF(__pyx_t_2);
43925  __Pyx_XDECREF(__pyx_t_3);
43926  __Pyx_XDECREF(__pyx_t_4);
43927  __Pyx_XDECREF(__pyx_t_8);
43928  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.findElementContainingCoordsKD", __pyx_clineno, __pyx_lineno, __pyx_filename);
43929  __pyx_r = NULL;
43930  __pyx_L0:;
43931  __Pyx_XDECREF(__pyx_v_comm);
43932  __Pyx_XDECREF(__pyx_v_owning_proc);
43933  __Pyx_XDECREF(__pyx_v_xi);
43934  __Pyx_XDECREF(__pyx_v_element);
43935  __Pyx_XDECREF(__pyx_v_local_element);
43936  __Pyx_XDECREF(__pyx_v_nearest_node);
43937  __Pyx_XDECREF(__pyx_v_nearest_node_distance);
43938  __Pyx_XDECREF(__pyx_v__);
43939  __Pyx_XDECREF(__pyx_v_eN);
43940  __Pyx_XDECREF(__pyx_v_rank);
43941  __Pyx_XDECREF(__pyx_v_node);
43942  __Pyx_XGIVEREF(__pyx_r);
43943  __Pyx_TraceReturn(__pyx_r, 0);
43944  __Pyx_RefNannyFinishContext();
43945  return __pyx_r;
43946 }
43947 
43948 /* "mbd/CouplingFSI.pyx":1761
43949  *
43950  *
43951  * def findElementContainingCoordsDist(self, # <<<<<<<<<<<<<<
43952  * coords,
43953  * node_guess,
43954  */
43955 
43956 /* Python wrapper */
43957 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_37findElementContainingCoordsDist(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
43958 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_36findElementContainingCoordsDist[] = "ProtChSystem.findElementContainingCoordsDist(self, coords, node_guess, eN_guess, rank_guess)\n\n Distance search of nearest node, element containing coords, and owning\n rank.\n\n Parameters\n ----------\n coords: array_like\n global coordinates to look for\n node_guess: int\n first guess of closest node\n eN_guess: int\n first guess of element containing coords\n rank_guess: int\n first guess of rank containing coords\n\n Returns\n -------\n xi:\n local coordinates\n node: int\n nearest node\n eN: int\n (local) element number\n rank: int\n processor rank containing element\n ";
43959 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_37findElementContainingCoordsDist = {"findElementContainingCoordsDist", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_37findElementContainingCoordsDist, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_36findElementContainingCoordsDist};
43960 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_37findElementContainingCoordsDist(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
43961  PyObject *__pyx_v_coords = 0;
43962  PyObject *__pyx_v_node_guess = 0;
43963  PyObject *__pyx_v_eN_guess = 0;
43964  PyObject *__pyx_v_rank_guess = 0;
43965  int __pyx_lineno = 0;
43966  const char *__pyx_filename = NULL;
43967  int __pyx_clineno = 0;
43968  PyObject *__pyx_r = 0;
43969  __Pyx_RefNannyDeclarations
43970  __Pyx_RefNannySetupContext("findElementContainingCoordsDist (wrapper)", 0);
43971  {
43972  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coords,&__pyx_n_s_node_guess,&__pyx_n_s_eN_guess,&__pyx_n_s_rank_guess,0};
43973  PyObject* values[4] = {0,0,0,0};
43974  if (unlikely(__pyx_kwds)) {
43975  Py_ssize_t kw_args;
43976  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
43977  switch (pos_args) {
43978  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
43979  CYTHON_FALLTHROUGH;
43980  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
43981  CYTHON_FALLTHROUGH;
43982  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
43983  CYTHON_FALLTHROUGH;
43984  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
43985  CYTHON_FALLTHROUGH;
43986  case 0: break;
43987  default: goto __pyx_L5_argtuple_error;
43988  }
43989  kw_args = PyDict_Size(__pyx_kwds);
43990  switch (pos_args) {
43991  case 0:
43992  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coords)) != 0)) kw_args--;
43993  else goto __pyx_L5_argtuple_error;
43994  CYTHON_FALLTHROUGH;
43995  case 1:
43996  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node_guess)) != 0)) kw_args--;
43997  else {
43998  __Pyx_RaiseArgtupleInvalid("findElementContainingCoordsDist", 1, 4, 4, 1); __PYX_ERR(0, 1761, __pyx_L3_error)
43999  }
44000  CYTHON_FALLTHROUGH;
44001  case 2:
44002  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eN_guess)) != 0)) kw_args--;
44003  else {
44004  __Pyx_RaiseArgtupleInvalid("findElementContainingCoordsDist", 1, 4, 4, 2); __PYX_ERR(0, 1761, __pyx_L3_error)
44005  }
44006  CYTHON_FALLTHROUGH;
44007  case 3:
44008  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank_guess)) != 0)) kw_args--;
44009  else {
44010  __Pyx_RaiseArgtupleInvalid("findElementContainingCoordsDist", 1, 4, 4, 3); __PYX_ERR(0, 1761, __pyx_L3_error)
44011  }
44012  }
44013  if (unlikely(kw_args > 0)) {
44014  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findElementContainingCoordsDist") < 0)) __PYX_ERR(0, 1761, __pyx_L3_error)
44015  }
44016  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
44017  goto __pyx_L5_argtuple_error;
44018  } else {
44019  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
44020  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
44021  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
44022  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
44023  }
44024  __pyx_v_coords = values[0];
44025  __pyx_v_node_guess = values[1];
44026  __pyx_v_eN_guess = values[2];
44027  __pyx_v_rank_guess = values[3];
44028  }
44029  goto __pyx_L4_argument_unpacking_done;
44030  __pyx_L5_argtuple_error:;
44031  __Pyx_RaiseArgtupleInvalid("findElementContainingCoordsDist", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1761, __pyx_L3_error)
44032  __pyx_L3_error:;
44033  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.findElementContainingCoordsDist", __pyx_clineno, __pyx_lineno, __pyx_filename);
44034  __Pyx_RefNannyFinishContext();
44035  return NULL;
44036  __pyx_L4_argument_unpacking_done:;
44037  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_36findElementContainingCoordsDist(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_coords, __pyx_v_node_guess, __pyx_v_eN_guess, __pyx_v_rank_guess);
44038 
44039  /* function exit code */
44040  __Pyx_RefNannyFinishContext();
44041  return __pyx_r;
44042 }
44043 
44044 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_36findElementContainingCoordsDist(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_coords, PyObject *__pyx_v_node_guess, PyObject *__pyx_v_eN_guess, PyObject *__pyx_v_rank_guess) {
44045  PyObject *__pyx_v_mm = NULL;
44046  PyObject *__pyx_v_mg = NULL;
44047  PyObject *__pyx_v_comm = NULL;
44048  PyObject *__pyx_v_xi = NULL;
44049  PyObject *__pyx_v_local_element = NULL;
44050  PyObject *__pyx_v_rank_owning = NULL;
44051  PyObject *__pyx_v_nearest_node = NULL;
44052  int __pyx_v_coords_outside;
44053  PyObject *__pyx_v_rank_owning_previous = NULL;
44054  int __pyx_v_owning_rank;
44055  CYTHON_UNUSED PyObject *__pyx_v_dist = NULL;
44056  PyObject *__pyx_v_node_nb_global = NULL;
44057  PyObject *__pyx_v_new_rank = NULL;
44058  PyObject *__pyx_v_i = NULL;
44059  CYTHON_UNUSED PyObject *__pyx_v__ = NULL;
44060  PyObject *__pyx_v_eN = NULL;
44061  PyObject *__pyx_v_rank = NULL;
44062  PyObject *__pyx_v_node = NULL;
44063  PyObject *__pyx_r = NULL;
44064  __Pyx_TraceDeclarations
44065  __Pyx_RefNannyDeclarations
44066  PyObject *__pyx_t_1 = NULL;
44067  PyObject *__pyx_t_2 = NULL;
44068  PyObject *__pyx_t_3 = NULL;
44069  PyObject *__pyx_t_4 = NULL;
44070  int __pyx_t_5;
44071  int __pyx_t_6;
44072  int __pyx_t_7;
44073  int __pyx_t_8;
44074  __Pyx_memviewslice __pyx_t_9 = { 0, 0, { 0 }, { 0 }, { 0 } };
44075  __Pyx_memviewslice __pyx_t_10 = { 0, 0, { 0 }, { 0 }, { 0 } };
44076  __Pyx_memviewslice __pyx_t_11 = { 0, 0, { 0 }, { 0 }, { 0 } };
44077  __Pyx_memviewslice __pyx_t_12 = { 0, 0, { 0 }, { 0 }, { 0 } };
44078  int __pyx_t_13;
44079  PyObject *(*__pyx_t_14)(PyObject *);
44080  PyObject *__pyx_t_15 = NULL;
44081  Py_ssize_t __pyx_t_16;
44082  PyObject *(*__pyx_t_17)(PyObject *);
44083  int __pyx_lineno = 0;
44084  const char *__pyx_filename = NULL;
44085  int __pyx_clineno = 0;
44086  __Pyx_TraceFrameInit(__pyx_codeobj__120)
44087  __Pyx_RefNannySetupContext("findElementContainingCoordsDist", 0);
44088  __Pyx_TraceCall("findElementContainingCoordsDist", __pyx_f[0], 1761, 0, __PYX_ERR(0, 1761, __pyx_L1_error));
44089 
44090  /* "mbd/CouplingFSI.pyx":1792
44091  * processor rank containing element
44092  * """
44093  * mm = self.model_mesh # local mesh # <<<<<<<<<<<<<<
44094  * mg = self.model_mesh.globalMesh # global mesh
44095  * comm = Comm.get().comm.tompi4py()
44096  */
44097  __pyx_t_1 = __pyx_v_self->model_mesh;
44098  __Pyx_INCREF(__pyx_t_1);
44099  __pyx_v_mm = __pyx_t_1;
44100  __pyx_t_1 = 0;
44101 
44102  /* "mbd/CouplingFSI.pyx":1793
44103  * """
44104  * mm = self.model_mesh # local mesh
44105  * mg = self.model_mesh.globalMesh # global mesh # <<<<<<<<<<<<<<
44106  * comm = Comm.get().comm.tompi4py()
44107  * xi = None # initialised as None
44108  */
44109  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->model_mesh, __pyx_n_s_globalMesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1793, __pyx_L1_error)
44110  __Pyx_GOTREF(__pyx_t_1);
44111  __pyx_v_mg = __pyx_t_1;
44112  __pyx_t_1 = 0;
44113 
44114  /* "mbd/CouplingFSI.pyx":1794
44115  * mm = self.model_mesh # local mesh
44116  * mg = self.model_mesh.globalMesh # global mesh
44117  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
44118  * xi = None # initialised as None
44119  * # get nearest node on each processor
44120  */
44121  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1794, __pyx_L1_error)
44122  __Pyx_GOTREF(__pyx_t_3);
44123  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L1_error)
44124  __Pyx_GOTREF(__pyx_t_4);
44125  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44126  __pyx_t_3 = NULL;
44127  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
44128  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
44129  if (likely(__pyx_t_3)) {
44130  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
44131  __Pyx_INCREF(__pyx_t_3);
44132  __Pyx_INCREF(function);
44133  __Pyx_DECREF_SET(__pyx_t_4, function);
44134  }
44135  }
44136  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
44137  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
44138  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
44139  __Pyx_GOTREF(__pyx_t_2);
44140  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44141  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L1_error)
44142  __Pyx_GOTREF(__pyx_t_4);
44143  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44144  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
44145  __Pyx_GOTREF(__pyx_t_2);
44146  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44147  __pyx_t_4 = NULL;
44148  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
44149  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
44150  if (likely(__pyx_t_4)) {
44151  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
44152  __Pyx_INCREF(__pyx_t_4);
44153  __Pyx_INCREF(function);
44154  __Pyx_DECREF_SET(__pyx_t_2, function);
44155  }
44156  }
44157  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
44158  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
44159  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error)
44160  __Pyx_GOTREF(__pyx_t_1);
44161  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44162  __pyx_v_comm = __pyx_t_1;
44163  __pyx_t_1 = 0;
44164 
44165  /* "mbd/CouplingFSI.pyx":1795
44166  * mg = self.model_mesh.globalMesh # global mesh
44167  * comm = Comm.get().comm.tompi4py()
44168  * xi = None # initialised as None # <<<<<<<<<<<<<<
44169  * # get nearest node on each processor
44170  * local_element = None
44171  */
44172  __Pyx_INCREF(Py_None);
44173  __pyx_v_xi = Py_None;
44174 
44175  /* "mbd/CouplingFSI.pyx":1797
44176  * xi = None # initialised as None
44177  * # get nearest node on each processor
44178  * local_element = None # <<<<<<<<<<<<<<
44179  * # first check if element still containing coords
44180  * rank_owning = rank_guess
44181  */
44182  __Pyx_INCREF(Py_None);
44183  __pyx_v_local_element = Py_None;
44184 
44185  /* "mbd/CouplingFSI.pyx":1799
44186  * local_element = None
44187  * # first check if element still containing coords
44188  * rank_owning = rank_guess # <<<<<<<<<<<<<<
44189  * nearest_node = node_guess
44190  * if comm.rank == rank_owning:
44191  */
44192  __Pyx_INCREF(__pyx_v_rank_guess);
44193  __pyx_v_rank_owning = __pyx_v_rank_guess;
44194 
44195  /* "mbd/CouplingFSI.pyx":1800
44196  * # first check if element still containing coords
44197  * rank_owning = rank_guess
44198  * nearest_node = node_guess # <<<<<<<<<<<<<<
44199  * if comm.rank == rank_owning:
44200  * if 0 <= eN_guess < mm.nElements_global:
44201  */
44202  __Pyx_INCREF(__pyx_v_node_guess);
44203  __pyx_v_nearest_node = __pyx_v_node_guess;
44204 
44205  /* "mbd/CouplingFSI.pyx":1801
44206  * rank_owning = rank_guess
44207  * nearest_node = node_guess
44208  * if comm.rank == rank_owning: # <<<<<<<<<<<<<<
44209  * if 0 <= eN_guess < mm.nElements_global:
44210  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords)
44211  */
44212  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1801, __pyx_L1_error)
44213  __Pyx_GOTREF(__pyx_t_1);
44214  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_rank_owning, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1801, __pyx_L1_error)
44215  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44216  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1801, __pyx_L1_error)
44217  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44218  if (__pyx_t_5) {
44219 
44220  /* "mbd/CouplingFSI.pyx":1802
44221  * nearest_node = node_guess
44222  * if comm.rank == rank_owning:
44223  * if 0 <= eN_guess < mm.nElements_global: # <<<<<<<<<<<<<<
44224  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords)
44225  * if self.femSpace_velocity.elementMaps.referenceElement.onElement(xi):
44226  */
44227  __pyx_t_2 = PyObject_RichCompare(__pyx_int_0, __pyx_v_eN_guess, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error)
44228  if (__Pyx_PyObject_IsTrue(__pyx_t_2)) {
44229  __Pyx_DECREF(__pyx_t_2);
44230  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mm, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error)
44231  __Pyx_GOTREF(__pyx_t_1);
44232  __pyx_t_2 = PyObject_RichCompare(__pyx_v_eN_guess, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1802, __pyx_L1_error)
44233  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44234  }
44235  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1802, __pyx_L1_error)
44236  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44237  if (__pyx_t_5) {
44238 
44239  /* "mbd/CouplingFSI.pyx":1803
44240  * if comm.rank == rank_owning:
44241  * if 0 <= eN_guess < mm.nElements_global:
44242  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords) # <<<<<<<<<<<<<<
44243  * if self.femSpace_velocity.elementMaps.referenceElement.onElement(xi):
44244  * local_element = eN_guess
44245  */
44246  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->femSpace_velocity, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1803, __pyx_L1_error)
44247  __Pyx_GOTREF(__pyx_t_1);
44248  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getInverseValue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1803, __pyx_L1_error)
44249  __Pyx_GOTREF(__pyx_t_4);
44250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44251  __pyx_t_1 = NULL;
44252  __pyx_t_6 = 0;
44253  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
44254  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
44255  if (likely(__pyx_t_1)) {
44256  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
44257  __Pyx_INCREF(__pyx_t_1);
44258  __Pyx_INCREF(function);
44259  __Pyx_DECREF_SET(__pyx_t_4, function);
44260  __pyx_t_6 = 1;
44261  }
44262  }
44263  #if CYTHON_FAST_PYCALL
44264  if (PyFunction_Check(__pyx_t_4)) {
44265  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_eN_guess, __pyx_v_coords};
44266  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
44267  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
44268  __Pyx_GOTREF(__pyx_t_2);
44269  } else
44270  #endif
44271  #if CYTHON_FAST_PYCCALL
44272  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
44273  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_eN_guess, __pyx_v_coords};
44274  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
44275  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
44276  __Pyx_GOTREF(__pyx_t_2);
44277  } else
44278  #endif
44279  {
44280  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1803, __pyx_L1_error)
44281  __Pyx_GOTREF(__pyx_t_3);
44282  if (__pyx_t_1) {
44283  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
44284  }
44285  __Pyx_INCREF(__pyx_v_eN_guess);
44286  __Pyx_GIVEREF(__pyx_v_eN_guess);
44287  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_eN_guess);
44288  __Pyx_INCREF(__pyx_v_coords);
44289  __Pyx_GIVEREF(__pyx_v_coords);
44290  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_coords);
44291  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1803, __pyx_L1_error)
44292  __Pyx_GOTREF(__pyx_t_2);
44293  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44294  }
44295  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44296  __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_2);
44297  __pyx_t_2 = 0;
44298 
44299  /* "mbd/CouplingFSI.pyx":1804
44300  * if 0 <= eN_guess < mm.nElements_global:
44301  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords)
44302  * if self.femSpace_velocity.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
44303  * local_element = eN_guess
44304  * else:
44305  */
44306  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->femSpace_velocity, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1804, __pyx_L1_error)
44307  __Pyx_GOTREF(__pyx_t_4);
44308  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_referenceElement); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1804, __pyx_L1_error)
44309  __Pyx_GOTREF(__pyx_t_3);
44310  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44311  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_onElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1804, __pyx_L1_error)
44312  __Pyx_GOTREF(__pyx_t_4);
44313  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44314  __pyx_t_3 = NULL;
44315  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
44316  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
44317  if (likely(__pyx_t_3)) {
44318  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
44319  __Pyx_INCREF(__pyx_t_3);
44320  __Pyx_INCREF(function);
44321  __Pyx_DECREF_SET(__pyx_t_4, function);
44322  }
44323  }
44324  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_xi) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_xi);
44325  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
44326  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error)
44327  __Pyx_GOTREF(__pyx_t_2);
44328  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44329  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1804, __pyx_L1_error)
44330  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44331  if (__pyx_t_5) {
44332 
44333  /* "mbd/CouplingFSI.pyx":1805
44334  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords)
44335  * if self.femSpace_velocity.elementMaps.referenceElement.onElement(xi):
44336  * local_element = eN_guess # <<<<<<<<<<<<<<
44337  * else:
44338  * xi = None
44339  */
44340  __Pyx_INCREF(__pyx_v_eN_guess);
44341  __Pyx_DECREF_SET(__pyx_v_local_element, __pyx_v_eN_guess);
44342 
44343  /* "mbd/CouplingFSI.pyx":1804
44344  * if 0 <= eN_guess < mm.nElements_global:
44345  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords)
44346  * if self.femSpace_velocity.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
44347  * local_element = eN_guess
44348  * else:
44349  */
44350  goto __pyx_L5;
44351  }
44352 
44353  /* "mbd/CouplingFSI.pyx":1807
44354  * local_element = eN_guess
44355  * else:
44356  * xi = None # <<<<<<<<<<<<<<
44357  * local_element = comm.bcast(local_element, rank_owning)
44358  * # if not, find new nearest node, element, and owning processor
44359  */
44360  /*else*/ {
44361  __Pyx_INCREF(Py_None);
44362  __Pyx_DECREF_SET(__pyx_v_xi, Py_None);
44363  }
44364  __pyx_L5:;
44365 
44366  /* "mbd/CouplingFSI.pyx":1802
44367  * nearest_node = node_guess
44368  * if comm.rank == rank_owning:
44369  * if 0 <= eN_guess < mm.nElements_global: # <<<<<<<<<<<<<<
44370  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords)
44371  * if self.femSpace_velocity.elementMaps.referenceElement.onElement(xi):
44372  */
44373  }
44374 
44375  /* "mbd/CouplingFSI.pyx":1801
44376  * rank_owning = rank_guess
44377  * nearest_node = node_guess
44378  * if comm.rank == rank_owning: # <<<<<<<<<<<<<<
44379  * if 0 <= eN_guess < mm.nElements_global:
44380  * xi = self.femSpace_velocity.elementMaps.getInverseValue(eN_guess, coords)
44381  */
44382  }
44383 
44384  /* "mbd/CouplingFSI.pyx":1808
44385  * else:
44386  * xi = None
44387  * local_element = comm.bcast(local_element, rank_owning) # <<<<<<<<<<<<<<
44388  * # if not, find new nearest node, element, and owning processor
44389  * coords_outside = False
44390  */
44391  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1808, __pyx_L1_error)
44392  __Pyx_GOTREF(__pyx_t_4);
44393  __pyx_t_3 = NULL;
44394  __pyx_t_6 = 0;
44395  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
44396  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
44397  if (likely(__pyx_t_3)) {
44398  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
44399  __Pyx_INCREF(__pyx_t_3);
44400  __Pyx_INCREF(function);
44401  __Pyx_DECREF_SET(__pyx_t_4, function);
44402  __pyx_t_6 = 1;
44403  }
44404  }
44405  #if CYTHON_FAST_PYCALL
44406  if (PyFunction_Check(__pyx_t_4)) {
44407  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_local_element, __pyx_v_rank_owning};
44408  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L1_error)
44409  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
44410  __Pyx_GOTREF(__pyx_t_2);
44411  } else
44412  #endif
44413  #if CYTHON_FAST_PYCCALL
44414  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
44415  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_local_element, __pyx_v_rank_owning};
44416  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L1_error)
44417  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
44418  __Pyx_GOTREF(__pyx_t_2);
44419  } else
44420  #endif
44421  {
44422  __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error)
44423  __Pyx_GOTREF(__pyx_t_1);
44424  if (__pyx_t_3) {
44425  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
44426  }
44427  __Pyx_INCREF(__pyx_v_local_element);
44428  __Pyx_GIVEREF(__pyx_v_local_element);
44429  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_local_element);
44430  __Pyx_INCREF(__pyx_v_rank_owning);
44431  __Pyx_GIVEREF(__pyx_v_rank_owning);
44432  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_rank_owning);
44433  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L1_error)
44434  __Pyx_GOTREF(__pyx_t_2);
44435  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44436  }
44437  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44438  __Pyx_DECREF_SET(__pyx_v_local_element, __pyx_t_2);
44439  __pyx_t_2 = 0;
44440 
44441  /* "mbd/CouplingFSI.pyx":1810
44442  * local_element = comm.bcast(local_element, rank_owning)
44443  * # if not, find new nearest node, element, and owning processor
44444  * coords_outside = False # <<<<<<<<<<<<<<
44445  * while local_element is None and coords_outside is False:
44446  * rank_owning_previous = rank_owning
44447  */
44448  __pyx_v_coords_outside = 0;
44449 
44450  /* "mbd/CouplingFSI.pyx":1811
44451  * # if not, find new nearest node, element, and owning processor
44452  * coords_outside = False
44453  * while local_element is None and coords_outside is False: # <<<<<<<<<<<<<<
44454  * rank_owning_previous = rank_owning
44455  * owning_rank = False
44456  */
44457  while (1) {
44458  __pyx_t_7 = (__pyx_v_local_element == Py_None);
44459  __pyx_t_8 = (__pyx_t_7 != 0);
44460  if (__pyx_t_8) {
44461  } else {
44462  __pyx_t_5 = __pyx_t_8;
44463  goto __pyx_L8_bool_binop_done;
44464  }
44465  __pyx_t_8 = ((__pyx_v_coords_outside == 0) != 0);
44466  __pyx_t_5 = __pyx_t_8;
44467  __pyx_L8_bool_binop_done:;
44468  if (!__pyx_t_5) break;
44469 
44470  /* "mbd/CouplingFSI.pyx":1812
44471  * coords_outside = False
44472  * while local_element is None and coords_outside is False:
44473  * rank_owning_previous = rank_owning # <<<<<<<<<<<<<<
44474  * owning_rank = False
44475  * if comm.rank == rank_owning:
44476  */
44477  __Pyx_INCREF(__pyx_v_rank_owning);
44478  __Pyx_XDECREF_SET(__pyx_v_rank_owning_previous, __pyx_v_rank_owning);
44479 
44480  /* "mbd/CouplingFSI.pyx":1813
44481  * while local_element is None and coords_outside is False:
44482  * rank_owning_previous = rank_owning
44483  * owning_rank = False # <<<<<<<<<<<<<<
44484  * if comm.rank == rank_owning:
44485  * owning_rank = True
44486  */
44487  __pyx_v_owning_rank = 0;
44488 
44489  /* "mbd/CouplingFSI.pyx":1814
44490  * rank_owning_previous = rank_owning
44491  * owning_rank = False
44492  * if comm.rank == rank_owning: # <<<<<<<<<<<<<<
44493  * owning_rank = True
44494  * nearest_node, dist = pyxGetLocalNearestNode(coords=coords,
44495  */
44496  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1814, __pyx_L1_error)
44497  __Pyx_GOTREF(__pyx_t_2);
44498  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_v_rank_owning, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1814, __pyx_L1_error)
44499  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44500  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1814, __pyx_L1_error)
44501  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44502  if (__pyx_t_5) {
44503 
44504  /* "mbd/CouplingFSI.pyx":1815
44505  * owning_rank = False
44506  * if comm.rank == rank_owning:
44507  * owning_rank = True # <<<<<<<<<<<<<<
44508  * nearest_node, dist = pyxGetLocalNearestNode(coords=coords,
44509  * nodeArray=mm.nodeArray,
44510  */
44511  __pyx_v_owning_rank = 1;
44512 
44513  /* "mbd/CouplingFSI.pyx":1816
44514  * if comm.rank == rank_owning:
44515  * owning_rank = True
44516  * nearest_node, dist = pyxGetLocalNearestNode(coords=coords, # <<<<<<<<<<<<<<
44517  * nodeArray=mm.nodeArray,
44518  * nodeStarOffsets=mm.nodeStarOffsets,
44519  */
44520  __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_coords, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1816, __pyx_L1_error)
44521 
44522  /* "mbd/CouplingFSI.pyx":1817
44523  * owning_rank = True
44524  * nearest_node, dist = pyxGetLocalNearestNode(coords=coords,
44525  * nodeArray=mm.nodeArray, # <<<<<<<<<<<<<<
44526  * nodeStarOffsets=mm.nodeStarOffsets,
44527  * nodeStarArray=mm.nodeStarArray,
44528  */
44529  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mm, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1817, __pyx_L1_error)
44530  __Pyx_GOTREF(__pyx_t_4);
44531  __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1817, __pyx_L1_error)
44532  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44533 
44534  /* "mbd/CouplingFSI.pyx":1818
44535  * nearest_node, dist = pyxGetLocalNearestNode(coords=coords,
44536  * nodeArray=mm.nodeArray,
44537  * nodeStarOffsets=mm.nodeStarOffsets, # <<<<<<<<<<<<<<
44538  * nodeStarArray=mm.nodeStarArray,
44539  * node=nearest_node,
44540  */
44541  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mm, __pyx_n_s_nodeStarOffsets); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1818, __pyx_L1_error)
44542  __Pyx_GOTREF(__pyx_t_4);
44543  __pyx_t_11 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_11.memview)) __PYX_ERR(0, 1818, __pyx_L1_error)
44544  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44545 
44546  /* "mbd/CouplingFSI.pyx":1819
44547  * nodeArray=mm.nodeArray,
44548  * nodeStarOffsets=mm.nodeStarOffsets,
44549  * nodeStarArray=mm.nodeStarArray, # <<<<<<<<<<<<<<
44550  * node=nearest_node,
44551  * rank=rank_owning)
44552  */
44553  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mm, __pyx_n_s_nodeStarArray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1819, __pyx_L1_error)
44554  __Pyx_GOTREF(__pyx_t_4);
44555  __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1819, __pyx_L1_error)
44556  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44557 
44558  /* "mbd/CouplingFSI.pyx":1820
44559  * nodeStarOffsets=mm.nodeStarOffsets,
44560  * nodeStarArray=mm.nodeStarArray,
44561  * node=nearest_node, # <<<<<<<<<<<<<<
44562  * rank=rank_owning)
44563  * if nearest_node >= mm.nNodes_owned:
44564  */
44565  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_nearest_node); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1820, __pyx_L1_error)
44566 
44567  /* "mbd/CouplingFSI.pyx":1821
44568  * nodeStarArray=mm.nodeStarArray,
44569  * node=nearest_node,
44570  * rank=rank_owning) # <<<<<<<<<<<<<<
44571  * if nearest_node >= mm.nNodes_owned:
44572  * # change rank ownership
44573  */
44574  __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_v_rank_owning); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1821, __pyx_L1_error)
44575 
44576  /* "mbd/CouplingFSI.pyx":1816
44577  * if comm.rank == rank_owning:
44578  * owning_rank = True
44579  * nearest_node, dist = pyxGetLocalNearestNode(coords=coords, # <<<<<<<<<<<<<<
44580  * nodeArray=mm.nodeArray,
44581  * nodeStarOffsets=mm.nodeStarOffsets,
44582  */
44583  __pyx_t_4 = __pyx_f_3mbd_11CouplingFSI_pyxGetLocalNearestNode(__pyx_t_9, __pyx_t_10, __pyx_t_11, __pyx_t_12, __pyx_t_6, __pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L1_error)
44584  __Pyx_GOTREF(__pyx_t_4);
44585  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
44586  __pyx_t_9.memview = NULL;
44587  __pyx_t_9.data = NULL;
44588  __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
44589  __pyx_t_10.memview = NULL;
44590  __pyx_t_10.data = NULL;
44591  __PYX_XDEC_MEMVIEW(&__pyx_t_11, 1);
44592  __pyx_t_11.memview = NULL;
44593  __pyx_t_11.data = NULL;
44594  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
44595  __pyx_t_12.memview = NULL;
44596  __pyx_t_12.data = NULL;
44597  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
44598  PyObject* sequence = __pyx_t_4;
44599  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
44600  if (unlikely(size != 2)) {
44601  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
44602  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
44603  __PYX_ERR(0, 1816, __pyx_L1_error)
44604  }
44605  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44606  if (likely(PyTuple_CheckExact(sequence))) {
44607  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
44608  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
44609  } else {
44610  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
44611  __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
44612  }
44613  __Pyx_INCREF(__pyx_t_2);
44614  __Pyx_INCREF(__pyx_t_1);
44615  #else
44616  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1816, __pyx_L1_error)
44617  __Pyx_GOTREF(__pyx_t_2);
44618  __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error)
44619  __Pyx_GOTREF(__pyx_t_1);
44620  #endif
44621  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44622  } else {
44623  Py_ssize_t index = -1;
44624  __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1816, __pyx_L1_error)
44625  __Pyx_GOTREF(__pyx_t_3);
44626  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44627  __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext;
44628  index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L11_unpacking_failed;
44629  __Pyx_GOTREF(__pyx_t_2);
44630  index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
44631  __Pyx_GOTREF(__pyx_t_1);
44632  if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1816, __pyx_L1_error)
44633  __pyx_t_14 = NULL;
44634  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44635  goto __pyx_L12_unpacking_done;
44636  __pyx_L11_unpacking_failed:;
44637  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44638  __pyx_t_14 = NULL;
44639  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
44640  __PYX_ERR(0, 1816, __pyx_L1_error)
44641  __pyx_L12_unpacking_done:;
44642  }
44643  __Pyx_DECREF_SET(__pyx_v_nearest_node, __pyx_t_2);
44644  __pyx_t_2 = 0;
44645  __Pyx_XDECREF_SET(__pyx_v_dist, __pyx_t_1);
44646  __pyx_t_1 = 0;
44647 
44648  /* "mbd/CouplingFSI.pyx":1822
44649  * node=nearest_node,
44650  * rank=rank_owning)
44651  * if nearest_node >= mm.nNodes_owned: # <<<<<<<<<<<<<<
44652  * # change rank ownership
44653  * node_nb_global = mg.nodeNumbering_subdomain2global[nearest_node]
44654  */
44655  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mm, __pyx_n_s_nNodes_owned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1822, __pyx_L1_error)
44656  __Pyx_GOTREF(__pyx_t_4);
44657  __pyx_t_1 = PyObject_RichCompare(__pyx_v_nearest_node, __pyx_t_4, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error)
44658  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44659  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1822, __pyx_L1_error)
44660  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44661  if (__pyx_t_5) {
44662 
44663  /* "mbd/CouplingFSI.pyx":1824
44664  * if nearest_node >= mm.nNodes_owned:
44665  * # change rank ownership
44666  * node_nb_global = mg.nodeNumbering_subdomain2global[nearest_node] # <<<<<<<<<<<<<<
44667  * if not mg.nodeOffsets_subdomain_owned[comm.rank] <= node_nb_global < mg.nodeOffsets_subdomain_owned[comm.rank+1]:
44668  * new_rank = None
44669  */
44670  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mg, __pyx_n_s_nodeNumbering_subdomain2global); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
44671  __Pyx_GOTREF(__pyx_t_1);
44672  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_nearest_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1824, __pyx_L1_error)
44673  __Pyx_GOTREF(__pyx_t_4);
44674  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44675  __Pyx_XDECREF_SET(__pyx_v_node_nb_global, __pyx_t_4);
44676  __pyx_t_4 = 0;
44677 
44678  /* "mbd/CouplingFSI.pyx":1825
44679  * # change rank ownership
44680  * node_nb_global = mg.nodeNumbering_subdomain2global[nearest_node]
44681  * if not mg.nodeOffsets_subdomain_owned[comm.rank] <= node_nb_global < mg.nodeOffsets_subdomain_owned[comm.rank+1]: # <<<<<<<<<<<<<<
44682  * new_rank = None
44683  * for i in range(len(mg.nodeOffsets_subdomain_owned)):
44684  */
44685  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mg, __pyx_n_s_nodeOffsets_subdomain_owned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error)
44686  __Pyx_GOTREF(__pyx_t_4);
44687  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
44688  __Pyx_GOTREF(__pyx_t_1);
44689  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1825, __pyx_L1_error)
44690  __Pyx_GOTREF(__pyx_t_2);
44691  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44692  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44693  __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_v_node_nb_global, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
44694  if (__Pyx_PyObject_IsTrue(__pyx_t_1)) {
44695  __Pyx_DECREF(__pyx_t_1);
44696  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mg, __pyx_n_s_nodeOffsets_subdomain_owned); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error)
44697  __Pyx_GOTREF(__pyx_t_4);
44698  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1825, __pyx_L1_error)
44699  __Pyx_GOTREF(__pyx_t_3);
44700  __pyx_t_15 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1825, __pyx_L1_error)
44701  __Pyx_GOTREF(__pyx_t_15);
44702  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44703  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1825, __pyx_L1_error)
44704  __Pyx_GOTREF(__pyx_t_3);
44705  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
44706  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
44707  __pyx_t_1 = PyObject_RichCompare(__pyx_v_node_nb_global, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
44708  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44709  }
44710  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44711  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1825, __pyx_L1_error)
44712  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44713  __pyx_t_8 = ((!__pyx_t_5) != 0);
44714  if (__pyx_t_8) {
44715 
44716  /* "mbd/CouplingFSI.pyx":1826
44717  * node_nb_global = mg.nodeNumbering_subdomain2global[nearest_node]
44718  * if not mg.nodeOffsets_subdomain_owned[comm.rank] <= node_nb_global < mg.nodeOffsets_subdomain_owned[comm.rank+1]:
44719  * new_rank = None # <<<<<<<<<<<<<<
44720  * for i in range(len(mg.nodeOffsets_subdomain_owned)):
44721  * if mg.nodeOffsets_subdomain_owned[i] > node_nb_global:
44722  */
44723  __Pyx_INCREF(Py_None);
44724  __Pyx_XDECREF_SET(__pyx_v_new_rank, Py_None);
44725 
44726  /* "mbd/CouplingFSI.pyx":1827
44727  * if not mg.nodeOffsets_subdomain_owned[comm.rank] <= node_nb_global < mg.nodeOffsets_subdomain_owned[comm.rank+1]:
44728  * new_rank = None
44729  * for i in range(len(mg.nodeOffsets_subdomain_owned)): # <<<<<<<<<<<<<<
44730  * if mg.nodeOffsets_subdomain_owned[i] > node_nb_global:
44731  * # changing processor
44732  */
44733  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mg, __pyx_n_s_nodeOffsets_subdomain_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
44734  __Pyx_GOTREF(__pyx_t_1);
44735  __pyx_t_16 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1827, __pyx_L1_error)
44736  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44737  __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
44738  __Pyx_GOTREF(__pyx_t_1);
44739  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error)
44740  __Pyx_GOTREF(__pyx_t_2);
44741  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44742  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
44743  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_16 = 0;
44744  __pyx_t_17 = NULL;
44745  } else {
44746  __pyx_t_16 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error)
44747  __Pyx_GOTREF(__pyx_t_1);
44748  __pyx_t_17 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1827, __pyx_L1_error)
44749  }
44750  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44751  for (;;) {
44752  if (likely(!__pyx_t_17)) {
44753  if (likely(PyList_CheckExact(__pyx_t_1))) {
44754  if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_1)) break;
44755  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44756  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
44757  #else
44758  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error)
44759  __Pyx_GOTREF(__pyx_t_2);
44760  #endif
44761  } else {
44762  if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
44763  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
44764  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_2); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
44765  #else
44766  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error)
44767  __Pyx_GOTREF(__pyx_t_2);
44768  #endif
44769  }
44770  } else {
44771  __pyx_t_2 = __pyx_t_17(__pyx_t_1);
44772  if (unlikely(!__pyx_t_2)) {
44773  PyObject* exc_type = PyErr_Occurred();
44774  if (exc_type) {
44775  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
44776  else __PYX_ERR(0, 1827, __pyx_L1_error)
44777  }
44778  break;
44779  }
44780  __Pyx_GOTREF(__pyx_t_2);
44781  }
44782  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
44783  __pyx_t_2 = 0;
44784 
44785  /* "mbd/CouplingFSI.pyx":1828
44786  * new_rank = None
44787  * for i in range(len(mg.nodeOffsets_subdomain_owned)):
44788  * if mg.nodeOffsets_subdomain_owned[i] > node_nb_global: # <<<<<<<<<<<<<<
44789  * # changing processor
44790  * if new_rank is None:
44791  */
44792  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mg, __pyx_n_s_nodeOffsets_subdomain_owned); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L1_error)
44793  __Pyx_GOTREF(__pyx_t_2);
44794  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1828, __pyx_L1_error)
44795  __Pyx_GOTREF(__pyx_t_3);
44796  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44797  __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_node_nb_global, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L1_error)
44798  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
44799  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1828, __pyx_L1_error)
44800  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44801  if (__pyx_t_8) {
44802 
44803  /* "mbd/CouplingFSI.pyx":1830
44804  * if mg.nodeOffsets_subdomain_owned[i] > node_nb_global:
44805  * # changing processor
44806  * if new_rank is None: # <<<<<<<<<<<<<<
44807  * new_rank = i-1
44808  * # getting nearest node number on new rank
44809  */
44810  __pyx_t_8 = (__pyx_v_new_rank == Py_None);
44811  __pyx_t_5 = (__pyx_t_8 != 0);
44812  if (__pyx_t_5) {
44813 
44814  /* "mbd/CouplingFSI.pyx":1831
44815  * # changing processor
44816  * if new_rank is None:
44817  * new_rank = i-1 # <<<<<<<<<<<<<<
44818  * # getting nearest node number on new rank
44819  * if new_rank is not None:
44820  */
44821  __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error)
44822  __Pyx_GOTREF(__pyx_t_2);
44823  __Pyx_DECREF_SET(__pyx_v_new_rank, __pyx_t_2);
44824  __pyx_t_2 = 0;
44825 
44826  /* "mbd/CouplingFSI.pyx":1830
44827  * if mg.nodeOffsets_subdomain_owned[i] > node_nb_global:
44828  * # changing processor
44829  * if new_rank is None: # <<<<<<<<<<<<<<
44830  * new_rank = i-1
44831  * # getting nearest node number on new rank
44832  */
44833  }
44834 
44835  /* "mbd/CouplingFSI.pyx":1828
44836  * new_rank = None
44837  * for i in range(len(mg.nodeOffsets_subdomain_owned)):
44838  * if mg.nodeOffsets_subdomain_owned[i] > node_nb_global: # <<<<<<<<<<<<<<
44839  * # changing processor
44840  * if new_rank is None:
44841  */
44842  }
44843 
44844  /* "mbd/CouplingFSI.pyx":1827
44845  * if not mg.nodeOffsets_subdomain_owned[comm.rank] <= node_nb_global < mg.nodeOffsets_subdomain_owned[comm.rank+1]:
44846  * new_rank = None
44847  * for i in range(len(mg.nodeOffsets_subdomain_owned)): # <<<<<<<<<<<<<<
44848  * if mg.nodeOffsets_subdomain_owned[i] > node_nb_global:
44849  * # changing processor
44850  */
44851  }
44852  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44853 
44854  /* "mbd/CouplingFSI.pyx":1833
44855  * new_rank = i-1
44856  * # getting nearest node number on new rank
44857  * if new_rank is not None: # <<<<<<<<<<<<<<
44858  * nearest_node = node_nb_global-mg.nodeOffsets_subdomain_owned[new_rank]
44859  * rank_owning = new_rank
44860  */
44861  __pyx_t_5 = (__pyx_v_new_rank != Py_None);
44862  __pyx_t_8 = (__pyx_t_5 != 0);
44863  if (__pyx_t_8) {
44864 
44865  /* "mbd/CouplingFSI.pyx":1834
44866  * # getting nearest node number on new rank
44867  * if new_rank is not None:
44868  * nearest_node = node_nb_global-mg.nodeOffsets_subdomain_owned[new_rank] # <<<<<<<<<<<<<<
44869  * rank_owning = new_rank
44870  * else:
44871  */
44872  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mg, __pyx_n_s_nodeOffsets_subdomain_owned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
44873  __Pyx_GOTREF(__pyx_t_1);
44874  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_new_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1834, __pyx_L1_error)
44875  __Pyx_GOTREF(__pyx_t_2);
44876  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
44877  __pyx_t_1 = PyNumber_Subtract(__pyx_v_node_nb_global, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
44878  __Pyx_GOTREF(__pyx_t_1);
44879  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44880  __Pyx_DECREF_SET(__pyx_v_nearest_node, __pyx_t_1);
44881  __pyx_t_1 = 0;
44882 
44883  /* "mbd/CouplingFSI.pyx":1835
44884  * if new_rank is not None:
44885  * nearest_node = node_nb_global-mg.nodeOffsets_subdomain_owned[new_rank]
44886  * rank_owning = new_rank # <<<<<<<<<<<<<<
44887  * else:
44888  * # find local element
44889  */
44890  __Pyx_INCREF(__pyx_v_new_rank);
44891  __Pyx_DECREF_SET(__pyx_v_rank_owning, __pyx_v_new_rank);
44892 
44893  /* "mbd/CouplingFSI.pyx":1833
44894  * new_rank = i-1
44895  * # getting nearest node number on new rank
44896  * if new_rank is not None: # <<<<<<<<<<<<<<
44897  * nearest_node = node_nb_global-mg.nodeOffsets_subdomain_owned[new_rank]
44898  * rank_owning = new_rank
44899  */
44900  }
44901 
44902  /* "mbd/CouplingFSI.pyx":1825
44903  * # change rank ownership
44904  * node_nb_global = mg.nodeNumbering_subdomain2global[nearest_node]
44905  * if not mg.nodeOffsets_subdomain_owned[comm.rank] <= node_nb_global < mg.nodeOffsets_subdomain_owned[comm.rank+1]: # <<<<<<<<<<<<<<
44906  * new_rank = None
44907  * for i in range(len(mg.nodeOffsets_subdomain_owned)):
44908  */
44909  }
44910 
44911  /* "mbd/CouplingFSI.pyx":1822
44912  * node=nearest_node,
44913  * rank=rank_owning)
44914  * if nearest_node >= mm.nNodes_owned: # <<<<<<<<<<<<<<
44915  * # change rank ownership
44916  * node_nb_global = mg.nodeNumbering_subdomain2global[nearest_node]
44917  */
44918  goto __pyx_L13;
44919  }
44920 
44921  /* "mbd/CouplingFSI.pyx":1838
44922  * else:
44923  * # find local element
44924  * local_element = getLocalElement(self.femSpace_velocity, # <<<<<<<<<<<<<<
44925  * coords,
44926  * nearest_node)
44927  */
44928  /*else*/ {
44929  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getLocalElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
44930  __Pyx_GOTREF(__pyx_t_2);
44931 
44932  /* "mbd/CouplingFSI.pyx":1840
44933  * local_element = getLocalElement(self.femSpace_velocity,
44934  * coords,
44935  * nearest_node) # <<<<<<<<<<<<<<
44936  * if local_element is not None:
44937  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element, coords)
44938  */
44939  __pyx_t_3 = NULL;
44940  __pyx_t_13 = 0;
44941  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
44942  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
44943  if (likely(__pyx_t_3)) {
44944  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
44945  __Pyx_INCREF(__pyx_t_3);
44946  __Pyx_INCREF(function);
44947  __Pyx_DECREF_SET(__pyx_t_2, function);
44948  __pyx_t_13 = 1;
44949  }
44950  }
44951  #if CYTHON_FAST_PYCALL
44952  if (PyFunction_Check(__pyx_t_2)) {
44953  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->femSpace_velocity, __pyx_v_coords, __pyx_v_nearest_node};
44954  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
44955  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
44956  __Pyx_GOTREF(__pyx_t_1);
44957  } else
44958  #endif
44959  #if CYTHON_FAST_PYCCALL
44960  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
44961  PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->femSpace_velocity, __pyx_v_coords, __pyx_v_nearest_node};
44962  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
44963  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
44964  __Pyx_GOTREF(__pyx_t_1);
44965  } else
44966  #endif
44967  {
44968  __pyx_t_15 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1838, __pyx_L1_error)
44969  __Pyx_GOTREF(__pyx_t_15);
44970  if (__pyx_t_3) {
44971  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3); __pyx_t_3 = NULL;
44972  }
44973  __Pyx_INCREF(__pyx_v_self->femSpace_velocity);
44974  __Pyx_GIVEREF(__pyx_v_self->femSpace_velocity);
44975  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_13, __pyx_v_self->femSpace_velocity);
44976  __Pyx_INCREF(__pyx_v_coords);
44977  __Pyx_GIVEREF(__pyx_v_coords);
44978  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_13, __pyx_v_coords);
44979  __Pyx_INCREF(__pyx_v_nearest_node);
44980  __Pyx_GIVEREF(__pyx_v_nearest_node);
44981  PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_13, __pyx_v_nearest_node);
44982  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
44983  __Pyx_GOTREF(__pyx_t_1);
44984  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
44985  }
44986  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
44987  __Pyx_DECREF_SET(__pyx_v_local_element, __pyx_t_1);
44988  __pyx_t_1 = 0;
44989 
44990  /* "mbd/CouplingFSI.pyx":1841
44991  * coords,
44992  * nearest_node)
44993  * if local_element is not None: # <<<<<<<<<<<<<<
44994  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element, coords)
44995  * # ownership might have changed here
44996  */
44997  __pyx_t_8 = (__pyx_v_local_element != Py_None);
44998  __pyx_t_5 = (__pyx_t_8 != 0);
44999  if (__pyx_t_5) {
45000 
45001  /* "mbd/CouplingFSI.pyx":1842
45002  * nearest_node)
45003  * if local_element is not None:
45004  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element, coords) # <<<<<<<<<<<<<<
45005  * # ownership might have changed here
45006  * comm.barrier()
45007  */
45008  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->femSpace_velocity, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1842, __pyx_L1_error)
45009  __Pyx_GOTREF(__pyx_t_2);
45010  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getInverseValue); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1842, __pyx_L1_error)
45011  __Pyx_GOTREF(__pyx_t_15);
45012  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45013  __pyx_t_2 = NULL;
45014  __pyx_t_13 = 0;
45015  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
45016  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_15);
45017  if (likely(__pyx_t_2)) {
45018  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
45019  __Pyx_INCREF(__pyx_t_2);
45020  __Pyx_INCREF(function);
45021  __Pyx_DECREF_SET(__pyx_t_15, function);
45022  __pyx_t_13 = 1;
45023  }
45024  }
45025  #if CYTHON_FAST_PYCALL
45026  if (PyFunction_Check(__pyx_t_15)) {
45027  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_local_element, __pyx_v_coords};
45028  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
45029  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
45030  __Pyx_GOTREF(__pyx_t_1);
45031  } else
45032  #endif
45033  #if CYTHON_FAST_PYCCALL
45034  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
45035  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_local_element, __pyx_v_coords};
45036  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
45037  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
45038  __Pyx_GOTREF(__pyx_t_1);
45039  } else
45040  #endif
45041  {
45042  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1842, __pyx_L1_error)
45043  __Pyx_GOTREF(__pyx_t_3);
45044  if (__pyx_t_2) {
45045  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
45046  }
45047  __Pyx_INCREF(__pyx_v_local_element);
45048  __Pyx_GIVEREF(__pyx_v_local_element);
45049  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_local_element);
45050  __Pyx_INCREF(__pyx_v_coords);
45051  __Pyx_GIVEREF(__pyx_v_coords);
45052  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_v_coords);
45053  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error)
45054  __Pyx_GOTREF(__pyx_t_1);
45055  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45056  }
45057  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45058  __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_1);
45059  __pyx_t_1 = 0;
45060 
45061  /* "mbd/CouplingFSI.pyx":1841
45062  * coords,
45063  * nearest_node)
45064  * if local_element is not None: # <<<<<<<<<<<<<<
45065  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element, coords)
45066  * # ownership might have changed here
45067  */
45068  }
45069  }
45070  __pyx_L13:;
45071 
45072  /* "mbd/CouplingFSI.pyx":1814
45073  * rank_owning_previous = rank_owning
45074  * owning_rank = False
45075  * if comm.rank == rank_owning: # <<<<<<<<<<<<<<
45076  * owning_rank = True
45077  * nearest_node, dist = pyxGetLocalNearestNode(coords=coords,
45078  */
45079  }
45080 
45081  /* "mbd/CouplingFSI.pyx":1844
45082  * xi = self.femSpace_velocity.elementMaps.getInverseValue(local_element, coords)
45083  * # ownership might have changed here
45084  * comm.barrier() # <<<<<<<<<<<<<<
45085  * _, rank_owning = comm.allreduce((owning_rank, rank_owning),
45086  * op=MPI.MAXLOC)
45087  */
45088  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1844, __pyx_L1_error)
45089  __Pyx_GOTREF(__pyx_t_15);
45090  __pyx_t_3 = NULL;
45091  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
45092  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_15);
45093  if (likely(__pyx_t_3)) {
45094  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
45095  __Pyx_INCREF(__pyx_t_3);
45096  __Pyx_INCREF(function);
45097  __Pyx_DECREF_SET(__pyx_t_15, function);
45098  }
45099  }
45100  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
45101  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45102  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1844, __pyx_L1_error)
45103  __Pyx_GOTREF(__pyx_t_1);
45104  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45105  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45106 
45107  /* "mbd/CouplingFSI.pyx":1845
45108  * # ownership might have changed here
45109  * comm.barrier()
45110  * _, rank_owning = comm.allreduce((owning_rank, rank_owning), # <<<<<<<<<<<<<<
45111  * op=MPI.MAXLOC)
45112  * _, nearest_node = comm.allreduce((owning_rank, nearest_node),
45113  */
45114  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_allreduce); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
45115  __Pyx_GOTREF(__pyx_t_1);
45116  __pyx_t_15 = __Pyx_PyBool_FromLong(__pyx_v_owning_rank); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1845, __pyx_L1_error)
45117  __Pyx_GOTREF(__pyx_t_15);
45118  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1845, __pyx_L1_error)
45119  __Pyx_GOTREF(__pyx_t_3);
45120  __Pyx_GIVEREF(__pyx_t_15);
45121  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_15);
45122  __Pyx_INCREF(__pyx_v_rank_owning);
45123  __Pyx_GIVEREF(__pyx_v_rank_owning);
45124  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_rank_owning);
45125  __pyx_t_15 = 0;
45126  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1845, __pyx_L1_error)
45127  __Pyx_GOTREF(__pyx_t_15);
45128  __Pyx_GIVEREF(__pyx_t_3);
45129  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3);
45130  __pyx_t_3 = 0;
45131 
45132  /* "mbd/CouplingFSI.pyx":1846
45133  * comm.barrier()
45134  * _, rank_owning = comm.allreduce((owning_rank, rank_owning),
45135  * op=MPI.MAXLOC) # <<<<<<<<<<<<<<
45136  * _, nearest_node = comm.allreduce((owning_rank, nearest_node),
45137  * op=MPI.MAXLOC)
45138  */
45139  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1846, __pyx_L1_error)
45140  __Pyx_GOTREF(__pyx_t_3);
45141  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_MPI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
45142  __Pyx_GOTREF(__pyx_t_2);
45143  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_MAXLOC); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1846, __pyx_L1_error)
45144  __Pyx_GOTREF(__pyx_t_4);
45145  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45146  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_op, __pyx_t_4) < 0) __PYX_ERR(0, 1846, __pyx_L1_error)
45147  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45148 
45149  /* "mbd/CouplingFSI.pyx":1845
45150  * # ownership might have changed here
45151  * comm.barrier()
45152  * _, rank_owning = comm.allreduce((owning_rank, rank_owning), # <<<<<<<<<<<<<<
45153  * op=MPI.MAXLOC)
45154  * _, nearest_node = comm.allreduce((owning_rank, nearest_node),
45155  */
45156  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1845, __pyx_L1_error)
45157  __Pyx_GOTREF(__pyx_t_4);
45158  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45159  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45160  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45161  if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
45162  PyObject* sequence = __pyx_t_4;
45163  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
45164  if (unlikely(size != 2)) {
45165  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
45166  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
45167  __PYX_ERR(0, 1845, __pyx_L1_error)
45168  }
45169  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
45170  if (likely(PyTuple_CheckExact(sequence))) {
45171  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
45172  __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1);
45173  } else {
45174  __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
45175  __pyx_t_15 = PyList_GET_ITEM(sequence, 1);
45176  }
45177  __Pyx_INCREF(__pyx_t_3);
45178  __Pyx_INCREF(__pyx_t_15);
45179  #else
45180  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1845, __pyx_L1_error)
45181  __Pyx_GOTREF(__pyx_t_3);
45182  __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1845, __pyx_L1_error)
45183  __Pyx_GOTREF(__pyx_t_15);
45184  #endif
45185  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45186  } else {
45187  Py_ssize_t index = -1;
45188  __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1845, __pyx_L1_error)
45189  __Pyx_GOTREF(__pyx_t_1);
45190  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45191  __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext;
45192  index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_3)) goto __pyx_L21_unpacking_failed;
45193  __Pyx_GOTREF(__pyx_t_3);
45194  index = 1; __pyx_t_15 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_15)) goto __pyx_L21_unpacking_failed;
45195  __Pyx_GOTREF(__pyx_t_15);
45196  if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_1), 2) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)
45197  __pyx_t_14 = NULL;
45198  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45199  goto __pyx_L22_unpacking_done;
45200  __pyx_L21_unpacking_failed:;
45201  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45202  __pyx_t_14 = NULL;
45203  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
45204  __PYX_ERR(0, 1845, __pyx_L1_error)
45205  __pyx_L22_unpacking_done:;
45206  }
45207  __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_3);
45208  __pyx_t_3 = 0;
45209  __Pyx_DECREF_SET(__pyx_v_rank_owning, __pyx_t_15);
45210  __pyx_t_15 = 0;
45211 
45212  /* "mbd/CouplingFSI.pyx":1847
45213  * _, rank_owning = comm.allreduce((owning_rank, rank_owning),
45214  * op=MPI.MAXLOC)
45215  * _, nearest_node = comm.allreduce((owning_rank, nearest_node), # <<<<<<<<<<<<<<
45216  * op=MPI.MAXLOC)
45217  * comm.barrier()
45218  */
45219  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_allreduce); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1847, __pyx_L1_error)
45220  __Pyx_GOTREF(__pyx_t_4);
45221  __pyx_t_15 = __Pyx_PyBool_FromLong(__pyx_v_owning_rank); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1847, __pyx_L1_error)
45222  __Pyx_GOTREF(__pyx_t_15);
45223  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1847, __pyx_L1_error)
45224  __Pyx_GOTREF(__pyx_t_3);
45225  __Pyx_GIVEREF(__pyx_t_15);
45226  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_15);
45227  __Pyx_INCREF(__pyx_v_nearest_node);
45228  __Pyx_GIVEREF(__pyx_v_nearest_node);
45229  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_nearest_node);
45230  __pyx_t_15 = 0;
45231  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1847, __pyx_L1_error)
45232  __Pyx_GOTREF(__pyx_t_15);
45233  __Pyx_GIVEREF(__pyx_t_3);
45234  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_3);
45235  __pyx_t_3 = 0;
45236 
45237  /* "mbd/CouplingFSI.pyx":1848
45238  * op=MPI.MAXLOC)
45239  * _, nearest_node = comm.allreduce((owning_rank, nearest_node),
45240  * op=MPI.MAXLOC) # <<<<<<<<<<<<<<
45241  * comm.barrier()
45242  * # if ownership is the same after 1 loop and local_element not found
45243  */
45244  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __pyx_L1_error)
45245  __Pyx_GOTREF(__pyx_t_3);
45246  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L1_error)
45247  __Pyx_GOTREF(__pyx_t_1);
45248  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_MAXLOC); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L1_error)
45249  __Pyx_GOTREF(__pyx_t_2);
45250  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45251  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_op, __pyx_t_2) < 0) __PYX_ERR(0, 1848, __pyx_L1_error)
45252  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45253 
45254  /* "mbd/CouplingFSI.pyx":1847
45255  * _, rank_owning = comm.allreduce((owning_rank, rank_owning),
45256  * op=MPI.MAXLOC)
45257  * _, nearest_node = comm.allreduce((owning_rank, nearest_node), # <<<<<<<<<<<<<<
45258  * op=MPI.MAXLOC)
45259  * comm.barrier()
45260  */
45261  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_15, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L1_error)
45262  __Pyx_GOTREF(__pyx_t_2);
45263  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45264  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45265  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45266  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
45267  PyObject* sequence = __pyx_t_2;
45268  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
45269  if (unlikely(size != 2)) {
45270  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
45271  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
45272  __PYX_ERR(0, 1847, __pyx_L1_error)
45273  }
45274  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
45275  if (likely(PyTuple_CheckExact(sequence))) {
45276  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
45277  __pyx_t_15 = PyTuple_GET_ITEM(sequence, 1);
45278  } else {
45279  __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
45280  __pyx_t_15 = PyList_GET_ITEM(sequence, 1);
45281  }
45282  __Pyx_INCREF(__pyx_t_3);
45283  __Pyx_INCREF(__pyx_t_15);
45284  #else
45285  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1847, __pyx_L1_error)
45286  __Pyx_GOTREF(__pyx_t_3);
45287  __pyx_t_15 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1847, __pyx_L1_error)
45288  __Pyx_GOTREF(__pyx_t_15);
45289  #endif
45290  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45291  } else {
45292  Py_ssize_t index = -1;
45293  __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1847, __pyx_L1_error)
45294  __Pyx_GOTREF(__pyx_t_4);
45295  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45296  __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext;
45297  index = 0; __pyx_t_3 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L23_unpacking_failed;
45298  __Pyx_GOTREF(__pyx_t_3);
45299  index = 1; __pyx_t_15 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_15)) goto __pyx_L23_unpacking_failed;
45300  __Pyx_GOTREF(__pyx_t_15);
45301  if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1847, __pyx_L1_error)
45302  __pyx_t_14 = NULL;
45303  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45304  goto __pyx_L24_unpacking_done;
45305  __pyx_L23_unpacking_failed:;
45306  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45307  __pyx_t_14 = NULL;
45308  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
45309  __PYX_ERR(0, 1847, __pyx_L1_error)
45310  __pyx_L24_unpacking_done:;
45311  }
45312  __Pyx_DECREF_SET(__pyx_v__, __pyx_t_3);
45313  __pyx_t_3 = 0;
45314  __Pyx_DECREF_SET(__pyx_v_nearest_node, __pyx_t_15);
45315  __pyx_t_15 = 0;
45316 
45317  /* "mbd/CouplingFSI.pyx":1849
45318  * _, nearest_node = comm.allreduce((owning_rank, nearest_node),
45319  * op=MPI.MAXLOC)
45320  * comm.barrier() # <<<<<<<<<<<<<<
45321  * # if ownership is the same after 1 loop and local_element not found
45322  * # => coords must be outside domain
45323  */
45324  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1849, __pyx_L1_error)
45325  __Pyx_GOTREF(__pyx_t_15);
45326  __pyx_t_3 = NULL;
45327  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
45328  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_15);
45329  if (likely(__pyx_t_3)) {
45330  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
45331  __Pyx_INCREF(__pyx_t_3);
45332  __Pyx_INCREF(function);
45333  __Pyx_DECREF_SET(__pyx_t_15, function);
45334  }
45335  }
45336  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
45337  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45338  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1849, __pyx_L1_error)
45339  __Pyx_GOTREF(__pyx_t_2);
45340  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45341  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45342 
45343  /* "mbd/CouplingFSI.pyx":1852
45344  * # if ownership is the same after 1 loop and local_element not found
45345  * # => coords must be outside domain
45346  * if rank_owning == rank_owning_previous and local_element is None: # <<<<<<<<<<<<<<
45347  * coords_outside = True
45348  * break
45349  */
45350  __pyx_t_2 = PyObject_RichCompare(__pyx_v_rank_owning, __pyx_v_rank_owning_previous, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error)
45351  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1852, __pyx_L1_error)
45352  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45353  if (__pyx_t_8) {
45354  } else {
45355  __pyx_t_5 = __pyx_t_8;
45356  goto __pyx_L26_bool_binop_done;
45357  }
45358  __pyx_t_8 = (__pyx_v_local_element == Py_None);
45359  __pyx_t_7 = (__pyx_t_8 != 0);
45360  __pyx_t_5 = __pyx_t_7;
45361  __pyx_L26_bool_binop_done:;
45362  if (__pyx_t_5) {
45363 
45364  /* "mbd/CouplingFSI.pyx":1853
45365  * # => coords must be outside domain
45366  * if rank_owning == rank_owning_previous and local_element is None:
45367  * coords_outside = True # <<<<<<<<<<<<<<
45368  * break
45369  * comm.barrier()
45370  */
45371  __pyx_v_coords_outside = 1;
45372 
45373  /* "mbd/CouplingFSI.pyx":1854
45374  * if rank_owning == rank_owning_previous and local_element is None:
45375  * coords_outside = True
45376  * break # <<<<<<<<<<<<<<
45377  * comm.barrier()
45378  * xi = comm.bcast(xi, rank_owning)
45379  */
45380  goto __pyx_L7_break;
45381 
45382  /* "mbd/CouplingFSI.pyx":1852
45383  * # if ownership is the same after 1 loop and local_element not found
45384  * # => coords must be outside domain
45385  * if rank_owning == rank_owning_previous and local_element is None: # <<<<<<<<<<<<<<
45386  * coords_outside = True
45387  * break
45388  */
45389  }
45390  }
45391  __pyx_L7_break:;
45392 
45393  /* "mbd/CouplingFSI.pyx":1855
45394  * coords_outside = True
45395  * break
45396  * comm.barrier() # <<<<<<<<<<<<<<
45397  * xi = comm.bcast(xi, rank_owning)
45398  * eN = comm.bcast(local_element, rank_owning)
45399  */
45400  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1855, __pyx_L1_error)
45401  __Pyx_GOTREF(__pyx_t_15);
45402  __pyx_t_3 = NULL;
45403  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
45404  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_15);
45405  if (likely(__pyx_t_3)) {
45406  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
45407  __Pyx_INCREF(__pyx_t_3);
45408  __Pyx_INCREF(function);
45409  __Pyx_DECREF_SET(__pyx_t_15, function);
45410  }
45411  }
45412  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
45413  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45414  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1855, __pyx_L1_error)
45415  __Pyx_GOTREF(__pyx_t_2);
45416  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45417  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45418 
45419  /* "mbd/CouplingFSI.pyx":1856
45420  * break
45421  * comm.barrier()
45422  * xi = comm.bcast(xi, rank_owning) # <<<<<<<<<<<<<<
45423  * eN = comm.bcast(local_element, rank_owning)
45424  * rank = rank_owning
45425  */
45426  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1856, __pyx_L1_error)
45427  __Pyx_GOTREF(__pyx_t_15);
45428  __pyx_t_3 = NULL;
45429  __pyx_t_13 = 0;
45430  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
45431  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_15);
45432  if (likely(__pyx_t_3)) {
45433  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
45434  __Pyx_INCREF(__pyx_t_3);
45435  __Pyx_INCREF(function);
45436  __Pyx_DECREF_SET(__pyx_t_15, function);
45437  __pyx_t_13 = 1;
45438  }
45439  }
45440  #if CYTHON_FAST_PYCALL
45441  if (PyFunction_Check(__pyx_t_15)) {
45442  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_xi, __pyx_v_rank_owning};
45443  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
45444  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45445  __Pyx_GOTREF(__pyx_t_2);
45446  } else
45447  #endif
45448  #if CYTHON_FAST_PYCCALL
45449  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
45450  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_xi, __pyx_v_rank_owning};
45451  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
45452  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45453  __Pyx_GOTREF(__pyx_t_2);
45454  } else
45455  #endif
45456  {
45457  __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1856, __pyx_L1_error)
45458  __Pyx_GOTREF(__pyx_t_4);
45459  if (__pyx_t_3) {
45460  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
45461  }
45462  __Pyx_INCREF(__pyx_v_xi);
45463  __Pyx_GIVEREF(__pyx_v_xi);
45464  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_v_xi);
45465  __Pyx_INCREF(__pyx_v_rank_owning);
45466  __Pyx_GIVEREF(__pyx_v_rank_owning);
45467  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_rank_owning);
45468  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1856, __pyx_L1_error)
45469  __Pyx_GOTREF(__pyx_t_2);
45470  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45471  }
45472  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45473  __Pyx_DECREF_SET(__pyx_v_xi, __pyx_t_2);
45474  __pyx_t_2 = 0;
45475 
45476  /* "mbd/CouplingFSI.pyx":1857
45477  * comm.barrier()
45478  * xi = comm.bcast(xi, rank_owning)
45479  * eN = comm.bcast(local_element, rank_owning) # <<<<<<<<<<<<<<
45480  * rank = rank_owning
45481  * node = comm.bcast(nearest_node, rank_owning)
45482  */
45483  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1857, __pyx_L1_error)
45484  __Pyx_GOTREF(__pyx_t_15);
45485  __pyx_t_4 = NULL;
45486  __pyx_t_13 = 0;
45487  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
45488  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_15);
45489  if (likely(__pyx_t_4)) {
45490  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
45491  __Pyx_INCREF(__pyx_t_4);
45492  __Pyx_INCREF(function);
45493  __Pyx_DECREF_SET(__pyx_t_15, function);
45494  __pyx_t_13 = 1;
45495  }
45496  }
45497  #if CYTHON_FAST_PYCALL
45498  if (PyFunction_Check(__pyx_t_15)) {
45499  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_local_element, __pyx_v_rank_owning};
45500  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
45501  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
45502  __Pyx_GOTREF(__pyx_t_2);
45503  } else
45504  #endif
45505  #if CYTHON_FAST_PYCCALL
45506  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
45507  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_local_element, __pyx_v_rank_owning};
45508  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
45509  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
45510  __Pyx_GOTREF(__pyx_t_2);
45511  } else
45512  #endif
45513  {
45514  __pyx_t_3 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1857, __pyx_L1_error)
45515  __Pyx_GOTREF(__pyx_t_3);
45516  if (__pyx_t_4) {
45517  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
45518  }
45519  __Pyx_INCREF(__pyx_v_local_element);
45520  __Pyx_GIVEREF(__pyx_v_local_element);
45521  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_local_element);
45522  __Pyx_INCREF(__pyx_v_rank_owning);
45523  __Pyx_GIVEREF(__pyx_v_rank_owning);
45524  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_v_rank_owning);
45525  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1857, __pyx_L1_error)
45526  __Pyx_GOTREF(__pyx_t_2);
45527  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45528  }
45529  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45530  __pyx_v_eN = __pyx_t_2;
45531  __pyx_t_2 = 0;
45532 
45533  /* "mbd/CouplingFSI.pyx":1858
45534  * xi = comm.bcast(xi, rank_owning)
45535  * eN = comm.bcast(local_element, rank_owning)
45536  * rank = rank_owning # <<<<<<<<<<<<<<
45537  * node = comm.bcast(nearest_node, rank_owning)
45538  * return xi, node, eN, rank
45539  */
45540  __Pyx_INCREF(__pyx_v_rank_owning);
45541  __pyx_v_rank = __pyx_v_rank_owning;
45542 
45543  /* "mbd/CouplingFSI.pyx":1859
45544  * eN = comm.bcast(local_element, rank_owning)
45545  * rank = rank_owning
45546  * node = comm.bcast(nearest_node, rank_owning) # <<<<<<<<<<<<<<
45547  * return xi, node, eN, rank
45548  *
45549  */
45550  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1859, __pyx_L1_error)
45551  __Pyx_GOTREF(__pyx_t_15);
45552  __pyx_t_3 = NULL;
45553  __pyx_t_13 = 0;
45554  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
45555  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_15);
45556  if (likely(__pyx_t_3)) {
45557  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
45558  __Pyx_INCREF(__pyx_t_3);
45559  __Pyx_INCREF(function);
45560  __Pyx_DECREF_SET(__pyx_t_15, function);
45561  __pyx_t_13 = 1;
45562  }
45563  }
45564  #if CYTHON_FAST_PYCALL
45565  if (PyFunction_Check(__pyx_t_15)) {
45566  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_nearest_node, __pyx_v_rank_owning};
45567  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1859, __pyx_L1_error)
45568  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45569  __Pyx_GOTREF(__pyx_t_2);
45570  } else
45571  #endif
45572  #if CYTHON_FAST_PYCCALL
45573  if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
45574  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_nearest_node, __pyx_v_rank_owning};
45575  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1859, __pyx_L1_error)
45576  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45577  __Pyx_GOTREF(__pyx_t_2);
45578  } else
45579  #endif
45580  {
45581  __pyx_t_4 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1859, __pyx_L1_error)
45582  __Pyx_GOTREF(__pyx_t_4);
45583  if (__pyx_t_3) {
45584  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
45585  }
45586  __Pyx_INCREF(__pyx_v_nearest_node);
45587  __Pyx_GIVEREF(__pyx_v_nearest_node);
45588  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_13, __pyx_v_nearest_node);
45589  __Pyx_INCREF(__pyx_v_rank_owning);
45590  __Pyx_GIVEREF(__pyx_v_rank_owning);
45591  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_13, __pyx_v_rank_owning);
45592  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1859, __pyx_L1_error)
45593  __Pyx_GOTREF(__pyx_t_2);
45594  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45595  }
45596  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
45597  __pyx_v_node = __pyx_t_2;
45598  __pyx_t_2 = 0;
45599 
45600  /* "mbd/CouplingFSI.pyx":1860
45601  * rank = rank_owning
45602  * node = comm.bcast(nearest_node, rank_owning)
45603  * return xi, node, eN, rank # <<<<<<<<<<<<<<
45604  *
45605  * def getFluidVelocityLocalCoords(self, xi, element, rank):
45606  */
45607  __Pyx_XDECREF(__pyx_r);
45608  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L1_error)
45609  __Pyx_GOTREF(__pyx_t_2);
45610  __Pyx_INCREF(__pyx_v_xi);
45611  __Pyx_GIVEREF(__pyx_v_xi);
45612  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_xi);
45613  __Pyx_INCREF(__pyx_v_node);
45614  __Pyx_GIVEREF(__pyx_v_node);
45615  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_node);
45616  __Pyx_INCREF(__pyx_v_eN);
45617  __Pyx_GIVEREF(__pyx_v_eN);
45618  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_eN);
45619  __Pyx_INCREF(__pyx_v_rank);
45620  __Pyx_GIVEREF(__pyx_v_rank);
45621  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v_rank);
45622  __pyx_r = __pyx_t_2;
45623  __pyx_t_2 = 0;
45624  goto __pyx_L0;
45625 
45626  /* "mbd/CouplingFSI.pyx":1761
45627  *
45628  *
45629  * def findElementContainingCoordsDist(self, # <<<<<<<<<<<<<<
45630  * coords,
45631  * node_guess,
45632  */
45633 
45634  /* function exit code */
45635  __pyx_L1_error:;
45636  __Pyx_XDECREF(__pyx_t_1);
45637  __Pyx_XDECREF(__pyx_t_2);
45638  __Pyx_XDECREF(__pyx_t_3);
45639  __Pyx_XDECREF(__pyx_t_4);
45640  __PYX_XDEC_MEMVIEW(&__pyx_t_9, 1);
45641  __PYX_XDEC_MEMVIEW(&__pyx_t_10, 1);
45642  __PYX_XDEC_MEMVIEW(&__pyx_t_11, 1);
45643  __PYX_XDEC_MEMVIEW(&__pyx_t_12, 1);
45644  __Pyx_XDECREF(__pyx_t_15);
45645  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.findElementContainingCoordsDist", __pyx_clineno, __pyx_lineno, __pyx_filename);
45646  __pyx_r = NULL;
45647  __pyx_L0:;
45648  __Pyx_XDECREF(__pyx_v_mm);
45649  __Pyx_XDECREF(__pyx_v_mg);
45650  __Pyx_XDECREF(__pyx_v_comm);
45651  __Pyx_XDECREF(__pyx_v_xi);
45652  __Pyx_XDECREF(__pyx_v_local_element);
45653  __Pyx_XDECREF(__pyx_v_rank_owning);
45654  __Pyx_XDECREF(__pyx_v_nearest_node);
45655  __Pyx_XDECREF(__pyx_v_rank_owning_previous);
45656  __Pyx_XDECREF(__pyx_v_dist);
45657  __Pyx_XDECREF(__pyx_v_node_nb_global);
45658  __Pyx_XDECREF(__pyx_v_new_rank);
45659  __Pyx_XDECREF(__pyx_v_i);
45660  __Pyx_XDECREF(__pyx_v__);
45661  __Pyx_XDECREF(__pyx_v_eN);
45662  __Pyx_XDECREF(__pyx_v_rank);
45663  __Pyx_XDECREF(__pyx_v_node);
45664  __Pyx_XGIVEREF(__pyx_r);
45665  __Pyx_TraceReturn(__pyx_r, 0);
45666  __Pyx_RefNannyFinishContext();
45667  return __pyx_r;
45668 }
45669 
45670 /* "mbd/CouplingFSI.pyx":1862
45671  * return xi, node, eN, rank
45672  *
45673  * def getFluidVelocityLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
45674  * """
45675  * Parameters
45676  */
45677 
45678 /* Python wrapper */
45679 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_39getFluidVelocityLocalCoords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
45680 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_38getFluidVelocityLocalCoords[] = "ProtChSystem.getFluidVelocityLocalCoords(self, xi, element, rank)\n\n Parameters\n ----------\n xi:\n local coords in element\n element: int\n element number (local to processor 'rank')\n rank: int\n rank of processor owning the element\n ";
45681 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_39getFluidVelocityLocalCoords = {"getFluidVelocityLocalCoords", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_39getFluidVelocityLocalCoords, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_38getFluidVelocityLocalCoords};
45682 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_39getFluidVelocityLocalCoords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
45683  PyObject *__pyx_v_xi = 0;
45684  PyObject *__pyx_v_element = 0;
45685  PyObject *__pyx_v_rank = 0;
45686  int __pyx_lineno = 0;
45687  const char *__pyx_filename = NULL;
45688  int __pyx_clineno = 0;
45689  PyObject *__pyx_r = 0;
45690  __Pyx_RefNannyDeclarations
45691  __Pyx_RefNannySetupContext("getFluidVelocityLocalCoords (wrapper)", 0);
45692  {
45693  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xi,&__pyx_n_s_element,&__pyx_n_s_rank,0};
45694  PyObject* values[3] = {0,0,0};
45695  if (unlikely(__pyx_kwds)) {
45696  Py_ssize_t kw_args;
45697  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
45698  switch (pos_args) {
45699  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
45700  CYTHON_FALLTHROUGH;
45701  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
45702  CYTHON_FALLTHROUGH;
45703  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
45704  CYTHON_FALLTHROUGH;
45705  case 0: break;
45706  default: goto __pyx_L5_argtuple_error;
45707  }
45708  kw_args = PyDict_Size(__pyx_kwds);
45709  switch (pos_args) {
45710  case 0:
45711  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xi)) != 0)) kw_args--;
45712  else goto __pyx_L5_argtuple_error;
45713  CYTHON_FALLTHROUGH;
45714  case 1:
45715  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
45716  else {
45717  __Pyx_RaiseArgtupleInvalid("getFluidVelocityLocalCoords", 1, 3, 3, 1); __PYX_ERR(0, 1862, __pyx_L3_error)
45718  }
45719  CYTHON_FALLTHROUGH;
45720  case 2:
45721  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--;
45722  else {
45723  __Pyx_RaiseArgtupleInvalid("getFluidVelocityLocalCoords", 1, 3, 3, 2); __PYX_ERR(0, 1862, __pyx_L3_error)
45724  }
45725  }
45726  if (unlikely(kw_args > 0)) {
45727  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFluidVelocityLocalCoords") < 0)) __PYX_ERR(0, 1862, __pyx_L3_error)
45728  }
45729  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
45730  goto __pyx_L5_argtuple_error;
45731  } else {
45732  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
45733  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
45734  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
45735  }
45736  __pyx_v_xi = values[0];
45737  __pyx_v_element = values[1];
45738  __pyx_v_rank = values[2];
45739  }
45740  goto __pyx_L4_argument_unpacking_done;
45741  __pyx_L5_argtuple_error:;
45742  __Pyx_RaiseArgtupleInvalid("getFluidVelocityLocalCoords", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1862, __pyx_L3_error)
45743  __pyx_L3_error:;
45744  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.getFluidVelocityLocalCoords", __pyx_clineno, __pyx_lineno, __pyx_filename);
45745  __Pyx_RefNannyFinishContext();
45746  return NULL;
45747  __pyx_L4_argument_unpacking_done:;
45748  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_38getFluidVelocityLocalCoords(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_xi, __pyx_v_element, __pyx_v_rank);
45749 
45750  /* function exit code */
45751  __Pyx_RefNannyFinishContext();
45752  return __pyx_r;
45753 }
45754 
45755 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_38getFluidVelocityLocalCoords(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_xi, PyObject *__pyx_v_element, PyObject *__pyx_v_rank) {
45756  PyObject *__pyx_v_comm = NULL;
45757  PyObject *__pyx_v_u = NULL;
45758  PyObject *__pyx_v_v = NULL;
45759  PyObject *__pyx_v_w = NULL;
45760  PyObject *__pyx_r = NULL;
45761  __Pyx_TraceDeclarations
45762  __Pyx_RefNannyDeclarations
45763  PyObject *__pyx_t_1 = NULL;
45764  PyObject *__pyx_t_2 = NULL;
45765  PyObject *__pyx_t_3 = NULL;
45766  PyObject *__pyx_t_4 = NULL;
45767  int __pyx_t_5;
45768  int __pyx_t_6;
45769  int __pyx_lineno = 0;
45770  const char *__pyx_filename = NULL;
45771  int __pyx_clineno = 0;
45772  __Pyx_TraceFrameInit(__pyx_codeobj__121)
45773  __Pyx_RefNannySetupContext("getFluidVelocityLocalCoords", 0);
45774  __Pyx_TraceCall("getFluidVelocityLocalCoords", __pyx_f[0], 1862, 0, __PYX_ERR(0, 1862, __pyx_L1_error));
45775 
45776  /* "mbd/CouplingFSI.pyx":1874
45777  * """
45778  * #log Profiling.logEvent("FINDING VELOCITY AT RANK "+str(rank)+", "+str(element) + ", " + str(xi))
45779  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
45780  * if comm.rank == rank:
45781  * u = self.u[1].getValue(element, xi)
45782  */
45783  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1874, __pyx_L1_error)
45784  __Pyx_GOTREF(__pyx_t_3);
45785  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1874, __pyx_L1_error)
45786  __Pyx_GOTREF(__pyx_t_4);
45787  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45788  __pyx_t_3 = NULL;
45789  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
45790  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
45791  if (likely(__pyx_t_3)) {
45792  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
45793  __Pyx_INCREF(__pyx_t_3);
45794  __Pyx_INCREF(function);
45795  __Pyx_DECREF_SET(__pyx_t_4, function);
45796  }
45797  }
45798  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
45799  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
45800  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __pyx_L1_error)
45801  __Pyx_GOTREF(__pyx_t_2);
45802  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45803  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1874, __pyx_L1_error)
45804  __Pyx_GOTREF(__pyx_t_4);
45805  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45806  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1874, __pyx_L1_error)
45807  __Pyx_GOTREF(__pyx_t_2);
45808  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45809  __pyx_t_4 = NULL;
45810  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
45811  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
45812  if (likely(__pyx_t_4)) {
45813  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
45814  __Pyx_INCREF(__pyx_t_4);
45815  __Pyx_INCREF(function);
45816  __Pyx_DECREF_SET(__pyx_t_2, function);
45817  }
45818  }
45819  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
45820  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
45821  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1874, __pyx_L1_error)
45822  __Pyx_GOTREF(__pyx_t_1);
45823  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45824  __pyx_v_comm = __pyx_t_1;
45825  __pyx_t_1 = 0;
45826 
45827  /* "mbd/CouplingFSI.pyx":1875
45828  * #log Profiling.logEvent("FINDING VELOCITY AT RANK "+str(rank)+", "+str(element) + ", " + str(xi))
45829  * comm = Comm.get().comm.tompi4py()
45830  * if comm.rank == rank: # <<<<<<<<<<<<<<
45831  * u = self.u[1].getValue(element, xi)
45832  * v = self.u[2].getValue(element, xi)
45833  */
45834  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1875, __pyx_L1_error)
45835  __Pyx_GOTREF(__pyx_t_1);
45836  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_rank, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __pyx_L1_error)
45837  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45838  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1875, __pyx_L1_error)
45839  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
45840  if (__pyx_t_5) {
45841 
45842  /* "mbd/CouplingFSI.pyx":1876
45843  * comm = Comm.get().comm.tompi4py()
45844  * if comm.rank == rank:
45845  * u = self.u[1].getValue(element, xi) # <<<<<<<<<<<<<<
45846  * v = self.u[2].getValue(element, xi)
45847  * if self.nd > 2:
45848  */
45849  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->u, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1876, __pyx_L1_error)
45850  __Pyx_GOTREF(__pyx_t_1);
45851  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getValue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1876, __pyx_L1_error)
45852  __Pyx_GOTREF(__pyx_t_4);
45853  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45854  __pyx_t_1 = NULL;
45855  __pyx_t_6 = 0;
45856  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
45857  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
45858  if (likely(__pyx_t_1)) {
45859  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
45860  __Pyx_INCREF(__pyx_t_1);
45861  __Pyx_INCREF(function);
45862  __Pyx_DECREF_SET(__pyx_t_4, function);
45863  __pyx_t_6 = 1;
45864  }
45865  }
45866  #if CYTHON_FAST_PYCALL
45867  if (PyFunction_Check(__pyx_t_4)) {
45868  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_element, __pyx_v_xi};
45869  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
45870  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
45871  __Pyx_GOTREF(__pyx_t_2);
45872  } else
45873  #endif
45874  #if CYTHON_FAST_PYCCALL
45875  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
45876  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_element, __pyx_v_xi};
45877  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
45878  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
45879  __Pyx_GOTREF(__pyx_t_2);
45880  } else
45881  #endif
45882  {
45883  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1876, __pyx_L1_error)
45884  __Pyx_GOTREF(__pyx_t_3);
45885  if (__pyx_t_1) {
45886  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
45887  }
45888  __Pyx_INCREF(__pyx_v_element);
45889  __Pyx_GIVEREF(__pyx_v_element);
45890  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_element);
45891  __Pyx_INCREF(__pyx_v_xi);
45892  __Pyx_GIVEREF(__pyx_v_xi);
45893  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_xi);
45894  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L1_error)
45895  __Pyx_GOTREF(__pyx_t_2);
45896  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45897  }
45898  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45899  __pyx_v_u = __pyx_t_2;
45900  __pyx_t_2 = 0;
45901 
45902  /* "mbd/CouplingFSI.pyx":1877
45903  * if comm.rank == rank:
45904  * u = self.u[1].getValue(element, xi)
45905  * v = self.u[2].getValue(element, xi) # <<<<<<<<<<<<<<
45906  * if self.nd > 2:
45907  * w = self.u[3].getValue(element, xi)
45908  */
45909  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->u, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1877, __pyx_L1_error)
45910  __Pyx_GOTREF(__pyx_t_4);
45911  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getValue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error)
45912  __Pyx_GOTREF(__pyx_t_3);
45913  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
45914  __pyx_t_4 = NULL;
45915  __pyx_t_6 = 0;
45916  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
45917  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
45918  if (likely(__pyx_t_4)) {
45919  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
45920  __Pyx_INCREF(__pyx_t_4);
45921  __Pyx_INCREF(function);
45922  __Pyx_DECREF_SET(__pyx_t_3, function);
45923  __pyx_t_6 = 1;
45924  }
45925  }
45926  #if CYTHON_FAST_PYCALL
45927  if (PyFunction_Check(__pyx_t_3)) {
45928  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_xi};
45929  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
45930  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
45931  __Pyx_GOTREF(__pyx_t_2);
45932  } else
45933  #endif
45934  #if CYTHON_FAST_PYCCALL
45935  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
45936  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_xi};
45937  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
45938  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
45939  __Pyx_GOTREF(__pyx_t_2);
45940  } else
45941  #endif
45942  {
45943  __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __pyx_L1_error)
45944  __Pyx_GOTREF(__pyx_t_1);
45945  if (__pyx_t_4) {
45946  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
45947  }
45948  __Pyx_INCREF(__pyx_v_element);
45949  __Pyx_GIVEREF(__pyx_v_element);
45950  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_element);
45951  __Pyx_INCREF(__pyx_v_xi);
45952  __Pyx_GIVEREF(__pyx_v_xi);
45953  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_xi);
45954  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1877, __pyx_L1_error)
45955  __Pyx_GOTREF(__pyx_t_2);
45956  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
45957  }
45958  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45959  __pyx_v_v = __pyx_t_2;
45960  __pyx_t_2 = 0;
45961 
45962  /* "mbd/CouplingFSI.pyx":1878
45963  * u = self.u[1].getValue(element, xi)
45964  * v = self.u[2].getValue(element, xi)
45965  * if self.nd > 2: # <<<<<<<<<<<<<<
45966  * w = self.u[3].getValue(element, xi)
45967  * if self.nd <= 2:
45968  */
45969  __pyx_t_5 = ((__pyx_v_self->nd > 2) != 0);
45970  if (__pyx_t_5) {
45971 
45972  /* "mbd/CouplingFSI.pyx":1879
45973  * v = self.u[2].getValue(element, xi)
45974  * if self.nd > 2:
45975  * w = self.u[3].getValue(element, xi) # <<<<<<<<<<<<<<
45976  * if self.nd <= 2:
45977  * w = 0
45978  */
45979  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->u, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1879, __pyx_L1_error)
45980  __Pyx_GOTREF(__pyx_t_3);
45981  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1879, __pyx_L1_error)
45982  __Pyx_GOTREF(__pyx_t_1);
45983  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
45984  __pyx_t_3 = NULL;
45985  __pyx_t_6 = 0;
45986  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
45987  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
45988  if (likely(__pyx_t_3)) {
45989  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
45990  __Pyx_INCREF(__pyx_t_3);
45991  __Pyx_INCREF(function);
45992  __Pyx_DECREF_SET(__pyx_t_1, function);
45993  __pyx_t_6 = 1;
45994  }
45995  }
45996  #if CYTHON_FAST_PYCALL
45997  if (PyFunction_Check(__pyx_t_1)) {
45998  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_element, __pyx_v_xi};
45999  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
46000  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46001  __Pyx_GOTREF(__pyx_t_2);
46002  } else
46003  #endif
46004  #if CYTHON_FAST_PYCCALL
46005  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46006  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_element, __pyx_v_xi};
46007  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
46008  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46009  __Pyx_GOTREF(__pyx_t_2);
46010  } else
46011  #endif
46012  {
46013  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1879, __pyx_L1_error)
46014  __Pyx_GOTREF(__pyx_t_4);
46015  if (__pyx_t_3) {
46016  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
46017  }
46018  __Pyx_INCREF(__pyx_v_element);
46019  __Pyx_GIVEREF(__pyx_v_element);
46020  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_element);
46021  __Pyx_INCREF(__pyx_v_xi);
46022  __Pyx_GIVEREF(__pyx_v_xi);
46023  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_xi);
46024  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1879, __pyx_L1_error)
46025  __Pyx_GOTREF(__pyx_t_2);
46026  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46027  }
46028  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46029  __pyx_v_w = __pyx_t_2;
46030  __pyx_t_2 = 0;
46031 
46032  /* "mbd/CouplingFSI.pyx":1878
46033  * u = self.u[1].getValue(element, xi)
46034  * v = self.u[2].getValue(element, xi)
46035  * if self.nd > 2: # <<<<<<<<<<<<<<
46036  * w = self.u[3].getValue(element, xi)
46037  * if self.nd <= 2:
46038  */
46039  }
46040 
46041  /* "mbd/CouplingFSI.pyx":1880
46042  * if self.nd > 2:
46043  * w = self.u[3].getValue(element, xi)
46044  * if self.nd <= 2: # <<<<<<<<<<<<<<
46045  * w = 0
46046  * # broadcast to all processors
46047  */
46048  __pyx_t_5 = ((__pyx_v_self->nd <= 2) != 0);
46049  if (__pyx_t_5) {
46050 
46051  /* "mbd/CouplingFSI.pyx":1881
46052  * w = self.u[3].getValue(element, xi)
46053  * if self.nd <= 2:
46054  * w = 0 # <<<<<<<<<<<<<<
46055  * # broadcast to all processors
46056  * else:
46057  */
46058  __Pyx_INCREF(__pyx_int_0);
46059  __Pyx_XDECREF_SET(__pyx_v_w, __pyx_int_0);
46060 
46061  /* "mbd/CouplingFSI.pyx":1880
46062  * if self.nd > 2:
46063  * w = self.u[3].getValue(element, xi)
46064  * if self.nd <= 2: # <<<<<<<<<<<<<<
46065  * w = 0
46066  * # broadcast to all processors
46067  */
46068  }
46069 
46070  /* "mbd/CouplingFSI.pyx":1875
46071  * #log Profiling.logEvent("FINDING VELOCITY AT RANK "+str(rank)+", "+str(element) + ", " + str(xi))
46072  * comm = Comm.get().comm.tompi4py()
46073  * if comm.rank == rank: # <<<<<<<<<<<<<<
46074  * u = self.u[1].getValue(element, xi)
46075  * v = self.u[2].getValue(element, xi)
46076  */
46077  goto __pyx_L3;
46078  }
46079 
46080  /* "mbd/CouplingFSI.pyx":1884
46081  * # broadcast to all processors
46082  * else:
46083  * u = v = w = None # <<<<<<<<<<<<<<
46084  * u = comm.bcast(u, rank)
46085  * v = comm.bcast(v, rank)
46086  */
46087  /*else*/ {
46088  __Pyx_INCREF(Py_None);
46089  __pyx_v_u = Py_None;
46090  __Pyx_INCREF(Py_None);
46091  __pyx_v_v = Py_None;
46092  __Pyx_INCREF(Py_None);
46093  __pyx_v_w = Py_None;
46094  }
46095  __pyx_L3:;
46096 
46097  /* "mbd/CouplingFSI.pyx":1885
46098  * else:
46099  * u = v = w = None
46100  * u = comm.bcast(u, rank) # <<<<<<<<<<<<<<
46101  * v = comm.bcast(v, rank)
46102  * w = comm.bcast(w, rank)
46103  */
46104  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
46105  __Pyx_GOTREF(__pyx_t_1);
46106  __pyx_t_4 = NULL;
46107  __pyx_t_6 = 0;
46108  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
46109  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
46110  if (likely(__pyx_t_4)) {
46111  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
46112  __Pyx_INCREF(__pyx_t_4);
46113  __Pyx_INCREF(function);
46114  __Pyx_DECREF_SET(__pyx_t_1, function);
46115  __pyx_t_6 = 1;
46116  }
46117  }
46118  #if CYTHON_FAST_PYCALL
46119  if (PyFunction_Check(__pyx_t_1)) {
46120  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_u, __pyx_v_rank};
46121  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error)
46122  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46123  __Pyx_GOTREF(__pyx_t_2);
46124  } else
46125  #endif
46126  #if CYTHON_FAST_PYCCALL
46127  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46128  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_u, __pyx_v_rank};
46129  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error)
46130  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46131  __Pyx_GOTREF(__pyx_t_2);
46132  } else
46133  #endif
46134  {
46135  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error)
46136  __Pyx_GOTREF(__pyx_t_3);
46137  if (__pyx_t_4) {
46138  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
46139  }
46140  __Pyx_INCREF(__pyx_v_u);
46141  __Pyx_GIVEREF(__pyx_v_u);
46142  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_u);
46143  __Pyx_INCREF(__pyx_v_rank);
46144  __Pyx_GIVEREF(__pyx_v_rank);
46145  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_rank);
46146  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1885, __pyx_L1_error)
46147  __Pyx_GOTREF(__pyx_t_2);
46148  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46149  }
46150  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46151  __Pyx_DECREF_SET(__pyx_v_u, __pyx_t_2);
46152  __pyx_t_2 = 0;
46153 
46154  /* "mbd/CouplingFSI.pyx":1886
46155  * u = v = w = None
46156  * u = comm.bcast(u, rank)
46157  * v = comm.bcast(v, rank) # <<<<<<<<<<<<<<
46158  * w = comm.bcast(w, rank)
46159  * #log Profiling.logEvent("FOUND VELOCITY")
46160  */
46161  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
46162  __Pyx_GOTREF(__pyx_t_1);
46163  __pyx_t_3 = NULL;
46164  __pyx_t_6 = 0;
46165  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
46166  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
46167  if (likely(__pyx_t_3)) {
46168  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
46169  __Pyx_INCREF(__pyx_t_3);
46170  __Pyx_INCREF(function);
46171  __Pyx_DECREF_SET(__pyx_t_1, function);
46172  __pyx_t_6 = 1;
46173  }
46174  }
46175  #if CYTHON_FAST_PYCALL
46176  if (PyFunction_Check(__pyx_t_1)) {
46177  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_v, __pyx_v_rank};
46178  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
46179  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46180  __Pyx_GOTREF(__pyx_t_2);
46181  } else
46182  #endif
46183  #if CYTHON_FAST_PYCCALL
46184  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46185  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_v, __pyx_v_rank};
46186  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
46187  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46188  __Pyx_GOTREF(__pyx_t_2);
46189  } else
46190  #endif
46191  {
46192  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error)
46193  __Pyx_GOTREF(__pyx_t_4);
46194  if (__pyx_t_3) {
46195  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
46196  }
46197  __Pyx_INCREF(__pyx_v_v);
46198  __Pyx_GIVEREF(__pyx_v_v);
46199  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_v);
46200  __Pyx_INCREF(__pyx_v_rank);
46201  __Pyx_GIVEREF(__pyx_v_rank);
46202  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_rank);
46203  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1886, __pyx_L1_error)
46204  __Pyx_GOTREF(__pyx_t_2);
46205  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46206  }
46207  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46208  __Pyx_DECREF_SET(__pyx_v_v, __pyx_t_2);
46209  __pyx_t_2 = 0;
46210 
46211  /* "mbd/CouplingFSI.pyx":1887
46212  * u = comm.bcast(u, rank)
46213  * v = comm.bcast(v, rank)
46214  * w = comm.bcast(w, rank) # <<<<<<<<<<<<<<
46215  * #log Profiling.logEvent("FOUND VELOCITY")
46216  * return u, v, w
46217  */
46218  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error)
46219  __Pyx_GOTREF(__pyx_t_1);
46220  if (unlikely(!__pyx_v_w)) { __Pyx_RaiseUnboundLocalError("w"); __PYX_ERR(0, 1887, __pyx_L1_error) }
46221  __pyx_t_4 = NULL;
46222  __pyx_t_6 = 0;
46223  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
46224  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
46225  if (likely(__pyx_t_4)) {
46226  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
46227  __Pyx_INCREF(__pyx_t_4);
46228  __Pyx_INCREF(function);
46229  __Pyx_DECREF_SET(__pyx_t_1, function);
46230  __pyx_t_6 = 1;
46231  }
46232  }
46233  #if CYTHON_FAST_PYCALL
46234  if (PyFunction_Check(__pyx_t_1)) {
46235  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_w, __pyx_v_rank};
46236  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
46237  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46238  __Pyx_GOTREF(__pyx_t_2);
46239  } else
46240  #endif
46241  #if CYTHON_FAST_PYCCALL
46242  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46243  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_w, __pyx_v_rank};
46244  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
46245  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46246  __Pyx_GOTREF(__pyx_t_2);
46247  } else
46248  #endif
46249  {
46250  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1887, __pyx_L1_error)
46251  __Pyx_GOTREF(__pyx_t_3);
46252  if (__pyx_t_4) {
46253  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
46254  }
46255  __Pyx_INCREF(__pyx_v_w);
46256  __Pyx_GIVEREF(__pyx_v_w);
46257  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_w);
46258  __Pyx_INCREF(__pyx_v_rank);
46259  __Pyx_GIVEREF(__pyx_v_rank);
46260  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_rank);
46261  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1887, __pyx_L1_error)
46262  __Pyx_GOTREF(__pyx_t_2);
46263  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46264  }
46265  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46266  __Pyx_XDECREF_SET(__pyx_v_w, __pyx_t_2);
46267  __pyx_t_2 = 0;
46268 
46269  /* "mbd/CouplingFSI.pyx":1889
46270  * w = comm.bcast(w, rank)
46271  * #log Profiling.logEvent("FOUND VELOCITY")
46272  * return u, v, w # <<<<<<<<<<<<<<
46273  *
46274  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank):
46275  */
46276  __Pyx_XDECREF(__pyx_r);
46277  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1889, __pyx_L1_error)
46278  __Pyx_GOTREF(__pyx_t_2);
46279  __Pyx_INCREF(__pyx_v_u);
46280  __Pyx_GIVEREF(__pyx_v_u);
46281  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_u);
46282  __Pyx_INCREF(__pyx_v_v);
46283  __Pyx_GIVEREF(__pyx_v_v);
46284  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v);
46285  __Pyx_INCREF(__pyx_v_w);
46286  __Pyx_GIVEREF(__pyx_v_w);
46287  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_w);
46288  __pyx_r = __pyx_t_2;
46289  __pyx_t_2 = 0;
46290  goto __pyx_L0;
46291 
46292  /* "mbd/CouplingFSI.pyx":1862
46293  * return xi, node, eN, rank
46294  *
46295  * def getFluidVelocityLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
46296  * """
46297  * Parameters
46298  */
46299 
46300  /* function exit code */
46301  __pyx_L1_error:;
46302  __Pyx_XDECREF(__pyx_t_1);
46303  __Pyx_XDECREF(__pyx_t_2);
46304  __Pyx_XDECREF(__pyx_t_3);
46305  __Pyx_XDECREF(__pyx_t_4);
46306  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.getFluidVelocityLocalCoords", __pyx_clineno, __pyx_lineno, __pyx_filename);
46307  __pyx_r = NULL;
46308  __pyx_L0:;
46309  __Pyx_XDECREF(__pyx_v_comm);
46310  __Pyx_XDECREF(__pyx_v_u);
46311  __Pyx_XDECREF(__pyx_v_v);
46312  __Pyx_XDECREF(__pyx_v_w);
46313  __Pyx_XGIVEREF(__pyx_r);
46314  __Pyx_TraceReturn(__pyx_r, 0);
46315  __Pyx_RefNannyFinishContext();
46316  return __pyx_r;
46317 }
46318 
46319 /* "mbd/CouplingFSI.pyx":1891
46320  * return u, v, w
46321  *
46322  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
46323  * comm = Comm.get().comm.tompi4py()
46324  * if comm.rank == rank:
46325  */
46326 
46327 /* Python wrapper */
46328 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_41getFluidVelocityGradientLocalCoords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
46329 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_40getFluidVelocityGradientLocalCoords[] = "ProtChSystem.getFluidVelocityGradientLocalCoords(self, xi, element, rank)";
46330 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_41getFluidVelocityGradientLocalCoords = {"getFluidVelocityGradientLocalCoords", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_41getFluidVelocityGradientLocalCoords, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_40getFluidVelocityGradientLocalCoords};
46331 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_41getFluidVelocityGradientLocalCoords(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
46332  PyObject *__pyx_v_xi = 0;
46333  PyObject *__pyx_v_element = 0;
46334  PyObject *__pyx_v_rank = 0;
46335  int __pyx_lineno = 0;
46336  const char *__pyx_filename = NULL;
46337  int __pyx_clineno = 0;
46338  PyObject *__pyx_r = 0;
46339  __Pyx_RefNannyDeclarations
46340  __Pyx_RefNannySetupContext("getFluidVelocityGradientLocalCoords (wrapper)", 0);
46341  {
46342  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_xi,&__pyx_n_s_element,&__pyx_n_s_rank,0};
46343  PyObject* values[3] = {0,0,0};
46344  if (unlikely(__pyx_kwds)) {
46345  Py_ssize_t kw_args;
46346  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
46347  switch (pos_args) {
46348  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
46349  CYTHON_FALLTHROUGH;
46350  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
46351  CYTHON_FALLTHROUGH;
46352  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
46353  CYTHON_FALLTHROUGH;
46354  case 0: break;
46355  default: goto __pyx_L5_argtuple_error;
46356  }
46357  kw_args = PyDict_Size(__pyx_kwds);
46358  switch (pos_args) {
46359  case 0:
46360  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_xi)) != 0)) kw_args--;
46361  else goto __pyx_L5_argtuple_error;
46362  CYTHON_FALLTHROUGH;
46363  case 1:
46364  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_element)) != 0)) kw_args--;
46365  else {
46366  __Pyx_RaiseArgtupleInvalid("getFluidVelocityGradientLocalCoords", 1, 3, 3, 1); __PYX_ERR(0, 1891, __pyx_L3_error)
46367  }
46368  CYTHON_FALLTHROUGH;
46369  case 2:
46370  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rank)) != 0)) kw_args--;
46371  else {
46372  __Pyx_RaiseArgtupleInvalid("getFluidVelocityGradientLocalCoords", 1, 3, 3, 2); __PYX_ERR(0, 1891, __pyx_L3_error)
46373  }
46374  }
46375  if (unlikely(kw_args > 0)) {
46376  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFluidVelocityGradientLocalCoords") < 0)) __PYX_ERR(0, 1891, __pyx_L3_error)
46377  }
46378  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
46379  goto __pyx_L5_argtuple_error;
46380  } else {
46381  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
46382  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
46383  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
46384  }
46385  __pyx_v_xi = values[0];
46386  __pyx_v_element = values[1];
46387  __pyx_v_rank = values[2];
46388  }
46389  goto __pyx_L4_argument_unpacking_done;
46390  __pyx_L5_argtuple_error:;
46391  __Pyx_RaiseArgtupleInvalid("getFluidVelocityGradientLocalCoords", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1891, __pyx_L3_error)
46392  __pyx_L3_error:;
46393  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.getFluidVelocityGradientLocalCoords", __pyx_clineno, __pyx_lineno, __pyx_filename);
46394  __Pyx_RefNannyFinishContext();
46395  return NULL;
46396  __pyx_L4_argument_unpacking_done:;
46397  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_40getFluidVelocityGradientLocalCoords(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_xi, __pyx_v_element, __pyx_v_rank);
46398 
46399  /* function exit code */
46400  __Pyx_RefNannyFinishContext();
46401  return __pyx_r;
46402 }
46403 
46404 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_40getFluidVelocityGradientLocalCoords(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_xi, PyObject *__pyx_v_element, PyObject *__pyx_v_rank) {
46405  PyObject *__pyx_v_comm = NULL;
46406  PyObject *__pyx_v_u_grad = NULL;
46407  PyObject *__pyx_v_v_grad = NULL;
46408  PyObject *__pyx_v_w_grad = NULL;
46409  PyObject *__pyx_r = NULL;
46410  __Pyx_TraceDeclarations
46411  __Pyx_RefNannyDeclarations
46412  PyObject *__pyx_t_1 = NULL;
46413  PyObject *__pyx_t_2 = NULL;
46414  PyObject *__pyx_t_3 = NULL;
46415  PyObject *__pyx_t_4 = NULL;
46416  int __pyx_t_5;
46417  int __pyx_t_6;
46418  int __pyx_lineno = 0;
46419  const char *__pyx_filename = NULL;
46420  int __pyx_clineno = 0;
46421  __Pyx_TraceFrameInit(__pyx_codeobj__122)
46422  __Pyx_RefNannySetupContext("getFluidVelocityGradientLocalCoords", 0);
46423  __Pyx_TraceCall("getFluidVelocityGradientLocalCoords", __pyx_f[0], 1891, 0, __PYX_ERR(0, 1891, __pyx_L1_error));
46424 
46425  /* "mbd/CouplingFSI.pyx":1892
46426  *
46427  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank):
46428  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
46429  * if comm.rank == rank:
46430  * u_grad = self.u_grad[1].getGradientValue(element, xi)
46431  */
46432  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1892, __pyx_L1_error)
46433  __Pyx_GOTREF(__pyx_t_3);
46434  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error)
46435  __Pyx_GOTREF(__pyx_t_4);
46436  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46437  __pyx_t_3 = NULL;
46438  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
46439  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
46440  if (likely(__pyx_t_3)) {
46441  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
46442  __Pyx_INCREF(__pyx_t_3);
46443  __Pyx_INCREF(function);
46444  __Pyx_DECREF_SET(__pyx_t_4, function);
46445  }
46446  }
46447  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
46448  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46449  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1892, __pyx_L1_error)
46450  __Pyx_GOTREF(__pyx_t_2);
46451  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46452  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error)
46453  __Pyx_GOTREF(__pyx_t_4);
46454  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
46455  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1892, __pyx_L1_error)
46456  __Pyx_GOTREF(__pyx_t_2);
46457  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46458  __pyx_t_4 = NULL;
46459  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
46460  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
46461  if (likely(__pyx_t_4)) {
46462  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
46463  __Pyx_INCREF(__pyx_t_4);
46464  __Pyx_INCREF(function);
46465  __Pyx_DECREF_SET(__pyx_t_2, function);
46466  }
46467  }
46468  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
46469  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46470  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error)
46471  __Pyx_GOTREF(__pyx_t_1);
46472  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
46473  __pyx_v_comm = __pyx_t_1;
46474  __pyx_t_1 = 0;
46475 
46476  /* "mbd/CouplingFSI.pyx":1893
46477  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank):
46478  * comm = Comm.get().comm.tompi4py()
46479  * if comm.rank == rank: # <<<<<<<<<<<<<<
46480  * u_grad = self.u_grad[1].getGradientValue(element, xi)
46481  * u_grad = comm.bcast(u_grad, rank)
46482  */
46483  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
46484  __Pyx_GOTREF(__pyx_t_1);
46485  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_v_rank, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1893, __pyx_L1_error)
46486  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46487  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1893, __pyx_L1_error)
46488  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
46489  if (__pyx_t_5) {
46490 
46491  /* "mbd/CouplingFSI.pyx":1894
46492  * comm = Comm.get().comm.tompi4py()
46493  * if comm.rank == rank:
46494  * u_grad = self.u_grad[1].getGradientValue(element, xi) # <<<<<<<<<<<<<<
46495  * u_grad = comm.bcast(u_grad, rank)
46496  * v_grad = self.u[2].getGradientValue(element, xi)
46497  */
46498  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_u_grad); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L1_error)
46499  __Pyx_GOTREF(__pyx_t_1);
46500  __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1894, __pyx_L1_error)
46501  __Pyx_GOTREF(__pyx_t_4);
46502  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46503  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getGradientValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L1_error)
46504  __Pyx_GOTREF(__pyx_t_1);
46505  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46506  __pyx_t_4 = NULL;
46507  __pyx_t_6 = 0;
46508  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
46509  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
46510  if (likely(__pyx_t_4)) {
46511  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
46512  __Pyx_INCREF(__pyx_t_4);
46513  __Pyx_INCREF(function);
46514  __Pyx_DECREF_SET(__pyx_t_1, function);
46515  __pyx_t_6 = 1;
46516  }
46517  }
46518  #if CYTHON_FAST_PYCALL
46519  if (PyFunction_Check(__pyx_t_1)) {
46520  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_xi};
46521  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1894, __pyx_L1_error)
46522  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46523  __Pyx_GOTREF(__pyx_t_2);
46524  } else
46525  #endif
46526  #if CYTHON_FAST_PYCCALL
46527  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46528  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_xi};
46529  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1894, __pyx_L1_error)
46530  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46531  __Pyx_GOTREF(__pyx_t_2);
46532  } else
46533  #endif
46534  {
46535  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1894, __pyx_L1_error)
46536  __Pyx_GOTREF(__pyx_t_3);
46537  if (__pyx_t_4) {
46538  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
46539  }
46540  __Pyx_INCREF(__pyx_v_element);
46541  __Pyx_GIVEREF(__pyx_v_element);
46542  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_element);
46543  __Pyx_INCREF(__pyx_v_xi);
46544  __Pyx_GIVEREF(__pyx_v_xi);
46545  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_xi);
46546  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1894, __pyx_L1_error)
46547  __Pyx_GOTREF(__pyx_t_2);
46548  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46549  }
46550  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46551  __pyx_v_u_grad = __pyx_t_2;
46552  __pyx_t_2 = 0;
46553 
46554  /* "mbd/CouplingFSI.pyx":1895
46555  * if comm.rank == rank:
46556  * u_grad = self.u_grad[1].getGradientValue(element, xi)
46557  * u_grad = comm.bcast(u_grad, rank) # <<<<<<<<<<<<<<
46558  * v_grad = self.u[2].getGradientValue(element, xi)
46559  * v_grad = comm.bcast(v_grad, rank)
46560  */
46561  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1895, __pyx_L1_error)
46562  __Pyx_GOTREF(__pyx_t_1);
46563  __pyx_t_3 = NULL;
46564  __pyx_t_6 = 0;
46565  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
46566  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
46567  if (likely(__pyx_t_3)) {
46568  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
46569  __Pyx_INCREF(__pyx_t_3);
46570  __Pyx_INCREF(function);
46571  __Pyx_DECREF_SET(__pyx_t_1, function);
46572  __pyx_t_6 = 1;
46573  }
46574  }
46575  #if CYTHON_FAST_PYCALL
46576  if (PyFunction_Check(__pyx_t_1)) {
46577  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_u_grad, __pyx_v_rank};
46578  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1895, __pyx_L1_error)
46579  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46580  __Pyx_GOTREF(__pyx_t_2);
46581  } else
46582  #endif
46583  #if CYTHON_FAST_PYCCALL
46584  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46585  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_u_grad, __pyx_v_rank};
46586  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1895, __pyx_L1_error)
46587  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46588  __Pyx_GOTREF(__pyx_t_2);
46589  } else
46590  #endif
46591  {
46592  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error)
46593  __Pyx_GOTREF(__pyx_t_4);
46594  if (__pyx_t_3) {
46595  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
46596  }
46597  __Pyx_INCREF(__pyx_v_u_grad);
46598  __Pyx_GIVEREF(__pyx_v_u_grad);
46599  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_u_grad);
46600  __Pyx_INCREF(__pyx_v_rank);
46601  __Pyx_GIVEREF(__pyx_v_rank);
46602  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_rank);
46603  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1895, __pyx_L1_error)
46604  __Pyx_GOTREF(__pyx_t_2);
46605  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46606  }
46607  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46608  __Pyx_DECREF_SET(__pyx_v_u_grad, __pyx_t_2);
46609  __pyx_t_2 = 0;
46610 
46611  /* "mbd/CouplingFSI.pyx":1896
46612  * u_grad = self.u_grad[1].getGradientValue(element, xi)
46613  * u_grad = comm.bcast(u_grad, rank)
46614  * v_grad = self.u[2].getGradientValue(element, xi) # <<<<<<<<<<<<<<
46615  * v_grad = comm.bcast(v_grad, rank)
46616  * if self.nd > 2:
46617  */
46618  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_self->u, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L1_error)
46619  __Pyx_GOTREF(__pyx_t_1);
46620  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getGradientValue); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1896, __pyx_L1_error)
46621  __Pyx_GOTREF(__pyx_t_4);
46622  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46623  __pyx_t_1 = NULL;
46624  __pyx_t_6 = 0;
46625  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
46626  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
46627  if (likely(__pyx_t_1)) {
46628  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
46629  __Pyx_INCREF(__pyx_t_1);
46630  __Pyx_INCREF(function);
46631  __Pyx_DECREF_SET(__pyx_t_4, function);
46632  __pyx_t_6 = 1;
46633  }
46634  }
46635  #if CYTHON_FAST_PYCALL
46636  if (PyFunction_Check(__pyx_t_4)) {
46637  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_element, __pyx_v_xi};
46638  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error)
46639  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
46640  __Pyx_GOTREF(__pyx_t_2);
46641  } else
46642  #endif
46643  #if CYTHON_FAST_PYCCALL
46644  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
46645  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_element, __pyx_v_xi};
46646  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error)
46647  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
46648  __Pyx_GOTREF(__pyx_t_2);
46649  } else
46650  #endif
46651  {
46652  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1896, __pyx_L1_error)
46653  __Pyx_GOTREF(__pyx_t_3);
46654  if (__pyx_t_1) {
46655  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
46656  }
46657  __Pyx_INCREF(__pyx_v_element);
46658  __Pyx_GIVEREF(__pyx_v_element);
46659  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_element);
46660  __Pyx_INCREF(__pyx_v_xi);
46661  __Pyx_GIVEREF(__pyx_v_xi);
46662  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_xi);
46663  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L1_error)
46664  __Pyx_GOTREF(__pyx_t_2);
46665  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46666  }
46667  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46668  __pyx_v_v_grad = __pyx_t_2;
46669  __pyx_t_2 = 0;
46670 
46671  /* "mbd/CouplingFSI.pyx":1897
46672  * u_grad = comm.bcast(u_grad, rank)
46673  * v_grad = self.u[2].getGradientValue(element, xi)
46674  * v_grad = comm.bcast(v_grad, rank) # <<<<<<<<<<<<<<
46675  * if self.nd > 2:
46676  * w_grad = self.u[3].getGradientValue(element, xi)
46677  */
46678  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1897, __pyx_L1_error)
46679  __Pyx_GOTREF(__pyx_t_4);
46680  __pyx_t_3 = NULL;
46681  __pyx_t_6 = 0;
46682  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
46683  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
46684  if (likely(__pyx_t_3)) {
46685  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
46686  __Pyx_INCREF(__pyx_t_3);
46687  __Pyx_INCREF(function);
46688  __Pyx_DECREF_SET(__pyx_t_4, function);
46689  __pyx_t_6 = 1;
46690  }
46691  }
46692  #if CYTHON_FAST_PYCALL
46693  if (PyFunction_Check(__pyx_t_4)) {
46694  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_v_grad, __pyx_v_rank};
46695  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1897, __pyx_L1_error)
46696  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46697  __Pyx_GOTREF(__pyx_t_2);
46698  } else
46699  #endif
46700  #if CYTHON_FAST_PYCCALL
46701  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
46702  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_v_grad, __pyx_v_rank};
46703  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1897, __pyx_L1_error)
46704  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46705  __Pyx_GOTREF(__pyx_t_2);
46706  } else
46707  #endif
46708  {
46709  __pyx_t_1 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error)
46710  __Pyx_GOTREF(__pyx_t_1);
46711  if (__pyx_t_3) {
46712  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
46713  }
46714  __Pyx_INCREF(__pyx_v_v_grad);
46715  __Pyx_GIVEREF(__pyx_v_v_grad);
46716  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_6, __pyx_v_v_grad);
46717  __Pyx_INCREF(__pyx_v_rank);
46718  __Pyx_GIVEREF(__pyx_v_rank);
46719  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_6, __pyx_v_rank);
46720  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1897, __pyx_L1_error)
46721  __Pyx_GOTREF(__pyx_t_2);
46722  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46723  }
46724  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46725  __Pyx_DECREF_SET(__pyx_v_v_grad, __pyx_t_2);
46726  __pyx_t_2 = 0;
46727 
46728  /* "mbd/CouplingFSI.pyx":1898
46729  * v_grad = self.u[2].getGradientValue(element, xi)
46730  * v_grad = comm.bcast(v_grad, rank)
46731  * if self.nd > 2: # <<<<<<<<<<<<<<
46732  * w_grad = self.u[3].getGradientValue(element, xi)
46733  * if self.nd <= 2:
46734  */
46735  __pyx_t_5 = ((__pyx_v_self->nd > 2) != 0);
46736  if (__pyx_t_5) {
46737 
46738  /* "mbd/CouplingFSI.pyx":1899
46739  * v_grad = comm.bcast(v_grad, rank)
46740  * if self.nd > 2:
46741  * w_grad = self.u[3].getGradientValue(element, xi) # <<<<<<<<<<<<<<
46742  * if self.nd <= 2:
46743  * w_grad = 0
46744  */
46745  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_self->u, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1899, __pyx_L1_error)
46746  __Pyx_GOTREF(__pyx_t_4);
46747  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getGradientValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1899, __pyx_L1_error)
46748  __Pyx_GOTREF(__pyx_t_1);
46749  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46750  __pyx_t_4 = NULL;
46751  __pyx_t_6 = 0;
46752  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
46753  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
46754  if (likely(__pyx_t_4)) {
46755  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
46756  __Pyx_INCREF(__pyx_t_4);
46757  __Pyx_INCREF(function);
46758  __Pyx_DECREF_SET(__pyx_t_1, function);
46759  __pyx_t_6 = 1;
46760  }
46761  }
46762  #if CYTHON_FAST_PYCALL
46763  if (PyFunction_Check(__pyx_t_1)) {
46764  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_xi};
46765  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error)
46766  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46767  __Pyx_GOTREF(__pyx_t_2);
46768  } else
46769  #endif
46770  #if CYTHON_FAST_PYCCALL
46771  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46772  PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_element, __pyx_v_xi};
46773  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error)
46774  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
46775  __Pyx_GOTREF(__pyx_t_2);
46776  } else
46777  #endif
46778  {
46779  __pyx_t_3 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __pyx_L1_error)
46780  __Pyx_GOTREF(__pyx_t_3);
46781  if (__pyx_t_4) {
46782  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
46783  }
46784  __Pyx_INCREF(__pyx_v_element);
46785  __Pyx_GIVEREF(__pyx_v_element);
46786  PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_element);
46787  __Pyx_INCREF(__pyx_v_xi);
46788  __Pyx_GIVEREF(__pyx_v_xi);
46789  PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_xi);
46790  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L1_error)
46791  __Pyx_GOTREF(__pyx_t_2);
46792  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
46793  }
46794  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46795  __pyx_v_w_grad = __pyx_t_2;
46796  __pyx_t_2 = 0;
46797 
46798  /* "mbd/CouplingFSI.pyx":1898
46799  * v_grad = self.u[2].getGradientValue(element, xi)
46800  * v_grad = comm.bcast(v_grad, rank)
46801  * if self.nd > 2: # <<<<<<<<<<<<<<
46802  * w_grad = self.u[3].getGradientValue(element, xi)
46803  * if self.nd <= 2:
46804  */
46805  }
46806 
46807  /* "mbd/CouplingFSI.pyx":1900
46808  * if self.nd > 2:
46809  * w_grad = self.u[3].getGradientValue(element, xi)
46810  * if self.nd <= 2: # <<<<<<<<<<<<<<
46811  * w_grad = 0
46812  * # broadcast to all processors
46813  */
46814  __pyx_t_5 = ((__pyx_v_self->nd <= 2) != 0);
46815  if (__pyx_t_5) {
46816 
46817  /* "mbd/CouplingFSI.pyx":1901
46818  * w_grad = self.u[3].getGradientValue(element, xi)
46819  * if self.nd <= 2:
46820  * w_grad = 0 # <<<<<<<<<<<<<<
46821  * # broadcast to all processors
46822  * w_grad = comm.bcast(w_grad, rank)
46823  */
46824  __Pyx_INCREF(__pyx_int_0);
46825  __Pyx_XDECREF_SET(__pyx_v_w_grad, __pyx_int_0);
46826 
46827  /* "mbd/CouplingFSI.pyx":1900
46828  * if self.nd > 2:
46829  * w_grad = self.u[3].getGradientValue(element, xi)
46830  * if self.nd <= 2: # <<<<<<<<<<<<<<
46831  * w_grad = 0
46832  * # broadcast to all processors
46833  */
46834  }
46835 
46836  /* "mbd/CouplingFSI.pyx":1903
46837  * w_grad = 0
46838  * # broadcast to all processors
46839  * w_grad = comm.bcast(w_grad, rank) # <<<<<<<<<<<<<<
46840  * return u_grad, v_grad, w_grad
46841  *
46842  */
46843  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_bcast); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1903, __pyx_L1_error)
46844  __Pyx_GOTREF(__pyx_t_1);
46845  if (unlikely(!__pyx_v_w_grad)) { __Pyx_RaiseUnboundLocalError("w_grad"); __PYX_ERR(0, 1903, __pyx_L1_error) }
46846  __pyx_t_3 = NULL;
46847  __pyx_t_6 = 0;
46848  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
46849  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
46850  if (likely(__pyx_t_3)) {
46851  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
46852  __Pyx_INCREF(__pyx_t_3);
46853  __Pyx_INCREF(function);
46854  __Pyx_DECREF_SET(__pyx_t_1, function);
46855  __pyx_t_6 = 1;
46856  }
46857  }
46858  #if CYTHON_FAST_PYCALL
46859  if (PyFunction_Check(__pyx_t_1)) {
46860  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_w_grad, __pyx_v_rank};
46861  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error)
46862  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46863  __Pyx_GOTREF(__pyx_t_2);
46864  } else
46865  #endif
46866  #if CYTHON_FAST_PYCCALL
46867  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
46868  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_w_grad, __pyx_v_rank};
46869  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error)
46870  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
46871  __Pyx_GOTREF(__pyx_t_2);
46872  } else
46873  #endif
46874  {
46875  __pyx_t_4 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1903, __pyx_L1_error)
46876  __Pyx_GOTREF(__pyx_t_4);
46877  if (__pyx_t_3) {
46878  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
46879  }
46880  __Pyx_INCREF(__pyx_v_w_grad);
46881  __Pyx_GIVEREF(__pyx_v_w_grad);
46882  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_6, __pyx_v_w_grad);
46883  __Pyx_INCREF(__pyx_v_rank);
46884  __Pyx_GIVEREF(__pyx_v_rank);
46885  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_6, __pyx_v_rank);
46886  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1903, __pyx_L1_error)
46887  __Pyx_GOTREF(__pyx_t_2);
46888  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
46889  }
46890  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
46891  __Pyx_XDECREF_SET(__pyx_v_w_grad, __pyx_t_2);
46892  __pyx_t_2 = 0;
46893 
46894  /* "mbd/CouplingFSI.pyx":1893
46895  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank):
46896  * comm = Comm.get().comm.tompi4py()
46897  * if comm.rank == rank: # <<<<<<<<<<<<<<
46898  * u_grad = self.u_grad[1].getGradientValue(element, xi)
46899  * u_grad = comm.bcast(u_grad, rank)
46900  */
46901  }
46902 
46903  /* "mbd/CouplingFSI.pyx":1904
46904  * # broadcast to all processors
46905  * w_grad = comm.bcast(w_grad, rank)
46906  * return u_grad, v_grad, w_grad # <<<<<<<<<<<<<<
46907  *
46908  * def setCollisionEnvelopeMargin(self, double envelope, double margin):
46909  */
46910  __Pyx_XDECREF(__pyx_r);
46911  if (unlikely(!__pyx_v_u_grad)) { __Pyx_RaiseUnboundLocalError("u_grad"); __PYX_ERR(0, 1904, __pyx_L1_error) }
46912  if (unlikely(!__pyx_v_v_grad)) { __Pyx_RaiseUnboundLocalError("v_grad"); __PYX_ERR(0, 1904, __pyx_L1_error) }
46913  if (unlikely(!__pyx_v_w_grad)) { __Pyx_RaiseUnboundLocalError("w_grad"); __PYX_ERR(0, 1904, __pyx_L1_error) }
46914  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1904, __pyx_L1_error)
46915  __Pyx_GOTREF(__pyx_t_2);
46916  __Pyx_INCREF(__pyx_v_u_grad);
46917  __Pyx_GIVEREF(__pyx_v_u_grad);
46918  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_u_grad);
46919  __Pyx_INCREF(__pyx_v_v_grad);
46920  __Pyx_GIVEREF(__pyx_v_v_grad);
46921  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_v_grad);
46922  __Pyx_INCREF(__pyx_v_w_grad);
46923  __Pyx_GIVEREF(__pyx_v_w_grad);
46924  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_w_grad);
46925  __pyx_r = __pyx_t_2;
46926  __pyx_t_2 = 0;
46927  goto __pyx_L0;
46928 
46929  /* "mbd/CouplingFSI.pyx":1891
46930  * return u, v, w
46931  *
46932  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
46933  * comm = Comm.get().comm.tompi4py()
46934  * if comm.rank == rank:
46935  */
46936 
46937  /* function exit code */
46938  __pyx_L1_error:;
46939  __Pyx_XDECREF(__pyx_t_1);
46940  __Pyx_XDECREF(__pyx_t_2);
46941  __Pyx_XDECREF(__pyx_t_3);
46942  __Pyx_XDECREF(__pyx_t_4);
46943  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.getFluidVelocityGradientLocalCoords", __pyx_clineno, __pyx_lineno, __pyx_filename);
46944  __pyx_r = NULL;
46945  __pyx_L0:;
46946  __Pyx_XDECREF(__pyx_v_comm);
46947  __Pyx_XDECREF(__pyx_v_u_grad);
46948  __Pyx_XDECREF(__pyx_v_v_grad);
46949  __Pyx_XDECREF(__pyx_v_w_grad);
46950  __Pyx_XGIVEREF(__pyx_r);
46951  __Pyx_TraceReturn(__pyx_r, 0);
46952  __Pyx_RefNannyFinishContext();
46953  return __pyx_r;
46954 }
46955 
46956 /* "mbd/CouplingFSI.pyx":1906
46957  * return u_grad, v_grad, w_grad
46958  *
46959  * def setCollisionEnvelopeMargin(self, double envelope, double margin): # <<<<<<<<<<<<<<
46960  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
46961  *
46962  */
46963 
46964 /* Python wrapper */
46965 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_43setCollisionEnvelopeMargin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
46966 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_42setCollisionEnvelopeMargin[] = "ProtChSystem.setCollisionEnvelopeMargin(self, double envelope, double margin)";
46967 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_43setCollisionEnvelopeMargin = {"setCollisionEnvelopeMargin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_43setCollisionEnvelopeMargin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_42setCollisionEnvelopeMargin};
46968 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_43setCollisionEnvelopeMargin(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
46969  double __pyx_v_envelope;
46970  double __pyx_v_margin;
46971  int __pyx_lineno = 0;
46972  const char *__pyx_filename = NULL;
46973  int __pyx_clineno = 0;
46974  PyObject *__pyx_r = 0;
46975  __Pyx_RefNannyDeclarations
46976  __Pyx_RefNannySetupContext("setCollisionEnvelopeMargin (wrapper)", 0);
46977  {
46978  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_envelope,&__pyx_n_s_margin,0};
46979  PyObject* values[2] = {0,0};
46980  if (unlikely(__pyx_kwds)) {
46981  Py_ssize_t kw_args;
46982  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
46983  switch (pos_args) {
46984  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
46985  CYTHON_FALLTHROUGH;
46986  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
46987  CYTHON_FALLTHROUGH;
46988  case 0: break;
46989  default: goto __pyx_L5_argtuple_error;
46990  }
46991  kw_args = PyDict_Size(__pyx_kwds);
46992  switch (pos_args) {
46993  case 0:
46994  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_envelope)) != 0)) kw_args--;
46995  else goto __pyx_L5_argtuple_error;
46996  CYTHON_FALLTHROUGH;
46997  case 1:
46998  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_margin)) != 0)) kw_args--;
46999  else {
47000  __Pyx_RaiseArgtupleInvalid("setCollisionEnvelopeMargin", 1, 2, 2, 1); __PYX_ERR(0, 1906, __pyx_L3_error)
47001  }
47002  }
47003  if (unlikely(kw_args > 0)) {
47004  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setCollisionEnvelopeMargin") < 0)) __PYX_ERR(0, 1906, __pyx_L3_error)
47005  }
47006  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
47007  goto __pyx_L5_argtuple_error;
47008  } else {
47009  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
47010  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
47011  }
47012  __pyx_v_envelope = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_envelope == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1906, __pyx_L3_error)
47013  __pyx_v_margin = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_margin == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1906, __pyx_L3_error)
47014  }
47015  goto __pyx_L4_argument_unpacking_done;
47016  __pyx_L5_argtuple_error:;
47017  __Pyx_RaiseArgtupleInvalid("setCollisionEnvelopeMargin", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1906, __pyx_L3_error)
47018  __pyx_L3_error:;
47019  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setCollisionEnvelopeMargin", __pyx_clineno, __pyx_lineno, __pyx_filename);
47020  __Pyx_RefNannyFinishContext();
47021  return NULL;
47022  __pyx_L4_argument_unpacking_done:;
47023  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_42setCollisionEnvelopeMargin(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_envelope, __pyx_v_margin);
47024 
47025  /* function exit code */
47026  __Pyx_RefNannyFinishContext();
47027  return __pyx_r;
47028 }
47029 
47030 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_42setCollisionEnvelopeMargin(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, double __pyx_v_envelope, double __pyx_v_margin) {
47031  PyObject *__pyx_r = NULL;
47032  __Pyx_TraceDeclarations
47033  __Pyx_RefNannyDeclarations
47034  int __pyx_lineno = 0;
47035  const char *__pyx_filename = NULL;
47036  int __pyx_clineno = 0;
47037  __Pyx_TraceFrameInit(__pyx_codeobj__123)
47038  __Pyx_RefNannySetupContext("setCollisionEnvelopeMargin", 0);
47039  __Pyx_TraceCall("setCollisionEnvelopeMargin", __pyx_f[0], 1906, 0, __PYX_ERR(0, 1906, __pyx_L1_error));
47040 
47041  /* "mbd/CouplingFSI.pyx":1907
47042  *
47043  * def setCollisionEnvelopeMargin(self, double envelope, double margin):
47044  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin) # <<<<<<<<<<<<<<
47045  *
47046  * def log_bodies_text(self, d_time, l_logging_info):
47047  */
47048  __pyx_v_self->thisptr->setCollisionEnvelopeMargin(__pyx_v_envelope, __pyx_v_margin);
47049 
47050  /* "mbd/CouplingFSI.pyx":1906
47051  * return u_grad, v_grad, w_grad
47052  *
47053  * def setCollisionEnvelopeMargin(self, double envelope, double margin): # <<<<<<<<<<<<<<
47054  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
47055  *
47056  */
47057 
47058  /* function exit code */
47059  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
47060  goto __pyx_L0;
47061  __pyx_L1_error:;
47062  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.setCollisionEnvelopeMargin", __pyx_clineno, __pyx_lineno, __pyx_filename);
47063  __pyx_r = NULL;
47064  __pyx_L0:;
47065  __Pyx_XGIVEREF(__pyx_r);
47066  __Pyx_TraceReturn(__pyx_r, 0);
47067  __Pyx_RefNannyFinishContext();
47068  return __pyx_r;
47069 }
47070 
47071 /* "mbd/CouplingFSI.pyx":1909
47072  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
47073  *
47074  * def log_bodies_text(self, d_time, l_logging_info): # <<<<<<<<<<<<<<
47075  * """
47076  * Logs the chrono information into a text file at each timestep
47077  */
47078 
47079 /* Python wrapper */
47080 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_45log_bodies_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
47081 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_44log_bodies_text[] = "ProtChSystem.log_bodies_text(self, d_time, l_logging_info)\n\n Logs the chrono information into a text file at each timestep\n Parameters\n ----------\n self: object\n ProtChSystem being referenced\n d_time: float\n Simulation time\n l_logging_info: list\n Contains the information to be logged. Structure is [body number, type]\n with multiple entries being included as a 2d list. Valid types are\n 'position', 'rotation', 'force', and 'torque'.\n Returns\n -------\n None. Data is logged to a text file\n ";
47082 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_45log_bodies_text = {"log_bodies_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_45log_bodies_text, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_44log_bodies_text};
47083 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_45log_bodies_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
47084  PyObject *__pyx_v_d_time = 0;
47085  PyObject *__pyx_v_l_logging_info = 0;
47086  int __pyx_lineno = 0;
47087  const char *__pyx_filename = NULL;
47088  int __pyx_clineno = 0;
47089  PyObject *__pyx_r = 0;
47090  __Pyx_RefNannyDeclarations
47091  __Pyx_RefNannySetupContext("log_bodies_text (wrapper)", 0);
47092  {
47093  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d_time,&__pyx_n_s_l_logging_info,0};
47094  PyObject* values[2] = {0,0};
47095  if (unlikely(__pyx_kwds)) {
47096  Py_ssize_t kw_args;
47097  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
47098  switch (pos_args) {
47099  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
47100  CYTHON_FALLTHROUGH;
47101  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
47102  CYTHON_FALLTHROUGH;
47103  case 0: break;
47104  default: goto __pyx_L5_argtuple_error;
47105  }
47106  kw_args = PyDict_Size(__pyx_kwds);
47107  switch (pos_args) {
47108  case 0:
47109  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d_time)) != 0)) kw_args--;
47110  else goto __pyx_L5_argtuple_error;
47111  CYTHON_FALLTHROUGH;
47112  case 1:
47113  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l_logging_info)) != 0)) kw_args--;
47114  else {
47115  __Pyx_RaiseArgtupleInvalid("log_bodies_text", 1, 2, 2, 1); __PYX_ERR(0, 1909, __pyx_L3_error)
47116  }
47117  }
47118  if (unlikely(kw_args > 0)) {
47119  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log_bodies_text") < 0)) __PYX_ERR(0, 1909, __pyx_L3_error)
47120  }
47121  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
47122  goto __pyx_L5_argtuple_error;
47123  } else {
47124  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
47125  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
47126  }
47127  __pyx_v_d_time = values[0];
47128  __pyx_v_l_logging_info = values[1];
47129  }
47130  goto __pyx_L4_argument_unpacking_done;
47131  __pyx_L5_argtuple_error:;
47132  __Pyx_RaiseArgtupleInvalid("log_bodies_text", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1909, __pyx_L3_error)
47133  __pyx_L3_error:;
47134  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_bodies_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
47135  __Pyx_RefNannyFinishContext();
47136  return NULL;
47137  __pyx_L4_argument_unpacking_done:;
47138  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_44log_bodies_text(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_d_time, __pyx_v_l_logging_info);
47139 
47140  /* function exit code */
47141  __Pyx_RefNannyFinishContext();
47142  return __pyx_r;
47143 }
47144 
47145 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_44log_bodies_text(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time, PyObject *__pyx_v_l_logging_info) {
47146  PyObject *__pyx_v_s_filename = NULL;
47147  PyObject *__pyx_v_o_file = NULL;
47148  Py_ssize_t __pyx_v_i_entry_body;
47149  PyObject *__pyx_v_o_body = NULL;
47150  PyObject *__pyx_v_o_body_position = NULL;
47151  PyObject *__pyx_v_o_body_rotation = NULL;
47152  PyObject *__pyx_v_o_body_force = NULL;
47153  PyObject *__pyx_v_o_body_torque = NULL;
47154  PyObject *__pyx_r = NULL;
47155  __Pyx_TraceDeclarations
47156  __Pyx_RefNannyDeclarations
47157  PyObject *__pyx_t_1 = NULL;
47158  PyObject *__pyx_t_2 = NULL;
47159  Py_ssize_t __pyx_t_3;
47160  Py_ssize_t __pyx_t_4;
47161  Py_ssize_t __pyx_t_5;
47162  int __pyx_t_6;
47163  PyObject *__pyx_t_7 = NULL;
47164  PyObject *__pyx_t_8 = NULL;
47165  PyObject *__pyx_t_9 = NULL;
47166  int __pyx_lineno = 0;
47167  const char *__pyx_filename = NULL;
47168  int __pyx_clineno = 0;
47169  __Pyx_TraceFrameInit(__pyx_codeobj__124)
47170  __Pyx_RefNannySetupContext("log_bodies_text", 0);
47171  __Pyx_TraceCall("log_bodies_text", __pyx_f[0], 1909, 0, __PYX_ERR(0, 1909, __pyx_L1_error));
47172 
47173  /* "mbd/CouplingFSI.pyx":1928
47174  *
47175  * # Open the file
47176  * s_filename = 'chrono_log_body.txt' # <<<<<<<<<<<<<<
47177  * o_file = open(s_filename, 'a+')
47178  *
47179  */
47180  __Pyx_INCREF(__pyx_kp_s_chrono_log_body_txt);
47181  __pyx_v_s_filename = __pyx_kp_s_chrono_log_body_txt;
47182 
47183  /* "mbd/CouplingFSI.pyx":1929
47184  * # Open the file
47185  * s_filename = 'chrono_log_body.txt'
47186  * o_file = open(s_filename, 'a+') # <<<<<<<<<<<<<<
47187  *
47188  * # Loop and write the body information
47189  */
47190  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1929, __pyx_L1_error)
47191  __Pyx_GOTREF(__pyx_t_1);
47192  __Pyx_INCREF(__pyx_v_s_filename);
47193  __Pyx_GIVEREF(__pyx_v_s_filename);
47194  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s_filename);
47195  __Pyx_INCREF(__pyx_kp_s_a_2);
47196  __Pyx_GIVEREF(__pyx_kp_s_a_2);
47197  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_a_2);
47198  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L1_error)
47199  __Pyx_GOTREF(__pyx_t_2);
47200  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47201  __pyx_v_o_file = __pyx_t_2;
47202  __pyx_t_2 = 0;
47203 
47204  /* "mbd/CouplingFSI.pyx":1932
47205  *
47206  * # Loop and write the body information
47207  * for i_entry_body in range(0, len(l_logging_info), 1): # <<<<<<<<<<<<<<
47208  * # Extract the coordinate positions
47209  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody
47210  */
47211  __pyx_t_3 = PyObject_Length(__pyx_v_l_logging_info); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1932, __pyx_L1_error)
47212  __pyx_t_4 = __pyx_t_3;
47213  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
47214  __pyx_v_i_entry_body = __pyx_t_5;
47215 
47216  /* "mbd/CouplingFSI.pyx":1934
47217  * for i_entry_body in range(0, len(l_logging_info), 1):
47218  * # Extract the coordinate positions
47219  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody # <<<<<<<<<<<<<<
47220  *
47221  * if l_logging_info[i_entry_body][1] == 'position':
47222  */
47223  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L1_error)
47224  __Pyx_GOTREF(__pyx_t_2);
47225  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
47226  __Pyx_GOTREF(__pyx_t_1);
47227  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47228  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->subcomponents, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L1_error)
47229  __Pyx_GOTREF(__pyx_t_2);
47230  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47231  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChBody); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L1_error)
47232  __Pyx_GOTREF(__pyx_t_1);
47233  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47234  __Pyx_XDECREF_SET(__pyx_v_o_body, __pyx_t_1);
47235  __pyx_t_1 = 0;
47236 
47237  /* "mbd/CouplingFSI.pyx":1936
47238  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody
47239  *
47240  * if l_logging_info[i_entry_body][1] == 'position': # <<<<<<<<<<<<<<
47241  * o_body_position = o_body.GetPos()
47242  *
47243  */
47244  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __pyx_L1_error)
47245  __Pyx_GOTREF(__pyx_t_1);
47246  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1936, __pyx_L1_error)
47247  __Pyx_GOTREF(__pyx_t_2);
47248  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47249  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_position, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1936, __pyx_L1_error)
47250  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47251  if (__pyx_t_6) {
47252 
47253  /* "mbd/CouplingFSI.pyx":1937
47254  *
47255  * if l_logging_info[i_entry_body][1] == 'position':
47256  * o_body_position = o_body.GetPos() # <<<<<<<<<<<<<<
47257  *
47258  * o_file.write(str(d_time) + '\t' + 'position' + '\t' +
47259  */
47260  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
47261  __Pyx_GOTREF(__pyx_t_1);
47262  __pyx_t_7 = NULL;
47263  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
47264  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
47265  if (likely(__pyx_t_7)) {
47266  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
47267  __Pyx_INCREF(__pyx_t_7);
47268  __Pyx_INCREF(function);
47269  __Pyx_DECREF_SET(__pyx_t_1, function);
47270  }
47271  }
47272  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
47273  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
47274  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1937, __pyx_L1_error)
47275  __Pyx_GOTREF(__pyx_t_2);
47276  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47277  __Pyx_XDECREF_SET(__pyx_v_o_body_position, __pyx_t_2);
47278  __pyx_t_2 = 0;
47279 
47280  /* "mbd/CouplingFSI.pyx":1939
47281  * o_body_position = o_body.GetPos()
47282  *
47283  * o_file.write(str(d_time) + '\t' + 'position' + '\t' + # <<<<<<<<<<<<<<
47284  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_position.x) + '\t' +
47285  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n')
47286  */
47287  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1939, __pyx_L1_error)
47288  __Pyx_GOTREF(__pyx_t_1);
47289  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1939, __pyx_L1_error)
47290  __Pyx_GOTREF(__pyx_t_7);
47291  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1939, __pyx_L1_error)
47292  __Pyx_GOTREF(__pyx_t_8);
47293  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47294  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_n_s_position); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1939, __pyx_L1_error)
47295  __Pyx_GOTREF(__pyx_t_7);
47296  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47297  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1939, __pyx_L1_error)
47298  __Pyx_GOTREF(__pyx_t_8);
47299  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47300 
47301  /* "mbd/CouplingFSI.pyx":1940
47302  *
47303  * o_file.write(str(d_time) + '\t' + 'position' + '\t' +
47304  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_position.x) + '\t' + # <<<<<<<<<<<<<<
47305  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n')
47306  *
47307  */
47308  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1940, __pyx_L1_error)
47309  __Pyx_GOTREF(__pyx_t_7);
47310  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1940, __pyx_L1_error)
47311  __Pyx_GOTREF(__pyx_t_9);
47312  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47313  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1940, __pyx_L1_error)
47314  __Pyx_GOTREF(__pyx_t_7);
47315  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47316 
47317  /* "mbd/CouplingFSI.pyx":1939
47318  * o_body_position = o_body.GetPos()
47319  *
47320  * o_file.write(str(d_time) + '\t' + 'position' + '\t' + # <<<<<<<<<<<<<<
47321  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_position.x) + '\t' +
47322  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n')
47323  */
47324  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1939, __pyx_L1_error)
47325  __Pyx_GOTREF(__pyx_t_9);
47326  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47327  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47328 
47329  /* "mbd/CouplingFSI.pyx":1940
47330  *
47331  * o_file.write(str(d_time) + '\t' + 'position' + '\t' +
47332  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_position.x) + '\t' + # <<<<<<<<<<<<<<
47333  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n')
47334  *
47335  */
47336  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1940, __pyx_L1_error)
47337  __Pyx_GOTREF(__pyx_t_7);
47338  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47339  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_position, __pyx_n_s_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1940, __pyx_L1_error)
47340  __Pyx_GOTREF(__pyx_t_9);
47341  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1940, __pyx_L1_error)
47342  __Pyx_GOTREF(__pyx_t_8);
47343  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47344  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1940, __pyx_L1_error)
47345  __Pyx_GOTREF(__pyx_t_9);
47346  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47347  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47348  __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1940, __pyx_L1_error)
47349  __Pyx_GOTREF(__pyx_t_8);
47350  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47351 
47352  /* "mbd/CouplingFSI.pyx":1941
47353  * o_file.write(str(d_time) + '\t' + 'position' + '\t' +
47354  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_position.x) + '\t' +
47355  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n') # <<<<<<<<<<<<<<
47356  *
47357  * elif l_logging_info[i_entry_body][1] == 'rotation':
47358  */
47359  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_position, __pyx_n_s_y); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1941, __pyx_L1_error)
47360  __Pyx_GOTREF(__pyx_t_9);
47361  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1941, __pyx_L1_error)
47362  __Pyx_GOTREF(__pyx_t_7);
47363  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47364 
47365  /* "mbd/CouplingFSI.pyx":1940
47366  *
47367  * o_file.write(str(d_time) + '\t' + 'position' + '\t' +
47368  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_position.x) + '\t' + # <<<<<<<<<<<<<<
47369  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n')
47370  *
47371  */
47372  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1940, __pyx_L1_error)
47373  __Pyx_GOTREF(__pyx_t_9);
47374  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47375  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47376 
47377  /* "mbd/CouplingFSI.pyx":1941
47378  * o_file.write(str(d_time) + '\t' + 'position' + '\t' +
47379  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_position.x) + '\t' +
47380  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n') # <<<<<<<<<<<<<<
47381  *
47382  * elif l_logging_info[i_entry_body][1] == 'rotation':
47383  */
47384  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1941, __pyx_L1_error)
47385  __Pyx_GOTREF(__pyx_t_7);
47386  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47387  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_position, __pyx_n_s_z); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1941, __pyx_L1_error)
47388  __Pyx_GOTREF(__pyx_t_9);
47389  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1941, __pyx_L1_error)
47390  __Pyx_GOTREF(__pyx_t_8);
47391  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47392  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1941, __pyx_L1_error)
47393  __Pyx_GOTREF(__pyx_t_9);
47394  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47395  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47396  __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__126); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1941, __pyx_L1_error)
47397  __Pyx_GOTREF(__pyx_t_8);
47398  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47399  __pyx_t_9 = NULL;
47400  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
47401  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
47402  if (likely(__pyx_t_9)) {
47403  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
47404  __Pyx_INCREF(__pyx_t_9);
47405  __Pyx_INCREF(function);
47406  __Pyx_DECREF_SET(__pyx_t_1, function);
47407  }
47408  }
47409  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8);
47410  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
47411  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47412  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1939, __pyx_L1_error)
47413  __Pyx_GOTREF(__pyx_t_2);
47414  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47415  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47416 
47417  /* "mbd/CouplingFSI.pyx":1936
47418  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody
47419  *
47420  * if l_logging_info[i_entry_body][1] == 'position': # <<<<<<<<<<<<<<
47421  * o_body_position = o_body.GetPos()
47422  *
47423  */
47424  goto __pyx_L5;
47425  }
47426 
47427  /* "mbd/CouplingFSI.pyx":1943
47428  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n')
47429  *
47430  * elif l_logging_info[i_entry_body][1] == 'rotation': # <<<<<<<<<<<<<<
47431  * o_body_rotation = o_body.GetRot()
47432  *
47433  */
47434  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1943, __pyx_L1_error)
47435  __Pyx_GOTREF(__pyx_t_2);
47436  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
47437  __Pyx_GOTREF(__pyx_t_1);
47438  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47439  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_rotation, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1943, __pyx_L1_error)
47440  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47441  if (__pyx_t_6) {
47442 
47443  /* "mbd/CouplingFSI.pyx":1944
47444  *
47445  * elif l_logging_info[i_entry_body][1] == 'rotation':
47446  * o_body_rotation = o_body.GetRot() # <<<<<<<<<<<<<<
47447  *
47448  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' +
47449  */
47450  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_GetRot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error)
47451  __Pyx_GOTREF(__pyx_t_2);
47452  __pyx_t_8 = NULL;
47453  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
47454  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
47455  if (likely(__pyx_t_8)) {
47456  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
47457  __Pyx_INCREF(__pyx_t_8);
47458  __Pyx_INCREF(function);
47459  __Pyx_DECREF_SET(__pyx_t_2, function);
47460  }
47461  }
47462  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
47463  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
47464  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error)
47465  __Pyx_GOTREF(__pyx_t_1);
47466  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47467  __Pyx_XDECREF_SET(__pyx_v_o_body_rotation, __pyx_t_1);
47468  __pyx_t_1 = 0;
47469 
47470  /* "mbd/CouplingFSI.pyx":1946
47471  * o_body_rotation = o_body.GetRot()
47472  *
47473  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' + # <<<<<<<<<<<<<<
47474  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_rotation.e0) + '\t' +
47475  * str(o_body_rotation.e1) + '\t' + str(o_body_rotation.e2) + '\t' + str(o_body_rotation.e3) +
47476  */
47477  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
47478  __Pyx_GOTREF(__pyx_t_2);
47479  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1946, __pyx_L1_error)
47480  __Pyx_GOTREF(__pyx_t_8);
47481  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1946, __pyx_L1_error)
47482  __Pyx_GOTREF(__pyx_t_9);
47483  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47484  __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_n_s_rotation); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1946, __pyx_L1_error)
47485  __Pyx_GOTREF(__pyx_t_8);
47486  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47487  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1946, __pyx_L1_error)
47488  __Pyx_GOTREF(__pyx_t_9);
47489  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47490 
47491  /* "mbd/CouplingFSI.pyx":1947
47492  *
47493  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' +
47494  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_rotation.e0) + '\t' + # <<<<<<<<<<<<<<
47495  * str(o_body_rotation.e1) + '\t' + str(o_body_rotation.e2) + '\t' + str(o_body_rotation.e3) +
47496  * '\n')
47497  */
47498  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1947, __pyx_L1_error)
47499  __Pyx_GOTREF(__pyx_t_8);
47500  __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1947, __pyx_L1_error)
47501  __Pyx_GOTREF(__pyx_t_7);
47502  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47503  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1947, __pyx_L1_error)
47504  __Pyx_GOTREF(__pyx_t_8);
47505  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47506 
47507  /* "mbd/CouplingFSI.pyx":1946
47508  * o_body_rotation = o_body.GetRot()
47509  *
47510  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' + # <<<<<<<<<<<<<<
47511  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_rotation.e0) + '\t' +
47512  * str(o_body_rotation.e1) + '\t' + str(o_body_rotation.e2) + '\t' + str(o_body_rotation.e3) +
47513  */
47514  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1946, __pyx_L1_error)
47515  __Pyx_GOTREF(__pyx_t_7);
47516  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47517  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47518 
47519  /* "mbd/CouplingFSI.pyx":1947
47520  *
47521  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' +
47522  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_rotation.e0) + '\t' + # <<<<<<<<<<<<<<
47523  * str(o_body_rotation.e1) + '\t' + str(o_body_rotation.e2) + '\t' + str(o_body_rotation.e3) +
47524  * '\n')
47525  */
47526  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1947, __pyx_L1_error)
47527  __Pyx_GOTREF(__pyx_t_8);
47528  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47529  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1947, __pyx_L1_error)
47530  __Pyx_GOTREF(__pyx_t_7);
47531  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1947, __pyx_L1_error)
47532  __Pyx_GOTREF(__pyx_t_9);
47533  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47534  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1947, __pyx_L1_error)
47535  __Pyx_GOTREF(__pyx_t_7);
47536  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47537  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47538  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1947, __pyx_L1_error)
47539  __Pyx_GOTREF(__pyx_t_9);
47540  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47541 
47542  /* "mbd/CouplingFSI.pyx":1948
47543  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' +
47544  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_rotation.e0) + '\t' +
47545  * str(o_body_rotation.e1) + '\t' + str(o_body_rotation.e2) + '\t' + str(o_body_rotation.e3) + # <<<<<<<<<<<<<<
47546  * '\n')
47547  *
47548  */
47549  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1948, __pyx_L1_error)
47550  __Pyx_GOTREF(__pyx_t_7);
47551  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1948, __pyx_L1_error)
47552  __Pyx_GOTREF(__pyx_t_8);
47553  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47554 
47555  /* "mbd/CouplingFSI.pyx":1947
47556  *
47557  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' +
47558  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_rotation.e0) + '\t' + # <<<<<<<<<<<<<<
47559  * str(o_body_rotation.e1) + '\t' + str(o_body_rotation.e2) + '\t' + str(o_body_rotation.e3) +
47560  * '\n')
47561  */
47562  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1947, __pyx_L1_error)
47563  __Pyx_GOTREF(__pyx_t_7);
47564  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47565  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47566 
47567  /* "mbd/CouplingFSI.pyx":1948
47568  * o_file.write(str(d_time) + '\t' + 'rotation' + '\t' +
47569  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_rotation.e0) + '\t' +
47570  * str(o_body_rotation.e1) + '\t' + str(o_body_rotation.e2) + '\t' + str(o_body_rotation.e3) + # <<<<<<<<<<<<<<
47571  * '\n')
47572  *
47573  */
47574  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1948, __pyx_L1_error)
47575  __Pyx_GOTREF(__pyx_t_8);
47576  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47577  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1948, __pyx_L1_error)
47578  __Pyx_GOTREF(__pyx_t_7);
47579  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1948, __pyx_L1_error)
47580  __Pyx_GOTREF(__pyx_t_9);
47581  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47582  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1948, __pyx_L1_error)
47583  __Pyx_GOTREF(__pyx_t_7);
47584  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47585  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47586  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1948, __pyx_L1_error)
47587  __Pyx_GOTREF(__pyx_t_9);
47588  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47589  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1948, __pyx_L1_error)
47590  __Pyx_GOTREF(__pyx_t_7);
47591  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1948, __pyx_L1_error)
47592  __Pyx_GOTREF(__pyx_t_8);
47593  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47594  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1948, __pyx_L1_error)
47595  __Pyx_GOTREF(__pyx_t_7);
47596  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47597  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47598  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__126); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1948, __pyx_L1_error)
47599  __Pyx_GOTREF(__pyx_t_8);
47600  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47601  __pyx_t_7 = NULL;
47602  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
47603  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
47604  if (likely(__pyx_t_7)) {
47605  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
47606  __Pyx_INCREF(__pyx_t_7);
47607  __Pyx_INCREF(function);
47608  __Pyx_DECREF_SET(__pyx_t_2, function);
47609  }
47610  }
47611  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8);
47612  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
47613  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47614  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
47615  __Pyx_GOTREF(__pyx_t_1);
47616  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47617  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47618 
47619  /* "mbd/CouplingFSI.pyx":1943
47620  * str(o_body_position.y) + '\t' + str(o_body_position.z) + '\n')
47621  *
47622  * elif l_logging_info[i_entry_body][1] == 'rotation': # <<<<<<<<<<<<<<
47623  * o_body_rotation = o_body.GetRot()
47624  *
47625  */
47626  goto __pyx_L5;
47627  }
47628 
47629  /* "mbd/CouplingFSI.pyx":1951
47630  * '\n')
47631  *
47632  * elif l_logging_info[i_entry_body][1] == 'force': # <<<<<<<<<<<<<<
47633  * o_body_force = o_body.Get_XForce()
47634  *
47635  */
47636  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __pyx_L1_error)
47637  __Pyx_GOTREF(__pyx_t_1);
47638  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1951, __pyx_L1_error)
47639  __Pyx_GOTREF(__pyx_t_2);
47640  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47641  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_force, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1951, __pyx_L1_error)
47642  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47643  if (__pyx_t_6) {
47644 
47645  /* "mbd/CouplingFSI.pyx":1952
47646  *
47647  * elif l_logging_info[i_entry_body][1] == 'force':
47648  * o_body_force = o_body.Get_XForce() # <<<<<<<<<<<<<<
47649  *
47650  * o_file.write(str(d_time) + '\t' + 'force' + '\t' +
47651  */
47652  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_Get_XForce); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
47653  __Pyx_GOTREF(__pyx_t_1);
47654  __pyx_t_8 = NULL;
47655  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
47656  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
47657  if (likely(__pyx_t_8)) {
47658  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
47659  __Pyx_INCREF(__pyx_t_8);
47660  __Pyx_INCREF(function);
47661  __Pyx_DECREF_SET(__pyx_t_1, function);
47662  }
47663  }
47664  __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
47665  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
47666  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1952, __pyx_L1_error)
47667  __Pyx_GOTREF(__pyx_t_2);
47668  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47669  __Pyx_XDECREF_SET(__pyx_v_o_body_force, __pyx_t_2);
47670  __pyx_t_2 = 0;
47671 
47672  /* "mbd/CouplingFSI.pyx":1954
47673  * o_body_force = o_body.Get_XForce()
47674  *
47675  * o_file.write(str(d_time) + '\t' + 'force' + '\t' + # <<<<<<<<<<<<<<
47676  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_force.x) + '\t' +
47677  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n')
47678  */
47679  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
47680  __Pyx_GOTREF(__pyx_t_1);
47681  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_time); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1954, __pyx_L1_error)
47682  __Pyx_GOTREF(__pyx_t_8);
47683  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1954, __pyx_L1_error)
47684  __Pyx_GOTREF(__pyx_t_7);
47685  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47686  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_n_s_force); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1954, __pyx_L1_error)
47687  __Pyx_GOTREF(__pyx_t_8);
47688  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47689  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1954, __pyx_L1_error)
47690  __Pyx_GOTREF(__pyx_t_7);
47691  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47692 
47693  /* "mbd/CouplingFSI.pyx":1955
47694  *
47695  * o_file.write(str(d_time) + '\t' + 'force' + '\t' +
47696  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_force.x) + '\t' + # <<<<<<<<<<<<<<
47697  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n')
47698  *
47699  */
47700  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1955, __pyx_L1_error)
47701  __Pyx_GOTREF(__pyx_t_8);
47702  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1955, __pyx_L1_error)
47703  __Pyx_GOTREF(__pyx_t_9);
47704  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47705  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1955, __pyx_L1_error)
47706  __Pyx_GOTREF(__pyx_t_8);
47707  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47708 
47709  /* "mbd/CouplingFSI.pyx":1954
47710  * o_body_force = o_body.Get_XForce()
47711  *
47712  * o_file.write(str(d_time) + '\t' + 'force' + '\t' + # <<<<<<<<<<<<<<
47713  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_force.x) + '\t' +
47714  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n')
47715  */
47716  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1954, __pyx_L1_error)
47717  __Pyx_GOTREF(__pyx_t_9);
47718  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47719  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47720 
47721  /* "mbd/CouplingFSI.pyx":1955
47722  *
47723  * o_file.write(str(d_time) + '\t' + 'force' + '\t' +
47724  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_force.x) + '\t' + # <<<<<<<<<<<<<<
47725  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n')
47726  *
47727  */
47728  __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1955, __pyx_L1_error)
47729  __Pyx_GOTREF(__pyx_t_8);
47730  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47731  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_force, __pyx_n_s_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1955, __pyx_L1_error)
47732  __Pyx_GOTREF(__pyx_t_9);
47733  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1955, __pyx_L1_error)
47734  __Pyx_GOTREF(__pyx_t_7);
47735  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47736  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1955, __pyx_L1_error)
47737  __Pyx_GOTREF(__pyx_t_9);
47738  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47739  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47740  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1955, __pyx_L1_error)
47741  __Pyx_GOTREF(__pyx_t_7);
47742  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47743 
47744  /* "mbd/CouplingFSI.pyx":1956
47745  * o_file.write(str(d_time) + '\t' + 'force' + '\t' +
47746  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_force.x) + '\t' +
47747  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n') # <<<<<<<<<<<<<<
47748  *
47749  * elif l_logging_info[i_entry_body][1] == 'torque':
47750  */
47751  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_force, __pyx_n_s_y); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1956, __pyx_L1_error)
47752  __Pyx_GOTREF(__pyx_t_9);
47753  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error)
47754  __Pyx_GOTREF(__pyx_t_8);
47755  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47756 
47757  /* "mbd/CouplingFSI.pyx":1955
47758  *
47759  * o_file.write(str(d_time) + '\t' + 'force' + '\t' +
47760  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_force.x) + '\t' + # <<<<<<<<<<<<<<
47761  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n')
47762  *
47763  */
47764  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1955, __pyx_L1_error)
47765  __Pyx_GOTREF(__pyx_t_9);
47766  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47767  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47768 
47769  /* "mbd/CouplingFSI.pyx":1956
47770  * o_file.write(str(d_time) + '\t' + 'force' + '\t' +
47771  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_force.x) + '\t' +
47772  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n') # <<<<<<<<<<<<<<
47773  *
47774  * elif l_logging_info[i_entry_body][1] == 'torque':
47775  */
47776  __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1956, __pyx_L1_error)
47777  __Pyx_GOTREF(__pyx_t_8);
47778  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47779  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_force, __pyx_n_s_z); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1956, __pyx_L1_error)
47780  __Pyx_GOTREF(__pyx_t_9);
47781  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1956, __pyx_L1_error)
47782  __Pyx_GOTREF(__pyx_t_7);
47783  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47784  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1956, __pyx_L1_error)
47785  __Pyx_GOTREF(__pyx_t_9);
47786  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47787  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47788  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_kp_s__126); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1956, __pyx_L1_error)
47789  __Pyx_GOTREF(__pyx_t_7);
47790  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47791  __pyx_t_9 = NULL;
47792  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
47793  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
47794  if (likely(__pyx_t_9)) {
47795  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
47796  __Pyx_INCREF(__pyx_t_9);
47797  __Pyx_INCREF(function);
47798  __Pyx_DECREF_SET(__pyx_t_1, function);
47799  }
47800  }
47801  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7);
47802  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
47803  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47804  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1954, __pyx_L1_error)
47805  __Pyx_GOTREF(__pyx_t_2);
47806  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47807  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47808 
47809  /* "mbd/CouplingFSI.pyx":1951
47810  * '\n')
47811  *
47812  * elif l_logging_info[i_entry_body][1] == 'force': # <<<<<<<<<<<<<<
47813  * o_body_force = o_body.Get_XForce()
47814  *
47815  */
47816  goto __pyx_L5;
47817  }
47818 
47819  /* "mbd/CouplingFSI.pyx":1958
47820  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n')
47821  *
47822  * elif l_logging_info[i_entry_body][1] == 'torque': # <<<<<<<<<<<<<<
47823  * o_body_torque = o_body.Get_Xtorque()
47824  *
47825  */
47826  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
47827  __Pyx_GOTREF(__pyx_t_2);
47828  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
47829  __Pyx_GOTREF(__pyx_t_1);
47830  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47831  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_torque, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1958, __pyx_L1_error)
47832  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47833  if (likely(__pyx_t_6)) {
47834 
47835  /* "mbd/CouplingFSI.pyx":1959
47836  *
47837  * elif l_logging_info[i_entry_body][1] == 'torque':
47838  * o_body_torque = o_body.Get_Xtorque() # <<<<<<<<<<<<<<
47839  *
47840  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' +
47841  */
47842  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_Get_Xtorque); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1959, __pyx_L1_error)
47843  __Pyx_GOTREF(__pyx_t_2);
47844  __pyx_t_7 = NULL;
47845  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
47846  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
47847  if (likely(__pyx_t_7)) {
47848  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
47849  __Pyx_INCREF(__pyx_t_7);
47850  __Pyx_INCREF(function);
47851  __Pyx_DECREF_SET(__pyx_t_2, function);
47852  }
47853  }
47854  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
47855  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
47856  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1959, __pyx_L1_error)
47857  __Pyx_GOTREF(__pyx_t_1);
47858  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47859  __Pyx_XDECREF_SET(__pyx_v_o_body_torque, __pyx_t_1);
47860  __pyx_t_1 = 0;
47861 
47862  /* "mbd/CouplingFSI.pyx":1961
47863  * o_body_torque = o_body.Get_Xtorque()
47864  *
47865  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' + # <<<<<<<<<<<<<<
47866  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_torque.x) + '\t' +
47867  * str(o_body_torque.y) + '\t' + str(o_body_torque.z) + '\n')
47868  */
47869  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1961, __pyx_L1_error)
47870  __Pyx_GOTREF(__pyx_t_2);
47871  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_time); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1961, __pyx_L1_error)
47872  __Pyx_GOTREF(__pyx_t_7);
47873  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1961, __pyx_L1_error)
47874  __Pyx_GOTREF(__pyx_t_9);
47875  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47876  __pyx_t_7 = PyNumber_Add(__pyx_t_9, __pyx_n_s_torque); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1961, __pyx_L1_error)
47877  __Pyx_GOTREF(__pyx_t_7);
47878  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47879  __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1961, __pyx_L1_error)
47880  __Pyx_GOTREF(__pyx_t_9);
47881  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47882 
47883  /* "mbd/CouplingFSI.pyx":1962
47884  *
47885  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' +
47886  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_torque.x) + '\t' + # <<<<<<<<<<<<<<
47887  * str(o_body_torque.y) + '\t' + str(o_body_torque.z) + '\n')
47888  *
47889  */
47890  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1962, __pyx_L1_error)
47891  __Pyx_GOTREF(__pyx_t_7);
47892  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1962, __pyx_L1_error)
47893  __Pyx_GOTREF(__pyx_t_8);
47894  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47895  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1962, __pyx_L1_error)
47896  __Pyx_GOTREF(__pyx_t_7);
47897  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47898 
47899  /* "mbd/CouplingFSI.pyx":1961
47900  * o_body_torque = o_body.Get_Xtorque()
47901  *
47902  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' + # <<<<<<<<<<<<<<
47903  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_torque.x) + '\t' +
47904  * str(o_body_torque.y) + '\t' + str(o_body_torque.z) + '\n')
47905  */
47906  __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1961, __pyx_L1_error)
47907  __Pyx_GOTREF(__pyx_t_8);
47908  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47909  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47910 
47911  /* "mbd/CouplingFSI.pyx":1962
47912  *
47913  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' +
47914  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_torque.x) + '\t' + # <<<<<<<<<<<<<<
47915  * str(o_body_torque.y) + '\t' + str(o_body_torque.z) + '\n')
47916  *
47917  */
47918  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1962, __pyx_L1_error)
47919  __Pyx_GOTREF(__pyx_t_7);
47920  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47921  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_torque, __pyx_n_s_x); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1962, __pyx_L1_error)
47922  __Pyx_GOTREF(__pyx_t_8);
47923  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1962, __pyx_L1_error)
47924  __Pyx_GOTREF(__pyx_t_9);
47925  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47926  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1962, __pyx_L1_error)
47927  __Pyx_GOTREF(__pyx_t_8);
47928  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47929  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47930  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1962, __pyx_L1_error)
47931  __Pyx_GOTREF(__pyx_t_9);
47932  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47933 
47934  /* "mbd/CouplingFSI.pyx":1963
47935  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' +
47936  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_torque.x) + '\t' +
47937  * str(o_body_torque.y) + '\t' + str(o_body_torque.z) + '\n') # <<<<<<<<<<<<<<
47938  *
47939  * else:
47940  */
47941  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_torque, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1963, __pyx_L1_error)
47942  __Pyx_GOTREF(__pyx_t_8);
47943  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1963, __pyx_L1_error)
47944  __Pyx_GOTREF(__pyx_t_7);
47945  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47946 
47947  /* "mbd/CouplingFSI.pyx":1962
47948  *
47949  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' +
47950  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_torque.x) + '\t' + # <<<<<<<<<<<<<<
47951  * str(o_body_torque.y) + '\t' + str(o_body_torque.z) + '\n')
47952  *
47953  */
47954  __pyx_t_8 = PyNumber_Add(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1962, __pyx_L1_error)
47955  __Pyx_GOTREF(__pyx_t_8);
47956  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47957  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47958 
47959  /* "mbd/CouplingFSI.pyx":1963
47960  * o_file.write(str(d_time) + '\t' + 'torque' + '\t' +
47961  * str(l_logging_info[i_entry_body][0]) + '\t' + str(o_body_torque.x) + '\t' +
47962  * str(o_body_torque.y) + '\t' + str(o_body_torque.z) + '\n') # <<<<<<<<<<<<<<
47963  *
47964  * else:
47965  */
47966  __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1963, __pyx_L1_error)
47967  __Pyx_GOTREF(__pyx_t_7);
47968  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47969  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_torque, __pyx_n_s_z); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1963, __pyx_L1_error)
47970  __Pyx_GOTREF(__pyx_t_8);
47971  __pyx_t_9 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1963, __pyx_L1_error)
47972  __Pyx_GOTREF(__pyx_t_9);
47973  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47974  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1963, __pyx_L1_error)
47975  __Pyx_GOTREF(__pyx_t_8);
47976  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
47977  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47978  __pyx_t_9 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__126); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1963, __pyx_L1_error)
47979  __Pyx_GOTREF(__pyx_t_9);
47980  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
47981  __pyx_t_8 = NULL;
47982  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
47983  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
47984  if (likely(__pyx_t_8)) {
47985  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
47986  __Pyx_INCREF(__pyx_t_8);
47987  __Pyx_INCREF(function);
47988  __Pyx_DECREF_SET(__pyx_t_2, function);
47989  }
47990  }
47991  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9);
47992  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
47993  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
47994  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1961, __pyx_L1_error)
47995  __Pyx_GOTREF(__pyx_t_1);
47996  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
47997  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
47998 
47999  /* "mbd/CouplingFSI.pyx":1958
48000  * str(o_body_force.y) + '\t' + str(o_body_force.z) + '\n')
48001  *
48002  * elif l_logging_info[i_entry_body][1] == 'torque': # <<<<<<<<<<<<<<
48003  * o_body_torque = o_body.Get_Xtorque()
48004  *
48005  */
48006  goto __pyx_L5;
48007  }
48008 
48009  /* "mbd/CouplingFSI.pyx":1966
48010  *
48011  * else:
48012  * raise NotImplementedError('Chrono body log not understood.') # <<<<<<<<<<<<<<
48013  *
48014  * # Close the log file
48015  */
48016  /*else*/ {
48017  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1966, __pyx_L1_error)
48018  __Pyx_GOTREF(__pyx_t_1);
48019  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
48020  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48021  __PYX_ERR(0, 1966, __pyx_L1_error)
48022  }
48023  __pyx_L5:;
48024  }
48025 
48026  /* "mbd/CouplingFSI.pyx":1969
48027  *
48028  * # Close the log file
48029  * o_file.close() # <<<<<<<<<<<<<<
48030  *
48031  *
48032  */
48033  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1969, __pyx_L1_error)
48034  __Pyx_GOTREF(__pyx_t_2);
48035  __pyx_t_9 = NULL;
48036  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
48037  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
48038  if (likely(__pyx_t_9)) {
48039  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
48040  __Pyx_INCREF(__pyx_t_9);
48041  __Pyx_INCREF(function);
48042  __Pyx_DECREF_SET(__pyx_t_2, function);
48043  }
48044  }
48045  __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
48046  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
48047  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L1_error)
48048  __Pyx_GOTREF(__pyx_t_1);
48049  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
48050  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48051 
48052  /* "mbd/CouplingFSI.pyx":1909
48053  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
48054  *
48055  * def log_bodies_text(self, d_time, l_logging_info): # <<<<<<<<<<<<<<
48056  * """
48057  * Logs the chrono information into a text file at each timestep
48058  */
48059 
48060  /* function exit code */
48061  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
48062  goto __pyx_L0;
48063  __pyx_L1_error:;
48064  __Pyx_XDECREF(__pyx_t_1);
48065  __Pyx_XDECREF(__pyx_t_2);
48066  __Pyx_XDECREF(__pyx_t_7);
48067  __Pyx_XDECREF(__pyx_t_8);
48068  __Pyx_XDECREF(__pyx_t_9);
48069  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_bodies_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
48070  __pyx_r = NULL;
48071  __pyx_L0:;
48072  __Pyx_XDECREF(__pyx_v_s_filename);
48073  __Pyx_XDECREF(__pyx_v_o_file);
48074  __Pyx_XDECREF(__pyx_v_o_body);
48075  __Pyx_XDECREF(__pyx_v_o_body_position);
48076  __Pyx_XDECREF(__pyx_v_o_body_rotation);
48077  __Pyx_XDECREF(__pyx_v_o_body_force);
48078  __Pyx_XDECREF(__pyx_v_o_body_torque);
48079  __Pyx_XGIVEREF(__pyx_r);
48080  __Pyx_TraceReturn(__pyx_r, 0);
48081  __Pyx_RefNannyFinishContext();
48082  return __pyx_r;
48083 }
48084 
48085 /* "mbd/CouplingFSI.pyx":1972
48086  *
48087  *
48088  * def log_bodies_h5(self, l_logging_info): # <<<<<<<<<<<<<<
48089  * """
48090  * Logs the chrono information into a h5 file at each timestep
48091  */
48092 
48093 /* Python wrapper */
48094 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_47log_bodies_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_l_logging_info); /*proto*/
48095 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_46log_bodies_h5[] = "ProtChSystem.log_bodies_h5(self, l_logging_info)\n\n Logs the chrono information into a h5 file at each timestep\n Parameters\n ----------\n self: object\n ProtChSystem being referenced\n l_logging_info: list\n Contains the information to be logged. Structure is [body number, type]\n with multiple entries being included as a 2d list. Valid types are\n 'position', 'rotation', 'force', and 'torque'.\n Returns\n -------\n None. Data is saved to an h5 file.\n ";
48096 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_47log_bodies_h5 = {"log_bodies_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_47log_bodies_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_46log_bodies_h5};
48097 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_47log_bodies_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_l_logging_info) {
48098  PyObject *__pyx_r = 0;
48099  __Pyx_RefNannyDeclarations
48100  __Pyx_RefNannySetupContext("log_bodies_h5 (wrapper)", 0);
48101  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_46log_bodies_h5(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_l_logging_info));
48102 
48103  /* function exit code */
48104  __Pyx_RefNannyFinishContext();
48105  return __pyx_r;
48106 }
48107 
48108 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_46log_bodies_h5(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_l_logging_info) {
48109  PyObject *__pyx_v_o_file = NULL;
48110  PyObject *__pyx_v_l_position = NULL;
48111  PyObject *__pyx_v_l_rotation = NULL;
48112  PyObject *__pyx_v_l_force = NULL;
48113  PyObject *__pyx_v_l_torque = NULL;
48114  Py_ssize_t __pyx_v_i_entry_body;
48115  PyObject *__pyx_v_o_body = NULL;
48116  PyObject *__pyx_v_o_body_position = NULL;
48117  PyObject *__pyx_v_o_body_rotation = NULL;
48118  PyObject *__pyx_v_o_body_force = NULL;
48119  PyObject *__pyx_v_o_body_torque = NULL;
48120  PyObject *__pyx_v_dm_position = NULL;
48121  PyObject *__pyx_v_i_index = NULL;
48122  PyObject *__pyx_v_dm_rotation = NULL;
48123  PyObject *__pyx_v_dm_force = NULL;
48124  PyObject *__pyx_v_dm_torque = NULL;
48125  PyObject *__pyx_r = NULL;
48126  __Pyx_TraceDeclarations
48127  __Pyx_RefNannyDeclarations
48128  PyObject *__pyx_t_1 = NULL;
48129  PyObject *__pyx_t_2 = NULL;
48130  PyObject *__pyx_t_3 = NULL;
48131  Py_ssize_t __pyx_t_4;
48132  Py_ssize_t __pyx_t_5;
48133  Py_ssize_t __pyx_t_6;
48134  int __pyx_t_7;
48135  PyObject *__pyx_t_8 = NULL;
48136  int __pyx_t_9;
48137  PyObject *__pyx_t_10 = NULL;
48138  PyObject *__pyx_t_11 = NULL;
48139  PyObject *__pyx_t_12 = NULL;
48140  PyObject *__pyx_t_13 = NULL;
48141  PyObject *__pyx_t_14 = NULL;
48142  PyObject *__pyx_t_15 = NULL;
48143  PyObject *__pyx_t_16 = NULL;
48144  int __pyx_lineno = 0;
48145  const char *__pyx_filename = NULL;
48146  int __pyx_clineno = 0;
48147  __Pyx_TraceFrameInit(__pyx_codeobj__128)
48148  __Pyx_RefNannySetupContext("log_bodies_h5", 0);
48149  __Pyx_TraceCall("log_bodies_h5", __pyx_f[0], 1972, 0, __PYX_ERR(0, 1972, __pyx_L1_error));
48150 
48151  /* "mbd/CouplingFSI.pyx":1989
48152  *
48153  * # Open the log file
48154  * o_file = h5py.File('chrono_log.h5') # <<<<<<<<<<<<<<
48155  *
48156  * # Create the empty data holders
48157  */
48158  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_h5py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1989, __pyx_L1_error)
48159  __Pyx_GOTREF(__pyx_t_2);
48160  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_File); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1989, __pyx_L1_error)
48161  __Pyx_GOTREF(__pyx_t_3);
48162  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
48163  __pyx_t_2 = NULL;
48164  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
48165  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
48166  if (likely(__pyx_t_2)) {
48167  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
48168  __Pyx_INCREF(__pyx_t_2);
48169  __Pyx_INCREF(function);
48170  __Pyx_DECREF_SET(__pyx_t_3, function);
48171  }
48172  }
48173  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_chrono_log_h5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_chrono_log_h5);
48174  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
48175  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1989, __pyx_L1_error)
48176  __Pyx_GOTREF(__pyx_t_1);
48177  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48178  __pyx_v_o_file = __pyx_t_1;
48179  __pyx_t_1 = 0;
48180 
48181  /* "mbd/CouplingFSI.pyx":1992
48182  *
48183  * # Create the empty data holders
48184  * l_position = [] # <<<<<<<<<<<<<<
48185  * l_rotation = []
48186  * l_force = []
48187  */
48188  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error)
48189  __Pyx_GOTREF(__pyx_t_1);
48190  __pyx_v_l_position = ((PyObject*)__pyx_t_1);
48191  __pyx_t_1 = 0;
48192 
48193  /* "mbd/CouplingFSI.pyx":1993
48194  * # Create the empty data holders
48195  * l_position = []
48196  * l_rotation = [] # <<<<<<<<<<<<<<
48197  * l_force = []
48198  * l_torque = []
48199  */
48200  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1993, __pyx_L1_error)
48201  __Pyx_GOTREF(__pyx_t_1);
48202  __pyx_v_l_rotation = ((PyObject*)__pyx_t_1);
48203  __pyx_t_1 = 0;
48204 
48205  /* "mbd/CouplingFSI.pyx":1994
48206  * l_position = []
48207  * l_rotation = []
48208  * l_force = [] # <<<<<<<<<<<<<<
48209  * l_torque = []
48210  *
48211  */
48212  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error)
48213  __Pyx_GOTREF(__pyx_t_1);
48214  __pyx_v_l_force = ((PyObject*)__pyx_t_1);
48215  __pyx_t_1 = 0;
48216 
48217  /* "mbd/CouplingFSI.pyx":1995
48218  * l_rotation = []
48219  * l_force = []
48220  * l_torque = [] # <<<<<<<<<<<<<<
48221  *
48222  * # Loop and write the body information
48223  */
48224  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
48225  __Pyx_GOTREF(__pyx_t_1);
48226  __pyx_v_l_torque = ((PyObject*)__pyx_t_1);
48227  __pyx_t_1 = 0;
48228 
48229  /* "mbd/CouplingFSI.pyx":1998
48230  *
48231  * # Loop and write the body information
48232  * for i_entry_body in range(0, len(l_logging_info), 1): # <<<<<<<<<<<<<<
48233  * # Extract the coordinate positions
48234  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody
48235  */
48236  __pyx_t_4 = PyObject_Length(__pyx_v_l_logging_info); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1998, __pyx_L1_error)
48237  __pyx_t_5 = __pyx_t_4;
48238  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
48239  __pyx_v_i_entry_body = __pyx_t_6;
48240 
48241  /* "mbd/CouplingFSI.pyx":2000
48242  * for i_entry_body in range(0, len(l_logging_info), 1):
48243  * # Extract the coordinate positions
48244  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody # <<<<<<<<<<<<<<
48245  *
48246  * if l_logging_info[i_entry_body][1] == 'position':
48247  */
48248  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2000, __pyx_L1_error)
48249  __Pyx_GOTREF(__pyx_t_1);
48250  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __pyx_L1_error)
48251  __Pyx_GOTREF(__pyx_t_3);
48252  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48253  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->subcomponents, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2000, __pyx_L1_error)
48254  __Pyx_GOTREF(__pyx_t_1);
48255  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48256  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ChBody); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __pyx_L1_error)
48257  __Pyx_GOTREF(__pyx_t_3);
48258  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48259  __Pyx_XDECREF_SET(__pyx_v_o_body, __pyx_t_3);
48260  __pyx_t_3 = 0;
48261 
48262  /* "mbd/CouplingFSI.pyx":2002
48263  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody
48264  *
48265  * if l_logging_info[i_entry_body][1] == 'position': # <<<<<<<<<<<<<<
48266  * o_body_position = o_body.GetPos()
48267  * l_position.append([o_body_position.x, o_body_position.y, o_body_position.z])
48268  */
48269  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2002, __pyx_L1_error)
48270  __Pyx_GOTREF(__pyx_t_3);
48271  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2002, __pyx_L1_error)
48272  __Pyx_GOTREF(__pyx_t_1);
48273  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48274  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_position, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2002, __pyx_L1_error)
48275  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48276  if (__pyx_t_7) {
48277 
48278  /* "mbd/CouplingFSI.pyx":2003
48279  *
48280  * if l_logging_info[i_entry_body][1] == 'position':
48281  * o_body_position = o_body.GetPos() # <<<<<<<<<<<<<<
48282  * l_position.append([o_body_position.x, o_body_position.y, o_body_position.z])
48283  *
48284  */
48285  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_GetPos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2003, __pyx_L1_error)
48286  __Pyx_GOTREF(__pyx_t_3);
48287  __pyx_t_2 = NULL;
48288  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
48289  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
48290  if (likely(__pyx_t_2)) {
48291  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
48292  __Pyx_INCREF(__pyx_t_2);
48293  __Pyx_INCREF(function);
48294  __Pyx_DECREF_SET(__pyx_t_3, function);
48295  }
48296  }
48297  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
48298  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
48299  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2003, __pyx_L1_error)
48300  __Pyx_GOTREF(__pyx_t_1);
48301  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48302  __Pyx_XDECREF_SET(__pyx_v_o_body_position, __pyx_t_1);
48303  __pyx_t_1 = 0;
48304 
48305  /* "mbd/CouplingFSI.pyx":2004
48306  * if l_logging_info[i_entry_body][1] == 'position':
48307  * o_body_position = o_body.GetPos()
48308  * l_position.append([o_body_position.x, o_body_position.y, o_body_position.z]) # <<<<<<<<<<<<<<
48309  *
48310  * elif l_logging_info[i_entry_body][1] == 'rotation':
48311  */
48312  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_position, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2004, __pyx_L1_error)
48313  __Pyx_GOTREF(__pyx_t_1);
48314  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_position, __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2004, __pyx_L1_error)
48315  __Pyx_GOTREF(__pyx_t_3);
48316  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_position, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __pyx_L1_error)
48317  __Pyx_GOTREF(__pyx_t_2);
48318  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2004, __pyx_L1_error)
48319  __Pyx_GOTREF(__pyx_t_8);
48320  __Pyx_GIVEREF(__pyx_t_1);
48321  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
48322  __Pyx_GIVEREF(__pyx_t_3);
48323  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
48324  __Pyx_GIVEREF(__pyx_t_2);
48325  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_2);
48326  __pyx_t_1 = 0;
48327  __pyx_t_3 = 0;
48328  __pyx_t_2 = 0;
48329  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_l_position, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2004, __pyx_L1_error)
48330  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48331 
48332  /* "mbd/CouplingFSI.pyx":2002
48333  * o_body = self.subcomponents[l_logging_info[i_entry_body][0]].ChBody
48334  *
48335  * if l_logging_info[i_entry_body][1] == 'position': # <<<<<<<<<<<<<<
48336  * o_body_position = o_body.GetPos()
48337  * l_position.append([o_body_position.x, o_body_position.y, o_body_position.z])
48338  */
48339  goto __pyx_L5;
48340  }
48341 
48342  /* "mbd/CouplingFSI.pyx":2006
48343  * l_position.append([o_body_position.x, o_body_position.y, o_body_position.z])
48344  *
48345  * elif l_logging_info[i_entry_body][1] == 'rotation': # <<<<<<<<<<<<<<
48346  * o_body_rotation = o_body.GetRot()
48347  * l_rotation.append([o_body_rotation.e0, o_body_rotation.e1, o_body_rotation.e2, o_body_rotation.e3])
48348  */
48349  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2006, __pyx_L1_error)
48350  __Pyx_GOTREF(__pyx_t_8);
48351  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2006, __pyx_L1_error)
48352  __Pyx_GOTREF(__pyx_t_2);
48353  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48354  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_n_s_rotation, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2006, __pyx_L1_error)
48355  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
48356  if (__pyx_t_7) {
48357 
48358  /* "mbd/CouplingFSI.pyx":2007
48359  *
48360  * elif l_logging_info[i_entry_body][1] == 'rotation':
48361  * o_body_rotation = o_body.GetRot() # <<<<<<<<<<<<<<
48362  * l_rotation.append([o_body_rotation.e0, o_body_rotation.e1, o_body_rotation.e2, o_body_rotation.e3])
48363  *
48364  */
48365  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_GetRot); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2007, __pyx_L1_error)
48366  __Pyx_GOTREF(__pyx_t_8);
48367  __pyx_t_3 = NULL;
48368  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
48369  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
48370  if (likely(__pyx_t_3)) {
48371  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
48372  __Pyx_INCREF(__pyx_t_3);
48373  __Pyx_INCREF(function);
48374  __Pyx_DECREF_SET(__pyx_t_8, function);
48375  }
48376  }
48377  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
48378  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
48379  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2007, __pyx_L1_error)
48380  __Pyx_GOTREF(__pyx_t_2);
48381  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48382  __Pyx_XDECREF_SET(__pyx_v_o_body_rotation, __pyx_t_2);
48383  __pyx_t_2 = 0;
48384 
48385  /* "mbd/CouplingFSI.pyx":2008
48386  * elif l_logging_info[i_entry_body][1] == 'rotation':
48387  * o_body_rotation = o_body.GetRot()
48388  * l_rotation.append([o_body_rotation.e0, o_body_rotation.e1, o_body_rotation.e2, o_body_rotation.e3]) # <<<<<<<<<<<<<<
48389  *
48390  * elif l_logging_info[i_entry_body][1] == 'force':
48391  */
48392  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __pyx_L1_error)
48393  __Pyx_GOTREF(__pyx_t_2);
48394  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2008, __pyx_L1_error)
48395  __Pyx_GOTREF(__pyx_t_8);
48396  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2008, __pyx_L1_error)
48397  __Pyx_GOTREF(__pyx_t_3);
48398  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_rotation, __pyx_n_s_e3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2008, __pyx_L1_error)
48399  __Pyx_GOTREF(__pyx_t_1);
48400  __pyx_t_10 = PyList_New(4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2008, __pyx_L1_error)
48401  __Pyx_GOTREF(__pyx_t_10);
48402  __Pyx_GIVEREF(__pyx_t_2);
48403  PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_2);
48404  __Pyx_GIVEREF(__pyx_t_8);
48405  PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
48406  __Pyx_GIVEREF(__pyx_t_3);
48407  PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_3);
48408  __Pyx_GIVEREF(__pyx_t_1);
48409  PyList_SET_ITEM(__pyx_t_10, 3, __pyx_t_1);
48410  __pyx_t_2 = 0;
48411  __pyx_t_8 = 0;
48412  __pyx_t_3 = 0;
48413  __pyx_t_1 = 0;
48414  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_l_rotation, __pyx_t_10); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2008, __pyx_L1_error)
48415  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
48416 
48417  /* "mbd/CouplingFSI.pyx":2006
48418  * l_position.append([o_body_position.x, o_body_position.y, o_body_position.z])
48419  *
48420  * elif l_logging_info[i_entry_body][1] == 'rotation': # <<<<<<<<<<<<<<
48421  * o_body_rotation = o_body.GetRot()
48422  * l_rotation.append([o_body_rotation.e0, o_body_rotation.e1, o_body_rotation.e2, o_body_rotation.e3])
48423  */
48424  goto __pyx_L5;
48425  }
48426 
48427  /* "mbd/CouplingFSI.pyx":2010
48428  * l_rotation.append([o_body_rotation.e0, o_body_rotation.e1, o_body_rotation.e2, o_body_rotation.e3])
48429  *
48430  * elif l_logging_info[i_entry_body][1] == 'force': # <<<<<<<<<<<<<<
48431  * o_body_force = o_body.Get_XForce()
48432  * l_force.append([o_body_force.x, o_body_force.y, o_body_force.z])
48433  */
48434  __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2010, __pyx_L1_error)
48435  __Pyx_GOTREF(__pyx_t_10);
48436  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_10, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2010, __pyx_L1_error)
48437  __Pyx_GOTREF(__pyx_t_1);
48438  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
48439  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_force, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2010, __pyx_L1_error)
48440  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48441  if (__pyx_t_7) {
48442 
48443  /* "mbd/CouplingFSI.pyx":2011
48444  *
48445  * elif l_logging_info[i_entry_body][1] == 'force':
48446  * o_body_force = o_body.Get_XForce() # <<<<<<<<<<<<<<
48447  * l_force.append([o_body_force.x, o_body_force.y, o_body_force.z])
48448  *
48449  */
48450  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_Get_XForce); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2011, __pyx_L1_error)
48451  __Pyx_GOTREF(__pyx_t_10);
48452  __pyx_t_3 = NULL;
48453  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
48454  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
48455  if (likely(__pyx_t_3)) {
48456  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
48457  __Pyx_INCREF(__pyx_t_3);
48458  __Pyx_INCREF(function);
48459  __Pyx_DECREF_SET(__pyx_t_10, function);
48460  }
48461  }
48462  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_10);
48463  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
48464  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2011, __pyx_L1_error)
48465  __Pyx_GOTREF(__pyx_t_1);
48466  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
48467  __Pyx_XDECREF_SET(__pyx_v_o_body_force, __pyx_t_1);
48468  __pyx_t_1 = 0;
48469 
48470  /* "mbd/CouplingFSI.pyx":2012
48471  * elif l_logging_info[i_entry_body][1] == 'force':
48472  * o_body_force = o_body.Get_XForce()
48473  * l_force.append([o_body_force.x, o_body_force.y, o_body_force.z]) # <<<<<<<<<<<<<<
48474  *
48475  * elif l_logging_info[i_entry_body][1] == 'torque':
48476  */
48477  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_force, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L1_error)
48478  __Pyx_GOTREF(__pyx_t_1);
48479  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_force, __pyx_n_s_y); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2012, __pyx_L1_error)
48480  __Pyx_GOTREF(__pyx_t_10);
48481  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_force, __pyx_n_s_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2012, __pyx_L1_error)
48482  __Pyx_GOTREF(__pyx_t_3);
48483  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2012, __pyx_L1_error)
48484  __Pyx_GOTREF(__pyx_t_8);
48485  __Pyx_GIVEREF(__pyx_t_1);
48486  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
48487  __Pyx_GIVEREF(__pyx_t_10);
48488  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_10);
48489  __Pyx_GIVEREF(__pyx_t_3);
48490  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
48491  __pyx_t_1 = 0;
48492  __pyx_t_10 = 0;
48493  __pyx_t_3 = 0;
48494  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_l_force, __pyx_t_8); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2012, __pyx_L1_error)
48495  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48496 
48497  /* "mbd/CouplingFSI.pyx":2010
48498  * l_rotation.append([o_body_rotation.e0, o_body_rotation.e1, o_body_rotation.e2, o_body_rotation.e3])
48499  *
48500  * elif l_logging_info[i_entry_body][1] == 'force': # <<<<<<<<<<<<<<
48501  * o_body_force = o_body.Get_XForce()
48502  * l_force.append([o_body_force.x, o_body_force.y, o_body_force.z])
48503  */
48504  goto __pyx_L5;
48505  }
48506 
48507  /* "mbd/CouplingFSI.pyx":2014
48508  * l_force.append([o_body_force.x, o_body_force.y, o_body_force.z])
48509  *
48510  * elif l_logging_info[i_entry_body][1] == 'torque': # <<<<<<<<<<<<<<
48511  * o_body_torque = o_body.Get_Xtorque()
48512  * l_torque.append([o_body_torque.x, o_body_torque.y, o_body_torque.z])
48513  */
48514  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_l_logging_info, __pyx_v_i_entry_body, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2014, __pyx_L1_error)
48515  __Pyx_GOTREF(__pyx_t_8);
48516  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L1_error)
48517  __Pyx_GOTREF(__pyx_t_3);
48518  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48519  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_torque, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2014, __pyx_L1_error)
48520  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48521  if (likely(__pyx_t_7)) {
48522 
48523  /* "mbd/CouplingFSI.pyx":2015
48524  *
48525  * elif l_logging_info[i_entry_body][1] == 'torque':
48526  * o_body_torque = o_body.Get_Xtorque() # <<<<<<<<<<<<<<
48527  * l_torque.append([o_body_torque.x, o_body_torque.y, o_body_torque.z])
48528  *
48529  */
48530  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body, __pyx_n_s_Get_Xtorque); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2015, __pyx_L1_error)
48531  __Pyx_GOTREF(__pyx_t_8);
48532  __pyx_t_10 = NULL;
48533  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
48534  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
48535  if (likely(__pyx_t_10)) {
48536  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
48537  __Pyx_INCREF(__pyx_t_10);
48538  __Pyx_INCREF(function);
48539  __Pyx_DECREF_SET(__pyx_t_8, function);
48540  }
48541  }
48542  __pyx_t_3 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
48543  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
48544  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2015, __pyx_L1_error)
48545  __Pyx_GOTREF(__pyx_t_3);
48546  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48547  __Pyx_XDECREF_SET(__pyx_v_o_body_torque, __pyx_t_3);
48548  __pyx_t_3 = 0;
48549 
48550  /* "mbd/CouplingFSI.pyx":2016
48551  * elif l_logging_info[i_entry_body][1] == 'torque':
48552  * o_body_torque = o_body.Get_Xtorque()
48553  * l_torque.append([o_body_torque.x, o_body_torque.y, o_body_torque.z]) # <<<<<<<<<<<<<<
48554  *
48555  * else:
48556  */
48557  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_torque, __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2016, __pyx_L1_error)
48558  __Pyx_GOTREF(__pyx_t_3);
48559  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_torque, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2016, __pyx_L1_error)
48560  __Pyx_GOTREF(__pyx_t_8);
48561  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_body_torque, __pyx_n_s_z); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2016, __pyx_L1_error)
48562  __Pyx_GOTREF(__pyx_t_10);
48563  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2016, __pyx_L1_error)
48564  __Pyx_GOTREF(__pyx_t_1);
48565  __Pyx_GIVEREF(__pyx_t_3);
48566  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
48567  __Pyx_GIVEREF(__pyx_t_8);
48568  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_8);
48569  __Pyx_GIVEREF(__pyx_t_10);
48570  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_10);
48571  __pyx_t_3 = 0;
48572  __pyx_t_8 = 0;
48573  __pyx_t_10 = 0;
48574  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_l_torque, __pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2016, __pyx_L1_error)
48575  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48576 
48577  /* "mbd/CouplingFSI.pyx":2014
48578  * l_force.append([o_body_force.x, o_body_force.y, o_body_force.z])
48579  *
48580  * elif l_logging_info[i_entry_body][1] == 'torque': # <<<<<<<<<<<<<<
48581  * o_body_torque = o_body.Get_Xtorque()
48582  * l_torque.append([o_body_torque.x, o_body_torque.y, o_body_torque.z])
48583  */
48584  goto __pyx_L5;
48585  }
48586 
48587  /* "mbd/CouplingFSI.pyx":2019
48588  *
48589  * else:
48590  * raise NotImplementedError('Chrono body log not understood.') # <<<<<<<<<<<<<<
48591  *
48592  * # Log the position data
48593  */
48594  /*else*/ {
48595  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_tuple__127, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
48596  __Pyx_GOTREF(__pyx_t_1);
48597  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
48598  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48599  __PYX_ERR(0, 2019, __pyx_L1_error)
48600  }
48601  __pyx_L5:;
48602  }
48603 
48604  /* "mbd/CouplingFSI.pyx":2022
48605  *
48606  * # Log the position data
48607  * if len(l_position) > 0: # <<<<<<<<<<<<<<
48608  * # Check if the dataset exists
48609  * try:
48610  */
48611  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_position); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2022, __pyx_L1_error)
48612  __pyx_t_7 = ((__pyx_t_4 > 0) != 0);
48613  if (__pyx_t_7) {
48614 
48615  /* "mbd/CouplingFSI.pyx":2024
48616  * if len(l_position) > 0:
48617  * # Check if the dataset exists
48618  * try: # <<<<<<<<<<<<<<
48619  * # Open the dataset
48620  * dm_position = o_file['position']
48621  */
48622  {
48623  __Pyx_PyThreadState_declare
48624  __Pyx_PyThreadState_assign
48625  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
48626  __Pyx_XGOTREF(__pyx_t_11);
48627  __Pyx_XGOTREF(__pyx_t_12);
48628  __Pyx_XGOTREF(__pyx_t_13);
48629  /*try:*/ {
48630 
48631  /* "mbd/CouplingFSI.pyx":2026
48632  * try:
48633  * # Open the dataset
48634  * dm_position = o_file['position'] # <<<<<<<<<<<<<<
48635  *
48636  * # Resize the dataset
48637  */
48638  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_o_file, __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2026, __pyx_L7_error)
48639  __Pyx_GOTREF(__pyx_t_1);
48640  __pyx_v_dm_position = __pyx_t_1;
48641  __pyx_t_1 = 0;
48642 
48643  /* "mbd/CouplingFSI.pyx":2029
48644  *
48645  * # Resize the dataset
48646  * i_index = dm_position.shape[0] # <<<<<<<<<<<<<<
48647  * dm_position.resize(dm_position.shape[0] + 1, axis=0)
48648  *
48649  */
48650  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_position, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2029, __pyx_L7_error)
48651  __Pyx_GOTREF(__pyx_t_1);
48652  __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2029, __pyx_L7_error)
48653  __Pyx_GOTREF(__pyx_t_10);
48654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48655  __pyx_v_i_index = __pyx_t_10;
48656  __pyx_t_10 = 0;
48657 
48658  /* "mbd/CouplingFSI.pyx":2030
48659  * # Resize the dataset
48660  * i_index = dm_position.shape[0]
48661  * dm_position.resize(dm_position.shape[0] + 1, axis=0) # <<<<<<<<<<<<<<
48662  *
48663  * # Store the values into the dataset
48664  */
48665  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_position, __pyx_n_s_resize); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2030, __pyx_L7_error)
48666  __Pyx_GOTREF(__pyx_t_10);
48667  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_position, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2030, __pyx_L7_error)
48668  __Pyx_GOTREF(__pyx_t_1);
48669  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2030, __pyx_L7_error)
48670  __Pyx_GOTREF(__pyx_t_8);
48671  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48672  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2030, __pyx_L7_error)
48673  __Pyx_GOTREF(__pyx_t_1);
48674  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48675  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2030, __pyx_L7_error)
48676  __Pyx_GOTREF(__pyx_t_8);
48677  __Pyx_GIVEREF(__pyx_t_1);
48678  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
48679  __pyx_t_1 = 0;
48680  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2030, __pyx_L7_error)
48681  __Pyx_GOTREF(__pyx_t_1);
48682  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2030, __pyx_L7_error)
48683  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2030, __pyx_L7_error)
48684  __Pyx_GOTREF(__pyx_t_3);
48685  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
48686  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48687  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48689 
48690  /* "mbd/CouplingFSI.pyx":2033
48691  *
48692  * # Store the values into the dataset
48693  * dm_position[i_index, :, :] = np.array(l_position) # <<<<<<<<<<<<<<
48694  *
48695  * except:
48696  */
48697  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2033, __pyx_L7_error)
48698  __Pyx_GOTREF(__pyx_t_1);
48699  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2033, __pyx_L7_error)
48700  __Pyx_GOTREF(__pyx_t_8);
48701  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48702  __pyx_t_1 = NULL;
48703  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
48704  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
48705  if (likely(__pyx_t_1)) {
48706  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
48707  __Pyx_INCREF(__pyx_t_1);
48708  __Pyx_INCREF(function);
48709  __Pyx_DECREF_SET(__pyx_t_8, function);
48710  }
48711  }
48712  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_1, __pyx_v_l_position) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_l_position);
48713  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
48714  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L7_error)
48715  __Pyx_GOTREF(__pyx_t_3);
48716  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48717  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2033, __pyx_L7_error)
48718  __Pyx_GOTREF(__pyx_t_8);
48719  __Pyx_INCREF(__pyx_v_i_index);
48720  __Pyx_GIVEREF(__pyx_v_i_index);
48721  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_i_index);
48722  __Pyx_INCREF(__pyx_slice__30);
48723  __Pyx_GIVEREF(__pyx_slice__30);
48724  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__30);
48725  __Pyx_INCREF(__pyx_slice__30);
48726  __Pyx_GIVEREF(__pyx_slice__30);
48727  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_slice__30);
48728  if (unlikely(PyObject_SetItem(__pyx_v_dm_position, __pyx_t_8, __pyx_t_3) < 0)) __PYX_ERR(0, 2033, __pyx_L7_error)
48729  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48730  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48731 
48732  /* "mbd/CouplingFSI.pyx":2024
48733  * if len(l_position) > 0:
48734  * # Check if the dataset exists
48735  * try: # <<<<<<<<<<<<<<
48736  * # Open the dataset
48737  * dm_position = o_file['position']
48738  */
48739  }
48740  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
48741  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
48742  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
48743  goto __pyx_L12_try_end;
48744  __pyx_L7_error:;
48745  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
48746  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
48747  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
48748  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
48749  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
48750 
48751  /* "mbd/CouplingFSI.pyx":2035
48752  * dm_position[i_index, :, :] = np.array(l_position)
48753  *
48754  * except: # <<<<<<<<<<<<<<
48755  * # Create the initial dataset
48756  * dm_position = o_file.create_dataset('position', (1, len(l_position), 3), compression="gzip",
48757  */
48758  /*except:*/ {
48759  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_bodies_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
48760  if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_8, &__pyx_t_1) < 0) __PYX_ERR(0, 2035, __pyx_L9_except_error)
48761  __Pyx_GOTREF(__pyx_t_3);
48762  __Pyx_GOTREF(__pyx_t_8);
48763  __Pyx_GOTREF(__pyx_t_1);
48764 
48765  /* "mbd/CouplingFSI.pyx":2037
48766  * except:
48767  * # Create the initial dataset
48768  * dm_position = o_file.create_dataset('position', (1, len(l_position), 3), compression="gzip", # <<<<<<<<<<<<<<
48769  * maxshape=(None, len(l_position), 3), dtype=float)
48770  *
48771  */
48772  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48773  __Pyx_GOTREF(__pyx_t_10);
48774  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_position); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48775  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48776  __Pyx_GOTREF(__pyx_t_2);
48777  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48778  __Pyx_GOTREF(__pyx_t_14);
48779  __Pyx_INCREF(__pyx_int_1);
48780  __Pyx_GIVEREF(__pyx_int_1);
48781  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_int_1);
48782  __Pyx_GIVEREF(__pyx_t_2);
48783  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_2);
48784  __Pyx_INCREF(__pyx_int_3);
48785  __Pyx_GIVEREF(__pyx_int_3);
48786  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_int_3);
48787  __pyx_t_2 = 0;
48788  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48789  __Pyx_GOTREF(__pyx_t_2);
48790  __Pyx_INCREF(__pyx_n_s_position);
48791  __Pyx_GIVEREF(__pyx_n_s_position);
48792  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_position);
48793  __Pyx_GIVEREF(__pyx_t_14);
48794  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
48795  __pyx_t_14 = 0;
48796  __pyx_t_14 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48797  __Pyx_GOTREF(__pyx_t_14);
48798  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_compression, __pyx_n_s_gzip) < 0) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48799 
48800  /* "mbd/CouplingFSI.pyx":2038
48801  * # Create the initial dataset
48802  * dm_position = o_file.create_dataset('position', (1, len(l_position), 3), compression="gzip",
48803  * maxshape=(None, len(l_position), 3), dtype=float) # <<<<<<<<<<<<<<
48804  *
48805  * # Store the first entry into the dataset
48806  */
48807  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_position); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2038, __pyx_L9_except_error)
48808  __pyx_t_15 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2038, __pyx_L9_except_error)
48809  __Pyx_GOTREF(__pyx_t_15);
48810  __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2038, __pyx_L9_except_error)
48811  __Pyx_GOTREF(__pyx_t_16);
48812  __Pyx_INCREF(Py_None);
48813  __Pyx_GIVEREF(Py_None);
48814  PyTuple_SET_ITEM(__pyx_t_16, 0, Py_None);
48815  __Pyx_GIVEREF(__pyx_t_15);
48816  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_15);
48817  __Pyx_INCREF(__pyx_int_3);
48818  __Pyx_GIVEREF(__pyx_int_3);
48819  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_int_3);
48820  __pyx_t_15 = 0;
48821  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_maxshape, __pyx_t_16) < 0) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48822  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
48823  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48824 
48825  /* "mbd/CouplingFSI.pyx":2037
48826  * except:
48827  * # Create the initial dataset
48828  * dm_position = o_file.create_dataset('position', (1, len(l_position), 3), compression="gzip", # <<<<<<<<<<<<<<
48829  * maxshape=(None, len(l_position), 3), dtype=float)
48830  *
48831  */
48832  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2037, __pyx_L9_except_error)
48833  __Pyx_GOTREF(__pyx_t_16);
48834  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
48835  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
48836  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
48837  __Pyx_XDECREF_SET(__pyx_v_dm_position, __pyx_t_16);
48838  __pyx_t_16 = 0;
48839 
48840  /* "mbd/CouplingFSI.pyx":2041
48841  *
48842  * # Store the first entry into the dataset
48843  * dm_position[0, :, :] = np.array(l_position) # <<<<<<<<<<<<<<
48844  *
48845  * # Log the rotation data
48846  */
48847  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2041, __pyx_L9_except_error)
48848  __Pyx_GOTREF(__pyx_t_14);
48849  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2041, __pyx_L9_except_error)
48850  __Pyx_GOTREF(__pyx_t_2);
48851  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
48852  __pyx_t_14 = NULL;
48853  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
48854  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
48855  if (likely(__pyx_t_14)) {
48856  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
48857  __Pyx_INCREF(__pyx_t_14);
48858  __Pyx_INCREF(function);
48859  __Pyx_DECREF_SET(__pyx_t_2, function);
48860  }
48861  }
48862  __pyx_t_16 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_v_l_position) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_l_position);
48863  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
48864  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2041, __pyx_L9_except_error)
48865  __Pyx_GOTREF(__pyx_t_16);
48866  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
48867  if (unlikely(PyObject_SetItem(__pyx_v_dm_position, __pyx_tuple__129, __pyx_t_16) < 0)) __PYX_ERR(0, 2041, __pyx_L9_except_error)
48868  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
48869  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
48870  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
48871  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
48872  goto __pyx_L8_exception_handled;
48873  }
48874  __pyx_L9_except_error:;
48875 
48876  /* "mbd/CouplingFSI.pyx":2024
48877  * if len(l_position) > 0:
48878  * # Check if the dataset exists
48879  * try: # <<<<<<<<<<<<<<
48880  * # Open the dataset
48881  * dm_position = o_file['position']
48882  */
48883  __Pyx_XGIVEREF(__pyx_t_11);
48884  __Pyx_XGIVEREF(__pyx_t_12);
48885  __Pyx_XGIVEREF(__pyx_t_13);
48886  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
48887  goto __pyx_L1_error;
48888  __pyx_L8_exception_handled:;
48889  __Pyx_XGIVEREF(__pyx_t_11);
48890  __Pyx_XGIVEREF(__pyx_t_12);
48891  __Pyx_XGIVEREF(__pyx_t_13);
48892  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
48893  __pyx_L12_try_end:;
48894  }
48895 
48896  /* "mbd/CouplingFSI.pyx":2022
48897  *
48898  * # Log the position data
48899  * if len(l_position) > 0: # <<<<<<<<<<<<<<
48900  * # Check if the dataset exists
48901  * try:
48902  */
48903  }
48904 
48905  /* "mbd/CouplingFSI.pyx":2044
48906  *
48907  * # Log the rotation data
48908  * if len(l_rotation) > 0: # <<<<<<<<<<<<<<
48909  * # Check if the dataset exists
48910  * try:
48911  */
48912  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_rotation); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2044, __pyx_L1_error)
48913  __pyx_t_7 = ((__pyx_t_4 > 0) != 0);
48914  if (__pyx_t_7) {
48915 
48916  /* "mbd/CouplingFSI.pyx":2046
48917  * if len(l_rotation) > 0:
48918  * # Check if the dataset exists
48919  * try: # <<<<<<<<<<<<<<
48920  * # Open the dataset
48921  * dm_rotation = o_file['rotation']
48922  */
48923  {
48924  __Pyx_PyThreadState_declare
48925  __Pyx_PyThreadState_assign
48926  __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
48927  __Pyx_XGOTREF(__pyx_t_13);
48928  __Pyx_XGOTREF(__pyx_t_12);
48929  __Pyx_XGOTREF(__pyx_t_11);
48930  /*try:*/ {
48931 
48932  /* "mbd/CouplingFSI.pyx":2048
48933  * try:
48934  * # Open the dataset
48935  * dm_rotation = o_file['rotation'] # <<<<<<<<<<<<<<
48936  *
48937  * # Resize the dataset
48938  */
48939  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_o_file, __pyx_n_s_rotation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2048, __pyx_L16_error)
48940  __Pyx_GOTREF(__pyx_t_1);
48941  __pyx_v_dm_rotation = __pyx_t_1;
48942  __pyx_t_1 = 0;
48943 
48944  /* "mbd/CouplingFSI.pyx":2051
48945  *
48946  * # Resize the dataset
48947  * i_index = dm_rotation.shape[0] # <<<<<<<<<<<<<<
48948  * dm_rotation.resize(dm_rotation.shape[0] + 1, axis=0)
48949  *
48950  */
48951  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_rotation, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2051, __pyx_L16_error)
48952  __Pyx_GOTREF(__pyx_t_1);
48953  __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2051, __pyx_L16_error)
48954  __Pyx_GOTREF(__pyx_t_8);
48955  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48956  __Pyx_XDECREF_SET(__pyx_v_i_index, __pyx_t_8);
48957  __pyx_t_8 = 0;
48958 
48959  /* "mbd/CouplingFSI.pyx":2052
48960  * # Resize the dataset
48961  * i_index = dm_rotation.shape[0]
48962  * dm_rotation.resize(dm_rotation.shape[0] + 1, axis=0) # <<<<<<<<<<<<<<
48963  *
48964  * # Store the values into the dataset
48965  */
48966  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_rotation, __pyx_n_s_resize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2052, __pyx_L16_error)
48967  __Pyx_GOTREF(__pyx_t_8);
48968  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_rotation, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2052, __pyx_L16_error)
48969  __Pyx_GOTREF(__pyx_t_1);
48970  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L16_error)
48971  __Pyx_GOTREF(__pyx_t_3);
48972  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48973  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2052, __pyx_L16_error)
48974  __Pyx_GOTREF(__pyx_t_1);
48975  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48976  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2052, __pyx_L16_error)
48977  __Pyx_GOTREF(__pyx_t_3);
48978  __Pyx_GIVEREF(__pyx_t_1);
48979  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
48980  __pyx_t_1 = 0;
48981  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2052, __pyx_L16_error)
48982  __Pyx_GOTREF(__pyx_t_1);
48983  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2052, __pyx_L16_error)
48984  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2052, __pyx_L16_error)
48985  __Pyx_GOTREF(__pyx_t_16);
48986  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
48987  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
48988  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
48989  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
48990 
48991  /* "mbd/CouplingFSI.pyx":2055
48992  *
48993  * # Store the values into the dataset
48994  * dm_rotation[i_index, :, :] = np.array(l_rotation) # <<<<<<<<<<<<<<
48995  *
48996  * except:
48997  */
48998  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2055, __pyx_L16_error)
48999  __Pyx_GOTREF(__pyx_t_1);
49000  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L16_error)
49001  __Pyx_GOTREF(__pyx_t_3);
49002  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49003  __pyx_t_1 = NULL;
49004  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
49005  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
49006  if (likely(__pyx_t_1)) {
49007  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
49008  __Pyx_INCREF(__pyx_t_1);
49009  __Pyx_INCREF(function);
49010  __Pyx_DECREF_SET(__pyx_t_3, function);
49011  }
49012  }
49013  __pyx_t_16 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_l_rotation) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_l_rotation);
49014  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49015  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2055, __pyx_L16_error)
49016  __Pyx_GOTREF(__pyx_t_16);
49017  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
49018  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2055, __pyx_L16_error)
49019  __Pyx_GOTREF(__pyx_t_3);
49020  __Pyx_INCREF(__pyx_v_i_index);
49021  __Pyx_GIVEREF(__pyx_v_i_index);
49022  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i_index);
49023  __Pyx_INCREF(__pyx_slice__30);
49024  __Pyx_GIVEREF(__pyx_slice__30);
49025  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_slice__30);
49026  __Pyx_INCREF(__pyx_slice__30);
49027  __Pyx_GIVEREF(__pyx_slice__30);
49028  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_slice__30);
49029  if (unlikely(PyObject_SetItem(__pyx_v_dm_rotation, __pyx_t_3, __pyx_t_16) < 0)) __PYX_ERR(0, 2055, __pyx_L16_error)
49030  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
49031  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
49032 
49033  /* "mbd/CouplingFSI.pyx":2046
49034  * if len(l_rotation) > 0:
49035  * # Check if the dataset exists
49036  * try: # <<<<<<<<<<<<<<
49037  * # Open the dataset
49038  * dm_rotation = o_file['rotation']
49039  */
49040  }
49041  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
49042  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
49043  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
49044  goto __pyx_L21_try_end;
49045  __pyx_L16_error:;
49046  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49047  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
49048  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
49049  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
49050  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
49051  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
49052  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
49053  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
49054 
49055  /* "mbd/CouplingFSI.pyx":2057
49056  * dm_rotation[i_index, :, :] = np.array(l_rotation)
49057  *
49058  * except: # <<<<<<<<<<<<<<
49059  * # Create the initial dataset
49060  * dm_rotation = o_file.create_dataset('rotation', (1, len(l_rotation), 4), compression="gzip",
49061  */
49062  /*except:*/ {
49063  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_bodies_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
49064  if (__Pyx_GetException(&__pyx_t_16, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 2057, __pyx_L18_except_error)
49065  __Pyx_GOTREF(__pyx_t_16);
49066  __Pyx_GOTREF(__pyx_t_3);
49067  __Pyx_GOTREF(__pyx_t_1);
49068 
49069  /* "mbd/CouplingFSI.pyx":2059
49070  * except:
49071  * # Create the initial dataset
49072  * dm_rotation = o_file.create_dataset('rotation', (1, len(l_rotation), 4), compression="gzip", # <<<<<<<<<<<<<<
49073  * maxshape=(None, len(l_rotation), 4), dtype=float)
49074  *
49075  */
49076  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49077  __Pyx_GOTREF(__pyx_t_8);
49078  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_rotation); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49079  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49080  __Pyx_GOTREF(__pyx_t_2);
49081  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49082  __Pyx_GOTREF(__pyx_t_14);
49083  __Pyx_INCREF(__pyx_int_1);
49084  __Pyx_GIVEREF(__pyx_int_1);
49085  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_int_1);
49086  __Pyx_GIVEREF(__pyx_t_2);
49087  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_2);
49088  __Pyx_INCREF(__pyx_int_4);
49089  __Pyx_GIVEREF(__pyx_int_4);
49090  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_int_4);
49091  __pyx_t_2 = 0;
49092  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49093  __Pyx_GOTREF(__pyx_t_2);
49094  __Pyx_INCREF(__pyx_n_s_rotation);
49095  __Pyx_GIVEREF(__pyx_n_s_rotation);
49096  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_rotation);
49097  __Pyx_GIVEREF(__pyx_t_14);
49098  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
49099  __pyx_t_14 = 0;
49100  __pyx_t_14 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49101  __Pyx_GOTREF(__pyx_t_14);
49102  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_compression, __pyx_n_s_gzip) < 0) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49103 
49104  /* "mbd/CouplingFSI.pyx":2060
49105  * # Create the initial dataset
49106  * dm_rotation = o_file.create_dataset('rotation', (1, len(l_rotation), 4), compression="gzip",
49107  * maxshape=(None, len(l_rotation), 4), dtype=float) # <<<<<<<<<<<<<<
49108  *
49109  * # Store the first entry into the dataset
49110  */
49111  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_rotation); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2060, __pyx_L18_except_error)
49112  __pyx_t_10 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2060, __pyx_L18_except_error)
49113  __Pyx_GOTREF(__pyx_t_10);
49114  __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2060, __pyx_L18_except_error)
49115  __Pyx_GOTREF(__pyx_t_15);
49116  __Pyx_INCREF(Py_None);
49117  __Pyx_GIVEREF(Py_None);
49118  PyTuple_SET_ITEM(__pyx_t_15, 0, Py_None);
49119  __Pyx_GIVEREF(__pyx_t_10);
49120  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_10);
49121  __Pyx_INCREF(__pyx_int_4);
49122  __Pyx_GIVEREF(__pyx_int_4);
49123  PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_4);
49124  __pyx_t_10 = 0;
49125  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_maxshape, __pyx_t_15) < 0) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49126  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49127  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49128 
49129  /* "mbd/CouplingFSI.pyx":2059
49130  * except:
49131  * # Create the initial dataset
49132  * dm_rotation = o_file.create_dataset('rotation', (1, len(l_rotation), 4), compression="gzip", # <<<<<<<<<<<<<<
49133  * maxshape=(None, len(l_rotation), 4), dtype=float)
49134  *
49135  */
49136  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2059, __pyx_L18_except_error)
49137  __Pyx_GOTREF(__pyx_t_15);
49138  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
49139  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
49140  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
49141  __Pyx_XDECREF_SET(__pyx_v_dm_rotation, __pyx_t_15);
49142  __pyx_t_15 = 0;
49143 
49144  /* "mbd/CouplingFSI.pyx":2063
49145  *
49146  * # Store the first entry into the dataset
49147  * dm_rotation[0, :, :] = np.array(l_rotation) # <<<<<<<<<<<<<<
49148  *
49149  * # Log the force data
49150  */
49151  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2063, __pyx_L18_except_error)
49152  __Pyx_GOTREF(__pyx_t_14);
49153  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2063, __pyx_L18_except_error)
49154  __Pyx_GOTREF(__pyx_t_2);
49155  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
49156  __pyx_t_14 = NULL;
49157  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
49158  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
49159  if (likely(__pyx_t_14)) {
49160  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
49161  __Pyx_INCREF(__pyx_t_14);
49162  __Pyx_INCREF(function);
49163  __Pyx_DECREF_SET(__pyx_t_2, function);
49164  }
49165  }
49166  __pyx_t_15 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_v_l_rotation) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_l_rotation);
49167  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
49168  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2063, __pyx_L18_except_error)
49169  __Pyx_GOTREF(__pyx_t_15);
49170  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
49171  if (unlikely(PyObject_SetItem(__pyx_v_dm_rotation, __pyx_tuple__129, __pyx_t_15) < 0)) __PYX_ERR(0, 2063, __pyx_L18_except_error)
49172  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49173  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
49174  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
49175  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49176  goto __pyx_L17_exception_handled;
49177  }
49178  __pyx_L18_except_error:;
49179 
49180  /* "mbd/CouplingFSI.pyx":2046
49181  * if len(l_rotation) > 0:
49182  * # Check if the dataset exists
49183  * try: # <<<<<<<<<<<<<<
49184  * # Open the dataset
49185  * dm_rotation = o_file['rotation']
49186  */
49187  __Pyx_XGIVEREF(__pyx_t_13);
49188  __Pyx_XGIVEREF(__pyx_t_12);
49189  __Pyx_XGIVEREF(__pyx_t_11);
49190  __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
49191  goto __pyx_L1_error;
49192  __pyx_L17_exception_handled:;
49193  __Pyx_XGIVEREF(__pyx_t_13);
49194  __Pyx_XGIVEREF(__pyx_t_12);
49195  __Pyx_XGIVEREF(__pyx_t_11);
49196  __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
49197  __pyx_L21_try_end:;
49198  }
49199 
49200  /* "mbd/CouplingFSI.pyx":2044
49201  *
49202  * # Log the rotation data
49203  * if len(l_rotation) > 0: # <<<<<<<<<<<<<<
49204  * # Check if the dataset exists
49205  * try:
49206  */
49207  }
49208 
49209  /* "mbd/CouplingFSI.pyx":2066
49210  *
49211  * # Log the force data
49212  * if len(l_force) > 0: # <<<<<<<<<<<<<<
49213  * # Check if the dataset exists
49214  * try:
49215  */
49216  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_force); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2066, __pyx_L1_error)
49217  __pyx_t_7 = ((__pyx_t_4 > 0) != 0);
49218  if (__pyx_t_7) {
49219 
49220  /* "mbd/CouplingFSI.pyx":2068
49221  * if len(l_force) > 0:
49222  * # Check if the dataset exists
49223  * try: # <<<<<<<<<<<<<<
49224  * # Open the dataset
49225  * dm_force = o_file['force']
49226  */
49227  {
49228  __Pyx_PyThreadState_declare
49229  __Pyx_PyThreadState_assign
49230  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
49231  __Pyx_XGOTREF(__pyx_t_11);
49232  __Pyx_XGOTREF(__pyx_t_12);
49233  __Pyx_XGOTREF(__pyx_t_13);
49234  /*try:*/ {
49235 
49236  /* "mbd/CouplingFSI.pyx":2070
49237  * try:
49238  * # Open the dataset
49239  * dm_force = o_file['force'] # <<<<<<<<<<<<<<
49240  *
49241  * # Resize the dataset
49242  */
49243  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_o_file, __pyx_n_s_force); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2070, __pyx_L25_error)
49244  __Pyx_GOTREF(__pyx_t_1);
49245  __pyx_v_dm_force = __pyx_t_1;
49246  __pyx_t_1 = 0;
49247 
49248  /* "mbd/CouplingFSI.pyx":2073
49249  *
49250  * # Resize the dataset
49251  * i_index = dm_force.shape[0] # <<<<<<<<<<<<<<
49252  * dm_force.resize(dm_force.shape[0] + 1, axis=0)
49253  *
49254  */
49255  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_force, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2073, __pyx_L25_error)
49256  __Pyx_GOTREF(__pyx_t_1);
49257  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2073, __pyx_L25_error)
49258  __Pyx_GOTREF(__pyx_t_3);
49259  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49260  __Pyx_XDECREF_SET(__pyx_v_i_index, __pyx_t_3);
49261  __pyx_t_3 = 0;
49262 
49263  /* "mbd/CouplingFSI.pyx":2074
49264  * # Resize the dataset
49265  * i_index = dm_force.shape[0]
49266  * dm_force.resize(dm_force.shape[0] + 1, axis=0) # <<<<<<<<<<<<<<
49267  *
49268  * # Store the values into the dataset
49269  */
49270  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_force, __pyx_n_s_resize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2074, __pyx_L25_error)
49271  __Pyx_GOTREF(__pyx_t_3);
49272  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_force, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2074, __pyx_L25_error)
49273  __Pyx_GOTREF(__pyx_t_1);
49274  __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2074, __pyx_L25_error)
49275  __Pyx_GOTREF(__pyx_t_16);
49276  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49277  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_16, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2074, __pyx_L25_error)
49278  __Pyx_GOTREF(__pyx_t_1);
49279  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
49280  __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2074, __pyx_L25_error)
49281  __Pyx_GOTREF(__pyx_t_16);
49282  __Pyx_GIVEREF(__pyx_t_1);
49283  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
49284  __pyx_t_1 = 0;
49285  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2074, __pyx_L25_error)
49286  __Pyx_GOTREF(__pyx_t_1);
49287  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2074, __pyx_L25_error)
49288  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_16, __pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2074, __pyx_L25_error)
49289  __Pyx_GOTREF(__pyx_t_15);
49290  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
49291  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
49292  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49293  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49294 
49295  /* "mbd/CouplingFSI.pyx":2077
49296  *
49297  * # Store the values into the dataset
49298  * dm_force[i_index, :, :] = np.array(l_force) # <<<<<<<<<<<<<<
49299  *
49300  * except:
49301  */
49302  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2077, __pyx_L25_error)
49303  __Pyx_GOTREF(__pyx_t_1);
49304  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2077, __pyx_L25_error)
49305  __Pyx_GOTREF(__pyx_t_16);
49306  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49307  __pyx_t_1 = NULL;
49308  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
49309  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
49310  if (likely(__pyx_t_1)) {
49311  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
49312  __Pyx_INCREF(__pyx_t_1);
49313  __Pyx_INCREF(function);
49314  __Pyx_DECREF_SET(__pyx_t_16, function);
49315  }
49316  }
49317  __pyx_t_15 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_16, __pyx_t_1, __pyx_v_l_force) : __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_v_l_force);
49318  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49319  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2077, __pyx_L25_error)
49320  __Pyx_GOTREF(__pyx_t_15);
49321  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
49322  __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2077, __pyx_L25_error)
49323  __Pyx_GOTREF(__pyx_t_16);
49324  __Pyx_INCREF(__pyx_v_i_index);
49325  __Pyx_GIVEREF(__pyx_v_i_index);
49326  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_i_index);
49327  __Pyx_INCREF(__pyx_slice__30);
49328  __Pyx_GIVEREF(__pyx_slice__30);
49329  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_slice__30);
49330  __Pyx_INCREF(__pyx_slice__30);
49331  __Pyx_GIVEREF(__pyx_slice__30);
49332  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_slice__30);
49333  if (unlikely(PyObject_SetItem(__pyx_v_dm_force, __pyx_t_16, __pyx_t_15) < 0)) __PYX_ERR(0, 2077, __pyx_L25_error)
49334  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
49335  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49336 
49337  /* "mbd/CouplingFSI.pyx":2068
49338  * if len(l_force) > 0:
49339  * # Check if the dataset exists
49340  * try: # <<<<<<<<<<<<<<
49341  * # Open the dataset
49342  * dm_force = o_file['force']
49343  */
49344  }
49345  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
49346  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
49347  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
49348  goto __pyx_L30_try_end;
49349  __pyx_L25_error:;
49350  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49351  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
49352  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
49353  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
49354  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
49355  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
49356  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
49357  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
49358 
49359  /* "mbd/CouplingFSI.pyx":2079
49360  * dm_force[i_index, :, :] = np.array(l_force)
49361  *
49362  * except: # <<<<<<<<<<<<<<
49363  * # Create the initial dataset
49364  * dm_force = o_file.create_dataset('force', (1, len(l_force), 3), compression="gzip",
49365  */
49366  /*except:*/ {
49367  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_bodies_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
49368  if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_1) < 0) __PYX_ERR(0, 2079, __pyx_L27_except_error)
49369  __Pyx_GOTREF(__pyx_t_15);
49370  __Pyx_GOTREF(__pyx_t_16);
49371  __Pyx_GOTREF(__pyx_t_1);
49372 
49373  /* "mbd/CouplingFSI.pyx":2081
49374  * except:
49375  * # Create the initial dataset
49376  * dm_force = o_file.create_dataset('force', (1, len(l_force), 3), compression="gzip", # <<<<<<<<<<<<<<
49377  * maxshape=(None, len(l_force), 3), dtype=float)
49378  *
49379  */
49380  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49381  __Pyx_GOTREF(__pyx_t_3);
49382  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_force); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49383  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49384  __Pyx_GOTREF(__pyx_t_2);
49385  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49386  __Pyx_GOTREF(__pyx_t_14);
49387  __Pyx_INCREF(__pyx_int_1);
49388  __Pyx_GIVEREF(__pyx_int_1);
49389  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_int_1);
49390  __Pyx_GIVEREF(__pyx_t_2);
49391  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_2);
49392  __Pyx_INCREF(__pyx_int_3);
49393  __Pyx_GIVEREF(__pyx_int_3);
49394  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_int_3);
49395  __pyx_t_2 = 0;
49396  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49397  __Pyx_GOTREF(__pyx_t_2);
49398  __Pyx_INCREF(__pyx_n_s_force);
49399  __Pyx_GIVEREF(__pyx_n_s_force);
49400  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_force);
49401  __Pyx_GIVEREF(__pyx_t_14);
49402  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
49403  __pyx_t_14 = 0;
49404  __pyx_t_14 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49405  __Pyx_GOTREF(__pyx_t_14);
49406  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_compression, __pyx_n_s_gzip) < 0) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49407 
49408  /* "mbd/CouplingFSI.pyx":2082
49409  * # Create the initial dataset
49410  * dm_force = o_file.create_dataset('force', (1, len(l_force), 3), compression="gzip",
49411  * maxshape=(None, len(l_force), 3), dtype=float) # <<<<<<<<<<<<<<
49412  *
49413  * # Store the first entry into the dataset
49414  */
49415  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_force); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2082, __pyx_L27_except_error)
49416  __pyx_t_8 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2082, __pyx_L27_except_error)
49417  __Pyx_GOTREF(__pyx_t_8);
49418  __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2082, __pyx_L27_except_error)
49419  __Pyx_GOTREF(__pyx_t_10);
49420  __Pyx_INCREF(Py_None);
49421  __Pyx_GIVEREF(Py_None);
49422  PyTuple_SET_ITEM(__pyx_t_10, 0, Py_None);
49423  __Pyx_GIVEREF(__pyx_t_8);
49424  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
49425  __Pyx_INCREF(__pyx_int_3);
49426  __Pyx_GIVEREF(__pyx_int_3);
49427  PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_int_3);
49428  __pyx_t_8 = 0;
49429  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_maxshape, __pyx_t_10) < 0) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49430  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
49431  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49432 
49433  /* "mbd/CouplingFSI.pyx":2081
49434  * except:
49435  * # Create the initial dataset
49436  * dm_force = o_file.create_dataset('force', (1, len(l_force), 3), compression="gzip", # <<<<<<<<<<<<<<
49437  * maxshape=(None, len(l_force), 3), dtype=float)
49438  *
49439  */
49440  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2081, __pyx_L27_except_error)
49441  __Pyx_GOTREF(__pyx_t_10);
49442  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
49443  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
49444  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
49445  __Pyx_XDECREF_SET(__pyx_v_dm_force, __pyx_t_10);
49446  __pyx_t_10 = 0;
49447 
49448  /* "mbd/CouplingFSI.pyx":2085
49449  *
49450  * # Store the first entry into the dataset
49451  * dm_force[0, :, :] = np.array(l_force) # <<<<<<<<<<<<<<
49452  *
49453  * # Log the torque data
49454  */
49455  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2085, __pyx_L27_except_error)
49456  __Pyx_GOTREF(__pyx_t_14);
49457  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2085, __pyx_L27_except_error)
49458  __Pyx_GOTREF(__pyx_t_2);
49459  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
49460  __pyx_t_14 = NULL;
49461  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
49462  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
49463  if (likely(__pyx_t_14)) {
49464  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
49465  __Pyx_INCREF(__pyx_t_14);
49466  __Pyx_INCREF(function);
49467  __Pyx_DECREF_SET(__pyx_t_2, function);
49468  }
49469  }
49470  __pyx_t_10 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_v_l_force) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_l_force);
49471  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
49472  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2085, __pyx_L27_except_error)
49473  __Pyx_GOTREF(__pyx_t_10);
49474  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
49475  if (unlikely(PyObject_SetItem(__pyx_v_dm_force, __pyx_tuple__129, __pyx_t_10) < 0)) __PYX_ERR(0, 2085, __pyx_L27_except_error)
49476  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
49477  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
49478  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
49479  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49480  goto __pyx_L26_exception_handled;
49481  }
49482  __pyx_L27_except_error:;
49483 
49484  /* "mbd/CouplingFSI.pyx":2068
49485  * if len(l_force) > 0:
49486  * # Check if the dataset exists
49487  * try: # <<<<<<<<<<<<<<
49488  * # Open the dataset
49489  * dm_force = o_file['force']
49490  */
49491  __Pyx_XGIVEREF(__pyx_t_11);
49492  __Pyx_XGIVEREF(__pyx_t_12);
49493  __Pyx_XGIVEREF(__pyx_t_13);
49494  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
49495  goto __pyx_L1_error;
49496  __pyx_L26_exception_handled:;
49497  __Pyx_XGIVEREF(__pyx_t_11);
49498  __Pyx_XGIVEREF(__pyx_t_12);
49499  __Pyx_XGIVEREF(__pyx_t_13);
49500  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
49501  __pyx_L30_try_end:;
49502  }
49503 
49504  /* "mbd/CouplingFSI.pyx":2066
49505  *
49506  * # Log the force data
49507  * if len(l_force) > 0: # <<<<<<<<<<<<<<
49508  * # Check if the dataset exists
49509  * try:
49510  */
49511  }
49512 
49513  /* "mbd/CouplingFSI.pyx":2088
49514  *
49515  * # Log the torque data
49516  * if len(l_torque) > 0: # <<<<<<<<<<<<<<
49517  * # Check if the dataset exists
49518  * try:
49519  */
49520  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_torque); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2088, __pyx_L1_error)
49521  __pyx_t_7 = ((__pyx_t_4 > 0) != 0);
49522  if (__pyx_t_7) {
49523 
49524  /* "mbd/CouplingFSI.pyx":2090
49525  * if len(l_torque) > 0:
49526  * # Check if the dataset exists
49527  * try: # <<<<<<<<<<<<<<
49528  * # Open the dataset
49529  * dm_torque = o_file['torque']
49530  */
49531  {
49532  __Pyx_PyThreadState_declare
49533  __Pyx_PyThreadState_assign
49534  __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
49535  __Pyx_XGOTREF(__pyx_t_13);
49536  __Pyx_XGOTREF(__pyx_t_12);
49537  __Pyx_XGOTREF(__pyx_t_11);
49538  /*try:*/ {
49539 
49540  /* "mbd/CouplingFSI.pyx":2092
49541  * try:
49542  * # Open the dataset
49543  * dm_torque = o_file['torque'] # <<<<<<<<<<<<<<
49544  *
49545  * # Resize the dataset
49546  */
49547  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_o_file, __pyx_n_s_torque); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2092, __pyx_L34_error)
49548  __Pyx_GOTREF(__pyx_t_1);
49549  __pyx_v_dm_torque = __pyx_t_1;
49550  __pyx_t_1 = 0;
49551 
49552  /* "mbd/CouplingFSI.pyx":2095
49553  *
49554  * # Resize the dataset
49555  * i_index = dm_torque.shape[0] # <<<<<<<<<<<<<<
49556  * dm_torque.resize(dm_torque.shape[0] + 1, axis=0)
49557  *
49558  */
49559  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_torque, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2095, __pyx_L34_error)
49560  __Pyx_GOTREF(__pyx_t_1);
49561  __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2095, __pyx_L34_error)
49562  __Pyx_GOTREF(__pyx_t_16);
49563  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49564  __Pyx_XDECREF_SET(__pyx_v_i_index, __pyx_t_16);
49565  __pyx_t_16 = 0;
49566 
49567  /* "mbd/CouplingFSI.pyx":2096
49568  * # Resize the dataset
49569  * i_index = dm_torque.shape[0]
49570  * dm_torque.resize(dm_torque.shape[0] + 1, axis=0) # <<<<<<<<<<<<<<
49571  *
49572  * # Store the values into the dataset
49573  */
49574  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_torque, __pyx_n_s_resize); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2096, __pyx_L34_error)
49575  __Pyx_GOTREF(__pyx_t_16);
49576  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_torque, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2096, __pyx_L34_error)
49577  __Pyx_GOTREF(__pyx_t_1);
49578  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2096, __pyx_L34_error)
49579  __Pyx_GOTREF(__pyx_t_15);
49580  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49581  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_15, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2096, __pyx_L34_error)
49582  __Pyx_GOTREF(__pyx_t_1);
49583  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49584  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2096, __pyx_L34_error)
49585  __Pyx_GOTREF(__pyx_t_15);
49586  __Pyx_GIVEREF(__pyx_t_1);
49587  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_1);
49588  __pyx_t_1 = 0;
49589  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2096, __pyx_L34_error)
49590  __Pyx_GOTREF(__pyx_t_1);
49591  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2096, __pyx_L34_error)
49592  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_15, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2096, __pyx_L34_error)
49593  __Pyx_GOTREF(__pyx_t_10);
49594  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
49595  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49596  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49597  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
49598 
49599  /* "mbd/CouplingFSI.pyx":2099
49600  *
49601  * # Store the values into the dataset
49602  * dm_torque[i_index, :, :] = np.array(l_torque) # <<<<<<<<<<<<<<
49603  *
49604  * except:
49605  */
49606  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2099, __pyx_L34_error)
49607  __Pyx_GOTREF(__pyx_t_1);
49608  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2099, __pyx_L34_error)
49609  __Pyx_GOTREF(__pyx_t_15);
49610  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49611  __pyx_t_1 = NULL;
49612  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
49613  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_15);
49614  if (likely(__pyx_t_1)) {
49615  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
49616  __Pyx_INCREF(__pyx_t_1);
49617  __Pyx_INCREF(function);
49618  __Pyx_DECREF_SET(__pyx_t_15, function);
49619  }
49620  }
49621  __pyx_t_10 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_1, __pyx_v_l_torque) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_v_l_torque);
49622  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49623  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2099, __pyx_L34_error)
49624  __Pyx_GOTREF(__pyx_t_10);
49625  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49626  __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2099, __pyx_L34_error)
49627  __Pyx_GOTREF(__pyx_t_15);
49628  __Pyx_INCREF(__pyx_v_i_index);
49629  __Pyx_GIVEREF(__pyx_v_i_index);
49630  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_i_index);
49631  __Pyx_INCREF(__pyx_slice__30);
49632  __Pyx_GIVEREF(__pyx_slice__30);
49633  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_slice__30);
49634  __Pyx_INCREF(__pyx_slice__30);
49635  __Pyx_GIVEREF(__pyx_slice__30);
49636  PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_slice__30);
49637  if (unlikely(PyObject_SetItem(__pyx_v_dm_torque, __pyx_t_15, __pyx_t_10) < 0)) __PYX_ERR(0, 2099, __pyx_L34_error)
49638  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49639  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
49640 
49641  /* "mbd/CouplingFSI.pyx":2090
49642  * if len(l_torque) > 0:
49643  * # Check if the dataset exists
49644  * try: # <<<<<<<<<<<<<<
49645  * # Open the dataset
49646  * dm_torque = o_file['torque']
49647  */
49648  }
49649  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
49650  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
49651  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
49652  goto __pyx_L39_try_end;
49653  __pyx_L34_error:;
49654  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49655  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
49656  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
49657  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
49658  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
49659  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
49660  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
49661  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
49662 
49663  /* "mbd/CouplingFSI.pyx":2101
49664  * dm_torque[i_index, :, :] = np.array(l_torque)
49665  *
49666  * except: # <<<<<<<<<<<<<<
49667  * # Create the initial dataset
49668  * dm_torque = o_file.create_dataset('torque', (1, len(l_torque), 3), compression="gzip",
49669  */
49670  /*except:*/ {
49671  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_bodies_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
49672  if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_15, &__pyx_t_1) < 0) __PYX_ERR(0, 2101, __pyx_L36_except_error)
49673  __Pyx_GOTREF(__pyx_t_10);
49674  __Pyx_GOTREF(__pyx_t_15);
49675  __Pyx_GOTREF(__pyx_t_1);
49676 
49677  /* "mbd/CouplingFSI.pyx":2103
49678  * except:
49679  * # Create the initial dataset
49680  * dm_torque = o_file.create_dataset('torque', (1, len(l_torque), 3), compression="gzip", # <<<<<<<<<<<<<<
49681  * maxshape=(None, len(l_torque), 3), dtype=float)
49682  *
49683  */
49684  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49685  __Pyx_GOTREF(__pyx_t_16);
49686  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_torque); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49687  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49688  __Pyx_GOTREF(__pyx_t_2);
49689  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49690  __Pyx_GOTREF(__pyx_t_14);
49691  __Pyx_INCREF(__pyx_int_1);
49692  __Pyx_GIVEREF(__pyx_int_1);
49693  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_int_1);
49694  __Pyx_GIVEREF(__pyx_t_2);
49695  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_2);
49696  __Pyx_INCREF(__pyx_int_3);
49697  __Pyx_GIVEREF(__pyx_int_3);
49698  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_int_3);
49699  __pyx_t_2 = 0;
49700  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49701  __Pyx_GOTREF(__pyx_t_2);
49702  __Pyx_INCREF(__pyx_n_s_torque);
49703  __Pyx_GIVEREF(__pyx_n_s_torque);
49704  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_torque);
49705  __Pyx_GIVEREF(__pyx_t_14);
49706  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_14);
49707  __pyx_t_14 = 0;
49708  __pyx_t_14 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49709  __Pyx_GOTREF(__pyx_t_14);
49710  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_compression, __pyx_n_s_gzip) < 0) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49711 
49712  /* "mbd/CouplingFSI.pyx":2104
49713  * # Create the initial dataset
49714  * dm_torque = o_file.create_dataset('torque', (1, len(l_torque), 3), compression="gzip",
49715  * maxshape=(None, len(l_torque), 3), dtype=float) # <<<<<<<<<<<<<<
49716  *
49717  * # Store the first entry into the dataset
49718  */
49719  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_torque); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2104, __pyx_L36_except_error)
49720  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2104, __pyx_L36_except_error)
49721  __Pyx_GOTREF(__pyx_t_3);
49722  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2104, __pyx_L36_except_error)
49723  __Pyx_GOTREF(__pyx_t_8);
49724  __Pyx_INCREF(Py_None);
49725  __Pyx_GIVEREF(Py_None);
49726  PyTuple_SET_ITEM(__pyx_t_8, 0, Py_None);
49727  __Pyx_GIVEREF(__pyx_t_3);
49728  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
49729  __Pyx_INCREF(__pyx_int_3);
49730  __Pyx_GIVEREF(__pyx_int_3);
49731  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_3);
49732  __pyx_t_3 = 0;
49733  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_maxshape, __pyx_t_8) < 0) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49734  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
49735  if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49736 
49737  /* "mbd/CouplingFSI.pyx":2103
49738  * except:
49739  * # Create the initial dataset
49740  * dm_torque = o_file.create_dataset('torque', (1, len(l_torque), 3), compression="gzip", # <<<<<<<<<<<<<<
49741  * maxshape=(None, len(l_torque), 3), dtype=float)
49742  *
49743  */
49744  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2103, __pyx_L36_except_error)
49745  __Pyx_GOTREF(__pyx_t_8);
49746  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
49747  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
49748  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
49749  __Pyx_XDECREF_SET(__pyx_v_dm_torque, __pyx_t_8);
49750  __pyx_t_8 = 0;
49751 
49752  /* "mbd/CouplingFSI.pyx":2107
49753  *
49754  * # Store the first entry into the dataset
49755  * dm_torque[0, :, :] = np.array(l_torque) # <<<<<<<<<<<<<<
49756  *
49757  * # Close the log file
49758  */
49759  __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_np); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2107, __pyx_L36_except_error)
49760  __Pyx_GOTREF(__pyx_t_14);
49761  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2107, __pyx_L36_except_error)
49762  __Pyx_GOTREF(__pyx_t_2);
49763  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
49764  __pyx_t_14 = NULL;
49765  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
49766  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
49767  if (likely(__pyx_t_14)) {
49768  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
49769  __Pyx_INCREF(__pyx_t_14);
49770  __Pyx_INCREF(function);
49771  __Pyx_DECREF_SET(__pyx_t_2, function);
49772  }
49773  }
49774  __pyx_t_8 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_v_l_torque) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_l_torque);
49775  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
49776  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2107, __pyx_L36_except_error)
49777  __Pyx_GOTREF(__pyx_t_8);
49778  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
49779  if (unlikely(PyObject_SetItem(__pyx_v_dm_torque, __pyx_tuple__129, __pyx_t_8) < 0)) __PYX_ERR(0, 2107, __pyx_L36_except_error)
49780  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
49781  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
49782  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
49783  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
49784  goto __pyx_L35_exception_handled;
49785  }
49786  __pyx_L36_except_error:;
49787 
49788  /* "mbd/CouplingFSI.pyx":2090
49789  * if len(l_torque) > 0:
49790  * # Check if the dataset exists
49791  * try: # <<<<<<<<<<<<<<
49792  * # Open the dataset
49793  * dm_torque = o_file['torque']
49794  */
49795  __Pyx_XGIVEREF(__pyx_t_13);
49796  __Pyx_XGIVEREF(__pyx_t_12);
49797  __Pyx_XGIVEREF(__pyx_t_11);
49798  __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
49799  goto __pyx_L1_error;
49800  __pyx_L35_exception_handled:;
49801  __Pyx_XGIVEREF(__pyx_t_13);
49802  __Pyx_XGIVEREF(__pyx_t_12);
49803  __Pyx_XGIVEREF(__pyx_t_11);
49804  __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
49805  __pyx_L39_try_end:;
49806  }
49807 
49808  /* "mbd/CouplingFSI.pyx":2088
49809  *
49810  * # Log the torque data
49811  * if len(l_torque) > 0: # <<<<<<<<<<<<<<
49812  * # Check if the dataset exists
49813  * try:
49814  */
49815  }
49816 
49817  /* "mbd/CouplingFSI.pyx":2110
49818  *
49819  * # Close the log file
49820  * o_file.close() # <<<<<<<<<<<<<<
49821  *
49822  *
49823  */
49824  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_close); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2110, __pyx_L1_error)
49825  __Pyx_GOTREF(__pyx_t_15);
49826  __pyx_t_10 = NULL;
49827  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
49828  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_15);
49829  if (likely(__pyx_t_10)) {
49830  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
49831  __Pyx_INCREF(__pyx_t_10);
49832  __Pyx_INCREF(function);
49833  __Pyx_DECREF_SET(__pyx_t_15, function);
49834  }
49835  }
49836  __pyx_t_1 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_15);
49837  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
49838  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2110, __pyx_L1_error)
49839  __Pyx_GOTREF(__pyx_t_1);
49840  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
49841  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
49842 
49843  /* "mbd/CouplingFSI.pyx":1972
49844  *
49845  *
49846  * def log_bodies_h5(self, l_logging_info): # <<<<<<<<<<<<<<
49847  * """
49848  * Logs the chrono information into a h5 file at each timestep
49849  */
49850 
49851  /* function exit code */
49852  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
49853  goto __pyx_L0;
49854  __pyx_L1_error:;
49855  __Pyx_XDECREF(__pyx_t_1);
49856  __Pyx_XDECREF(__pyx_t_2);
49857  __Pyx_XDECREF(__pyx_t_3);
49858  __Pyx_XDECREF(__pyx_t_8);
49859  __Pyx_XDECREF(__pyx_t_10);
49860  __Pyx_XDECREF(__pyx_t_14);
49861  __Pyx_XDECREF(__pyx_t_15);
49862  __Pyx_XDECREF(__pyx_t_16);
49863  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_bodies_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
49864  __pyx_r = NULL;
49865  __pyx_L0:;
49866  __Pyx_XDECREF(__pyx_v_o_file);
49867  __Pyx_XDECREF(__pyx_v_l_position);
49868  __Pyx_XDECREF(__pyx_v_l_rotation);
49869  __Pyx_XDECREF(__pyx_v_l_force);
49870  __Pyx_XDECREF(__pyx_v_l_torque);
49871  __Pyx_XDECREF(__pyx_v_o_body);
49872  __Pyx_XDECREF(__pyx_v_o_body_position);
49873  __Pyx_XDECREF(__pyx_v_o_body_rotation);
49874  __Pyx_XDECREF(__pyx_v_o_body_force);
49875  __Pyx_XDECREF(__pyx_v_o_body_torque);
49876  __Pyx_XDECREF(__pyx_v_dm_position);
49877  __Pyx_XDECREF(__pyx_v_i_index);
49878  __Pyx_XDECREF(__pyx_v_dm_rotation);
49879  __Pyx_XDECREF(__pyx_v_dm_force);
49880  __Pyx_XDECREF(__pyx_v_dm_torque);
49881  __Pyx_XGIVEREF(__pyx_r);
49882  __Pyx_TraceReturn(__pyx_r, 0);
49883  __Pyx_RefNannyFinishContext();
49884  return __pyx_r;
49885 }
49886 
49887 /* "mbd/CouplingFSI.pyx":2113
49888  *
49889  *
49890  * def log_springs_text(self, d_time, l_springs): # <<<<<<<<<<<<<<
49891  * """
49892  * Logs the chrono information into a text file at each timestep
49893  */
49894 
49895 /* Python wrapper */
49896 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_49log_springs_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
49897 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_48log_springs_text[] = "ProtChSystem.log_springs_text(self, d_time, l_springs)\n\n Logs the chrono information into a text file at each timestep\n Parameters\n ----------\n self: object\n ProtChSystem being referenced\n d_time: float\n Current simulation time\n l_springs: list\n Spring objects for which data is being stored\n Returns\n -------\n None. Data is saved to a text file.\n ";
49898 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_49log_springs_text = {"log_springs_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_49log_springs_text, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_48log_springs_text};
49899 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_49log_springs_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
49900  PyObject *__pyx_v_d_time = 0;
49901  PyObject *__pyx_v_l_springs = 0;
49902  int __pyx_lineno = 0;
49903  const char *__pyx_filename = NULL;
49904  int __pyx_clineno = 0;
49905  PyObject *__pyx_r = 0;
49906  __Pyx_RefNannyDeclarations
49907  __Pyx_RefNannySetupContext("log_springs_text (wrapper)", 0);
49908  {
49909  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d_time,&__pyx_n_s_l_springs,0};
49910  PyObject* values[2] = {0,0};
49911  if (unlikely(__pyx_kwds)) {
49912  Py_ssize_t kw_args;
49913  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
49914  switch (pos_args) {
49915  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
49916  CYTHON_FALLTHROUGH;
49917  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
49918  CYTHON_FALLTHROUGH;
49919  case 0: break;
49920  default: goto __pyx_L5_argtuple_error;
49921  }
49922  kw_args = PyDict_Size(__pyx_kwds);
49923  switch (pos_args) {
49924  case 0:
49925  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d_time)) != 0)) kw_args--;
49926  else goto __pyx_L5_argtuple_error;
49927  CYTHON_FALLTHROUGH;
49928  case 1:
49929  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l_springs)) != 0)) kw_args--;
49930  else {
49931  __Pyx_RaiseArgtupleInvalid("log_springs_text", 1, 2, 2, 1); __PYX_ERR(0, 2113, __pyx_L3_error)
49932  }
49933  }
49934  if (unlikely(kw_args > 0)) {
49935  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log_springs_text") < 0)) __PYX_ERR(0, 2113, __pyx_L3_error)
49936  }
49937  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
49938  goto __pyx_L5_argtuple_error;
49939  } else {
49940  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
49941  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
49942  }
49943  __pyx_v_d_time = values[0];
49944  __pyx_v_l_springs = values[1];
49945  }
49946  goto __pyx_L4_argument_unpacking_done;
49947  __pyx_L5_argtuple_error:;
49948  __Pyx_RaiseArgtupleInvalid("log_springs_text", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2113, __pyx_L3_error)
49949  __pyx_L3_error:;
49950  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_springs_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
49951  __Pyx_RefNannyFinishContext();
49952  return NULL;
49953  __pyx_L4_argument_unpacking_done:;
49954  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_48log_springs_text(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_d_time, __pyx_v_l_springs);
49955 
49956  /* function exit code */
49957  __Pyx_RefNannyFinishContext();
49958  return __pyx_r;
49959 }
49960 
49961 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_48log_springs_text(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time, PyObject *__pyx_v_l_springs) {
49962  PyObject *__pyx_v_s_filename = NULL;
49963  PyObject *__pyx_v_o_file = NULL;
49964  PyObject *__pyx_v_i_entry_spring = NULL;
49965  PyObject *__pyx_v_d_internal_force = NULL;
49966  PyObject *__pyx_v_d_spring_velocity = NULL;
49967  PyObject *__pyx_v_d_spring_length = NULL;
49968  PyObject *__pyx_r = NULL;
49969  __Pyx_TraceDeclarations
49970  __Pyx_RefNannyDeclarations
49971  PyObject *__pyx_t_1 = NULL;
49972  PyObject *__pyx_t_2 = NULL;
49973  Py_ssize_t __pyx_t_3;
49974  PyObject *(*__pyx_t_4)(PyObject *);
49975  PyObject *__pyx_t_5 = NULL;
49976  PyObject *__pyx_t_6 = NULL;
49977  PyObject *__pyx_t_7 = NULL;
49978  PyObject *__pyx_t_8 = NULL;
49979  int __pyx_lineno = 0;
49980  const char *__pyx_filename = NULL;
49981  int __pyx_clineno = 0;
49982  __Pyx_TraceFrameInit(__pyx_codeobj__130)
49983  __Pyx_RefNannySetupContext("log_springs_text", 0);
49984  __Pyx_TraceCall("log_springs_text", __pyx_f[0], 2113, 0, __PYX_ERR(0, 2113, __pyx_L1_error));
49985 
49986  /* "mbd/CouplingFSI.pyx":2130
49987  *
49988  * # Open the file
49989  * s_filename = 'chrono_log_spring.txt' # <<<<<<<<<<<<<<
49990  * o_file = open(s_filename, 'a+')
49991  *
49992  */
49993  __Pyx_INCREF(__pyx_kp_s_chrono_log_spring_txt);
49994  __pyx_v_s_filename = __pyx_kp_s_chrono_log_spring_txt;
49995 
49996  /* "mbd/CouplingFSI.pyx":2131
49997  * # Open the file
49998  * s_filename = 'chrono_log_spring.txt'
49999  * o_file = open(s_filename, 'a+') # <<<<<<<<<<<<<<
50000  *
50001  * # Loop and write the body information
50002  */
50003  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2131, __pyx_L1_error)
50004  __Pyx_GOTREF(__pyx_t_1);
50005  __Pyx_INCREF(__pyx_v_s_filename);
50006  __Pyx_GIVEREF(__pyx_v_s_filename);
50007  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s_filename);
50008  __Pyx_INCREF(__pyx_kp_s_a_2);
50009  __Pyx_GIVEREF(__pyx_kp_s_a_2);
50010  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_a_2);
50011  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
50012  __Pyx_GOTREF(__pyx_t_2);
50013  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50014  __pyx_v_o_file = __pyx_t_2;
50015  __pyx_t_2 = 0;
50016 
50017  /* "mbd/CouplingFSI.pyx":2134
50018  *
50019  * # Loop and write the body information
50020  * for i_entry_spring in range(0, len(l_springs), 1): # <<<<<<<<<<<<<<
50021  * # Get the current state of the spring
50022  * d_internal_force = l_springs[i_entry_spring].GetSpringReact()
50023  */
50024  __pyx_t_3 = PyObject_Length(__pyx_v_l_springs); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2134, __pyx_L1_error)
50025  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error)
50026  __Pyx_GOTREF(__pyx_t_2);
50027  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
50028  __Pyx_GOTREF(__pyx_t_1);
50029  __Pyx_INCREF(__pyx_int_0);
50030  __Pyx_GIVEREF(__pyx_int_0);
50031  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
50032  __Pyx_GIVEREF(__pyx_t_2);
50033  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
50034  __Pyx_INCREF(__pyx_int_1);
50035  __Pyx_GIVEREF(__pyx_int_1);
50036  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_int_1);
50037  __pyx_t_2 = 0;
50038  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error)
50039  __Pyx_GOTREF(__pyx_t_2);
50040  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50041  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
50042  __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
50043  __pyx_t_4 = NULL;
50044  } else {
50045  __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
50046  __Pyx_GOTREF(__pyx_t_1);
50047  __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L1_error)
50048  }
50049  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50050  for (;;) {
50051  if (likely(!__pyx_t_4)) {
50052  if (likely(PyList_CheckExact(__pyx_t_1))) {
50053  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
50054  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
50055  __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, 2134, __pyx_L1_error)
50056  #else
50057  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error)
50058  __Pyx_GOTREF(__pyx_t_2);
50059  #endif
50060  } else {
50061  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
50062  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
50063  __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, 2134, __pyx_L1_error)
50064  #else
50065  __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error)
50066  __Pyx_GOTREF(__pyx_t_2);
50067  #endif
50068  }
50069  } else {
50070  __pyx_t_2 = __pyx_t_4(__pyx_t_1);
50071  if (unlikely(!__pyx_t_2)) {
50072  PyObject* exc_type = PyErr_Occurred();
50073  if (exc_type) {
50074  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
50075  else __PYX_ERR(0, 2134, __pyx_L1_error)
50076  }
50077  break;
50078  }
50079  __Pyx_GOTREF(__pyx_t_2);
50080  }
50081  __Pyx_XDECREF_SET(__pyx_v_i_entry_spring, __pyx_t_2);
50082  __pyx_t_2 = 0;
50083 
50084  /* "mbd/CouplingFSI.pyx":2136
50085  * for i_entry_spring in range(0, len(l_springs), 1):
50086  * # Get the current state of the spring
50087  * d_internal_force = l_springs[i_entry_spring].GetSpringReact() # <<<<<<<<<<<<<<
50088  * d_spring_velocity = l_springs[i_entry_spring].GetSpringVelocity()
50089  * d_spring_length = l_springs[i_entry_spring].GetSpringLength()
50090  */
50091  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_l_springs, __pyx_v_i_entry_spring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2136, __pyx_L1_error)
50092  __Pyx_GOTREF(__pyx_t_5);
50093  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_GetSpringReact); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2136, __pyx_L1_error)
50094  __Pyx_GOTREF(__pyx_t_6);
50095  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50096  __pyx_t_5 = NULL;
50097  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
50098  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
50099  if (likely(__pyx_t_5)) {
50100  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
50101  __Pyx_INCREF(__pyx_t_5);
50102  __Pyx_INCREF(function);
50103  __Pyx_DECREF_SET(__pyx_t_6, function);
50104  }
50105  }
50106  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
50107  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
50108  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L1_error)
50109  __Pyx_GOTREF(__pyx_t_2);
50110  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
50111  __Pyx_XDECREF_SET(__pyx_v_d_internal_force, __pyx_t_2);
50112  __pyx_t_2 = 0;
50113 
50114  /* "mbd/CouplingFSI.pyx":2137
50115  * # Get the current state of the spring
50116  * d_internal_force = l_springs[i_entry_spring].GetSpringReact()
50117  * d_spring_velocity = l_springs[i_entry_spring].GetSpringVelocity() # <<<<<<<<<<<<<<
50118  * d_spring_length = l_springs[i_entry_spring].GetSpringLength()
50119  *
50120  */
50121  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_l_springs, __pyx_v_i_entry_spring); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2137, __pyx_L1_error)
50122  __Pyx_GOTREF(__pyx_t_6);
50123  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_GetSpringVelocity); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2137, __pyx_L1_error)
50124  __Pyx_GOTREF(__pyx_t_5);
50125  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
50126  __pyx_t_6 = NULL;
50127  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
50128  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
50129  if (likely(__pyx_t_6)) {
50130  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
50131  __Pyx_INCREF(__pyx_t_6);
50132  __Pyx_INCREF(function);
50133  __Pyx_DECREF_SET(__pyx_t_5, function);
50134  }
50135  }
50136  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
50137  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
50138  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2137, __pyx_L1_error)
50139  __Pyx_GOTREF(__pyx_t_2);
50140  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50141  __Pyx_XDECREF_SET(__pyx_v_d_spring_velocity, __pyx_t_2);
50142  __pyx_t_2 = 0;
50143 
50144  /* "mbd/CouplingFSI.pyx":2138
50145  * d_internal_force = l_springs[i_entry_spring].GetSpringReact()
50146  * d_spring_velocity = l_springs[i_entry_spring].GetSpringVelocity()
50147  * d_spring_length = l_springs[i_entry_spring].GetSpringLength() # <<<<<<<<<<<<<<
50148  *
50149  * # Write to the file
50150  */
50151  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_l_springs, __pyx_v_i_entry_spring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2138, __pyx_L1_error)
50152  __Pyx_GOTREF(__pyx_t_5);
50153  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_GetSpringLength); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2138, __pyx_L1_error)
50154  __Pyx_GOTREF(__pyx_t_6);
50155  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50156  __pyx_t_5 = NULL;
50157  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
50158  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
50159  if (likely(__pyx_t_5)) {
50160  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
50161  __Pyx_INCREF(__pyx_t_5);
50162  __Pyx_INCREF(function);
50163  __Pyx_DECREF_SET(__pyx_t_6, function);
50164  }
50165  }
50166  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
50167  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
50168  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2138, __pyx_L1_error)
50169  __Pyx_GOTREF(__pyx_t_2);
50170  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
50171  __Pyx_XDECREF_SET(__pyx_v_d_spring_length, __pyx_t_2);
50172  __pyx_t_2 = 0;
50173 
50174  /* "mbd/CouplingFSI.pyx":2141
50175  *
50176  * # Write to the file
50177  * o_file.write(str(d_time) + '\t' + str(i_entry_spring) + '\t' + str(d_internal_force) + '\t' + # <<<<<<<<<<<<<<
50178  * str(d_spring_velocity) + '\t' + str(d_spring_length) + '\n')
50179  *
50180  */
50181  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2141, __pyx_L1_error)
50182  __Pyx_GOTREF(__pyx_t_6);
50183  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L1_error)
50184  __Pyx_GOTREF(__pyx_t_5);
50185  __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2141, __pyx_L1_error)
50186  __Pyx_GOTREF(__pyx_t_7);
50187  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50188  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_i_entry_spring); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L1_error)
50189  __Pyx_GOTREF(__pyx_t_5);
50190  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2141, __pyx_L1_error)
50191  __Pyx_GOTREF(__pyx_t_8);
50192  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
50193  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50194  __pyx_t_5 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__125); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L1_error)
50195  __Pyx_GOTREF(__pyx_t_5);
50196  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
50197  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_internal_force); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2141, __pyx_L1_error)
50198  __Pyx_GOTREF(__pyx_t_8);
50199  __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2141, __pyx_L1_error)
50200  __Pyx_GOTREF(__pyx_t_7);
50201  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50202  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
50203  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__125); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2141, __pyx_L1_error)
50204  __Pyx_GOTREF(__pyx_t_8);
50205  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
50206 
50207  /* "mbd/CouplingFSI.pyx":2142
50208  * # Write to the file
50209  * o_file.write(str(d_time) + '\t' + str(i_entry_spring) + '\t' + str(d_internal_force) + '\t' +
50210  * str(d_spring_velocity) + '\t' + str(d_spring_length) + '\n') # <<<<<<<<<<<<<<
50211  *
50212  * # Close the output file
50213  */
50214  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_spring_velocity); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2142, __pyx_L1_error)
50215  __Pyx_GOTREF(__pyx_t_7);
50216 
50217  /* "mbd/CouplingFSI.pyx":2141
50218  *
50219  * # Write to the file
50220  * o_file.write(str(d_time) + '\t' + str(i_entry_spring) + '\t' + str(d_internal_force) + '\t' + # <<<<<<<<<<<<<<
50221  * str(d_spring_velocity) + '\t' + str(d_spring_length) + '\n')
50222  *
50223  */
50224  __pyx_t_5 = PyNumber_Add(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L1_error)
50225  __Pyx_GOTREF(__pyx_t_5);
50226  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
50227  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
50228 
50229  /* "mbd/CouplingFSI.pyx":2142
50230  * # Write to the file
50231  * o_file.write(str(d_time) + '\t' + str(i_entry_spring) + '\t' + str(d_internal_force) + '\t' +
50232  * str(d_spring_velocity) + '\t' + str(d_spring_length) + '\n') # <<<<<<<<<<<<<<
50233  *
50234  * # Close the output file
50235  */
50236  __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__125); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2142, __pyx_L1_error)
50237  __Pyx_GOTREF(__pyx_t_7);
50238  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50239  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_spring_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2142, __pyx_L1_error)
50240  __Pyx_GOTREF(__pyx_t_5);
50241  __pyx_t_8 = PyNumber_Add(__pyx_t_7, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2142, __pyx_L1_error)
50242  __Pyx_GOTREF(__pyx_t_8);
50243  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
50244  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50245  __pyx_t_5 = PyNumber_Add(__pyx_t_8, __pyx_kp_s__126); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2142, __pyx_L1_error)
50246  __Pyx_GOTREF(__pyx_t_5);
50247  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
50248  __pyx_t_8 = NULL;
50249  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
50250  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
50251  if (likely(__pyx_t_8)) {
50252  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
50253  __Pyx_INCREF(__pyx_t_8);
50254  __Pyx_INCREF(function);
50255  __Pyx_DECREF_SET(__pyx_t_6, function);
50256  }
50257  }
50258  __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5);
50259  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
50260  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
50261  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L1_error)
50262  __Pyx_GOTREF(__pyx_t_2);
50263  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
50264  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50265 
50266  /* "mbd/CouplingFSI.pyx":2134
50267  *
50268  * # Loop and write the body information
50269  * for i_entry_spring in range(0, len(l_springs), 1): # <<<<<<<<<<<<<<
50270  * # Get the current state of the spring
50271  * d_internal_force = l_springs[i_entry_spring].GetSpringReact()
50272  */
50273  }
50274  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50275 
50276  /* "mbd/CouplingFSI.pyx":2145
50277  *
50278  * # Close the output file
50279  * o_file.close() # <<<<<<<<<<<<<<
50280  *
50281  *
50282  */
50283  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2145, __pyx_L1_error)
50284  __Pyx_GOTREF(__pyx_t_2);
50285  __pyx_t_6 = NULL;
50286  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
50287  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
50288  if (likely(__pyx_t_6)) {
50289  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
50290  __Pyx_INCREF(__pyx_t_6);
50291  __Pyx_INCREF(function);
50292  __Pyx_DECREF_SET(__pyx_t_2, function);
50293  }
50294  }
50295  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
50296  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
50297  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2145, __pyx_L1_error)
50298  __Pyx_GOTREF(__pyx_t_1);
50299  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50300  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50301 
50302  /* "mbd/CouplingFSI.pyx":2113
50303  *
50304  *
50305  * def log_springs_text(self, d_time, l_springs): # <<<<<<<<<<<<<<
50306  * """
50307  * Logs the chrono information into a text file at each timestep
50308  */
50309 
50310  /* function exit code */
50311  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
50312  goto __pyx_L0;
50313  __pyx_L1_error:;
50314  __Pyx_XDECREF(__pyx_t_1);
50315  __Pyx_XDECREF(__pyx_t_2);
50316  __Pyx_XDECREF(__pyx_t_5);
50317  __Pyx_XDECREF(__pyx_t_6);
50318  __Pyx_XDECREF(__pyx_t_7);
50319  __Pyx_XDECREF(__pyx_t_8);
50320  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_springs_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
50321  __pyx_r = NULL;
50322  __pyx_L0:;
50323  __Pyx_XDECREF(__pyx_v_s_filename);
50324  __Pyx_XDECREF(__pyx_v_o_file);
50325  __Pyx_XDECREF(__pyx_v_i_entry_spring);
50326  __Pyx_XDECREF(__pyx_v_d_internal_force);
50327  __Pyx_XDECREF(__pyx_v_d_spring_velocity);
50328  __Pyx_XDECREF(__pyx_v_d_spring_length);
50329  __Pyx_XGIVEREF(__pyx_r);
50330  __Pyx_TraceReturn(__pyx_r, 0);
50331  __Pyx_RefNannyFinishContext();
50332  return __pyx_r;
50333 }
50334 
50335 /* "mbd/CouplingFSI.pyx":2148
50336  *
50337  *
50338  * def log_springs_h5(self, l_springs): # <<<<<<<<<<<<<<
50339  * """
50340  * Logs chrono spring information to an h5 file
50341  */
50342 
50343 /* Python wrapper */
50344 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_51log_springs_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_l_springs); /*proto*/
50345 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_50log_springs_h5[] = "ProtChSystem.log_springs_h5(self, l_springs)\n\n Logs chrono spring information to an h5 file\n Parameters\n ----------\n self: object\n ProtChSystem object being referenced.\n l_springs: list\n Spring objects for which the data is being logged\n Returns\n -------\n None. Data is logged to an h5 file.\n ";
50346 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_51log_springs_h5 = {"log_springs_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_51log_springs_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_50log_springs_h5};
50347 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_51log_springs_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_l_springs) {
50348  PyObject *__pyx_r = 0;
50349  __Pyx_RefNannyDeclarations
50350  __Pyx_RefNannySetupContext("log_springs_h5 (wrapper)", 0);
50351  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_50log_springs_h5(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_l_springs));
50352 
50353  /* function exit code */
50354  __Pyx_RefNannyFinishContext();
50355  return __pyx_r;
50356 }
50357 
50358 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_50log_springs_h5(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_l_springs) {
50359  PyObject *__pyx_v_o_file = NULL;
50360  PyObject *__pyx_v_l_spring_data = NULL;
50361  Py_ssize_t __pyx_v_i_entry_spring;
50362  PyObject *__pyx_v_d_internal_force = NULL;
50363  PyObject *__pyx_v_d_spring_velocity = NULL;
50364  PyObject *__pyx_v_d_spring_length = NULL;
50365  PyObject *__pyx_v_dm_springs = NULL;
50366  PyObject *__pyx_v_i_index = NULL;
50367  PyObject *__pyx_r = NULL;
50368  __Pyx_TraceDeclarations
50369  __Pyx_RefNannyDeclarations
50370  PyObject *__pyx_t_1 = NULL;
50371  PyObject *__pyx_t_2 = NULL;
50372  PyObject *__pyx_t_3 = NULL;
50373  Py_ssize_t __pyx_t_4;
50374  Py_ssize_t __pyx_t_5;
50375  Py_ssize_t __pyx_t_6;
50376  int __pyx_t_7;
50377  PyObject *__pyx_t_8 = NULL;
50378  PyObject *__pyx_t_9 = NULL;
50379  PyObject *__pyx_t_10 = NULL;
50380  PyObject *__pyx_t_11 = NULL;
50381  PyObject *__pyx_t_12 = NULL;
50382  PyObject *__pyx_t_13 = NULL;
50383  PyObject *__pyx_t_14 = NULL;
50384  PyObject *__pyx_t_15 = NULL;
50385  int __pyx_lineno = 0;
50386  const char *__pyx_filename = NULL;
50387  int __pyx_clineno = 0;
50388  __Pyx_TraceFrameInit(__pyx_codeobj__131)
50389  __Pyx_RefNannySetupContext("log_springs_h5", 0);
50390  __Pyx_TraceCall("log_springs_h5", __pyx_f[0], 2148, 0, __PYX_ERR(0, 2148, __pyx_L1_error));
50391 
50392  /* "mbd/CouplingFSI.pyx":2163
50393  *
50394  * # Open the log file
50395  * o_file = h5py.File('chrono_log.h5') # <<<<<<<<<<<<<<
50396  *
50397  * # Create the empty data holders
50398  */
50399  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_h5py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
50400  __Pyx_GOTREF(__pyx_t_2);
50401  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_File); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
50402  __Pyx_GOTREF(__pyx_t_3);
50403  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50404  __pyx_t_2 = NULL;
50405  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
50406  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
50407  if (likely(__pyx_t_2)) {
50408  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
50409  __Pyx_INCREF(__pyx_t_2);
50410  __Pyx_INCREF(function);
50411  __Pyx_DECREF_SET(__pyx_t_3, function);
50412  }
50413  }
50414  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_chrono_log_h5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_chrono_log_h5);
50415  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
50416  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error)
50417  __Pyx_GOTREF(__pyx_t_1);
50418  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50419  __pyx_v_o_file = __pyx_t_1;
50420  __pyx_t_1 = 0;
50421 
50422  /* "mbd/CouplingFSI.pyx":2166
50423  *
50424  * # Create the empty data holders
50425  * l_spring_data = [] # <<<<<<<<<<<<<<
50426  *
50427  * # Loop and write the body information
50428  */
50429  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2166, __pyx_L1_error)
50430  __Pyx_GOTREF(__pyx_t_1);
50431  __pyx_v_l_spring_data = ((PyObject*)__pyx_t_1);
50432  __pyx_t_1 = 0;
50433 
50434  /* "mbd/CouplingFSI.pyx":2169
50435  *
50436  * # Loop and write the body information
50437  * for i_entry_spring in range(0, len(l_springs), 1): # <<<<<<<<<<<<<<
50438  * # Get the current state of the spring
50439  * d_internal_force = l_springs[i_entry_spring].GetSpringReact()
50440  */
50441  __pyx_t_4 = PyObject_Length(__pyx_v_l_springs); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2169, __pyx_L1_error)
50442  __pyx_t_5 = __pyx_t_4;
50443  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
50444  __pyx_v_i_entry_spring = __pyx_t_6;
50445 
50446  /* "mbd/CouplingFSI.pyx":2171
50447  * for i_entry_spring in range(0, len(l_springs), 1):
50448  * # Get the current state of the spring
50449  * d_internal_force = l_springs[i_entry_spring].GetSpringReact() # <<<<<<<<<<<<<<
50450  * d_spring_velocity = l_springs[i_entry_spring].GetSpringVelocity()
50451  * d_spring_length = l_springs[i_entry_spring].GetSpringLength()
50452  */
50453  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_l_springs, __pyx_v_i_entry_spring, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2171, __pyx_L1_error)
50454  __Pyx_GOTREF(__pyx_t_3);
50455  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetSpringReact); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __pyx_L1_error)
50456  __Pyx_GOTREF(__pyx_t_2);
50457  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50458  __pyx_t_3 = NULL;
50459  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
50460  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
50461  if (likely(__pyx_t_3)) {
50462  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
50463  __Pyx_INCREF(__pyx_t_3);
50464  __Pyx_INCREF(function);
50465  __Pyx_DECREF_SET(__pyx_t_2, function);
50466  }
50467  }
50468  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
50469  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
50470  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2171, __pyx_L1_error)
50471  __Pyx_GOTREF(__pyx_t_1);
50472  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50473  __Pyx_XDECREF_SET(__pyx_v_d_internal_force, __pyx_t_1);
50474  __pyx_t_1 = 0;
50475 
50476  /* "mbd/CouplingFSI.pyx":2172
50477  * # Get the current state of the spring
50478  * d_internal_force = l_springs[i_entry_spring].GetSpringReact()
50479  * d_spring_velocity = l_springs[i_entry_spring].GetSpringVelocity() # <<<<<<<<<<<<<<
50480  * d_spring_length = l_springs[i_entry_spring].GetSpringLength()
50481  *
50482  */
50483  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_l_springs, __pyx_v_i_entry_spring, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2172, __pyx_L1_error)
50484  __Pyx_GOTREF(__pyx_t_2);
50485  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GetSpringVelocity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2172, __pyx_L1_error)
50486  __Pyx_GOTREF(__pyx_t_3);
50487  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50488  __pyx_t_2 = NULL;
50489  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
50490  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
50491  if (likely(__pyx_t_2)) {
50492  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
50493  __Pyx_INCREF(__pyx_t_2);
50494  __Pyx_INCREF(function);
50495  __Pyx_DECREF_SET(__pyx_t_3, function);
50496  }
50497  }
50498  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
50499  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
50500  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2172, __pyx_L1_error)
50501  __Pyx_GOTREF(__pyx_t_1);
50502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50503  __Pyx_XDECREF_SET(__pyx_v_d_spring_velocity, __pyx_t_1);
50504  __pyx_t_1 = 0;
50505 
50506  /* "mbd/CouplingFSI.pyx":2173
50507  * d_internal_force = l_springs[i_entry_spring].GetSpringReact()
50508  * d_spring_velocity = l_springs[i_entry_spring].GetSpringVelocity()
50509  * d_spring_length = l_springs[i_entry_spring].GetSpringLength() # <<<<<<<<<<<<<<
50510  *
50511  * # Write to the file
50512  */
50513  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_l_springs, __pyx_v_i_entry_spring, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2173, __pyx_L1_error)
50514  __Pyx_GOTREF(__pyx_t_3);
50515  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_GetSpringLength); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2173, __pyx_L1_error)
50516  __Pyx_GOTREF(__pyx_t_2);
50517  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50518  __pyx_t_3 = NULL;
50519  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
50520  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
50521  if (likely(__pyx_t_3)) {
50522  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
50523  __Pyx_INCREF(__pyx_t_3);
50524  __Pyx_INCREF(function);
50525  __Pyx_DECREF_SET(__pyx_t_2, function);
50526  }
50527  }
50528  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
50529  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
50530  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2173, __pyx_L1_error)
50531  __Pyx_GOTREF(__pyx_t_1);
50532  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50533  __Pyx_XDECREF_SET(__pyx_v_d_spring_length, __pyx_t_1);
50534  __pyx_t_1 = 0;
50535 
50536  /* "mbd/CouplingFSI.pyx":2176
50537  *
50538  * # Write to the file
50539  * l_spring_data.append([d_internal_force, d_spring_velocity, d_spring_length]) # <<<<<<<<<<<<<<
50540  *
50541  * # Log the spring data
50542  */
50543  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2176, __pyx_L1_error)
50544  __Pyx_GOTREF(__pyx_t_1);
50545  __Pyx_INCREF(__pyx_v_d_internal_force);
50546  __Pyx_GIVEREF(__pyx_v_d_internal_force);
50547  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_d_internal_force);
50548  __Pyx_INCREF(__pyx_v_d_spring_velocity);
50549  __Pyx_GIVEREF(__pyx_v_d_spring_velocity);
50550  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_v_d_spring_velocity);
50551  __Pyx_INCREF(__pyx_v_d_spring_length);
50552  __Pyx_GIVEREF(__pyx_v_d_spring_length);
50553  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_v_d_spring_length);
50554  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l_spring_data, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2176, __pyx_L1_error)
50555  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50556  }
50557 
50558  /* "mbd/CouplingFSI.pyx":2179
50559  *
50560  * # Log the spring data
50561  * try: # <<<<<<<<<<<<<<
50562  * # Open the dataset
50563  * dm_springs = o_file['springs']
50564  */
50565  {
50566  __Pyx_PyThreadState_declare
50567  __Pyx_PyThreadState_assign
50568  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
50569  __Pyx_XGOTREF(__pyx_t_8);
50570  __Pyx_XGOTREF(__pyx_t_9);
50571  __Pyx_XGOTREF(__pyx_t_10);
50572  /*try:*/ {
50573 
50574  /* "mbd/CouplingFSI.pyx":2181
50575  * try:
50576  * # Open the dataset
50577  * dm_springs = o_file['springs'] # <<<<<<<<<<<<<<
50578  *
50579  * # Resize the dataset
50580  */
50581  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_o_file, __pyx_n_s_springs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2181, __pyx_L5_error)
50582  __Pyx_GOTREF(__pyx_t_1);
50583  __pyx_v_dm_springs = __pyx_t_1;
50584  __pyx_t_1 = 0;
50585 
50586  /* "mbd/CouplingFSI.pyx":2184
50587  *
50588  * # Resize the dataset
50589  * i_index = dm_springs.shape[0] # <<<<<<<<<<<<<<
50590  * dm_springs.resize(dm_springs.shape[0] + 1, axis=0)
50591  *
50592  */
50593  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_springs, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __pyx_L5_error)
50594  __Pyx_GOTREF(__pyx_t_1);
50595  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2184, __pyx_L5_error)
50596  __Pyx_GOTREF(__pyx_t_2);
50597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50598  __pyx_v_i_index = __pyx_t_2;
50599  __pyx_t_2 = 0;
50600 
50601  /* "mbd/CouplingFSI.pyx":2185
50602  * # Resize the dataset
50603  * i_index = dm_springs.shape[0]
50604  * dm_springs.resize(dm_springs.shape[0] + 1, axis=0) # <<<<<<<<<<<<<<
50605  *
50606  * # Store the values into the dataset
50607  */
50608  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_springs, __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L5_error)
50609  __Pyx_GOTREF(__pyx_t_2);
50610  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_springs, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L5_error)
50611  __Pyx_GOTREF(__pyx_t_1);
50612  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L5_error)
50613  __Pyx_GOTREF(__pyx_t_3);
50614  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50615  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L5_error)
50616  __Pyx_GOTREF(__pyx_t_1);
50617  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50618  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L5_error)
50619  __Pyx_GOTREF(__pyx_t_3);
50620  __Pyx_GIVEREF(__pyx_t_1);
50621  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
50622  __pyx_t_1 = 0;
50623  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L5_error)
50624  __Pyx_GOTREF(__pyx_t_1);
50625  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2185, __pyx_L5_error)
50626  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2185, __pyx_L5_error)
50627  __Pyx_GOTREF(__pyx_t_11);
50628  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50629  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50630  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50631  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
50632 
50633  /* "mbd/CouplingFSI.pyx":2188
50634  *
50635  * # Store the values into the dataset
50636  * dm_springs[i_index, :, :] = np.array(l_spring_data) # <<<<<<<<<<<<<<
50637  *
50638  * except:
50639  */
50640  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2188, __pyx_L5_error)
50641  __Pyx_GOTREF(__pyx_t_1);
50642  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2188, __pyx_L5_error)
50643  __Pyx_GOTREF(__pyx_t_3);
50644  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50645  __pyx_t_1 = NULL;
50646  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
50647  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
50648  if (likely(__pyx_t_1)) {
50649  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
50650  __Pyx_INCREF(__pyx_t_1);
50651  __Pyx_INCREF(function);
50652  __Pyx_DECREF_SET(__pyx_t_3, function);
50653  }
50654  }
50655  __pyx_t_11 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_v_l_spring_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_l_spring_data);
50656  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
50657  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2188, __pyx_L5_error)
50658  __Pyx_GOTREF(__pyx_t_11);
50659  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50660  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2188, __pyx_L5_error)
50661  __Pyx_GOTREF(__pyx_t_3);
50662  __Pyx_INCREF(__pyx_v_i_index);
50663  __Pyx_GIVEREF(__pyx_v_i_index);
50664  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i_index);
50665  __Pyx_INCREF(__pyx_slice__30);
50666  __Pyx_GIVEREF(__pyx_slice__30);
50667  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_slice__30);
50668  __Pyx_INCREF(__pyx_slice__30);
50669  __Pyx_GIVEREF(__pyx_slice__30);
50670  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_slice__30);
50671  if (unlikely(PyObject_SetItem(__pyx_v_dm_springs, __pyx_t_3, __pyx_t_11) < 0)) __PYX_ERR(0, 2188, __pyx_L5_error)
50672  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50673  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
50674 
50675  /* "mbd/CouplingFSI.pyx":2179
50676  *
50677  * # Log the spring data
50678  * try: # <<<<<<<<<<<<<<
50679  * # Open the dataset
50680  * dm_springs = o_file['springs']
50681  */
50682  }
50683  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
50684  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
50685  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
50686  goto __pyx_L10_try_end;
50687  __pyx_L5_error:;
50688  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
50689  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
50690  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
50691  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
50692 
50693  /* "mbd/CouplingFSI.pyx":2190
50694  * dm_springs[i_index, :, :] = np.array(l_spring_data)
50695  *
50696  * except: # <<<<<<<<<<<<<<
50697  * # Create the initial dataset
50698  * dm_springs = o_file.create_dataset('springs', (1, len(l_spring_data), 3), compression="gzip",
50699  */
50700  /*except:*/ {
50701  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_springs_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
50702  if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 2190, __pyx_L7_except_error)
50703  __Pyx_GOTREF(__pyx_t_11);
50704  __Pyx_GOTREF(__pyx_t_3);
50705  __Pyx_GOTREF(__pyx_t_1);
50706 
50707  /* "mbd/CouplingFSI.pyx":2192
50708  * except:
50709  * # Create the initial dataset
50710  * dm_springs = o_file.create_dataset('springs', (1, len(l_spring_data), 3), compression="gzip", # <<<<<<<<<<<<<<
50711  * maxshape=(None, len(l_spring_data), 3), dtype=float)
50712  *
50713  */
50714  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50715  __Pyx_GOTREF(__pyx_t_2);
50716  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_spring_data); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50717  __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50718  __Pyx_GOTREF(__pyx_t_12);
50719  __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50720  __Pyx_GOTREF(__pyx_t_13);
50721  __Pyx_INCREF(__pyx_int_1);
50722  __Pyx_GIVEREF(__pyx_int_1);
50723  PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_int_1);
50724  __Pyx_GIVEREF(__pyx_t_12);
50725  PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_12);
50726  __Pyx_INCREF(__pyx_int_3);
50727  __Pyx_GIVEREF(__pyx_int_3);
50728  PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_int_3);
50729  __pyx_t_12 = 0;
50730  __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50731  __Pyx_GOTREF(__pyx_t_12);
50732  __Pyx_INCREF(__pyx_n_s_springs);
50733  __Pyx_GIVEREF(__pyx_n_s_springs);
50734  PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_n_s_springs);
50735  __Pyx_GIVEREF(__pyx_t_13);
50736  PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_13);
50737  __pyx_t_13 = 0;
50738  __pyx_t_13 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50739  __Pyx_GOTREF(__pyx_t_13);
50740  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_compression, __pyx_n_s_gzip) < 0) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50741 
50742  /* "mbd/CouplingFSI.pyx":2193
50743  * # Create the initial dataset
50744  * dm_springs = o_file.create_dataset('springs', (1, len(l_spring_data), 3), compression="gzip",
50745  * maxshape=(None, len(l_spring_data), 3), dtype=float) # <<<<<<<<<<<<<<
50746  *
50747  * # Store the first entry into the dataset
50748  */
50749  __pyx_t_4 = PyList_GET_SIZE(__pyx_v_l_spring_data); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2193, __pyx_L7_except_error)
50750  __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2193, __pyx_L7_except_error)
50751  __Pyx_GOTREF(__pyx_t_14);
50752  __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2193, __pyx_L7_except_error)
50753  __Pyx_GOTREF(__pyx_t_15);
50754  __Pyx_INCREF(Py_None);
50755  __Pyx_GIVEREF(Py_None);
50756  PyTuple_SET_ITEM(__pyx_t_15, 0, Py_None);
50757  __Pyx_GIVEREF(__pyx_t_14);
50758  PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_14);
50759  __Pyx_INCREF(__pyx_int_3);
50760  __Pyx_GIVEREF(__pyx_int_3);
50761  PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_int_3);
50762  __pyx_t_14 = 0;
50763  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_maxshape, __pyx_t_15) < 0) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50764  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
50765  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50766 
50767  /* "mbd/CouplingFSI.pyx":2192
50768  * except:
50769  * # Create the initial dataset
50770  * dm_springs = o_file.create_dataset('springs', (1, len(l_spring_data), 3), compression="gzip", # <<<<<<<<<<<<<<
50771  * maxshape=(None, len(l_spring_data), 3), dtype=float)
50772  *
50773  */
50774  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2192, __pyx_L7_except_error)
50775  __Pyx_GOTREF(__pyx_t_15);
50776  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
50777  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
50778  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
50779  __Pyx_XDECREF_SET(__pyx_v_dm_springs, __pyx_t_15);
50780  __pyx_t_15 = 0;
50781 
50782  /* "mbd/CouplingFSI.pyx":2196
50783  *
50784  * # Store the first entry into the dataset
50785  * dm_springs[0, :, :] = np.array(l_spring_data) # <<<<<<<<<<<<<<
50786  *
50787  * # Close the output file
50788  */
50789  __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_np); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2196, __pyx_L7_except_error)
50790  __Pyx_GOTREF(__pyx_t_13);
50791  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_array); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2196, __pyx_L7_except_error)
50792  __Pyx_GOTREF(__pyx_t_12);
50793  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
50794  __pyx_t_13 = NULL;
50795  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
50796  __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
50797  if (likely(__pyx_t_13)) {
50798  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
50799  __Pyx_INCREF(__pyx_t_13);
50800  __Pyx_INCREF(function);
50801  __Pyx_DECREF_SET(__pyx_t_12, function);
50802  }
50803  }
50804  __pyx_t_15 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_13, __pyx_v_l_spring_data) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_l_spring_data);
50805  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
50806  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2196, __pyx_L7_except_error)
50807  __Pyx_GOTREF(__pyx_t_15);
50808  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
50809  if (unlikely(PyObject_SetItem(__pyx_v_dm_springs, __pyx_tuple__129, __pyx_t_15) < 0)) __PYX_ERR(0, 2196, __pyx_L7_except_error)
50810  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
50811  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
50812  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
50813  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
50814  goto __pyx_L6_exception_handled;
50815  }
50816  __pyx_L7_except_error:;
50817 
50818  /* "mbd/CouplingFSI.pyx":2179
50819  *
50820  * # Log the spring data
50821  * try: # <<<<<<<<<<<<<<
50822  * # Open the dataset
50823  * dm_springs = o_file['springs']
50824  */
50825  __Pyx_XGIVEREF(__pyx_t_8);
50826  __Pyx_XGIVEREF(__pyx_t_9);
50827  __Pyx_XGIVEREF(__pyx_t_10);
50828  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
50829  goto __pyx_L1_error;
50830  __pyx_L6_exception_handled:;
50831  __Pyx_XGIVEREF(__pyx_t_8);
50832  __Pyx_XGIVEREF(__pyx_t_9);
50833  __Pyx_XGIVEREF(__pyx_t_10);
50834  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
50835  __pyx_L10_try_end:;
50836  }
50837 
50838  /* "mbd/CouplingFSI.pyx":2199
50839  *
50840  * # Close the output file
50841  * o_file.close() # <<<<<<<<<<<<<<
50842  *
50843  * def log_residuals_text(self, d_time, l_linklocks):
50844  */
50845  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2199, __pyx_L1_error)
50846  __Pyx_GOTREF(__pyx_t_3);
50847  __pyx_t_11 = NULL;
50848  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
50849  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
50850  if (likely(__pyx_t_11)) {
50851  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
50852  __Pyx_INCREF(__pyx_t_11);
50853  __Pyx_INCREF(function);
50854  __Pyx_DECREF_SET(__pyx_t_3, function);
50855  }
50856  }
50857  __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
50858  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
50859  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2199, __pyx_L1_error)
50860  __Pyx_GOTREF(__pyx_t_1);
50861  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
50862  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
50863 
50864  /* "mbd/CouplingFSI.pyx":2148
50865  *
50866  *
50867  * def log_springs_h5(self, l_springs): # <<<<<<<<<<<<<<
50868  * """
50869  * Logs chrono spring information to an h5 file
50870  */
50871 
50872  /* function exit code */
50873  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
50874  goto __pyx_L0;
50875  __pyx_L1_error:;
50876  __Pyx_XDECREF(__pyx_t_1);
50877  __Pyx_XDECREF(__pyx_t_2);
50878  __Pyx_XDECREF(__pyx_t_3);
50879  __Pyx_XDECREF(__pyx_t_11);
50880  __Pyx_XDECREF(__pyx_t_12);
50881  __Pyx_XDECREF(__pyx_t_13);
50882  __Pyx_XDECREF(__pyx_t_14);
50883  __Pyx_XDECREF(__pyx_t_15);
50884  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_springs_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
50885  __pyx_r = NULL;
50886  __pyx_L0:;
50887  __Pyx_XDECREF(__pyx_v_o_file);
50888  __Pyx_XDECREF(__pyx_v_l_spring_data);
50889  __Pyx_XDECREF(__pyx_v_d_internal_force);
50890  __Pyx_XDECREF(__pyx_v_d_spring_velocity);
50891  __Pyx_XDECREF(__pyx_v_d_spring_length);
50892  __Pyx_XDECREF(__pyx_v_dm_springs);
50893  __Pyx_XDECREF(__pyx_v_i_index);
50894  __Pyx_XGIVEREF(__pyx_r);
50895  __Pyx_TraceReturn(__pyx_r, 0);
50896  __Pyx_RefNannyFinishContext();
50897  return __pyx_r;
50898 }
50899 
50900 /* "mbd/CouplingFSI.pyx":2201
50901  * o_file.close()
50902  *
50903  * def log_residuals_text(self, d_time, l_linklocks): # <<<<<<<<<<<<<<
50904  * """
50905  * Logs the chrono information into a text file at each timestep
50906  */
50907 
50908 /* Python wrapper */
50909 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_53log_residuals_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
50910 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_52log_residuals_text[] = "ProtChSystem.log_residuals_text(self, d_time, l_linklocks)\n\n Logs the chrono information into a text file at each timestep\n Parameters\n ----------\n self: object\n ProtChSystem being referenced\n d_time: float\n Current simulation time\n l_linklocks: list\n Link lock objects for which the residual information is desired.\n Returns\n -------\n None. Data is saved to a text file.\n ";
50911 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_53log_residuals_text = {"log_residuals_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_53log_residuals_text, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_52log_residuals_text};
50912 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_53log_residuals_text(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
50913  PyObject *__pyx_v_d_time = 0;
50914  PyObject *__pyx_v_l_linklocks = 0;
50915  int __pyx_lineno = 0;
50916  const char *__pyx_filename = NULL;
50917  int __pyx_clineno = 0;
50918  PyObject *__pyx_r = 0;
50919  __Pyx_RefNannyDeclarations
50920  __Pyx_RefNannySetupContext("log_residuals_text (wrapper)", 0);
50921  {
50922  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_d_time,&__pyx_n_s_l_linklocks,0};
50923  PyObject* values[2] = {0,0};
50924  if (unlikely(__pyx_kwds)) {
50925  Py_ssize_t kw_args;
50926  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
50927  switch (pos_args) {
50928  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
50929  CYTHON_FALLTHROUGH;
50930  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
50931  CYTHON_FALLTHROUGH;
50932  case 0: break;
50933  default: goto __pyx_L5_argtuple_error;
50934  }
50935  kw_args = PyDict_Size(__pyx_kwds);
50936  switch (pos_args) {
50937  case 0:
50938  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d_time)) != 0)) kw_args--;
50939  else goto __pyx_L5_argtuple_error;
50940  CYTHON_FALLTHROUGH;
50941  case 1:
50942  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l_linklocks)) != 0)) kw_args--;
50943  else {
50944  __Pyx_RaiseArgtupleInvalid("log_residuals_text", 1, 2, 2, 1); __PYX_ERR(0, 2201, __pyx_L3_error)
50945  }
50946  }
50947  if (unlikely(kw_args > 0)) {
50948  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "log_residuals_text") < 0)) __PYX_ERR(0, 2201, __pyx_L3_error)
50949  }
50950  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
50951  goto __pyx_L5_argtuple_error;
50952  } else {
50953  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
50954  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
50955  }
50956  __pyx_v_d_time = values[0];
50957  __pyx_v_l_linklocks = values[1];
50958  }
50959  goto __pyx_L4_argument_unpacking_done;
50960  __pyx_L5_argtuple_error:;
50961  __Pyx_RaiseArgtupleInvalid("log_residuals_text", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2201, __pyx_L3_error)
50962  __pyx_L3_error:;
50963  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_residuals_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
50964  __Pyx_RefNannyFinishContext();
50965  return NULL;
50966  __pyx_L4_argument_unpacking_done:;
50967  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_52log_residuals_text(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), __pyx_v_d_time, __pyx_v_l_linklocks);
50968 
50969  /* function exit code */
50970  __Pyx_RefNannyFinishContext();
50971  return __pyx_r;
50972 }
50973 
50974 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_52log_residuals_text(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time, PyObject *__pyx_v_l_linklocks) {
50975  PyObject *__pyx_v_i_entry_linkage = NULL;
50976  PyObject *__pyx_v_s_filename = NULL;
50977  PyObject *__pyx_v_o_file = NULL;
50978  PyObject *__pyx_v_o_linkage_residual = NULL;
50979  PyObject *__pyx_v_s_residuals = NULL;
50980  PyObject *__pyx_v_i_entry_residual = NULL;
50981  PyObject *__pyx_r = NULL;
50982  __Pyx_TraceDeclarations
50983  __Pyx_RefNannyDeclarations
50984  Py_ssize_t __pyx_t_1;
50985  PyObject *__pyx_t_2 = NULL;
50986  PyObject *__pyx_t_3 = NULL;
50987  PyObject *(*__pyx_t_4)(PyObject *);
50988  PyObject *__pyx_t_5 = NULL;
50989  PyObject *__pyx_t_6 = NULL;
50990  long __pyx_t_7;
50991  PyObject *__pyx_t_8 = NULL;
50992  PyObject *__pyx_t_9 = NULL;
50993  PyObject *__pyx_t_10 = NULL;
50994  int __pyx_t_11;
50995  PyObject *__pyx_t_12 = NULL;
50996  PyObject *__pyx_t_13 = NULL;
50997  int __pyx_lineno = 0;
50998  const char *__pyx_filename = NULL;
50999  int __pyx_clineno = 0;
51000  __Pyx_TraceFrameInit(__pyx_codeobj__132)
51001  __Pyx_RefNannySetupContext("log_residuals_text", 0);
51002  __Pyx_TraceCall("log_residuals_text", __pyx_f[0], 2201, 0, __PYX_ERR(0, 2201, __pyx_L1_error));
51003 
51004  /* "mbd/CouplingFSI.pyx":2218
51005  *
51006  * # Loop and write the body information
51007  * for i_entry_linkage in range(0, len(l_linklocks), 1): # <<<<<<<<<<<<<<
51008  * # Open the file
51009  * s_filename = 'chrono_' + str(i_entry_linkage) + '.txt'
51010  */
51011  __pyx_t_1 = PyObject_Length(__pyx_v_l_linklocks); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2218, __pyx_L1_error)
51012  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error)
51013  __Pyx_GOTREF(__pyx_t_2);
51014  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2218, __pyx_L1_error)
51015  __Pyx_GOTREF(__pyx_t_3);
51016  __Pyx_INCREF(__pyx_int_0);
51017  __Pyx_GIVEREF(__pyx_int_0);
51018  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
51019  __Pyx_GIVEREF(__pyx_t_2);
51020  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
51021  __Pyx_INCREF(__pyx_int_1);
51022  __Pyx_GIVEREF(__pyx_int_1);
51023  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_1);
51024  __pyx_t_2 = 0;
51025  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error)
51026  __Pyx_GOTREF(__pyx_t_2);
51027  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51028  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
51029  __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
51030  __pyx_t_4 = NULL;
51031  } else {
51032  __pyx_t_1 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2218, __pyx_L1_error)
51033  __Pyx_GOTREF(__pyx_t_3);
51034  __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2218, __pyx_L1_error)
51035  }
51036  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51037  for (;;) {
51038  if (likely(!__pyx_t_4)) {
51039  if (likely(PyList_CheckExact(__pyx_t_3))) {
51040  if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_3)) break;
51041  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
51042  __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, 2218, __pyx_L1_error)
51043  #else
51044  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error)
51045  __Pyx_GOTREF(__pyx_t_2);
51046  #endif
51047  } else {
51048  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
51049  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
51050  __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, 2218, __pyx_L1_error)
51051  #else
51052  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2218, __pyx_L1_error)
51053  __Pyx_GOTREF(__pyx_t_2);
51054  #endif
51055  }
51056  } else {
51057  __pyx_t_2 = __pyx_t_4(__pyx_t_3);
51058  if (unlikely(!__pyx_t_2)) {
51059  PyObject* exc_type = PyErr_Occurred();
51060  if (exc_type) {
51061  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
51062  else __PYX_ERR(0, 2218, __pyx_L1_error)
51063  }
51064  break;
51065  }
51066  __Pyx_GOTREF(__pyx_t_2);
51067  }
51068  __Pyx_XDECREF_SET(__pyx_v_i_entry_linkage, __pyx_t_2);
51069  __pyx_t_2 = 0;
51070 
51071  /* "mbd/CouplingFSI.pyx":2220
51072  * for i_entry_linkage in range(0, len(l_linklocks), 1):
51073  * # Open the file
51074  * s_filename = 'chrono_' + str(i_entry_linkage) + '.txt' # <<<<<<<<<<<<<<
51075  * o_file = open(s_filename, 'a+')
51076  *
51077  */
51078  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_i_entry_linkage); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2220, __pyx_L1_error)
51079  __Pyx_GOTREF(__pyx_t_2);
51080  __pyx_t_5 = PyNumber_Add(__pyx_n_s_chrono_2, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2220, __pyx_L1_error)
51081  __Pyx_GOTREF(__pyx_t_5);
51082  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51083  __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_txt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2220, __pyx_L1_error)
51084  __Pyx_GOTREF(__pyx_t_2);
51085  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51086  __Pyx_XDECREF_SET(__pyx_v_s_filename, __pyx_t_2);
51087  __pyx_t_2 = 0;
51088 
51089  /* "mbd/CouplingFSI.pyx":2221
51090  * # Open the file
51091  * s_filename = 'chrono_' + str(i_entry_linkage) + '.txt'
51092  * o_file = open(s_filename, 'a+') # <<<<<<<<<<<<<<
51093  *
51094  * # Get the residual matrix from the linkage
51095  */
51096  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2221, __pyx_L1_error)
51097  __Pyx_GOTREF(__pyx_t_2);
51098  __Pyx_INCREF(__pyx_v_s_filename);
51099  __Pyx_GIVEREF(__pyx_v_s_filename);
51100  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_s_filename);
51101  __Pyx_INCREF(__pyx_kp_s_a_2);
51102  __Pyx_GIVEREF(__pyx_kp_s_a_2);
51103  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_a_2);
51104  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2221, __pyx_L1_error)
51105  __Pyx_GOTREF(__pyx_t_5);
51106  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51107  __Pyx_XDECREF_SET(__pyx_v_o_file, __pyx_t_5);
51108  __pyx_t_5 = 0;
51109 
51110  /* "mbd/CouplingFSI.pyx":2224
51111  *
51112  * # Get the residual matrix from the linkage
51113  * o_linkage_residual = l_linklocks[i_entry_linkage].GetC() # <<<<<<<<<<<<<<
51114  *
51115  * # The number of residual components will vary based on the the number of active dimensions in the domain.
51116  */
51117  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_l_linklocks, __pyx_v_i_entry_linkage); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2224, __pyx_L1_error)
51118  __Pyx_GOTREF(__pyx_t_2);
51119  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GetC); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2224, __pyx_L1_error)
51120  __Pyx_GOTREF(__pyx_t_6);
51121  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51122  __pyx_t_2 = NULL;
51123  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
51124  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
51125  if (likely(__pyx_t_2)) {
51126  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
51127  __Pyx_INCREF(__pyx_t_2);
51128  __Pyx_INCREF(function);
51129  __Pyx_DECREF_SET(__pyx_t_6, function);
51130  }
51131  }
51132  __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
51133  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51134  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2224, __pyx_L1_error)
51135  __Pyx_GOTREF(__pyx_t_5);
51136  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
51137  __Pyx_XDECREF_SET(__pyx_v_o_linkage_residual, __pyx_t_5);
51138  __pyx_t_5 = 0;
51139 
51140  /* "mbd/CouplingFSI.pyx":2228
51141  * # The number of residual components will vary based on the the number of active dimensions in the domain.
51142  * # Attempt to get each component and write zeros for the remainder for consistency of the code.
51143  * s_residuals = str(d_time) + '\t' # <<<<<<<<<<<<<<
51144  *
51145  * for i_entry_residual in range(0, 6, 1):
51146  */
51147  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_d_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2228, __pyx_L1_error)
51148  __Pyx_GOTREF(__pyx_t_5);
51149  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__125); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2228, __pyx_L1_error)
51150  __Pyx_GOTREF(__pyx_t_6);
51151  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51152  __Pyx_XDECREF_SET(__pyx_v_s_residuals, __pyx_t_6);
51153  __pyx_t_6 = 0;
51154 
51155  /* "mbd/CouplingFSI.pyx":2230
51156  * s_residuals = str(d_time) + '\t'
51157  *
51158  * for i_entry_residual in range(0, 6, 1): # <<<<<<<<<<<<<<
51159  * try:
51160  * # Attempt to extract the value from the Chrono matrix
51161  */
51162  for (__pyx_t_7 = 0; __pyx_t_7 < 6; __pyx_t_7+=1) {
51163  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2230, __pyx_L1_error)
51164  __Pyx_GOTREF(__pyx_t_6);
51165  __Pyx_XDECREF_SET(__pyx_v_i_entry_residual, __pyx_t_6);
51166  __pyx_t_6 = 0;
51167 
51168  /* "mbd/CouplingFSI.pyx":2231
51169  *
51170  * for i_entry_residual in range(0, 6, 1):
51171  * try: # <<<<<<<<<<<<<<
51172  * # Attempt to extract the value from the Chrono matrix
51173  * s_residuals += str(o_linkage_residual.GetElement(0, i_entry_residual)) + '\t'
51174  */
51175  {
51176  __Pyx_PyThreadState_declare
51177  __Pyx_PyThreadState_assign
51178  __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
51179  __Pyx_XGOTREF(__pyx_t_8);
51180  __Pyx_XGOTREF(__pyx_t_9);
51181  __Pyx_XGOTREF(__pyx_t_10);
51182  /*try:*/ {
51183 
51184  /* "mbd/CouplingFSI.pyx":2233
51185  * try:
51186  * # Attempt to extract the value from the Chrono matrix
51187  * s_residuals += str(o_linkage_residual.GetElement(0, i_entry_residual)) + '\t' # <<<<<<<<<<<<<<
51188  *
51189  * except:
51190  */
51191  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_linkage_residual, __pyx_n_s_GetElement); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2233, __pyx_L7_error)
51192  __Pyx_GOTREF(__pyx_t_5);
51193  __pyx_t_2 = NULL;
51194  __pyx_t_11 = 0;
51195  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
51196  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
51197  if (likely(__pyx_t_2)) {
51198  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
51199  __Pyx_INCREF(__pyx_t_2);
51200  __Pyx_INCREF(function);
51201  __Pyx_DECREF_SET(__pyx_t_5, function);
51202  __pyx_t_11 = 1;
51203  }
51204  }
51205  #if CYTHON_FAST_PYCALL
51206  if (PyFunction_Check(__pyx_t_5)) {
51207  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_int_0, __pyx_v_i_entry_residual};
51208  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2233, __pyx_L7_error)
51209  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51210  __Pyx_GOTREF(__pyx_t_6);
51211  } else
51212  #endif
51213  #if CYTHON_FAST_PYCCALL
51214  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
51215  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_int_0, __pyx_v_i_entry_residual};
51216  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2233, __pyx_L7_error)
51217  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51218  __Pyx_GOTREF(__pyx_t_6);
51219  } else
51220  #endif
51221  {
51222  __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2233, __pyx_L7_error)
51223  __Pyx_GOTREF(__pyx_t_12);
51224  if (__pyx_t_2) {
51225  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); __pyx_t_2 = NULL;
51226  }
51227  __Pyx_INCREF(__pyx_int_0);
51228  __Pyx_GIVEREF(__pyx_int_0);
51229  PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_int_0);
51230  __Pyx_INCREF(__pyx_v_i_entry_residual);
51231  __Pyx_GIVEREF(__pyx_v_i_entry_residual);
51232  PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v_i_entry_residual);
51233  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2233, __pyx_L7_error)
51234  __Pyx_GOTREF(__pyx_t_6);
51235  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
51236  }
51237  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51238  __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2233, __pyx_L7_error)
51239  __Pyx_GOTREF(__pyx_t_5);
51240  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
51241  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__125); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2233, __pyx_L7_error)
51242  __Pyx_GOTREF(__pyx_t_6);
51243  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51244  __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_s_residuals, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2233, __pyx_L7_error)
51245  __Pyx_GOTREF(__pyx_t_5);
51246  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
51247  __Pyx_DECREF_SET(__pyx_v_s_residuals, __pyx_t_5);
51248  __pyx_t_5 = 0;
51249 
51250  /* "mbd/CouplingFSI.pyx":2231
51251  *
51252  * for i_entry_residual in range(0, 6, 1):
51253  * try: # <<<<<<<<<<<<<<
51254  * # Attempt to extract the value from the Chrono matrix
51255  * s_residuals += str(o_linkage_residual.GetElement(0, i_entry_residual)) + '\t'
51256  */
51257  }
51258  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
51259  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
51260  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
51261  goto __pyx_L14_try_end;
51262  __pyx_L7_error:;
51263  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
51264  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51265  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
51266  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
51267 
51268  /* "mbd/CouplingFSI.pyx":2235
51269  * s_residuals += str(o_linkage_residual.GetElement(0, i_entry_residual)) + '\t'
51270  *
51271  * except: # <<<<<<<<<<<<<<
51272  * # Residual doesn't exist. Keep the zero in the array.
51273  * s_residuals += str(0.000) + '\t'
51274  */
51275  /*except:*/ {
51276  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_residuals_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
51277  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_12) < 0) __PYX_ERR(0, 2235, __pyx_L9_except_error)
51278  __Pyx_GOTREF(__pyx_t_5);
51279  __Pyx_GOTREF(__pyx_t_6);
51280  __Pyx_GOTREF(__pyx_t_12);
51281 
51282  /* "mbd/CouplingFSI.pyx":2237
51283  * except:
51284  * # Residual doesn't exist. Keep the zero in the array.
51285  * s_residuals += str(0.000) + '\t' # <<<<<<<<<<<<<<
51286  *
51287  * # Add the new line to the code, replacing the last tab
51288  */
51289  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_tuple__133, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2237, __pyx_L9_except_error)
51290  __Pyx_GOTREF(__pyx_t_2);
51291  __pyx_t_13 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__125); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2237, __pyx_L9_except_error)
51292  __Pyx_GOTREF(__pyx_t_13);
51293  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51294  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_s_residuals, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2237, __pyx_L9_except_error)
51295  __Pyx_GOTREF(__pyx_t_2);
51296  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
51297  __Pyx_DECREF_SET(__pyx_v_s_residuals, __pyx_t_2);
51298  __pyx_t_2 = 0;
51299  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
51300  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
51301  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
51302  goto __pyx_L8_exception_handled;
51303  }
51304  __pyx_L9_except_error:;
51305 
51306  /* "mbd/CouplingFSI.pyx":2231
51307  *
51308  * for i_entry_residual in range(0, 6, 1):
51309  * try: # <<<<<<<<<<<<<<
51310  * # Attempt to extract the value from the Chrono matrix
51311  * s_residuals += str(o_linkage_residual.GetElement(0, i_entry_residual)) + '\t'
51312  */
51313  __Pyx_XGIVEREF(__pyx_t_8);
51314  __Pyx_XGIVEREF(__pyx_t_9);
51315  __Pyx_XGIVEREF(__pyx_t_10);
51316  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
51317  goto __pyx_L1_error;
51318  __pyx_L8_exception_handled:;
51319  __Pyx_XGIVEREF(__pyx_t_8);
51320  __Pyx_XGIVEREF(__pyx_t_9);
51321  __Pyx_XGIVEREF(__pyx_t_10);
51322  __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
51323  __pyx_L14_try_end:;
51324  }
51325  }
51326 
51327  /* "mbd/CouplingFSI.pyx":2240
51328  *
51329  * # Add the new line to the code, replacing the last tab
51330  * s_residuals += '\n' # <<<<<<<<<<<<<<
51331  *
51332  * # Write to the file
51333  */
51334  __pyx_t_12 = PyNumber_InPlaceAdd(__pyx_v_s_residuals, __pyx_kp_s__126); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2240, __pyx_L1_error)
51335  __Pyx_GOTREF(__pyx_t_12);
51336  __Pyx_DECREF_SET(__pyx_v_s_residuals, __pyx_t_12);
51337  __pyx_t_12 = 0;
51338 
51339  /* "mbd/CouplingFSI.pyx":2243
51340  *
51341  * # Write to the file
51342  * o_file.write(s_residuals) # <<<<<<<<<<<<<<
51343  *
51344  * # Close the output file
51345  */
51346  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_write); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2243, __pyx_L1_error)
51347  __Pyx_GOTREF(__pyx_t_6);
51348  __pyx_t_5 = NULL;
51349  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
51350  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
51351  if (likely(__pyx_t_5)) {
51352  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
51353  __Pyx_INCREF(__pyx_t_5);
51354  __Pyx_INCREF(function);
51355  __Pyx_DECREF_SET(__pyx_t_6, function);
51356  }
51357  }
51358  __pyx_t_12 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v_s_residuals) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_s_residuals);
51359  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
51360  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2243, __pyx_L1_error)
51361  __Pyx_GOTREF(__pyx_t_12);
51362  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
51363  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
51364 
51365  /* "mbd/CouplingFSI.pyx":2218
51366  *
51367  * # Loop and write the body information
51368  * for i_entry_linkage in range(0, len(l_linklocks), 1): # <<<<<<<<<<<<<<
51369  * # Open the file
51370  * s_filename = 'chrono_' + str(i_entry_linkage) + '.txt'
51371  */
51372  }
51373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51374 
51375  /* "mbd/CouplingFSI.pyx":2246
51376  *
51377  * # Close the output file
51378  * o_file.close() # <<<<<<<<<<<<<<
51379  *
51380  * def log_residuals_h5(self, l_linklocks):
51381  */
51382  if (unlikely(!__pyx_v_o_file)) { __Pyx_RaiseUnboundLocalError("o_file"); __PYX_ERR(0, 2246, __pyx_L1_error) }
51383  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_close); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2246, __pyx_L1_error)
51384  __Pyx_GOTREF(__pyx_t_12);
51385  __pyx_t_6 = NULL;
51386  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
51387  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
51388  if (likely(__pyx_t_6)) {
51389  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
51390  __Pyx_INCREF(__pyx_t_6);
51391  __Pyx_INCREF(function);
51392  __Pyx_DECREF_SET(__pyx_t_12, function);
51393  }
51394  }
51395  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_12);
51396  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
51397  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2246, __pyx_L1_error)
51398  __Pyx_GOTREF(__pyx_t_3);
51399  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
51400  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51401 
51402  /* "mbd/CouplingFSI.pyx":2201
51403  * o_file.close()
51404  *
51405  * def log_residuals_text(self, d_time, l_linklocks): # <<<<<<<<<<<<<<
51406  * """
51407  * Logs the chrono information into a text file at each timestep
51408  */
51409 
51410  /* function exit code */
51411  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
51412  goto __pyx_L0;
51413  __pyx_L1_error:;
51414  __Pyx_XDECREF(__pyx_t_2);
51415  __Pyx_XDECREF(__pyx_t_3);
51416  __Pyx_XDECREF(__pyx_t_5);
51417  __Pyx_XDECREF(__pyx_t_6);
51418  __Pyx_XDECREF(__pyx_t_12);
51419  __Pyx_XDECREF(__pyx_t_13);
51420  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_residuals_text", __pyx_clineno, __pyx_lineno, __pyx_filename);
51421  __pyx_r = NULL;
51422  __pyx_L0:;
51423  __Pyx_XDECREF(__pyx_v_i_entry_linkage);
51424  __Pyx_XDECREF(__pyx_v_s_filename);
51425  __Pyx_XDECREF(__pyx_v_o_file);
51426  __Pyx_XDECREF(__pyx_v_o_linkage_residual);
51427  __Pyx_XDECREF(__pyx_v_s_residuals);
51428  __Pyx_XDECREF(__pyx_v_i_entry_residual);
51429  __Pyx_XGIVEREF(__pyx_r);
51430  __Pyx_TraceReturn(__pyx_r, 0);
51431  __Pyx_RefNannyFinishContext();
51432  return __pyx_r;
51433 }
51434 
51435 /* "mbd/CouplingFSI.pyx":2248
51436  * o_file.close()
51437  *
51438  * def log_residuals_h5(self, l_linklocks): # <<<<<<<<<<<<<<
51439  * """
51440  * Logs chrono spring information to an h5 file
51441  */
51442 
51443 /* Python wrapper */
51444 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_55log_residuals_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_l_linklocks); /*proto*/
51445 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_54log_residuals_h5[] = "ProtChSystem.log_residuals_h5(self, l_linklocks)\n\n Logs chrono spring information to an h5 file\n Parameters\n ----------\n self: object\n ProtChSystem object being referenced.\n l_linklocks: list\n Link lock objects for which the residual information is desired.\n Returns\n -------\n None. Data is logged to an h5 file.\n ";
51446 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_55log_residuals_h5 = {"log_residuals_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_55log_residuals_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_54log_residuals_h5};
51447 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_55log_residuals_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_l_linklocks) {
51448  PyObject *__pyx_r = 0;
51449  __Pyx_RefNannyDeclarations
51450  __Pyx_RefNannySetupContext("log_residuals_h5 (wrapper)", 0);
51451  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_54log_residuals_h5(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_l_linklocks));
51452 
51453  /* function exit code */
51454  __Pyx_RefNannyFinishContext();
51455  return __pyx_r;
51456 }
51457 
51458 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_54log_residuals_h5(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_l_linklocks) {
51459  PyObject *__pyx_v_o_file = NULL;
51460  PyObject *__pyx_v_dm_residuals = NULL;
51461  Py_ssize_t __pyx_v_i_entry_linkage;
51462  PyObject *__pyx_v_o_linkage_residual = NULL;
51463  long __pyx_v_i_entry_residual;
51464  PyObject *__pyx_v_dm_residuals_h5 = NULL;
51465  PyObject *__pyx_v_i_index = NULL;
51466  PyObject *__pyx_r = NULL;
51467  __Pyx_TraceDeclarations
51468  __Pyx_RefNannyDeclarations
51469  PyObject *__pyx_t_1 = NULL;
51470  PyObject *__pyx_t_2 = NULL;
51471  PyObject *__pyx_t_3 = NULL;
51472  Py_ssize_t __pyx_t_4;
51473  PyObject *__pyx_t_5 = NULL;
51474  Py_ssize_t __pyx_t_6;
51475  Py_ssize_t __pyx_t_7;
51476  long __pyx_t_8;
51477  PyObject *__pyx_t_9 = NULL;
51478  PyObject *__pyx_t_10 = NULL;
51479  PyObject *__pyx_t_11 = NULL;
51480  int __pyx_t_12;
51481  PyObject *__pyx_t_13 = NULL;
51482  PyObject *__pyx_t_14 = NULL;
51483  PyObject *__pyx_t_15 = NULL;
51484  PyObject *__pyx_t_16 = NULL;
51485  int __pyx_lineno = 0;
51486  const char *__pyx_filename = NULL;
51487  int __pyx_clineno = 0;
51488  __Pyx_TraceFrameInit(__pyx_codeobj__134)
51489  __Pyx_RefNannySetupContext("log_residuals_h5", 0);
51490  __Pyx_TraceCall("log_residuals_h5", __pyx_f[0], 2248, 0, __PYX_ERR(0, 2248, __pyx_L1_error));
51491 
51492  /* "mbd/CouplingFSI.pyx":2263
51493  *
51494  * # Open the log file
51495  * o_file = h5py.File('chrono_log.h5') # <<<<<<<<<<<<<<
51496  *
51497  * # The number of residual components will vary based on the the number of active dimensions in the domain.
51498  */
51499  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_h5py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2263, __pyx_L1_error)
51500  __Pyx_GOTREF(__pyx_t_2);
51501  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_File); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2263, __pyx_L1_error)
51502  __Pyx_GOTREF(__pyx_t_3);
51503  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51504  __pyx_t_2 = NULL;
51505  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
51506  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
51507  if (likely(__pyx_t_2)) {
51508  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
51509  __Pyx_INCREF(__pyx_t_2);
51510  __Pyx_INCREF(function);
51511  __Pyx_DECREF_SET(__pyx_t_3, function);
51512  }
51513  }
51514  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_chrono_log_h5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_chrono_log_h5);
51515  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51516  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2263, __pyx_L1_error)
51517  __Pyx_GOTREF(__pyx_t_1);
51518  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51519  __pyx_v_o_file = __pyx_t_1;
51520  __pyx_t_1 = 0;
51521 
51522  /* "mbd/CouplingFSI.pyx":2267
51523  * # The number of residual components will vary based on the the number of active dimensions in the domain.
51524  * # Attempt to get each component and write zeros for the remainder for consistency of the code.
51525  * dm_residuals = np.zeros((len(l_linklocks), 6)) # <<<<<<<<<<<<<<
51526  *
51527  * for i_entry_linkage in range(0, len(l_linklocks), 1):
51528  */
51529  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
51530  __Pyx_GOTREF(__pyx_t_3);
51531  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __pyx_L1_error)
51532  __Pyx_GOTREF(__pyx_t_2);
51533  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51534  __pyx_t_4 = PyObject_Length(__pyx_v_l_linklocks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2267, __pyx_L1_error)
51535  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
51536  __Pyx_GOTREF(__pyx_t_3);
51537  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2267, __pyx_L1_error)
51538  __Pyx_GOTREF(__pyx_t_5);
51539  __Pyx_GIVEREF(__pyx_t_3);
51540  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
51541  __Pyx_INCREF(__pyx_int_6);
51542  __Pyx_GIVEREF(__pyx_int_6);
51543  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_6);
51544  __pyx_t_3 = 0;
51545  __pyx_t_3 = NULL;
51546  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
51547  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
51548  if (likely(__pyx_t_3)) {
51549  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
51550  __Pyx_INCREF(__pyx_t_3);
51551  __Pyx_INCREF(function);
51552  __Pyx_DECREF_SET(__pyx_t_2, function);
51553  }
51554  }
51555  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5);
51556  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51557  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51558  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2267, __pyx_L1_error)
51559  __Pyx_GOTREF(__pyx_t_1);
51560  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51561  __pyx_v_dm_residuals = __pyx_t_1;
51562  __pyx_t_1 = 0;
51563 
51564  /* "mbd/CouplingFSI.pyx":2269
51565  * dm_residuals = np.zeros((len(l_linklocks), 6))
51566  *
51567  * for i_entry_linkage in range(0, len(l_linklocks), 1): # <<<<<<<<<<<<<<
51568  * # Get the residual matrix from the linkage
51569  * o_linkage_residual = l_linklocks[i_entry_linkage].GetC()
51570  */
51571  __pyx_t_4 = PyObject_Length(__pyx_v_l_linklocks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2269, __pyx_L1_error)
51572  __pyx_t_6 = __pyx_t_4;
51573  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
51574  __pyx_v_i_entry_linkage = __pyx_t_7;
51575 
51576  /* "mbd/CouplingFSI.pyx":2271
51577  * for i_entry_linkage in range(0, len(l_linklocks), 1):
51578  * # Get the residual matrix from the linkage
51579  * o_linkage_residual = l_linklocks[i_entry_linkage].GetC() # <<<<<<<<<<<<<<
51580  *
51581  * # Extract the data from the Chrono matrix
51582  */
51583  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_l_linklocks, __pyx_v_i_entry_linkage, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2271, __pyx_L1_error)
51584  __Pyx_GOTREF(__pyx_t_2);
51585  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GetC); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2271, __pyx_L1_error)
51586  __Pyx_GOTREF(__pyx_t_5);
51587  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51588  __pyx_t_2 = NULL;
51589  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
51590  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
51591  if (likely(__pyx_t_2)) {
51592  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
51593  __Pyx_INCREF(__pyx_t_2);
51594  __Pyx_INCREF(function);
51595  __Pyx_DECREF_SET(__pyx_t_5, function);
51596  }
51597  }
51598  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
51599  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51600  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2271, __pyx_L1_error)
51601  __Pyx_GOTREF(__pyx_t_1);
51602  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51603  __Pyx_XDECREF_SET(__pyx_v_o_linkage_residual, __pyx_t_1);
51604  __pyx_t_1 = 0;
51605 
51606  /* "mbd/CouplingFSI.pyx":2274
51607  *
51608  * # Extract the data from the Chrono matrix
51609  * for i_entry_residual in range(0, 6, 1): # <<<<<<<<<<<<<<
51610  * try:
51611  * # Attemp to extract the value from the Chrono matrix
51612  */
51613  for (__pyx_t_8 = 0; __pyx_t_8 < 6; __pyx_t_8+=1) {
51614  __pyx_v_i_entry_residual = __pyx_t_8;
51615 
51616  /* "mbd/CouplingFSI.pyx":2275
51617  * # Extract the data from the Chrono matrix
51618  * for i_entry_residual in range(0, 6, 1):
51619  * try: # <<<<<<<<<<<<<<
51620  * # Attemp to extract the value from the Chrono matrix
51621  * dm_residuals[i_entry_linkage, i_entry_residual] = o_linkage_residual.GetElement(0, i_entry_residual)
51622  */
51623  {
51624  __Pyx_PyThreadState_declare
51625  __Pyx_PyThreadState_assign
51626  __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
51627  __Pyx_XGOTREF(__pyx_t_9);
51628  __Pyx_XGOTREF(__pyx_t_10);
51629  __Pyx_XGOTREF(__pyx_t_11);
51630  /*try:*/ {
51631 
51632  /* "mbd/CouplingFSI.pyx":2277
51633  * try:
51634  * # Attemp to extract the value from the Chrono matrix
51635  * dm_residuals[i_entry_linkage, i_entry_residual] = o_linkage_residual.GetElement(0, i_entry_residual) # <<<<<<<<<<<<<<
51636  * except:
51637  * # Residual doesn't exist. Keep the zero in the array.
51638  */
51639  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_linkage_residual, __pyx_n_s_GetElement); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2277, __pyx_L7_error)
51640  __Pyx_GOTREF(__pyx_t_5);
51641  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v_i_entry_residual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2277, __pyx_L7_error)
51642  __Pyx_GOTREF(__pyx_t_2);
51643  __pyx_t_3 = NULL;
51644  __pyx_t_12 = 0;
51645  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
51646  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
51647  if (likely(__pyx_t_3)) {
51648  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
51649  __Pyx_INCREF(__pyx_t_3);
51650  __Pyx_INCREF(function);
51651  __Pyx_DECREF_SET(__pyx_t_5, function);
51652  __pyx_t_12 = 1;
51653  }
51654  }
51655  #if CYTHON_FAST_PYCALL
51656  if (PyFunction_Check(__pyx_t_5)) {
51657  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_int_0, __pyx_t_2};
51658  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L7_error)
51659  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51660  __Pyx_GOTREF(__pyx_t_1);
51661  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51662  } else
51663  #endif
51664  #if CYTHON_FAST_PYCCALL
51665  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
51666  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_int_0, __pyx_t_2};
51667  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L7_error)
51668  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51669  __Pyx_GOTREF(__pyx_t_1);
51670  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51671  } else
51672  #endif
51673  {
51674  __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2277, __pyx_L7_error)
51675  __Pyx_GOTREF(__pyx_t_13);
51676  if (__pyx_t_3) {
51677  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3); __pyx_t_3 = NULL;
51678  }
51679  __Pyx_INCREF(__pyx_int_0);
51680  __Pyx_GIVEREF(__pyx_int_0);
51681  PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_int_0);
51682  __Pyx_GIVEREF(__pyx_t_2);
51683  PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_2);
51684  __pyx_t_2 = 0;
51685  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L7_error)
51686  __Pyx_GOTREF(__pyx_t_1);
51687  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
51688  }
51689  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51690  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i_entry_linkage); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2277, __pyx_L7_error)
51691  __Pyx_GOTREF(__pyx_t_5);
51692  __pyx_t_13 = __Pyx_PyInt_From_long(__pyx_v_i_entry_residual); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2277, __pyx_L7_error)
51693  __Pyx_GOTREF(__pyx_t_13);
51694  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2277, __pyx_L7_error)
51695  __Pyx_GOTREF(__pyx_t_2);
51696  __Pyx_GIVEREF(__pyx_t_5);
51697  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
51698  __Pyx_GIVEREF(__pyx_t_13);
51699  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_13);
51700  __pyx_t_5 = 0;
51701  __pyx_t_13 = 0;
51702  if (unlikely(PyObject_SetItem(__pyx_v_dm_residuals, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 2277, __pyx_L7_error)
51703  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51704  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51705 
51706  /* "mbd/CouplingFSI.pyx":2275
51707  * # Extract the data from the Chrono matrix
51708  * for i_entry_residual in range(0, 6, 1):
51709  * try: # <<<<<<<<<<<<<<
51710  * # Attemp to extract the value from the Chrono matrix
51711  * dm_residuals[i_entry_linkage, i_entry_residual] = o_linkage_residual.GetElement(0, i_entry_residual)
51712  */
51713  }
51714  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
51715  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
51716  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
51717  goto __pyx_L14_try_end;
51718  __pyx_L7_error:;
51719  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
51720  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
51721  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51722  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51723  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
51724 
51725  /* "mbd/CouplingFSI.pyx":2278
51726  * # Attemp to extract the value from the Chrono matrix
51727  * dm_residuals[i_entry_linkage, i_entry_residual] = o_linkage_residual.GetElement(0, i_entry_residual)
51728  * except: # <<<<<<<<<<<<<<
51729  * # Residual doesn't exist. Keep the zero in the array.
51730  * dm_residuals[i_entry_linkage, i_entry_residual] = 0
51731  */
51732  /*except:*/ {
51733  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_residuals_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
51734  if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_13) < 0) __PYX_ERR(0, 2278, __pyx_L9_except_error)
51735  __Pyx_GOTREF(__pyx_t_1);
51736  __Pyx_GOTREF(__pyx_t_2);
51737  __Pyx_GOTREF(__pyx_t_13);
51738 
51739  /* "mbd/CouplingFSI.pyx":2280
51740  * except:
51741  * # Residual doesn't exist. Keep the zero in the array.
51742  * dm_residuals[i_entry_linkage, i_entry_residual] = 0 # <<<<<<<<<<<<<<
51743  *
51744  * # Log the spring data
51745  */
51746  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_i_entry_linkage); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2280, __pyx_L9_except_error)
51747  __Pyx_GOTREF(__pyx_t_5);
51748  __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_i_entry_residual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2280, __pyx_L9_except_error)
51749  __Pyx_GOTREF(__pyx_t_3);
51750  __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2280, __pyx_L9_except_error)
51751  __Pyx_GOTREF(__pyx_t_14);
51752  __Pyx_GIVEREF(__pyx_t_5);
51753  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_5);
51754  __Pyx_GIVEREF(__pyx_t_3);
51755  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_3);
51756  __pyx_t_5 = 0;
51757  __pyx_t_3 = 0;
51758  if (unlikely(PyObject_SetItem(__pyx_v_dm_residuals, __pyx_t_14, __pyx_int_0) < 0)) __PYX_ERR(0, 2280, __pyx_L9_except_error)
51759  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
51760  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
51761  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51762  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
51763  goto __pyx_L8_exception_handled;
51764  }
51765  __pyx_L9_except_error:;
51766 
51767  /* "mbd/CouplingFSI.pyx":2275
51768  * # Extract the data from the Chrono matrix
51769  * for i_entry_residual in range(0, 6, 1):
51770  * try: # <<<<<<<<<<<<<<
51771  * # Attemp to extract the value from the Chrono matrix
51772  * dm_residuals[i_entry_linkage, i_entry_residual] = o_linkage_residual.GetElement(0, i_entry_residual)
51773  */
51774  __Pyx_XGIVEREF(__pyx_t_9);
51775  __Pyx_XGIVEREF(__pyx_t_10);
51776  __Pyx_XGIVEREF(__pyx_t_11);
51777  __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
51778  goto __pyx_L1_error;
51779  __pyx_L8_exception_handled:;
51780  __Pyx_XGIVEREF(__pyx_t_9);
51781  __Pyx_XGIVEREF(__pyx_t_10);
51782  __Pyx_XGIVEREF(__pyx_t_11);
51783  __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
51784  __pyx_L14_try_end:;
51785  }
51786  }
51787  }
51788 
51789  /* "mbd/CouplingFSI.pyx":2283
51790  *
51791  * # Log the spring data
51792  * try: # <<<<<<<<<<<<<<
51793  * # Open the dataset
51794  * dm_residuals_h5 = o_file['residuals']
51795  */
51796  {
51797  __Pyx_PyThreadState_declare
51798  __Pyx_PyThreadState_assign
51799  __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_10, &__pyx_t_9);
51800  __Pyx_XGOTREF(__pyx_t_11);
51801  __Pyx_XGOTREF(__pyx_t_10);
51802  __Pyx_XGOTREF(__pyx_t_9);
51803  /*try:*/ {
51804 
51805  /* "mbd/CouplingFSI.pyx":2285
51806  * try:
51807  * # Open the dataset
51808  * dm_residuals_h5 = o_file['residuals'] # <<<<<<<<<<<<<<
51809  *
51810  * # Resize the dataset in the h5 file to expand it by an entry
51811  */
51812  __pyx_t_13 = __Pyx_PyObject_Dict_GetItem(__pyx_v_o_file, __pyx_n_s_residuals); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2285, __pyx_L17_error)
51813  __Pyx_GOTREF(__pyx_t_13);
51814  __pyx_v_dm_residuals_h5 = __pyx_t_13;
51815  __pyx_t_13 = 0;
51816 
51817  /* "mbd/CouplingFSI.pyx":2288
51818  *
51819  * # Resize the dataset in the h5 file to expand it by an entry
51820  * i_index = dm_residuals_h5.shape[0] # <<<<<<<<<<<<<<
51821  * dm_residuals_h5.resize(dm_residuals_h5.shape[0] + 1, axis=0)
51822  *
51823  */
51824  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_residuals_h5, __pyx_n_s_shape); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2288, __pyx_L17_error)
51825  __Pyx_GOTREF(__pyx_t_13);
51826  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_13, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2288, __pyx_L17_error)
51827  __Pyx_GOTREF(__pyx_t_2);
51828  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
51829  __pyx_v_i_index = __pyx_t_2;
51830  __pyx_t_2 = 0;
51831 
51832  /* "mbd/CouplingFSI.pyx":2289
51833  * # Resize the dataset in the h5 file to expand it by an entry
51834  * i_index = dm_residuals_h5.shape[0]
51835  * dm_residuals_h5.resize(dm_residuals_h5.shape[0] + 1, axis=0) # <<<<<<<<<<<<<<
51836  *
51837  * # Store the values into the dataset
51838  */
51839  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_residuals_h5, __pyx_n_s_resize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L17_error)
51840  __Pyx_GOTREF(__pyx_t_2);
51841  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_residuals_h5, __pyx_n_s_shape); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2289, __pyx_L17_error)
51842  __Pyx_GOTREF(__pyx_t_13);
51843  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_13, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L17_error)
51844  __Pyx_GOTREF(__pyx_t_1);
51845  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
51846  __pyx_t_13 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2289, __pyx_L17_error)
51847  __Pyx_GOTREF(__pyx_t_13);
51848  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51849  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L17_error)
51850  __Pyx_GOTREF(__pyx_t_1);
51851  __Pyx_GIVEREF(__pyx_t_13);
51852  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_13);
51853  __pyx_t_13 = 0;
51854  __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2289, __pyx_L17_error)
51855  __Pyx_GOTREF(__pyx_t_13);
51856  if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2289, __pyx_L17_error)
51857  __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2289, __pyx_L17_error)
51858  __Pyx_GOTREF(__pyx_t_14);
51859  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51860  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
51861  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
51862  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
51863 
51864  /* "mbd/CouplingFSI.pyx":2292
51865  *
51866  * # Store the values into the dataset
51867  * dm_residuals_h5[i_index, :, :] = dm_residuals # <<<<<<<<<<<<<<
51868  *
51869  * except:
51870  */
51871  __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2292, __pyx_L17_error)
51872  __Pyx_GOTREF(__pyx_t_14);
51873  __Pyx_INCREF(__pyx_v_i_index);
51874  __Pyx_GIVEREF(__pyx_v_i_index);
51875  PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_i_index);
51876  __Pyx_INCREF(__pyx_slice__30);
51877  __Pyx_GIVEREF(__pyx_slice__30);
51878  PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_slice__30);
51879  __Pyx_INCREF(__pyx_slice__30);
51880  __Pyx_GIVEREF(__pyx_slice__30);
51881  PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_slice__30);
51882  if (unlikely(PyObject_SetItem(__pyx_v_dm_residuals_h5, __pyx_t_14, __pyx_v_dm_residuals) < 0)) __PYX_ERR(0, 2292, __pyx_L17_error)
51883  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
51884 
51885  /* "mbd/CouplingFSI.pyx":2283
51886  *
51887  * # Log the spring data
51888  * try: # <<<<<<<<<<<<<<
51889  * # Open the dataset
51890  * dm_residuals_h5 = o_file['residuals']
51891  */
51892  }
51893  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
51894  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
51895  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
51896  goto __pyx_L22_try_end;
51897  __pyx_L17_error:;
51898  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
51899  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
51900  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
51901  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
51902  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
51903  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
51904 
51905  /* "mbd/CouplingFSI.pyx":2294
51906  * dm_residuals_h5[i_index, :, :] = dm_residuals
51907  *
51908  * except: # <<<<<<<<<<<<<<
51909  * # Create the initial dataset
51910  * dm_residuals_h5 = o_file.create_dataset('residuals', (1, len(l_linklocks), 6), compression="gzip",
51911  */
51912  /*except:*/ {
51913  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_residuals_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
51914  if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_1) < 0) __PYX_ERR(0, 2294, __pyx_L19_except_error)
51915  __Pyx_GOTREF(__pyx_t_14);
51916  __Pyx_GOTREF(__pyx_t_13);
51917  __Pyx_GOTREF(__pyx_t_1);
51918 
51919  /* "mbd/CouplingFSI.pyx":2296
51920  * except:
51921  * # Create the initial dataset
51922  * dm_residuals_h5 = o_file.create_dataset('residuals', (1, len(l_linklocks), 6), compression="gzip", # <<<<<<<<<<<<<<
51923  * maxshape=(None, len(l_linklocks), 6), dtype=float)
51924  *
51925  */
51926  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51927  __Pyx_GOTREF(__pyx_t_2);
51928  __pyx_t_4 = PyObject_Length(__pyx_v_l_linklocks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51929  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51930  __Pyx_GOTREF(__pyx_t_3);
51931  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51932  __Pyx_GOTREF(__pyx_t_5);
51933  __Pyx_INCREF(__pyx_int_1);
51934  __Pyx_GIVEREF(__pyx_int_1);
51935  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_int_1);
51936  __Pyx_GIVEREF(__pyx_t_3);
51937  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
51938  __Pyx_INCREF(__pyx_int_6);
51939  __Pyx_GIVEREF(__pyx_int_6);
51940  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_int_6);
51941  __pyx_t_3 = 0;
51942  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51943  __Pyx_GOTREF(__pyx_t_3);
51944  __Pyx_INCREF(__pyx_n_s_residuals);
51945  __Pyx_GIVEREF(__pyx_n_s_residuals);
51946  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_residuals);
51947  __Pyx_GIVEREF(__pyx_t_5);
51948  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
51949  __pyx_t_5 = 0;
51950  __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51951  __Pyx_GOTREF(__pyx_t_5);
51952  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_compression, __pyx_n_s_gzip) < 0) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51953 
51954  /* "mbd/CouplingFSI.pyx":2297
51955  * # Create the initial dataset
51956  * dm_residuals_h5 = o_file.create_dataset('residuals', (1, len(l_linklocks), 6), compression="gzip",
51957  * maxshape=(None, len(l_linklocks), 6), dtype=float) # <<<<<<<<<<<<<<
51958  *
51959  * # Store the first entry into the dataset
51960  */
51961  __pyx_t_4 = PyObject_Length(__pyx_v_l_linklocks); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2297, __pyx_L19_except_error)
51962  __pyx_t_15 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2297, __pyx_L19_except_error)
51963  __Pyx_GOTREF(__pyx_t_15);
51964  __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2297, __pyx_L19_except_error)
51965  __Pyx_GOTREF(__pyx_t_16);
51966  __Pyx_INCREF(Py_None);
51967  __Pyx_GIVEREF(Py_None);
51968  PyTuple_SET_ITEM(__pyx_t_16, 0, Py_None);
51969  __Pyx_GIVEREF(__pyx_t_15);
51970  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_15);
51971  __Pyx_INCREF(__pyx_int_6);
51972  __Pyx_GIVEREF(__pyx_int_6);
51973  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_int_6);
51974  __pyx_t_15 = 0;
51975  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_maxshape, __pyx_t_16) < 0) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51976  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
51977  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51978 
51979  /* "mbd/CouplingFSI.pyx":2296
51980  * except:
51981  * # Create the initial dataset
51982  * dm_residuals_h5 = o_file.create_dataset('residuals', (1, len(l_linklocks), 6), compression="gzip", # <<<<<<<<<<<<<<
51983  * maxshape=(None, len(l_linklocks), 6), dtype=float)
51984  *
51985  */
51986  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2296, __pyx_L19_except_error)
51987  __Pyx_GOTREF(__pyx_t_16);
51988  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
51989  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
51990  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
51991  __Pyx_XDECREF_SET(__pyx_v_dm_residuals_h5, __pyx_t_16);
51992  __pyx_t_16 = 0;
51993 
51994  /* "mbd/CouplingFSI.pyx":2300
51995  *
51996  * # Store the first entry into the dataset
51997  * dm_residuals_h5[0, :, :] = dm_residuals # <<<<<<<<<<<<<<
51998  *
51999  * # Close the output file
52000  */
52001  if (unlikely(PyObject_SetItem(__pyx_v_dm_residuals_h5, __pyx_tuple__129, __pyx_v_dm_residuals) < 0)) __PYX_ERR(0, 2300, __pyx_L19_except_error)
52002  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
52003  __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
52004  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
52005  goto __pyx_L18_exception_handled;
52006  }
52007  __pyx_L19_except_error:;
52008 
52009  /* "mbd/CouplingFSI.pyx":2283
52010  *
52011  * # Log the spring data
52012  * try: # <<<<<<<<<<<<<<
52013  * # Open the dataset
52014  * dm_residuals_h5 = o_file['residuals']
52015  */
52016  __Pyx_XGIVEREF(__pyx_t_11);
52017  __Pyx_XGIVEREF(__pyx_t_10);
52018  __Pyx_XGIVEREF(__pyx_t_9);
52019  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
52020  goto __pyx_L1_error;
52021  __pyx_L18_exception_handled:;
52022  __Pyx_XGIVEREF(__pyx_t_11);
52023  __Pyx_XGIVEREF(__pyx_t_10);
52024  __Pyx_XGIVEREF(__pyx_t_9);
52025  __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
52026  __pyx_L22_try_end:;
52027  }
52028 
52029  /* "mbd/CouplingFSI.pyx":2303
52030  *
52031  * # Close the output file
52032  * o_file.close() # <<<<<<<<<<<<<<
52033  *
52034  *
52035  */
52036  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_close); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2303, __pyx_L1_error)
52037  __Pyx_GOTREF(__pyx_t_13);
52038  __pyx_t_14 = NULL;
52039  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
52040  __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
52041  if (likely(__pyx_t_14)) {
52042  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
52043  __Pyx_INCREF(__pyx_t_14);
52044  __Pyx_INCREF(function);
52045  __Pyx_DECREF_SET(__pyx_t_13, function);
52046  }
52047  }
52048  __pyx_t_1 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_13);
52049  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
52050  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
52051  __Pyx_GOTREF(__pyx_t_1);
52052  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
52053  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52054 
52055  /* "mbd/CouplingFSI.pyx":2248
52056  * o_file.close()
52057  *
52058  * def log_residuals_h5(self, l_linklocks): # <<<<<<<<<<<<<<
52059  * """
52060  * Logs chrono spring information to an h5 file
52061  */
52062 
52063  /* function exit code */
52064  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
52065  goto __pyx_L0;
52066  __pyx_L1_error:;
52067  __Pyx_XDECREF(__pyx_t_1);
52068  __Pyx_XDECREF(__pyx_t_2);
52069  __Pyx_XDECREF(__pyx_t_3);
52070  __Pyx_XDECREF(__pyx_t_5);
52071  __Pyx_XDECREF(__pyx_t_13);
52072  __Pyx_XDECREF(__pyx_t_14);
52073  __Pyx_XDECREF(__pyx_t_15);
52074  __Pyx_XDECREF(__pyx_t_16);
52075  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_residuals_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
52076  __pyx_r = NULL;
52077  __pyx_L0:;
52078  __Pyx_XDECREF(__pyx_v_o_file);
52079  __Pyx_XDECREF(__pyx_v_dm_residuals);
52080  __Pyx_XDECREF(__pyx_v_o_linkage_residual);
52081  __Pyx_XDECREF(__pyx_v_dm_residuals_h5);
52082  __Pyx_XDECREF(__pyx_v_i_index);
52083  __Pyx_XGIVEREF(__pyx_r);
52084  __Pyx_TraceReturn(__pyx_r, 0);
52085  __Pyx_RefNannyFinishContext();
52086  return __pyx_r;
52087 }
52088 
52089 /* "mbd/CouplingFSI.pyx":2306
52090  *
52091  *
52092  * def log_times_h5(self, d_time): # <<<<<<<<<<<<<<
52093  * """
52094  * Creates a log of the Proteus timestep within the h5 log file
52095  */
52096 
52097 /* Python wrapper */
52098 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_57log_times_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_d_time); /*proto*/
52099 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_56log_times_h5[] = "ProtChSystem.log_times_h5(self, d_time)\n\n Creates a log of the Proteus timestep within the h5 log file\n Parameters\n ----------\n self: object\n ProtChSystem being referenced\n d_time: float\n Time within the simulation\n Returns\n -------\n None. Data is logged to the disk.\n ";
52100 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_57log_times_h5 = {"log_times_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_57log_times_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_56log_times_h5};
52101 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_57log_times_h5(PyObject *__pyx_v_self, PyObject *__pyx_v_d_time) {
52102  PyObject *__pyx_r = 0;
52103  __Pyx_RefNannyDeclarations
52104  __Pyx_RefNannySetupContext("log_times_h5 (wrapper)", 0);
52105  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_56log_times_h5(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_d_time));
52106 
52107  /* function exit code */
52108  __Pyx_RefNannyFinishContext();
52109  return __pyx_r;
52110 }
52111 
52112 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_56log_times_h5(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_d_time) {
52113  PyObject *__pyx_v_o_file = NULL;
52114  PyObject *__pyx_v_dm_time = NULL;
52115  PyObject *__pyx_v_i_index = NULL;
52116  PyObject *__pyx_r = NULL;
52117  __Pyx_TraceDeclarations
52118  __Pyx_RefNannyDeclarations
52119  PyObject *__pyx_t_1 = NULL;
52120  PyObject *__pyx_t_2 = NULL;
52121  PyObject *__pyx_t_3 = NULL;
52122  PyObject *__pyx_t_4 = NULL;
52123  PyObject *__pyx_t_5 = NULL;
52124  PyObject *__pyx_t_6 = NULL;
52125  PyObject *__pyx_t_7 = NULL;
52126  PyObject *__pyx_t_8 = NULL;
52127  PyObject *__pyx_t_9 = NULL;
52128  int __pyx_lineno = 0;
52129  const char *__pyx_filename = NULL;
52130  int __pyx_clineno = 0;
52131  __Pyx_TraceFrameInit(__pyx_codeobj__135)
52132  __Pyx_RefNannySetupContext("log_times_h5", 0);
52133  __Pyx_TraceCall("log_times_h5", __pyx_f[0], 2306, 0, __PYX_ERR(0, 2306, __pyx_L1_error));
52134 
52135  /* "mbd/CouplingFSI.pyx":2321
52136  *
52137  * # Open the log file
52138  * o_file = h5py.File('chrono_log.h5') # <<<<<<<<<<<<<<
52139  *
52140  * # Log the time data
52141  */
52142  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_h5py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2321, __pyx_L1_error)
52143  __Pyx_GOTREF(__pyx_t_2);
52144  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_File); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2321, __pyx_L1_error)
52145  __Pyx_GOTREF(__pyx_t_3);
52146  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
52147  __pyx_t_2 = NULL;
52148  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
52149  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
52150  if (likely(__pyx_t_2)) {
52151  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
52152  __Pyx_INCREF(__pyx_t_2);
52153  __Pyx_INCREF(function);
52154  __Pyx_DECREF_SET(__pyx_t_3, function);
52155  }
52156  }
52157  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s_chrono_log_h5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_chrono_log_h5);
52158  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
52159  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
52160  __Pyx_GOTREF(__pyx_t_1);
52161  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52162  __pyx_v_o_file = __pyx_t_1;
52163  __pyx_t_1 = 0;
52164 
52165  /* "mbd/CouplingFSI.pyx":2324
52166  *
52167  * # Log the time data
52168  * try: # <<<<<<<<<<<<<<
52169  * # Open the dataset
52170  * dm_time = o_file['time']
52171  */
52172  {
52173  __Pyx_PyThreadState_declare
52174  __Pyx_PyThreadState_assign
52175  __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
52176  __Pyx_XGOTREF(__pyx_t_4);
52177  __Pyx_XGOTREF(__pyx_t_5);
52178  __Pyx_XGOTREF(__pyx_t_6);
52179  /*try:*/ {
52180 
52181  /* "mbd/CouplingFSI.pyx":2326
52182  * try:
52183  * # Open the dataset
52184  * dm_time = o_file['time'] # <<<<<<<<<<<<<<
52185  *
52186  * # Resize the dataset
52187  */
52188  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_o_file, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L3_error)
52189  __Pyx_GOTREF(__pyx_t_1);
52190  __pyx_v_dm_time = __pyx_t_1;
52191  __pyx_t_1 = 0;
52192 
52193  /* "mbd/CouplingFSI.pyx":2329
52194  *
52195  * # Resize the dataset
52196  * i_index = dm_time.shape[0] # <<<<<<<<<<<<<<
52197  * dm_time.resize(dm_time.shape[0] + 1, axis=0)
52198  *
52199  */
52200  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_time, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L3_error)
52201  __Pyx_GOTREF(__pyx_t_1);
52202  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2329, __pyx_L3_error)
52203  __Pyx_GOTREF(__pyx_t_3);
52204  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52205  __pyx_v_i_index = __pyx_t_3;
52206  __pyx_t_3 = 0;
52207 
52208  /* "mbd/CouplingFSI.pyx":2330
52209  * # Resize the dataset
52210  * i_index = dm_time.shape[0]
52211  * dm_time.resize(dm_time.shape[0] + 1, axis=0) # <<<<<<<<<<<<<<
52212  *
52213  * # Store the values into the dataset
52214  */
52215  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_time, __pyx_n_s_resize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2330, __pyx_L3_error)
52216  __Pyx_GOTREF(__pyx_t_3);
52217  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dm_time, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L3_error)
52218  __Pyx_GOTREF(__pyx_t_1);
52219  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L3_error)
52220  __Pyx_GOTREF(__pyx_t_2);
52221  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52222  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L3_error)
52223  __Pyx_GOTREF(__pyx_t_1);
52224  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
52225  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L3_error)
52226  __Pyx_GOTREF(__pyx_t_2);
52227  __Pyx_GIVEREF(__pyx_t_1);
52228  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
52229  __pyx_t_1 = 0;
52230  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L3_error)
52231  __Pyx_GOTREF(__pyx_t_1);
52232  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2330, __pyx_L3_error)
52233  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2330, __pyx_L3_error)
52234  __Pyx_GOTREF(__pyx_t_7);
52235  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52236  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
52237  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52238  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
52239 
52240  /* "mbd/CouplingFSI.pyx":2333
52241  *
52242  * # Store the values into the dataset
52243  * dm_time[i_index] = np.array(d_time) # <<<<<<<<<<<<<<
52244  *
52245  * except:
52246  */
52247  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L3_error)
52248  __Pyx_GOTREF(__pyx_t_1);
52249  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2333, __pyx_L3_error)
52250  __Pyx_GOTREF(__pyx_t_2);
52251  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52252  __pyx_t_1 = NULL;
52253  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
52254  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
52255  if (likely(__pyx_t_1)) {
52256  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
52257  __Pyx_INCREF(__pyx_t_1);
52258  __Pyx_INCREF(function);
52259  __Pyx_DECREF_SET(__pyx_t_2, function);
52260  }
52261  }
52262  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_d_time) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_d_time);
52263  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
52264  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2333, __pyx_L3_error)
52265  __Pyx_GOTREF(__pyx_t_7);
52266  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
52267  if (unlikely(PyObject_SetItem(__pyx_v_dm_time, __pyx_v_i_index, __pyx_t_7) < 0)) __PYX_ERR(0, 2333, __pyx_L3_error)
52268  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
52269 
52270  /* "mbd/CouplingFSI.pyx":2324
52271  *
52272  * # Log the time data
52273  * try: # <<<<<<<<<<<<<<
52274  * # Open the dataset
52275  * dm_time = o_file['time']
52276  */
52277  }
52278  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
52279  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
52280  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
52281  goto __pyx_L8_try_end;
52282  __pyx_L3_error:;
52283  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
52284  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
52285  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
52286  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
52287 
52288  /* "mbd/CouplingFSI.pyx":2335
52289  * dm_time[i_index] = np.array(d_time)
52290  *
52291  * except: # <<<<<<<<<<<<<<
52292  * # Create the initial dataset
52293  * dm_time = o_file.create_dataset('time', (1,), compression="gzip",
52294  */
52295  /*except:*/ {
52296  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_times_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
52297  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 2335, __pyx_L5_except_error)
52298  __Pyx_GOTREF(__pyx_t_7);
52299  __Pyx_GOTREF(__pyx_t_2);
52300  __Pyx_GOTREF(__pyx_t_1);
52301 
52302  /* "mbd/CouplingFSI.pyx":2337
52303  * except:
52304  * # Create the initial dataset
52305  * dm_time = o_file.create_dataset('time', (1,), compression="gzip", # <<<<<<<<<<<<<<
52306  * maxshape=(None,), dtype=float)
52307  *
52308  */
52309  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2337, __pyx_L5_except_error)
52310  __Pyx_GOTREF(__pyx_t_3);
52311  __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2337, __pyx_L5_except_error)
52312  __Pyx_GOTREF(__pyx_t_8);
52313  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_compression, __pyx_n_s_gzip) < 0) __PYX_ERR(0, 2337, __pyx_L5_except_error)
52314 
52315  /* "mbd/CouplingFSI.pyx":2338
52316  * # Create the initial dataset
52317  * dm_time = o_file.create_dataset('time', (1,), compression="gzip",
52318  * maxshape=(None,), dtype=float) # <<<<<<<<<<<<<<
52319  *
52320  * # Store the first entry into the dataset
52321  */
52322  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_maxshape, __pyx_tuple__137) < 0) __PYX_ERR(0, 2337, __pyx_L5_except_error)
52323  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 2337, __pyx_L5_except_error)
52324 
52325  /* "mbd/CouplingFSI.pyx":2337
52326  * except:
52327  * # Create the initial dataset
52328  * dm_time = o_file.create_dataset('time', (1,), compression="gzip", # <<<<<<<<<<<<<<
52329  * maxshape=(None,), dtype=float)
52330  *
52331  */
52332  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__136, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2337, __pyx_L5_except_error)
52333  __Pyx_GOTREF(__pyx_t_9);
52334  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
52335  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
52336  __Pyx_XDECREF_SET(__pyx_v_dm_time, __pyx_t_9);
52337  __pyx_t_9 = 0;
52338 
52339  /* "mbd/CouplingFSI.pyx":2341
52340  *
52341  * # Store the first entry into the dataset
52342  * dm_time[0] = d_time # <<<<<<<<<<<<<<
52343  *
52344  * # Close the file
52345  */
52346  if (unlikely(__Pyx_SetItemInt(__pyx_v_dm_time, 0, __pyx_v_d_time, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 2341, __pyx_L5_except_error)
52347  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
52348  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
52349  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
52350  goto __pyx_L4_exception_handled;
52351  }
52352  __pyx_L5_except_error:;
52353 
52354  /* "mbd/CouplingFSI.pyx":2324
52355  *
52356  * # Log the time data
52357  * try: # <<<<<<<<<<<<<<
52358  * # Open the dataset
52359  * dm_time = o_file['time']
52360  */
52361  __Pyx_XGIVEREF(__pyx_t_4);
52362  __Pyx_XGIVEREF(__pyx_t_5);
52363  __Pyx_XGIVEREF(__pyx_t_6);
52364  __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
52365  goto __pyx_L1_error;
52366  __pyx_L4_exception_handled:;
52367  __Pyx_XGIVEREF(__pyx_t_4);
52368  __Pyx_XGIVEREF(__pyx_t_5);
52369  __Pyx_XGIVEREF(__pyx_t_6);
52370  __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
52371  __pyx_L8_try_end:;
52372  }
52373 
52374  /* "mbd/CouplingFSI.pyx":2344
52375  *
52376  * # Close the file
52377  * o_file.close() # <<<<<<<<<<<<<<
52378  *
52379  * # def findFluidVelocityAtCoords(self, coords):
52380  */
52381  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_o_file, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2344, __pyx_L1_error)
52382  __Pyx_GOTREF(__pyx_t_2);
52383  __pyx_t_7 = NULL;
52384  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
52385  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
52386  if (likely(__pyx_t_7)) {
52387  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
52388  __Pyx_INCREF(__pyx_t_7);
52389  __Pyx_INCREF(function);
52390  __Pyx_DECREF_SET(__pyx_t_2, function);
52391  }
52392  }
52393  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
52394  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
52395  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __pyx_L1_error)
52396  __Pyx_GOTREF(__pyx_t_1);
52397  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
52398  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
52399 
52400  /* "mbd/CouplingFSI.pyx":2306
52401  *
52402  *
52403  * def log_times_h5(self, d_time): # <<<<<<<<<<<<<<
52404  * """
52405  * Creates a log of the Proteus timestep within the h5 log file
52406  */
52407 
52408  /* function exit code */
52409  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
52410  goto __pyx_L0;
52411  __pyx_L1_error:;
52412  __Pyx_XDECREF(__pyx_t_1);
52413  __Pyx_XDECREF(__pyx_t_2);
52414  __Pyx_XDECREF(__pyx_t_3);
52415  __Pyx_XDECREF(__pyx_t_7);
52416  __Pyx_XDECREF(__pyx_t_8);
52417  __Pyx_XDECREF(__pyx_t_9);
52418  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_times_h5", __pyx_clineno, __pyx_lineno, __pyx_filename);
52419  __pyx_r = NULL;
52420  __pyx_L0:;
52421  __Pyx_XDECREF(__pyx_v_o_file);
52422  __Pyx_XDECREF(__pyx_v_dm_time);
52423  __Pyx_XDECREF(__pyx_v_i_index);
52424  __Pyx_XGIVEREF(__pyx_r);
52425  __Pyx_TraceReturn(__pyx_r, 0);
52426  __Pyx_RefNannyFinishContext();
52427  return __pyx_r;
52428 }
52429 
52430 /* "mbd/CouplingFSI.pxd":273
52431  * cdef vector[shared_ptr[ch.ChBody]] mybodies
52432  * cdef public:
52433  * object ChSystemSMC # <<<<<<<<<<<<<<
52434  * object ChSystem
52435  * object model
52436  */
52437 
52438 /* Python wrapper */
52439 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_1__get__(PyObject *__pyx_v_self); /*proto*/
52440 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_1__get__(PyObject *__pyx_v_self) {
52441  PyObject *__pyx_r = 0;
52442  __Pyx_RefNannyDeclarations
52443  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
52444  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52445 
52446  /* function exit code */
52447  __Pyx_RefNannyFinishContext();
52448  return __pyx_r;
52449 }
52450 
52451 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52452  PyObject *__pyx_r = NULL;
52453  __Pyx_TraceDeclarations
52454  __Pyx_RefNannyDeclarations
52455  int __pyx_lineno = 0;
52456  const char *__pyx_filename = NULL;
52457  int __pyx_clineno = 0;
52458  __Pyx_RefNannySetupContext("__get__", 0);
52459  __Pyx_TraceCall("__get__", __pyx_f[2], 273, 0, __PYX_ERR(2, 273, __pyx_L1_error));
52460  __Pyx_XDECREF(__pyx_r);
52461  __Pyx_INCREF(__pyx_v_self->ChSystemSMC);
52462  __pyx_r = __pyx_v_self->ChSystemSMC;
52463  goto __pyx_L0;
52464 
52465  /* function exit code */
52466  __pyx_L1_error:;
52467  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ChSystemSMC.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52468  __pyx_r = NULL;
52469  __pyx_L0:;
52470  __Pyx_XGIVEREF(__pyx_r);
52471  __Pyx_TraceReturn(__pyx_r, 0);
52472  __Pyx_RefNannyFinishContext();
52473  return __pyx_r;
52474 }
52475 
52476 /* Python wrapper */
52477 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
52478 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
52479  int __pyx_r;
52480  __Pyx_RefNannyDeclarations
52481  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
52482  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
52483 
52484  /* function exit code */
52485  __Pyx_RefNannyFinishContext();
52486  return __pyx_r;
52487 }
52488 
52489 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
52490  int __pyx_r;
52491  __Pyx_TraceDeclarations
52492  __Pyx_RefNannyDeclarations
52493  int __pyx_lineno = 0;
52494  const char *__pyx_filename = NULL;
52495  int __pyx_clineno = 0;
52496  __Pyx_RefNannySetupContext("__set__", 0);
52497  __Pyx_TraceCall("__set__", __pyx_f[2], 273, 0, __PYX_ERR(2, 273, __pyx_L1_error));
52498  __Pyx_INCREF(__pyx_v_value);
52499  __Pyx_GIVEREF(__pyx_v_value);
52500  __Pyx_GOTREF(__pyx_v_self->ChSystemSMC);
52501  __Pyx_DECREF(__pyx_v_self->ChSystemSMC);
52502  __pyx_v_self->ChSystemSMC = __pyx_v_value;
52503 
52504  /* function exit code */
52505  __pyx_r = 0;
52506  goto __pyx_L0;
52507  __pyx_L1_error:;
52508  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ChSystemSMC.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52509  __pyx_r = -1;
52510  __pyx_L0:;
52511  __Pyx_TraceReturn(Py_None, 0);
52512  __Pyx_RefNannyFinishContext();
52513  return __pyx_r;
52514 }
52515 
52516 /* Python wrapper */
52517 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_5__del__(PyObject *__pyx_v_self); /*proto*/
52518 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_5__del__(PyObject *__pyx_v_self) {
52519  int __pyx_r;
52520  __Pyx_RefNannyDeclarations
52521  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
52522  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52523 
52524  /* function exit code */
52525  __Pyx_RefNannyFinishContext();
52526  return __pyx_r;
52527 }
52528 
52529 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52530  int __pyx_r;
52531  __Pyx_TraceDeclarations
52532  __Pyx_RefNannyDeclarations
52533  int __pyx_lineno = 0;
52534  const char *__pyx_filename = NULL;
52535  int __pyx_clineno = 0;
52536  __Pyx_RefNannySetupContext("__del__", 0);
52537  __Pyx_TraceCall("__del__", __pyx_f[2], 273, 0, __PYX_ERR(2, 273, __pyx_L1_error));
52538  __Pyx_INCREF(Py_None);
52539  __Pyx_GIVEREF(Py_None);
52540  __Pyx_GOTREF(__pyx_v_self->ChSystemSMC);
52541  __Pyx_DECREF(__pyx_v_self->ChSystemSMC);
52542  __pyx_v_self->ChSystemSMC = Py_None;
52543 
52544  /* function exit code */
52545  __pyx_r = 0;
52546  goto __pyx_L0;
52547  __pyx_L1_error:;
52548  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ChSystemSMC.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52549  __pyx_r = -1;
52550  __pyx_L0:;
52551  __Pyx_TraceReturn(Py_None, 0);
52552  __Pyx_RefNannyFinishContext();
52553  return __pyx_r;
52554 }
52555 
52556 /* "mbd/CouplingFSI.pxd":274
52557  * cdef public:
52558  * object ChSystemSMC
52559  * object ChSystem # <<<<<<<<<<<<<<
52560  * object model
52561  * object model_module
52562  */
52563 
52564 /* Python wrapper */
52565 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_1__get__(PyObject *__pyx_v_self); /*proto*/
52566 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_1__get__(PyObject *__pyx_v_self) {
52567  PyObject *__pyx_r = 0;
52568  __Pyx_RefNannyDeclarations
52569  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
52570  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52571 
52572  /* function exit code */
52573  __Pyx_RefNannyFinishContext();
52574  return __pyx_r;
52575 }
52576 
52577 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52578  PyObject *__pyx_r = NULL;
52579  __Pyx_TraceDeclarations
52580  __Pyx_RefNannyDeclarations
52581  int __pyx_lineno = 0;
52582  const char *__pyx_filename = NULL;
52583  int __pyx_clineno = 0;
52584  __Pyx_RefNannySetupContext("__get__", 0);
52585  __Pyx_TraceCall("__get__", __pyx_f[2], 274, 0, __PYX_ERR(2, 274, __pyx_L1_error));
52586  __Pyx_XDECREF(__pyx_r);
52587  __Pyx_INCREF(__pyx_v_self->ChSystem);
52588  __pyx_r = __pyx_v_self->ChSystem;
52589  goto __pyx_L0;
52590 
52591  /* function exit code */
52592  __pyx_L1_error:;
52593  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ChSystem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52594  __pyx_r = NULL;
52595  __pyx_L0:;
52596  __Pyx_XGIVEREF(__pyx_r);
52597  __Pyx_TraceReturn(__pyx_r, 0);
52598  __Pyx_RefNannyFinishContext();
52599  return __pyx_r;
52600 }
52601 
52602 /* Python wrapper */
52603 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
52604 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
52605  int __pyx_r;
52606  __Pyx_RefNannyDeclarations
52607  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
52608  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
52609 
52610  /* function exit code */
52611  __Pyx_RefNannyFinishContext();
52612  return __pyx_r;
52613 }
52614 
52615 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
52616  int __pyx_r;
52617  __Pyx_TraceDeclarations
52618  __Pyx_RefNannyDeclarations
52619  int __pyx_lineno = 0;
52620  const char *__pyx_filename = NULL;
52621  int __pyx_clineno = 0;
52622  __Pyx_RefNannySetupContext("__set__", 0);
52623  __Pyx_TraceCall("__set__", __pyx_f[2], 274, 0, __PYX_ERR(2, 274, __pyx_L1_error));
52624  __Pyx_INCREF(__pyx_v_value);
52625  __Pyx_GIVEREF(__pyx_v_value);
52626  __Pyx_GOTREF(__pyx_v_self->ChSystem);
52627  __Pyx_DECREF(__pyx_v_self->ChSystem);
52628  __pyx_v_self->ChSystem = __pyx_v_value;
52629 
52630  /* function exit code */
52631  __pyx_r = 0;
52632  goto __pyx_L0;
52633  __pyx_L1_error:;
52634  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ChSystem.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52635  __pyx_r = -1;
52636  __pyx_L0:;
52637  __Pyx_TraceReturn(Py_None, 0);
52638  __Pyx_RefNannyFinishContext();
52639  return __pyx_r;
52640 }
52641 
52642 /* Python wrapper */
52643 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_5__del__(PyObject *__pyx_v_self); /*proto*/
52644 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_5__del__(PyObject *__pyx_v_self) {
52645  int __pyx_r;
52646  __Pyx_RefNannyDeclarations
52647  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
52648  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52649 
52650  /* function exit code */
52651  __Pyx_RefNannyFinishContext();
52652  return __pyx_r;
52653 }
52654 
52655 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52656  int __pyx_r;
52657  __Pyx_TraceDeclarations
52658  __Pyx_RefNannyDeclarations
52659  int __pyx_lineno = 0;
52660  const char *__pyx_filename = NULL;
52661  int __pyx_clineno = 0;
52662  __Pyx_RefNannySetupContext("__del__", 0);
52663  __Pyx_TraceCall("__del__", __pyx_f[2], 274, 0, __PYX_ERR(2, 274, __pyx_L1_error));
52664  __Pyx_INCREF(Py_None);
52665  __Pyx_GIVEREF(Py_None);
52666  __Pyx_GOTREF(__pyx_v_self->ChSystem);
52667  __Pyx_DECREF(__pyx_v_self->ChSystem);
52668  __pyx_v_self->ChSystem = Py_None;
52669 
52670  /* function exit code */
52671  __pyx_r = 0;
52672  goto __pyx_L0;
52673  __pyx_L1_error:;
52674  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ChSystem.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52675  __pyx_r = -1;
52676  __pyx_L0:;
52677  __Pyx_TraceReturn(Py_None, 0);
52678  __Pyx_RefNannyFinishContext();
52679  return __pyx_r;
52680 }
52681 
52682 /* "mbd/CouplingFSI.pxd":275
52683  * object ChSystemSMC
52684  * object ChSystem
52685  * object model # <<<<<<<<<<<<<<
52686  * object model_module
52687  * double dt_init
52688  */
52689 
52690 /* Python wrapper */
52691 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_1__get__(PyObject *__pyx_v_self); /*proto*/
52692 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_1__get__(PyObject *__pyx_v_self) {
52693  PyObject *__pyx_r = 0;
52694  __Pyx_RefNannyDeclarations
52695  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
52696  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52697 
52698  /* function exit code */
52699  __Pyx_RefNannyFinishContext();
52700  return __pyx_r;
52701 }
52702 
52703 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52704  PyObject *__pyx_r = NULL;
52705  __Pyx_TraceDeclarations
52706  __Pyx_RefNannyDeclarations
52707  int __pyx_lineno = 0;
52708  const char *__pyx_filename = NULL;
52709  int __pyx_clineno = 0;
52710  __Pyx_RefNannySetupContext("__get__", 0);
52711  __Pyx_TraceCall("__get__", __pyx_f[2], 275, 0, __PYX_ERR(2, 275, __pyx_L1_error));
52712  __Pyx_XDECREF(__pyx_r);
52713  __Pyx_INCREF(__pyx_v_self->model);
52714  __pyx_r = __pyx_v_self->model;
52715  goto __pyx_L0;
52716 
52717  /* function exit code */
52718  __pyx_L1_error:;
52719  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52720  __pyx_r = NULL;
52721  __pyx_L0:;
52722  __Pyx_XGIVEREF(__pyx_r);
52723  __Pyx_TraceReturn(__pyx_r, 0);
52724  __Pyx_RefNannyFinishContext();
52725  return __pyx_r;
52726 }
52727 
52728 /* Python wrapper */
52729 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
52730 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
52731  int __pyx_r;
52732  __Pyx_RefNannyDeclarations
52733  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
52734  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
52735 
52736  /* function exit code */
52737  __Pyx_RefNannyFinishContext();
52738  return __pyx_r;
52739 }
52740 
52741 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
52742  int __pyx_r;
52743  __Pyx_TraceDeclarations
52744  __Pyx_RefNannyDeclarations
52745  int __pyx_lineno = 0;
52746  const char *__pyx_filename = NULL;
52747  int __pyx_clineno = 0;
52748  __Pyx_RefNannySetupContext("__set__", 0);
52749  __Pyx_TraceCall("__set__", __pyx_f[2], 275, 0, __PYX_ERR(2, 275, __pyx_L1_error));
52750  __Pyx_INCREF(__pyx_v_value);
52751  __Pyx_GIVEREF(__pyx_v_value);
52752  __Pyx_GOTREF(__pyx_v_self->model);
52753  __Pyx_DECREF(__pyx_v_self->model);
52754  __pyx_v_self->model = __pyx_v_value;
52755 
52756  /* function exit code */
52757  __pyx_r = 0;
52758  goto __pyx_L0;
52759  __pyx_L1_error:;
52760  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52761  __pyx_r = -1;
52762  __pyx_L0:;
52763  __Pyx_TraceReturn(Py_None, 0);
52764  __Pyx_RefNannyFinishContext();
52765  return __pyx_r;
52766 }
52767 
52768 /* Python wrapper */
52769 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_5__del__(PyObject *__pyx_v_self); /*proto*/
52770 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_5__del__(PyObject *__pyx_v_self) {
52771  int __pyx_r;
52772  __Pyx_RefNannyDeclarations
52773  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
52774  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52775 
52776  /* function exit code */
52777  __Pyx_RefNannyFinishContext();
52778  return __pyx_r;
52779 }
52780 
52781 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52782  int __pyx_r;
52783  __Pyx_TraceDeclarations
52784  __Pyx_RefNannyDeclarations
52785  int __pyx_lineno = 0;
52786  const char *__pyx_filename = NULL;
52787  int __pyx_clineno = 0;
52788  __Pyx_RefNannySetupContext("__del__", 0);
52789  __Pyx_TraceCall("__del__", __pyx_f[2], 275, 0, __PYX_ERR(2, 275, __pyx_L1_error));
52790  __Pyx_INCREF(Py_None);
52791  __Pyx_GIVEREF(Py_None);
52792  __Pyx_GOTREF(__pyx_v_self->model);
52793  __Pyx_DECREF(__pyx_v_self->model);
52794  __pyx_v_self->model = Py_None;
52795 
52796  /* function exit code */
52797  __pyx_r = 0;
52798  goto __pyx_L0;
52799  __pyx_L1_error:;
52800  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52801  __pyx_r = -1;
52802  __pyx_L0:;
52803  __Pyx_TraceReturn(Py_None, 0);
52804  __Pyx_RefNannyFinishContext();
52805  return __pyx_r;
52806 }
52807 
52808 /* "mbd/CouplingFSI.pxd":276
52809  * object ChSystem
52810  * object model
52811  * object model_module # <<<<<<<<<<<<<<
52812  * double dt_init
52813  * double dt_fluid
52814  */
52815 
52816 /* Python wrapper */
52817 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_1__get__(PyObject *__pyx_v_self); /*proto*/
52818 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_1__get__(PyObject *__pyx_v_self) {
52819  PyObject *__pyx_r = 0;
52820  __Pyx_RefNannyDeclarations
52821  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
52822  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52823 
52824  /* function exit code */
52825  __Pyx_RefNannyFinishContext();
52826  return __pyx_r;
52827 }
52828 
52829 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52830  PyObject *__pyx_r = NULL;
52831  __Pyx_TraceDeclarations
52832  __Pyx_RefNannyDeclarations
52833  int __pyx_lineno = 0;
52834  const char *__pyx_filename = NULL;
52835  int __pyx_clineno = 0;
52836  __Pyx_RefNannySetupContext("__get__", 0);
52837  __Pyx_TraceCall("__get__", __pyx_f[2], 276, 0, __PYX_ERR(2, 276, __pyx_L1_error));
52838  __Pyx_XDECREF(__pyx_r);
52839  __Pyx_INCREF(__pyx_v_self->model_module);
52840  __pyx_r = __pyx_v_self->model_module;
52841  goto __pyx_L0;
52842 
52843  /* function exit code */
52844  __pyx_L1_error:;
52845  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_module.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52846  __pyx_r = NULL;
52847  __pyx_L0:;
52848  __Pyx_XGIVEREF(__pyx_r);
52849  __Pyx_TraceReturn(__pyx_r, 0);
52850  __Pyx_RefNannyFinishContext();
52851  return __pyx_r;
52852 }
52853 
52854 /* Python wrapper */
52855 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
52856 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
52857  int __pyx_r;
52858  __Pyx_RefNannyDeclarations
52859  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
52860  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
52861 
52862  /* function exit code */
52863  __Pyx_RefNannyFinishContext();
52864  return __pyx_r;
52865 }
52866 
52867 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
52868  int __pyx_r;
52869  __Pyx_TraceDeclarations
52870  __Pyx_RefNannyDeclarations
52871  int __pyx_lineno = 0;
52872  const char *__pyx_filename = NULL;
52873  int __pyx_clineno = 0;
52874  __Pyx_RefNannySetupContext("__set__", 0);
52875  __Pyx_TraceCall("__set__", __pyx_f[2], 276, 0, __PYX_ERR(2, 276, __pyx_L1_error));
52876  __Pyx_INCREF(__pyx_v_value);
52877  __Pyx_GIVEREF(__pyx_v_value);
52878  __Pyx_GOTREF(__pyx_v_self->model_module);
52879  __Pyx_DECREF(__pyx_v_self->model_module);
52880  __pyx_v_self->model_module = __pyx_v_value;
52881 
52882  /* function exit code */
52883  __pyx_r = 0;
52884  goto __pyx_L0;
52885  __pyx_L1_error:;
52886  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_module.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52887  __pyx_r = -1;
52888  __pyx_L0:;
52889  __Pyx_TraceReturn(Py_None, 0);
52890  __Pyx_RefNannyFinishContext();
52891  return __pyx_r;
52892 }
52893 
52894 /* Python wrapper */
52895 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_5__del__(PyObject *__pyx_v_self); /*proto*/
52896 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_5__del__(PyObject *__pyx_v_self) {
52897  int __pyx_r;
52898  __Pyx_RefNannyDeclarations
52899  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
52900  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52901 
52902  /* function exit code */
52903  __Pyx_RefNannyFinishContext();
52904  return __pyx_r;
52905 }
52906 
52907 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12model_module_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52908  int __pyx_r;
52909  __Pyx_TraceDeclarations
52910  __Pyx_RefNannyDeclarations
52911  int __pyx_lineno = 0;
52912  const char *__pyx_filename = NULL;
52913  int __pyx_clineno = 0;
52914  __Pyx_RefNannySetupContext("__del__", 0);
52915  __Pyx_TraceCall("__del__", __pyx_f[2], 276, 0, __PYX_ERR(2, 276, __pyx_L1_error));
52916  __Pyx_INCREF(Py_None);
52917  __Pyx_GIVEREF(Py_None);
52918  __Pyx_GOTREF(__pyx_v_self->model_module);
52919  __Pyx_DECREF(__pyx_v_self->model_module);
52920  __pyx_v_self->model_module = Py_None;
52921 
52922  /* function exit code */
52923  __pyx_r = 0;
52924  goto __pyx_L0;
52925  __pyx_L1_error:;
52926  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_module.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52927  __pyx_r = -1;
52928  __pyx_L0:;
52929  __Pyx_TraceReturn(Py_None, 0);
52930  __Pyx_RefNannyFinishContext();
52931  return __pyx_r;
52932 }
52933 
52934 /* "mbd/CouplingFSI.pxd":277
52935  * object model
52936  * object model_module
52937  * double dt_init # <<<<<<<<<<<<<<
52938  * double dt_fluid
52939  * double dt_fluid_last
52940  */
52941 
52942 /* Python wrapper */
52943 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_1__get__(PyObject *__pyx_v_self); /*proto*/
52944 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_1__get__(PyObject *__pyx_v_self) {
52945  PyObject *__pyx_r = 0;
52946  __Pyx_RefNannyDeclarations
52947  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
52948  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7dt_init___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
52949 
52950  /* function exit code */
52951  __Pyx_RefNannyFinishContext();
52952  return __pyx_r;
52953 }
52954 
52955 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7dt_init___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
52956  PyObject *__pyx_r = NULL;
52957  __Pyx_TraceDeclarations
52958  __Pyx_RefNannyDeclarations
52959  PyObject *__pyx_t_1 = NULL;
52960  int __pyx_lineno = 0;
52961  const char *__pyx_filename = NULL;
52962  int __pyx_clineno = 0;
52963  __Pyx_RefNannySetupContext("__get__", 0);
52964  __Pyx_TraceCall("__get__", __pyx_f[2], 277, 0, __PYX_ERR(2, 277, __pyx_L1_error));
52965  __Pyx_XDECREF(__pyx_r);
52966  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dt_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 277, __pyx_L1_error)
52967  __Pyx_GOTREF(__pyx_t_1);
52968  __pyx_r = __pyx_t_1;
52969  __pyx_t_1 = 0;
52970  goto __pyx_L0;
52971 
52972  /* function exit code */
52973  __pyx_L1_error:;
52974  __Pyx_XDECREF(__pyx_t_1);
52975  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dt_init.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
52976  __pyx_r = NULL;
52977  __pyx_L0:;
52978  __Pyx_XGIVEREF(__pyx_r);
52979  __Pyx_TraceReturn(__pyx_r, 0);
52980  __Pyx_RefNannyFinishContext();
52981  return __pyx_r;
52982 }
52983 
52984 /* Python wrapper */
52985 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
52986 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
52987  int __pyx_r;
52988  __Pyx_RefNannyDeclarations
52989  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
52990  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
52991 
52992  /* function exit code */
52993  __Pyx_RefNannyFinishContext();
52994  return __pyx_r;
52995 }
52996 
52997 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
52998  int __pyx_r;
52999  __Pyx_TraceDeclarations
53000  __Pyx_RefNannyDeclarations
53001  double __pyx_t_1;
53002  int __pyx_lineno = 0;
53003  const char *__pyx_filename = NULL;
53004  int __pyx_clineno = 0;
53005  __Pyx_RefNannySetupContext("__set__", 0);
53006  __Pyx_TraceCall("__set__", __pyx_f[2], 277, 0, __PYX_ERR(2, 277, __pyx_L1_error));
53007  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 277, __pyx_L1_error)
53008  __pyx_v_self->dt_init = __pyx_t_1;
53009 
53010  /* function exit code */
53011  __pyx_r = 0;
53012  goto __pyx_L0;
53013  __pyx_L1_error:;
53014  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dt_init.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53015  __pyx_r = -1;
53016  __pyx_L0:;
53017  __Pyx_TraceReturn(Py_None, 0);
53018  __Pyx_RefNannyFinishContext();
53019  return __pyx_r;
53020 }
53021 
53022 /* "mbd/CouplingFSI.pxd":278
53023  * object model_module
53024  * double dt_init
53025  * double dt_fluid # <<<<<<<<<<<<<<
53026  * double dt_fluid_last
53027  * cdef object subcomponents
53028  */
53029 
53030 /* Python wrapper */
53031 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_1__get__(PyObject *__pyx_v_self); /*proto*/
53032 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_1__get__(PyObject *__pyx_v_self) {
53033  PyObject *__pyx_r = 0;
53034  __Pyx_RefNannyDeclarations
53035  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53036  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53037 
53038  /* function exit code */
53039  __Pyx_RefNannyFinishContext();
53040  return __pyx_r;
53041 }
53042 
53043 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53044  PyObject *__pyx_r = NULL;
53045  __Pyx_TraceDeclarations
53046  __Pyx_RefNannyDeclarations
53047  PyObject *__pyx_t_1 = NULL;
53048  int __pyx_lineno = 0;
53049  const char *__pyx_filename = NULL;
53050  int __pyx_clineno = 0;
53051  __Pyx_RefNannySetupContext("__get__", 0);
53052  __Pyx_TraceCall("__get__", __pyx_f[2], 278, 0, __PYX_ERR(2, 278, __pyx_L1_error));
53053  __Pyx_XDECREF(__pyx_r);
53054  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dt_fluid); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 278, __pyx_L1_error)
53055  __Pyx_GOTREF(__pyx_t_1);
53056  __pyx_r = __pyx_t_1;
53057  __pyx_t_1 = 0;
53058  goto __pyx_L0;
53059 
53060  /* function exit code */
53061  __pyx_L1_error:;
53062  __Pyx_XDECREF(__pyx_t_1);
53063  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dt_fluid.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53064  __pyx_r = NULL;
53065  __pyx_L0:;
53066  __Pyx_XGIVEREF(__pyx_r);
53067  __Pyx_TraceReturn(__pyx_r, 0);
53068  __Pyx_RefNannyFinishContext();
53069  return __pyx_r;
53070 }
53071 
53072 /* Python wrapper */
53073 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53074 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53075  int __pyx_r;
53076  __Pyx_RefNannyDeclarations
53077  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53078  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53079 
53080  /* function exit code */
53081  __Pyx_RefNannyFinishContext();
53082  return __pyx_r;
53083 }
53084 
53085 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53086  int __pyx_r;
53087  __Pyx_TraceDeclarations
53088  __Pyx_RefNannyDeclarations
53089  double __pyx_t_1;
53090  int __pyx_lineno = 0;
53091  const char *__pyx_filename = NULL;
53092  int __pyx_clineno = 0;
53093  __Pyx_RefNannySetupContext("__set__", 0);
53094  __Pyx_TraceCall("__set__", __pyx_f[2], 278, 0, __PYX_ERR(2, 278, __pyx_L1_error));
53095  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 278, __pyx_L1_error)
53096  __pyx_v_self->dt_fluid = __pyx_t_1;
53097 
53098  /* function exit code */
53099  __pyx_r = 0;
53100  goto __pyx_L0;
53101  __pyx_L1_error:;
53102  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dt_fluid.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53103  __pyx_r = -1;
53104  __pyx_L0:;
53105  __Pyx_TraceReturn(Py_None, 0);
53106  __Pyx_RefNannyFinishContext();
53107  return __pyx_r;
53108 }
53109 
53110 /* "mbd/CouplingFSI.pxd":279
53111  * double dt_init
53112  * double dt_fluid
53113  * double dt_fluid_last # <<<<<<<<<<<<<<
53114  * cdef object subcomponents
53115  * double chrono_dt
53116  */
53117 
53118 /* Python wrapper */
53119 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_1__get__(PyObject *__pyx_v_self); /*proto*/
53120 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_1__get__(PyObject *__pyx_v_self) {
53121  PyObject *__pyx_r = 0;
53122  __Pyx_RefNannyDeclarations
53123  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53124  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53125 
53126  /* function exit code */
53127  __Pyx_RefNannyFinishContext();
53128  return __pyx_r;
53129 }
53130 
53131 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53132  PyObject *__pyx_r = NULL;
53133  __Pyx_TraceDeclarations
53134  __Pyx_RefNannyDeclarations
53135  PyObject *__pyx_t_1 = NULL;
53136  int __pyx_lineno = 0;
53137  const char *__pyx_filename = NULL;
53138  int __pyx_clineno = 0;
53139  __Pyx_RefNannySetupContext("__get__", 0);
53140  __Pyx_TraceCall("__get__", __pyx_f[2], 279, 0, __PYX_ERR(2, 279, __pyx_L1_error));
53141  __Pyx_XDECREF(__pyx_r);
53142  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->dt_fluid_last); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 279, __pyx_L1_error)
53143  __Pyx_GOTREF(__pyx_t_1);
53144  __pyx_r = __pyx_t_1;
53145  __pyx_t_1 = 0;
53146  goto __pyx_L0;
53147 
53148  /* function exit code */
53149  __pyx_L1_error:;
53150  __Pyx_XDECREF(__pyx_t_1);
53151  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dt_fluid_last.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53152  __pyx_r = NULL;
53153  __pyx_L0:;
53154  __Pyx_XGIVEREF(__pyx_r);
53155  __Pyx_TraceReturn(__pyx_r, 0);
53156  __Pyx_RefNannyFinishContext();
53157  return __pyx_r;
53158 }
53159 
53160 /* Python wrapper */
53161 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53162 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53163  int __pyx_r;
53164  __Pyx_RefNannyDeclarations
53165  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53166  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53167 
53168  /* function exit code */
53169  __Pyx_RefNannyFinishContext();
53170  return __pyx_r;
53171 }
53172 
53173 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53174  int __pyx_r;
53175  __Pyx_TraceDeclarations
53176  __Pyx_RefNannyDeclarations
53177  double __pyx_t_1;
53178  int __pyx_lineno = 0;
53179  const char *__pyx_filename = NULL;
53180  int __pyx_clineno = 0;
53181  __Pyx_RefNannySetupContext("__set__", 0);
53182  __Pyx_TraceCall("__set__", __pyx_f[2], 279, 0, __PYX_ERR(2, 279, __pyx_L1_error));
53183  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 279, __pyx_L1_error)
53184  __pyx_v_self->dt_fluid_last = __pyx_t_1;
53185 
53186  /* function exit code */
53187  __pyx_r = 0;
53188  goto __pyx_L0;
53189  __pyx_L1_error:;
53190  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dt_fluid_last.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53191  __pyx_r = -1;
53192  __pyx_L0:;
53193  __Pyx_TraceReturn(Py_None, 0);
53194  __Pyx_RefNannyFinishContext();
53195  return __pyx_r;
53196 }
53197 
53198 /* "mbd/CouplingFSI.pxd":280
53199  * double dt_fluid
53200  * double dt_fluid_last
53201  * cdef object subcomponents # <<<<<<<<<<<<<<
53202  * double chrono_dt
53203  * bool build_kdtree
53204  */
53205 
53206 /* Python wrapper */
53207 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_1__get__(PyObject *__pyx_v_self); /*proto*/
53208 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_1__get__(PyObject *__pyx_v_self) {
53209  PyObject *__pyx_r = 0;
53210  __Pyx_RefNannyDeclarations
53211  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53212  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53213 
53214  /* function exit code */
53215  __Pyx_RefNannyFinishContext();
53216  return __pyx_r;
53217 }
53218 
53219 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53220  PyObject *__pyx_r = NULL;
53221  __Pyx_TraceDeclarations
53222  __Pyx_RefNannyDeclarations
53223  int __pyx_lineno = 0;
53224  const char *__pyx_filename = NULL;
53225  int __pyx_clineno = 0;
53226  __Pyx_RefNannySetupContext("__get__", 0);
53227  __Pyx_TraceCall("__get__", __pyx_f[2], 280, 0, __PYX_ERR(2, 280, __pyx_L1_error));
53228  __Pyx_XDECREF(__pyx_r);
53229  __Pyx_INCREF(__pyx_v_self->subcomponents);
53230  __pyx_r = __pyx_v_self->subcomponents;
53231  goto __pyx_L0;
53232 
53233  /* function exit code */
53234  __pyx_L1_error:;
53235  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.subcomponents.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53236  __pyx_r = NULL;
53237  __pyx_L0:;
53238  __Pyx_XGIVEREF(__pyx_r);
53239  __Pyx_TraceReturn(__pyx_r, 0);
53240  __Pyx_RefNannyFinishContext();
53241  return __pyx_r;
53242 }
53243 
53244 /* Python wrapper */
53245 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53246 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53247  int __pyx_r;
53248  __Pyx_RefNannyDeclarations
53249  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53250  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53251 
53252  /* function exit code */
53253  __Pyx_RefNannyFinishContext();
53254  return __pyx_r;
53255 }
53256 
53257 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53258  int __pyx_r;
53259  __Pyx_TraceDeclarations
53260  __Pyx_RefNannyDeclarations
53261  int __pyx_lineno = 0;
53262  const char *__pyx_filename = NULL;
53263  int __pyx_clineno = 0;
53264  __Pyx_RefNannySetupContext("__set__", 0);
53265  __Pyx_TraceCall("__set__", __pyx_f[2], 280, 0, __PYX_ERR(2, 280, __pyx_L1_error));
53266  __Pyx_INCREF(__pyx_v_value);
53267  __Pyx_GIVEREF(__pyx_v_value);
53268  __Pyx_GOTREF(__pyx_v_self->subcomponents);
53269  __Pyx_DECREF(__pyx_v_self->subcomponents);
53270  __pyx_v_self->subcomponents = __pyx_v_value;
53271 
53272  /* function exit code */
53273  __pyx_r = 0;
53274  goto __pyx_L0;
53275  __pyx_L1_error:;
53276  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.subcomponents.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53277  __pyx_r = -1;
53278  __pyx_L0:;
53279  __Pyx_TraceReturn(Py_None, 0);
53280  __Pyx_RefNannyFinishContext();
53281  return __pyx_r;
53282 }
53283 
53284 /* Python wrapper */
53285 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_5__del__(PyObject *__pyx_v_self); /*proto*/
53286 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_5__del__(PyObject *__pyx_v_self) {
53287  int __pyx_r;
53288  __Pyx_RefNannyDeclarations
53289  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
53290  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53291 
53292  /* function exit code */
53293  __Pyx_RefNannyFinishContext();
53294  return __pyx_r;
53295 }
53296 
53297 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53298  int __pyx_r;
53299  __Pyx_TraceDeclarations
53300  __Pyx_RefNannyDeclarations
53301  int __pyx_lineno = 0;
53302  const char *__pyx_filename = NULL;
53303  int __pyx_clineno = 0;
53304  __Pyx_RefNannySetupContext("__del__", 0);
53305  __Pyx_TraceCall("__del__", __pyx_f[2], 280, 0, __PYX_ERR(2, 280, __pyx_L1_error));
53306  __Pyx_INCREF(Py_None);
53307  __Pyx_GIVEREF(Py_None);
53308  __Pyx_GOTREF(__pyx_v_self->subcomponents);
53309  __Pyx_DECREF(__pyx_v_self->subcomponents);
53310  __pyx_v_self->subcomponents = Py_None;
53311 
53312  /* function exit code */
53313  __pyx_r = 0;
53314  goto __pyx_L0;
53315  __pyx_L1_error:;
53316  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.subcomponents.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53317  __pyx_r = -1;
53318  __pyx_L0:;
53319  __Pyx_TraceReturn(Py_None, 0);
53320  __Pyx_RefNannyFinishContext();
53321  return __pyx_r;
53322 }
53323 
53324 /* "mbd/CouplingFSI.pxd":281
53325  * double dt_fluid_last
53326  * cdef object subcomponents
53327  * double chrono_dt # <<<<<<<<<<<<<<
53328  * bool build_kdtree
53329  * bool dist_search
53330  */
53331 
53332 /* Python wrapper */
53333 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_1__get__(PyObject *__pyx_v_self); /*proto*/
53334 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_1__get__(PyObject *__pyx_v_self) {
53335  PyObject *__pyx_r = 0;
53336  __Pyx_RefNannyDeclarations
53337  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53338  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53339 
53340  /* function exit code */
53341  __Pyx_RefNannyFinishContext();
53342  return __pyx_r;
53343 }
53344 
53345 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53346  PyObject *__pyx_r = NULL;
53347  __Pyx_TraceDeclarations
53348  __Pyx_RefNannyDeclarations
53349  PyObject *__pyx_t_1 = NULL;
53350  int __pyx_lineno = 0;
53351  const char *__pyx_filename = NULL;
53352  int __pyx_clineno = 0;
53353  __Pyx_RefNannySetupContext("__get__", 0);
53354  __Pyx_TraceCall("__get__", __pyx_f[2], 281, 0, __PYX_ERR(2, 281, __pyx_L1_error));
53355  __Pyx_XDECREF(__pyx_r);
53356  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->chrono_dt); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 281, __pyx_L1_error)
53357  __Pyx_GOTREF(__pyx_t_1);
53358  __pyx_r = __pyx_t_1;
53359  __pyx_t_1 = 0;
53360  goto __pyx_L0;
53361 
53362  /* function exit code */
53363  __pyx_L1_error:;
53364  __Pyx_XDECREF(__pyx_t_1);
53365  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.chrono_dt.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53366  __pyx_r = NULL;
53367  __pyx_L0:;
53368  __Pyx_XGIVEREF(__pyx_r);
53369  __Pyx_TraceReturn(__pyx_r, 0);
53370  __Pyx_RefNannyFinishContext();
53371  return __pyx_r;
53372 }
53373 
53374 /* Python wrapper */
53375 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53376 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53377  int __pyx_r;
53378  __Pyx_RefNannyDeclarations
53379  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53380  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53381 
53382  /* function exit code */
53383  __Pyx_RefNannyFinishContext();
53384  return __pyx_r;
53385 }
53386 
53387 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53388  int __pyx_r;
53389  __Pyx_TraceDeclarations
53390  __Pyx_RefNannyDeclarations
53391  double __pyx_t_1;
53392  int __pyx_lineno = 0;
53393  const char *__pyx_filename = NULL;
53394  int __pyx_clineno = 0;
53395  __Pyx_RefNannySetupContext("__set__", 0);
53396  __Pyx_TraceCall("__set__", __pyx_f[2], 281, 0, __PYX_ERR(2, 281, __pyx_L1_error));
53397  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 281, __pyx_L1_error)
53398  __pyx_v_self->chrono_dt = __pyx_t_1;
53399 
53400  /* function exit code */
53401  __pyx_r = 0;
53402  goto __pyx_L0;
53403  __pyx_L1_error:;
53404  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.chrono_dt.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53405  __pyx_r = -1;
53406  __pyx_L0:;
53407  __Pyx_TraceReturn(Py_None, 0);
53408  __Pyx_RefNannyFinishContext();
53409  return __pyx_r;
53410 }
53411 
53412 /* "mbd/CouplingFSI.pxd":282
53413  * cdef object subcomponents
53414  * double chrono_dt
53415  * bool build_kdtree # <<<<<<<<<<<<<<
53416  * bool dist_search
53417  * bool first_step
53418  */
53419 
53420 /* Python wrapper */
53421 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_1__get__(PyObject *__pyx_v_self); /*proto*/
53422 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_1__get__(PyObject *__pyx_v_self) {
53423  PyObject *__pyx_r = 0;
53424  __Pyx_RefNannyDeclarations
53425  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53426  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53427 
53428  /* function exit code */
53429  __Pyx_RefNannyFinishContext();
53430  return __pyx_r;
53431 }
53432 
53433 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53434  PyObject *__pyx_r = NULL;
53435  __Pyx_TraceDeclarations
53436  __Pyx_RefNannyDeclarations
53437  PyObject *__pyx_t_1 = NULL;
53438  int __pyx_lineno = 0;
53439  const char *__pyx_filename = NULL;
53440  int __pyx_clineno = 0;
53441  __Pyx_RefNannySetupContext("__get__", 0);
53442  __Pyx_TraceCall("__get__", __pyx_f[2], 282, 0, __PYX_ERR(2, 282, __pyx_L1_error));
53443  __Pyx_XDECREF(__pyx_r);
53444  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->build_kdtree); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 282, __pyx_L1_error)
53445  __Pyx_GOTREF(__pyx_t_1);
53446  __pyx_r = __pyx_t_1;
53447  __pyx_t_1 = 0;
53448  goto __pyx_L0;
53449 
53450  /* function exit code */
53451  __pyx_L1_error:;
53452  __Pyx_XDECREF(__pyx_t_1);
53453  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.build_kdtree.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53454  __pyx_r = NULL;
53455  __pyx_L0:;
53456  __Pyx_XGIVEREF(__pyx_r);
53457  __Pyx_TraceReturn(__pyx_r, 0);
53458  __Pyx_RefNannyFinishContext();
53459  return __pyx_r;
53460 }
53461 
53462 /* Python wrapper */
53463 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53464 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53465  int __pyx_r;
53466  __Pyx_RefNannyDeclarations
53467  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53468  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53469 
53470  /* function exit code */
53471  __Pyx_RefNannyFinishContext();
53472  return __pyx_r;
53473 }
53474 
53475 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53476  int __pyx_r;
53477  __Pyx_TraceDeclarations
53478  __Pyx_RefNannyDeclarations
53479  bool __pyx_t_1;
53480  int __pyx_lineno = 0;
53481  const char *__pyx_filename = NULL;
53482  int __pyx_clineno = 0;
53483  __Pyx_RefNannySetupContext("__set__", 0);
53484  __Pyx_TraceCall("__set__", __pyx_f[2], 282, 0, __PYX_ERR(2, 282, __pyx_L1_error));
53485  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 282, __pyx_L1_error)
53486  __pyx_v_self->build_kdtree = __pyx_t_1;
53487 
53488  /* function exit code */
53489  __pyx_r = 0;
53490  goto __pyx_L0;
53491  __pyx_L1_error:;
53492  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.build_kdtree.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53493  __pyx_r = -1;
53494  __pyx_L0:;
53495  __Pyx_TraceReturn(Py_None, 0);
53496  __Pyx_RefNannyFinishContext();
53497  return __pyx_r;
53498 }
53499 
53500 /* "mbd/CouplingFSI.pxd":283
53501  * double chrono_dt
53502  * bool build_kdtree
53503  * bool dist_search # <<<<<<<<<<<<<<
53504  * bool first_step
53505  * string scheme # coupling scheme
53506  */
53507 
53508 /* Python wrapper */
53509 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_1__get__(PyObject *__pyx_v_self); /*proto*/
53510 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_1__get__(PyObject *__pyx_v_self) {
53511  PyObject *__pyx_r = 0;
53512  __Pyx_RefNannyDeclarations
53513  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53514  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11dist_search___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53515 
53516  /* function exit code */
53517  __Pyx_RefNannyFinishContext();
53518  return __pyx_r;
53519 }
53520 
53521 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11dist_search___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53522  PyObject *__pyx_r = NULL;
53523  __Pyx_TraceDeclarations
53524  __Pyx_RefNannyDeclarations
53525  PyObject *__pyx_t_1 = NULL;
53526  int __pyx_lineno = 0;
53527  const char *__pyx_filename = NULL;
53528  int __pyx_clineno = 0;
53529  __Pyx_RefNannySetupContext("__get__", 0);
53530  __Pyx_TraceCall("__get__", __pyx_f[2], 283, 0, __PYX_ERR(2, 283, __pyx_L1_error));
53531  __Pyx_XDECREF(__pyx_r);
53532  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dist_search); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 283, __pyx_L1_error)
53533  __Pyx_GOTREF(__pyx_t_1);
53534  __pyx_r = __pyx_t_1;
53535  __pyx_t_1 = 0;
53536  goto __pyx_L0;
53537 
53538  /* function exit code */
53539  __pyx_L1_error:;
53540  __Pyx_XDECREF(__pyx_t_1);
53541  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dist_search.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53542  __pyx_r = NULL;
53543  __pyx_L0:;
53544  __Pyx_XGIVEREF(__pyx_r);
53545  __Pyx_TraceReturn(__pyx_r, 0);
53546  __Pyx_RefNannyFinishContext();
53547  return __pyx_r;
53548 }
53549 
53550 /* Python wrapper */
53551 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53552 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53553  int __pyx_r;
53554  __Pyx_RefNannyDeclarations
53555  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53556  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53557 
53558  /* function exit code */
53559  __Pyx_RefNannyFinishContext();
53560  return __pyx_r;
53561 }
53562 
53563 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53564  int __pyx_r;
53565  __Pyx_TraceDeclarations
53566  __Pyx_RefNannyDeclarations
53567  bool __pyx_t_1;
53568  int __pyx_lineno = 0;
53569  const char *__pyx_filename = NULL;
53570  int __pyx_clineno = 0;
53571  __Pyx_RefNannySetupContext("__set__", 0);
53572  __Pyx_TraceCall("__set__", __pyx_f[2], 283, 0, __PYX_ERR(2, 283, __pyx_L1_error));
53573  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 283, __pyx_L1_error)
53574  __pyx_v_self->dist_search = __pyx_t_1;
53575 
53576  /* function exit code */
53577  __pyx_r = 0;
53578  goto __pyx_L0;
53579  __pyx_L1_error:;
53580  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.dist_search.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53581  __pyx_r = -1;
53582  __pyx_L0:;
53583  __Pyx_TraceReturn(Py_None, 0);
53584  __Pyx_RefNannyFinishContext();
53585  return __pyx_r;
53586 }
53587 
53588 /* "mbd/CouplingFSI.pxd":284
53589  * bool build_kdtree
53590  * bool dist_search
53591  * bool first_step # <<<<<<<<<<<<<<
53592  * string scheme # coupling scheme
53593  * string prediction # force for prediction
53594  */
53595 
53596 /* Python wrapper */
53597 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10first_step_1__get__(PyObject *__pyx_v_self); /*proto*/
53598 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10first_step_1__get__(PyObject *__pyx_v_self) {
53599  PyObject *__pyx_r = 0;
53600  __Pyx_RefNannyDeclarations
53601  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53602  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10first_step___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53603 
53604  /* function exit code */
53605  __Pyx_RefNannyFinishContext();
53606  return __pyx_r;
53607 }
53608 
53609 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10first_step___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53610  PyObject *__pyx_r = NULL;
53611  __Pyx_TraceDeclarations
53612  __Pyx_RefNannyDeclarations
53613  PyObject *__pyx_t_1 = NULL;
53614  int __pyx_lineno = 0;
53615  const char *__pyx_filename = NULL;
53616  int __pyx_clineno = 0;
53617  __Pyx_RefNannySetupContext("__get__", 0);
53618  __Pyx_TraceCall("__get__", __pyx_f[2], 284, 0, __PYX_ERR(2, 284, __pyx_L1_error));
53619  __Pyx_XDECREF(__pyx_r);
53620  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->first_step); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 284, __pyx_L1_error)
53621  __Pyx_GOTREF(__pyx_t_1);
53622  __pyx_r = __pyx_t_1;
53623  __pyx_t_1 = 0;
53624  goto __pyx_L0;
53625 
53626  /* function exit code */
53627  __pyx_L1_error:;
53628  __Pyx_XDECREF(__pyx_t_1);
53629  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.first_step.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53630  __pyx_r = NULL;
53631  __pyx_L0:;
53632  __Pyx_XGIVEREF(__pyx_r);
53633  __Pyx_TraceReturn(__pyx_r, 0);
53634  __Pyx_RefNannyFinishContext();
53635  return __pyx_r;
53636 }
53637 
53638 /* Python wrapper */
53639 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10first_step_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53640 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10first_step_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53641  int __pyx_r;
53642  __Pyx_RefNannyDeclarations
53643  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53644  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10first_step_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53645 
53646  /* function exit code */
53647  __Pyx_RefNannyFinishContext();
53648  return __pyx_r;
53649 }
53650 
53651 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10first_step_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53652  int __pyx_r;
53653  __Pyx_TraceDeclarations
53654  __Pyx_RefNannyDeclarations
53655  bool __pyx_t_1;
53656  int __pyx_lineno = 0;
53657  const char *__pyx_filename = NULL;
53658  int __pyx_clineno = 0;
53659  __Pyx_RefNannySetupContext("__set__", 0);
53660  __Pyx_TraceCall("__set__", __pyx_f[2], 284, 0, __PYX_ERR(2, 284, __pyx_L1_error));
53661  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 284, __pyx_L1_error)
53662  __pyx_v_self->first_step = __pyx_t_1;
53663 
53664  /* function exit code */
53665  __pyx_r = 0;
53666  goto __pyx_L0;
53667  __pyx_L1_error:;
53668  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.first_step.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53669  __pyx_r = -1;
53670  __pyx_L0:;
53671  __Pyx_TraceReturn(Py_None, 0);
53672  __Pyx_RefNannyFinishContext();
53673  return __pyx_r;
53674 }
53675 
53676 /* "mbd/CouplingFSI.pxd":285
53677  * bool dist_search
53678  * bool first_step
53679  * string scheme # coupling scheme # <<<<<<<<<<<<<<
53680  * string prediction # force for prediction
53681  * int step_nb # number of steps
53682  */
53683 
53684 /* Python wrapper */
53685 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6scheme_1__get__(PyObject *__pyx_v_self); /*proto*/
53686 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6scheme_1__get__(PyObject *__pyx_v_self) {
53687  PyObject *__pyx_r = 0;
53688  __Pyx_RefNannyDeclarations
53689  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53690  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6scheme___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53691 
53692  /* function exit code */
53693  __Pyx_RefNannyFinishContext();
53694  return __pyx_r;
53695 }
53696 
53697 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6scheme___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53698  PyObject *__pyx_r = NULL;
53699  __Pyx_TraceDeclarations
53700  __Pyx_RefNannyDeclarations
53701  PyObject *__pyx_t_1 = NULL;
53702  int __pyx_lineno = 0;
53703  const char *__pyx_filename = NULL;
53704  int __pyx_clineno = 0;
53705  __Pyx_RefNannySetupContext("__get__", 0);
53706  __Pyx_TraceCall("__get__", __pyx_f[2], 285, 0, __PYX_ERR(2, 285, __pyx_L1_error));
53707  __Pyx_XDECREF(__pyx_r);
53708  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->scheme); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 285, __pyx_L1_error)
53709  __Pyx_GOTREF(__pyx_t_1);
53710  __pyx_r = __pyx_t_1;
53711  __pyx_t_1 = 0;
53712  goto __pyx_L0;
53713 
53714  /* function exit code */
53715  __pyx_L1_error:;
53716  __Pyx_XDECREF(__pyx_t_1);
53717  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.scheme.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53718  __pyx_r = NULL;
53719  __pyx_L0:;
53720  __Pyx_XGIVEREF(__pyx_r);
53721  __Pyx_TraceReturn(__pyx_r, 0);
53722  __Pyx_RefNannyFinishContext();
53723  return __pyx_r;
53724 }
53725 
53726 /* Python wrapper */
53727 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6scheme_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53728 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6scheme_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53729  int __pyx_r;
53730  __Pyx_RefNannyDeclarations
53731  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53732  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6scheme_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53733 
53734  /* function exit code */
53735  __Pyx_RefNannyFinishContext();
53736  return __pyx_r;
53737 }
53738 
53739 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6scheme_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53740  int __pyx_r;
53741  __Pyx_TraceDeclarations
53742  __Pyx_RefNannyDeclarations
53743  std::string __pyx_t_1;
53744  int __pyx_lineno = 0;
53745  const char *__pyx_filename = NULL;
53746  int __pyx_clineno = 0;
53747  __Pyx_RefNannySetupContext("__set__", 0);
53748  __Pyx_TraceCall("__set__", __pyx_f[2], 285, 0, __PYX_ERR(2, 285, __pyx_L1_error));
53749  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 285, __pyx_L1_error)
53750  __pyx_v_self->scheme = __pyx_t_1;
53751 
53752  /* function exit code */
53753  __pyx_r = 0;
53754  goto __pyx_L0;
53755  __pyx_L1_error:;
53756  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.scheme.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53757  __pyx_r = -1;
53758  __pyx_L0:;
53759  __Pyx_TraceReturn(Py_None, 0);
53760  __Pyx_RefNannyFinishContext();
53761  return __pyx_r;
53762 }
53763 
53764 /* "mbd/CouplingFSI.pxd":286
53765  * bool first_step
53766  * string scheme # coupling scheme
53767  * string prediction # force for prediction # <<<<<<<<<<<<<<
53768  * int step_nb # number of steps
53769  * int step_start # starting step
53770  */
53771 
53772 /* Python wrapper */
53773 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10prediction_1__get__(PyObject *__pyx_v_self); /*proto*/
53774 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10prediction_1__get__(PyObject *__pyx_v_self) {
53775  PyObject *__pyx_r = 0;
53776  __Pyx_RefNannyDeclarations
53777  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53778  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10prediction___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53779 
53780  /* function exit code */
53781  __Pyx_RefNannyFinishContext();
53782  return __pyx_r;
53783 }
53784 
53785 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10prediction___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53786  PyObject *__pyx_r = NULL;
53787  __Pyx_TraceDeclarations
53788  __Pyx_RefNannyDeclarations
53789  PyObject *__pyx_t_1 = NULL;
53790  int __pyx_lineno = 0;
53791  const char *__pyx_filename = NULL;
53792  int __pyx_clineno = 0;
53793  __Pyx_RefNannySetupContext("__get__", 0);
53794  __Pyx_TraceCall("__get__", __pyx_f[2], 286, 0, __PYX_ERR(2, 286, __pyx_L1_error));
53795  __Pyx_XDECREF(__pyx_r);
53796  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->prediction); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 286, __pyx_L1_error)
53797  __Pyx_GOTREF(__pyx_t_1);
53798  __pyx_r = __pyx_t_1;
53799  __pyx_t_1 = 0;
53800  goto __pyx_L0;
53801 
53802  /* function exit code */
53803  __pyx_L1_error:;
53804  __Pyx_XDECREF(__pyx_t_1);
53805  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.prediction.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53806  __pyx_r = NULL;
53807  __pyx_L0:;
53808  __Pyx_XGIVEREF(__pyx_r);
53809  __Pyx_TraceReturn(__pyx_r, 0);
53810  __Pyx_RefNannyFinishContext();
53811  return __pyx_r;
53812 }
53813 
53814 /* Python wrapper */
53815 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10prediction_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53816 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10prediction_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53817  int __pyx_r;
53818  __Pyx_RefNannyDeclarations
53819  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53820  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10prediction_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53821 
53822  /* function exit code */
53823  __Pyx_RefNannyFinishContext();
53824  return __pyx_r;
53825 }
53826 
53827 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10prediction_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53828  int __pyx_r;
53829  __Pyx_TraceDeclarations
53830  __Pyx_RefNannyDeclarations
53831  std::string __pyx_t_1;
53832  int __pyx_lineno = 0;
53833  const char *__pyx_filename = NULL;
53834  int __pyx_clineno = 0;
53835  __Pyx_RefNannySetupContext("__set__", 0);
53836  __Pyx_TraceCall("__set__", __pyx_f[2], 286, 0, __PYX_ERR(2, 286, __pyx_L1_error));
53837  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 286, __pyx_L1_error)
53838  __pyx_v_self->prediction = __pyx_t_1;
53839 
53840  /* function exit code */
53841  __pyx_r = 0;
53842  goto __pyx_L0;
53843  __pyx_L1_error:;
53844  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.prediction.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53845  __pyx_r = -1;
53846  __pyx_L0:;
53847  __Pyx_TraceReturn(Py_None, 0);
53848  __Pyx_RefNannyFinishContext();
53849  return __pyx_r;
53850 }
53851 
53852 /* "mbd/CouplingFSI.pxd":287
53853  * string scheme # coupling scheme
53854  * string prediction # force for prediction
53855  * int step_nb # number of steps # <<<<<<<<<<<<<<
53856  * int step_start # starting step
53857  * double sampleRate
53858  */
53859 
53860 /* Python wrapper */
53861 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_1__get__(PyObject *__pyx_v_self); /*proto*/
53862 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_1__get__(PyObject *__pyx_v_self) {
53863  PyObject *__pyx_r = 0;
53864  __Pyx_RefNannyDeclarations
53865  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53866  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7step_nb___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53867 
53868  /* function exit code */
53869  __Pyx_RefNannyFinishContext();
53870  return __pyx_r;
53871 }
53872 
53873 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7step_nb___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53874  PyObject *__pyx_r = NULL;
53875  __Pyx_TraceDeclarations
53876  __Pyx_RefNannyDeclarations
53877  PyObject *__pyx_t_1 = NULL;
53878  int __pyx_lineno = 0;
53879  const char *__pyx_filename = NULL;
53880  int __pyx_clineno = 0;
53881  __Pyx_RefNannySetupContext("__get__", 0);
53882  __Pyx_TraceCall("__get__", __pyx_f[2], 287, 0, __PYX_ERR(2, 287, __pyx_L1_error));
53883  __Pyx_XDECREF(__pyx_r);
53884  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->step_nb); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 287, __pyx_L1_error)
53885  __Pyx_GOTREF(__pyx_t_1);
53886  __pyx_r = __pyx_t_1;
53887  __pyx_t_1 = 0;
53888  goto __pyx_L0;
53889 
53890  /* function exit code */
53891  __pyx_L1_error:;
53892  __Pyx_XDECREF(__pyx_t_1);
53893  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.step_nb.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53894  __pyx_r = NULL;
53895  __pyx_L0:;
53896  __Pyx_XGIVEREF(__pyx_r);
53897  __Pyx_TraceReturn(__pyx_r, 0);
53898  __Pyx_RefNannyFinishContext();
53899  return __pyx_r;
53900 }
53901 
53902 /* Python wrapper */
53903 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53904 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53905  int __pyx_r;
53906  __Pyx_RefNannyDeclarations
53907  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53908  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53909 
53910  /* function exit code */
53911  __Pyx_RefNannyFinishContext();
53912  return __pyx_r;
53913 }
53914 
53915 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
53916  int __pyx_r;
53917  __Pyx_TraceDeclarations
53918  __Pyx_RefNannyDeclarations
53919  int __pyx_t_1;
53920  int __pyx_lineno = 0;
53921  const char *__pyx_filename = NULL;
53922  int __pyx_clineno = 0;
53923  __Pyx_RefNannySetupContext("__set__", 0);
53924  __Pyx_TraceCall("__set__", __pyx_f[2], 287, 0, __PYX_ERR(2, 287, __pyx_L1_error));
53925  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 287, __pyx_L1_error)
53926  __pyx_v_self->step_nb = __pyx_t_1;
53927 
53928  /* function exit code */
53929  __pyx_r = 0;
53930  goto __pyx_L0;
53931  __pyx_L1_error:;
53932  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.step_nb.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53933  __pyx_r = -1;
53934  __pyx_L0:;
53935  __Pyx_TraceReturn(Py_None, 0);
53936  __Pyx_RefNannyFinishContext();
53937  return __pyx_r;
53938 }
53939 
53940 /* "mbd/CouplingFSI.pxd":288
53941  * string prediction # force for prediction
53942  * int step_nb # number of steps
53943  * int step_start # starting step # <<<<<<<<<<<<<<
53944  * double sampleRate
53945  * double next_sample
53946  */
53947 
53948 /* Python wrapper */
53949 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10step_start_1__get__(PyObject *__pyx_v_self); /*proto*/
53950 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10step_start_1__get__(PyObject *__pyx_v_self) {
53951  PyObject *__pyx_r = 0;
53952  __Pyx_RefNannyDeclarations
53953  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
53954  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10step_start___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
53955 
53956  /* function exit code */
53957  __Pyx_RefNannyFinishContext();
53958  return __pyx_r;
53959 }
53960 
53961 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10step_start___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
53962  PyObject *__pyx_r = NULL;
53963  __Pyx_TraceDeclarations
53964  __Pyx_RefNannyDeclarations
53965  PyObject *__pyx_t_1 = NULL;
53966  int __pyx_lineno = 0;
53967  const char *__pyx_filename = NULL;
53968  int __pyx_clineno = 0;
53969  __Pyx_RefNannySetupContext("__get__", 0);
53970  __Pyx_TraceCall("__get__", __pyx_f[2], 288, 0, __PYX_ERR(2, 288, __pyx_L1_error));
53971  __Pyx_XDECREF(__pyx_r);
53972  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->step_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 288, __pyx_L1_error)
53973  __Pyx_GOTREF(__pyx_t_1);
53974  __pyx_r = __pyx_t_1;
53975  __pyx_t_1 = 0;
53976  goto __pyx_L0;
53977 
53978  /* function exit code */
53979  __pyx_L1_error:;
53980  __Pyx_XDECREF(__pyx_t_1);
53981  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.step_start.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
53982  __pyx_r = NULL;
53983  __pyx_L0:;
53984  __Pyx_XGIVEREF(__pyx_r);
53985  __Pyx_TraceReturn(__pyx_r, 0);
53986  __Pyx_RefNannyFinishContext();
53987  return __pyx_r;
53988 }
53989 
53990 /* Python wrapper */
53991 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10step_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
53992 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10step_start_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
53993  int __pyx_r;
53994  __Pyx_RefNannyDeclarations
53995  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
53996  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10step_start_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
53997 
53998  /* function exit code */
53999  __Pyx_RefNannyFinishContext();
54000  return __pyx_r;
54001 }
54002 
54003 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10step_start_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54004  int __pyx_r;
54005  __Pyx_TraceDeclarations
54006  __Pyx_RefNannyDeclarations
54007  int __pyx_t_1;
54008  int __pyx_lineno = 0;
54009  const char *__pyx_filename = NULL;
54010  int __pyx_clineno = 0;
54011  __Pyx_RefNannySetupContext("__set__", 0);
54012  __Pyx_TraceCall("__set__", __pyx_f[2], 288, 0, __PYX_ERR(2, 288, __pyx_L1_error));
54013  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 288, __pyx_L1_error)
54014  __pyx_v_self->step_start = __pyx_t_1;
54015 
54016  /* function exit code */
54017  __pyx_r = 0;
54018  goto __pyx_L0;
54019  __pyx_L1_error:;
54020  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.step_start.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54021  __pyx_r = -1;
54022  __pyx_L0:;
54023  __Pyx_TraceReturn(Py_None, 0);
54024  __Pyx_RefNannyFinishContext();
54025  return __pyx_r;
54026 }
54027 
54028 /* "mbd/CouplingFSI.pxd":289
54029  * int step_nb # number of steps
54030  * int step_start # starting step
54031  * double sampleRate # <<<<<<<<<<<<<<
54032  * double next_sample
54033  * bool record_values
54034  */
54035 
54036 /* Python wrapper */
54037 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_1__get__(PyObject *__pyx_v_self); /*proto*/
54038 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_1__get__(PyObject *__pyx_v_self) {
54039  PyObject *__pyx_r = 0;
54040  __Pyx_RefNannyDeclarations
54041  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54042  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54043 
54044  /* function exit code */
54045  __Pyx_RefNannyFinishContext();
54046  return __pyx_r;
54047 }
54048 
54049 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54050  PyObject *__pyx_r = NULL;
54051  __Pyx_TraceDeclarations
54052  __Pyx_RefNannyDeclarations
54053  PyObject *__pyx_t_1 = NULL;
54054  int __pyx_lineno = 0;
54055  const char *__pyx_filename = NULL;
54056  int __pyx_clineno = 0;
54057  __Pyx_RefNannySetupContext("__get__", 0);
54058  __Pyx_TraceCall("__get__", __pyx_f[2], 289, 0, __PYX_ERR(2, 289, __pyx_L1_error));
54059  __Pyx_XDECREF(__pyx_r);
54060  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sampleRate); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 289, __pyx_L1_error)
54061  __Pyx_GOTREF(__pyx_t_1);
54062  __pyx_r = __pyx_t_1;
54063  __pyx_t_1 = 0;
54064  goto __pyx_L0;
54065 
54066  /* function exit code */
54067  __pyx_L1_error:;
54068  __Pyx_XDECREF(__pyx_t_1);
54069  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.sampleRate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54070  __pyx_r = NULL;
54071  __pyx_L0:;
54072  __Pyx_XGIVEREF(__pyx_r);
54073  __Pyx_TraceReturn(__pyx_r, 0);
54074  __Pyx_RefNannyFinishContext();
54075  return __pyx_r;
54076 }
54077 
54078 /* Python wrapper */
54079 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54080 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54081  int __pyx_r;
54082  __Pyx_RefNannyDeclarations
54083  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54084  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54085 
54086  /* function exit code */
54087  __Pyx_RefNannyFinishContext();
54088  return __pyx_r;
54089 }
54090 
54091 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54092  int __pyx_r;
54093  __Pyx_TraceDeclarations
54094  __Pyx_RefNannyDeclarations
54095  double __pyx_t_1;
54096  int __pyx_lineno = 0;
54097  const char *__pyx_filename = NULL;
54098  int __pyx_clineno = 0;
54099  __Pyx_RefNannySetupContext("__set__", 0);
54100  __Pyx_TraceCall("__set__", __pyx_f[2], 289, 0, __PYX_ERR(2, 289, __pyx_L1_error));
54101  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 289, __pyx_L1_error)
54102  __pyx_v_self->sampleRate = __pyx_t_1;
54103 
54104  /* function exit code */
54105  __pyx_r = 0;
54106  goto __pyx_L0;
54107  __pyx_L1_error:;
54108  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.sampleRate.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54109  __pyx_r = -1;
54110  __pyx_L0:;
54111  __Pyx_TraceReturn(Py_None, 0);
54112  __Pyx_RefNannyFinishContext();
54113  return __pyx_r;
54114 }
54115 
54116 /* "mbd/CouplingFSI.pxd":290
54117  * int step_start # starting step
54118  * double sampleRate
54119  * double next_sample # <<<<<<<<<<<<<<
54120  * bool record_values
54121  * object model_mesh
54122  */
54123 
54124 /* Python wrapper */
54125 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_1__get__(PyObject *__pyx_v_self); /*proto*/
54126 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_1__get__(PyObject *__pyx_v_self) {
54127  PyObject *__pyx_r = 0;
54128  __Pyx_RefNannyDeclarations
54129  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54130  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11next_sample___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54131 
54132  /* function exit code */
54133  __Pyx_RefNannyFinishContext();
54134  return __pyx_r;
54135 }
54136 
54137 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11next_sample___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54138  PyObject *__pyx_r = NULL;
54139  __Pyx_TraceDeclarations
54140  __Pyx_RefNannyDeclarations
54141  PyObject *__pyx_t_1 = NULL;
54142  int __pyx_lineno = 0;
54143  const char *__pyx_filename = NULL;
54144  int __pyx_clineno = 0;
54145  __Pyx_RefNannySetupContext("__get__", 0);
54146  __Pyx_TraceCall("__get__", __pyx_f[2], 290, 0, __PYX_ERR(2, 290, __pyx_L1_error));
54147  __Pyx_XDECREF(__pyx_r);
54148  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->next_sample); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 290, __pyx_L1_error)
54149  __Pyx_GOTREF(__pyx_t_1);
54150  __pyx_r = __pyx_t_1;
54151  __pyx_t_1 = 0;
54152  goto __pyx_L0;
54153 
54154  /* function exit code */
54155  __pyx_L1_error:;
54156  __Pyx_XDECREF(__pyx_t_1);
54157  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.next_sample.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54158  __pyx_r = NULL;
54159  __pyx_L0:;
54160  __Pyx_XGIVEREF(__pyx_r);
54161  __Pyx_TraceReturn(__pyx_r, 0);
54162  __Pyx_RefNannyFinishContext();
54163  return __pyx_r;
54164 }
54165 
54166 /* Python wrapper */
54167 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54168 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54169  int __pyx_r;
54170  __Pyx_RefNannyDeclarations
54171  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54172  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54173 
54174  /* function exit code */
54175  __Pyx_RefNannyFinishContext();
54176  return __pyx_r;
54177 }
54178 
54179 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54180  int __pyx_r;
54181  __Pyx_TraceDeclarations
54182  __Pyx_RefNannyDeclarations
54183  double __pyx_t_1;
54184  int __pyx_lineno = 0;
54185  const char *__pyx_filename = NULL;
54186  int __pyx_clineno = 0;
54187  __Pyx_RefNannySetupContext("__set__", 0);
54188  __Pyx_TraceCall("__set__", __pyx_f[2], 290, 0, __PYX_ERR(2, 290, __pyx_L1_error));
54189  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 290, __pyx_L1_error)
54190  __pyx_v_self->next_sample = __pyx_t_1;
54191 
54192  /* function exit code */
54193  __pyx_r = 0;
54194  goto __pyx_L0;
54195  __pyx_L1_error:;
54196  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.next_sample.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54197  __pyx_r = -1;
54198  __pyx_L0:;
54199  __Pyx_TraceReturn(Py_None, 0);
54200  __Pyx_RefNannyFinishContext();
54201  return __pyx_r;
54202 }
54203 
54204 /* "mbd/CouplingFSI.pxd":291
54205  * double sampleRate
54206  * double next_sample
54207  * bool record_values # <<<<<<<<<<<<<<
54208  * object model_mesh
54209  * object model_addedmass
54210  */
54211 
54212 /* Python wrapper */
54213 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13record_values_1__get__(PyObject *__pyx_v_self); /*proto*/
54214 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13record_values_1__get__(PyObject *__pyx_v_self) {
54215  PyObject *__pyx_r = 0;
54216  __Pyx_RefNannyDeclarations
54217  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54218  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13record_values___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54219 
54220  /* function exit code */
54221  __Pyx_RefNannyFinishContext();
54222  return __pyx_r;
54223 }
54224 
54225 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13record_values___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54226  PyObject *__pyx_r = NULL;
54227  __Pyx_TraceDeclarations
54228  __Pyx_RefNannyDeclarations
54229  PyObject *__pyx_t_1 = NULL;
54230  int __pyx_lineno = 0;
54231  const char *__pyx_filename = NULL;
54232  int __pyx_clineno = 0;
54233  __Pyx_RefNannySetupContext("__get__", 0);
54234  __Pyx_TraceCall("__get__", __pyx_f[2], 291, 0, __PYX_ERR(2, 291, __pyx_L1_error));
54235  __Pyx_XDECREF(__pyx_r);
54236  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->record_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 291, __pyx_L1_error)
54237  __Pyx_GOTREF(__pyx_t_1);
54238  __pyx_r = __pyx_t_1;
54239  __pyx_t_1 = 0;
54240  goto __pyx_L0;
54241 
54242  /* function exit code */
54243  __pyx_L1_error:;
54244  __Pyx_XDECREF(__pyx_t_1);
54245  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.record_values.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54246  __pyx_r = NULL;
54247  __pyx_L0:;
54248  __Pyx_XGIVEREF(__pyx_r);
54249  __Pyx_TraceReturn(__pyx_r, 0);
54250  __Pyx_RefNannyFinishContext();
54251  return __pyx_r;
54252 }
54253 
54254 /* Python wrapper */
54255 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13record_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54256 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13record_values_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54257  int __pyx_r;
54258  __Pyx_RefNannyDeclarations
54259  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54260  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13record_values_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54261 
54262  /* function exit code */
54263  __Pyx_RefNannyFinishContext();
54264  return __pyx_r;
54265 }
54266 
54267 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_13record_values_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54268  int __pyx_r;
54269  __Pyx_TraceDeclarations
54270  __Pyx_RefNannyDeclarations
54271  bool __pyx_t_1;
54272  int __pyx_lineno = 0;
54273  const char *__pyx_filename = NULL;
54274  int __pyx_clineno = 0;
54275  __Pyx_RefNannySetupContext("__set__", 0);
54276  __Pyx_TraceCall("__set__", __pyx_f[2], 291, 0, __PYX_ERR(2, 291, __pyx_L1_error));
54277  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 291, __pyx_L1_error)
54278  __pyx_v_self->record_values = __pyx_t_1;
54279 
54280  /* function exit code */
54281  __pyx_r = 0;
54282  goto __pyx_L0;
54283  __pyx_L1_error:;
54284  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.record_values.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54285  __pyx_r = -1;
54286  __pyx_L0:;
54287  __Pyx_TraceReturn(Py_None, 0);
54288  __Pyx_RefNannyFinishContext();
54289  return __pyx_r;
54290 }
54291 
54292 /* "mbd/CouplingFSI.pxd":292
54293  * double next_sample
54294  * bool record_values
54295  * object model_mesh # <<<<<<<<<<<<<<
54296  * object model_addedmass
54297  * ProtChAddedMass ProtChAddedMass
54298  */
54299 
54300 /* Python wrapper */
54301 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_1__get__(PyObject *__pyx_v_self); /*proto*/
54302 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_1__get__(PyObject *__pyx_v_self) {
54303  PyObject *__pyx_r = 0;
54304  __Pyx_RefNannyDeclarations
54305  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54306  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54307 
54308  /* function exit code */
54309  __Pyx_RefNannyFinishContext();
54310  return __pyx_r;
54311 }
54312 
54313 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54314  PyObject *__pyx_r = NULL;
54315  __Pyx_TraceDeclarations
54316  __Pyx_RefNannyDeclarations
54317  int __pyx_lineno = 0;
54318  const char *__pyx_filename = NULL;
54319  int __pyx_clineno = 0;
54320  __Pyx_RefNannySetupContext("__get__", 0);
54321  __Pyx_TraceCall("__get__", __pyx_f[2], 292, 0, __PYX_ERR(2, 292, __pyx_L1_error));
54322  __Pyx_XDECREF(__pyx_r);
54323  __Pyx_INCREF(__pyx_v_self->model_mesh);
54324  __pyx_r = __pyx_v_self->model_mesh;
54325  goto __pyx_L0;
54326 
54327  /* function exit code */
54328  __pyx_L1_error:;
54329  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_mesh.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54330  __pyx_r = NULL;
54331  __pyx_L0:;
54332  __Pyx_XGIVEREF(__pyx_r);
54333  __Pyx_TraceReturn(__pyx_r, 0);
54334  __Pyx_RefNannyFinishContext();
54335  return __pyx_r;
54336 }
54337 
54338 /* Python wrapper */
54339 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54340 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54341  int __pyx_r;
54342  __Pyx_RefNannyDeclarations
54343  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54344  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54345 
54346  /* function exit code */
54347  __Pyx_RefNannyFinishContext();
54348  return __pyx_r;
54349 }
54350 
54351 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54352  int __pyx_r;
54353  __Pyx_TraceDeclarations
54354  __Pyx_RefNannyDeclarations
54355  int __pyx_lineno = 0;
54356  const char *__pyx_filename = NULL;
54357  int __pyx_clineno = 0;
54358  __Pyx_RefNannySetupContext("__set__", 0);
54359  __Pyx_TraceCall("__set__", __pyx_f[2], 292, 0, __PYX_ERR(2, 292, __pyx_L1_error));
54360  __Pyx_INCREF(__pyx_v_value);
54361  __Pyx_GIVEREF(__pyx_v_value);
54362  __Pyx_GOTREF(__pyx_v_self->model_mesh);
54363  __Pyx_DECREF(__pyx_v_self->model_mesh);
54364  __pyx_v_self->model_mesh = __pyx_v_value;
54365 
54366  /* function exit code */
54367  __pyx_r = 0;
54368  goto __pyx_L0;
54369  __pyx_L1_error:;
54370  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_mesh.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54371  __pyx_r = -1;
54372  __pyx_L0:;
54373  __Pyx_TraceReturn(Py_None, 0);
54374  __Pyx_RefNannyFinishContext();
54375  return __pyx_r;
54376 }
54377 
54378 /* Python wrapper */
54379 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_5__del__(PyObject *__pyx_v_self); /*proto*/
54380 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_5__del__(PyObject *__pyx_v_self) {
54381  int __pyx_r;
54382  __Pyx_RefNannyDeclarations
54383  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
54384  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54385 
54386  /* function exit code */
54387  __Pyx_RefNannyFinishContext();
54388  return __pyx_r;
54389 }
54390 
54391 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54392  int __pyx_r;
54393  __Pyx_TraceDeclarations
54394  __Pyx_RefNannyDeclarations
54395  int __pyx_lineno = 0;
54396  const char *__pyx_filename = NULL;
54397  int __pyx_clineno = 0;
54398  __Pyx_RefNannySetupContext("__del__", 0);
54399  __Pyx_TraceCall("__del__", __pyx_f[2], 292, 0, __PYX_ERR(2, 292, __pyx_L1_error));
54400  __Pyx_INCREF(Py_None);
54401  __Pyx_GIVEREF(Py_None);
54402  __Pyx_GOTREF(__pyx_v_self->model_mesh);
54403  __Pyx_DECREF(__pyx_v_self->model_mesh);
54404  __pyx_v_self->model_mesh = Py_None;
54405 
54406  /* function exit code */
54407  __pyx_r = 0;
54408  goto __pyx_L0;
54409  __pyx_L1_error:;
54410  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_mesh.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54411  __pyx_r = -1;
54412  __pyx_L0:;
54413  __Pyx_TraceReturn(Py_None, 0);
54414  __Pyx_RefNannyFinishContext();
54415  return __pyx_r;
54416 }
54417 
54418 /* "mbd/CouplingFSI.pxd":293
54419  * bool record_values
54420  * object model_mesh
54421  * object model_addedmass # <<<<<<<<<<<<<<
54422  * ProtChAddedMass ProtChAddedMass
54423  * int tCount
54424  */
54425 
54426 /* Python wrapper */
54427 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_1__get__(PyObject *__pyx_v_self); /*proto*/
54428 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_1__get__(PyObject *__pyx_v_self) {
54429  PyObject *__pyx_r = 0;
54430  __Pyx_RefNannyDeclarations
54431  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54432  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54433 
54434  /* function exit code */
54435  __Pyx_RefNannyFinishContext();
54436  return __pyx_r;
54437 }
54438 
54439 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54440  PyObject *__pyx_r = NULL;
54441  __Pyx_TraceDeclarations
54442  __Pyx_RefNannyDeclarations
54443  int __pyx_lineno = 0;
54444  const char *__pyx_filename = NULL;
54445  int __pyx_clineno = 0;
54446  __Pyx_RefNannySetupContext("__get__", 0);
54447  __Pyx_TraceCall("__get__", __pyx_f[2], 293, 0, __PYX_ERR(2, 293, __pyx_L1_error));
54448  __Pyx_XDECREF(__pyx_r);
54449  __Pyx_INCREF(__pyx_v_self->model_addedmass);
54450  __pyx_r = __pyx_v_self->model_addedmass;
54451  goto __pyx_L0;
54452 
54453  /* function exit code */
54454  __pyx_L1_error:;
54455  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_addedmass.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54456  __pyx_r = NULL;
54457  __pyx_L0:;
54458  __Pyx_XGIVEREF(__pyx_r);
54459  __Pyx_TraceReturn(__pyx_r, 0);
54460  __Pyx_RefNannyFinishContext();
54461  return __pyx_r;
54462 }
54463 
54464 /* Python wrapper */
54465 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54466 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54467  int __pyx_r;
54468  __Pyx_RefNannyDeclarations
54469  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54470  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54471 
54472  /* function exit code */
54473  __Pyx_RefNannyFinishContext();
54474  return __pyx_r;
54475 }
54476 
54477 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54478  int __pyx_r;
54479  __Pyx_TraceDeclarations
54480  __Pyx_RefNannyDeclarations
54481  int __pyx_lineno = 0;
54482  const char *__pyx_filename = NULL;
54483  int __pyx_clineno = 0;
54484  __Pyx_RefNannySetupContext("__set__", 0);
54485  __Pyx_TraceCall("__set__", __pyx_f[2], 293, 0, __PYX_ERR(2, 293, __pyx_L1_error));
54486  __Pyx_INCREF(__pyx_v_value);
54487  __Pyx_GIVEREF(__pyx_v_value);
54488  __Pyx_GOTREF(__pyx_v_self->model_addedmass);
54489  __Pyx_DECREF(__pyx_v_self->model_addedmass);
54490  __pyx_v_self->model_addedmass = __pyx_v_value;
54491 
54492  /* function exit code */
54493  __pyx_r = 0;
54494  goto __pyx_L0;
54495  __pyx_L1_error:;
54496  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_addedmass.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54497  __pyx_r = -1;
54498  __pyx_L0:;
54499  __Pyx_TraceReturn(Py_None, 0);
54500  __Pyx_RefNannyFinishContext();
54501  return __pyx_r;
54502 }
54503 
54504 /* Python wrapper */
54505 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_5__del__(PyObject *__pyx_v_self); /*proto*/
54506 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_5__del__(PyObject *__pyx_v_self) {
54507  int __pyx_r;
54508  __Pyx_RefNannyDeclarations
54509  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
54510  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54511 
54512  /* function exit code */
54513  __Pyx_RefNannyFinishContext();
54514  return __pyx_r;
54515 }
54516 
54517 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54518  int __pyx_r;
54519  __Pyx_TraceDeclarations
54520  __Pyx_RefNannyDeclarations
54521  int __pyx_lineno = 0;
54522  const char *__pyx_filename = NULL;
54523  int __pyx_clineno = 0;
54524  __Pyx_RefNannySetupContext("__del__", 0);
54525  __Pyx_TraceCall("__del__", __pyx_f[2], 293, 0, __PYX_ERR(2, 293, __pyx_L1_error));
54526  __Pyx_INCREF(Py_None);
54527  __Pyx_GIVEREF(Py_None);
54528  __Pyx_GOTREF(__pyx_v_self->model_addedmass);
54529  __Pyx_DECREF(__pyx_v_self->model_addedmass);
54530  __pyx_v_self->model_addedmass = Py_None;
54531 
54532  /* function exit code */
54533  __pyx_r = 0;
54534  goto __pyx_L0;
54535  __pyx_L1_error:;
54536  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.model_addedmass.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54537  __pyx_r = -1;
54538  __pyx_L0:;
54539  __Pyx_TraceReturn(Py_None, 0);
54540  __Pyx_RefNannyFinishContext();
54541  return __pyx_r;
54542 }
54543 
54544 /* "mbd/CouplingFSI.pxd":294
54545  * object model_mesh
54546  * object model_addedmass
54547  * ProtChAddedMass ProtChAddedMass # <<<<<<<<<<<<<<
54548  * int tCount
54549  * bool initialized
54550  */
54551 
54552 /* Python wrapper */
54553 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_1__get__(PyObject *__pyx_v_self); /*proto*/
54554 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_1__get__(PyObject *__pyx_v_self) {
54555  PyObject *__pyx_r = 0;
54556  __Pyx_RefNannyDeclarations
54557  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54558  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54559 
54560  /* function exit code */
54561  __Pyx_RefNannyFinishContext();
54562  return __pyx_r;
54563 }
54564 
54565 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54566  PyObject *__pyx_r = NULL;
54567  __Pyx_TraceDeclarations
54568  __Pyx_RefNannyDeclarations
54569  int __pyx_lineno = 0;
54570  const char *__pyx_filename = NULL;
54571  int __pyx_clineno = 0;
54572  __Pyx_RefNannySetupContext("__get__", 0);
54573  __Pyx_TraceCall("__get__", __pyx_f[2], 294, 0, __PYX_ERR(2, 294, __pyx_L1_error));
54574  __Pyx_XDECREF(__pyx_r);
54575  __Pyx_INCREF(((PyObject *)__pyx_v_self->ProtChAddedMass));
54576  __pyx_r = ((PyObject *)__pyx_v_self->ProtChAddedMass);
54577  goto __pyx_L0;
54578 
54579  /* function exit code */
54580  __pyx_L1_error:;
54581  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ProtChAddedMass.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54582  __pyx_r = NULL;
54583  __pyx_L0:;
54584  __Pyx_XGIVEREF(__pyx_r);
54585  __Pyx_TraceReturn(__pyx_r, 0);
54586  __Pyx_RefNannyFinishContext();
54587  return __pyx_r;
54588 }
54589 
54590 /* Python wrapper */
54591 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54592 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54593  int __pyx_r;
54594  __Pyx_RefNannyDeclarations
54595  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54596  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54597 
54598  /* function exit code */
54599  __Pyx_RefNannyFinishContext();
54600  return __pyx_r;
54601 }
54602 
54603 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54604  int __pyx_r;
54605  __Pyx_TraceDeclarations
54606  __Pyx_RefNannyDeclarations
54607  PyObject *__pyx_t_1 = NULL;
54608  int __pyx_lineno = 0;
54609  const char *__pyx_filename = NULL;
54610  int __pyx_clineno = 0;
54611  __Pyx_RefNannySetupContext("__set__", 0);
54612  __Pyx_TraceCall("__set__", __pyx_f[2], 294, 0, __PYX_ERR(2, 294, __pyx_L1_error));
54613  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass))))) __PYX_ERR(2, 294, __pyx_L1_error)
54614  __pyx_t_1 = __pyx_v_value;
54615  __Pyx_INCREF(__pyx_t_1);
54616  __Pyx_GIVEREF(__pyx_t_1);
54617  __Pyx_GOTREF(__pyx_v_self->ProtChAddedMass);
54618  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChAddedMass));
54619  __pyx_v_self->ProtChAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_t_1);
54620  __pyx_t_1 = 0;
54621 
54622  /* function exit code */
54623  __pyx_r = 0;
54624  goto __pyx_L0;
54625  __pyx_L1_error:;
54626  __Pyx_XDECREF(__pyx_t_1);
54627  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ProtChAddedMass.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54628  __pyx_r = -1;
54629  __pyx_L0:;
54630  __Pyx_TraceReturn(Py_None, 0);
54631  __Pyx_RefNannyFinishContext();
54632  return __pyx_r;
54633 }
54634 
54635 /* Python wrapper */
54636 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_5__del__(PyObject *__pyx_v_self); /*proto*/
54637 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_5__del__(PyObject *__pyx_v_self) {
54638  int __pyx_r;
54639  __Pyx_RefNannyDeclarations
54640  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
54641  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54642 
54643  /* function exit code */
54644  __Pyx_RefNannyFinishContext();
54645  return __pyx_r;
54646 }
54647 
54648 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54649  int __pyx_r;
54650  __Pyx_TraceDeclarations
54651  __Pyx_RefNannyDeclarations
54652  int __pyx_lineno = 0;
54653  const char *__pyx_filename = NULL;
54654  int __pyx_clineno = 0;
54655  __Pyx_RefNannySetupContext("__del__", 0);
54656  __Pyx_TraceCall("__del__", __pyx_f[2], 294, 0, __PYX_ERR(2, 294, __pyx_L1_error));
54657  __Pyx_INCREF(Py_None);
54658  __Pyx_GIVEREF(Py_None);
54659  __Pyx_GOTREF(__pyx_v_self->ProtChAddedMass);
54660  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChAddedMass));
54661  __pyx_v_self->ProtChAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)Py_None);
54662 
54663  /* function exit code */
54664  __pyx_r = 0;
54665  goto __pyx_L0;
54666  __pyx_L1_error:;
54667  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.ProtChAddedMass.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54668  __pyx_r = -1;
54669  __pyx_L0:;
54670  __Pyx_TraceReturn(Py_None, 0);
54671  __Pyx_RefNannyFinishContext();
54672  return __pyx_r;
54673 }
54674 
54675 /* "mbd/CouplingFSI.pxd":295
54676  * object model_addedmass
54677  * ProtChAddedMass ProtChAddedMass
54678  * int tCount # <<<<<<<<<<<<<<
54679  * bool initialized
54680  * bool update_substeps
54681  */
54682 
54683 /* Python wrapper */
54684 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6tCount_1__get__(PyObject *__pyx_v_self); /*proto*/
54685 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6tCount_1__get__(PyObject *__pyx_v_self) {
54686  PyObject *__pyx_r = 0;
54687  __Pyx_RefNannyDeclarations
54688  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54689  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6tCount___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54690 
54691  /* function exit code */
54692  __Pyx_RefNannyFinishContext();
54693  return __pyx_r;
54694 }
54695 
54696 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6tCount___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54697  PyObject *__pyx_r = NULL;
54698  __Pyx_TraceDeclarations
54699  __Pyx_RefNannyDeclarations
54700  PyObject *__pyx_t_1 = NULL;
54701  int __pyx_lineno = 0;
54702  const char *__pyx_filename = NULL;
54703  int __pyx_clineno = 0;
54704  __Pyx_RefNannySetupContext("__get__", 0);
54705  __Pyx_TraceCall("__get__", __pyx_f[2], 295, 0, __PYX_ERR(2, 295, __pyx_L1_error));
54706  __Pyx_XDECREF(__pyx_r);
54707  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 295, __pyx_L1_error)
54708  __Pyx_GOTREF(__pyx_t_1);
54709  __pyx_r = __pyx_t_1;
54710  __pyx_t_1 = 0;
54711  goto __pyx_L0;
54712 
54713  /* function exit code */
54714  __pyx_L1_error:;
54715  __Pyx_XDECREF(__pyx_t_1);
54716  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.tCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54717  __pyx_r = NULL;
54718  __pyx_L0:;
54719  __Pyx_XGIVEREF(__pyx_r);
54720  __Pyx_TraceReturn(__pyx_r, 0);
54721  __Pyx_RefNannyFinishContext();
54722  return __pyx_r;
54723 }
54724 
54725 /* Python wrapper */
54726 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6tCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54727 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6tCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54728  int __pyx_r;
54729  __Pyx_RefNannyDeclarations
54730  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54731  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6tCount_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54732 
54733  /* function exit code */
54734  __Pyx_RefNannyFinishContext();
54735  return __pyx_r;
54736 }
54737 
54738 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_6tCount_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54739  int __pyx_r;
54740  __Pyx_TraceDeclarations
54741  __Pyx_RefNannyDeclarations
54742  int __pyx_t_1;
54743  int __pyx_lineno = 0;
54744  const char *__pyx_filename = NULL;
54745  int __pyx_clineno = 0;
54746  __Pyx_RefNannySetupContext("__set__", 0);
54747  __Pyx_TraceCall("__set__", __pyx_f[2], 295, 0, __PYX_ERR(2, 295, __pyx_L1_error));
54748  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 295, __pyx_L1_error)
54749  __pyx_v_self->tCount = __pyx_t_1;
54750 
54751  /* function exit code */
54752  __pyx_r = 0;
54753  goto __pyx_L0;
54754  __pyx_L1_error:;
54755  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.tCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54756  __pyx_r = -1;
54757  __pyx_L0:;
54758  __Pyx_TraceReturn(Py_None, 0);
54759  __Pyx_RefNannyFinishContext();
54760  return __pyx_r;
54761 }
54762 
54763 /* "mbd/CouplingFSI.pxd":296
54764  * ProtChAddedMass ProtChAddedMass
54765  * int tCount
54766  * bool initialized # <<<<<<<<<<<<<<
54767  * bool update_substeps
54768  * int nBodiesIBM
54769  */
54770 
54771 /* Python wrapper */
54772 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11initialized_1__get__(PyObject *__pyx_v_self); /*proto*/
54773 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11initialized_1__get__(PyObject *__pyx_v_self) {
54774  PyObject *__pyx_r = 0;
54775  __Pyx_RefNannyDeclarations
54776  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54777  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11initialized___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54778 
54779  /* function exit code */
54780  __Pyx_RefNannyFinishContext();
54781  return __pyx_r;
54782 }
54783 
54784 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11initialized___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54785  PyObject *__pyx_r = NULL;
54786  __Pyx_TraceDeclarations
54787  __Pyx_RefNannyDeclarations
54788  PyObject *__pyx_t_1 = NULL;
54789  int __pyx_lineno = 0;
54790  const char *__pyx_filename = NULL;
54791  int __pyx_clineno = 0;
54792  __Pyx_RefNannySetupContext("__get__", 0);
54793  __Pyx_TraceCall("__get__", __pyx_f[2], 296, 0, __PYX_ERR(2, 296, __pyx_L1_error));
54794  __Pyx_XDECREF(__pyx_r);
54795  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 296, __pyx_L1_error)
54796  __Pyx_GOTREF(__pyx_t_1);
54797  __pyx_r = __pyx_t_1;
54798  __pyx_t_1 = 0;
54799  goto __pyx_L0;
54800 
54801  /* function exit code */
54802  __pyx_L1_error:;
54803  __Pyx_XDECREF(__pyx_t_1);
54804  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.initialized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54805  __pyx_r = NULL;
54806  __pyx_L0:;
54807  __Pyx_XGIVEREF(__pyx_r);
54808  __Pyx_TraceReturn(__pyx_r, 0);
54809  __Pyx_RefNannyFinishContext();
54810  return __pyx_r;
54811 }
54812 
54813 /* Python wrapper */
54814 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11initialized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54815 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11initialized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54816  int __pyx_r;
54817  __Pyx_RefNannyDeclarations
54818  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54819  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11initialized_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54820 
54821  /* function exit code */
54822  __Pyx_RefNannyFinishContext();
54823  return __pyx_r;
54824 }
54825 
54826 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_11initialized_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54827  int __pyx_r;
54828  __Pyx_TraceDeclarations
54829  __Pyx_RefNannyDeclarations
54830  bool __pyx_t_1;
54831  int __pyx_lineno = 0;
54832  const char *__pyx_filename = NULL;
54833  int __pyx_clineno = 0;
54834  __Pyx_RefNannySetupContext("__set__", 0);
54835  __Pyx_TraceCall("__set__", __pyx_f[2], 296, 0, __PYX_ERR(2, 296, __pyx_L1_error));
54836  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 296, __pyx_L1_error)
54837  __pyx_v_self->initialized = __pyx_t_1;
54838 
54839  /* function exit code */
54840  __pyx_r = 0;
54841  goto __pyx_L0;
54842  __pyx_L1_error:;
54843  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.initialized.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54844  __pyx_r = -1;
54845  __pyx_L0:;
54846  __Pyx_TraceReturn(Py_None, 0);
54847  __Pyx_RefNannyFinishContext();
54848  return __pyx_r;
54849 }
54850 
54851 /* "mbd/CouplingFSI.pxd":297
54852  * int tCount
54853  * bool initialized
54854  * bool update_substeps # <<<<<<<<<<<<<<
54855  * int nBodiesIBM
54856  * object log_chrono_bodies
54857  */
54858 
54859 /* Python wrapper */
54860 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_1__get__(PyObject *__pyx_v_self); /*proto*/
54861 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_1__get__(PyObject *__pyx_v_self) {
54862  PyObject *__pyx_r = 0;
54863  __Pyx_RefNannyDeclarations
54864  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54865  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54866 
54867  /* function exit code */
54868  __Pyx_RefNannyFinishContext();
54869  return __pyx_r;
54870 }
54871 
54872 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54873  PyObject *__pyx_r = NULL;
54874  __Pyx_TraceDeclarations
54875  __Pyx_RefNannyDeclarations
54876  PyObject *__pyx_t_1 = NULL;
54877  int __pyx_lineno = 0;
54878  const char *__pyx_filename = NULL;
54879  int __pyx_clineno = 0;
54880  __Pyx_RefNannySetupContext("__get__", 0);
54881  __Pyx_TraceCall("__get__", __pyx_f[2], 297, 0, __PYX_ERR(2, 297, __pyx_L1_error));
54882  __Pyx_XDECREF(__pyx_r);
54883  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->update_substeps); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 297, __pyx_L1_error)
54884  __Pyx_GOTREF(__pyx_t_1);
54885  __pyx_r = __pyx_t_1;
54886  __pyx_t_1 = 0;
54887  goto __pyx_L0;
54888 
54889  /* function exit code */
54890  __pyx_L1_error:;
54891  __Pyx_XDECREF(__pyx_t_1);
54892  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.update_substeps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54893  __pyx_r = NULL;
54894  __pyx_L0:;
54895  __Pyx_XGIVEREF(__pyx_r);
54896  __Pyx_TraceReturn(__pyx_r, 0);
54897  __Pyx_RefNannyFinishContext();
54898  return __pyx_r;
54899 }
54900 
54901 /* Python wrapper */
54902 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54903 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54904  int __pyx_r;
54905  __Pyx_RefNannyDeclarations
54906  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54907  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54908 
54909  /* function exit code */
54910  __Pyx_RefNannyFinishContext();
54911  return __pyx_r;
54912 }
54913 
54914 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
54915  int __pyx_r;
54916  __Pyx_TraceDeclarations
54917  __Pyx_RefNannyDeclarations
54918  bool __pyx_t_1;
54919  int __pyx_lineno = 0;
54920  const char *__pyx_filename = NULL;
54921  int __pyx_clineno = 0;
54922  __Pyx_RefNannySetupContext("__set__", 0);
54923  __Pyx_TraceCall("__set__", __pyx_f[2], 297, 0, __PYX_ERR(2, 297, __pyx_L1_error));
54924  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 297, __pyx_L1_error)
54925  __pyx_v_self->update_substeps = __pyx_t_1;
54926 
54927  /* function exit code */
54928  __pyx_r = 0;
54929  goto __pyx_L0;
54930  __pyx_L1_error:;
54931  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.update_substeps.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54932  __pyx_r = -1;
54933  __pyx_L0:;
54934  __Pyx_TraceReturn(Py_None, 0);
54935  __Pyx_RefNannyFinishContext();
54936  return __pyx_r;
54937 }
54938 
54939 /* "mbd/CouplingFSI.pxd":298
54940  * bool initialized
54941  * bool update_substeps
54942  * int nBodiesIBM # <<<<<<<<<<<<<<
54943  * object log_chrono_bodies
54944  * object log_chrono_springs
54945  */
54946 
54947 /* Python wrapper */
54948 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_1__get__(PyObject *__pyx_v_self); /*proto*/
54949 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_1__get__(PyObject *__pyx_v_self) {
54950  PyObject *__pyx_r = 0;
54951  __Pyx_RefNannyDeclarations
54952  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
54953  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
54954 
54955  /* function exit code */
54956  __Pyx_RefNannyFinishContext();
54957  return __pyx_r;
54958 }
54959 
54960 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
54961  PyObject *__pyx_r = NULL;
54962  __Pyx_TraceDeclarations
54963  __Pyx_RefNannyDeclarations
54964  PyObject *__pyx_t_1 = NULL;
54965  int __pyx_lineno = 0;
54966  const char *__pyx_filename = NULL;
54967  int __pyx_clineno = 0;
54968  __Pyx_RefNannySetupContext("__get__", 0);
54969  __Pyx_TraceCall("__get__", __pyx_f[2], 298, 0, __PYX_ERR(2, 298, __pyx_L1_error));
54970  __Pyx_XDECREF(__pyx_r);
54971  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nBodiesIBM); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 298, __pyx_L1_error)
54972  __Pyx_GOTREF(__pyx_t_1);
54973  __pyx_r = __pyx_t_1;
54974  __pyx_t_1 = 0;
54975  goto __pyx_L0;
54976 
54977  /* function exit code */
54978  __pyx_L1_error:;
54979  __Pyx_XDECREF(__pyx_t_1);
54980  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.nBodiesIBM.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
54981  __pyx_r = NULL;
54982  __pyx_L0:;
54983  __Pyx_XGIVEREF(__pyx_r);
54984  __Pyx_TraceReturn(__pyx_r, 0);
54985  __Pyx_RefNannyFinishContext();
54986  return __pyx_r;
54987 }
54988 
54989 /* Python wrapper */
54990 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
54991 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
54992  int __pyx_r;
54993  __Pyx_RefNannyDeclarations
54994  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
54995  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
54996 
54997  /* function exit code */
54998  __Pyx_RefNannyFinishContext();
54999  return __pyx_r;
55000 }
55001 
55002 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
55003  int __pyx_r;
55004  __Pyx_TraceDeclarations
55005  __Pyx_RefNannyDeclarations
55006  int __pyx_t_1;
55007  int __pyx_lineno = 0;
55008  const char *__pyx_filename = NULL;
55009  int __pyx_clineno = 0;
55010  __Pyx_RefNannySetupContext("__set__", 0);
55011  __Pyx_TraceCall("__set__", __pyx_f[2], 298, 0, __PYX_ERR(2, 298, __pyx_L1_error));
55012  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 298, __pyx_L1_error)
55013  __pyx_v_self->nBodiesIBM = __pyx_t_1;
55014 
55015  /* function exit code */
55016  __pyx_r = 0;
55017  goto __pyx_L0;
55018  __pyx_L1_error:;
55019  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.nBodiesIBM.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55020  __pyx_r = -1;
55021  __pyx_L0:;
55022  __Pyx_TraceReturn(Py_None, 0);
55023  __Pyx_RefNannyFinishContext();
55024  return __pyx_r;
55025 }
55026 
55027 /* "mbd/CouplingFSI.pxd":299
55028  * bool update_substeps
55029  * int nBodiesIBM
55030  * object log_chrono_bodies # <<<<<<<<<<<<<<
55031  * object log_chrono_springs
55032  * object log_chrono_residuals
55033  */
55034 
55035 /* Python wrapper */
55036 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_1__get__(PyObject *__pyx_v_self); /*proto*/
55037 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_1__get__(PyObject *__pyx_v_self) {
55038  PyObject *__pyx_r = 0;
55039  __Pyx_RefNannyDeclarations
55040  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
55041  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55042 
55043  /* function exit code */
55044  __Pyx_RefNannyFinishContext();
55045  return __pyx_r;
55046 }
55047 
55048 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55049  PyObject *__pyx_r = NULL;
55050  __Pyx_TraceDeclarations
55051  __Pyx_RefNannyDeclarations
55052  int __pyx_lineno = 0;
55053  const char *__pyx_filename = NULL;
55054  int __pyx_clineno = 0;
55055  __Pyx_RefNannySetupContext("__get__", 0);
55056  __Pyx_TraceCall("__get__", __pyx_f[2], 299, 0, __PYX_ERR(2, 299, __pyx_L1_error));
55057  __Pyx_XDECREF(__pyx_r);
55058  __Pyx_INCREF(__pyx_v_self->log_chrono_bodies);
55059  __pyx_r = __pyx_v_self->log_chrono_bodies;
55060  goto __pyx_L0;
55061 
55062  /* function exit code */
55063  __pyx_L1_error:;
55064  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_bodies.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55065  __pyx_r = NULL;
55066  __pyx_L0:;
55067  __Pyx_XGIVEREF(__pyx_r);
55068  __Pyx_TraceReturn(__pyx_r, 0);
55069  __Pyx_RefNannyFinishContext();
55070  return __pyx_r;
55071 }
55072 
55073 /* Python wrapper */
55074 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
55075 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
55076  int __pyx_r;
55077  __Pyx_RefNannyDeclarations
55078  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
55079  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
55080 
55081  /* function exit code */
55082  __Pyx_RefNannyFinishContext();
55083  return __pyx_r;
55084 }
55085 
55086 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
55087  int __pyx_r;
55088  __Pyx_TraceDeclarations
55089  __Pyx_RefNannyDeclarations
55090  int __pyx_lineno = 0;
55091  const char *__pyx_filename = NULL;
55092  int __pyx_clineno = 0;
55093  __Pyx_RefNannySetupContext("__set__", 0);
55094  __Pyx_TraceCall("__set__", __pyx_f[2], 299, 0, __PYX_ERR(2, 299, __pyx_L1_error));
55095  __Pyx_INCREF(__pyx_v_value);
55096  __Pyx_GIVEREF(__pyx_v_value);
55097  __Pyx_GOTREF(__pyx_v_self->log_chrono_bodies);
55098  __Pyx_DECREF(__pyx_v_self->log_chrono_bodies);
55099  __pyx_v_self->log_chrono_bodies = __pyx_v_value;
55100 
55101  /* function exit code */
55102  __pyx_r = 0;
55103  goto __pyx_L0;
55104  __pyx_L1_error:;
55105  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_bodies.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55106  __pyx_r = -1;
55107  __pyx_L0:;
55108  __Pyx_TraceReturn(Py_None, 0);
55109  __Pyx_RefNannyFinishContext();
55110  return __pyx_r;
55111 }
55112 
55113 /* Python wrapper */
55114 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_5__del__(PyObject *__pyx_v_self); /*proto*/
55115 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_5__del__(PyObject *__pyx_v_self) {
55116  int __pyx_r;
55117  __Pyx_RefNannyDeclarations
55118  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
55119  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55120 
55121  /* function exit code */
55122  __Pyx_RefNannyFinishContext();
55123  return __pyx_r;
55124 }
55125 
55126 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55127  int __pyx_r;
55128  __Pyx_TraceDeclarations
55129  __Pyx_RefNannyDeclarations
55130  int __pyx_lineno = 0;
55131  const char *__pyx_filename = NULL;
55132  int __pyx_clineno = 0;
55133  __Pyx_RefNannySetupContext("__del__", 0);
55134  __Pyx_TraceCall("__del__", __pyx_f[2], 299, 0, __PYX_ERR(2, 299, __pyx_L1_error));
55135  __Pyx_INCREF(Py_None);
55136  __Pyx_GIVEREF(Py_None);
55137  __Pyx_GOTREF(__pyx_v_self->log_chrono_bodies);
55138  __Pyx_DECREF(__pyx_v_self->log_chrono_bodies);
55139  __pyx_v_self->log_chrono_bodies = Py_None;
55140 
55141  /* function exit code */
55142  __pyx_r = 0;
55143  goto __pyx_L0;
55144  __pyx_L1_error:;
55145  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_bodies.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55146  __pyx_r = -1;
55147  __pyx_L0:;
55148  __Pyx_TraceReturn(Py_None, 0);
55149  __Pyx_RefNannyFinishContext();
55150  return __pyx_r;
55151 }
55152 
55153 /* "mbd/CouplingFSI.pxd":300
55154  * int nBodiesIBM
55155  * object log_chrono_bodies
55156  * object log_chrono_springs # <<<<<<<<<<<<<<
55157  * object log_chrono_residuals
55158  * string log_chrono_format
55159  */
55160 
55161 /* Python wrapper */
55162 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_1__get__(PyObject *__pyx_v_self); /*proto*/
55163 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_1__get__(PyObject *__pyx_v_self) {
55164  PyObject *__pyx_r = 0;
55165  __Pyx_RefNannyDeclarations
55166  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
55167  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55168 
55169  /* function exit code */
55170  __Pyx_RefNannyFinishContext();
55171  return __pyx_r;
55172 }
55173 
55174 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55175  PyObject *__pyx_r = NULL;
55176  __Pyx_TraceDeclarations
55177  __Pyx_RefNannyDeclarations
55178  int __pyx_lineno = 0;
55179  const char *__pyx_filename = NULL;
55180  int __pyx_clineno = 0;
55181  __Pyx_RefNannySetupContext("__get__", 0);
55182  __Pyx_TraceCall("__get__", __pyx_f[2], 300, 0, __PYX_ERR(2, 300, __pyx_L1_error));
55183  __Pyx_XDECREF(__pyx_r);
55184  __Pyx_INCREF(__pyx_v_self->log_chrono_springs);
55185  __pyx_r = __pyx_v_self->log_chrono_springs;
55186  goto __pyx_L0;
55187 
55188  /* function exit code */
55189  __pyx_L1_error:;
55190  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_springs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55191  __pyx_r = NULL;
55192  __pyx_L0:;
55193  __Pyx_XGIVEREF(__pyx_r);
55194  __Pyx_TraceReturn(__pyx_r, 0);
55195  __Pyx_RefNannyFinishContext();
55196  return __pyx_r;
55197 }
55198 
55199 /* Python wrapper */
55200 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
55201 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
55202  int __pyx_r;
55203  __Pyx_RefNannyDeclarations
55204  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
55205  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
55206 
55207  /* function exit code */
55208  __Pyx_RefNannyFinishContext();
55209  return __pyx_r;
55210 }
55211 
55212 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
55213  int __pyx_r;
55214  __Pyx_TraceDeclarations
55215  __Pyx_RefNannyDeclarations
55216  int __pyx_lineno = 0;
55217  const char *__pyx_filename = NULL;
55218  int __pyx_clineno = 0;
55219  __Pyx_RefNannySetupContext("__set__", 0);
55220  __Pyx_TraceCall("__set__", __pyx_f[2], 300, 0, __PYX_ERR(2, 300, __pyx_L1_error));
55221  __Pyx_INCREF(__pyx_v_value);
55222  __Pyx_GIVEREF(__pyx_v_value);
55223  __Pyx_GOTREF(__pyx_v_self->log_chrono_springs);
55224  __Pyx_DECREF(__pyx_v_self->log_chrono_springs);
55225  __pyx_v_self->log_chrono_springs = __pyx_v_value;
55226 
55227  /* function exit code */
55228  __pyx_r = 0;
55229  goto __pyx_L0;
55230  __pyx_L1_error:;
55231  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_springs.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55232  __pyx_r = -1;
55233  __pyx_L0:;
55234  __Pyx_TraceReturn(Py_None, 0);
55235  __Pyx_RefNannyFinishContext();
55236  return __pyx_r;
55237 }
55238 
55239 /* Python wrapper */
55240 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_5__del__(PyObject *__pyx_v_self); /*proto*/
55241 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_5__del__(PyObject *__pyx_v_self) {
55242  int __pyx_r;
55243  __Pyx_RefNannyDeclarations
55244  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
55245  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55246 
55247  /* function exit code */
55248  __Pyx_RefNannyFinishContext();
55249  return __pyx_r;
55250 }
55251 
55252 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55253  int __pyx_r;
55254  __Pyx_TraceDeclarations
55255  __Pyx_RefNannyDeclarations
55256  int __pyx_lineno = 0;
55257  const char *__pyx_filename = NULL;
55258  int __pyx_clineno = 0;
55259  __Pyx_RefNannySetupContext("__del__", 0);
55260  __Pyx_TraceCall("__del__", __pyx_f[2], 300, 0, __PYX_ERR(2, 300, __pyx_L1_error));
55261  __Pyx_INCREF(Py_None);
55262  __Pyx_GIVEREF(Py_None);
55263  __Pyx_GOTREF(__pyx_v_self->log_chrono_springs);
55264  __Pyx_DECREF(__pyx_v_self->log_chrono_springs);
55265  __pyx_v_self->log_chrono_springs = Py_None;
55266 
55267  /* function exit code */
55268  __pyx_r = 0;
55269  goto __pyx_L0;
55270  __pyx_L1_error:;
55271  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_springs.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55272  __pyx_r = -1;
55273  __pyx_L0:;
55274  __Pyx_TraceReturn(Py_None, 0);
55275  __Pyx_RefNannyFinishContext();
55276  return __pyx_r;
55277 }
55278 
55279 /* "mbd/CouplingFSI.pxd":301
55280  * object log_chrono_bodies
55281  * object log_chrono_springs
55282  * object log_chrono_residuals # <<<<<<<<<<<<<<
55283  * string log_chrono_format
55284  *
55285  */
55286 
55287 /* Python wrapper */
55288 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_1__get__(PyObject *__pyx_v_self); /*proto*/
55289 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_1__get__(PyObject *__pyx_v_self) {
55290  PyObject *__pyx_r = 0;
55291  __Pyx_RefNannyDeclarations
55292  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
55293  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55294 
55295  /* function exit code */
55296  __Pyx_RefNannyFinishContext();
55297  return __pyx_r;
55298 }
55299 
55300 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55301  PyObject *__pyx_r = NULL;
55302  __Pyx_TraceDeclarations
55303  __Pyx_RefNannyDeclarations
55304  int __pyx_lineno = 0;
55305  const char *__pyx_filename = NULL;
55306  int __pyx_clineno = 0;
55307  __Pyx_RefNannySetupContext("__get__", 0);
55308  __Pyx_TraceCall("__get__", __pyx_f[2], 301, 0, __PYX_ERR(2, 301, __pyx_L1_error));
55309  __Pyx_XDECREF(__pyx_r);
55310  __Pyx_INCREF(__pyx_v_self->log_chrono_residuals);
55311  __pyx_r = __pyx_v_self->log_chrono_residuals;
55312  goto __pyx_L0;
55313 
55314  /* function exit code */
55315  __pyx_L1_error:;
55316  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_residuals.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55317  __pyx_r = NULL;
55318  __pyx_L0:;
55319  __Pyx_XGIVEREF(__pyx_r);
55320  __Pyx_TraceReturn(__pyx_r, 0);
55321  __Pyx_RefNannyFinishContext();
55322  return __pyx_r;
55323 }
55324 
55325 /* Python wrapper */
55326 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
55327 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
55328  int __pyx_r;
55329  __Pyx_RefNannyDeclarations
55330  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
55331  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
55332 
55333  /* function exit code */
55334  __Pyx_RefNannyFinishContext();
55335  return __pyx_r;
55336 }
55337 
55338 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
55339  int __pyx_r;
55340  __Pyx_TraceDeclarations
55341  __Pyx_RefNannyDeclarations
55342  int __pyx_lineno = 0;
55343  const char *__pyx_filename = NULL;
55344  int __pyx_clineno = 0;
55345  __Pyx_RefNannySetupContext("__set__", 0);
55346  __Pyx_TraceCall("__set__", __pyx_f[2], 301, 0, __PYX_ERR(2, 301, __pyx_L1_error));
55347  __Pyx_INCREF(__pyx_v_value);
55348  __Pyx_GIVEREF(__pyx_v_value);
55349  __Pyx_GOTREF(__pyx_v_self->log_chrono_residuals);
55350  __Pyx_DECREF(__pyx_v_self->log_chrono_residuals);
55351  __pyx_v_self->log_chrono_residuals = __pyx_v_value;
55352 
55353  /* function exit code */
55354  __pyx_r = 0;
55355  goto __pyx_L0;
55356  __pyx_L1_error:;
55357  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_residuals.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55358  __pyx_r = -1;
55359  __pyx_L0:;
55360  __Pyx_TraceReturn(Py_None, 0);
55361  __Pyx_RefNannyFinishContext();
55362  return __pyx_r;
55363 }
55364 
55365 /* Python wrapper */
55366 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_5__del__(PyObject *__pyx_v_self); /*proto*/
55367 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_5__del__(PyObject *__pyx_v_self) {
55368  int __pyx_r;
55369  __Pyx_RefNannyDeclarations
55370  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
55371  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55372 
55373  /* function exit code */
55374  __Pyx_RefNannyFinishContext();
55375  return __pyx_r;
55376 }
55377 
55378 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55379  int __pyx_r;
55380  __Pyx_TraceDeclarations
55381  __Pyx_RefNannyDeclarations
55382  int __pyx_lineno = 0;
55383  const char *__pyx_filename = NULL;
55384  int __pyx_clineno = 0;
55385  __Pyx_RefNannySetupContext("__del__", 0);
55386  __Pyx_TraceCall("__del__", __pyx_f[2], 301, 0, __PYX_ERR(2, 301, __pyx_L1_error));
55387  __Pyx_INCREF(Py_None);
55388  __Pyx_GIVEREF(Py_None);
55389  __Pyx_GOTREF(__pyx_v_self->log_chrono_residuals);
55390  __Pyx_DECREF(__pyx_v_self->log_chrono_residuals);
55391  __pyx_v_self->log_chrono_residuals = Py_None;
55392 
55393  /* function exit code */
55394  __pyx_r = 0;
55395  goto __pyx_L0;
55396  __pyx_L1_error:;
55397  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_residuals.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55398  __pyx_r = -1;
55399  __pyx_L0:;
55400  __Pyx_TraceReturn(Py_None, 0);
55401  __Pyx_RefNannyFinishContext();
55402  return __pyx_r;
55403 }
55404 
55405 /* "mbd/CouplingFSI.pxd":302
55406  * object log_chrono_springs
55407  * object log_chrono_residuals
55408  * string log_chrono_format # <<<<<<<<<<<<<<
55409  *
55410  *
55411  */
55412 
55413 /* Python wrapper */
55414 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_1__get__(PyObject *__pyx_v_self); /*proto*/
55415 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_1__get__(PyObject *__pyx_v_self) {
55416  PyObject *__pyx_r = 0;
55417  __Pyx_RefNannyDeclarations
55418  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
55419  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55420 
55421  /* function exit code */
55422  __Pyx_RefNannyFinishContext();
55423  return __pyx_r;
55424 }
55425 
55426 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55427  PyObject *__pyx_r = NULL;
55428  __Pyx_TraceDeclarations
55429  __Pyx_RefNannyDeclarations
55430  PyObject *__pyx_t_1 = NULL;
55431  int __pyx_lineno = 0;
55432  const char *__pyx_filename = NULL;
55433  int __pyx_clineno = 0;
55434  __Pyx_RefNannySetupContext("__get__", 0);
55435  __Pyx_TraceCall("__get__", __pyx_f[2], 302, 0, __PYX_ERR(2, 302, __pyx_L1_error));
55436  __Pyx_XDECREF(__pyx_r);
55437  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->log_chrono_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 302, __pyx_L1_error)
55438  __Pyx_GOTREF(__pyx_t_1);
55439  __pyx_r = __pyx_t_1;
55440  __pyx_t_1 = 0;
55441  goto __pyx_L0;
55442 
55443  /* function exit code */
55444  __pyx_L1_error:;
55445  __Pyx_XDECREF(__pyx_t_1);
55446  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55447  __pyx_r = NULL;
55448  __pyx_L0:;
55449  __Pyx_XGIVEREF(__pyx_r);
55450  __Pyx_TraceReturn(__pyx_r, 0);
55451  __Pyx_RefNannyFinishContext();
55452  return __pyx_r;
55453 }
55454 
55455 /* Python wrapper */
55456 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
55457 static int __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
55458  int __pyx_r;
55459  __Pyx_RefNannyDeclarations
55460  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
55461  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v_value));
55462 
55463  /* function exit code */
55464  __Pyx_RefNannyFinishContext();
55465  return __pyx_r;
55466 }
55467 
55468 static int __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, PyObject *__pyx_v_value) {
55469  int __pyx_r;
55470  __Pyx_TraceDeclarations
55471  __Pyx_RefNannyDeclarations
55472  std::string __pyx_t_1;
55473  int __pyx_lineno = 0;
55474  const char *__pyx_filename = NULL;
55475  int __pyx_clineno = 0;
55476  __Pyx_RefNannySetupContext("__set__", 0);
55477  __Pyx_TraceCall("__set__", __pyx_f[2], 302, 0, __PYX_ERR(2, 302, __pyx_L1_error));
55478  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 302, __pyx_L1_error)
55479  __pyx_v_self->log_chrono_format = __pyx_t_1;
55480 
55481  /* function exit code */
55482  __pyx_r = 0;
55483  goto __pyx_L0;
55484  __pyx_L1_error:;
55485  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.log_chrono_format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55486  __pyx_r = -1;
55487  __pyx_L0:;
55488  __Pyx_TraceReturn(Py_None, 0);
55489  __Pyx_RefNannyFinishContext();
55490  return __pyx_r;
55491 }
55492 
55493 /* "(tree fragment)":1
55494  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
55495  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55496  * def __setstate_cython__(self, __pyx_state):
55497  */
55498 
55499 /* Python wrapper */
55500 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_59__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
55501 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_58__reduce_cython__[] = "ProtChSystem.__reduce_cython__(self)";
55502 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_59__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_59__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_58__reduce_cython__};
55503 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_59__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
55504  PyObject *__pyx_r = 0;
55505  __Pyx_RefNannyDeclarations
55506  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
55507  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_58__reduce_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self));
55508 
55509  /* function exit code */
55510  __Pyx_RefNannyFinishContext();
55511  return __pyx_r;
55512 }
55513 
55514 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_58__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self) {
55515  PyObject *__pyx_r = NULL;
55516  __Pyx_TraceDeclarations
55517  __Pyx_RefNannyDeclarations
55518  PyObject *__pyx_t_1 = NULL;
55519  int __pyx_lineno = 0;
55520  const char *__pyx_filename = NULL;
55521  int __pyx_clineno = 0;
55522  __Pyx_TraceFrameInit(__pyx_codeobj__138)
55523  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
55524  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
55525 
55526  /* "(tree fragment)":2
55527  * def __reduce_cython__(self):
55528  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
55529  * def __setstate_cython__(self, __pyx_state):
55530  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55531  */
55532  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__139, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
55533  __Pyx_GOTREF(__pyx_t_1);
55534  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
55535  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55536  __PYX_ERR(1, 2, __pyx_L1_error)
55537 
55538  /* "(tree fragment)":1
55539  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
55540  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55541  * def __setstate_cython__(self, __pyx_state):
55542  */
55543 
55544  /* function exit code */
55545  __pyx_L1_error:;
55546  __Pyx_XDECREF(__pyx_t_1);
55547  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55548  __pyx_r = NULL;
55549  __Pyx_XGIVEREF(__pyx_r);
55550  __Pyx_TraceReturn(__pyx_r, 0);
55551  __Pyx_RefNannyFinishContext();
55552  return __pyx_r;
55553 }
55554 
55555 /* "(tree fragment)":3
55556  * def __reduce_cython__(self):
55557  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55558  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
55559  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55560  */
55561 
55562 /* Python wrapper */
55563 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_61__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
55564 static char __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_60__setstate_cython__[] = "ProtChSystem.__setstate_cython__(self, __pyx_state)";
55565 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_61__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_61__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_60__setstate_cython__};
55566 static PyObject *__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_61__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
55567  PyObject *__pyx_r = 0;
55568  __Pyx_RefNannyDeclarations
55569  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
55570  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_60__setstate_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
55571 
55572  /* function exit code */
55573  __Pyx_RefNannyFinishContext();
55574  return __pyx_r;
55575 }
55576 
55577 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12ProtChSystem_60__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
55578  PyObject *__pyx_r = NULL;
55579  __Pyx_TraceDeclarations
55580  __Pyx_RefNannyDeclarations
55581  PyObject *__pyx_t_1 = NULL;
55582  int __pyx_lineno = 0;
55583  const char *__pyx_filename = NULL;
55584  int __pyx_clineno = 0;
55585  __Pyx_TraceFrameInit(__pyx_codeobj__140)
55586  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
55587  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
55588 
55589  /* "(tree fragment)":4
55590  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55591  * def __setstate_cython__(self, __pyx_state):
55592  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
55593  */
55594  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__141, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
55595  __Pyx_GOTREF(__pyx_t_1);
55596  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
55597  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55598  __PYX_ERR(1, 4, __pyx_L1_error)
55599 
55600  /* "(tree fragment)":3
55601  * def __reduce_cython__(self):
55602  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55603  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
55604  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
55605  */
55606 
55607  /* function exit code */
55608  __pyx_L1_error:;
55609  __Pyx_XDECREF(__pyx_t_1);
55610  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChSystem.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55611  __pyx_r = NULL;
55612  __Pyx_XGIVEREF(__pyx_r);
55613  __Pyx_TraceReturn(__pyx_r, 0);
55614  __Pyx_RefNannyFinishContext();
55615  return __pyx_r;
55616 }
55617 
55618 /* "mbd/CouplingFSI.pyx":2408
55619  * cdef class ProtChMesh:
55620  *
55621  * def __cinit__(self, ProtChSystem system): # <<<<<<<<<<<<<<
55622  * self.ChMeshh = chrono_fea.ChMesh()
55623  * cdef SwigPyObject *swig_obj = <SwigPyObject*> self.ChMeshh.this
55624  */
55625 
55626 /* Python wrapper */
55627 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
55628 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
55629  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system = 0;
55630  int __pyx_lineno = 0;
55631  const char *__pyx_filename = NULL;
55632  int __pyx_clineno = 0;
55633  int __pyx_r;
55634  __Pyx_RefNannyDeclarations
55635  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
55636  {
55637  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_system,0};
55638  PyObject* values[1] = {0};
55639  if (unlikely(__pyx_kwds)) {
55640  Py_ssize_t kw_args;
55641  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
55642  switch (pos_args) {
55643  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
55644  CYTHON_FALLTHROUGH;
55645  case 0: break;
55646  default: goto __pyx_L5_argtuple_error;
55647  }
55648  kw_args = PyDict_Size(__pyx_kwds);
55649  switch (pos_args) {
55650  case 0:
55651  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_system)) != 0)) kw_args--;
55652  else goto __pyx_L5_argtuple_error;
55653  }
55654  if (unlikely(kw_args > 0)) {
55655  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2408, __pyx_L3_error)
55656  }
55657  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
55658  goto __pyx_L5_argtuple_error;
55659  } else {
55660  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
55661  }
55662  __pyx_v_system = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)values[0]);
55663  }
55664  goto __pyx_L4_argument_unpacking_done;
55665  __pyx_L5_argtuple_error:;
55666  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2408, __pyx_L3_error)
55667  __pyx_L3_error:;
55668  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55669  __Pyx_RefNannyFinishContext();
55670  return -1;
55671  __pyx_L4_argument_unpacking_done:;
55672  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_system), __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem, 1, "system", 0))) __PYX_ERR(0, 2408, __pyx_L1_error)
55673  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh___cinit__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self), __pyx_v_system);
55674 
55675  /* function exit code */
55676  goto __pyx_L0;
55677  __pyx_L1_error:;
55678  __pyx_r = -1;
55679  __pyx_L0:;
55680  __Pyx_RefNannyFinishContext();
55681  return __pyx_r;
55682 }
55683 
55684 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system) {
55685  SwigPyObject *__pyx_v_swig_obj;
55686  std::shared_ptr<ChMesh> *__pyx_v_pt_to_shp;
55687  int __pyx_r;
55688  __Pyx_TraceDeclarations
55689  __Pyx_RefNannyDeclarations
55690  PyObject *__pyx_t_1 = NULL;
55691  PyObject *__pyx_t_2 = NULL;
55692  PyObject *__pyx_t_3 = NULL;
55693  int __pyx_lineno = 0;
55694  const char *__pyx_filename = NULL;
55695  int __pyx_clineno = 0;
55696  __Pyx_RefNannySetupContext("__cinit__", 0);
55697  __Pyx_TraceCall("__cinit__", __pyx_f[0], 2408, 0, __PYX_ERR(0, 2408, __pyx_L1_error));
55698 
55699  /* "mbd/CouplingFSI.pyx":2409
55700  *
55701  * def __cinit__(self, ProtChSystem system):
55702  * self.ChMeshh = chrono_fea.ChMesh() # <<<<<<<<<<<<<<
55703  * cdef SwigPyObject *swig_obj = <SwigPyObject*> self.ChMeshh.this
55704  * cdef shared_ptr[ch.ChMesh]* pt_to_shp = <shared_ptr[ch.ChMesh]*> swig_obj.ptr;
55705  */
55706  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_chrono_fea); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2409, __pyx_L1_error)
55707  __Pyx_GOTREF(__pyx_t_2);
55708  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChMesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2409, __pyx_L1_error)
55709  __Pyx_GOTREF(__pyx_t_3);
55710  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
55711  __pyx_t_2 = NULL;
55712  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
55713  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
55714  if (likely(__pyx_t_2)) {
55715  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
55716  __Pyx_INCREF(__pyx_t_2);
55717  __Pyx_INCREF(function);
55718  __Pyx_DECREF_SET(__pyx_t_3, function);
55719  }
55720  }
55721  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
55722  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
55723  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2409, __pyx_L1_error)
55724  __Pyx_GOTREF(__pyx_t_1);
55725  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
55726  __Pyx_GIVEREF(__pyx_t_1);
55727  __Pyx_GOTREF(__pyx_v_self->ChMeshh);
55728  __Pyx_DECREF(__pyx_v_self->ChMeshh);
55729  __pyx_v_self->ChMeshh = __pyx_t_1;
55730  __pyx_t_1 = 0;
55731 
55732  /* "mbd/CouplingFSI.pyx":2410
55733  * def __cinit__(self, ProtChSystem system):
55734  * self.ChMeshh = chrono_fea.ChMesh()
55735  * cdef SwigPyObject *swig_obj = <SwigPyObject*> self.ChMeshh.this # <<<<<<<<<<<<<<
55736  * cdef shared_ptr[ch.ChMesh]* pt_to_shp = <shared_ptr[ch.ChMesh]*> swig_obj.ptr;
55737  * self.mesh = pt_to_shp[0]
55738  */
55739  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChMeshh, __pyx_n_s_this); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2410, __pyx_L1_error)
55740  __Pyx_GOTREF(__pyx_t_1);
55741  __pyx_v_swig_obj = ((SwigPyObject *)__pyx_t_1);
55742  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55743 
55744  /* "mbd/CouplingFSI.pyx":2411
55745  * self.ChMeshh = chrono_fea.ChMesh()
55746  * cdef SwigPyObject *swig_obj = <SwigPyObject*> self.ChMeshh.this
55747  * cdef shared_ptr[ch.ChMesh]* pt_to_shp = <shared_ptr[ch.ChMesh]*> swig_obj.ptr; # <<<<<<<<<<<<<<
55748  * self.mesh = pt_to_shp[0]
55749  * system.addProtChMesh(self)
55750  */
55751  __pyx_v_pt_to_shp = ((std::shared_ptr<ChMesh> *)__pyx_v_swig_obj->ptr);
55752 
55753  /* "mbd/CouplingFSI.pyx":2412
55754  * cdef SwigPyObject *swig_obj = <SwigPyObject*> self.ChMeshh.this
55755  * cdef shared_ptr[ch.ChMesh]* pt_to_shp = <shared_ptr[ch.ChMesh]*> swig_obj.ptr;
55756  * self.mesh = pt_to_shp[0] # <<<<<<<<<<<<<<
55757  * system.addProtChMesh(self)
55758  *
55759  */
55760  __pyx_v_self->mesh = (__pyx_v_pt_to_shp[0]);
55761 
55762  /* "mbd/CouplingFSI.pyx":2413
55763  * cdef shared_ptr[ch.ChMesh]* pt_to_shp = <shared_ptr[ch.ChMesh]*> swig_obj.ptr;
55764  * self.mesh = pt_to_shp[0]
55765  * system.addProtChMesh(self) # <<<<<<<<<<<<<<
55766  *
55767  * def getChronoObject(self):
55768  */
55769  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_system), __pyx_n_s_addProtChMesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2413, __pyx_L1_error)
55770  __Pyx_GOTREF(__pyx_t_3);
55771  __pyx_t_2 = NULL;
55772  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
55773  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
55774  if (likely(__pyx_t_2)) {
55775  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
55776  __Pyx_INCREF(__pyx_t_2);
55777  __Pyx_INCREF(function);
55778  __Pyx_DECREF_SET(__pyx_t_3, function);
55779  }
55780  }
55781  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self));
55782  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
55783  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2413, __pyx_L1_error)
55784  __Pyx_GOTREF(__pyx_t_1);
55785  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
55786  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
55787 
55788  /* "mbd/CouplingFSI.pyx":2408
55789  * cdef class ProtChMesh:
55790  *
55791  * def __cinit__(self, ProtChSystem system): # <<<<<<<<<<<<<<
55792  * self.ChMeshh = chrono_fea.ChMesh()
55793  * cdef SwigPyObject *swig_obj = <SwigPyObject*> self.ChMeshh.this
55794  */
55795 
55796  /* function exit code */
55797  __pyx_r = 0;
55798  goto __pyx_L0;
55799  __pyx_L1_error:;
55800  __Pyx_XDECREF(__pyx_t_1);
55801  __Pyx_XDECREF(__pyx_t_2);
55802  __Pyx_XDECREF(__pyx_t_3);
55803  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55804  __pyx_r = -1;
55805  __pyx_L0:;
55806  __Pyx_TraceReturn(Py_None, 0);
55807  __Pyx_RefNannyFinishContext();
55808  return __pyx_r;
55809 }
55810 
55811 /* "mbd/CouplingFSI.pyx":2415
55812  * system.addProtChMesh(self)
55813  *
55814  * def getChronoObject(self): # <<<<<<<<<<<<<<
55815  * return self.ChMeshh
55816  *
55817  */
55818 
55819 /* Python wrapper */
55820 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_3getChronoObject(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
55821 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_2getChronoObject[] = "ProtChMesh.getChronoObject(self)";
55822 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChMesh_3getChronoObject = {"getChronoObject", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_3getChronoObject, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_2getChronoObject};
55823 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_3getChronoObject(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
55824  PyObject *__pyx_r = 0;
55825  __Pyx_RefNannyDeclarations
55826  __Pyx_RefNannySetupContext("getChronoObject (wrapper)", 0);
55827  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_2getChronoObject(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self));
55828 
55829  /* function exit code */
55830  __Pyx_RefNannyFinishContext();
55831  return __pyx_r;
55832 }
55833 
55834 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_2getChronoObject(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self) {
55835  PyObject *__pyx_r = NULL;
55836  __Pyx_TraceDeclarations
55837  __Pyx_RefNannyDeclarations
55838  int __pyx_lineno = 0;
55839  const char *__pyx_filename = NULL;
55840  int __pyx_clineno = 0;
55841  __Pyx_TraceFrameInit(__pyx_codeobj__142)
55842  __Pyx_RefNannySetupContext("getChronoObject", 0);
55843  __Pyx_TraceCall("getChronoObject", __pyx_f[0], 2415, 0, __PYX_ERR(0, 2415, __pyx_L1_error));
55844 
55845  /* "mbd/CouplingFSI.pyx":2416
55846  *
55847  * def getChronoObject(self):
55848  * return self.ChMeshh # <<<<<<<<<<<<<<
55849  *
55850  *
55851  */
55852  __Pyx_XDECREF(__pyx_r);
55853  __Pyx_INCREF(__pyx_v_self->ChMeshh);
55854  __pyx_r = __pyx_v_self->ChMeshh;
55855  goto __pyx_L0;
55856 
55857  /* "mbd/CouplingFSI.pyx":2415
55858  * system.addProtChMesh(self)
55859  *
55860  * def getChronoObject(self): # <<<<<<<<<<<<<<
55861  * return self.ChMeshh
55862  *
55863  */
55864 
55865  /* function exit code */
55866  __pyx_L1_error:;
55867  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.getChronoObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
55868  __pyx_r = NULL;
55869  __pyx_L0:;
55870  __Pyx_XGIVEREF(__pyx_r);
55871  __Pyx_TraceReturn(__pyx_r, 0);
55872  __Pyx_RefNannyFinishContext();
55873  return __pyx_r;
55874 }
55875 
55876 /* "mbd/CouplingFSI.pxd":308
55877  * cdef shared_ptr[ch.ChMesh] mesh
55878  * cdef public:
55879  * object ChMeshh # <<<<<<<<<<<<<<
55880  * ProtChSystem ProtChSystem
55881  *
55882  */
55883 
55884 /* Python wrapper */
55885 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_1__get__(PyObject *__pyx_v_self); /*proto*/
55886 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_1__get__(PyObject *__pyx_v_self) {
55887  PyObject *__pyx_r = 0;
55888  __Pyx_RefNannyDeclarations
55889  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
55890  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self));
55891 
55892  /* function exit code */
55893  __Pyx_RefNannyFinishContext();
55894  return __pyx_r;
55895 }
55896 
55897 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self) {
55898  PyObject *__pyx_r = NULL;
55899  __Pyx_TraceDeclarations
55900  __Pyx_RefNannyDeclarations
55901  int __pyx_lineno = 0;
55902  const char *__pyx_filename = NULL;
55903  int __pyx_clineno = 0;
55904  __Pyx_RefNannySetupContext("__get__", 0);
55905  __Pyx_TraceCall("__get__", __pyx_f[2], 308, 0, __PYX_ERR(2, 308, __pyx_L1_error));
55906  __Pyx_XDECREF(__pyx_r);
55907  __Pyx_INCREF(__pyx_v_self->ChMeshh);
55908  __pyx_r = __pyx_v_self->ChMeshh;
55909  goto __pyx_L0;
55910 
55911  /* function exit code */
55912  __pyx_L1_error:;
55913  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.ChMeshh.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55914  __pyx_r = NULL;
55915  __pyx_L0:;
55916  __Pyx_XGIVEREF(__pyx_r);
55917  __Pyx_TraceReturn(__pyx_r, 0);
55918  __Pyx_RefNannyFinishContext();
55919  return __pyx_r;
55920 }
55921 
55922 /* Python wrapper */
55923 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
55924 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
55925  int __pyx_r;
55926  __Pyx_RefNannyDeclarations
55927  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
55928  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
55929 
55930  /* function exit code */
55931  __Pyx_RefNannyFinishContext();
55932  return __pyx_r;
55933 }
55934 
55935 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, PyObject *__pyx_v_value) {
55936  int __pyx_r;
55937  __Pyx_TraceDeclarations
55938  __Pyx_RefNannyDeclarations
55939  int __pyx_lineno = 0;
55940  const char *__pyx_filename = NULL;
55941  int __pyx_clineno = 0;
55942  __Pyx_RefNannySetupContext("__set__", 0);
55943  __Pyx_TraceCall("__set__", __pyx_f[2], 308, 0, __PYX_ERR(2, 308, __pyx_L1_error));
55944  __Pyx_INCREF(__pyx_v_value);
55945  __Pyx_GIVEREF(__pyx_v_value);
55946  __Pyx_GOTREF(__pyx_v_self->ChMeshh);
55947  __Pyx_DECREF(__pyx_v_self->ChMeshh);
55948  __pyx_v_self->ChMeshh = __pyx_v_value;
55949 
55950  /* function exit code */
55951  __pyx_r = 0;
55952  goto __pyx_L0;
55953  __pyx_L1_error:;
55954  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.ChMeshh.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55955  __pyx_r = -1;
55956  __pyx_L0:;
55957  __Pyx_TraceReturn(Py_None, 0);
55958  __Pyx_RefNannyFinishContext();
55959  return __pyx_r;
55960 }
55961 
55962 /* Python wrapper */
55963 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_5__del__(PyObject *__pyx_v_self); /*proto*/
55964 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_5__del__(PyObject *__pyx_v_self) {
55965  int __pyx_r;
55966  __Pyx_RefNannyDeclarations
55967  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
55968  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self));
55969 
55970  /* function exit code */
55971  __Pyx_RefNannyFinishContext();
55972  return __pyx_r;
55973 }
55974 
55975 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self) {
55976  int __pyx_r;
55977  __Pyx_TraceDeclarations
55978  __Pyx_RefNannyDeclarations
55979  int __pyx_lineno = 0;
55980  const char *__pyx_filename = NULL;
55981  int __pyx_clineno = 0;
55982  __Pyx_RefNannySetupContext("__del__", 0);
55983  __Pyx_TraceCall("__del__", __pyx_f[2], 308, 0, __PYX_ERR(2, 308, __pyx_L1_error));
55984  __Pyx_INCREF(Py_None);
55985  __Pyx_GIVEREF(Py_None);
55986  __Pyx_GOTREF(__pyx_v_self->ChMeshh);
55987  __Pyx_DECREF(__pyx_v_self->ChMeshh);
55988  __pyx_v_self->ChMeshh = Py_None;
55989 
55990  /* function exit code */
55991  __pyx_r = 0;
55992  goto __pyx_L0;
55993  __pyx_L1_error:;
55994  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.ChMeshh.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
55995  __pyx_r = -1;
55996  __pyx_L0:;
55997  __Pyx_TraceReturn(Py_None, 0);
55998  __Pyx_RefNannyFinishContext();
55999  return __pyx_r;
56000 }
56001 
56002 /* "mbd/CouplingFSI.pxd":309
56003  * cdef public:
56004  * object ChMeshh
56005  * ProtChSystem ProtChSystem # <<<<<<<<<<<<<<
56006  *
56007  *
56008  */
56009 
56010 /* Python wrapper */
56011 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_1__get__(PyObject *__pyx_v_self); /*proto*/
56012 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_1__get__(PyObject *__pyx_v_self) {
56013  PyObject *__pyx_r = 0;
56014  __Pyx_RefNannyDeclarations
56015  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
56016  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self));
56017 
56018  /* function exit code */
56019  __Pyx_RefNannyFinishContext();
56020  return __pyx_r;
56021 }
56022 
56023 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self) {
56024  PyObject *__pyx_r = NULL;
56025  __Pyx_TraceDeclarations
56026  __Pyx_RefNannyDeclarations
56027  int __pyx_lineno = 0;
56028  const char *__pyx_filename = NULL;
56029  int __pyx_clineno = 0;
56030  __Pyx_RefNannySetupContext("__get__", 0);
56031  __Pyx_TraceCall("__get__", __pyx_f[2], 309, 0, __PYX_ERR(2, 309, __pyx_L1_error));
56032  __Pyx_XDECREF(__pyx_r);
56033  __Pyx_INCREF(((PyObject *)__pyx_v_self->ProtChSystem));
56034  __pyx_r = ((PyObject *)__pyx_v_self->ProtChSystem);
56035  goto __pyx_L0;
56036 
56037  /* function exit code */
56038  __pyx_L1_error:;
56039  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.ProtChSystem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56040  __pyx_r = NULL;
56041  __pyx_L0:;
56042  __Pyx_XGIVEREF(__pyx_r);
56043  __Pyx_TraceReturn(__pyx_r, 0);
56044  __Pyx_RefNannyFinishContext();
56045  return __pyx_r;
56046 }
56047 
56048 /* Python wrapper */
56049 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
56050 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
56051  int __pyx_r;
56052  __Pyx_RefNannyDeclarations
56053  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
56054  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
56055 
56056  /* function exit code */
56057  __Pyx_RefNannyFinishContext();
56058  return __pyx_r;
56059 }
56060 
56061 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, PyObject *__pyx_v_value) {
56062  int __pyx_r;
56063  __Pyx_TraceDeclarations
56064  __Pyx_RefNannyDeclarations
56065  PyObject *__pyx_t_1 = NULL;
56066  int __pyx_lineno = 0;
56067  const char *__pyx_filename = NULL;
56068  int __pyx_clineno = 0;
56069  __Pyx_RefNannySetupContext("__set__", 0);
56070  __Pyx_TraceCall("__set__", __pyx_f[2], 309, 0, __PYX_ERR(2, 309, __pyx_L1_error));
56071  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem))))) __PYX_ERR(2, 309, __pyx_L1_error)
56072  __pyx_t_1 = __pyx_v_value;
56073  __Pyx_INCREF(__pyx_t_1);
56074  __Pyx_GIVEREF(__pyx_t_1);
56075  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
56076  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
56077  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_t_1);
56078  __pyx_t_1 = 0;
56079 
56080  /* function exit code */
56081  __pyx_r = 0;
56082  goto __pyx_L0;
56083  __pyx_L1_error:;
56084  __Pyx_XDECREF(__pyx_t_1);
56085  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.ProtChSystem.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56086  __pyx_r = -1;
56087  __pyx_L0:;
56088  __Pyx_TraceReturn(Py_None, 0);
56089  __Pyx_RefNannyFinishContext();
56090  return __pyx_r;
56091 }
56092 
56093 /* Python wrapper */
56094 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_5__del__(PyObject *__pyx_v_self); /*proto*/
56095 static int __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_5__del__(PyObject *__pyx_v_self) {
56096  int __pyx_r;
56097  __Pyx_RefNannyDeclarations
56098  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
56099  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self));
56100 
56101  /* function exit code */
56102  __Pyx_RefNannyFinishContext();
56103  return __pyx_r;
56104 }
56105 
56106 static int __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self) {
56107  int __pyx_r;
56108  __Pyx_TraceDeclarations
56109  __Pyx_RefNannyDeclarations
56110  int __pyx_lineno = 0;
56111  const char *__pyx_filename = NULL;
56112  int __pyx_clineno = 0;
56113  __Pyx_RefNannySetupContext("__del__", 0);
56114  __Pyx_TraceCall("__del__", __pyx_f[2], 309, 0, __PYX_ERR(2, 309, __pyx_L1_error));
56115  __Pyx_INCREF(Py_None);
56116  __Pyx_GIVEREF(Py_None);
56117  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
56118  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
56119  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None);
56120 
56121  /* function exit code */
56122  __pyx_r = 0;
56123  goto __pyx_L0;
56124  __pyx_L1_error:;
56125  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.ProtChSystem.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56126  __pyx_r = -1;
56127  __pyx_L0:;
56128  __Pyx_TraceReturn(Py_None, 0);
56129  __Pyx_RefNannyFinishContext();
56130  return __pyx_r;
56131 }
56132 
56133 /* "(tree fragment)":1
56134  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
56135  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56136  * def __setstate_cython__(self, __pyx_state):
56137  */
56138 
56139 /* Python wrapper */
56140 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
56141 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_4__reduce_cython__[] = "ProtChMesh.__reduce_cython__(self)";
56142 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChMesh_5__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_5__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_4__reduce_cython__};
56143 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
56144  PyObject *__pyx_r = 0;
56145  __Pyx_RefNannyDeclarations
56146  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
56147  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_4__reduce_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self));
56148 
56149  /* function exit code */
56150  __Pyx_RefNannyFinishContext();
56151  return __pyx_r;
56152 }
56153 
56154 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self) {
56155  PyObject *__pyx_r = NULL;
56156  __Pyx_TraceDeclarations
56157  __Pyx_RefNannyDeclarations
56158  PyObject *__pyx_t_1 = NULL;
56159  int __pyx_lineno = 0;
56160  const char *__pyx_filename = NULL;
56161  int __pyx_clineno = 0;
56162  __Pyx_TraceFrameInit(__pyx_codeobj__143)
56163  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
56164  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
56165 
56166  /* "(tree fragment)":2
56167  * def __reduce_cython__(self):
56168  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
56169  * def __setstate_cython__(self, __pyx_state):
56170  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56171  */
56172  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__144, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
56173  __Pyx_GOTREF(__pyx_t_1);
56174  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
56175  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56176  __PYX_ERR(1, 2, __pyx_L1_error)
56177 
56178  /* "(tree fragment)":1
56179  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
56180  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56181  * def __setstate_cython__(self, __pyx_state):
56182  */
56183 
56184  /* function exit code */
56185  __pyx_L1_error:;
56186  __Pyx_XDECREF(__pyx_t_1);
56187  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56188  __pyx_r = NULL;
56189  __Pyx_XGIVEREF(__pyx_r);
56190  __Pyx_TraceReturn(__pyx_r, 0);
56191  __Pyx_RefNannyFinishContext();
56192  return __pyx_r;
56193 }
56194 
56195 /* "(tree fragment)":3
56196  * def __reduce_cython__(self):
56197  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56198  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
56199  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56200  */
56201 
56202 /* Python wrapper */
56203 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
56204 static char __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_6__setstate_cython__[] = "ProtChMesh.__setstate_cython__(self, __pyx_state)";
56205 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_10ProtChMesh_7__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_6__setstate_cython__};
56206 static PyObject *__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
56207  PyObject *__pyx_r = 0;
56208  __Pyx_RefNannyDeclarations
56209  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
56210  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_6__setstate_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
56211 
56212  /* function exit code */
56213  __Pyx_RefNannyFinishContext();
56214  return __pyx_r;
56215 }
56216 
56217 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10ProtChMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
56218  PyObject *__pyx_r = NULL;
56219  __Pyx_TraceDeclarations
56220  __Pyx_RefNannyDeclarations
56221  PyObject *__pyx_t_1 = NULL;
56222  int __pyx_lineno = 0;
56223  const char *__pyx_filename = NULL;
56224  int __pyx_clineno = 0;
56225  __Pyx_TraceFrameInit(__pyx_codeobj__145)
56226  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
56227  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
56228 
56229  /* "(tree fragment)":4
56230  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56231  * def __setstate_cython__(self, __pyx_state):
56232  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
56233  */
56234  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__146, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
56235  __Pyx_GOTREF(__pyx_t_1);
56236  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
56237  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56238  __PYX_ERR(1, 4, __pyx_L1_error)
56239 
56240  /* "(tree fragment)":3
56241  * def __reduce_cython__(self):
56242  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56243  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
56244  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
56245  */
56246 
56247  /* function exit code */
56248  __pyx_L1_error:;
56249  __Pyx_XDECREF(__pyx_t_1);
56250  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMesh.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56251  __pyx_r = NULL;
56252  __Pyx_XGIVEREF(__pyx_r);
56253  __Pyx_TraceReturn(__pyx_r, 0);
56254  __Pyx_RefNannyFinishContext();
56255  return __pyx_r;
56256 }
56257 
56258 /* "mbd/CouplingFSI.pyx":2465
56259  * """
56260  *
56261  * def __cinit__(self, # <<<<<<<<<<<<<<
56262  * ProtChSystem system,
56263  * ProtChMesh mesh,
56264  */
56265 
56266 /* Python wrapper */
56267 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
56268 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
56269  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system = 0;
56270  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_mesh = 0;
56271  __Pyx_memviewslice __pyx_v_length = { 0, 0, { 0 }, { 0 }, { 0 } };
56272  PyArrayObject *__pyx_v_nb_elems = 0;
56273  __Pyx_memviewslice __pyx_v_d = { 0, 0, { 0 }, { 0 }, { 0 } };
56274  __Pyx_memviewslice __pyx_v_rho = { 0, 0, { 0 }, { 0 }, { 0 } };
56275  __Pyx_memviewslice __pyx_v_E = { 0, 0, { 0 }, { 0 }, { 0 } };
56276  std::string __pyx_v_beam_type;
56277  int __pyx_lineno = 0;
56278  const char *__pyx_filename = NULL;
56279  int __pyx_clineno = 0;
56280  int __pyx_r;
56281  __Pyx_RefNannyDeclarations
56282  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
56283  {
56284  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_system,&__pyx_n_s_mesh,&__pyx_n_s_length,&__pyx_n_s_nb_elems,&__pyx_n_s_d,&__pyx_n_s_rho,&__pyx_n_s_E,&__pyx_n_s_beam_type,0};
56285  PyObject* values[8] = {0,0,0,0,0,0,0,0};
56286  if (unlikely(__pyx_kwds)) {
56287  Py_ssize_t kw_args;
56288  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
56289  switch (pos_args) {
56290  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
56291  CYTHON_FALLTHROUGH;
56292  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
56293  CYTHON_FALLTHROUGH;
56294  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
56295  CYTHON_FALLTHROUGH;
56296  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
56297  CYTHON_FALLTHROUGH;
56298  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
56299  CYTHON_FALLTHROUGH;
56300  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
56301  CYTHON_FALLTHROUGH;
56302  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
56303  CYTHON_FALLTHROUGH;
56304  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
56305  CYTHON_FALLTHROUGH;
56306  case 0: break;
56307  default: goto __pyx_L5_argtuple_error;
56308  }
56309  kw_args = PyDict_Size(__pyx_kwds);
56310  switch (pos_args) {
56311  case 0:
56312  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_system)) != 0)) kw_args--;
56313  else goto __pyx_L5_argtuple_error;
56314  CYTHON_FALLTHROUGH;
56315  case 1:
56316  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
56317  else {
56318  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 1); __PYX_ERR(0, 2465, __pyx_L3_error)
56319  }
56320  CYTHON_FALLTHROUGH;
56321  case 2:
56322  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length)) != 0)) kw_args--;
56323  else {
56324  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 2); __PYX_ERR(0, 2465, __pyx_L3_error)
56325  }
56326  CYTHON_FALLTHROUGH;
56327  case 3:
56328  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nb_elems)) != 0)) kw_args--;
56329  else {
56330  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 3); __PYX_ERR(0, 2465, __pyx_L3_error)
56331  }
56332  CYTHON_FALLTHROUGH;
56333  case 4:
56334  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
56335  else {
56336  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 4); __PYX_ERR(0, 2465, __pyx_L3_error)
56337  }
56338  CYTHON_FALLTHROUGH;
56339  case 5:
56340  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rho)) != 0)) kw_args--;
56341  else {
56342  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 5); __PYX_ERR(0, 2465, __pyx_L3_error)
56343  }
56344  CYTHON_FALLTHROUGH;
56345  case 6:
56346  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_E)) != 0)) kw_args--;
56347  else {
56348  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, 6); __PYX_ERR(0, 2465, __pyx_L3_error)
56349  }
56350  CYTHON_FALLTHROUGH;
56351  case 7:
56352  if (kw_args > 0) {
56353  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_beam_type);
56354  if (value) { values[7] = value; kw_args--; }
56355  }
56356  }
56357  if (unlikely(kw_args > 0)) {
56358  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2465, __pyx_L3_error)
56359  }
56360  } else {
56361  switch (PyTuple_GET_SIZE(__pyx_args)) {
56362  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
56363  CYTHON_FALLTHROUGH;
56364  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
56365  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
56366  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
56367  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
56368  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
56369  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
56370  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
56371  break;
56372  default: goto __pyx_L5_argtuple_error;
56373  }
56374  }
56375  __pyx_v_system = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)values[0]);
56376  __pyx_v_mesh = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)values[1]);
56377  __pyx_v_length = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_length.memview)) __PYX_ERR(0, 2468, __pyx_L3_error)
56378  __pyx_v_nb_elems = ((PyArrayObject *)values[3]);
56379  __pyx_v_d = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[4], PyBUF_WRITABLE); if (unlikely(!__pyx_v_d.memview)) __PYX_ERR(0, 2470, __pyx_L3_error)
56380  __pyx_v_rho = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[5], PyBUF_WRITABLE); if (unlikely(!__pyx_v_rho.memview)) __PYX_ERR(0, 2471, __pyx_L3_error)
56381  __pyx_v_E = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[6], PyBUF_WRITABLE); if (unlikely(!__pyx_v_E.memview)) __PYX_ERR(0, 2472, __pyx_L3_error)
56382  if (values[7]) {
56383  __pyx_v_beam_type = __pyx_convert_string_from_py_std__in_string(values[7]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2473, __pyx_L3_error)
56384  } else {
56385  __pyx_v_beam_type = __pyx_k__147;
56386  }
56387  }
56388  goto __pyx_L4_argument_unpacking_done;
56389  __pyx_L5_argtuple_error:;
56390  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 7, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2465, __pyx_L3_error)
56391  __pyx_L3_error:;
56392  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
56393  __Pyx_RefNannyFinishContext();
56394  return -1;
56395  __pyx_L4_argument_unpacking_done:;
56396  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_system), __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem, 1, "system", 0))) __PYX_ERR(0, 2466, __pyx_L1_error)
56397  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh), __pyx_ptype_3mbd_11CouplingFSI_ProtChMesh, 1, "mesh", 0))) __PYX_ERR(0, 2467, __pyx_L1_error)
56398  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_nb_elems), __pyx_ptype_5numpy_ndarray, 1, "nb_elems", 0))) __PYX_ERR(0, 2469, __pyx_L1_error)
56399  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings___cinit__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_system, __pyx_v_mesh, __pyx_v_length, __pyx_v_nb_elems, __pyx_v_d, __pyx_v_rho, __pyx_v_E, __pyx_v_beam_type);
56400 
56401  /* function exit code */
56402  goto __pyx_L0;
56403  __pyx_L1_error:;
56404  __pyx_r = -1;
56405  __pyx_L0:;
56406  __Pyx_RefNannyFinishContext();
56407  return __pyx_r;
56408 }
56409 static PyObject *__pyx_gb_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
56410 
56411 /* "mbd/CouplingFSI.pyx":2475
56412  * string beam_type="CableANCF"):
56413  * check_arrays = [len(length), len(nb_elems), len(d), len(rho), len(E)]
56414  * assert all(v == len(length) for v in check_arrays), 'arrays are not of same length' # <<<<<<<<<<<<<<
56415  * self.ProtChSystem = system
56416  * self.ProtChSystem.addSubcomponent(self)
56417  */
56418 
56419 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___genexpr(PyObject *__pyx_self) {
56420  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
56421  PyObject *__pyx_r = NULL;
56422  __Pyx_RefNannyDeclarations
56423  int __pyx_lineno = 0;
56424  const char *__pyx_filename = NULL;
56425  int __pyx_clineno = 0;
56426  __Pyx_RefNannySetupContext("genexpr", 0);
56427  __pyx_cur_scope = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *)__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr(__pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
56428  if (unlikely(!__pyx_cur_scope)) {
56429  __pyx_cur_scope = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *)Py_None);
56430  __Pyx_INCREF(Py_None);
56431  __PYX_ERR(0, 2475, __pyx_L1_error)
56432  } else {
56433  __Pyx_GOTREF(__pyx_cur_scope);
56434  }
56435  __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *) __pyx_self;
56436  __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
56437  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
56438  {
56439  __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___2generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_cinit___locals_genexpr, __pyx_n_s_mbd_CouplingFSI); if (unlikely(!gen)) __PYX_ERR(0, 2475, __pyx_L1_error)
56440  __Pyx_DECREF(__pyx_cur_scope);
56441  __Pyx_RefNannyFinishContext();
56442  return (PyObject *) gen;
56443  }
56444 
56445  /* function exit code */
56446  __pyx_L1_error:;
56447  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.__cinit__.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
56448  __pyx_r = NULL;
56449  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
56450  __Pyx_XGIVEREF(__pyx_r);
56451  __Pyx_RefNannyFinishContext();
56452  return __pyx_r;
56453 }
56454 
56455 static PyObject *__pyx_gb_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
56456 {
56457  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
56458  PyObject *__pyx_r = NULL;
56459  __Pyx_TraceDeclarations
56460  PyObject *__pyx_t_1 = NULL;
56461  Py_ssize_t __pyx_t_2;
56462  PyObject *__pyx_t_3 = NULL;
56463  size_t __pyx_t_4;
56464  PyObject *__pyx_t_5 = NULL;
56465  int __pyx_t_6;
56466  int __pyx_t_7;
56467  int __pyx_lineno = 0;
56468  const char *__pyx_filename = NULL;
56469  int __pyx_clineno = 0;
56470  __Pyx_RefNannyDeclarations
56471  __Pyx_RefNannySetupContext("genexpr", 0);
56472  __Pyx_TraceCall("genexpr", __pyx_f[0], 2475, 0, __PYX_ERR(0, 2475, __pyx_L1_error));
56473  switch (__pyx_generator->resume_label) {
56474  case 0: goto __pyx_L3_first_run;
56475  default: /* CPython raises the right error here */
56476  __Pyx_TraceReturn(Py_None, 0);
56477  __Pyx_RefNannyFinishContext();
56478  return NULL;
56479  }
56480  __pyx_L3_first_run:;
56481  if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2475, __pyx_L1_error)
56482  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_check_arrays)) { __Pyx_RaiseClosureNameError("check_arrays"); __PYX_ERR(0, 2475, __pyx_L1_error) }
56483  if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_check_arrays == Py_None)) {
56484  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
56485  __PYX_ERR(0, 2475, __pyx_L1_error)
56486  }
56487  __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_check_arrays; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
56488  for (;;) {
56489  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
56490  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
56491  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2475, __pyx_L1_error)
56492  #else
56493  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __pyx_L1_error)
56494  __Pyx_GOTREF(__pyx_t_3);
56495  #endif
56496  __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
56497  __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_3);
56498  __Pyx_GIVEREF(__pyx_t_3);
56499  __pyx_t_3 = 0;
56500  if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_length.memview)) { __Pyx_RaiseClosureNameError("length"); __PYX_ERR(0, 2475, __pyx_L1_error) }
56501  __pyx_t_4 = __Pyx_MemoryView_Len(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_length);
56502  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __pyx_L1_error)
56503  __Pyx_GOTREF(__pyx_t_3);
56504  __pyx_t_5 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_v, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2475, __pyx_L1_error)
56505  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
56506  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2475, __pyx_L1_error)
56507  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
56508  __pyx_t_7 = ((!__pyx_t_6) != 0);
56509  if (__pyx_t_7) {
56510  __Pyx_XDECREF(__pyx_r);
56511  __Pyx_INCREF(Py_False);
56512  __pyx_r = Py_False;
56513  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56514  goto __pyx_L0;
56515  }
56516  }
56517  /*else*/ {
56518  __Pyx_XDECREF(__pyx_r);
56519  __Pyx_INCREF(Py_True);
56520  __pyx_r = Py_True;
56521  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56522  goto __pyx_L0;
56523  }
56524  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
56525  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
56526 
56527  /* function exit code */
56528  goto __pyx_L0;
56529  __pyx_L1_error:;
56530  __Pyx_XDECREF(__pyx_t_1);
56531  __Pyx_XDECREF(__pyx_t_3);
56532  __Pyx_XDECREF(__pyx_t_5);
56533  __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
56534  __pyx_L0:;
56535  __Pyx_XGIVEREF(__pyx_r);
56536  #if !CYTHON_USE_EXC_INFO_STACK
56537  __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
56538  #endif
56539  __pyx_generator->resume_label = -1;
56540  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
56541  __Pyx_TraceReturn(__pyx_r, 0);
56542  __Pyx_RefNannyFinishContext();
56543  return __pyx_r;
56544 }
56545 
56546 /* "mbd/CouplingFSI.pyx":2502
56547  * beam_type
56548  * )
56549  * self.nodes_function = lambda s: (s, s, s) # <<<<<<<<<<<<<<
56550  * self.nodes_built = False
56551  * name=b'mooring'
56552  */
56553 
56554 /* Python wrapper */
56555 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___3lambda2(PyObject *__pyx_self, PyObject *__pyx_v_s); /*proto*/
56556 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___3lambda2 = {"lambda2", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___3lambda2, METH_O, 0};
56557 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___3lambda2(PyObject *__pyx_self, PyObject *__pyx_v_s) {
56558  PyObject *__pyx_r = 0;
56559  __Pyx_RefNannyDeclarations
56560  __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0);
56561  __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_s));
56562 
56563  /* function exit code */
56564  __Pyx_RefNannyFinishContext();
56565  return __pyx_r;
56566 }
56567 
56568 static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_s) {
56569  PyObject *__pyx_r = NULL;
56570  __Pyx_TraceDeclarations
56571  __Pyx_RefNannyDeclarations
56572  PyObject *__pyx_t_1 = NULL;
56573  int __pyx_lineno = 0;
56574  const char *__pyx_filename = NULL;
56575  int __pyx_clineno = 0;
56576  __Pyx_RefNannySetupContext("lambda2", 0);
56577  __Pyx_TraceCall("lambda2", __pyx_f[0], 2502, 0, __PYX_ERR(0, 2502, __pyx_L1_error));
56578  __Pyx_XDECREF(__pyx_r);
56579  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2502, __pyx_L1_error)
56580  __Pyx_GOTREF(__pyx_t_1);
56581  __Pyx_INCREF(__pyx_v_s);
56582  __Pyx_GIVEREF(__pyx_v_s);
56583  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_s);
56584  __Pyx_INCREF(__pyx_v_s);
56585  __Pyx_GIVEREF(__pyx_v_s);
56586  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_s);
56587  __Pyx_INCREF(__pyx_v_s);
56588  __Pyx_GIVEREF(__pyx_v_s);
56589  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_s);
56590  __pyx_r = __pyx_t_1;
56591  __pyx_t_1 = 0;
56592  goto __pyx_L0;
56593 
56594  /* function exit code */
56595  __pyx_L1_error:;
56596  __Pyx_XDECREF(__pyx_t_1);
56597  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.__cinit__.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename);
56598  __pyx_r = NULL;
56599  __pyx_L0:;
56600  __Pyx_XGIVEREF(__pyx_r);
56601  __Pyx_TraceReturn(__pyx_r, 0);
56602  __Pyx_RefNannyFinishContext();
56603  return __pyx_r;
56604 }
56605 
56606 /* "mbd/CouplingFSI.pyx":2465
56607  * """
56608  *
56609  * def __cinit__(self, # <<<<<<<<<<<<<<
56610  * ProtChSystem system,
56611  * ProtChMesh mesh,
56612  */
56613 
56614 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *__pyx_v_system, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *__pyx_v_mesh, __Pyx_memviewslice __pyx_v_length, PyArrayObject *__pyx_v_nb_elems, __Pyx_memviewslice __pyx_v_d, __Pyx_memviewslice __pyx_v_rho, __Pyx_memviewslice __pyx_v_E, std::string __pyx_v_beam_type) {
56615  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *__pyx_cur_scope;
56616  std::vector<double> __pyx_v_vec_length;
56617  std::vector<int> __pyx_v_vec_nb_elems;
56618  std::vector<double> __pyx_v_vec_d;
56619  std::vector<double> __pyx_v_vec_rho;
56620  std::vector<double> __pyx_v_vec_E;
56621  Py_ssize_t __pyx_v_i;
56622  PyObject *__pyx_v_name = NULL;
56623  PyObject *__pyx_v_eta = NULL;
56624  PyObject *__pyx_gb_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___2generator = 0;
56625  int __pyx_r;
56626  __Pyx_TraceDeclarations
56627  __Pyx_RefNannyDeclarations
56628  size_t __pyx_t_1;
56629  PyObject *__pyx_t_2 = NULL;
56630  Py_ssize_t __pyx_t_3;
56631  PyObject *__pyx_t_4 = NULL;
56632  PyObject *__pyx_t_5 = NULL;
56633  PyObject *__pyx_t_6 = NULL;
56634  PyObject *__pyx_t_7 = NULL;
56635  PyObject *__pyx_t_8 = NULL;
56636  int __pyx_t_9;
56637  int __pyx_t_10;
56638  Py_ssize_t __pyx_t_11;
56639  Py_ssize_t __pyx_t_12;
56640  __Pyx_memviewslice __pyx_t_13 = { 0, 0, { 0 }, { 0 }, { 0 } };
56641  PyObject *(*__pyx_t_14)(PyObject *);
56642  int __pyx_lineno = 0;
56643  const char *__pyx_filename = NULL;
56644  int __pyx_clineno = 0;
56645  __Pyx_RefNannySetupContext("__cinit__", 0);
56646  __pyx_cur_scope = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *)__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__(__pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__, __pyx_empty_tuple, NULL);
56647  if (unlikely(!__pyx_cur_scope)) {
56648  __pyx_cur_scope = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *)Py_None);
56649  __Pyx_INCREF(Py_None);
56650  __PYX_ERR(0, 2465, __pyx_L1_error)
56651  } else {
56652  __Pyx_GOTREF(__pyx_cur_scope);
56653  }
56654  __Pyx_TraceCall("__cinit__", __pyx_f[0], 2465, 0, __PYX_ERR(0, 2465, __pyx_L1_error));
56655  __pyx_cur_scope->__pyx_v_length = __pyx_v_length;
56656 
56657  /* "mbd/CouplingFSI.pyx":2474
56658  * double[:] E,
56659  * string beam_type="CableANCF"):
56660  * check_arrays = [len(length), len(nb_elems), len(d), len(rho), len(E)] # <<<<<<<<<<<<<<
56661  * assert all(v == len(length) for v in check_arrays), 'arrays are not of same length'
56662  * self.ProtChSystem = system
56663  */
56664  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_cur_scope->__pyx_v_length);
56665  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2474, __pyx_L1_error)
56666  __Pyx_GOTREF(__pyx_t_2);
56667  __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_nb_elems)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2474, __pyx_L1_error)
56668  __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2474, __pyx_L1_error)
56669  __Pyx_GOTREF(__pyx_t_4);
56670  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_d);
56671  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2474, __pyx_L1_error)
56672  __Pyx_GOTREF(__pyx_t_5);
56673  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_rho);
56674  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2474, __pyx_L1_error)
56675  __Pyx_GOTREF(__pyx_t_6);
56676  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_E);
56677  __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2474, __pyx_L1_error)
56678  __Pyx_GOTREF(__pyx_t_7);
56679  __pyx_t_8 = PyList_New(5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2474, __pyx_L1_error)
56680  __Pyx_GOTREF(__pyx_t_8);
56681  __Pyx_GIVEREF(__pyx_t_2);
56682  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
56683  __Pyx_GIVEREF(__pyx_t_4);
56684  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_4);
56685  __Pyx_GIVEREF(__pyx_t_5);
56686  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_5);
56687  __Pyx_GIVEREF(__pyx_t_6);
56688  PyList_SET_ITEM(__pyx_t_8, 3, __pyx_t_6);
56689  __Pyx_GIVEREF(__pyx_t_7);
56690  PyList_SET_ITEM(__pyx_t_8, 4, __pyx_t_7);
56691  __pyx_t_2 = 0;
56692  __pyx_t_4 = 0;
56693  __pyx_t_5 = 0;
56694  __pyx_t_6 = 0;
56695  __pyx_t_7 = 0;
56696  __Pyx_GIVEREF(__pyx_t_8);
56697  __pyx_cur_scope->__pyx_v_check_arrays = ((PyObject*)__pyx_t_8);
56698  __pyx_t_8 = 0;
56699 
56700  /* "mbd/CouplingFSI.pyx":2475
56701  * string beam_type="CableANCF"):
56702  * check_arrays = [len(length), len(nb_elems), len(d), len(rho), len(E)]
56703  * assert all(v == len(length) for v in check_arrays), 'arrays are not of same length' # <<<<<<<<<<<<<<
56704  * self.ProtChSystem = system
56705  * self.ProtChSystem.addSubcomponent(self)
56706  */
56707  #ifndef CYTHON_WITHOUT_ASSERTIONS
56708  if (unlikely(!Py_OptimizeFlag)) {
56709  __pyx_t_8 = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2475, __pyx_L1_error)
56710  __Pyx_GOTREF(__pyx_t_8);
56711  __pyx_t_7 = __Pyx_Generator_Next(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2475, __pyx_L1_error)
56712  __Pyx_GOTREF(__pyx_t_7);
56713  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56714  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2475, __pyx_L1_error)
56715  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
56716  if (unlikely(!__pyx_t_9)) {
56717  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_arrays_are_not_of_same_length);
56718  __PYX_ERR(0, 2475, __pyx_L1_error)
56719  }
56720  }
56721  #endif
56722 
56723  /* "mbd/CouplingFSI.pyx":2476
56724  * check_arrays = [len(length), len(nb_elems), len(d), len(rho), len(E)]
56725  * assert all(v == len(length) for v in check_arrays), 'arrays are not of same length'
56726  * self.ProtChSystem = system # <<<<<<<<<<<<<<
56727  * self.ProtChSystem.addSubcomponent(self)
56728  * self.nd = self.ProtChSystem.nd
56729  */
56730  __Pyx_INCREF(((PyObject *)__pyx_v_system));
56731  __Pyx_GIVEREF(((PyObject *)__pyx_v_system));
56732  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
56733  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
56734  __pyx_v_self->ProtChSystem = __pyx_v_system;
56735 
56736  /* "mbd/CouplingFSI.pyx":2477
56737  * assert all(v == len(length) for v in check_arrays), 'arrays are not of same length'
56738  * self.ProtChSystem = system
56739  * self.ProtChSystem.addSubcomponent(self) # <<<<<<<<<<<<<<
56740  * self.nd = self.ProtChSystem.nd
56741  * self.Mesh = mesh
56742  */
56743  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ProtChSystem), __pyx_n_s_addSubcomponent); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2477, __pyx_L1_error)
56744  __Pyx_GOTREF(__pyx_t_8);
56745  __pyx_t_6 = NULL;
56746  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
56747  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
56748  if (likely(__pyx_t_6)) {
56749  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
56750  __Pyx_INCREF(__pyx_t_6);
56751  __Pyx_INCREF(function);
56752  __Pyx_DECREF_SET(__pyx_t_8, function);
56753  }
56754  }
56755  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_v_self));
56756  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
56757  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2477, __pyx_L1_error)
56758  __Pyx_GOTREF(__pyx_t_7);
56759  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
56760  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
56761 
56762  /* "mbd/CouplingFSI.pyx":2478
56763  * self.ProtChSystem = system
56764  * self.ProtChSystem.addSubcomponent(self)
56765  * self.nd = self.ProtChSystem.nd # <<<<<<<<<<<<<<
56766  * self.Mesh = mesh
56767  * self.beam_type = beam_type
56768  */
56769  __pyx_t_10 = __pyx_v_self->ProtChSystem->nd;
56770  __pyx_v_self->nd = __pyx_t_10;
56771 
56772  /* "mbd/CouplingFSI.pyx":2479
56773  * self.ProtChSystem.addSubcomponent(self)
56774  * self.nd = self.ProtChSystem.nd
56775  * self.Mesh = mesh # <<<<<<<<<<<<<<
56776  * self.beam_type = beam_type
56777  * self.nb_elems = nb_elems
56778  */
56779  __Pyx_INCREF(((PyObject *)__pyx_v_mesh));
56780  __Pyx_GIVEREF(((PyObject *)__pyx_v_mesh));
56781  __Pyx_GOTREF(__pyx_v_self->Mesh);
56782  __Pyx_DECREF(__pyx_v_self->Mesh);
56783  __pyx_v_self->Mesh = ((PyObject *)__pyx_v_mesh);
56784 
56785  /* "mbd/CouplingFSI.pyx":2480
56786  * self.nd = self.ProtChSystem.nd
56787  * self.Mesh = mesh
56788  * self.beam_type = beam_type # <<<<<<<<<<<<<<
56789  * self.nb_elems = nb_elems
56790  * cdef vector[double] vec_length
56791  */
56792  __pyx_v_self->beam_type = __pyx_v_beam_type;
56793 
56794  /* "mbd/CouplingFSI.pyx":2481
56795  * self.Mesh = mesh
56796  * self.beam_type = beam_type
56797  * self.nb_elems = nb_elems # <<<<<<<<<<<<<<
56798  * cdef vector[double] vec_length
56799  * cdef vector[int] vec_nb_elems
56800  */
56801  __Pyx_INCREF(((PyObject *)__pyx_v_nb_elems));
56802  __Pyx_GIVEREF(((PyObject *)__pyx_v_nb_elems));
56803  __Pyx_GOTREF(__pyx_v_self->nb_elems);
56804  __Pyx_DECREF(((PyObject *)__pyx_v_self->nb_elems));
56805  __pyx_v_self->nb_elems = __pyx_v_nb_elems;
56806 
56807  /* "mbd/CouplingFSI.pyx":2487
56808  * cdef vector[double] vec_rho
56809  * cdef vector[double] vec_E
56810  * for i in range(len(length)): # <<<<<<<<<<<<<<
56811  * vec_length.push_back(length[i])
56812  * vec_nb_elems.push_back(nb_elems[i])
56813  */
56814  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_cur_scope->__pyx_v_length);
56815  __pyx_t_3 = __pyx_t_1;
56816  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_3; __pyx_t_11+=1) {
56817  __pyx_v_i = __pyx_t_11;
56818 
56819  /* "mbd/CouplingFSI.pyx":2488
56820  * cdef vector[double] vec_E
56821  * for i in range(len(length)):
56822  * vec_length.push_back(length[i]) # <<<<<<<<<<<<<<
56823  * vec_nb_elems.push_back(nb_elems[i])
56824  * vec_d.push_back(d[i])
56825  */
56826  __pyx_t_12 = __pyx_v_i;
56827  __pyx_t_10 = -1;
56828  if (__pyx_t_12 < 0) {
56829  __pyx_t_12 += __pyx_cur_scope->__pyx_v_length.shape[0];
56830  if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
56831  } else if (unlikely(__pyx_t_12 >= __pyx_cur_scope->__pyx_v_length.shape[0])) __pyx_t_10 = 0;
56832  if (unlikely(__pyx_t_10 != -1)) {
56833  __Pyx_RaiseBufferIndexError(__pyx_t_10);
56834  __PYX_ERR(0, 2488, __pyx_L1_error)
56835  }
56836  try {
56837  __pyx_v_vec_length.push_back((*((double *) ( /* dim=0 */ (__pyx_cur_scope->__pyx_v_length.data + __pyx_t_12 * __pyx_cur_scope->__pyx_v_length.strides[0]) ))));
56838  } catch(...) {
56839  __Pyx_CppExn2PyErr();
56840  __PYX_ERR(0, 2488, __pyx_L1_error)
56841  }
56842 
56843  /* "mbd/CouplingFSI.pyx":2489
56844  * for i in range(len(length)):
56845  * vec_length.push_back(length[i])
56846  * vec_nb_elems.push_back(nb_elems[i]) # <<<<<<<<<<<<<<
56847  * vec_d.push_back(d[i])
56848  * vec_rho.push_back(rho[i])
56849  */
56850  __pyx_t_7 = __Pyx_GetItemInt(((PyObject *)__pyx_v_nb_elems), __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2489, __pyx_L1_error)
56851  __Pyx_GOTREF(__pyx_t_7);
56852  __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2489, __pyx_L1_error)
56853  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
56854  try {
56855  __pyx_v_vec_nb_elems.push_back(__pyx_t_10);
56856  } catch(...) {
56857  __Pyx_CppExn2PyErr();
56858  __PYX_ERR(0, 2489, __pyx_L1_error)
56859  }
56860 
56861  /* "mbd/CouplingFSI.pyx":2490
56862  * vec_length.push_back(length[i])
56863  * vec_nb_elems.push_back(nb_elems[i])
56864  * vec_d.push_back(d[i]) # <<<<<<<<<<<<<<
56865  * vec_rho.push_back(rho[i])
56866  * vec_E.push_back(E[i])
56867  */
56868  __pyx_t_12 = __pyx_v_i;
56869  __pyx_t_10 = -1;
56870  if (__pyx_t_12 < 0) {
56871  __pyx_t_12 += __pyx_v_d.shape[0];
56872  if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
56873  } else if (unlikely(__pyx_t_12 >= __pyx_v_d.shape[0])) __pyx_t_10 = 0;
56874  if (unlikely(__pyx_t_10 != -1)) {
56875  __Pyx_RaiseBufferIndexError(__pyx_t_10);
56876  __PYX_ERR(0, 2490, __pyx_L1_error)
56877  }
56878  try {
56879  __pyx_v_vec_d.push_back((*((double *) ( /* dim=0 */ (__pyx_v_d.data + __pyx_t_12 * __pyx_v_d.strides[0]) ))));
56880  } catch(...) {
56881  __Pyx_CppExn2PyErr();
56882  __PYX_ERR(0, 2490, __pyx_L1_error)
56883  }
56884 
56885  /* "mbd/CouplingFSI.pyx":2491
56886  * vec_nb_elems.push_back(nb_elems[i])
56887  * vec_d.push_back(d[i])
56888  * vec_rho.push_back(rho[i]) # <<<<<<<<<<<<<<
56889  * vec_E.push_back(E[i])
56890  * self.thisptr = newMoorings(system.thisptr.system,
56891  */
56892  __pyx_t_12 = __pyx_v_i;
56893  __pyx_t_10 = -1;
56894  if (__pyx_t_12 < 0) {
56895  __pyx_t_12 += __pyx_v_rho.shape[0];
56896  if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
56897  } else if (unlikely(__pyx_t_12 >= __pyx_v_rho.shape[0])) __pyx_t_10 = 0;
56898  if (unlikely(__pyx_t_10 != -1)) {
56899  __Pyx_RaiseBufferIndexError(__pyx_t_10);
56900  __PYX_ERR(0, 2491, __pyx_L1_error)
56901  }
56902  try {
56903  __pyx_v_vec_rho.push_back((*((double *) ( /* dim=0 */ (__pyx_v_rho.data + __pyx_t_12 * __pyx_v_rho.strides[0]) ))));
56904  } catch(...) {
56905  __Pyx_CppExn2PyErr();
56906  __PYX_ERR(0, 2491, __pyx_L1_error)
56907  }
56908 
56909  /* "mbd/CouplingFSI.pyx":2492
56910  * vec_d.push_back(d[i])
56911  * vec_rho.push_back(rho[i])
56912  * vec_E.push_back(E[i]) # <<<<<<<<<<<<<<
56913  * self.thisptr = newMoorings(system.thisptr.system,
56914  * mesh.mesh,
56915  */
56916  __pyx_t_12 = __pyx_v_i;
56917  __pyx_t_10 = -1;
56918  if (__pyx_t_12 < 0) {
56919  __pyx_t_12 += __pyx_v_E.shape[0];
56920  if (unlikely(__pyx_t_12 < 0)) __pyx_t_10 = 0;
56921  } else if (unlikely(__pyx_t_12 >= __pyx_v_E.shape[0])) __pyx_t_10 = 0;
56922  if (unlikely(__pyx_t_10 != -1)) {
56923  __Pyx_RaiseBufferIndexError(__pyx_t_10);
56924  __PYX_ERR(0, 2492, __pyx_L1_error)
56925  }
56926  try {
56927  __pyx_v_vec_E.push_back((*((double *) ( /* dim=0 */ (__pyx_v_E.data + __pyx_t_12 * __pyx_v_E.strides[0]) ))));
56928  } catch(...) {
56929  __Pyx_CppExn2PyErr();
56930  __PYX_ERR(0, 2492, __pyx_L1_error)
56931  }
56932  }
56933 
56934  /* "mbd/CouplingFSI.pyx":2493
56935  * vec_rho.push_back(rho[i])
56936  * vec_E.push_back(E[i])
56937  * self.thisptr = newMoorings(system.thisptr.system, # <<<<<<<<<<<<<<
56938  * mesh.mesh,
56939  * vec_length,
56940  */
56941  __pyx_v_self->thisptr = newMoorings(__pyx_v_system->thisptr->system, __pyx_v_mesh->mesh, __pyx_v_vec_length, __pyx_v_vec_nb_elems, __pyx_v_vec_d, __pyx_v_vec_rho, __pyx_v_vec_E, __pyx_v_beam_type);
56942 
56943  /* "mbd/CouplingFSI.pyx":2502
56944  * beam_type
56945  * )
56946  * self.nodes_function = lambda s: (s, s, s) # <<<<<<<<<<<<<<
56947  * self.nodes_built = False
56948  * name=b'mooring'
56949  */
56950  __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___3lambda2, 0, __pyx_n_s_cinit___locals_lambda, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2502, __pyx_L1_error)
56951  __Pyx_GOTREF(__pyx_t_7);
56952  __Pyx_GIVEREF(__pyx_t_7);
56953  __Pyx_GOTREF(__pyx_v_self->nodes_function);
56954  __Pyx_DECREF(__pyx_v_self->nodes_function);
56955  __pyx_v_self->nodes_function = __pyx_t_7;
56956  __pyx_t_7 = 0;
56957 
56958  /* "mbd/CouplingFSI.pyx":2503
56959  * )
56960  * self.nodes_function = lambda s: (s, s, s)
56961  * self.nodes_built = False # <<<<<<<<<<<<<<
56962  * name=b'mooring'
56963  * self.setName(name)
56964  */
56965  __pyx_v_self->nodes_built = 0;
56966 
56967  /* "mbd/CouplingFSI.pyx":2504
56968  * self.nodes_function = lambda s: (s, s, s)
56969  * self.nodes_built = False
56970  * name=b'mooring' # <<<<<<<<<<<<<<
56971  * self.setName(name)
56972  * self.external_forces_from_ns = True
56973  */
56974  __Pyx_INCREF(__pyx_n_b_mooring);
56975  __pyx_v_name = __pyx_n_b_mooring;
56976 
56977  /* "mbd/CouplingFSI.pyx":2505
56978  * self.nodes_built = False
56979  * name=b'mooring'
56980  * self.setName(name) # <<<<<<<<<<<<<<
56981  * self.external_forces_from_ns = True
56982  * self.external_forces_manual = True
56983  */
56984  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setName); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2505, __pyx_L1_error)
56985  __Pyx_GOTREF(__pyx_t_8);
56986  __pyx_t_6 = NULL;
56987  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
56988  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
56989  if (likely(__pyx_t_6)) {
56990  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
56991  __Pyx_INCREF(__pyx_t_6);
56992  __Pyx_INCREF(function);
56993  __Pyx_DECREF_SET(__pyx_t_8, function);
56994  }
56995  }
56996  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_6, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_name);
56997  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
56998  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2505, __pyx_L1_error)
56999  __Pyx_GOTREF(__pyx_t_7);
57000  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57001  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
57002 
57003  /* "mbd/CouplingFSI.pyx":2506
57004  * name=b'mooring'
57005  * self.setName(name)
57006  * self.external_forces_from_ns = True # <<<<<<<<<<<<<<
57007  * self.external_forces_manual = True
57008  * self._record_etas = np.array([0.])
57009  */
57010  __pyx_v_self->external_forces_from_ns = 1;
57011 
57012  /* "mbd/CouplingFSI.pyx":2507
57013  * self.setName(name)
57014  * self.external_forces_from_ns = True
57015  * self.external_forces_manual = True # <<<<<<<<<<<<<<
57016  * self._record_etas = np.array([0.])
57017  * self._record_names = ['ux', 'uy', 'uz',
57018  */
57019  __pyx_v_self->external_forces_manual = 1;
57020 
57021  /* "mbd/CouplingFSI.pyx":2508
57022  * self.external_forces_from_ns = True
57023  * self.external_forces_manual = True
57024  * self._record_etas = np.array([0.]) # <<<<<<<<<<<<<<
57025  * self._record_names = ['ux', 'uy', 'uz',
57026  * 'ax', 'ay', 'az',
57027  */
57028  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2508, __pyx_L1_error)
57029  __Pyx_GOTREF(__pyx_t_8);
57030  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2508, __pyx_L1_error)
57031  __Pyx_GOTREF(__pyx_t_6);
57032  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57033  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2508, __pyx_L1_error)
57034  __Pyx_GOTREF(__pyx_t_8);
57035  __Pyx_INCREF(__pyx_float_0_);
57036  __Pyx_GIVEREF(__pyx_float_0_);
57037  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_float_0_);
57038  __pyx_t_5 = NULL;
57039  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
57040  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
57041  if (likely(__pyx_t_5)) {
57042  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
57043  __Pyx_INCREF(__pyx_t_5);
57044  __Pyx_INCREF(function);
57045  __Pyx_DECREF_SET(__pyx_t_6, function);
57046  }
57047  }
57048  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8);
57049  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
57050  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57051  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2508, __pyx_L1_error)
57052  __Pyx_GOTREF(__pyx_t_7);
57053  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
57054  __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 2508, __pyx_L1_error)
57055  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
57056  __PYX_XDEC_MEMVIEW(&__pyx_v_self->_record_etas, 0);
57057  __pyx_v_self->_record_etas = __pyx_t_13;
57058  __pyx_t_13.memview = NULL;
57059  __pyx_t_13.data = NULL;
57060 
57061  /* "mbd/CouplingFSI.pyx":2509
57062  * self.external_forces_manual = True
57063  * self._record_etas = np.array([0.])
57064  * self._record_names = ['ux', 'uy', 'uz', # <<<<<<<<<<<<<<
57065  * 'ax', 'ay', 'az',
57066  * 'fluid_ux', 'fluid_uy', 'fluid_uz',
57067  */
57068  __pyx_t_7 = PyList_New(18); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2509, __pyx_L1_error)
57069  __Pyx_GOTREF(__pyx_t_7);
57070  __Pyx_INCREF(__pyx_n_s_ux);
57071  __Pyx_GIVEREF(__pyx_n_s_ux);
57072  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_ux);
57073  __Pyx_INCREF(__pyx_n_s_uy);
57074  __Pyx_GIVEREF(__pyx_n_s_uy);
57075  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_n_s_uy);
57076  __Pyx_INCREF(__pyx_n_s_uz);
57077  __Pyx_GIVEREF(__pyx_n_s_uz);
57078  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_n_s_uz);
57079  __Pyx_INCREF(__pyx_n_s_ax);
57080  __Pyx_GIVEREF(__pyx_n_s_ax);
57081  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_n_s_ax);
57082  __Pyx_INCREF(__pyx_n_s_ay);
57083  __Pyx_GIVEREF(__pyx_n_s_ay);
57084  PyList_SET_ITEM(__pyx_t_7, 4, __pyx_n_s_ay);
57085  __Pyx_INCREF(__pyx_n_s_az);
57086  __Pyx_GIVEREF(__pyx_n_s_az);
57087  PyList_SET_ITEM(__pyx_t_7, 5, __pyx_n_s_az);
57088  __Pyx_INCREF(__pyx_n_s_fluid_ux);
57089  __Pyx_GIVEREF(__pyx_n_s_fluid_ux);
57090  PyList_SET_ITEM(__pyx_t_7, 6, __pyx_n_s_fluid_ux);
57091  __Pyx_INCREF(__pyx_n_s_fluid_uy);
57092  __Pyx_GIVEREF(__pyx_n_s_fluid_uy);
57093  PyList_SET_ITEM(__pyx_t_7, 7, __pyx_n_s_fluid_uy);
57094  __Pyx_INCREF(__pyx_n_s_fluid_uz);
57095  __Pyx_GIVEREF(__pyx_n_s_fluid_uz);
57096  PyList_SET_ITEM(__pyx_t_7, 8, __pyx_n_s_fluid_uz);
57097  __Pyx_INCREF(__pyx_n_s_fluid_ax);
57098  __Pyx_GIVEREF(__pyx_n_s_fluid_ax);
57099  PyList_SET_ITEM(__pyx_t_7, 9, __pyx_n_s_fluid_ax);
57100  __Pyx_INCREF(__pyx_n_s_fluid_ay);
57101  __Pyx_GIVEREF(__pyx_n_s_fluid_ay);
57102  PyList_SET_ITEM(__pyx_t_7, 10, __pyx_n_s_fluid_ay);
57103  __Pyx_INCREF(__pyx_n_s_fluid_az);
57104  __Pyx_GIVEREF(__pyx_n_s_fluid_az);
57105  PyList_SET_ITEM(__pyx_t_7, 11, __pyx_n_s_fluid_az);
57106  __Pyx_INCREF(__pyx_n_s_dragx);
57107  __Pyx_GIVEREF(__pyx_n_s_dragx);
57108  PyList_SET_ITEM(__pyx_t_7, 12, __pyx_n_s_dragx);
57109  __Pyx_INCREF(__pyx_n_s_dragy);
57110  __Pyx_GIVEREF(__pyx_n_s_dragy);
57111  PyList_SET_ITEM(__pyx_t_7, 13, __pyx_n_s_dragy);
57112  __Pyx_INCREF(__pyx_n_s_dragz);
57113  __Pyx_GIVEREF(__pyx_n_s_dragz);
57114  PyList_SET_ITEM(__pyx_t_7, 14, __pyx_n_s_dragz);
57115  __Pyx_INCREF(__pyx_n_s_amx);
57116  __Pyx_GIVEREF(__pyx_n_s_amx);
57117  PyList_SET_ITEM(__pyx_t_7, 15, __pyx_n_s_amx);
57118  __Pyx_INCREF(__pyx_n_s_amy);
57119  __Pyx_GIVEREF(__pyx_n_s_amy);
57120  PyList_SET_ITEM(__pyx_t_7, 16, __pyx_n_s_amy);
57121  __Pyx_INCREF(__pyx_n_s_amz);
57122  __Pyx_GIVEREF(__pyx_n_s_amz);
57123  PyList_SET_ITEM(__pyx_t_7, 17, __pyx_n_s_amz);
57124  __Pyx_GIVEREF(__pyx_t_7);
57125  __Pyx_GOTREF(__pyx_v_self->_record_names);
57126  __Pyx_DECREF(__pyx_v_self->_record_names);
57127  __pyx_v_self->_record_names = __pyx_t_7;
57128  __pyx_t_7 = 0;
57129 
57130  /* "mbd/CouplingFSI.pyx":2515
57131  * 'dragx', 'dragy', 'dragz',
57132  * 'amx', 'amy', 'amz']
57133  * self._record_etas_names = [] # <<<<<<<<<<<<<<
57134  * for eta in self._record_etas:
57135  * self._record_etas_names += ['sx'+str(eta), 'sy'+str(eta), 'sz'+str(eta)]
57136  */
57137  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2515, __pyx_L1_error)
57138  __Pyx_GOTREF(__pyx_t_7);
57139  __Pyx_GIVEREF(__pyx_t_7);
57140  __Pyx_GOTREF(__pyx_v_self->_record_etas_names);
57141  __Pyx_DECREF(__pyx_v_self->_record_etas_names);
57142  __pyx_v_self->_record_etas_names = __pyx_t_7;
57143  __pyx_t_7 = 0;
57144 
57145  /* "mbd/CouplingFSI.pyx":2516
57146  * 'amx', 'amy', 'amz']
57147  * self._record_etas_names = []
57148  * for eta in self._record_etas: # <<<<<<<<<<<<<<
57149  * self._record_etas_names += ['sx'+str(eta), 'sy'+str(eta), 'sz'+str(eta)]
57150  * self.tCount = 0
57151  */
57152  if (unlikely(!__pyx_v_self->_record_etas.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2516, __pyx_L1_error)}
57153  __pyx_t_7 = __pyx_memoryview_fromslice(__pyx_v_self->_record_etas, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2516, __pyx_L1_error)
57154  __Pyx_GOTREF(__pyx_t_7);
57155  if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) {
57156  __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_3 = 0;
57157  __pyx_t_14 = NULL;
57158  } else {
57159  __pyx_t_3 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2516, __pyx_L1_error)
57160  __Pyx_GOTREF(__pyx_t_6);
57161  __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2516, __pyx_L1_error)
57162  }
57163  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
57164  for (;;) {
57165  if (likely(!__pyx_t_14)) {
57166  if (likely(PyList_CheckExact(__pyx_t_6))) {
57167  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_6)) break;
57168  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
57169  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2516, __pyx_L1_error)
57170  #else
57171  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2516, __pyx_L1_error)
57172  __Pyx_GOTREF(__pyx_t_7);
57173  #endif
57174  } else {
57175  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
57176  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
57177  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2516, __pyx_L1_error)
57178  #else
57179  __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2516, __pyx_L1_error)
57180  __Pyx_GOTREF(__pyx_t_7);
57181  #endif
57182  }
57183  } else {
57184  __pyx_t_7 = __pyx_t_14(__pyx_t_6);
57185  if (unlikely(!__pyx_t_7)) {
57186  PyObject* exc_type = PyErr_Occurred();
57187  if (exc_type) {
57188  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
57189  else __PYX_ERR(0, 2516, __pyx_L1_error)
57190  }
57191  break;
57192  }
57193  __Pyx_GOTREF(__pyx_t_7);
57194  }
57195  __Pyx_XDECREF_SET(__pyx_v_eta, __pyx_t_7);
57196  __pyx_t_7 = 0;
57197 
57198  /* "mbd/CouplingFSI.pyx":2517
57199  * self._record_etas_names = []
57200  * for eta in self._record_etas:
57201  * self._record_etas_names += ['sx'+str(eta), 'sy'+str(eta), 'sz'+str(eta)] # <<<<<<<<<<<<<<
57202  * self.tCount = 0
57203  *
57204  */
57205  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2517, __pyx_L1_error)
57206  __Pyx_GOTREF(__pyx_t_7);
57207  __pyx_t_8 = PyNumber_Add(__pyx_n_s_sx, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2517, __pyx_L1_error)
57208  __Pyx_GOTREF(__pyx_t_8);
57209  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
57210  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2517, __pyx_L1_error)
57211  __Pyx_GOTREF(__pyx_t_7);
57212  __pyx_t_5 = PyNumber_Add(__pyx_n_s_sy, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2517, __pyx_L1_error)
57213  __Pyx_GOTREF(__pyx_t_5);
57214  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
57215  __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2517, __pyx_L1_error)
57216  __Pyx_GOTREF(__pyx_t_7);
57217  __pyx_t_4 = PyNumber_Add(__pyx_n_s_sz, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2517, __pyx_L1_error)
57218  __Pyx_GOTREF(__pyx_t_4);
57219  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
57220  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2517, __pyx_L1_error)
57221  __Pyx_GOTREF(__pyx_t_7);
57222  __Pyx_GIVEREF(__pyx_t_8);
57223  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_8);
57224  __Pyx_GIVEREF(__pyx_t_5);
57225  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
57226  __Pyx_GIVEREF(__pyx_t_4);
57227  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_4);
57228  __pyx_t_8 = 0;
57229  __pyx_t_5 = 0;
57230  __pyx_t_4 = 0;
57231  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_self->_record_etas_names, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2517, __pyx_L1_error)
57232  __Pyx_GOTREF(__pyx_t_4);
57233  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
57234  __Pyx_GIVEREF(__pyx_t_4);
57235  __Pyx_GOTREF(__pyx_v_self->_record_etas_names);
57236  __Pyx_DECREF(__pyx_v_self->_record_etas_names);
57237  __pyx_v_self->_record_etas_names = __pyx_t_4;
57238  __pyx_t_4 = 0;
57239 
57240  /* "mbd/CouplingFSI.pyx":2516
57241  * 'amx', 'amy', 'amz']
57242  * self._record_etas_names = []
57243  * for eta in self._record_etas: # <<<<<<<<<<<<<<
57244  * self._record_etas_names += ['sx'+str(eta), 'sy'+str(eta), 'sz'+str(eta)]
57245  * self.tCount = 0
57246  */
57247  }
57248  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
57249 
57250  /* "mbd/CouplingFSI.pyx":2518
57251  * for eta in self._record_etas:
57252  * self._record_etas_names += ['sx'+str(eta), 'sy'+str(eta), 'sz'+str(eta)]
57253  * self.tCount = 0 # <<<<<<<<<<<<<<
57254  *
57255  * def setName(self, string name):
57256  */
57257  __pyx_v_self->tCount = 0;
57258 
57259  /* "mbd/CouplingFSI.pyx":2465
57260  * """
57261  *
57262  * def __cinit__(self, # <<<<<<<<<<<<<<
57263  * ProtChSystem system,
57264  * ProtChMesh mesh,
57265  */
57266 
57267  /* function exit code */
57268  __pyx_r = 0;
57269  goto __pyx_L0;
57270  __pyx_L1_error:;
57271  __Pyx_XDECREF(__pyx_t_2);
57272  __Pyx_XDECREF(__pyx_t_4);
57273  __Pyx_XDECREF(__pyx_t_5);
57274  __Pyx_XDECREF(__pyx_t_6);
57275  __Pyx_XDECREF(__pyx_t_7);
57276  __Pyx_XDECREF(__pyx_t_8);
57277  __PYX_XDEC_MEMVIEW(&__pyx_t_13, 1);
57278  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
57279  __pyx_r = -1;
57280  __pyx_L0:;
57281  __Pyx_XDECREF(__pyx_v_name);
57282  __Pyx_XDECREF(__pyx_v_eta);
57283  __Pyx_XDECREF(__pyx_gb_3mbd_11CouplingFSI_14ProtChMoorings_9__cinit___2generator);
57284  __PYX_XDEC_MEMVIEW(&__pyx_cur_scope->__pyx_v_length, 1);
57285  __PYX_XDEC_MEMVIEW(&__pyx_v_d, 1);
57286  __PYX_XDEC_MEMVIEW(&__pyx_v_rho, 1);
57287  __PYX_XDEC_MEMVIEW(&__pyx_v_E, 1);
57288  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
57289  __Pyx_TraceReturn(Py_None, 0);
57290  __Pyx_RefNannyFinishContext();
57291  return __pyx_r;
57292 }
57293 
57294 /* "mbd/CouplingFSI.pyx":2520
57295  * self.tCount = 0
57296  *
57297  * def setName(self, string name): # <<<<<<<<<<<<<<
57298  * """Sets name of cable, used for csv file
57299  *
57300  */
57301 
57302 /* Python wrapper */
57303 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_3setName(PyObject *__pyx_v_self, PyObject *__pyx_arg_name); /*proto*/
57304 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_2setName[] = "ProtChMoorings.setName(self, string name)\nSets name of cable, used for csv file\n\n Parameters\n ----------\n name: str\n Name of cable.\n ";
57305 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_3setName = {"setName", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_3setName, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_2setName};
57306 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_3setName(PyObject *__pyx_v_self, PyObject *__pyx_arg_name) {
57307  std::string __pyx_v_name;
57308  int __pyx_lineno = 0;
57309  const char *__pyx_filename = NULL;
57310  int __pyx_clineno = 0;
57311  PyObject *__pyx_r = 0;
57312  __Pyx_RefNannyDeclarations
57313  __Pyx_RefNannySetupContext("setName (wrapper)", 0);
57314  assert(__pyx_arg_name); {
57315  __pyx_v_name = __pyx_convert_string_from_py_std__in_string(__pyx_arg_name); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2520, __pyx_L3_error)
57316  }
57317  goto __pyx_L4_argument_unpacking_done;
57318  __pyx_L3_error:;
57319  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
57320  __Pyx_RefNannyFinishContext();
57321  return NULL;
57322  __pyx_L4_argument_unpacking_done:;
57323  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2setName(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((std::string)__pyx_v_name));
57324 
57325  /* function exit code */
57326  __Pyx_RefNannyFinishContext();
57327  return __pyx_r;
57328 }
57329 
57330 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2setName(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, std::string __pyx_v_name) {
57331  PyObject *__pyx_r = NULL;
57332  __Pyx_TraceDeclarations
57333  __Pyx_RefNannyDeclarations
57334  int __pyx_lineno = 0;
57335  const char *__pyx_filename = NULL;
57336  int __pyx_clineno = 0;
57337  __Pyx_TraceFrameInit(__pyx_codeobj__148)
57338  __Pyx_RefNannySetupContext("setName", 0);
57339  __Pyx_TraceCall("setName", __pyx_f[0], 2520, 0, __PYX_ERR(0, 2520, __pyx_L1_error));
57340 
57341  /* "mbd/CouplingFSI.pyx":2528
57342  * Name of cable.
57343  * """
57344  * self.name = name # <<<<<<<<<<<<<<
57345  *
57346  * def recordStrainEta(self, double[:] etas):
57347  */
57348  __pyx_v_self->name = __pyx_v_name;
57349 
57350  /* "mbd/CouplingFSI.pyx":2520
57351  * self.tCount = 0
57352  *
57353  * def setName(self, string name): # <<<<<<<<<<<<<<
57354  * """Sets name of cable, used for csv file
57355  *
57356  */
57357 
57358  /* function exit code */
57359  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
57360  goto __pyx_L0;
57361  __pyx_L1_error:;
57362  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setName", __pyx_clineno, __pyx_lineno, __pyx_filename);
57363  __pyx_r = NULL;
57364  __pyx_L0:;
57365  __Pyx_XGIVEREF(__pyx_r);
57366  __Pyx_TraceReturn(__pyx_r, 0);
57367  __Pyx_RefNannyFinishContext();
57368  return __pyx_r;
57369 }
57370 
57371 /* "mbd/CouplingFSI.pyx":2530
57372  * self.name = name
57373  *
57374  * def recordStrainEta(self, double[:] etas): # <<<<<<<<<<<<<<
57375  * self._record_etas = etas
57376  * self._record_etas_names = []
57377  */
57378 
57379 /* Python wrapper */
57380 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5recordStrainEta(PyObject *__pyx_v_self, PyObject *__pyx_arg_etas); /*proto*/
57381 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_4recordStrainEta[] = "ProtChMoorings.recordStrainEta(self, double[:] etas)";
57382 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_5recordStrainEta = {"recordStrainEta", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5recordStrainEta, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_4recordStrainEta};
57383 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5recordStrainEta(PyObject *__pyx_v_self, PyObject *__pyx_arg_etas) {
57384  __Pyx_memviewslice __pyx_v_etas = { 0, 0, { 0 }, { 0 }, { 0 } };
57385  int __pyx_lineno = 0;
57386  const char *__pyx_filename = NULL;
57387  int __pyx_clineno = 0;
57388  PyObject *__pyx_r = 0;
57389  __Pyx_RefNannyDeclarations
57390  __Pyx_RefNannySetupContext("recordStrainEta (wrapper)", 0);
57391  assert(__pyx_arg_etas); {
57392  __pyx_v_etas = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_arg_etas, PyBUF_WRITABLE); if (unlikely(!__pyx_v_etas.memview)) __PYX_ERR(0, 2530, __pyx_L3_error)
57393  }
57394  goto __pyx_L4_argument_unpacking_done;
57395  __pyx_L3_error:;
57396  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.recordStrainEta", __pyx_clineno, __pyx_lineno, __pyx_filename);
57397  __Pyx_RefNannyFinishContext();
57398  return NULL;
57399  __pyx_L4_argument_unpacking_done:;
57400  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4recordStrainEta(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_etas);
57401 
57402  /* function exit code */
57403  __Pyx_RefNannyFinishContext();
57404  return __pyx_r;
57405 }
57406 
57407 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4recordStrainEta(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, __Pyx_memviewslice __pyx_v_etas) {
57408  Py_ssize_t __pyx_v_i;
57409  PyObject *__pyx_v_eta = NULL;
57410  PyObject *__pyx_r = NULL;
57411  __Pyx_TraceDeclarations
57412  __Pyx_RefNannyDeclarations
57413  PyObject *__pyx_t_1 = NULL;
57414  size_t __pyx_t_2;
57415  Py_ssize_t __pyx_t_3;
57416  Py_ssize_t __pyx_t_4;
57417  Py_ssize_t __pyx_t_5;
57418  int __pyx_t_6;
57419  PyObject *__pyx_t_7 = NULL;
57420  PyObject *__pyx_t_8 = NULL;
57421  PyObject *__pyx_t_9 = NULL;
57422  int __pyx_lineno = 0;
57423  const char *__pyx_filename = NULL;
57424  int __pyx_clineno = 0;
57425  __Pyx_TraceFrameInit(__pyx_codeobj__149)
57426  __Pyx_RefNannySetupContext("recordStrainEta", 0);
57427  __Pyx_TraceCall("recordStrainEta", __pyx_f[0], 2530, 0, __PYX_ERR(0, 2530, __pyx_L1_error));
57428 
57429  /* "mbd/CouplingFSI.pyx":2531
57430  *
57431  * def recordStrainEta(self, double[:] etas):
57432  * self._record_etas = etas # <<<<<<<<<<<<<<
57433  * self._record_etas_names = []
57434  * for i in range(len(self._record_etas)):
57435  */
57436  __PYX_XDEC_MEMVIEW(&__pyx_v_self->_record_etas, 0);
57437  __PYX_INC_MEMVIEW(&__pyx_v_etas, 0);
57438  __pyx_v_self->_record_etas = __pyx_v_etas;
57439 
57440  /* "mbd/CouplingFSI.pyx":2532
57441  * def recordStrainEta(self, double[:] etas):
57442  * self._record_etas = etas
57443  * self._record_etas_names = [] # <<<<<<<<<<<<<<
57444  * for i in range(len(self._record_etas)):
57445  * eta = self._record_etas[i]
57446  */
57447  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2532, __pyx_L1_error)
57448  __Pyx_GOTREF(__pyx_t_1);
57449  __Pyx_GIVEREF(__pyx_t_1);
57450  __Pyx_GOTREF(__pyx_v_self->_record_etas_names);
57451  __Pyx_DECREF(__pyx_v_self->_record_etas_names);
57452  __pyx_v_self->_record_etas_names = __pyx_t_1;
57453  __pyx_t_1 = 0;
57454 
57455  /* "mbd/CouplingFSI.pyx":2533
57456  * self._record_etas = etas
57457  * self._record_etas_names = []
57458  * for i in range(len(self._record_etas)): # <<<<<<<<<<<<<<
57459  * eta = self._record_etas[i]
57460  * self._record_etas_names += ['sx'+str(eta),
57461  */
57462  if (unlikely(!__pyx_v_self->_record_etas.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2533, __pyx_L1_error)}
57463  __pyx_t_2 = __Pyx_MemoryView_Len(__pyx_v_self->_record_etas);
57464  __pyx_t_3 = __pyx_t_2;
57465  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
57466  __pyx_v_i = __pyx_t_4;
57467 
57468  /* "mbd/CouplingFSI.pyx":2534
57469  * self._record_etas_names = []
57470  * for i in range(len(self._record_etas)):
57471  * eta = self._record_etas[i] # <<<<<<<<<<<<<<
57472  * self._record_etas_names += ['sx'+str(eta),
57473  * 'sy'+str(eta),
57474  */
57475  if (unlikely(!__pyx_v_self->_record_etas.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2534, __pyx_L1_error)}
57476  __pyx_t_5 = __pyx_v_i;
57477  __pyx_t_6 = -1;
57478  if (__pyx_t_5 < 0) {
57479  __pyx_t_5 += __pyx_v_self->_record_etas.shape[0];
57480  if (unlikely(__pyx_t_5 < 0)) __pyx_t_6 = 0;
57481  } else if (unlikely(__pyx_t_5 >= __pyx_v_self->_record_etas.shape[0])) __pyx_t_6 = 0;
57482  if (unlikely(__pyx_t_6 != -1)) {
57483  __Pyx_RaiseBufferIndexError(__pyx_t_6);
57484  __PYX_ERR(0, 2534, __pyx_L1_error)
57485  }
57486  __pyx_t_1 = PyFloat_FromDouble((*((double *) ( /* dim=0 */ (__pyx_v_self->_record_etas.data + __pyx_t_5 * __pyx_v_self->_record_etas.strides[0]) )))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2534, __pyx_L1_error)
57487  __Pyx_GOTREF(__pyx_t_1);
57488  __Pyx_XDECREF_SET(__pyx_v_eta, __pyx_t_1);
57489  __pyx_t_1 = 0;
57490 
57491  /* "mbd/CouplingFSI.pyx":2535
57492  * for i in range(len(self._record_etas)):
57493  * eta = self._record_etas[i]
57494  * self._record_etas_names += ['sx'+str(eta), # <<<<<<<<<<<<<<
57495  * 'sy'+str(eta),
57496  * 'sz'+str(eta)]
57497  */
57498  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2535, __pyx_L1_error)
57499  __Pyx_GOTREF(__pyx_t_1);
57500  __pyx_t_7 = PyNumber_Add(__pyx_n_s_sx, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2535, __pyx_L1_error)
57501  __Pyx_GOTREF(__pyx_t_7);
57502  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57503 
57504  /* "mbd/CouplingFSI.pyx":2536
57505  * eta = self._record_etas[i]
57506  * self._record_etas_names += ['sx'+str(eta),
57507  * 'sy'+str(eta), # <<<<<<<<<<<<<<
57508  * 'sz'+str(eta)]
57509  *
57510  */
57511  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2536, __pyx_L1_error)
57512  __Pyx_GOTREF(__pyx_t_1);
57513  __pyx_t_8 = PyNumber_Add(__pyx_n_s_sy, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2536, __pyx_L1_error)
57514  __Pyx_GOTREF(__pyx_t_8);
57515  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57516 
57517  /* "mbd/CouplingFSI.pyx":2537
57518  * self._record_etas_names += ['sx'+str(eta),
57519  * 'sy'+str(eta),
57520  * 'sz'+str(eta)] # <<<<<<<<<<<<<<
57521  *
57522  * def _recordH5(self):
57523  */
57524  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2537, __pyx_L1_error)
57525  __Pyx_GOTREF(__pyx_t_1);
57526  __pyx_t_9 = PyNumber_Add(__pyx_n_s_sz, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2537, __pyx_L1_error)
57527  __Pyx_GOTREF(__pyx_t_9);
57528  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57529 
57530  /* "mbd/CouplingFSI.pyx":2535
57531  * for i in range(len(self._record_etas)):
57532  * eta = self._record_etas[i]
57533  * self._record_etas_names += ['sx'+str(eta), # <<<<<<<<<<<<<<
57534  * 'sy'+str(eta),
57535  * 'sz'+str(eta)]
57536  */
57537  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2535, __pyx_L1_error)
57538  __Pyx_GOTREF(__pyx_t_1);
57539  __Pyx_GIVEREF(__pyx_t_7);
57540  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
57541  __Pyx_GIVEREF(__pyx_t_8);
57542  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_8);
57543  __Pyx_GIVEREF(__pyx_t_9);
57544  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_9);
57545  __pyx_t_7 = 0;
57546  __pyx_t_8 = 0;
57547  __pyx_t_9 = 0;
57548  __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_self->_record_etas_names, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2535, __pyx_L1_error)
57549  __Pyx_GOTREF(__pyx_t_9);
57550  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57551  __Pyx_GIVEREF(__pyx_t_9);
57552  __Pyx_GOTREF(__pyx_v_self->_record_etas_names);
57553  __Pyx_DECREF(__pyx_v_self->_record_etas_names);
57554  __pyx_v_self->_record_etas_names = __pyx_t_9;
57555  __pyx_t_9 = 0;
57556  }
57557 
57558  /* "mbd/CouplingFSI.pyx":2530
57559  * self.name = name
57560  *
57561  * def recordStrainEta(self, double[:] etas): # <<<<<<<<<<<<<<
57562  * self._record_etas = etas
57563  * self._record_etas_names = []
57564  */
57565 
57566  /* function exit code */
57567  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
57568  goto __pyx_L0;
57569  __pyx_L1_error:;
57570  __Pyx_XDECREF(__pyx_t_1);
57571  __Pyx_XDECREF(__pyx_t_7);
57572  __Pyx_XDECREF(__pyx_t_8);
57573  __Pyx_XDECREF(__pyx_t_9);
57574  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.recordStrainEta", __pyx_clineno, __pyx_lineno, __pyx_filename);
57575  __pyx_r = NULL;
57576  __pyx_L0:;
57577  __PYX_XDEC_MEMVIEW(&__pyx_v_etas, 1);
57578  __Pyx_XDECREF(__pyx_v_eta);
57579  __Pyx_XGIVEREF(__pyx_r);
57580  __Pyx_TraceReturn(__pyx_r, 0);
57581  __Pyx_RefNannyFinishContext();
57582  return __pyx_r;
57583 }
57584 
57585 /* "mbd/CouplingFSI.pyx":2539
57586  * 'sz'+str(eta)]
57587  *
57588  * def _recordH5(self): # <<<<<<<<<<<<<<
57589  * Profiling.logEvent('recording h5 file of '+str(self.name))
57590  * tCount = self.tCount
57591  */
57592 
57593 /* Python wrapper */
57594 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_7_recordH5(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
57595 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_6_recordH5[] = "ProtChMoorings._recordH5(self)";
57596 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_7_recordH5 = {"_recordH5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_7_recordH5, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_6_recordH5};
57597 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_7_recordH5(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
57598  PyObject *__pyx_r = 0;
57599  __Pyx_RefNannyDeclarations
57600  __Pyx_RefNannySetupContext("_recordH5 (wrapper)", 0);
57601  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6_recordH5(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
57602 
57603  /* function exit code */
57604  __Pyx_RefNannyFinishContext();
57605  return __pyx_r;
57606 }
57607 
57608 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6_recordH5(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
57609  PyObject *__pyx_v_tCount = NULL;
57610  PyObject *__pyx_v_t = NULL;
57611  PyObject *__pyx_v_hdfFileName = NULL;
57612  PyObject *__pyx_v_f = NULL;
57613  PyObject *__pyx_v_pos = NULL;
57614  PyObject *__pyx_v_element_connection = NULL;
57615  PyObject *__pyx_v_dset = NULL;
57616  PyObject *__pyx_v_datav = NULL;
57617  PyObject *__pyx_v_i = NULL;
57618  PyObject *__pyx_v_eta = NULL;
57619  PyObject *__pyx_r = NULL;
57620  __Pyx_TraceDeclarations
57621  __Pyx_RefNannyDeclarations
57622  PyObject *__pyx_t_1 = NULL;
57623  PyObject *__pyx_t_2 = NULL;
57624  PyObject *__pyx_t_3 = NULL;
57625  PyObject *__pyx_t_4 = NULL;
57626  std::string __pyx_t_5;
57627  PyObject *__pyx_t_6 = NULL;
57628  int __pyx_t_7;
57629  PyObject *__pyx_t_8 = NULL;
57630  int __pyx_t_9;
57631  Py_ssize_t __pyx_t_10;
57632  PyObject *(*__pyx_t_11)(PyObject *);
57633  size_t __pyx_t_12;
57634  Py_ssize_t __pyx_t_13;
57635  Py_ssize_t __pyx_t_14;
57636  PyObject *__pyx_t_15 = NULL;
57637  int __pyx_lineno = 0;
57638  const char *__pyx_filename = NULL;
57639  int __pyx_clineno = 0;
57640  __Pyx_TraceFrameInit(__pyx_codeobj__150)
57641  __Pyx_RefNannySetupContext("_recordH5", 0);
57642  __Pyx_TraceCall("_recordH5", __pyx_f[0], 2539, 0, __PYX_ERR(0, 2539, __pyx_L1_error));
57643 
57644  /* "mbd/CouplingFSI.pyx":2540
57645  *
57646  * def _recordH5(self):
57647  * Profiling.logEvent('recording h5 file of '+str(self.name)) # <<<<<<<<<<<<<<
57648  * tCount = self.tCount
57649  * t = self.ProtChSystem.ChSystem.GetChTime()
57650  */
57651  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2540, __pyx_L1_error)
57652  __Pyx_GOTREF(__pyx_t_2);
57653  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2540, __pyx_L1_error)
57654  __Pyx_GOTREF(__pyx_t_3);
57655  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57656  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2540, __pyx_L1_error)
57657  __Pyx_GOTREF(__pyx_t_2);
57658  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2540, __pyx_L1_error)
57659  __Pyx_GOTREF(__pyx_t_4);
57660  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57661  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_recording_h5_file_of, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2540, __pyx_L1_error)
57662  __Pyx_GOTREF(__pyx_t_2);
57663  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
57664  __pyx_t_4 = NULL;
57665  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
57666  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
57667  if (likely(__pyx_t_4)) {
57668  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
57669  __Pyx_INCREF(__pyx_t_4);
57670  __Pyx_INCREF(function);
57671  __Pyx_DECREF_SET(__pyx_t_3, function);
57672  }
57673  }
57674  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
57675  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
57676  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57677  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2540, __pyx_L1_error)
57678  __Pyx_GOTREF(__pyx_t_1);
57679  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57680  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57681 
57682  /* "mbd/CouplingFSI.pyx":2541
57683  * def _recordH5(self):
57684  * Profiling.logEvent('recording h5 file of '+str(self.name))
57685  * tCount = self.tCount # <<<<<<<<<<<<<<
57686  * t = self.ProtChSystem.ChSystem.GetChTime()
57687  * self.hdfFileName = self.name
57688  */
57689  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2541, __pyx_L1_error)
57690  __Pyx_GOTREF(__pyx_t_1);
57691  __pyx_v_tCount = __pyx_t_1;
57692  __pyx_t_1 = 0;
57693 
57694  /* "mbd/CouplingFSI.pyx":2542
57695  * Profiling.logEvent('recording h5 file of '+str(self.name))
57696  * tCount = self.tCount
57697  * t = self.ProtChSystem.ChSystem.GetChTime() # <<<<<<<<<<<<<<
57698  * self.hdfFileName = self.name
57699  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
57700  */
57701  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2542, __pyx_L1_error)
57702  __Pyx_GOTREF(__pyx_t_3);
57703  __pyx_t_2 = NULL;
57704  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
57705  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
57706  if (likely(__pyx_t_2)) {
57707  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
57708  __Pyx_INCREF(__pyx_t_2);
57709  __Pyx_INCREF(function);
57710  __Pyx_DECREF_SET(__pyx_t_3, function);
57711  }
57712  }
57713  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
57714  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
57715  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2542, __pyx_L1_error)
57716  __Pyx_GOTREF(__pyx_t_1);
57717  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57718  __pyx_v_t = __pyx_t_1;
57719  __pyx_t_1 = 0;
57720 
57721  /* "mbd/CouplingFSI.pyx":2543
57722  * tCount = self.tCount
57723  * t = self.ProtChSystem.ChSystem.GetChTime()
57724  * self.hdfFileName = self.name # <<<<<<<<<<<<<<
57725  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
57726  * if tCount == 0:
57727  */
57728  __pyx_t_5 = __pyx_v_self->name;
57729  __pyx_v_self->hdfFileName = __pyx_t_5;
57730 
57731  /* "mbd/CouplingFSI.pyx":2544
57732  * t = self.ProtChSystem.ChSystem.GetChTime()
57733  * self.hdfFileName = self.name
57734  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5' # <<<<<<<<<<<<<<
57735  * if tCount == 0:
57736  * f = h5py.File(hdfFileName, 'w', libver='latest')
57737  */
57738  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2544, __pyx_L1_error)
57739  __Pyx_GOTREF(__pyx_t_3);
57740  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
57741  __Pyx_GOTREF(__pyx_t_2);
57742  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57743  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2544, __pyx_L1_error)
57744  __Pyx_GOTREF(__pyx_t_3);
57745  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57746  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
57747  __Pyx_GOTREF(__pyx_t_2);
57748  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logDir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2544, __pyx_L1_error)
57749  __Pyx_GOTREF(__pyx_t_4);
57750  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57751  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
57752  __Pyx_GOTREF(__pyx_t_2);
57753  __Pyx_GIVEREF(__pyx_t_4);
57754  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
57755  __Pyx_INCREF(__pyx_kp_s_utf_8);
57756  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
57757  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_utf_8);
57758  __pyx_t_4 = 0;
57759  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2544, __pyx_L1_error)
57760  __Pyx_GOTREF(__pyx_t_4);
57761  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57762  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
57763  __Pyx_GOTREF(__pyx_t_2);
57764  __pyx_t_6 = NULL;
57765  __pyx_t_7 = 0;
57766  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
57767  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
57768  if (likely(__pyx_t_6)) {
57769  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
57770  __Pyx_INCREF(__pyx_t_6);
57771  __Pyx_INCREF(function);
57772  __Pyx_DECREF_SET(__pyx_t_3, function);
57773  __pyx_t_7 = 1;
57774  }
57775  }
57776  #if CYTHON_FAST_PYCALL
57777  if (PyFunction_Check(__pyx_t_3)) {
57778  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_2};
57779  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2544, __pyx_L1_error)
57780  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
57781  __Pyx_GOTREF(__pyx_t_1);
57782  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
57783  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57784  } else
57785  #endif
57786  #if CYTHON_FAST_PYCCALL
57787  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
57788  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_2};
57789  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2544, __pyx_L1_error)
57790  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
57791  __Pyx_GOTREF(__pyx_t_1);
57792  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
57793  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57794  } else
57795  #endif
57796  {
57797  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2544, __pyx_L1_error)
57798  __Pyx_GOTREF(__pyx_t_8);
57799  if (__pyx_t_6) {
57800  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
57801  }
57802  __Pyx_GIVEREF(__pyx_t_4);
57803  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
57804  __Pyx_GIVEREF(__pyx_t_2);
57805  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_2);
57806  __pyx_t_4 = 0;
57807  __pyx_t_2 = 0;
57808  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2544, __pyx_L1_error)
57809  __Pyx_GOTREF(__pyx_t_1);
57810  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57811  }
57812  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57813  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_b_h5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2544, __pyx_L1_error)
57814  __Pyx_GOTREF(__pyx_t_3);
57815  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57816  __pyx_v_hdfFileName = __pyx_t_3;
57817  __pyx_t_3 = 0;
57818 
57819  /* "mbd/CouplingFSI.pyx":2545
57820  * self.hdfFileName = self.name
57821  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
57822  * if tCount == 0: # <<<<<<<<<<<<<<
57823  * f = h5py.File(hdfFileName, 'w', libver='latest')
57824  * else:
57825  */
57826  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_tCount, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2545, __pyx_L1_error)
57827  __Pyx_GOTREF(__pyx_t_3);
57828  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2545, __pyx_L1_error)
57829  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57830  if (__pyx_t_9) {
57831 
57832  /* "mbd/CouplingFSI.pyx":2546
57833  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
57834  * if tCount == 0:
57835  * f = h5py.File(hdfFileName, 'w', libver='latest') # <<<<<<<<<<<<<<
57836  * else:
57837  * f = h5py.File(hdfFileName, 'a', libver='latest')
57838  */
57839  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_h5py); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2546, __pyx_L1_error)
57840  __Pyx_GOTREF(__pyx_t_3);
57841  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_File); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error)
57842  __Pyx_GOTREF(__pyx_t_1);
57843  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57844  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2546, __pyx_L1_error)
57845  __Pyx_GOTREF(__pyx_t_3);
57846  __Pyx_INCREF(__pyx_v_hdfFileName);
57847  __Pyx_GIVEREF(__pyx_v_hdfFileName);
57848  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_hdfFileName);
57849  __Pyx_INCREF(__pyx_n_s_w);
57850  __Pyx_GIVEREF(__pyx_n_s_w);
57851  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_w);
57852  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2546, __pyx_L1_error)
57853  __Pyx_GOTREF(__pyx_t_8);
57854  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_libver, __pyx_n_s_latest) < 0) __PYX_ERR(0, 2546, __pyx_L1_error)
57855  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2546, __pyx_L1_error)
57856  __Pyx_GOTREF(__pyx_t_2);
57857  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
57858  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57859  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57860  __pyx_v_f = __pyx_t_2;
57861  __pyx_t_2 = 0;
57862 
57863  /* "mbd/CouplingFSI.pyx":2545
57864  * self.hdfFileName = self.name
57865  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
57866  * if tCount == 0: # <<<<<<<<<<<<<<
57867  * f = h5py.File(hdfFileName, 'w', libver='latest')
57868  * else:
57869  */
57870  goto __pyx_L3;
57871  }
57872 
57873  /* "mbd/CouplingFSI.pyx":2548
57874  * f = h5py.File(hdfFileName, 'w', libver='latest')
57875  * else:
57876  * f = h5py.File(hdfFileName, 'a', libver='latest') # <<<<<<<<<<<<<<
57877  * pos = self.getNodesPosition()
57878  * element_connection = np.array([[i, i+1] for i in range(len(pos)-1)])
57879  */
57880  /*else*/ {
57881  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_h5py); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2548, __pyx_L1_error)
57882  __Pyx_GOTREF(__pyx_t_2);
57883  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_File); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2548, __pyx_L1_error)
57884  __Pyx_GOTREF(__pyx_t_8);
57885  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57886  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2548, __pyx_L1_error)
57887  __Pyx_GOTREF(__pyx_t_2);
57888  __Pyx_INCREF(__pyx_v_hdfFileName);
57889  __Pyx_GIVEREF(__pyx_v_hdfFileName);
57890  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_hdfFileName);
57891  __Pyx_INCREF(__pyx_n_s_a);
57892  __Pyx_GIVEREF(__pyx_n_s_a);
57893  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_a);
57894  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2548, __pyx_L1_error)
57895  __Pyx_GOTREF(__pyx_t_3);
57896  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_libver, __pyx_n_s_latest) < 0) __PYX_ERR(0, 2548, __pyx_L1_error)
57897  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2548, __pyx_L1_error)
57898  __Pyx_GOTREF(__pyx_t_1);
57899  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57900  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
57901  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57902  __pyx_v_f = __pyx_t_1;
57903  __pyx_t_1 = 0;
57904  }
57905  __pyx_L3:;
57906 
57907  /* "mbd/CouplingFSI.pyx":2549
57908  * else:
57909  * f = h5py.File(hdfFileName, 'a', libver='latest')
57910  * pos = self.getNodesPosition() # <<<<<<<<<<<<<<
57911  * element_connection = np.array([[i, i+1] for i in range(len(pos)-1)])
57912  * dset = f.create_dataset('nodesSpatial_Domain'+str(tCount), pos.shape)
57913  */
57914  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getNodesPosition); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2549, __pyx_L1_error)
57915  __Pyx_GOTREF(__pyx_t_3);
57916  __pyx_t_2 = NULL;
57917  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
57918  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
57919  if (likely(__pyx_t_2)) {
57920  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
57921  __Pyx_INCREF(__pyx_t_2);
57922  __Pyx_INCREF(function);
57923  __Pyx_DECREF_SET(__pyx_t_3, function);
57924  }
57925  }
57926  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
57927  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
57928  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2549, __pyx_L1_error)
57929  __Pyx_GOTREF(__pyx_t_1);
57930  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57931  __pyx_v_pos = __pyx_t_1;
57932  __pyx_t_1 = 0;
57933 
57934  /* "mbd/CouplingFSI.pyx":2550
57935  * f = h5py.File(hdfFileName, 'a', libver='latest')
57936  * pos = self.getNodesPosition()
57937  * element_connection = np.array([[i, i+1] for i in range(len(pos)-1)]) # <<<<<<<<<<<<<<
57938  * dset = f.create_dataset('nodesSpatial_Domain'+str(tCount), pos.shape)
57939  * dset[...] = pos
57940  */
57941  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2550, __pyx_L1_error)
57942  __Pyx_GOTREF(__pyx_t_3);
57943  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2550, __pyx_L1_error)
57944  __Pyx_GOTREF(__pyx_t_2);
57945  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
57946  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2550, __pyx_L1_error)
57947  __Pyx_GOTREF(__pyx_t_3);
57948  __pyx_t_10 = PyObject_Length(__pyx_v_pos); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2550, __pyx_L1_error)
57949  __pyx_t_8 = PyInt_FromSsize_t((__pyx_t_10 - 1)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2550, __pyx_L1_error)
57950  __Pyx_GOTREF(__pyx_t_8);
57951  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error)
57952  __Pyx_GOTREF(__pyx_t_4);
57953  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
57954  if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
57955  __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_10 = 0;
57956  __pyx_t_11 = NULL;
57957  } else {
57958  __pyx_t_10 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2550, __pyx_L1_error)
57959  __Pyx_GOTREF(__pyx_t_8);
57960  __pyx_t_11 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2550, __pyx_L1_error)
57961  }
57962  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
57963  for (;;) {
57964  if (likely(!__pyx_t_11)) {
57965  if (likely(PyList_CheckExact(__pyx_t_8))) {
57966  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_8)) break;
57967  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
57968  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2550, __pyx_L1_error)
57969  #else
57970  __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error)
57971  __Pyx_GOTREF(__pyx_t_4);
57972  #endif
57973  } else {
57974  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
57975  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
57976  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_10); __Pyx_INCREF(__pyx_t_4); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2550, __pyx_L1_error)
57977  #else
57978  __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error)
57979  __Pyx_GOTREF(__pyx_t_4);
57980  #endif
57981  }
57982  } else {
57983  __pyx_t_4 = __pyx_t_11(__pyx_t_8);
57984  if (unlikely(!__pyx_t_4)) {
57985  PyObject* exc_type = PyErr_Occurred();
57986  if (exc_type) {
57987  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
57988  else __PYX_ERR(0, 2550, __pyx_L1_error)
57989  }
57990  break;
57991  }
57992  __Pyx_GOTREF(__pyx_t_4);
57993  }
57994  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
57995  __pyx_t_4 = 0;
57996  __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2550, __pyx_L1_error)
57997  __Pyx_GOTREF(__pyx_t_4);
57998  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2550, __pyx_L1_error)
57999  __Pyx_GOTREF(__pyx_t_6);
58000  __Pyx_INCREF(__pyx_v_i);
58001  __Pyx_GIVEREF(__pyx_v_i);
58002  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_v_i);
58003  __Pyx_GIVEREF(__pyx_t_4);
58004  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
58005  __pyx_t_4 = 0;
58006  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 2550, __pyx_L1_error)
58007  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58008  }
58009  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58010  __pyx_t_8 = NULL;
58011  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
58012  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
58013  if (likely(__pyx_t_8)) {
58014  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
58015  __Pyx_INCREF(__pyx_t_8);
58016  __Pyx_INCREF(function);
58017  __Pyx_DECREF_SET(__pyx_t_2, function);
58018  }
58019  }
58020  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
58021  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
58022  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58023  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2550, __pyx_L1_error)
58024  __Pyx_GOTREF(__pyx_t_1);
58025  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58026  __pyx_v_element_connection = __pyx_t_1;
58027  __pyx_t_1 = 0;
58028 
58029  /* "mbd/CouplingFSI.pyx":2551
58030  * pos = self.getNodesPosition()
58031  * element_connection = np.array([[i, i+1] for i in range(len(pos)-1)])
58032  * dset = f.create_dataset('nodesSpatial_Domain'+str(tCount), pos.shape) # <<<<<<<<<<<<<<
58033  * dset[...] = pos
58034  * dset = f.create_dataset('elementsSpatial_Domain'+str(tCount), element_connection.shape, dtype='i8')
58035  */
58036  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2551, __pyx_L1_error)
58037  __Pyx_GOTREF(__pyx_t_2);
58038  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2551, __pyx_L1_error)
58039  __Pyx_GOTREF(__pyx_t_3);
58040  __pyx_t_8 = PyNumber_Add(__pyx_n_s_nodesSpatial_Domain, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2551, __pyx_L1_error)
58041  __Pyx_GOTREF(__pyx_t_8);
58042  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58043  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pos, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2551, __pyx_L1_error)
58044  __Pyx_GOTREF(__pyx_t_3);
58045  __pyx_t_6 = NULL;
58046  __pyx_t_7 = 0;
58047  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
58048  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
58049  if (likely(__pyx_t_6)) {
58050  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
58051  __Pyx_INCREF(__pyx_t_6);
58052  __Pyx_INCREF(function);
58053  __Pyx_DECREF_SET(__pyx_t_2, function);
58054  __pyx_t_7 = 1;
58055  }
58056  }
58057  #if CYTHON_FAST_PYCALL
58058  if (PyFunction_Check(__pyx_t_2)) {
58059  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_3};
58060  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __pyx_L1_error)
58061  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58062  __Pyx_GOTREF(__pyx_t_1);
58063  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58064  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58065  } else
58066  #endif
58067  #if CYTHON_FAST_PYCCALL
58068  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
58069  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_3};
58070  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __pyx_L1_error)
58071  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58072  __Pyx_GOTREF(__pyx_t_1);
58073  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58074  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58075  } else
58076  #endif
58077  {
58078  __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2551, __pyx_L1_error)
58079  __Pyx_GOTREF(__pyx_t_4);
58080  if (__pyx_t_6) {
58081  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
58082  }
58083  __Pyx_GIVEREF(__pyx_t_8);
58084  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_t_8);
58085  __Pyx_GIVEREF(__pyx_t_3);
58086  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_3);
58087  __pyx_t_8 = 0;
58088  __pyx_t_3 = 0;
58089  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2551, __pyx_L1_error)
58090  __Pyx_GOTREF(__pyx_t_1);
58091  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
58092  }
58093  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58094  __pyx_v_dset = __pyx_t_1;
58095  __pyx_t_1 = 0;
58096 
58097  /* "mbd/CouplingFSI.pyx":2552
58098  * element_connection = np.array([[i, i+1] for i in range(len(pos)-1)])
58099  * dset = f.create_dataset('nodesSpatial_Domain'+str(tCount), pos.shape)
58100  * dset[...] = pos # <<<<<<<<<<<<<<
58101  * dset = f.create_dataset('elementsSpatial_Domain'+str(tCount), element_connection.shape, dtype='i8')
58102  * dset[...] = element_connection
58103  */
58104  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_pos) < 0)) __PYX_ERR(0, 2552, __pyx_L1_error)
58105 
58106  /* "mbd/CouplingFSI.pyx":2553
58107  * dset = f.create_dataset('nodesSpatial_Domain'+str(tCount), pos.shape)
58108  * dset[...] = pos
58109  * dset = f.create_dataset('elementsSpatial_Domain'+str(tCount), element_connection.shape, dtype='i8') # <<<<<<<<<<<<<<
58110  * dset[...] = element_connection
58111  * # time
58112  */
58113  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
58114  __Pyx_GOTREF(__pyx_t_1);
58115  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
58116  __Pyx_GOTREF(__pyx_t_2);
58117  __pyx_t_4 = PyNumber_Add(__pyx_n_s_elementsSpatial_Domain, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2553, __pyx_L1_error)
58118  __Pyx_GOTREF(__pyx_t_4);
58119  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58120  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_element_connection, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
58121  __Pyx_GOTREF(__pyx_t_2);
58122  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2553, __pyx_L1_error)
58123  __Pyx_GOTREF(__pyx_t_3);
58124  __Pyx_GIVEREF(__pyx_t_4);
58125  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
58126  __Pyx_GIVEREF(__pyx_t_2);
58127  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
58128  __pyx_t_4 = 0;
58129  __pyx_t_2 = 0;
58130  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
58131  __Pyx_GOTREF(__pyx_t_2);
58132  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_n_s_i8) < 0) __PYX_ERR(0, 2553, __pyx_L1_error)
58133  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2553, __pyx_L1_error)
58134  __Pyx_GOTREF(__pyx_t_4);
58135  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58136  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58137  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58138  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
58139  __pyx_t_4 = 0;
58140 
58141  /* "mbd/CouplingFSI.pyx":2554
58142  * dset[...] = pos
58143  * dset = f.create_dataset('elementsSpatial_Domain'+str(tCount), element_connection.shape, dtype='i8')
58144  * dset[...] = element_connection # <<<<<<<<<<<<<<
58145  * # time
58146  * datav = t
58147  */
58148  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_element_connection) < 0)) __PYX_ERR(0, 2554, __pyx_L1_error)
58149 
58150  /* "mbd/CouplingFSI.pyx":2556
58151  * dset[...] = element_connection
58152  * # time
58153  * datav = t # <<<<<<<<<<<<<<
58154  * dset = f.create_dataset('t_t'+str(tCount), (1,))
58155  * dset[0] = t
58156  */
58157  __Pyx_INCREF(__pyx_v_t);
58158  __pyx_v_datav = __pyx_v_t;
58159 
58160  /* "mbd/CouplingFSI.pyx":2557
58161  * # time
58162  * datav = t
58163  * dset = f.create_dataset('t_t'+str(tCount), (1,)) # <<<<<<<<<<<<<<
58164  * dset[0] = t
58165  * # strain
58166  */
58167  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
58168  __Pyx_GOTREF(__pyx_t_2);
58169  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2557, __pyx_L1_error)
58170  __Pyx_GOTREF(__pyx_t_3);
58171  __pyx_t_1 = PyNumber_Add(__pyx_n_s_t_t, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2557, __pyx_L1_error)
58172  __Pyx_GOTREF(__pyx_t_1);
58173  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58174  __pyx_t_3 = NULL;
58175  __pyx_t_7 = 0;
58176  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
58177  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
58178  if (likely(__pyx_t_3)) {
58179  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
58180  __Pyx_INCREF(__pyx_t_3);
58181  __Pyx_INCREF(function);
58182  __Pyx_DECREF_SET(__pyx_t_2, function);
58183  __pyx_t_7 = 1;
58184  }
58185  }
58186  #if CYTHON_FAST_PYCALL
58187  if (PyFunction_Check(__pyx_t_2)) {
58188  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_1, __pyx_tuple__91};
58189  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error)
58190  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
58191  __Pyx_GOTREF(__pyx_t_4);
58192  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58193  } else
58194  #endif
58195  #if CYTHON_FAST_PYCCALL
58196  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
58197  PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_1, __pyx_tuple__91};
58198  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error)
58199  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
58200  __Pyx_GOTREF(__pyx_t_4);
58201  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58202  } else
58203  #endif
58204  {
58205  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2557, __pyx_L1_error)
58206  __Pyx_GOTREF(__pyx_t_8);
58207  if (__pyx_t_3) {
58208  __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); __pyx_t_3 = NULL;
58209  }
58210  __Pyx_GIVEREF(__pyx_t_1);
58211  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
58212  __Pyx_INCREF(__pyx_tuple__91);
58213  __Pyx_GIVEREF(__pyx_tuple__91);
58214  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_tuple__91);
58215  __pyx_t_1 = 0;
58216  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error)
58217  __Pyx_GOTREF(__pyx_t_4);
58218  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58219  }
58220  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58221  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
58222  __pyx_t_4 = 0;
58223 
58224  /* "mbd/CouplingFSI.pyx":2558
58225  * datav = t
58226  * dset = f.create_dataset('t_t'+str(tCount), (1,))
58227  * dset[0] = t # <<<<<<<<<<<<<<
58228  * # strain
58229  * for i in range(len(self._record_etas)):
58230  */
58231  if (unlikely(__Pyx_SetItemInt(__pyx_v_dset, 0, __pyx_v_t, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 2558, __pyx_L1_error)
58232 
58233  /* "mbd/CouplingFSI.pyx":2560
58234  * dset[0] = t
58235  * # strain
58236  * for i in range(len(self._record_etas)): # <<<<<<<<<<<<<<
58237  * eta = self._record_etas[i]
58238  * datav = np.append(self.getNodesTension(eta=eta), np.array([[0.,0.,0.]]), axis=0)
58239  */
58240  if (unlikely(!__pyx_v_self->_record_etas.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2560, __pyx_L1_error)}
58241  __pyx_t_12 = __Pyx_MemoryView_Len(__pyx_v_self->_record_etas);
58242  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error)
58243  __Pyx_GOTREF(__pyx_t_4);
58244  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2560, __pyx_L1_error)
58245  __Pyx_GOTREF(__pyx_t_2);
58246  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
58247  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
58248  __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_10 = 0;
58249  __pyx_t_11 = NULL;
58250  } else {
58251  __pyx_t_10 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error)
58252  __Pyx_GOTREF(__pyx_t_4);
58253  __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2560, __pyx_L1_error)
58254  }
58255  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58256  for (;;) {
58257  if (likely(!__pyx_t_11)) {
58258  if (likely(PyList_CheckExact(__pyx_t_4))) {
58259  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_4)) break;
58260  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
58261  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2560, __pyx_L1_error)
58262  #else
58263  __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2560, __pyx_L1_error)
58264  __Pyx_GOTREF(__pyx_t_2);
58265  #endif
58266  } else {
58267  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
58268  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
58269  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 2560, __pyx_L1_error)
58270  #else
58271  __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2560, __pyx_L1_error)
58272  __Pyx_GOTREF(__pyx_t_2);
58273  #endif
58274  }
58275  } else {
58276  __pyx_t_2 = __pyx_t_11(__pyx_t_4);
58277  if (unlikely(!__pyx_t_2)) {
58278  PyObject* exc_type = PyErr_Occurred();
58279  if (exc_type) {
58280  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
58281  else __PYX_ERR(0, 2560, __pyx_L1_error)
58282  }
58283  break;
58284  }
58285  __Pyx_GOTREF(__pyx_t_2);
58286  }
58287  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
58288  __pyx_t_2 = 0;
58289 
58290  /* "mbd/CouplingFSI.pyx":2561
58291  * # strain
58292  * for i in range(len(self._record_etas)):
58293  * eta = self._record_etas[i] # <<<<<<<<<<<<<<
58294  * datav = np.append(self.getNodesTension(eta=eta), np.array([[0.,0.,0.]]), axis=0)
58295  * dset = f.create_dataset('tensions'+str(eta)+'_t'+str(tCount), datav.shape)
58296  */
58297  if (unlikely(!__pyx_v_self->_record_etas.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 2561, __pyx_L1_error)}
58298  __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2561, __pyx_L1_error)
58299  __pyx_t_14 = __pyx_t_13;
58300  __pyx_t_7 = -1;
58301  if (__pyx_t_14 < 0) {
58302  __pyx_t_14 += __pyx_v_self->_record_etas.shape[0];
58303  if (unlikely(__pyx_t_14 < 0)) __pyx_t_7 = 0;
58304  } else if (unlikely(__pyx_t_14 >= __pyx_v_self->_record_etas.shape[0])) __pyx_t_7 = 0;
58305  if (unlikely(__pyx_t_7 != -1)) {
58306  __Pyx_RaiseBufferIndexError(__pyx_t_7);
58307  __PYX_ERR(0, 2561, __pyx_L1_error)
58308  }
58309  __pyx_t_2 = PyFloat_FromDouble((*((double *) ( /* dim=0 */ (__pyx_v_self->_record_etas.data + __pyx_t_14 * __pyx_v_self->_record_etas.strides[0]) )))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2561, __pyx_L1_error)
58310  __Pyx_GOTREF(__pyx_t_2);
58311  __Pyx_XDECREF_SET(__pyx_v_eta, __pyx_t_2);
58312  __pyx_t_2 = 0;
58313 
58314  /* "mbd/CouplingFSI.pyx":2562
58315  * for i in range(len(self._record_etas)):
58316  * eta = self._record_etas[i]
58317  * datav = np.append(self.getNodesTension(eta=eta), np.array([[0.,0.,0.]]), axis=0) # <<<<<<<<<<<<<<
58318  * dset = f.create_dataset('tensions'+str(eta)+'_t'+str(tCount), datav.shape)
58319  * dset[...] = datav
58320  */
58321  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2562, __pyx_L1_error)
58322  __Pyx_GOTREF(__pyx_t_2);
58323  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_append); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2562, __pyx_L1_error)
58324  __Pyx_GOTREF(__pyx_t_8);
58325  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58326  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getNodesTension); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2562, __pyx_L1_error)
58327  __Pyx_GOTREF(__pyx_t_2);
58328  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2562, __pyx_L1_error)
58329  __Pyx_GOTREF(__pyx_t_1);
58330  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_eta, __pyx_v_eta) < 0) __PYX_ERR(0, 2562, __pyx_L1_error)
58331  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2562, __pyx_L1_error)
58332  __Pyx_GOTREF(__pyx_t_3);
58333  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58334  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58335  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2562, __pyx_L1_error)
58336  __Pyx_GOTREF(__pyx_t_2);
58337  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2562, __pyx_L1_error)
58338  __Pyx_GOTREF(__pyx_t_6);
58339  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58340  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2562, __pyx_L1_error)
58341  __Pyx_GOTREF(__pyx_t_2);
58342  __Pyx_INCREF(__pyx_float_0_);
58343  __Pyx_GIVEREF(__pyx_float_0_);
58344  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_float_0_);
58345  __Pyx_INCREF(__pyx_float_0_);
58346  __Pyx_GIVEREF(__pyx_float_0_);
58347  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_float_0_);
58348  __Pyx_INCREF(__pyx_float_0_);
58349  __Pyx_GIVEREF(__pyx_float_0_);
58350  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_float_0_);
58351  __pyx_t_15 = PyList_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2562, __pyx_L1_error)
58352  __Pyx_GOTREF(__pyx_t_15);
58353  __Pyx_GIVEREF(__pyx_t_2);
58354  PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_2);
58355  __pyx_t_2 = 0;
58356  __pyx_t_2 = NULL;
58357  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
58358  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
58359  if (likely(__pyx_t_2)) {
58360  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
58361  __Pyx_INCREF(__pyx_t_2);
58362  __Pyx_INCREF(function);
58363  __Pyx_DECREF_SET(__pyx_t_6, function);
58364  }
58365  }
58366  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_2, __pyx_t_15) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_15);
58367  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
58368  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58369  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2562, __pyx_L1_error)
58370  __Pyx_GOTREF(__pyx_t_1);
58371  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58372  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2562, __pyx_L1_error)
58373  __Pyx_GOTREF(__pyx_t_6);
58374  __Pyx_GIVEREF(__pyx_t_3);
58375  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
58376  __Pyx_GIVEREF(__pyx_t_1);
58377  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
58378  __pyx_t_3 = 0;
58379  __pyx_t_1 = 0;
58380  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2562, __pyx_L1_error)
58381  __Pyx_GOTREF(__pyx_t_1);
58382  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 2562, __pyx_L1_error)
58383  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2562, __pyx_L1_error)
58384  __Pyx_GOTREF(__pyx_t_3);
58385  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58386  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58387  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58388  __Pyx_DECREF_SET(__pyx_v_datav, __pyx_t_3);
58389  __pyx_t_3 = 0;
58390 
58391  /* "mbd/CouplingFSI.pyx":2563
58392  * eta = self._record_etas[i]
58393  * datav = np.append(self.getNodesTension(eta=eta), np.array([[0.,0.,0.]]), axis=0)
58394  * dset = f.create_dataset('tensions'+str(eta)+'_t'+str(tCount), datav.shape) # <<<<<<<<<<<<<<
58395  * dset[...] = datav
58396  * dset = f.create_dataset('sx'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58397  */
58398  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2563, __pyx_L1_error)
58399  __Pyx_GOTREF(__pyx_t_1);
58400  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2563, __pyx_L1_error)
58401  __Pyx_GOTREF(__pyx_t_6);
58402  __pyx_t_8 = PyNumber_Add(__pyx_n_s_tensions, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2563, __pyx_L1_error)
58403  __Pyx_GOTREF(__pyx_t_8);
58404  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58405  __pyx_t_6 = PyNumber_Add(__pyx_t_8, __pyx_n_s_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2563, __pyx_L1_error)
58406  __Pyx_GOTREF(__pyx_t_6);
58407  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58408  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2563, __pyx_L1_error)
58409  __Pyx_GOTREF(__pyx_t_8);
58410  __pyx_t_15 = PyNumber_Add(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2563, __pyx_L1_error)
58411  __Pyx_GOTREF(__pyx_t_15);
58412  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58413  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58414  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2563, __pyx_L1_error)
58415  __Pyx_GOTREF(__pyx_t_8);
58416  __pyx_t_6 = NULL;
58417  __pyx_t_7 = 0;
58418  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
58419  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
58420  if (likely(__pyx_t_6)) {
58421  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
58422  __Pyx_INCREF(__pyx_t_6);
58423  __Pyx_INCREF(function);
58424  __Pyx_DECREF_SET(__pyx_t_1, function);
58425  __pyx_t_7 = 1;
58426  }
58427  }
58428  #if CYTHON_FAST_PYCALL
58429  if (PyFunction_Check(__pyx_t_1)) {
58430  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_t_8};
58431  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
58432  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58433  __Pyx_GOTREF(__pyx_t_3);
58434  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58435  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58436  } else
58437  #endif
58438  #if CYTHON_FAST_PYCCALL
58439  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
58440  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_t_8};
58441  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
58442  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58443  __Pyx_GOTREF(__pyx_t_3);
58444  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58445  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58446  } else
58447  #endif
58448  {
58449  __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2563, __pyx_L1_error)
58450  __Pyx_GOTREF(__pyx_t_2);
58451  if (__pyx_t_6) {
58452  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
58453  }
58454  __Pyx_GIVEREF(__pyx_t_15);
58455  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_15);
58456  __Pyx_GIVEREF(__pyx_t_8);
58457  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_8);
58458  __pyx_t_15 = 0;
58459  __pyx_t_8 = 0;
58460  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2563, __pyx_L1_error)
58461  __Pyx_GOTREF(__pyx_t_3);
58462  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58463  }
58464  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58465  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_3);
58466  __pyx_t_3 = 0;
58467 
58468  /* "mbd/CouplingFSI.pyx":2564
58469  * datav = np.append(self.getNodesTension(eta=eta), np.array([[0.,0.,0.]]), axis=0)
58470  * dset = f.create_dataset('tensions'+str(eta)+'_t'+str(tCount), datav.shape)
58471  * dset[...] = datav # <<<<<<<<<<<<<<
58472  * dset = f.create_dataset('sx'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58473  * dset[...] = datav[:,0]
58474  */
58475  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2564, __pyx_L1_error)
58476 
58477  /* "mbd/CouplingFSI.pyx":2565
58478  * dset = f.create_dataset('tensions'+str(eta)+'_t'+str(tCount), datav.shape)
58479  * dset[...] = datav
58480  * dset = f.create_dataset('sx'+str(eta)+'_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
58481  * dset[...] = datav[:,0]
58482  * dset = f.create_dataset('sy'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58483  */
58484  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2565, __pyx_L1_error)
58485  __Pyx_GOTREF(__pyx_t_1);
58486  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2565, __pyx_L1_error)
58487  __Pyx_GOTREF(__pyx_t_2);
58488  __pyx_t_8 = PyNumber_Add(__pyx_n_s_sx, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2565, __pyx_L1_error)
58489  __Pyx_GOTREF(__pyx_t_8);
58490  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58491  __pyx_t_2 = PyNumber_Add(__pyx_t_8, __pyx_n_s_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2565, __pyx_L1_error)
58492  __Pyx_GOTREF(__pyx_t_2);
58493  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58494  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2565, __pyx_L1_error)
58495  __Pyx_GOTREF(__pyx_t_8);
58496  __pyx_t_15 = PyNumber_Add(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2565, __pyx_L1_error)
58497  __Pyx_GOTREF(__pyx_t_15);
58498  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58499  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58500  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2565, __pyx_L1_error)
58501  __Pyx_GOTREF(__pyx_t_8);
58502  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2565, __pyx_L1_error)
58503  __Pyx_GOTREF(__pyx_t_2);
58504  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58505  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2565, __pyx_L1_error)
58506  __Pyx_GOTREF(__pyx_t_8);
58507  __Pyx_GIVEREF(__pyx_t_2);
58508  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
58509  __pyx_t_2 = 0;
58510  __pyx_t_2 = NULL;
58511  __pyx_t_7 = 0;
58512  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
58513  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
58514  if (likely(__pyx_t_2)) {
58515  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
58516  __Pyx_INCREF(__pyx_t_2);
58517  __Pyx_INCREF(function);
58518  __Pyx_DECREF_SET(__pyx_t_1, function);
58519  __pyx_t_7 = 1;
58520  }
58521  }
58522  #if CYTHON_FAST_PYCALL
58523  if (PyFunction_Check(__pyx_t_1)) {
58524  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_t_8};
58525  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2565, __pyx_L1_error)
58526  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
58527  __Pyx_GOTREF(__pyx_t_3);
58528  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58529  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58530  } else
58531  #endif
58532  #if CYTHON_FAST_PYCCALL
58533  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
58534  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_t_8};
58535  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2565, __pyx_L1_error)
58536  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
58537  __Pyx_GOTREF(__pyx_t_3);
58538  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58539  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58540  } else
58541  #endif
58542  {
58543  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2565, __pyx_L1_error)
58544  __Pyx_GOTREF(__pyx_t_6);
58545  if (__pyx_t_2) {
58546  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
58547  }
58548  __Pyx_GIVEREF(__pyx_t_15);
58549  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
58550  __Pyx_GIVEREF(__pyx_t_8);
58551  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
58552  __pyx_t_15 = 0;
58553  __pyx_t_8 = 0;
58554  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2565, __pyx_L1_error)
58555  __Pyx_GOTREF(__pyx_t_3);
58556  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58557  }
58558  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58559  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_3);
58560  __pyx_t_3 = 0;
58561 
58562  /* "mbd/CouplingFSI.pyx":2566
58563  * dset[...] = datav
58564  * dset = f.create_dataset('sx'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58565  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
58566  * dset = f.create_dataset('sy'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58567  * dset[...] = datav[:,1]
58568  */
58569  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__151); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2566, __pyx_L1_error)
58570  __Pyx_GOTREF(__pyx_t_3);
58571  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_3) < 0)) __PYX_ERR(0, 2566, __pyx_L1_error)
58572  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58573 
58574  /* "mbd/CouplingFSI.pyx":2567
58575  * dset = f.create_dataset('sx'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58576  * dset[...] = datav[:,0]
58577  * dset = f.create_dataset('sy'+str(eta)+'_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
58578  * dset[...] = datav[:,1]
58579  * dset = f.create_dataset('sz'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58580  */
58581  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2567, __pyx_L1_error)
58582  __Pyx_GOTREF(__pyx_t_1);
58583  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2567, __pyx_L1_error)
58584  __Pyx_GOTREF(__pyx_t_6);
58585  __pyx_t_8 = PyNumber_Add(__pyx_n_s_sy, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2567, __pyx_L1_error)
58586  __Pyx_GOTREF(__pyx_t_8);
58587  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58588  __pyx_t_6 = PyNumber_Add(__pyx_t_8, __pyx_n_s_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2567, __pyx_L1_error)
58589  __Pyx_GOTREF(__pyx_t_6);
58590  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58591  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2567, __pyx_L1_error)
58592  __Pyx_GOTREF(__pyx_t_8);
58593  __pyx_t_15 = PyNumber_Add(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2567, __pyx_L1_error)
58594  __Pyx_GOTREF(__pyx_t_15);
58595  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58596  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58597  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2567, __pyx_L1_error)
58598  __Pyx_GOTREF(__pyx_t_8);
58599  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2567, __pyx_L1_error)
58600  __Pyx_GOTREF(__pyx_t_6);
58601  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58602  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2567, __pyx_L1_error)
58603  __Pyx_GOTREF(__pyx_t_8);
58604  __Pyx_GIVEREF(__pyx_t_6);
58605  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
58606  __pyx_t_6 = 0;
58607  __pyx_t_6 = NULL;
58608  __pyx_t_7 = 0;
58609  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
58610  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
58611  if (likely(__pyx_t_6)) {
58612  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
58613  __Pyx_INCREF(__pyx_t_6);
58614  __Pyx_INCREF(function);
58615  __Pyx_DECREF_SET(__pyx_t_1, function);
58616  __pyx_t_7 = 1;
58617  }
58618  }
58619  #if CYTHON_FAST_PYCALL
58620  if (PyFunction_Check(__pyx_t_1)) {
58621  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_t_8};
58622  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2567, __pyx_L1_error)
58623  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58624  __Pyx_GOTREF(__pyx_t_3);
58625  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58626  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58627  } else
58628  #endif
58629  #if CYTHON_FAST_PYCCALL
58630  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
58631  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_15, __pyx_t_8};
58632  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2567, __pyx_L1_error)
58633  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58634  __Pyx_GOTREF(__pyx_t_3);
58635  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58636  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58637  } else
58638  #endif
58639  {
58640  __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2567, __pyx_L1_error)
58641  __Pyx_GOTREF(__pyx_t_2);
58642  if (__pyx_t_6) {
58643  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
58644  }
58645  __Pyx_GIVEREF(__pyx_t_15);
58646  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_15);
58647  __Pyx_GIVEREF(__pyx_t_8);
58648  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_t_8);
58649  __pyx_t_15 = 0;
58650  __pyx_t_8 = 0;
58651  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2567, __pyx_L1_error)
58652  __Pyx_GOTREF(__pyx_t_3);
58653  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58654  }
58655  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58656  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_3);
58657  __pyx_t_3 = 0;
58658 
58659  /* "mbd/CouplingFSI.pyx":2568
58660  * dset[...] = datav[:,0]
58661  * dset = f.create_dataset('sy'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58662  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
58663  * dset = f.create_dataset('sz'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58664  * dset[...] = datav[:,2]
58665  */
58666  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__152); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2568, __pyx_L1_error)
58667  __Pyx_GOTREF(__pyx_t_3);
58668  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_3) < 0)) __PYX_ERR(0, 2568, __pyx_L1_error)
58669  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58670 
58671  /* "mbd/CouplingFSI.pyx":2569
58672  * dset = f.create_dataset('sy'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58673  * dset[...] = datav[:,1]
58674  * dset = f.create_dataset('sz'+str(eta)+'_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
58675  * dset[...] = datav[:,2]
58676  * # velocity
58677  */
58678  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
58679  __Pyx_GOTREF(__pyx_t_1);
58680  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_eta); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2569, __pyx_L1_error)
58681  __Pyx_GOTREF(__pyx_t_2);
58682  __pyx_t_8 = PyNumber_Add(__pyx_n_s_sz, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2569, __pyx_L1_error)
58683  __Pyx_GOTREF(__pyx_t_8);
58684  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58685  __pyx_t_2 = PyNumber_Add(__pyx_t_8, __pyx_n_s_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2569, __pyx_L1_error)
58686  __Pyx_GOTREF(__pyx_t_2);
58687  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58688  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2569, __pyx_L1_error)
58689  __Pyx_GOTREF(__pyx_t_8);
58690  __pyx_t_15 = PyNumber_Add(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2569, __pyx_L1_error)
58691  __Pyx_GOTREF(__pyx_t_15);
58692  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
58693  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58694  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2569, __pyx_L1_error)
58695  __Pyx_GOTREF(__pyx_t_8);
58696  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2569, __pyx_L1_error)
58697  __Pyx_GOTREF(__pyx_t_2);
58698  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58699  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2569, __pyx_L1_error)
58700  __Pyx_GOTREF(__pyx_t_8);
58701  __Pyx_GIVEREF(__pyx_t_2);
58702  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
58703  __pyx_t_2 = 0;
58704  __pyx_t_2 = NULL;
58705  __pyx_t_7 = 0;
58706  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
58707  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
58708  if (likely(__pyx_t_2)) {
58709  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
58710  __Pyx_INCREF(__pyx_t_2);
58711  __Pyx_INCREF(function);
58712  __Pyx_DECREF_SET(__pyx_t_1, function);
58713  __pyx_t_7 = 1;
58714  }
58715  }
58716  #if CYTHON_FAST_PYCALL
58717  if (PyFunction_Check(__pyx_t_1)) {
58718  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_t_8};
58719  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2569, __pyx_L1_error)
58720  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
58721  __Pyx_GOTREF(__pyx_t_3);
58722  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58723  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58724  } else
58725  #endif
58726  #if CYTHON_FAST_PYCCALL
58727  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
58728  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_15, __pyx_t_8};
58729  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2569, __pyx_L1_error)
58730  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
58731  __Pyx_GOTREF(__pyx_t_3);
58732  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58733  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58734  } else
58735  #endif
58736  {
58737  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2569, __pyx_L1_error)
58738  __Pyx_GOTREF(__pyx_t_6);
58739  if (__pyx_t_2) {
58740  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
58741  }
58742  __Pyx_GIVEREF(__pyx_t_15);
58743  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
58744  __Pyx_GIVEREF(__pyx_t_8);
58745  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
58746  __pyx_t_15 = 0;
58747  __pyx_t_8 = 0;
58748  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2569, __pyx_L1_error)
58749  __Pyx_GOTREF(__pyx_t_3);
58750  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58751  }
58752  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58753  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_3);
58754  __pyx_t_3 = 0;
58755 
58756  /* "mbd/CouplingFSI.pyx":2570
58757  * dset[...] = datav[:,1]
58758  * dset = f.create_dataset('sz'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
58759  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
58760  * # velocity
58761  * datav = self.getNodesVelocity()
58762  */
58763  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__153); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2570, __pyx_L1_error)
58764  __Pyx_GOTREF(__pyx_t_3);
58765  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_3) < 0)) __PYX_ERR(0, 2570, __pyx_L1_error)
58766  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58767 
58768  /* "mbd/CouplingFSI.pyx":2560
58769  * dset[0] = t
58770  * # strain
58771  * for i in range(len(self._record_etas)): # <<<<<<<<<<<<<<
58772  * eta = self._record_etas[i]
58773  * datav = np.append(self.getNodesTension(eta=eta), np.array([[0.,0.,0.]]), axis=0)
58774  */
58775  }
58776  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
58777 
58778  /* "mbd/CouplingFSI.pyx":2572
58779  * dset[...] = datav[:,2]
58780  * # velocity
58781  * datav = self.getNodesVelocity() # <<<<<<<<<<<<<<
58782  * dset = f.create_dataset('velocity_t'+str(tCount), datav.shape)
58783  * dset[...] = datav
58784  */
58785  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getNodesVelocity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2572, __pyx_L1_error)
58786  __Pyx_GOTREF(__pyx_t_3);
58787  __pyx_t_1 = NULL;
58788  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
58789  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
58790  if (likely(__pyx_t_1)) {
58791  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
58792  __Pyx_INCREF(__pyx_t_1);
58793  __Pyx_INCREF(function);
58794  __Pyx_DECREF_SET(__pyx_t_3, function);
58795  }
58796  }
58797  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
58798  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
58799  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2572, __pyx_L1_error)
58800  __Pyx_GOTREF(__pyx_t_4);
58801  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58802  __Pyx_DECREF_SET(__pyx_v_datav, __pyx_t_4);
58803  __pyx_t_4 = 0;
58804 
58805  /* "mbd/CouplingFSI.pyx":2573
58806  * # velocity
58807  * datav = self.getNodesVelocity()
58808  * dset = f.create_dataset('velocity_t'+str(tCount), datav.shape) # <<<<<<<<<<<<<<
58809  * dset[...] = datav
58810  * dset = f.create_dataset('ux_t'+str(tCount), (datav.shape[0],))
58811  */
58812  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2573, __pyx_L1_error)
58813  __Pyx_GOTREF(__pyx_t_3);
58814  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2573, __pyx_L1_error)
58815  __Pyx_GOTREF(__pyx_t_1);
58816  __pyx_t_6 = PyNumber_Add(__pyx_n_s_velocity_t, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2573, __pyx_L1_error)
58817  __Pyx_GOTREF(__pyx_t_6);
58818  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58819  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2573, __pyx_L1_error)
58820  __Pyx_GOTREF(__pyx_t_1);
58821  __pyx_t_8 = NULL;
58822  __pyx_t_7 = 0;
58823  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
58824  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
58825  if (likely(__pyx_t_8)) {
58826  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
58827  __Pyx_INCREF(__pyx_t_8);
58828  __Pyx_INCREF(function);
58829  __Pyx_DECREF_SET(__pyx_t_3, function);
58830  __pyx_t_7 = 1;
58831  }
58832  }
58833  #if CYTHON_FAST_PYCALL
58834  if (PyFunction_Check(__pyx_t_3)) {
58835  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
58836  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error)
58837  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
58838  __Pyx_GOTREF(__pyx_t_4);
58839  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58840  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58841  } else
58842  #endif
58843  #if CYTHON_FAST_PYCCALL
58844  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
58845  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
58846  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error)
58847  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
58848  __Pyx_GOTREF(__pyx_t_4);
58849  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
58850  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58851  } else
58852  #endif
58853  {
58854  __pyx_t_15 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2573, __pyx_L1_error)
58855  __Pyx_GOTREF(__pyx_t_15);
58856  if (__pyx_t_8) {
58857  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
58858  }
58859  __Pyx_GIVEREF(__pyx_t_6);
58860  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, __pyx_t_6);
58861  __Pyx_GIVEREF(__pyx_t_1);
58862  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_t_1);
58863  __pyx_t_6 = 0;
58864  __pyx_t_1 = 0;
58865  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2573, __pyx_L1_error)
58866  __Pyx_GOTREF(__pyx_t_4);
58867  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58868  }
58869  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58870  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
58871  __pyx_t_4 = 0;
58872 
58873  /* "mbd/CouplingFSI.pyx":2574
58874  * datav = self.getNodesVelocity()
58875  * dset = f.create_dataset('velocity_t'+str(tCount), datav.shape)
58876  * dset[...] = datav # <<<<<<<<<<<<<<
58877  * dset = f.create_dataset('ux_t'+str(tCount), (datav.shape[0],))
58878  * dset[...] = datav[:,0]
58879  */
58880  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2574, __pyx_L1_error)
58881 
58882  /* "mbd/CouplingFSI.pyx":2575
58883  * dset = f.create_dataset('velocity_t'+str(tCount), datav.shape)
58884  * dset[...] = datav
58885  * dset = f.create_dataset('ux_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
58886  * dset[...] = datav[:,0]
58887  * dset = f.create_dataset('uy_t'+str(tCount), (datav.shape[0],))
58888  */
58889  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2575, __pyx_L1_error)
58890  __Pyx_GOTREF(__pyx_t_3);
58891  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2575, __pyx_L1_error)
58892  __Pyx_GOTREF(__pyx_t_15);
58893  __pyx_t_1 = PyNumber_Add(__pyx_n_s_ux_t, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2575, __pyx_L1_error)
58894  __Pyx_GOTREF(__pyx_t_1);
58895  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58896  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2575, __pyx_L1_error)
58897  __Pyx_GOTREF(__pyx_t_15);
58898  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2575, __pyx_L1_error)
58899  __Pyx_GOTREF(__pyx_t_6);
58900  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58901  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2575, __pyx_L1_error)
58902  __Pyx_GOTREF(__pyx_t_15);
58903  __Pyx_GIVEREF(__pyx_t_6);
58904  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
58905  __pyx_t_6 = 0;
58906  __pyx_t_6 = NULL;
58907  __pyx_t_7 = 0;
58908  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
58909  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
58910  if (likely(__pyx_t_6)) {
58911  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
58912  __Pyx_INCREF(__pyx_t_6);
58913  __Pyx_INCREF(function);
58914  __Pyx_DECREF_SET(__pyx_t_3, function);
58915  __pyx_t_7 = 1;
58916  }
58917  }
58918  #if CYTHON_FAST_PYCALL
58919  if (PyFunction_Check(__pyx_t_3)) {
58920  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
58921  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1_error)
58922  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58923  __Pyx_GOTREF(__pyx_t_4);
58924  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58925  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58926  } else
58927  #endif
58928  #if CYTHON_FAST_PYCCALL
58929  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
58930  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
58931  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1_error)
58932  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
58933  __Pyx_GOTREF(__pyx_t_4);
58934  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
58935  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
58936  } else
58937  #endif
58938  {
58939  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2575, __pyx_L1_error)
58940  __Pyx_GOTREF(__pyx_t_8);
58941  if (__pyx_t_6) {
58942  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
58943  }
58944  __Pyx_GIVEREF(__pyx_t_1);
58945  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
58946  __Pyx_GIVEREF(__pyx_t_15);
58947  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_15);
58948  __pyx_t_1 = 0;
58949  __pyx_t_15 = 0;
58950  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2575, __pyx_L1_error)
58951  __Pyx_GOTREF(__pyx_t_4);
58952  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58953  }
58954  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
58955  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
58956  __pyx_t_4 = 0;
58957 
58958  /* "mbd/CouplingFSI.pyx":2576
58959  * dset[...] = datav
58960  * dset = f.create_dataset('ux_t'+str(tCount), (datav.shape[0],))
58961  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
58962  * dset = f.create_dataset('uy_t'+str(tCount), (datav.shape[0],))
58963  * dset[...] = datav[:,1]
58964  */
58965  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__151); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error)
58966  __Pyx_GOTREF(__pyx_t_4);
58967  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2576, __pyx_L1_error)
58968  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
58969 
58970  /* "mbd/CouplingFSI.pyx":2577
58971  * dset = f.create_dataset('ux_t'+str(tCount), (datav.shape[0],))
58972  * dset[...] = datav[:,0]
58973  * dset = f.create_dataset('uy_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
58974  * dset[...] = datav[:,1]
58975  * dset = f.create_dataset('uz_t'+str(tCount), (datav.shape[0],))
58976  */
58977  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2577, __pyx_L1_error)
58978  __Pyx_GOTREF(__pyx_t_3);
58979  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2577, __pyx_L1_error)
58980  __Pyx_GOTREF(__pyx_t_8);
58981  __pyx_t_15 = PyNumber_Add(__pyx_n_s_uy_t, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2577, __pyx_L1_error)
58982  __Pyx_GOTREF(__pyx_t_15);
58983  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58984  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2577, __pyx_L1_error)
58985  __Pyx_GOTREF(__pyx_t_8);
58986  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2577, __pyx_L1_error)
58987  __Pyx_GOTREF(__pyx_t_1);
58988  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
58989  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2577, __pyx_L1_error)
58990  __Pyx_GOTREF(__pyx_t_8);
58991  __Pyx_GIVEREF(__pyx_t_1);
58992  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
58993  __pyx_t_1 = 0;
58994  __pyx_t_1 = NULL;
58995  __pyx_t_7 = 0;
58996  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
58997  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
58998  if (likely(__pyx_t_1)) {
58999  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59000  __Pyx_INCREF(__pyx_t_1);
59001  __Pyx_INCREF(function);
59002  __Pyx_DECREF_SET(__pyx_t_3, function);
59003  __pyx_t_7 = 1;
59004  }
59005  }
59006  #if CYTHON_FAST_PYCALL
59007  if (PyFunction_Check(__pyx_t_3)) {
59008  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
59009  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2577, __pyx_L1_error)
59010  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
59011  __Pyx_GOTREF(__pyx_t_4);
59012  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59013  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59014  } else
59015  #endif
59016  #if CYTHON_FAST_PYCCALL
59017  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59018  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
59019  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2577, __pyx_L1_error)
59020  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
59021  __Pyx_GOTREF(__pyx_t_4);
59022  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59023  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59024  } else
59025  #endif
59026  {
59027  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2577, __pyx_L1_error)
59028  __Pyx_GOTREF(__pyx_t_6);
59029  if (__pyx_t_1) {
59030  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
59031  }
59032  __Pyx_GIVEREF(__pyx_t_15);
59033  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
59034  __Pyx_GIVEREF(__pyx_t_8);
59035  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
59036  __pyx_t_15 = 0;
59037  __pyx_t_8 = 0;
59038  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2577, __pyx_L1_error)
59039  __Pyx_GOTREF(__pyx_t_4);
59040  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59041  }
59042  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59043  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59044  __pyx_t_4 = 0;
59045 
59046  /* "mbd/CouplingFSI.pyx":2578
59047  * dset[...] = datav[:,0]
59048  * dset = f.create_dataset('uy_t'+str(tCount), (datav.shape[0],))
59049  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
59050  * dset = f.create_dataset('uz_t'+str(tCount), (datav.shape[0],))
59051  * dset[...] = datav[:,2]
59052  */
59053  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__152); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2578, __pyx_L1_error)
59054  __Pyx_GOTREF(__pyx_t_4);
59055  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2578, __pyx_L1_error)
59056  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59057 
59058  /* "mbd/CouplingFSI.pyx":2579
59059  * dset = f.create_dataset('uy_t'+str(tCount), (datav.shape[0],))
59060  * dset[...] = datav[:,1]
59061  * dset = f.create_dataset('uz_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59062  * dset[...] = datav[:,2]
59063  * # acceleration
59064  */
59065  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2579, __pyx_L1_error)
59066  __Pyx_GOTREF(__pyx_t_3);
59067  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2579, __pyx_L1_error)
59068  __Pyx_GOTREF(__pyx_t_6);
59069  __pyx_t_8 = PyNumber_Add(__pyx_n_s_uz_t, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2579, __pyx_L1_error)
59070  __Pyx_GOTREF(__pyx_t_8);
59071  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59072  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2579, __pyx_L1_error)
59073  __Pyx_GOTREF(__pyx_t_6);
59074  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2579, __pyx_L1_error)
59075  __Pyx_GOTREF(__pyx_t_15);
59076  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59077  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2579, __pyx_L1_error)
59078  __Pyx_GOTREF(__pyx_t_6);
59079  __Pyx_GIVEREF(__pyx_t_15);
59080  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
59081  __pyx_t_15 = 0;
59082  __pyx_t_15 = NULL;
59083  __pyx_t_7 = 0;
59084  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59085  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_3);
59086  if (likely(__pyx_t_15)) {
59087  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59088  __Pyx_INCREF(__pyx_t_15);
59089  __Pyx_INCREF(function);
59090  __Pyx_DECREF_SET(__pyx_t_3, function);
59091  __pyx_t_7 = 1;
59092  }
59093  }
59094  #if CYTHON_FAST_PYCALL
59095  if (PyFunction_Check(__pyx_t_3)) {
59096  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
59097  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error)
59098  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
59099  __Pyx_GOTREF(__pyx_t_4);
59100  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59101  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59102  } else
59103  #endif
59104  #if CYTHON_FAST_PYCCALL
59105  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59106  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
59107  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error)
59108  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
59109  __Pyx_GOTREF(__pyx_t_4);
59110  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59111  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59112  } else
59113  #endif
59114  {
59115  __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2579, __pyx_L1_error)
59116  __Pyx_GOTREF(__pyx_t_1);
59117  if (__pyx_t_15) {
59118  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
59119  }
59120  __Pyx_GIVEREF(__pyx_t_8);
59121  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_8);
59122  __Pyx_GIVEREF(__pyx_t_6);
59123  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
59124  __pyx_t_8 = 0;
59125  __pyx_t_6 = 0;
59126  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2579, __pyx_L1_error)
59127  __Pyx_GOTREF(__pyx_t_4);
59128  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59129  }
59130  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59131  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59132  __pyx_t_4 = 0;
59133 
59134  /* "mbd/CouplingFSI.pyx":2580
59135  * dset[...] = datav[:,1]
59136  * dset = f.create_dataset('uz_t'+str(tCount), (datav.shape[0],))
59137  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
59138  * # acceleration
59139  * datav = self.getNodesAcceleration()
59140  */
59141  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__153); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2580, __pyx_L1_error)
59142  __Pyx_GOTREF(__pyx_t_4);
59143  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2580, __pyx_L1_error)
59144  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59145 
59146  /* "mbd/CouplingFSI.pyx":2582
59147  * dset[...] = datav[:,2]
59148  * # acceleration
59149  * datav = self.getNodesAcceleration() # <<<<<<<<<<<<<<
59150  * dset = f.create_dataset('acceleration_t'+str(tCount), datav.shape)
59151  * dset[...] = datav
59152  */
59153  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getNodesAcceleration); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
59154  __Pyx_GOTREF(__pyx_t_3);
59155  __pyx_t_1 = NULL;
59156  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59157  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
59158  if (likely(__pyx_t_1)) {
59159  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59160  __Pyx_INCREF(__pyx_t_1);
59161  __Pyx_INCREF(function);
59162  __Pyx_DECREF_SET(__pyx_t_3, function);
59163  }
59164  }
59165  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
59166  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
59167  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2582, __pyx_L1_error)
59168  __Pyx_GOTREF(__pyx_t_4);
59169  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59170  __Pyx_DECREF_SET(__pyx_v_datav, __pyx_t_4);
59171  __pyx_t_4 = 0;
59172 
59173  /* "mbd/CouplingFSI.pyx":2583
59174  * # acceleration
59175  * datav = self.getNodesAcceleration()
59176  * dset = f.create_dataset('acceleration_t'+str(tCount), datav.shape) # <<<<<<<<<<<<<<
59177  * dset[...] = datav
59178  * dset = f.create_dataset('ax_t'+str(tCount), (datav.shape[0],))
59179  */
59180  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2583, __pyx_L1_error)
59181  __Pyx_GOTREF(__pyx_t_3);
59182  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error)
59183  __Pyx_GOTREF(__pyx_t_1);
59184  __pyx_t_6 = PyNumber_Add(__pyx_n_s_acceleration_t, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2583, __pyx_L1_error)
59185  __Pyx_GOTREF(__pyx_t_6);
59186  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59187  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error)
59188  __Pyx_GOTREF(__pyx_t_1);
59189  __pyx_t_8 = NULL;
59190  __pyx_t_7 = 0;
59191  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59192  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
59193  if (likely(__pyx_t_8)) {
59194  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59195  __Pyx_INCREF(__pyx_t_8);
59196  __Pyx_INCREF(function);
59197  __Pyx_DECREF_SET(__pyx_t_3, function);
59198  __pyx_t_7 = 1;
59199  }
59200  }
59201  #if CYTHON_FAST_PYCALL
59202  if (PyFunction_Check(__pyx_t_3)) {
59203  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
59204  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
59205  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
59206  __Pyx_GOTREF(__pyx_t_4);
59207  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59208  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59209  } else
59210  #endif
59211  #if CYTHON_FAST_PYCCALL
59212  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59213  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
59214  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
59215  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
59216  __Pyx_GOTREF(__pyx_t_4);
59217  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59218  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59219  } else
59220  #endif
59221  {
59222  __pyx_t_15 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2583, __pyx_L1_error)
59223  __Pyx_GOTREF(__pyx_t_15);
59224  if (__pyx_t_8) {
59225  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
59226  }
59227  __Pyx_GIVEREF(__pyx_t_6);
59228  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, __pyx_t_6);
59229  __Pyx_GIVEREF(__pyx_t_1);
59230  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_t_1);
59231  __pyx_t_6 = 0;
59232  __pyx_t_1 = 0;
59233  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
59234  __Pyx_GOTREF(__pyx_t_4);
59235  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59236  }
59237  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59238  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59239  __pyx_t_4 = 0;
59240 
59241  /* "mbd/CouplingFSI.pyx":2584
59242  * datav = self.getNodesAcceleration()
59243  * dset = f.create_dataset('acceleration_t'+str(tCount), datav.shape)
59244  * dset[...] = datav # <<<<<<<<<<<<<<
59245  * dset = f.create_dataset('ax_t'+str(tCount), (datav.shape[0],))
59246  * dset[...] = datav[:,0]
59247  */
59248  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2584, __pyx_L1_error)
59249 
59250  /* "mbd/CouplingFSI.pyx":2585
59251  * dset = f.create_dataset('acceleration_t'+str(tCount), datav.shape)
59252  * dset[...] = datav
59253  * dset = f.create_dataset('ax_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59254  * dset[...] = datav[:,0]
59255  * dset = f.create_dataset('ay_t'+str(tCount), (datav.shape[0],))
59256  */
59257  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2585, __pyx_L1_error)
59258  __Pyx_GOTREF(__pyx_t_3);
59259  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2585, __pyx_L1_error)
59260  __Pyx_GOTREF(__pyx_t_15);
59261  __pyx_t_1 = PyNumber_Add(__pyx_n_s_ax_t, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2585, __pyx_L1_error)
59262  __Pyx_GOTREF(__pyx_t_1);
59263  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59264  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2585, __pyx_L1_error)
59265  __Pyx_GOTREF(__pyx_t_15);
59266  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2585, __pyx_L1_error)
59267  __Pyx_GOTREF(__pyx_t_6);
59268  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59269  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2585, __pyx_L1_error)
59270  __Pyx_GOTREF(__pyx_t_15);
59271  __Pyx_GIVEREF(__pyx_t_6);
59272  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
59273  __pyx_t_6 = 0;
59274  __pyx_t_6 = NULL;
59275  __pyx_t_7 = 0;
59276  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59277  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
59278  if (likely(__pyx_t_6)) {
59279  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59280  __Pyx_INCREF(__pyx_t_6);
59281  __Pyx_INCREF(function);
59282  __Pyx_DECREF_SET(__pyx_t_3, function);
59283  __pyx_t_7 = 1;
59284  }
59285  }
59286  #if CYTHON_FAST_PYCALL
59287  if (PyFunction_Check(__pyx_t_3)) {
59288  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
59289  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1_error)
59290  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
59291  __Pyx_GOTREF(__pyx_t_4);
59292  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59293  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59294  } else
59295  #endif
59296  #if CYTHON_FAST_PYCCALL
59297  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59298  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
59299  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1_error)
59300  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
59301  __Pyx_GOTREF(__pyx_t_4);
59302  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59303  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59304  } else
59305  #endif
59306  {
59307  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2585, __pyx_L1_error)
59308  __Pyx_GOTREF(__pyx_t_8);
59309  if (__pyx_t_6) {
59310  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
59311  }
59312  __Pyx_GIVEREF(__pyx_t_1);
59313  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
59314  __Pyx_GIVEREF(__pyx_t_15);
59315  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_15);
59316  __pyx_t_1 = 0;
59317  __pyx_t_15 = 0;
59318  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2585, __pyx_L1_error)
59319  __Pyx_GOTREF(__pyx_t_4);
59320  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59321  }
59322  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59323  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59324  __pyx_t_4 = 0;
59325 
59326  /* "mbd/CouplingFSI.pyx":2586
59327  * dset[...] = datav
59328  * dset = f.create_dataset('ax_t'+str(tCount), (datav.shape[0],))
59329  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
59330  * dset = f.create_dataset('ay_t'+str(tCount), (datav.shape[0],))
59331  * dset[...] = datav[:,1]
59332  */
59333  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__151); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
59334  __Pyx_GOTREF(__pyx_t_4);
59335  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2586, __pyx_L1_error)
59336  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59337 
59338  /* "mbd/CouplingFSI.pyx":2587
59339  * dset = f.create_dataset('ax_t'+str(tCount), (datav.shape[0],))
59340  * dset[...] = datav[:,0]
59341  * dset = f.create_dataset('ay_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59342  * dset[...] = datav[:,1]
59343  * dset = f.create_dataset('az_t'+str(tCount), (datav.shape[0],))
59344  */
59345  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2587, __pyx_L1_error)
59346  __Pyx_GOTREF(__pyx_t_3);
59347  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2587, __pyx_L1_error)
59348  __Pyx_GOTREF(__pyx_t_8);
59349  __pyx_t_15 = PyNumber_Add(__pyx_n_s_ay_t, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2587, __pyx_L1_error)
59350  __Pyx_GOTREF(__pyx_t_15);
59351  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59352  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2587, __pyx_L1_error)
59353  __Pyx_GOTREF(__pyx_t_8);
59354  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __pyx_L1_error)
59355  __Pyx_GOTREF(__pyx_t_1);
59356  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59357  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2587, __pyx_L1_error)
59358  __Pyx_GOTREF(__pyx_t_8);
59359  __Pyx_GIVEREF(__pyx_t_1);
59360  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
59361  __pyx_t_1 = 0;
59362  __pyx_t_1 = NULL;
59363  __pyx_t_7 = 0;
59364  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59365  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
59366  if (likely(__pyx_t_1)) {
59367  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59368  __Pyx_INCREF(__pyx_t_1);
59369  __Pyx_INCREF(function);
59370  __Pyx_DECREF_SET(__pyx_t_3, function);
59371  __pyx_t_7 = 1;
59372  }
59373  }
59374  #if CYTHON_FAST_PYCALL
59375  if (PyFunction_Check(__pyx_t_3)) {
59376  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
59377  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2587, __pyx_L1_error)
59378  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
59379  __Pyx_GOTREF(__pyx_t_4);
59380  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59381  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59382  } else
59383  #endif
59384  #if CYTHON_FAST_PYCCALL
59385  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59386  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
59387  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2587, __pyx_L1_error)
59388  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
59389  __Pyx_GOTREF(__pyx_t_4);
59390  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59391  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59392  } else
59393  #endif
59394  {
59395  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2587, __pyx_L1_error)
59396  __Pyx_GOTREF(__pyx_t_6);
59397  if (__pyx_t_1) {
59398  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
59399  }
59400  __Pyx_GIVEREF(__pyx_t_15);
59401  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
59402  __Pyx_GIVEREF(__pyx_t_8);
59403  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
59404  __pyx_t_15 = 0;
59405  __pyx_t_8 = 0;
59406  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2587, __pyx_L1_error)
59407  __Pyx_GOTREF(__pyx_t_4);
59408  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59409  }
59410  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59411  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59412  __pyx_t_4 = 0;
59413 
59414  /* "mbd/CouplingFSI.pyx":2588
59415  * dset[...] = datav[:,0]
59416  * dset = f.create_dataset('ay_t'+str(tCount), (datav.shape[0],))
59417  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
59418  * dset = f.create_dataset('az_t'+str(tCount), (datav.shape[0],))
59419  * dset[...] = datav[:,2]
59420  */
59421  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__152); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2588, __pyx_L1_error)
59422  __Pyx_GOTREF(__pyx_t_4);
59423  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2588, __pyx_L1_error)
59424  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59425 
59426  /* "mbd/CouplingFSI.pyx":2589
59427  * dset = f.create_dataset('ay_t'+str(tCount), (datav.shape[0],))
59428  * dset[...] = datav[:,1]
59429  * dset = f.create_dataset('az_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59430  * dset[...] = datav[:,2]
59431  * # fluid velocity
59432  */
59433  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2589, __pyx_L1_error)
59434  __Pyx_GOTREF(__pyx_t_3);
59435  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error)
59436  __Pyx_GOTREF(__pyx_t_6);
59437  __pyx_t_8 = PyNumber_Add(__pyx_n_s_az_t, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2589, __pyx_L1_error)
59438  __Pyx_GOTREF(__pyx_t_8);
59439  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59440  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error)
59441  __Pyx_GOTREF(__pyx_t_6);
59442  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2589, __pyx_L1_error)
59443  __Pyx_GOTREF(__pyx_t_15);
59444  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59445  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2589, __pyx_L1_error)
59446  __Pyx_GOTREF(__pyx_t_6);
59447  __Pyx_GIVEREF(__pyx_t_15);
59448  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
59449  __pyx_t_15 = 0;
59450  __pyx_t_15 = NULL;
59451  __pyx_t_7 = 0;
59452  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59453  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_3);
59454  if (likely(__pyx_t_15)) {
59455  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59456  __Pyx_INCREF(__pyx_t_15);
59457  __Pyx_INCREF(function);
59458  __Pyx_DECREF_SET(__pyx_t_3, function);
59459  __pyx_t_7 = 1;
59460  }
59461  }
59462  #if CYTHON_FAST_PYCALL
59463  if (PyFunction_Check(__pyx_t_3)) {
59464  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
59465  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2589, __pyx_L1_error)
59466  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
59467  __Pyx_GOTREF(__pyx_t_4);
59468  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59469  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59470  } else
59471  #endif
59472  #if CYTHON_FAST_PYCCALL
59473  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59474  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
59475  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2589, __pyx_L1_error)
59476  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
59477  __Pyx_GOTREF(__pyx_t_4);
59478  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59479  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59480  } else
59481  #endif
59482  {
59483  __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2589, __pyx_L1_error)
59484  __Pyx_GOTREF(__pyx_t_1);
59485  if (__pyx_t_15) {
59486  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
59487  }
59488  __Pyx_GIVEREF(__pyx_t_8);
59489  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_8);
59490  __Pyx_GIVEREF(__pyx_t_6);
59491  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
59492  __pyx_t_8 = 0;
59493  __pyx_t_6 = 0;
59494  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2589, __pyx_L1_error)
59495  __Pyx_GOTREF(__pyx_t_4);
59496  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59497  }
59498  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59499  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59500  __pyx_t_4 = 0;
59501 
59502  /* "mbd/CouplingFSI.pyx":2590
59503  * dset[...] = datav[:,1]
59504  * dset = f.create_dataset('az_t'+str(tCount), (datav.shape[0],))
59505  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
59506  * # fluid velocity
59507  * datav = self.fluid_velocity_array
59508  */
59509  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__153); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2590, __pyx_L1_error)
59510  __Pyx_GOTREF(__pyx_t_4);
59511  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2590, __pyx_L1_error)
59512  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59513 
59514  /* "mbd/CouplingFSI.pyx":2592
59515  * dset[...] = datav[:,2]
59516  * # fluid velocity
59517  * datav = self.fluid_velocity_array # <<<<<<<<<<<<<<
59518  * dset = f.create_dataset('fluid_velocity_t'+str(tCount), datav.shape)
59519  * dset[...] = datav
59520  */
59521  __pyx_t_4 = ((PyObject *)__pyx_v_self->fluid_velocity_array);
59522  __Pyx_INCREF(__pyx_t_4);
59523  __Pyx_DECREF_SET(__pyx_v_datav, __pyx_t_4);
59524  __pyx_t_4 = 0;
59525 
59526  /* "mbd/CouplingFSI.pyx":2593
59527  * # fluid velocity
59528  * datav = self.fluid_velocity_array
59529  * dset = f.create_dataset('fluid_velocity_t'+str(tCount), datav.shape) # <<<<<<<<<<<<<<
59530  * dset[...] = datav
59531  * dset = f.create_dataset('fluid_ux_t'+str(tCount), (datav.shape[0],))
59532  */
59533  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2593, __pyx_L1_error)
59534  __Pyx_GOTREF(__pyx_t_3);
59535  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2593, __pyx_L1_error)
59536  __Pyx_GOTREF(__pyx_t_1);
59537  __pyx_t_6 = PyNumber_Add(__pyx_n_s_fluid_velocity_t, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2593, __pyx_L1_error)
59538  __Pyx_GOTREF(__pyx_t_6);
59539  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59540  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2593, __pyx_L1_error)
59541  __Pyx_GOTREF(__pyx_t_1);
59542  __pyx_t_8 = NULL;
59543  __pyx_t_7 = 0;
59544  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59545  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
59546  if (likely(__pyx_t_8)) {
59547  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59548  __Pyx_INCREF(__pyx_t_8);
59549  __Pyx_INCREF(function);
59550  __Pyx_DECREF_SET(__pyx_t_3, function);
59551  __pyx_t_7 = 1;
59552  }
59553  }
59554  #if CYTHON_FAST_PYCALL
59555  if (PyFunction_Check(__pyx_t_3)) {
59556  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
59557  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2593, __pyx_L1_error)
59558  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
59559  __Pyx_GOTREF(__pyx_t_4);
59560  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59561  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59562  } else
59563  #endif
59564  #if CYTHON_FAST_PYCCALL
59565  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59566  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
59567  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2593, __pyx_L1_error)
59568  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
59569  __Pyx_GOTREF(__pyx_t_4);
59570  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59571  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59572  } else
59573  #endif
59574  {
59575  __pyx_t_15 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2593, __pyx_L1_error)
59576  __Pyx_GOTREF(__pyx_t_15);
59577  if (__pyx_t_8) {
59578  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
59579  }
59580  __Pyx_GIVEREF(__pyx_t_6);
59581  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, __pyx_t_6);
59582  __Pyx_GIVEREF(__pyx_t_1);
59583  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_t_1);
59584  __pyx_t_6 = 0;
59585  __pyx_t_1 = 0;
59586  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2593, __pyx_L1_error)
59587  __Pyx_GOTREF(__pyx_t_4);
59588  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59589  }
59590  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59591  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59592  __pyx_t_4 = 0;
59593 
59594  /* "mbd/CouplingFSI.pyx":2594
59595  * datav = self.fluid_velocity_array
59596  * dset = f.create_dataset('fluid_velocity_t'+str(tCount), datav.shape)
59597  * dset[...] = datav # <<<<<<<<<<<<<<
59598  * dset = f.create_dataset('fluid_ux_t'+str(tCount), (datav.shape[0],))
59599  * dset[...] = datav[:,0]
59600  */
59601  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2594, __pyx_L1_error)
59602 
59603  /* "mbd/CouplingFSI.pyx":2595
59604  * dset = f.create_dataset('fluid_velocity_t'+str(tCount), datav.shape)
59605  * dset[...] = datav
59606  * dset = f.create_dataset('fluid_ux_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59607  * dset[...] = datav[:,0]
59608  * dset = f.create_dataset('fluid_uy_t'+str(tCount), (datav.shape[0],))
59609  */
59610  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2595, __pyx_L1_error)
59611  __Pyx_GOTREF(__pyx_t_3);
59612  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2595, __pyx_L1_error)
59613  __Pyx_GOTREF(__pyx_t_15);
59614  __pyx_t_1 = PyNumber_Add(__pyx_n_s_fluid_ux_t, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2595, __pyx_L1_error)
59615  __Pyx_GOTREF(__pyx_t_1);
59616  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59617  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2595, __pyx_L1_error)
59618  __Pyx_GOTREF(__pyx_t_15);
59619  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2595, __pyx_L1_error)
59620  __Pyx_GOTREF(__pyx_t_6);
59621  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59622  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2595, __pyx_L1_error)
59623  __Pyx_GOTREF(__pyx_t_15);
59624  __Pyx_GIVEREF(__pyx_t_6);
59625  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
59626  __pyx_t_6 = 0;
59627  __pyx_t_6 = NULL;
59628  __pyx_t_7 = 0;
59629  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59630  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
59631  if (likely(__pyx_t_6)) {
59632  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59633  __Pyx_INCREF(__pyx_t_6);
59634  __Pyx_INCREF(function);
59635  __Pyx_DECREF_SET(__pyx_t_3, function);
59636  __pyx_t_7 = 1;
59637  }
59638  }
59639  #if CYTHON_FAST_PYCALL
59640  if (PyFunction_Check(__pyx_t_3)) {
59641  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
59642  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1_error)
59643  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
59644  __Pyx_GOTREF(__pyx_t_4);
59645  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59646  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59647  } else
59648  #endif
59649  #if CYTHON_FAST_PYCCALL
59650  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59651  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
59652  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1_error)
59653  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
59654  __Pyx_GOTREF(__pyx_t_4);
59655  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59656  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59657  } else
59658  #endif
59659  {
59660  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2595, __pyx_L1_error)
59661  __Pyx_GOTREF(__pyx_t_8);
59662  if (__pyx_t_6) {
59663  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
59664  }
59665  __Pyx_GIVEREF(__pyx_t_1);
59666  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
59667  __Pyx_GIVEREF(__pyx_t_15);
59668  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_15);
59669  __pyx_t_1 = 0;
59670  __pyx_t_15 = 0;
59671  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1_error)
59672  __Pyx_GOTREF(__pyx_t_4);
59673  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59674  }
59675  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59676  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59677  __pyx_t_4 = 0;
59678 
59679  /* "mbd/CouplingFSI.pyx":2596
59680  * dset[...] = datav
59681  * dset = f.create_dataset('fluid_ux_t'+str(tCount), (datav.shape[0],))
59682  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
59683  * dset = f.create_dataset('fluid_uy_t'+str(tCount), (datav.shape[0],))
59684  * dset[...] = datav[:,1]
59685  */
59686  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__151); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2596, __pyx_L1_error)
59687  __Pyx_GOTREF(__pyx_t_4);
59688  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2596, __pyx_L1_error)
59689  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59690 
59691  /* "mbd/CouplingFSI.pyx":2597
59692  * dset = f.create_dataset('fluid_ux_t'+str(tCount), (datav.shape[0],))
59693  * dset[...] = datav[:,0]
59694  * dset = f.create_dataset('fluid_uy_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59695  * dset[...] = datav[:,1]
59696  * dset = f.create_dataset('fluid_uz_t'+str(tCount), (datav.shape[0],))
59697  */
59698  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
59699  __Pyx_GOTREF(__pyx_t_3);
59700  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2597, __pyx_L1_error)
59701  __Pyx_GOTREF(__pyx_t_8);
59702  __pyx_t_15 = PyNumber_Add(__pyx_n_s_fluid_uy_t, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2597, __pyx_L1_error)
59703  __Pyx_GOTREF(__pyx_t_15);
59704  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59705  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2597, __pyx_L1_error)
59706  __Pyx_GOTREF(__pyx_t_8);
59707  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2597, __pyx_L1_error)
59708  __Pyx_GOTREF(__pyx_t_1);
59709  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59710  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2597, __pyx_L1_error)
59711  __Pyx_GOTREF(__pyx_t_8);
59712  __Pyx_GIVEREF(__pyx_t_1);
59713  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
59714  __pyx_t_1 = 0;
59715  __pyx_t_1 = NULL;
59716  __pyx_t_7 = 0;
59717  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59718  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
59719  if (likely(__pyx_t_1)) {
59720  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59721  __Pyx_INCREF(__pyx_t_1);
59722  __Pyx_INCREF(function);
59723  __Pyx_DECREF_SET(__pyx_t_3, function);
59724  __pyx_t_7 = 1;
59725  }
59726  }
59727  #if CYTHON_FAST_PYCALL
59728  if (PyFunction_Check(__pyx_t_3)) {
59729  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
59730  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error)
59731  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
59732  __Pyx_GOTREF(__pyx_t_4);
59733  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59734  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59735  } else
59736  #endif
59737  #if CYTHON_FAST_PYCCALL
59738  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59739  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
59740  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error)
59741  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
59742  __Pyx_GOTREF(__pyx_t_4);
59743  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59744  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59745  } else
59746  #endif
59747  {
59748  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2597, __pyx_L1_error)
59749  __Pyx_GOTREF(__pyx_t_6);
59750  if (__pyx_t_1) {
59751  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
59752  }
59753  __Pyx_GIVEREF(__pyx_t_15);
59754  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
59755  __Pyx_GIVEREF(__pyx_t_8);
59756  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
59757  __pyx_t_15 = 0;
59758  __pyx_t_8 = 0;
59759  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error)
59760  __Pyx_GOTREF(__pyx_t_4);
59761  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59762  }
59763  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59764  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59765  __pyx_t_4 = 0;
59766 
59767  /* "mbd/CouplingFSI.pyx":2598
59768  * dset[...] = datav[:,0]
59769  * dset = f.create_dataset('fluid_uy_t'+str(tCount), (datav.shape[0],))
59770  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
59771  * dset = f.create_dataset('fluid_uz_t'+str(tCount), (datav.shape[0],))
59772  * dset[...] = datav[:,2]
59773  */
59774  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__152); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2598, __pyx_L1_error)
59775  __Pyx_GOTREF(__pyx_t_4);
59776  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2598, __pyx_L1_error)
59777  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59778 
59779  /* "mbd/CouplingFSI.pyx":2599
59780  * dset = f.create_dataset('fluid_uy_t'+str(tCount), (datav.shape[0],))
59781  * dset[...] = datav[:,1]
59782  * dset = f.create_dataset('fluid_uz_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59783  * dset[...] = datav[:,2]
59784  * # fluid acceleration
59785  */
59786  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2599, __pyx_L1_error)
59787  __Pyx_GOTREF(__pyx_t_3);
59788  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2599, __pyx_L1_error)
59789  __Pyx_GOTREF(__pyx_t_6);
59790  __pyx_t_8 = PyNumber_Add(__pyx_n_s_fluid_uz_t, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2599, __pyx_L1_error)
59791  __Pyx_GOTREF(__pyx_t_8);
59792  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59793  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2599, __pyx_L1_error)
59794  __Pyx_GOTREF(__pyx_t_6);
59795  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2599, __pyx_L1_error)
59796  __Pyx_GOTREF(__pyx_t_15);
59797  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59798  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2599, __pyx_L1_error)
59799  __Pyx_GOTREF(__pyx_t_6);
59800  __Pyx_GIVEREF(__pyx_t_15);
59801  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
59802  __pyx_t_15 = 0;
59803  __pyx_t_15 = NULL;
59804  __pyx_t_7 = 0;
59805  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59806  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_3);
59807  if (likely(__pyx_t_15)) {
59808  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59809  __Pyx_INCREF(__pyx_t_15);
59810  __Pyx_INCREF(function);
59811  __Pyx_DECREF_SET(__pyx_t_3, function);
59812  __pyx_t_7 = 1;
59813  }
59814  }
59815  #if CYTHON_FAST_PYCALL
59816  if (PyFunction_Check(__pyx_t_3)) {
59817  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
59818  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error)
59819  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
59820  __Pyx_GOTREF(__pyx_t_4);
59821  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59822  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59823  } else
59824  #endif
59825  #if CYTHON_FAST_PYCCALL
59826  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59827  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
59828  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error)
59829  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
59830  __Pyx_GOTREF(__pyx_t_4);
59831  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
59832  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59833  } else
59834  #endif
59835  {
59836  __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2599, __pyx_L1_error)
59837  __Pyx_GOTREF(__pyx_t_1);
59838  if (__pyx_t_15) {
59839  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
59840  }
59841  __Pyx_GIVEREF(__pyx_t_8);
59842  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_8);
59843  __Pyx_GIVEREF(__pyx_t_6);
59844  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
59845  __pyx_t_8 = 0;
59846  __pyx_t_6 = 0;
59847  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error)
59848  __Pyx_GOTREF(__pyx_t_4);
59849  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59850  }
59851  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59852  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59853  __pyx_t_4 = 0;
59854 
59855  /* "mbd/CouplingFSI.pyx":2600
59856  * dset[...] = datav[:,1]
59857  * dset = f.create_dataset('fluid_uz_t'+str(tCount), (datav.shape[0],))
59858  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
59859  * # fluid acceleration
59860  * datav = self.fluid_acceleration_array
59861  */
59862  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__153); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error)
59863  __Pyx_GOTREF(__pyx_t_4);
59864  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2600, __pyx_L1_error)
59865  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
59866 
59867  /* "mbd/CouplingFSI.pyx":2602
59868  * dset[...] = datav[:,2]
59869  * # fluid acceleration
59870  * datav = self.fluid_acceleration_array # <<<<<<<<<<<<<<
59871  * dset = f.create_dataset('fluid_acceleration_t'+str(tCount), datav.shape)
59872  * dset[...] = datav
59873  */
59874  __pyx_t_4 = ((PyObject *)__pyx_v_self->fluid_acceleration_array);
59875  __Pyx_INCREF(__pyx_t_4);
59876  __Pyx_DECREF_SET(__pyx_v_datav, __pyx_t_4);
59877  __pyx_t_4 = 0;
59878 
59879  /* "mbd/CouplingFSI.pyx":2603
59880  * # fluid acceleration
59881  * datav = self.fluid_acceleration_array
59882  * dset = f.create_dataset('fluid_acceleration_t'+str(tCount), datav.shape) # <<<<<<<<<<<<<<
59883  * dset[...] = datav
59884  * dset = f.create_dataset('fluid_ax_t'+str(tCount), (datav.shape[0],))
59885  */
59886  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2603, __pyx_L1_error)
59887  __Pyx_GOTREF(__pyx_t_3);
59888  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2603, __pyx_L1_error)
59889  __Pyx_GOTREF(__pyx_t_1);
59890  __pyx_t_6 = PyNumber_Add(__pyx_n_s_fluid_acceleration_t, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2603, __pyx_L1_error)
59891  __Pyx_GOTREF(__pyx_t_6);
59892  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59893  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2603, __pyx_L1_error)
59894  __Pyx_GOTREF(__pyx_t_1);
59895  __pyx_t_8 = NULL;
59896  __pyx_t_7 = 0;
59897  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59898  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
59899  if (likely(__pyx_t_8)) {
59900  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59901  __Pyx_INCREF(__pyx_t_8);
59902  __Pyx_INCREF(function);
59903  __Pyx_DECREF_SET(__pyx_t_3, function);
59904  __pyx_t_7 = 1;
59905  }
59906  }
59907  #if CYTHON_FAST_PYCALL
59908  if (PyFunction_Check(__pyx_t_3)) {
59909  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
59910  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error)
59911  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
59912  __Pyx_GOTREF(__pyx_t_4);
59913  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59914  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59915  } else
59916  #endif
59917  #if CYTHON_FAST_PYCCALL
59918  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
59919  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
59920  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error)
59921  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
59922  __Pyx_GOTREF(__pyx_t_4);
59923  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
59924  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59925  } else
59926  #endif
59927  {
59928  __pyx_t_15 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2603, __pyx_L1_error)
59929  __Pyx_GOTREF(__pyx_t_15);
59930  if (__pyx_t_8) {
59931  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
59932  }
59933  __Pyx_GIVEREF(__pyx_t_6);
59934  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, __pyx_t_6);
59935  __Pyx_GIVEREF(__pyx_t_1);
59936  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_t_1);
59937  __pyx_t_6 = 0;
59938  __pyx_t_1 = 0;
59939  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error)
59940  __Pyx_GOTREF(__pyx_t_4);
59941  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59942  }
59943  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
59944  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
59945  __pyx_t_4 = 0;
59946 
59947  /* "mbd/CouplingFSI.pyx":2604
59948  * datav = self.fluid_acceleration_array
59949  * dset = f.create_dataset('fluid_acceleration_t'+str(tCount), datav.shape)
59950  * dset[...] = datav # <<<<<<<<<<<<<<
59951  * dset = f.create_dataset('fluid_ax_t'+str(tCount), (datav.shape[0],))
59952  * dset[...] = datav[:,0]
59953  */
59954  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2604, __pyx_L1_error)
59955 
59956  /* "mbd/CouplingFSI.pyx":2605
59957  * dset = f.create_dataset('fluid_acceleration_t'+str(tCount), datav.shape)
59958  * dset[...] = datav
59959  * dset = f.create_dataset('fluid_ax_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
59960  * dset[...] = datav[:,0]
59961  * dset = f.create_dataset('fluid_ay_t'+str(tCount), (datav.shape[0],))
59962  */
59963  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1_error)
59964  __Pyx_GOTREF(__pyx_t_3);
59965  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2605, __pyx_L1_error)
59966  __Pyx_GOTREF(__pyx_t_15);
59967  __pyx_t_1 = PyNumber_Add(__pyx_n_s_fluid_ax_t, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2605, __pyx_L1_error)
59968  __Pyx_GOTREF(__pyx_t_1);
59969  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59970  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2605, __pyx_L1_error)
59971  __Pyx_GOTREF(__pyx_t_15);
59972  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2605, __pyx_L1_error)
59973  __Pyx_GOTREF(__pyx_t_6);
59974  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
59975  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2605, __pyx_L1_error)
59976  __Pyx_GOTREF(__pyx_t_15);
59977  __Pyx_GIVEREF(__pyx_t_6);
59978  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
59979  __pyx_t_6 = 0;
59980  __pyx_t_6 = NULL;
59981  __pyx_t_7 = 0;
59982  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
59983  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
59984  if (likely(__pyx_t_6)) {
59985  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
59986  __Pyx_INCREF(__pyx_t_6);
59987  __Pyx_INCREF(function);
59988  __Pyx_DECREF_SET(__pyx_t_3, function);
59989  __pyx_t_7 = 1;
59990  }
59991  }
59992  #if CYTHON_FAST_PYCALL
59993  if (PyFunction_Check(__pyx_t_3)) {
59994  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
59995  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
59996  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
59997  __Pyx_GOTREF(__pyx_t_4);
59998  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
59999  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60000  } else
60001  #endif
60002  #if CYTHON_FAST_PYCCALL
60003  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60004  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
60005  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
60006  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
60007  __Pyx_GOTREF(__pyx_t_4);
60008  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60009  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60010  } else
60011  #endif
60012  {
60013  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2605, __pyx_L1_error)
60014  __Pyx_GOTREF(__pyx_t_8);
60015  if (__pyx_t_6) {
60016  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
60017  }
60018  __Pyx_GIVEREF(__pyx_t_1);
60019  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
60020  __Pyx_GIVEREF(__pyx_t_15);
60021  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_15);
60022  __pyx_t_1 = 0;
60023  __pyx_t_15 = 0;
60024  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
60025  __Pyx_GOTREF(__pyx_t_4);
60026  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60027  }
60028  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60029  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60030  __pyx_t_4 = 0;
60031 
60032  /* "mbd/CouplingFSI.pyx":2606
60033  * dset[...] = datav
60034  * dset = f.create_dataset('fluid_ax_t'+str(tCount), (datav.shape[0],))
60035  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
60036  * dset = f.create_dataset('fluid_ay_t'+str(tCount), (datav.shape[0],))
60037  * dset[...] = datav[:,1]
60038  */
60039  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__151); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2606, __pyx_L1_error)
60040  __Pyx_GOTREF(__pyx_t_4);
60041  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2606, __pyx_L1_error)
60042  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60043 
60044  /* "mbd/CouplingFSI.pyx":2607
60045  * dset = f.create_dataset('fluid_ax_t'+str(tCount), (datav.shape[0],))
60046  * dset[...] = datav[:,0]
60047  * dset = f.create_dataset('fluid_ay_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60048  * dset[...] = datav[:,1]
60049  * dset = f.create_dataset('fluid_az_t'+str(tCount), (datav.shape[0],))
60050  */
60051  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
60052  __Pyx_GOTREF(__pyx_t_3);
60053  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2607, __pyx_L1_error)
60054  __Pyx_GOTREF(__pyx_t_8);
60055  __pyx_t_15 = PyNumber_Add(__pyx_n_s_fluid_ay_t, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2607, __pyx_L1_error)
60056  __Pyx_GOTREF(__pyx_t_15);
60057  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60058  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2607, __pyx_L1_error)
60059  __Pyx_GOTREF(__pyx_t_8);
60060  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
60061  __Pyx_GOTREF(__pyx_t_1);
60062  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60063  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2607, __pyx_L1_error)
60064  __Pyx_GOTREF(__pyx_t_8);
60065  __Pyx_GIVEREF(__pyx_t_1);
60066  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
60067  __pyx_t_1 = 0;
60068  __pyx_t_1 = NULL;
60069  __pyx_t_7 = 0;
60070  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60071  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
60072  if (likely(__pyx_t_1)) {
60073  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60074  __Pyx_INCREF(__pyx_t_1);
60075  __Pyx_INCREF(function);
60076  __Pyx_DECREF_SET(__pyx_t_3, function);
60077  __pyx_t_7 = 1;
60078  }
60079  }
60080  #if CYTHON_FAST_PYCALL
60081  if (PyFunction_Check(__pyx_t_3)) {
60082  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
60083  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
60084  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60085  __Pyx_GOTREF(__pyx_t_4);
60086  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60087  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60088  } else
60089  #endif
60090  #if CYTHON_FAST_PYCCALL
60091  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60092  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
60093  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
60094  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60095  __Pyx_GOTREF(__pyx_t_4);
60096  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60097  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60098  } else
60099  #endif
60100  {
60101  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2607, __pyx_L1_error)
60102  __Pyx_GOTREF(__pyx_t_6);
60103  if (__pyx_t_1) {
60104  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
60105  }
60106  __Pyx_GIVEREF(__pyx_t_15);
60107  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
60108  __Pyx_GIVEREF(__pyx_t_8);
60109  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
60110  __pyx_t_15 = 0;
60111  __pyx_t_8 = 0;
60112  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
60113  __Pyx_GOTREF(__pyx_t_4);
60114  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60115  }
60116  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60117  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60118  __pyx_t_4 = 0;
60119 
60120  /* "mbd/CouplingFSI.pyx":2608
60121  * dset[...] = datav[:,0]
60122  * dset = f.create_dataset('fluid_ay_t'+str(tCount), (datav.shape[0],))
60123  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
60124  * dset = f.create_dataset('fluid_az_t'+str(tCount), (datav.shape[0],))
60125  * dset[...] = datav[:,2]
60126  */
60127  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__152); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2608, __pyx_L1_error)
60128  __Pyx_GOTREF(__pyx_t_4);
60129  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2608, __pyx_L1_error)
60130  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60131 
60132  /* "mbd/CouplingFSI.pyx":2609
60133  * dset = f.create_dataset('fluid_ay_t'+str(tCount), (datav.shape[0],))
60134  * dset[...] = datav[:,1]
60135  * dset = f.create_dataset('fluid_az_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60136  * dset[...] = datav[:,2]
60137  * # drag
60138  */
60139  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2609, __pyx_L1_error)
60140  __Pyx_GOTREF(__pyx_t_3);
60141  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2609, __pyx_L1_error)
60142  __Pyx_GOTREF(__pyx_t_6);
60143  __pyx_t_8 = PyNumber_Add(__pyx_n_s_fluid_az_t, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2609, __pyx_L1_error)
60144  __Pyx_GOTREF(__pyx_t_8);
60145  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60146  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2609, __pyx_L1_error)
60147  __Pyx_GOTREF(__pyx_t_6);
60148  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2609, __pyx_L1_error)
60149  __Pyx_GOTREF(__pyx_t_15);
60150  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60151  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2609, __pyx_L1_error)
60152  __Pyx_GOTREF(__pyx_t_6);
60153  __Pyx_GIVEREF(__pyx_t_15);
60154  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
60155  __pyx_t_15 = 0;
60156  __pyx_t_15 = NULL;
60157  __pyx_t_7 = 0;
60158  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60159  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_3);
60160  if (likely(__pyx_t_15)) {
60161  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60162  __Pyx_INCREF(__pyx_t_15);
60163  __Pyx_INCREF(function);
60164  __Pyx_DECREF_SET(__pyx_t_3, function);
60165  __pyx_t_7 = 1;
60166  }
60167  }
60168  #if CYTHON_FAST_PYCALL
60169  if (PyFunction_Check(__pyx_t_3)) {
60170  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
60171  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error)
60172  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
60173  __Pyx_GOTREF(__pyx_t_4);
60174  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60175  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60176  } else
60177  #endif
60178  #if CYTHON_FAST_PYCCALL
60179  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60180  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
60181  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error)
60182  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
60183  __Pyx_GOTREF(__pyx_t_4);
60184  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60185  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60186  } else
60187  #endif
60188  {
60189  __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2609, __pyx_L1_error)
60190  __Pyx_GOTREF(__pyx_t_1);
60191  if (__pyx_t_15) {
60192  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
60193  }
60194  __Pyx_GIVEREF(__pyx_t_8);
60195  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_8);
60196  __Pyx_GIVEREF(__pyx_t_6);
60197  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
60198  __pyx_t_8 = 0;
60199  __pyx_t_6 = 0;
60200  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error)
60201  __Pyx_GOTREF(__pyx_t_4);
60202  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60203  }
60204  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60205  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60206  __pyx_t_4 = 0;
60207 
60208  /* "mbd/CouplingFSI.pyx":2610
60209  * dset[...] = datav[:,1]
60210  * dset = f.create_dataset('fluid_az_t'+str(tCount), (datav.shape[0],))
60211  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
60212  * # drag
60213  * datav = self.getDragForces()
60214  */
60215  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__153); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2610, __pyx_L1_error)
60216  __Pyx_GOTREF(__pyx_t_4);
60217  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2610, __pyx_L1_error)
60218  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60219 
60220  /* "mbd/CouplingFSI.pyx":2612
60221  * dset[...] = datav[:,2]
60222  * # drag
60223  * datav = self.getDragForces() # <<<<<<<<<<<<<<
60224  * dset = f.create_dataset('drag_t'+str(tCount),datav.shape)
60225  * dset[...] = datav
60226  */
60227  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getDragForces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2612, __pyx_L1_error)
60228  __Pyx_GOTREF(__pyx_t_3);
60229  __pyx_t_1 = NULL;
60230  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60231  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
60232  if (likely(__pyx_t_1)) {
60233  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60234  __Pyx_INCREF(__pyx_t_1);
60235  __Pyx_INCREF(function);
60236  __Pyx_DECREF_SET(__pyx_t_3, function);
60237  }
60238  }
60239  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
60240  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60241  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2612, __pyx_L1_error)
60242  __Pyx_GOTREF(__pyx_t_4);
60243  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60244  __Pyx_DECREF_SET(__pyx_v_datav, __pyx_t_4);
60245  __pyx_t_4 = 0;
60246 
60247  /* "mbd/CouplingFSI.pyx":2613
60248  * # drag
60249  * datav = self.getDragForces()
60250  * dset = f.create_dataset('drag_t'+str(tCount),datav.shape) # <<<<<<<<<<<<<<
60251  * dset[...] = datav
60252  * dset = f.create_dataset('dragx_t'+str(tCount), (datav.shape[0],))
60253  */
60254  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2613, __pyx_L1_error)
60255  __Pyx_GOTREF(__pyx_t_3);
60256  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2613, __pyx_L1_error)
60257  __Pyx_GOTREF(__pyx_t_1);
60258  __pyx_t_6 = PyNumber_Add(__pyx_n_s_drag_t, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2613, __pyx_L1_error)
60259  __Pyx_GOTREF(__pyx_t_6);
60260  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60261  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2613, __pyx_L1_error)
60262  __Pyx_GOTREF(__pyx_t_1);
60263  __pyx_t_8 = NULL;
60264  __pyx_t_7 = 0;
60265  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60266  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
60267  if (likely(__pyx_t_8)) {
60268  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60269  __Pyx_INCREF(__pyx_t_8);
60270  __Pyx_INCREF(function);
60271  __Pyx_DECREF_SET(__pyx_t_3, function);
60272  __pyx_t_7 = 1;
60273  }
60274  }
60275  #if CYTHON_FAST_PYCALL
60276  if (PyFunction_Check(__pyx_t_3)) {
60277  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
60278  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
60279  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
60280  __Pyx_GOTREF(__pyx_t_4);
60281  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60282  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60283  } else
60284  #endif
60285  #if CYTHON_FAST_PYCCALL
60286  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60287  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
60288  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
60289  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
60290  __Pyx_GOTREF(__pyx_t_4);
60291  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60292  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60293  } else
60294  #endif
60295  {
60296  __pyx_t_15 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2613, __pyx_L1_error)
60297  __Pyx_GOTREF(__pyx_t_15);
60298  if (__pyx_t_8) {
60299  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
60300  }
60301  __Pyx_GIVEREF(__pyx_t_6);
60302  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, __pyx_t_6);
60303  __Pyx_GIVEREF(__pyx_t_1);
60304  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_t_1);
60305  __pyx_t_6 = 0;
60306  __pyx_t_1 = 0;
60307  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
60308  __Pyx_GOTREF(__pyx_t_4);
60309  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60310  }
60311  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60312  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60313  __pyx_t_4 = 0;
60314 
60315  /* "mbd/CouplingFSI.pyx":2614
60316  * datav = self.getDragForces()
60317  * dset = f.create_dataset('drag_t'+str(tCount),datav.shape)
60318  * dset[...] = datav # <<<<<<<<<<<<<<
60319  * dset = f.create_dataset('dragx_t'+str(tCount), (datav.shape[0],))
60320  * dset[...] = datav[:,0]
60321  */
60322  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2614, __pyx_L1_error)
60323 
60324  /* "mbd/CouplingFSI.pyx":2615
60325  * dset = f.create_dataset('drag_t'+str(tCount),datav.shape)
60326  * dset[...] = datav
60327  * dset = f.create_dataset('dragx_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60328  * dset[...] = datav[:,0]
60329  * dset = f.create_dataset('dragy_t'+str(tCount), (datav.shape[0],))
60330  */
60331  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2615, __pyx_L1_error)
60332  __Pyx_GOTREF(__pyx_t_3);
60333  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2615, __pyx_L1_error)
60334  __Pyx_GOTREF(__pyx_t_15);
60335  __pyx_t_1 = PyNumber_Add(__pyx_n_s_dragx_t, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2615, __pyx_L1_error)
60336  __Pyx_GOTREF(__pyx_t_1);
60337  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60338  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2615, __pyx_L1_error)
60339  __Pyx_GOTREF(__pyx_t_15);
60340  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2615, __pyx_L1_error)
60341  __Pyx_GOTREF(__pyx_t_6);
60342  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60343  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2615, __pyx_L1_error)
60344  __Pyx_GOTREF(__pyx_t_15);
60345  __Pyx_GIVEREF(__pyx_t_6);
60346  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
60347  __pyx_t_6 = 0;
60348  __pyx_t_6 = NULL;
60349  __pyx_t_7 = 0;
60350  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60351  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
60352  if (likely(__pyx_t_6)) {
60353  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60354  __Pyx_INCREF(__pyx_t_6);
60355  __Pyx_INCREF(function);
60356  __Pyx_DECREF_SET(__pyx_t_3, function);
60357  __pyx_t_7 = 1;
60358  }
60359  }
60360  #if CYTHON_FAST_PYCALL
60361  if (PyFunction_Check(__pyx_t_3)) {
60362  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
60363  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1_error)
60364  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
60365  __Pyx_GOTREF(__pyx_t_4);
60366  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60367  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60368  } else
60369  #endif
60370  #if CYTHON_FAST_PYCCALL
60371  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60372  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
60373  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1_error)
60374  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
60375  __Pyx_GOTREF(__pyx_t_4);
60376  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60377  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60378  } else
60379  #endif
60380  {
60381  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2615, __pyx_L1_error)
60382  __Pyx_GOTREF(__pyx_t_8);
60383  if (__pyx_t_6) {
60384  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
60385  }
60386  __Pyx_GIVEREF(__pyx_t_1);
60387  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
60388  __Pyx_GIVEREF(__pyx_t_15);
60389  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_15);
60390  __pyx_t_1 = 0;
60391  __pyx_t_15 = 0;
60392  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1_error)
60393  __Pyx_GOTREF(__pyx_t_4);
60394  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60395  }
60396  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60397  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60398  __pyx_t_4 = 0;
60399 
60400  /* "mbd/CouplingFSI.pyx":2616
60401  * dset[...] = datav
60402  * dset = f.create_dataset('dragx_t'+str(tCount), (datav.shape[0],))
60403  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
60404  * dset = f.create_dataset('dragy_t'+str(tCount), (datav.shape[0],))
60405  * dset[...] = datav[:,1]
60406  */
60407  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__151); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2616, __pyx_L1_error)
60408  __Pyx_GOTREF(__pyx_t_4);
60409  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2616, __pyx_L1_error)
60410  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60411 
60412  /* "mbd/CouplingFSI.pyx":2617
60413  * dset = f.create_dataset('dragx_t'+str(tCount), (datav.shape[0],))
60414  * dset[...] = datav[:,0]
60415  * dset = f.create_dataset('dragy_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60416  * dset[...] = datav[:,1]
60417  * dset = f.create_dataset('dragz_t'+str(tCount), (datav.shape[0],))
60418  */
60419  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2617, __pyx_L1_error)
60420  __Pyx_GOTREF(__pyx_t_3);
60421  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2617, __pyx_L1_error)
60422  __Pyx_GOTREF(__pyx_t_8);
60423  __pyx_t_15 = PyNumber_Add(__pyx_n_s_dragy_t, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2617, __pyx_L1_error)
60424  __Pyx_GOTREF(__pyx_t_15);
60425  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60426  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2617, __pyx_L1_error)
60427  __Pyx_GOTREF(__pyx_t_8);
60428  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2617, __pyx_L1_error)
60429  __Pyx_GOTREF(__pyx_t_1);
60430  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60431  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2617, __pyx_L1_error)
60432  __Pyx_GOTREF(__pyx_t_8);
60433  __Pyx_GIVEREF(__pyx_t_1);
60434  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
60435  __pyx_t_1 = 0;
60436  __pyx_t_1 = NULL;
60437  __pyx_t_7 = 0;
60438  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60439  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
60440  if (likely(__pyx_t_1)) {
60441  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60442  __Pyx_INCREF(__pyx_t_1);
60443  __Pyx_INCREF(function);
60444  __Pyx_DECREF_SET(__pyx_t_3, function);
60445  __pyx_t_7 = 1;
60446  }
60447  }
60448  #if CYTHON_FAST_PYCALL
60449  if (PyFunction_Check(__pyx_t_3)) {
60450  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
60451  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2617, __pyx_L1_error)
60452  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60453  __Pyx_GOTREF(__pyx_t_4);
60454  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60455  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60456  } else
60457  #endif
60458  #if CYTHON_FAST_PYCCALL
60459  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60460  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
60461  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2617, __pyx_L1_error)
60462  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60463  __Pyx_GOTREF(__pyx_t_4);
60464  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60465  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60466  } else
60467  #endif
60468  {
60469  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2617, __pyx_L1_error)
60470  __Pyx_GOTREF(__pyx_t_6);
60471  if (__pyx_t_1) {
60472  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
60473  }
60474  __Pyx_GIVEREF(__pyx_t_15);
60475  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
60476  __Pyx_GIVEREF(__pyx_t_8);
60477  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
60478  __pyx_t_15 = 0;
60479  __pyx_t_8 = 0;
60480  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2617, __pyx_L1_error)
60481  __Pyx_GOTREF(__pyx_t_4);
60482  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60483  }
60484  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60485  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60486  __pyx_t_4 = 0;
60487 
60488  /* "mbd/CouplingFSI.pyx":2618
60489  * dset[...] = datav[:,0]
60490  * dset = f.create_dataset('dragy_t'+str(tCount), (datav.shape[0],))
60491  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
60492  * dset = f.create_dataset('dragz_t'+str(tCount), (datav.shape[0],))
60493  * dset[...] = datav[:,2]
60494  */
60495  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__152); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
60496  __Pyx_GOTREF(__pyx_t_4);
60497  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2618, __pyx_L1_error)
60498  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60499 
60500  /* "mbd/CouplingFSI.pyx":2619
60501  * dset = f.create_dataset('dragy_t'+str(tCount), (datav.shape[0],))
60502  * dset[...] = datav[:,1]
60503  * dset = f.create_dataset('dragz_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60504  * dset[...] = datav[:,2]
60505  * # addedmass
60506  */
60507  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2619, __pyx_L1_error)
60508  __Pyx_GOTREF(__pyx_t_3);
60509  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2619, __pyx_L1_error)
60510  __Pyx_GOTREF(__pyx_t_6);
60511  __pyx_t_8 = PyNumber_Add(__pyx_n_s_dragz_t, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2619, __pyx_L1_error)
60512  __Pyx_GOTREF(__pyx_t_8);
60513  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60514  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2619, __pyx_L1_error)
60515  __Pyx_GOTREF(__pyx_t_6);
60516  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2619, __pyx_L1_error)
60517  __Pyx_GOTREF(__pyx_t_15);
60518  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60519  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2619, __pyx_L1_error)
60520  __Pyx_GOTREF(__pyx_t_6);
60521  __Pyx_GIVEREF(__pyx_t_15);
60522  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
60523  __pyx_t_15 = 0;
60524  __pyx_t_15 = NULL;
60525  __pyx_t_7 = 0;
60526  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60527  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_3);
60528  if (likely(__pyx_t_15)) {
60529  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60530  __Pyx_INCREF(__pyx_t_15);
60531  __Pyx_INCREF(function);
60532  __Pyx_DECREF_SET(__pyx_t_3, function);
60533  __pyx_t_7 = 1;
60534  }
60535  }
60536  #if CYTHON_FAST_PYCALL
60537  if (PyFunction_Check(__pyx_t_3)) {
60538  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
60539  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2619, __pyx_L1_error)
60540  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
60541  __Pyx_GOTREF(__pyx_t_4);
60542  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60543  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60544  } else
60545  #endif
60546  #if CYTHON_FAST_PYCCALL
60547  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60548  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
60549  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2619, __pyx_L1_error)
60550  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
60551  __Pyx_GOTREF(__pyx_t_4);
60552  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60553  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60554  } else
60555  #endif
60556  {
60557  __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2619, __pyx_L1_error)
60558  __Pyx_GOTREF(__pyx_t_1);
60559  if (__pyx_t_15) {
60560  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
60561  }
60562  __Pyx_GIVEREF(__pyx_t_8);
60563  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_8);
60564  __Pyx_GIVEREF(__pyx_t_6);
60565  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
60566  __pyx_t_8 = 0;
60567  __pyx_t_6 = 0;
60568  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2619, __pyx_L1_error)
60569  __Pyx_GOTREF(__pyx_t_4);
60570  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60571  }
60572  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60573  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60574  __pyx_t_4 = 0;
60575 
60576  /* "mbd/CouplingFSI.pyx":2620
60577  * dset[...] = datav[:,1]
60578  * dset = f.create_dataset('dragz_t'+str(tCount), (datav.shape[0],))
60579  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
60580  * # addedmass
60581  * datav = self.getAddedMassForces()
60582  */
60583  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__153); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __pyx_L1_error)
60584  __Pyx_GOTREF(__pyx_t_4);
60585  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2620, __pyx_L1_error)
60586  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60587 
60588  /* "mbd/CouplingFSI.pyx":2622
60589  * dset[...] = datav[:,2]
60590  * # addedmass
60591  * datav = self.getAddedMassForces() # <<<<<<<<<<<<<<
60592  * dset = f.create_dataset('am_t'+str(tCount), datav.shape)
60593  * dset[...] = datav
60594  */
60595  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getAddedMassForces); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2622, __pyx_L1_error)
60596  __Pyx_GOTREF(__pyx_t_3);
60597  __pyx_t_1 = NULL;
60598  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60599  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
60600  if (likely(__pyx_t_1)) {
60601  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60602  __Pyx_INCREF(__pyx_t_1);
60603  __Pyx_INCREF(function);
60604  __Pyx_DECREF_SET(__pyx_t_3, function);
60605  }
60606  }
60607  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
60608  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60609  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2622, __pyx_L1_error)
60610  __Pyx_GOTREF(__pyx_t_4);
60611  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60612  __Pyx_DECREF_SET(__pyx_v_datav, __pyx_t_4);
60613  __pyx_t_4 = 0;
60614 
60615  /* "mbd/CouplingFSI.pyx":2623
60616  * # addedmass
60617  * datav = self.getAddedMassForces()
60618  * dset = f.create_dataset('am_t'+str(tCount), datav.shape) # <<<<<<<<<<<<<<
60619  * dset[...] = datav
60620  * dset = f.create_dataset('amx_t'+str(tCount), (datav.shape[0],))
60621  */
60622  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
60623  __Pyx_GOTREF(__pyx_t_3);
60624  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2623, __pyx_L1_error)
60625  __Pyx_GOTREF(__pyx_t_1);
60626  __pyx_t_6 = PyNumber_Add(__pyx_n_s_am_t, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2623, __pyx_L1_error)
60627  __Pyx_GOTREF(__pyx_t_6);
60628  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60629  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2623, __pyx_L1_error)
60630  __Pyx_GOTREF(__pyx_t_1);
60631  __pyx_t_8 = NULL;
60632  __pyx_t_7 = 0;
60633  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60634  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
60635  if (likely(__pyx_t_8)) {
60636  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60637  __Pyx_INCREF(__pyx_t_8);
60638  __Pyx_INCREF(function);
60639  __Pyx_DECREF_SET(__pyx_t_3, function);
60640  __pyx_t_7 = 1;
60641  }
60642  }
60643  #if CYTHON_FAST_PYCALL
60644  if (PyFunction_Check(__pyx_t_3)) {
60645  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
60646  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
60647  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
60648  __Pyx_GOTREF(__pyx_t_4);
60649  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60650  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60651  } else
60652  #endif
60653  #if CYTHON_FAST_PYCCALL
60654  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60655  PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_1};
60656  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
60657  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
60658  __Pyx_GOTREF(__pyx_t_4);
60659  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60660  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60661  } else
60662  #endif
60663  {
60664  __pyx_t_15 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2623, __pyx_L1_error)
60665  __Pyx_GOTREF(__pyx_t_15);
60666  if (__pyx_t_8) {
60667  __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_8); __pyx_t_8 = NULL;
60668  }
60669  __Pyx_GIVEREF(__pyx_t_6);
60670  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_7, __pyx_t_6);
60671  __Pyx_GIVEREF(__pyx_t_1);
60672  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_7, __pyx_t_1);
60673  __pyx_t_6 = 0;
60674  __pyx_t_1 = 0;
60675  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
60676  __Pyx_GOTREF(__pyx_t_4);
60677  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60678  }
60679  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60680  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60681  __pyx_t_4 = 0;
60682 
60683  /* "mbd/CouplingFSI.pyx":2624
60684  * datav = self.getAddedMassForces()
60685  * dset = f.create_dataset('am_t'+str(tCount), datav.shape)
60686  * dset[...] = datav # <<<<<<<<<<<<<<
60687  * dset = f.create_dataset('amx_t'+str(tCount), (datav.shape[0],))
60688  * dset[...] = datav[:,0]
60689  */
60690  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2624, __pyx_L1_error)
60691 
60692  /* "mbd/CouplingFSI.pyx":2625
60693  * dset = f.create_dataset('am_t'+str(tCount), datav.shape)
60694  * dset[...] = datav
60695  * dset = f.create_dataset('amx_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60696  * dset[...] = datav[:,0]
60697  * dset = f.create_dataset('amy_t'+str(tCount), (datav.shape[0],))
60698  */
60699  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1_error)
60700  __Pyx_GOTREF(__pyx_t_3);
60701  __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2625, __pyx_L1_error)
60702  __Pyx_GOTREF(__pyx_t_15);
60703  __pyx_t_1 = PyNumber_Add(__pyx_n_s_amx_t, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2625, __pyx_L1_error)
60704  __Pyx_GOTREF(__pyx_t_1);
60705  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60706  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2625, __pyx_L1_error)
60707  __Pyx_GOTREF(__pyx_t_15);
60708  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_15, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2625, __pyx_L1_error)
60709  __Pyx_GOTREF(__pyx_t_6);
60710  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60711  __pyx_t_15 = PyTuple_New(1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2625, __pyx_L1_error)
60712  __Pyx_GOTREF(__pyx_t_15);
60713  __Pyx_GIVEREF(__pyx_t_6);
60714  PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6);
60715  __pyx_t_6 = 0;
60716  __pyx_t_6 = NULL;
60717  __pyx_t_7 = 0;
60718  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60719  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
60720  if (likely(__pyx_t_6)) {
60721  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60722  __Pyx_INCREF(__pyx_t_6);
60723  __Pyx_INCREF(function);
60724  __Pyx_DECREF_SET(__pyx_t_3, function);
60725  __pyx_t_7 = 1;
60726  }
60727  }
60728  #if CYTHON_FAST_PYCALL
60729  if (PyFunction_Check(__pyx_t_3)) {
60730  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
60731  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1_error)
60732  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
60733  __Pyx_GOTREF(__pyx_t_4);
60734  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60735  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60736  } else
60737  #endif
60738  #if CYTHON_FAST_PYCCALL
60739  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60740  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_1, __pyx_t_15};
60741  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1_error)
60742  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
60743  __Pyx_GOTREF(__pyx_t_4);
60744  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60745  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60746  } else
60747  #endif
60748  {
60749  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2625, __pyx_L1_error)
60750  __Pyx_GOTREF(__pyx_t_8);
60751  if (__pyx_t_6) {
60752  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
60753  }
60754  __Pyx_GIVEREF(__pyx_t_1);
60755  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
60756  __Pyx_GIVEREF(__pyx_t_15);
60757  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_15);
60758  __pyx_t_1 = 0;
60759  __pyx_t_15 = 0;
60760  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1_error)
60761  __Pyx_GOTREF(__pyx_t_4);
60762  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60763  }
60764  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60765  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60766  __pyx_t_4 = 0;
60767 
60768  /* "mbd/CouplingFSI.pyx":2626
60769  * dset[...] = datav
60770  * dset = f.create_dataset('amx_t'+str(tCount), (datav.shape[0],))
60771  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
60772  * dset = f.create_dataset('amy_t'+str(tCount), (datav.shape[0],))
60773  * dset[...] = datav[:,1]
60774  */
60775  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__151); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2626, __pyx_L1_error)
60776  __Pyx_GOTREF(__pyx_t_4);
60777  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2626, __pyx_L1_error)
60778  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60779 
60780  /* "mbd/CouplingFSI.pyx":2627
60781  * dset = f.create_dataset('amx_t'+str(tCount), (datav.shape[0],))
60782  * dset[...] = datav[:,0]
60783  * dset = f.create_dataset('amy_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60784  * dset[...] = datav[:,1]
60785  * dset = f.create_dataset('amz_t'+str(tCount), (datav.shape[0],))
60786  */
60787  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2627, __pyx_L1_error)
60788  __Pyx_GOTREF(__pyx_t_3);
60789  __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2627, __pyx_L1_error)
60790  __Pyx_GOTREF(__pyx_t_8);
60791  __pyx_t_15 = PyNumber_Add(__pyx_n_s_amy_t, __pyx_t_8); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2627, __pyx_L1_error)
60792  __Pyx_GOTREF(__pyx_t_15);
60793  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60794  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2627, __pyx_L1_error)
60795  __Pyx_GOTREF(__pyx_t_8);
60796  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2627, __pyx_L1_error)
60797  __Pyx_GOTREF(__pyx_t_1);
60798  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60799  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2627, __pyx_L1_error)
60800  __Pyx_GOTREF(__pyx_t_8);
60801  __Pyx_GIVEREF(__pyx_t_1);
60802  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
60803  __pyx_t_1 = 0;
60804  __pyx_t_1 = NULL;
60805  __pyx_t_7 = 0;
60806  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60807  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
60808  if (likely(__pyx_t_1)) {
60809  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60810  __Pyx_INCREF(__pyx_t_1);
60811  __Pyx_INCREF(function);
60812  __Pyx_DECREF_SET(__pyx_t_3, function);
60813  __pyx_t_7 = 1;
60814  }
60815  }
60816  #if CYTHON_FAST_PYCALL
60817  if (PyFunction_Check(__pyx_t_3)) {
60818  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
60819  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2627, __pyx_L1_error)
60820  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60821  __Pyx_GOTREF(__pyx_t_4);
60822  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60823  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60824  } else
60825  #endif
60826  #if CYTHON_FAST_PYCCALL
60827  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60828  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_15, __pyx_t_8};
60829  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2627, __pyx_L1_error)
60830  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60831  __Pyx_GOTREF(__pyx_t_4);
60832  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
60833  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60834  } else
60835  #endif
60836  {
60837  __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2627, __pyx_L1_error)
60838  __Pyx_GOTREF(__pyx_t_6);
60839  if (__pyx_t_1) {
60840  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); __pyx_t_1 = NULL;
60841  }
60842  __Pyx_GIVEREF(__pyx_t_15);
60843  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_15);
60844  __Pyx_GIVEREF(__pyx_t_8);
60845  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
60846  __pyx_t_15 = 0;
60847  __pyx_t_8 = 0;
60848  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2627, __pyx_L1_error)
60849  __Pyx_GOTREF(__pyx_t_4);
60850  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60851  }
60852  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60853  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60854  __pyx_t_4 = 0;
60855 
60856  /* "mbd/CouplingFSI.pyx":2628
60857  * dset[...] = datav[:,0]
60858  * dset = f.create_dataset('amy_t'+str(tCount), (datav.shape[0],))
60859  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
60860  * dset = f.create_dataset('amz_t'+str(tCount), (datav.shape[0],))
60861  * dset[...] = datav[:,2]
60862  */
60863  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__152); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2628, __pyx_L1_error)
60864  __Pyx_GOTREF(__pyx_t_4);
60865  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2628, __pyx_L1_error)
60866  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60867 
60868  /* "mbd/CouplingFSI.pyx":2629
60869  * dset = f.create_dataset('amy_t'+str(tCount), (datav.shape[0],))
60870  * dset[...] = datav[:,1]
60871  * dset = f.create_dataset('amz_t'+str(tCount), (datav.shape[0],)) # <<<<<<<<<<<<<<
60872  * dset[...] = datav[:,2]
60873  * # close file
60874  */
60875  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2629, __pyx_L1_error)
60876  __Pyx_GOTREF(__pyx_t_3);
60877  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_tCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2629, __pyx_L1_error)
60878  __Pyx_GOTREF(__pyx_t_6);
60879  __pyx_t_8 = PyNumber_Add(__pyx_n_s_amz_t, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2629, __pyx_L1_error)
60880  __Pyx_GOTREF(__pyx_t_8);
60881  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60882  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_datav, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2629, __pyx_L1_error)
60883  __Pyx_GOTREF(__pyx_t_6);
60884  __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2629, __pyx_L1_error)
60885  __Pyx_GOTREF(__pyx_t_15);
60886  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60887  __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2629, __pyx_L1_error)
60888  __Pyx_GOTREF(__pyx_t_6);
60889  __Pyx_GIVEREF(__pyx_t_15);
60890  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_15);
60891  __pyx_t_15 = 0;
60892  __pyx_t_15 = NULL;
60893  __pyx_t_7 = 0;
60894  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60895  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_3);
60896  if (likely(__pyx_t_15)) {
60897  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60898  __Pyx_INCREF(__pyx_t_15);
60899  __Pyx_INCREF(function);
60900  __Pyx_DECREF_SET(__pyx_t_3, function);
60901  __pyx_t_7 = 1;
60902  }
60903  }
60904  #if CYTHON_FAST_PYCALL
60905  if (PyFunction_Check(__pyx_t_3)) {
60906  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
60907  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2629, __pyx_L1_error)
60908  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
60909  __Pyx_GOTREF(__pyx_t_4);
60910  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60911  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60912  } else
60913  #endif
60914  #if CYTHON_FAST_PYCCALL
60915  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
60916  PyObject *__pyx_temp[3] = {__pyx_t_15, __pyx_t_8, __pyx_t_6};
60917  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2629, __pyx_L1_error)
60918  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
60919  __Pyx_GOTREF(__pyx_t_4);
60920  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
60921  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
60922  } else
60923  #endif
60924  {
60925  __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2629, __pyx_L1_error)
60926  __Pyx_GOTREF(__pyx_t_1);
60927  if (__pyx_t_15) {
60928  __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_15); __pyx_t_15 = NULL;
60929  }
60930  __Pyx_GIVEREF(__pyx_t_8);
60931  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_8);
60932  __Pyx_GIVEREF(__pyx_t_6);
60933  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_t_6);
60934  __pyx_t_8 = 0;
60935  __pyx_t_6 = 0;
60936  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2629, __pyx_L1_error)
60937  __Pyx_GOTREF(__pyx_t_4);
60938  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
60939  }
60940  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60941  __Pyx_DECREF_SET(__pyx_v_dset, __pyx_t_4);
60942  __pyx_t_4 = 0;
60943 
60944  /* "mbd/CouplingFSI.pyx":2630
60945  * dset[...] = datav[:,1]
60946  * dset = f.create_dataset('amz_t'+str(tCount), (datav.shape[0],))
60947  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
60948  * # close file
60949  * f.close()
60950  */
60951  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_datav, __pyx_tuple__153); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2630, __pyx_L1_error)
60952  __Pyx_GOTREF(__pyx_t_4);
60953  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_t_4) < 0)) __PYX_ERR(0, 2630, __pyx_L1_error)
60954  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60955 
60956  /* "mbd/CouplingFSI.pyx":2632
60957  * dset[...] = datav[:,2]
60958  * # close file
60959  * f.close() # <<<<<<<<<<<<<<
60960  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
60961  *
60962  */
60963  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2632, __pyx_L1_error)
60964  __Pyx_GOTREF(__pyx_t_3);
60965  __pyx_t_1 = NULL;
60966  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
60967  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
60968  if (likely(__pyx_t_1)) {
60969  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
60970  __Pyx_INCREF(__pyx_t_1);
60971  __Pyx_INCREF(function);
60972  __Pyx_DECREF_SET(__pyx_t_3, function);
60973  }
60974  }
60975  __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
60976  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
60977  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2632, __pyx_L1_error)
60978  __Pyx_GOTREF(__pyx_t_4);
60979  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60980  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
60981 
60982  /* "mbd/CouplingFSI.pyx":2633
60983  * # close file
60984  * f.close()
60985  * Profiling.logEvent('finished recording h5 file of '+str(self.name)) # <<<<<<<<<<<<<<
60986  *
60987  * def _recordXML(self):
60988  */
60989  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
60990  __Pyx_GOTREF(__pyx_t_3);
60991  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2633, __pyx_L1_error)
60992  __Pyx_GOTREF(__pyx_t_1);
60993  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60994  __pyx_t_3 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
60995  __Pyx_GOTREF(__pyx_t_3);
60996  __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2633, __pyx_L1_error)
60997  __Pyx_GOTREF(__pyx_t_6);
60998  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
60999  __pyx_t_3 = PyNumber_Add(__pyx_kp_s_finished_recording_h5_file_of, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2633, __pyx_L1_error)
61000  __Pyx_GOTREF(__pyx_t_3);
61001  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
61002  __pyx_t_6 = NULL;
61003  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
61004  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
61005  if (likely(__pyx_t_6)) {
61006  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
61007  __Pyx_INCREF(__pyx_t_6);
61008  __Pyx_INCREF(function);
61009  __Pyx_DECREF_SET(__pyx_t_1, function);
61010  }
61011  }
61012  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3);
61013  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
61014  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
61015  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2633, __pyx_L1_error)
61016  __Pyx_GOTREF(__pyx_t_4);
61017  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61018  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61019 
61020  /* "mbd/CouplingFSI.pyx":2539
61021  * 'sz'+str(eta)]
61022  *
61023  * def _recordH5(self): # <<<<<<<<<<<<<<
61024  * Profiling.logEvent('recording h5 file of '+str(self.name))
61025  * tCount = self.tCount
61026  */
61027 
61028  /* function exit code */
61029  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
61030  goto __pyx_L0;
61031  __pyx_L1_error:;
61032  __Pyx_XDECREF(__pyx_t_1);
61033  __Pyx_XDECREF(__pyx_t_2);
61034  __Pyx_XDECREF(__pyx_t_3);
61035  __Pyx_XDECREF(__pyx_t_4);
61036  __Pyx_XDECREF(__pyx_t_6);
61037  __Pyx_XDECREF(__pyx_t_8);
61038  __Pyx_XDECREF(__pyx_t_15);
61039  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordH5", __pyx_clineno, __pyx_lineno, __pyx_filename);
61040  __pyx_r = NULL;
61041  __pyx_L0:;
61042  __Pyx_XDECREF(__pyx_v_tCount);
61043  __Pyx_XDECREF(__pyx_v_t);
61044  __Pyx_XDECREF(__pyx_v_hdfFileName);
61045  __Pyx_XDECREF(__pyx_v_f);
61046  __Pyx_XDECREF(__pyx_v_pos);
61047  __Pyx_XDECREF(__pyx_v_element_connection);
61048  __Pyx_XDECREF(__pyx_v_dset);
61049  __Pyx_XDECREF(__pyx_v_datav);
61050  __Pyx_XDECREF(__pyx_v_i);
61051  __Pyx_XDECREF(__pyx_v_eta);
61052  __Pyx_XGIVEREF(__pyx_r);
61053  __Pyx_TraceReturn(__pyx_r, 0);
61054  __Pyx_RefNannyFinishContext();
61055  return __pyx_r;
61056 }
61057 
61058 /* "mbd/CouplingFSI.pyx":2635
61059  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
61060  *
61061  * def _recordXML(self): # <<<<<<<<<<<<<<
61062  * Profiling.logEvent('recording xml file of '+str(self.name))
61063  * tCount = self.tCount
61064  */
61065 
61066 /* Python wrapper */
61067 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9_recordXML(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
61068 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_8_recordXML[] = "ProtChMoorings._recordXML(self)";
61069 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_9_recordXML = {"_recordXML", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9_recordXML, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_8_recordXML};
61070 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9_recordXML(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
61071  PyObject *__pyx_r = 0;
61072  __Pyx_RefNannyDeclarations
61073  __Pyx_RefNannySetupContext("_recordXML (wrapper)", 0);
61074  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8_recordXML(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
61075 
61076  /* function exit code */
61077  __Pyx_RefNannyFinishContext();
61078  return __pyx_r;
61079 }
61080 
61081 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8_recordXML(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
61082  int __pyx_v_tCount;
61083  PyObject *__pyx_v_t = NULL;
61084  PyObject *__pyx_v_xmlFile = NULL;
61085  PyObject *__pyx_v_root = NULL;
61086  PyObject *__pyx_v_domain = NULL;
61087  PyObject *__pyx_v_arGridCollection = NULL;
61088  PyObject *__pyx_v_Xdmf_ElementTopology = NULL;
61089  PyObject *__pyx_v_pos = NULL;
61090  Py_ssize_t __pyx_v_Xdmf_NumberOfElements;
61091  long __pyx_v_Xdmf_NodesPerElement;
61092  PyObject *__pyx_v_dataItemFormat = NULL;
61093  PyObject *__pyx_v_arGrid = NULL;
61094  CYTHON_UNUSED PyObject *__pyx_v_arTime = NULL;
61095  PyObject *__pyx_v_topology = NULL;
61096  PyObject *__pyx_v_elements = NULL;
61097  PyObject *__pyx_v_geometry = NULL;
61098  PyObject *__pyx_v_nodes = NULL;
61099  PyObject *__pyx_v_all_names = NULL;
61100  PyObject *__pyx_v_name = NULL;
61101  PyObject *__pyx_v_attr = NULL;
61102  PyObject *__pyx_v_data = NULL;
61103  PyObject *__pyx_v_tree = NULL;
61104  PyObject *__pyx_v_f = NULL;
61105  PyObject *__pyx_v_xmlHeader = NULL;
61106  PyObject *__pyx_v_hdfFileName = NULL;
61107  PyObject *__pyx_v_datav = NULL;
61108  PyObject *__pyx_v_dset = NULL;
61109  PyObject *__pyx_r = NULL;
61110  __Pyx_TraceDeclarations
61111  __Pyx_RefNannyDeclarations
61112  PyObject *__pyx_t_1 = NULL;
61113  PyObject *__pyx_t_2 = NULL;
61114  PyObject *__pyx_t_3 = NULL;
61115  PyObject *__pyx_t_4 = NULL;
61116  int __pyx_t_5;
61117  PyObject *__pyx_t_6 = NULL;
61118  PyObject *__pyx_t_7 = NULL;
61119  Py_ssize_t __pyx_t_8;
61120  PyObject *__pyx_t_9 = NULL;
61121  PyObject *__pyx_t_10 = NULL;
61122  PyObject *__pyx_t_11 = NULL;
61123  PyObject *(*__pyx_t_12)(PyObject *);
61124  PyObject *__pyx_t_13 = NULL;
61125  PyObject *__pyx_t_14 = NULL;
61126  PyObject *__pyx_t_15 = NULL;
61127  PyObject *__pyx_t_16 = NULL;
61128  PyObject *__pyx_t_17 = NULL;
61129  int __pyx_t_18;
61130  int __pyx_t_19;
61131  int __pyx_lineno = 0;
61132  const char *__pyx_filename = NULL;
61133  int __pyx_clineno = 0;
61134  __Pyx_TraceFrameInit(__pyx_codeobj__154)
61135  __Pyx_RefNannySetupContext("_recordXML", 0);
61136  __Pyx_TraceCall("_recordXML", __pyx_f[0], 2635, 0, __PYX_ERR(0, 2635, __pyx_L1_error));
61137 
61138  /* "mbd/CouplingFSI.pyx":2636
61139  *
61140  * def _recordXML(self):
61141  * Profiling.logEvent('recording xml file of '+str(self.name)) # <<<<<<<<<<<<<<
61142  * tCount = self.tCount
61143  * t = self.ProtChSystem.ChSystem.GetChTime()
61144  */
61145  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2636, __pyx_L1_error)
61146  __Pyx_GOTREF(__pyx_t_2);
61147  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2636, __pyx_L1_error)
61148  __Pyx_GOTREF(__pyx_t_3);
61149  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61150  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2636, __pyx_L1_error)
61151  __Pyx_GOTREF(__pyx_t_2);
61152  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2636, __pyx_L1_error)
61153  __Pyx_GOTREF(__pyx_t_4);
61154  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61155  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_recording_xml_file_of, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2636, __pyx_L1_error)
61156  __Pyx_GOTREF(__pyx_t_2);
61157  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61158  __pyx_t_4 = NULL;
61159  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
61160  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
61161  if (likely(__pyx_t_4)) {
61162  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
61163  __Pyx_INCREF(__pyx_t_4);
61164  __Pyx_INCREF(function);
61165  __Pyx_DECREF_SET(__pyx_t_3, function);
61166  }
61167  }
61168  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
61169  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
61170  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61171  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2636, __pyx_L1_error)
61172  __Pyx_GOTREF(__pyx_t_1);
61173  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
61174  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61175 
61176  /* "mbd/CouplingFSI.pyx":2637
61177  * def _recordXML(self):
61178  * Profiling.logEvent('recording xml file of '+str(self.name))
61179  * tCount = self.tCount # <<<<<<<<<<<<<<
61180  * t = self.ProtChSystem.ChSystem.GetChTime()
61181  * xmlFile = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+b'.xmf','utf-8')
61182  */
61183  __pyx_t_5 = __pyx_v_self->tCount;
61184  __pyx_v_tCount = __pyx_t_5;
61185 
61186  /* "mbd/CouplingFSI.pyx":2638
61187  * Profiling.logEvent('recording xml file of '+str(self.name))
61188  * tCount = self.tCount
61189  * t = self.ProtChSystem.ChSystem.GetChTime() # <<<<<<<<<<<<<<
61190  * xmlFile = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+b'.xmf','utf-8')
61191  * # if tCount == 0:
61192  */
61193  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2638, __pyx_L1_error)
61194  __Pyx_GOTREF(__pyx_t_3);
61195  __pyx_t_2 = NULL;
61196  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
61197  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
61198  if (likely(__pyx_t_2)) {
61199  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
61200  __Pyx_INCREF(__pyx_t_2);
61201  __Pyx_INCREF(function);
61202  __Pyx_DECREF_SET(__pyx_t_3, function);
61203  }
61204  }
61205  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
61206  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
61207  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2638, __pyx_L1_error)
61208  __Pyx_GOTREF(__pyx_t_1);
61209  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
61210  __pyx_v_t = __pyx_t_1;
61211  __pyx_t_1 = 0;
61212 
61213  /* "mbd/CouplingFSI.pyx":2639
61214  * tCount = self.tCount
61215  * t = self.ProtChSystem.ChSystem.GetChTime()
61216  * xmlFile = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+b'.xmf','utf-8') # <<<<<<<<<<<<<<
61217  * # if tCount == 0:
61218  * root = ET.Element("Xdmf",
61219  */
61220  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
61221  __Pyx_GOTREF(__pyx_t_3);
61222  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
61223  __Pyx_GOTREF(__pyx_t_2);
61224  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
61225  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
61226  __Pyx_GOTREF(__pyx_t_3);
61227  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61228  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
61229  __Pyx_GOTREF(__pyx_t_2);
61230  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logDir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2639, __pyx_L1_error)
61231  __Pyx_GOTREF(__pyx_t_4);
61232  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61233  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
61234  __Pyx_GOTREF(__pyx_t_2);
61235  __Pyx_GIVEREF(__pyx_t_4);
61236  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
61237  __Pyx_INCREF(__pyx_kp_s_utf_8);
61238  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
61239  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_utf_8);
61240  __pyx_t_4 = 0;
61241  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2639, __pyx_L1_error)
61242  __Pyx_GOTREF(__pyx_t_4);
61243  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61244  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
61245  __Pyx_GOTREF(__pyx_t_2);
61246  __pyx_t_6 = NULL;
61247  __pyx_t_5 = 0;
61248  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
61249  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
61250  if (likely(__pyx_t_6)) {
61251  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
61252  __Pyx_INCREF(__pyx_t_6);
61253  __Pyx_INCREF(function);
61254  __Pyx_DECREF_SET(__pyx_t_3, function);
61255  __pyx_t_5 = 1;
61256  }
61257  }
61258  #if CYTHON_FAST_PYCALL
61259  if (PyFunction_Check(__pyx_t_3)) {
61260  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_2};
61261  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
61262  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
61263  __Pyx_GOTREF(__pyx_t_1);
61264  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61265  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61266  } else
61267  #endif
61268  #if CYTHON_FAST_PYCCALL
61269  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
61270  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_2};
61271  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
61272  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
61273  __Pyx_GOTREF(__pyx_t_1);
61274  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61275  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61276  } else
61277  #endif
61278  {
61279  __pyx_t_7 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2639, __pyx_L1_error)
61280  __Pyx_GOTREF(__pyx_t_7);
61281  if (__pyx_t_6) {
61282  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
61283  }
61284  __Pyx_GIVEREF(__pyx_t_4);
61285  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_t_4);
61286  __Pyx_GIVEREF(__pyx_t_2);
61287  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_t_2);
61288  __pyx_t_4 = 0;
61289  __pyx_t_2 = 0;
61290  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
61291  __Pyx_GOTREF(__pyx_t_1);
61292  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61293  }
61294  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
61295  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_b_xmf); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
61296  __Pyx_GOTREF(__pyx_t_3);
61297  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61298  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
61299  __Pyx_GOTREF(__pyx_t_1);
61300  __Pyx_GIVEREF(__pyx_t_3);
61301  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
61302  __Pyx_INCREF(__pyx_kp_s_utf_8);
61303  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
61304  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s_utf_8);
61305  __pyx_t_3 = 0;
61306  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
61307  __Pyx_GOTREF(__pyx_t_3);
61308  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61309  __pyx_v_xmlFile = __pyx_t_3;
61310  __pyx_t_3 = 0;
61311 
61312  /* "mbd/CouplingFSI.pyx":2641
61313  * xmlFile = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name)+b'.xmf','utf-8')
61314  * # if tCount == 0:
61315  * root = ET.Element("Xdmf", # <<<<<<<<<<<<<<
61316  * {"Version": "2.0",
61317  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
61318  */
61319  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2641, __pyx_L1_error)
61320  __Pyx_GOTREF(__pyx_t_1);
61321  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_Element); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2641, __pyx_L1_error)
61322  __Pyx_GOTREF(__pyx_t_7);
61323  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61324 
61325  /* "mbd/CouplingFSI.pyx":2642
61326  * # if tCount == 0:
61327  * root = ET.Element("Xdmf",
61328  * {"Version": "2.0", # <<<<<<<<<<<<<<
61329  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
61330  * domain = ET.SubElement(root, "Domain")
61331  */
61332  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2642, __pyx_L1_error)
61333  __Pyx_GOTREF(__pyx_t_1);
61334  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Version, __pyx_kp_s_2_0) < 0) __PYX_ERR(0, 2642, __pyx_L1_error)
61335  if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s_xmlns_xi, __pyx_kp_s_http_www_w3_org_2001_XInclude) < 0) __PYX_ERR(0, 2642, __pyx_L1_error)
61336  __pyx_t_2 = NULL;
61337  __pyx_t_5 = 0;
61338  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
61339  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
61340  if (likely(__pyx_t_2)) {
61341  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
61342  __Pyx_INCREF(__pyx_t_2);
61343  __Pyx_INCREF(function);
61344  __Pyx_DECREF_SET(__pyx_t_7, function);
61345  __pyx_t_5 = 1;
61346  }
61347  }
61348  #if CYTHON_FAST_PYCALL
61349  if (PyFunction_Check(__pyx_t_7)) {
61350  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_Xdmf, __pyx_t_1};
61351  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2641, __pyx_L1_error)
61352  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
61353  __Pyx_GOTREF(__pyx_t_3);
61354  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61355  } else
61356  #endif
61357  #if CYTHON_FAST_PYCCALL
61358  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
61359  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_n_s_Xdmf, __pyx_t_1};
61360  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2641, __pyx_L1_error)
61361  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
61362  __Pyx_GOTREF(__pyx_t_3);
61363  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61364  } else
61365  #endif
61366  {
61367  __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2641, __pyx_L1_error)
61368  __Pyx_GOTREF(__pyx_t_4);
61369  if (__pyx_t_2) {
61370  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
61371  }
61372  __Pyx_INCREF(__pyx_n_s_Xdmf);
61373  __Pyx_GIVEREF(__pyx_n_s_Xdmf);
61374  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_n_s_Xdmf);
61375  __Pyx_GIVEREF(__pyx_t_1);
61376  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_1);
61377  __pyx_t_1 = 0;
61378  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2641, __pyx_L1_error)
61379  __Pyx_GOTREF(__pyx_t_3);
61380  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61381  }
61382  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61383  __pyx_v_root = __pyx_t_3;
61384  __pyx_t_3 = 0;
61385 
61386  /* "mbd/CouplingFSI.pyx":2644
61387  * {"Version": "2.0",
61388  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
61389  * domain = ET.SubElement(root, "Domain") # <<<<<<<<<<<<<<
61390  * arGridCollection = ET.SubElement(domain,
61391  * "Grid",
61392  */
61393  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ET); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2644, __pyx_L1_error)
61394  __Pyx_GOTREF(__pyx_t_7);
61395  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2644, __pyx_L1_error)
61396  __Pyx_GOTREF(__pyx_t_4);
61397  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61398  __pyx_t_7 = NULL;
61399  __pyx_t_5 = 0;
61400  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
61401  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
61402  if (likely(__pyx_t_7)) {
61403  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
61404  __Pyx_INCREF(__pyx_t_7);
61405  __Pyx_INCREF(function);
61406  __Pyx_DECREF_SET(__pyx_t_4, function);
61407  __pyx_t_5 = 1;
61408  }
61409  }
61410  #if CYTHON_FAST_PYCALL
61411  if (PyFunction_Check(__pyx_t_4)) {
61412  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_root, __pyx_n_s_Domain};
61413  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2644, __pyx_L1_error)
61414  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
61415  __Pyx_GOTREF(__pyx_t_3);
61416  } else
61417  #endif
61418  #if CYTHON_FAST_PYCCALL
61419  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
61420  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_root, __pyx_n_s_Domain};
61421  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2644, __pyx_L1_error)
61422  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
61423  __Pyx_GOTREF(__pyx_t_3);
61424  } else
61425  #endif
61426  {
61427  __pyx_t_1 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2644, __pyx_L1_error)
61428  __Pyx_GOTREF(__pyx_t_1);
61429  if (__pyx_t_7) {
61430  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
61431  }
61432  __Pyx_INCREF(__pyx_v_root);
61433  __Pyx_GIVEREF(__pyx_v_root);
61434  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_5, __pyx_v_root);
61435  __Pyx_INCREF(__pyx_n_s_Domain);
61436  __Pyx_GIVEREF(__pyx_n_s_Domain);
61437  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_5, __pyx_n_s_Domain);
61438  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2644, __pyx_L1_error)
61439  __Pyx_GOTREF(__pyx_t_3);
61440  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61441  }
61442  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61443  __pyx_v_domain = __pyx_t_3;
61444  __pyx_t_3 = 0;
61445 
61446  /* "mbd/CouplingFSI.pyx":2645
61447  * "xmlns:xi": "http://www.w3.org/2001/XInclude"})
61448  * domain = ET.SubElement(root, "Domain")
61449  * arGridCollection = ET.SubElement(domain, # <<<<<<<<<<<<<<
61450  * "Grid",
61451  * {"Name": "Mesh"+" Spatial_Domain",
61452  */
61453  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2645, __pyx_L1_error)
61454  __Pyx_GOTREF(__pyx_t_4);
61455  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error)
61456  __Pyx_GOTREF(__pyx_t_1);
61457  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61458 
61459  /* "mbd/CouplingFSI.pyx":2647
61460  * arGridCollection = ET.SubElement(domain,
61461  * "Grid",
61462  * {"Name": "Mesh"+" Spatial_Domain", # <<<<<<<<<<<<<<
61463  * "GridType": "Collection",
61464  * "CollectionType": "Temporal"})
61465  */
61466  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2647, __pyx_L1_error)
61467  __Pyx_GOTREF(__pyx_t_4);
61468  __pyx_t_7 = PyNumber_Add(__pyx_n_s_Mesh, __pyx_kp_s_Spatial_Domain); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2647, __pyx_L1_error)
61469  __Pyx_GOTREF(__pyx_t_7);
61470  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Name, __pyx_t_7) < 0) __PYX_ERR(0, 2647, __pyx_L1_error)
61471  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61472  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_GridType, __pyx_n_s_Collection) < 0) __PYX_ERR(0, 2647, __pyx_L1_error)
61473  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_CollectionType, __pyx_n_s_Temporal) < 0) __PYX_ERR(0, 2647, __pyx_L1_error)
61474  __pyx_t_7 = NULL;
61475  __pyx_t_5 = 0;
61476  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
61477  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
61478  if (likely(__pyx_t_7)) {
61479  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
61480  __Pyx_INCREF(__pyx_t_7);
61481  __Pyx_INCREF(function);
61482  __Pyx_DECREF_SET(__pyx_t_1, function);
61483  __pyx_t_5 = 1;
61484  }
61485  }
61486  #if CYTHON_FAST_PYCALL
61487  if (PyFunction_Check(__pyx_t_1)) {
61488  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_domain, __pyx_n_s_Grid, __pyx_t_4};
61489  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error)
61490  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
61491  __Pyx_GOTREF(__pyx_t_3);
61492  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61493  } else
61494  #endif
61495  #if CYTHON_FAST_PYCCALL
61496  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
61497  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_domain, __pyx_n_s_Grid, __pyx_t_4};
61498  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error)
61499  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
61500  __Pyx_GOTREF(__pyx_t_3);
61501  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61502  } else
61503  #endif
61504  {
61505  __pyx_t_2 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2645, __pyx_L1_error)
61506  __Pyx_GOTREF(__pyx_t_2);
61507  if (__pyx_t_7) {
61508  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
61509  }
61510  __Pyx_INCREF(__pyx_v_domain);
61511  __Pyx_GIVEREF(__pyx_v_domain);
61512  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_v_domain);
61513  __Pyx_INCREF(__pyx_n_s_Grid);
61514  __Pyx_GIVEREF(__pyx_n_s_Grid);
61515  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_n_s_Grid);
61516  __Pyx_GIVEREF(__pyx_t_4);
61517  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_5, __pyx_t_4);
61518  __pyx_t_4 = 0;
61519  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2645, __pyx_L1_error)
61520  __Pyx_GOTREF(__pyx_t_3);
61521  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61522  }
61523  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61524  __pyx_v_arGridCollection = __pyx_t_3;
61525  __pyx_t_3 = 0;
61526 
61527  /* "mbd/CouplingFSI.pyx":2655
61528  * # domain = root[0]
61529  * # arGridCollection = domain[0]
61530  * Xdmf_ElementTopology = "Polyline" # <<<<<<<<<<<<<<
61531  * pos = self.getNodesPosition()
61532  * Xdmf_NumberOfElements= len(pos)-1
61533  */
61534  __Pyx_INCREF(__pyx_n_s_Polyline);
61535  __pyx_v_Xdmf_ElementTopology = __pyx_n_s_Polyline;
61536 
61537  /* "mbd/CouplingFSI.pyx":2656
61538  * # arGridCollection = domain[0]
61539  * Xdmf_ElementTopology = "Polyline"
61540  * pos = self.getNodesPosition() # <<<<<<<<<<<<<<
61541  * Xdmf_NumberOfElements= len(pos)-1
61542  * Xdmf_NodesPerElement = 2
61543  */
61544  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getNodesPosition); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2656, __pyx_L1_error)
61545  __Pyx_GOTREF(__pyx_t_1);
61546  __pyx_t_2 = NULL;
61547  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
61548  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
61549  if (likely(__pyx_t_2)) {
61550  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
61551  __Pyx_INCREF(__pyx_t_2);
61552  __Pyx_INCREF(function);
61553  __Pyx_DECREF_SET(__pyx_t_1, function);
61554  }
61555  }
61556  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
61557  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
61558  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2656, __pyx_L1_error)
61559  __Pyx_GOTREF(__pyx_t_3);
61560  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61561  __pyx_v_pos = __pyx_t_3;
61562  __pyx_t_3 = 0;
61563 
61564  /* "mbd/CouplingFSI.pyx":2657
61565  * Xdmf_ElementTopology = "Polyline"
61566  * pos = self.getNodesPosition()
61567  * Xdmf_NumberOfElements= len(pos)-1 # <<<<<<<<<<<<<<
61568  * Xdmf_NodesPerElement = 2
61569  * dataItemFormat = "HDF"
61570  */
61571  __pyx_t_8 = PyObject_Length(__pyx_v_pos); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2657, __pyx_L1_error)
61572  __pyx_v_Xdmf_NumberOfElements = (__pyx_t_8 - 1);
61573 
61574  /* "mbd/CouplingFSI.pyx":2658
61575  * pos = self.getNodesPosition()
61576  * Xdmf_NumberOfElements= len(pos)-1
61577  * Xdmf_NodesPerElement = 2 # <<<<<<<<<<<<<<
61578  * dataItemFormat = "HDF"
61579  *
61580  */
61581  __pyx_v_Xdmf_NodesPerElement = 2;
61582 
61583  /* "mbd/CouplingFSI.pyx":2659
61584  * Xdmf_NumberOfElements= len(pos)-1
61585  * Xdmf_NodesPerElement = 2
61586  * dataItemFormat = "HDF" # <<<<<<<<<<<<<<
61587  *
61588  * arGrid = ET.SubElement(arGridCollection,
61589  */
61590  __Pyx_INCREF(__pyx_n_s_HDF);
61591  __pyx_v_dataItemFormat = __pyx_n_s_HDF;
61592 
61593  /* "mbd/CouplingFSI.pyx":2661
61594  * dataItemFormat = "HDF"
61595  *
61596  * arGrid = ET.SubElement(arGridCollection, # <<<<<<<<<<<<<<
61597  * "Grid",
61598  * {"GridType": "Uniform"})
61599  */
61600  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2661, __pyx_L1_error)
61601  __Pyx_GOTREF(__pyx_t_1);
61602  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2661, __pyx_L1_error)
61603  __Pyx_GOTREF(__pyx_t_2);
61604  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61605 
61606  /* "mbd/CouplingFSI.pyx":2663
61607  * arGrid = ET.SubElement(arGridCollection,
61608  * "Grid",
61609  * {"GridType": "Uniform"}) # <<<<<<<<<<<<<<
61610  * arTime = ET.SubElement(arGrid,
61611  * "Time",
61612  */
61613  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2663, __pyx_L1_error)
61614  __Pyx_GOTREF(__pyx_t_1);
61615  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_GridType, __pyx_n_s_Uniform) < 0) __PYX_ERR(0, 2663, __pyx_L1_error)
61616  __pyx_t_4 = NULL;
61617  __pyx_t_5 = 0;
61618  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
61619  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
61620  if (likely(__pyx_t_4)) {
61621  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
61622  __Pyx_INCREF(__pyx_t_4);
61623  __Pyx_INCREF(function);
61624  __Pyx_DECREF_SET(__pyx_t_2, function);
61625  __pyx_t_5 = 1;
61626  }
61627  }
61628  #if CYTHON_FAST_PYCALL
61629  if (PyFunction_Check(__pyx_t_2)) {
61630  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGridCollection, __pyx_n_s_Grid, __pyx_t_1};
61631  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2661, __pyx_L1_error)
61632  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
61633  __Pyx_GOTREF(__pyx_t_3);
61634  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61635  } else
61636  #endif
61637  #if CYTHON_FAST_PYCCALL
61638  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
61639  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGridCollection, __pyx_n_s_Grid, __pyx_t_1};
61640  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2661, __pyx_L1_error)
61641  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
61642  __Pyx_GOTREF(__pyx_t_3);
61643  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61644  } else
61645  #endif
61646  {
61647  __pyx_t_7 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2661, __pyx_L1_error)
61648  __Pyx_GOTREF(__pyx_t_7);
61649  if (__pyx_t_4) {
61650  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL;
61651  }
61652  __Pyx_INCREF(__pyx_v_arGridCollection);
61653  __Pyx_GIVEREF(__pyx_v_arGridCollection);
61654  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_5, __pyx_v_arGridCollection);
61655  __Pyx_INCREF(__pyx_n_s_Grid);
61656  __Pyx_GIVEREF(__pyx_n_s_Grid);
61657  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_5, __pyx_n_s_Grid);
61658  __Pyx_GIVEREF(__pyx_t_1);
61659  PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_5, __pyx_t_1);
61660  __pyx_t_1 = 0;
61661  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2661, __pyx_L1_error)
61662  __Pyx_GOTREF(__pyx_t_3);
61663  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61664  }
61665  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61666  __pyx_v_arGrid = __pyx_t_3;
61667  __pyx_t_3 = 0;
61668 
61669  /* "mbd/CouplingFSI.pyx":2664
61670  * "Grid",
61671  * {"GridType": "Uniform"})
61672  * arTime = ET.SubElement(arGrid, # <<<<<<<<<<<<<<
61673  * "Time",
61674  * {"Value": "{0:e}".format(t),
61675  */
61676  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2664, __pyx_L1_error)
61677  __Pyx_GOTREF(__pyx_t_2);
61678  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2664, __pyx_L1_error)
61679  __Pyx_GOTREF(__pyx_t_7);
61680  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61681 
61682  /* "mbd/CouplingFSI.pyx":2666
61683  * arTime = ET.SubElement(arGrid,
61684  * "Time",
61685  * {"Value": "{0:e}".format(t), # <<<<<<<<<<<<<<
61686  * "Name": "{0:d}".format(tCount)})
61687  * topology = ET.SubElement(arGrid,
61688  */
61689  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2666, __pyx_L1_error)
61690  __Pyx_GOTREF(__pyx_t_2);
61691  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_e, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2666, __pyx_L1_error)
61692  __Pyx_GOTREF(__pyx_t_4);
61693  __pyx_t_6 = NULL;
61694  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
61695  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
61696  if (likely(__pyx_t_6)) {
61697  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
61698  __Pyx_INCREF(__pyx_t_6);
61699  __Pyx_INCREF(function);
61700  __Pyx_DECREF_SET(__pyx_t_4, function);
61701  }
61702  }
61703  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_v_t) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_t);
61704  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
61705  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2666, __pyx_L1_error)
61706  __Pyx_GOTREF(__pyx_t_1);
61707  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61708  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Value, __pyx_t_1) < 0) __PYX_ERR(0, 2666, __pyx_L1_error)
61709  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61710 
61711  /* "mbd/CouplingFSI.pyx":2667
61712  * "Time",
61713  * {"Value": "{0:e}".format(t),
61714  * "Name": "{0:d}".format(tCount)}) # <<<<<<<<<<<<<<
61715  * topology = ET.SubElement(arGrid,
61716  * "Topology",
61717  */
61718  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_d, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2667, __pyx_L1_error)
61719  __Pyx_GOTREF(__pyx_t_4);
61720  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_tCount); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2667, __pyx_L1_error)
61721  __Pyx_GOTREF(__pyx_t_6);
61722  __pyx_t_9 = NULL;
61723  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
61724  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
61725  if (likely(__pyx_t_9)) {
61726  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
61727  __Pyx_INCREF(__pyx_t_9);
61728  __Pyx_INCREF(function);
61729  __Pyx_DECREF_SET(__pyx_t_4, function);
61730  }
61731  }
61732  __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6);
61733  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
61734  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
61735  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2667, __pyx_L1_error)
61736  __Pyx_GOTREF(__pyx_t_1);
61737  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61738  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Name, __pyx_t_1) < 0) __PYX_ERR(0, 2666, __pyx_L1_error)
61739  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61740  __pyx_t_1 = NULL;
61741  __pyx_t_5 = 0;
61742  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
61743  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
61744  if (likely(__pyx_t_1)) {
61745  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
61746  __Pyx_INCREF(__pyx_t_1);
61747  __Pyx_INCREF(function);
61748  __Pyx_DECREF_SET(__pyx_t_7, function);
61749  __pyx_t_5 = 1;
61750  }
61751  }
61752  #if CYTHON_FAST_PYCALL
61753  if (PyFunction_Check(__pyx_t_7)) {
61754  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_arGrid, __pyx_n_s_Time, __pyx_t_2};
61755  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
61756  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
61757  __Pyx_GOTREF(__pyx_t_3);
61758  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61759  } else
61760  #endif
61761  #if CYTHON_FAST_PYCCALL
61762  if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
61763  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_arGrid, __pyx_n_s_Time, __pyx_t_2};
61764  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
61765  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
61766  __Pyx_GOTREF(__pyx_t_3);
61767  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61768  } else
61769  #endif
61770  {
61771  __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2664, __pyx_L1_error)
61772  __Pyx_GOTREF(__pyx_t_4);
61773  if (__pyx_t_1) {
61774  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
61775  }
61776  __Pyx_INCREF(__pyx_v_arGrid);
61777  __Pyx_GIVEREF(__pyx_v_arGrid);
61778  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_arGrid);
61779  __Pyx_INCREF(__pyx_n_s_Time);
61780  __Pyx_GIVEREF(__pyx_n_s_Time);
61781  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_n_s_Time);
61782  __Pyx_GIVEREF(__pyx_t_2);
61783  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_t_2);
61784  __pyx_t_2 = 0;
61785  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2664, __pyx_L1_error)
61786  __Pyx_GOTREF(__pyx_t_3);
61787  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61788  }
61789  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61790  __pyx_v_arTime = __pyx_t_3;
61791  __pyx_t_3 = 0;
61792 
61793  /* "mbd/CouplingFSI.pyx":2668
61794  * {"Value": "{0:e}".format(t),
61795  * "Name": "{0:d}".format(tCount)})
61796  * topology = ET.SubElement(arGrid, # <<<<<<<<<<<<<<
61797  * "Topology",
61798  * {"Type": Xdmf_ElementTopology,
61799  */
61800  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ET); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2668, __pyx_L1_error)
61801  __Pyx_GOTREF(__pyx_t_7);
61802  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2668, __pyx_L1_error)
61803  __Pyx_GOTREF(__pyx_t_4);
61804  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61805 
61806  /* "mbd/CouplingFSI.pyx":2670
61807  * topology = ET.SubElement(arGrid,
61808  * "Topology",
61809  * {"Type": Xdmf_ElementTopology, # <<<<<<<<<<<<<<
61810  * "NumberOfElements": "{0:d}".format(Xdmf_NumberOfElements),
61811  * "NodesPerElement": "{0:d}".format(Xdmf_NodesPerElement),
61812  */
61813  __pyx_t_7 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2670, __pyx_L1_error)
61814  __Pyx_GOTREF(__pyx_t_7);
61815  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_Type, __pyx_v_Xdmf_ElementTopology) < 0) __PYX_ERR(0, 2670, __pyx_L1_error)
61816 
61817  /* "mbd/CouplingFSI.pyx":2671
61818  * "Topology",
61819  * {"Type": Xdmf_ElementTopology,
61820  * "NumberOfElements": "{0:d}".format(Xdmf_NumberOfElements), # <<<<<<<<<<<<<<
61821  * "NodesPerElement": "{0:d}".format(Xdmf_NodesPerElement),
61822  * })
61823  */
61824  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_d, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2671, __pyx_L1_error)
61825  __Pyx_GOTREF(__pyx_t_1);
61826  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_Xdmf_NumberOfElements); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2671, __pyx_L1_error)
61827  __Pyx_GOTREF(__pyx_t_6);
61828  __pyx_t_9 = NULL;
61829  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
61830  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
61831  if (likely(__pyx_t_9)) {
61832  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
61833  __Pyx_INCREF(__pyx_t_9);
61834  __Pyx_INCREF(function);
61835  __Pyx_DECREF_SET(__pyx_t_1, function);
61836  }
61837  }
61838  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6);
61839  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
61840  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
61841  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2671, __pyx_L1_error)
61842  __Pyx_GOTREF(__pyx_t_2);
61843  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61844  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_NumberOfElements, __pyx_t_2) < 0) __PYX_ERR(0, 2670, __pyx_L1_error)
61845  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61846 
61847  /* "mbd/CouplingFSI.pyx":2672
61848  * {"Type": Xdmf_ElementTopology,
61849  * "NumberOfElements": "{0:d}".format(Xdmf_NumberOfElements),
61850  * "NodesPerElement": "{0:d}".format(Xdmf_NodesPerElement), # <<<<<<<<<<<<<<
61851  * })
61852  *
61853  */
61854  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_d, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2672, __pyx_L1_error)
61855  __Pyx_GOTREF(__pyx_t_1);
61856  __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_Xdmf_NodesPerElement); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2672, __pyx_L1_error)
61857  __Pyx_GOTREF(__pyx_t_6);
61858  __pyx_t_9 = NULL;
61859  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
61860  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
61861  if (likely(__pyx_t_9)) {
61862  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
61863  __Pyx_INCREF(__pyx_t_9);
61864  __Pyx_INCREF(function);
61865  __Pyx_DECREF_SET(__pyx_t_1, function);
61866  }
61867  }
61868  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6);
61869  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
61870  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
61871  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2672, __pyx_L1_error)
61872  __Pyx_GOTREF(__pyx_t_2);
61873  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61874  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_NodesPerElement, __pyx_t_2) < 0) __PYX_ERR(0, 2670, __pyx_L1_error)
61875  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
61876  __pyx_t_2 = NULL;
61877  __pyx_t_5 = 0;
61878  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
61879  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
61880  if (likely(__pyx_t_2)) {
61881  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
61882  __Pyx_INCREF(__pyx_t_2);
61883  __Pyx_INCREF(function);
61884  __Pyx_DECREF_SET(__pyx_t_4, function);
61885  __pyx_t_5 = 1;
61886  }
61887  }
61888  #if CYTHON_FAST_PYCALL
61889  if (PyFunction_Check(__pyx_t_4)) {
61890  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_arGrid, __pyx_n_s_Topology, __pyx_t_7};
61891  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2668, __pyx_L1_error)
61892  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
61893  __Pyx_GOTREF(__pyx_t_3);
61894  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61895  } else
61896  #endif
61897  #if CYTHON_FAST_PYCCALL
61898  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
61899  PyObject *__pyx_temp[4] = {__pyx_t_2, __pyx_v_arGrid, __pyx_n_s_Topology, __pyx_t_7};
61900  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2668, __pyx_L1_error)
61901  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
61902  __Pyx_GOTREF(__pyx_t_3);
61903  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
61904  } else
61905  #endif
61906  {
61907  __pyx_t_1 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2668, __pyx_L1_error)
61908  __Pyx_GOTREF(__pyx_t_1);
61909  if (__pyx_t_2) {
61910  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
61911  }
61912  __Pyx_INCREF(__pyx_v_arGrid);
61913  __Pyx_GIVEREF(__pyx_v_arGrid);
61914  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_5, __pyx_v_arGrid);
61915  __Pyx_INCREF(__pyx_n_s_Topology);
61916  __Pyx_GIVEREF(__pyx_n_s_Topology);
61917  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_5, __pyx_n_s_Topology);
61918  __Pyx_GIVEREF(__pyx_t_7);
61919  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_5, __pyx_t_7);
61920  __pyx_t_7 = 0;
61921  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2668, __pyx_L1_error)
61922  __Pyx_GOTREF(__pyx_t_3);
61923  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
61924  }
61925  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61926  __pyx_v_topology = __pyx_t_3;
61927  __pyx_t_3 = 0;
61928 
61929  /* "mbd/CouplingFSI.pyx":2675
61930  * })
61931  *
61932  * elements = ET.SubElement(topology, # <<<<<<<<<<<<<<
61933  * "DataItem",
61934  * {"Format": dataItemFormat,
61935  */
61936  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2675, __pyx_L1_error)
61937  __Pyx_GOTREF(__pyx_t_4);
61938  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2675, __pyx_L1_error)
61939  __Pyx_GOTREF(__pyx_t_1);
61940  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
61941 
61942  /* "mbd/CouplingFSI.pyx":2677
61943  * elements = ET.SubElement(topology,
61944  * "DataItem",
61945  * {"Format": dataItemFormat, # <<<<<<<<<<<<<<
61946  * "DataType": "Int",
61947  * "Dimensions": "{0:d} {1:d}".format(Xdmf_NumberOfElements,
61948  */
61949  __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2677, __pyx_L1_error)
61950  __Pyx_GOTREF(__pyx_t_4);
61951  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Format, __pyx_v_dataItemFormat) < 0) __PYX_ERR(0, 2677, __pyx_L1_error)
61952  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_DataType, __pyx_n_s_Int) < 0) __PYX_ERR(0, 2677, __pyx_L1_error)
61953 
61954  /* "mbd/CouplingFSI.pyx":2679
61955  * {"Format": dataItemFormat,
61956  * "DataType": "Int",
61957  * "Dimensions": "{0:d} {1:d}".format(Xdmf_NumberOfElements, # <<<<<<<<<<<<<<
61958  * Xdmf_NodesPerElement)})
61959  * elements.text = "{0}.h5:/elementsSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
61960  */
61961  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_d_1_d, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2679, __pyx_L1_error)
61962  __Pyx_GOTREF(__pyx_t_2);
61963  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_Xdmf_NumberOfElements); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2679, __pyx_L1_error)
61964  __Pyx_GOTREF(__pyx_t_6);
61965 
61966  /* "mbd/CouplingFSI.pyx":2680
61967  * "DataType": "Int",
61968  * "Dimensions": "{0:d} {1:d}".format(Xdmf_NumberOfElements,
61969  * Xdmf_NodesPerElement)}) # <<<<<<<<<<<<<<
61970  * elements.text = "{0}.h5:/elementsSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
61971  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"})
61972  */
61973  __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_v_Xdmf_NodesPerElement); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2680, __pyx_L1_error)
61974  __Pyx_GOTREF(__pyx_t_9);
61975  __pyx_t_10 = NULL;
61976  __pyx_t_5 = 0;
61977  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
61978  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
61979  if (likely(__pyx_t_10)) {
61980  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
61981  __Pyx_INCREF(__pyx_t_10);
61982  __Pyx_INCREF(function);
61983  __Pyx_DECREF_SET(__pyx_t_2, function);
61984  __pyx_t_5 = 1;
61985  }
61986  }
61987  #if CYTHON_FAST_PYCALL
61988  if (PyFunction_Check(__pyx_t_2)) {
61989  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_6, __pyx_t_9};
61990  __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2679, __pyx_L1_error)
61991  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
61992  __Pyx_GOTREF(__pyx_t_7);
61993  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
61994  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
61995  } else
61996  #endif
61997  #if CYTHON_FAST_PYCCALL
61998  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
61999  PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_6, __pyx_t_9};
62000  __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2679, __pyx_L1_error)
62001  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
62002  __Pyx_GOTREF(__pyx_t_7);
62003  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
62004  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
62005  } else
62006  #endif
62007  {
62008  __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2679, __pyx_L1_error)
62009  __Pyx_GOTREF(__pyx_t_11);
62010  if (__pyx_t_10) {
62011  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
62012  }
62013  __Pyx_GIVEREF(__pyx_t_6);
62014  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_5, __pyx_t_6);
62015  __Pyx_GIVEREF(__pyx_t_9);
62016  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_5, __pyx_t_9);
62017  __pyx_t_6 = 0;
62018  __pyx_t_9 = 0;
62019  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2679, __pyx_L1_error)
62020  __Pyx_GOTREF(__pyx_t_7);
62021  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62022  }
62023  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62024  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_Dimensions, __pyx_t_7) < 0) __PYX_ERR(0, 2677, __pyx_L1_error)
62025  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
62026  __pyx_t_7 = NULL;
62027  __pyx_t_5 = 0;
62028  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
62029  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
62030  if (likely(__pyx_t_7)) {
62031  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62032  __Pyx_INCREF(__pyx_t_7);
62033  __Pyx_INCREF(function);
62034  __Pyx_DECREF_SET(__pyx_t_1, function);
62035  __pyx_t_5 = 1;
62036  }
62037  }
62038  #if CYTHON_FAST_PYCALL
62039  if (PyFunction_Check(__pyx_t_1)) {
62040  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_topology, __pyx_n_s_DataItem, __pyx_t_4};
62041  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __pyx_L1_error)
62042  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
62043  __Pyx_GOTREF(__pyx_t_3);
62044  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62045  } else
62046  #endif
62047  #if CYTHON_FAST_PYCCALL
62048  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
62049  PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_topology, __pyx_n_s_DataItem, __pyx_t_4};
62050  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __pyx_L1_error)
62051  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
62052  __Pyx_GOTREF(__pyx_t_3);
62053  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62054  } else
62055  #endif
62056  {
62057  __pyx_t_2 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2675, __pyx_L1_error)
62058  __Pyx_GOTREF(__pyx_t_2);
62059  if (__pyx_t_7) {
62060  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7); __pyx_t_7 = NULL;
62061  }
62062  __Pyx_INCREF(__pyx_v_topology);
62063  __Pyx_GIVEREF(__pyx_v_topology);
62064  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_v_topology);
62065  __Pyx_INCREF(__pyx_n_s_DataItem);
62066  __Pyx_GIVEREF(__pyx_n_s_DataItem);
62067  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_n_s_DataItem);
62068  __Pyx_GIVEREF(__pyx_t_4);
62069  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_5, __pyx_t_4);
62070  __pyx_t_4 = 0;
62071  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2675, __pyx_L1_error)
62072  __Pyx_GOTREF(__pyx_t_3);
62073  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62074  }
62075  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62076  __pyx_v_elements = __pyx_t_3;
62077  __pyx_t_3 = 0;
62078 
62079  /* "mbd/CouplingFSI.pyx":2681
62080  * "Dimensions": "{0:d} {1:d}".format(Xdmf_NumberOfElements,
62081  * Xdmf_NodesPerElement)})
62082  * elements.text = "{0}.h5:/elementsSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount) # <<<<<<<<<<<<<<
62083  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"})
62084  * nodes = ET.SubElement(geometry,
62085  */
62086  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_h5_elementsSpatial_Domain_1_d, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2681, __pyx_L1_error)
62087  __Pyx_GOTREF(__pyx_t_1);
62088  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2681, __pyx_L1_error)
62089  __Pyx_GOTREF(__pyx_t_2);
62090  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2681, __pyx_L1_error)
62091  __Pyx_GOTREF(__pyx_t_4);
62092  __Pyx_GIVEREF(__pyx_t_2);
62093  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
62094  __Pyx_INCREF(__pyx_kp_s_utf_8);
62095  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
62096  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_s_utf_8);
62097  __pyx_t_2 = 0;
62098  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2681, __pyx_L1_error)
62099  __Pyx_GOTREF(__pyx_t_2);
62100  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62101  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_tCount); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2681, __pyx_L1_error)
62102  __Pyx_GOTREF(__pyx_t_4);
62103  __pyx_t_7 = NULL;
62104  __pyx_t_5 = 0;
62105  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
62106  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
62107  if (likely(__pyx_t_7)) {
62108  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62109  __Pyx_INCREF(__pyx_t_7);
62110  __Pyx_INCREF(function);
62111  __Pyx_DECREF_SET(__pyx_t_1, function);
62112  __pyx_t_5 = 1;
62113  }
62114  }
62115  #if CYTHON_FAST_PYCALL
62116  if (PyFunction_Check(__pyx_t_1)) {
62117  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_t_4};
62118  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2681, __pyx_L1_error)
62119  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
62120  __Pyx_GOTREF(__pyx_t_3);
62121  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62122  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62123  } else
62124  #endif
62125  #if CYTHON_FAST_PYCCALL
62126  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
62127  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_t_4};
62128  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2681, __pyx_L1_error)
62129  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
62130  __Pyx_GOTREF(__pyx_t_3);
62131  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62132  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62133  } else
62134  #endif
62135  {
62136  __pyx_t_11 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2681, __pyx_L1_error)
62137  __Pyx_GOTREF(__pyx_t_11);
62138  if (__pyx_t_7) {
62139  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_7); __pyx_t_7 = NULL;
62140  }
62141  __Pyx_GIVEREF(__pyx_t_2);
62142  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_5, __pyx_t_2);
62143  __Pyx_GIVEREF(__pyx_t_4);
62144  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_5, __pyx_t_4);
62145  __pyx_t_2 = 0;
62146  __pyx_t_4 = 0;
62147  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2681, __pyx_L1_error)
62148  __Pyx_GOTREF(__pyx_t_3);
62149  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62150  }
62151  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62152  if (__Pyx_PyObject_SetAttrStr(__pyx_v_elements, __pyx_n_s_text, __pyx_t_3) < 0) __PYX_ERR(0, 2681, __pyx_L1_error)
62153  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62154 
62155  /* "mbd/CouplingFSI.pyx":2682
62156  * Xdmf_NodesPerElement)})
62157  * elements.text = "{0}.h5:/elementsSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
62158  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"}) # <<<<<<<<<<<<<<
62159  * nodes = ET.SubElement(geometry,
62160  * "DataItem",
62161  */
62162  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ET); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2682, __pyx_L1_error)
62163  __Pyx_GOTREF(__pyx_t_1);
62164  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2682, __pyx_L1_error)
62165  __Pyx_GOTREF(__pyx_t_11);
62166  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62167  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2682, __pyx_L1_error)
62168  __Pyx_GOTREF(__pyx_t_1);
62169  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Type, __pyx_n_s_XYZ) < 0) __PYX_ERR(0, 2682, __pyx_L1_error)
62170  __pyx_t_4 = NULL;
62171  __pyx_t_5 = 0;
62172  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
62173  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
62174  if (likely(__pyx_t_4)) {
62175  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
62176  __Pyx_INCREF(__pyx_t_4);
62177  __Pyx_INCREF(function);
62178  __Pyx_DECREF_SET(__pyx_t_11, function);
62179  __pyx_t_5 = 1;
62180  }
62181  }
62182  #if CYTHON_FAST_PYCALL
62183  if (PyFunction_Check(__pyx_t_11)) {
62184  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGrid, __pyx_n_s_Geometry, __pyx_t_1};
62185  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2682, __pyx_L1_error)
62186  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
62187  __Pyx_GOTREF(__pyx_t_3);
62188  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62189  } else
62190  #endif
62191  #if CYTHON_FAST_PYCCALL
62192  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
62193  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGrid, __pyx_n_s_Geometry, __pyx_t_1};
62194  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2682, __pyx_L1_error)
62195  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
62196  __Pyx_GOTREF(__pyx_t_3);
62197  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62198  } else
62199  #endif
62200  {
62201  __pyx_t_2 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2682, __pyx_L1_error)
62202  __Pyx_GOTREF(__pyx_t_2);
62203  if (__pyx_t_4) {
62204  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL;
62205  }
62206  __Pyx_INCREF(__pyx_v_arGrid);
62207  __Pyx_GIVEREF(__pyx_v_arGrid);
62208  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_v_arGrid);
62209  __Pyx_INCREF(__pyx_n_s_Geometry);
62210  __Pyx_GIVEREF(__pyx_n_s_Geometry);
62211  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_n_s_Geometry);
62212  __Pyx_GIVEREF(__pyx_t_1);
62213  PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_5, __pyx_t_1);
62214  __pyx_t_1 = 0;
62215  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2682, __pyx_L1_error)
62216  __Pyx_GOTREF(__pyx_t_3);
62217  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62218  }
62219  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62220  __pyx_v_geometry = __pyx_t_3;
62221  __pyx_t_3 = 0;
62222 
62223  /* "mbd/CouplingFSI.pyx":2683
62224  * elements.text = "{0}.h5:/elementsSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
62225  * geometry = ET.SubElement(arGrid,"Geometry",{"Type":"XYZ"})
62226  * nodes = ET.SubElement(geometry, # <<<<<<<<<<<<<<
62227  * "DataItem",
62228  * {"Format": dataItemFormat,
62229  */
62230  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_ET); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2683, __pyx_L1_error)
62231  __Pyx_GOTREF(__pyx_t_11);
62232  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2683, __pyx_L1_error)
62233  __Pyx_GOTREF(__pyx_t_2);
62234  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62235 
62236  /* "mbd/CouplingFSI.pyx":2685
62237  * nodes = ET.SubElement(geometry,
62238  * "DataItem",
62239  * {"Format": dataItemFormat, # <<<<<<<<<<<<<<
62240  * "DataType": "Float",
62241  * "Precision": "8",
62242  */
62243  __pyx_t_11 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2685, __pyx_L1_error)
62244  __Pyx_GOTREF(__pyx_t_11);
62245  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_Format, __pyx_v_dataItemFormat) < 0) __PYX_ERR(0, 2685, __pyx_L1_error)
62246  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_DataType, __pyx_n_s_Float) < 0) __PYX_ERR(0, 2685, __pyx_L1_error)
62247  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_Precision, __pyx_kp_s_8) < 0) __PYX_ERR(0, 2685, __pyx_L1_error)
62248 
62249  /* "mbd/CouplingFSI.pyx":2688
62250  * "DataType": "Float",
62251  * "Precision": "8",
62252  * "Dimensions": "{0:d} {1:d}".format(pos.shape[0], pos.shape[1])}) # <<<<<<<<<<<<<<
62253  * nodes.text = "{0}.h5:/nodesSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
62254  * all_names = self._record_names+self._record_etas_names
62255  */
62256  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_d_1_d, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2688, __pyx_L1_error)
62257  __Pyx_GOTREF(__pyx_t_4);
62258  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pos, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2688, __pyx_L1_error)
62259  __Pyx_GOTREF(__pyx_t_7);
62260  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2688, __pyx_L1_error)
62261  __Pyx_GOTREF(__pyx_t_9);
62262  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
62263  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_pos, __pyx_n_s_shape); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2688, __pyx_L1_error)
62264  __Pyx_GOTREF(__pyx_t_7);
62265  __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2688, __pyx_L1_error)
62266  __Pyx_GOTREF(__pyx_t_6);
62267  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
62268  __pyx_t_7 = NULL;
62269  __pyx_t_5 = 0;
62270  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
62271  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
62272  if (likely(__pyx_t_7)) {
62273  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
62274  __Pyx_INCREF(__pyx_t_7);
62275  __Pyx_INCREF(function);
62276  __Pyx_DECREF_SET(__pyx_t_4, function);
62277  __pyx_t_5 = 1;
62278  }
62279  }
62280  #if CYTHON_FAST_PYCALL
62281  if (PyFunction_Check(__pyx_t_4)) {
62282  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_6};
62283  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2688, __pyx_L1_error)
62284  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
62285  __Pyx_GOTREF(__pyx_t_1);
62286  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
62287  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
62288  } else
62289  #endif
62290  #if CYTHON_FAST_PYCCALL
62291  if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
62292  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_6};
62293  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2688, __pyx_L1_error)
62294  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
62295  __Pyx_GOTREF(__pyx_t_1);
62296  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
62297  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
62298  } else
62299  #endif
62300  {
62301  __pyx_t_10 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2688, __pyx_L1_error)
62302  __Pyx_GOTREF(__pyx_t_10);
62303  if (__pyx_t_7) {
62304  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
62305  }
62306  __Pyx_GIVEREF(__pyx_t_9);
62307  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_t_9);
62308  __Pyx_GIVEREF(__pyx_t_6);
62309  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_t_6);
62310  __pyx_t_9 = 0;
62311  __pyx_t_6 = 0;
62312  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2688, __pyx_L1_error)
62313  __Pyx_GOTREF(__pyx_t_1);
62314  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
62315  }
62316  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62317  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_Dimensions, __pyx_t_1) < 0) __PYX_ERR(0, 2685, __pyx_L1_error)
62318  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62319  __pyx_t_1 = NULL;
62320  __pyx_t_5 = 0;
62321  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
62322  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
62323  if (likely(__pyx_t_1)) {
62324  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
62325  __Pyx_INCREF(__pyx_t_1);
62326  __Pyx_INCREF(function);
62327  __Pyx_DECREF_SET(__pyx_t_2, function);
62328  __pyx_t_5 = 1;
62329  }
62330  }
62331  #if CYTHON_FAST_PYCALL
62332  if (PyFunction_Check(__pyx_t_2)) {
62333  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_geometry, __pyx_n_s_DataItem, __pyx_t_11};
62334  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2683, __pyx_L1_error)
62335  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
62336  __Pyx_GOTREF(__pyx_t_3);
62337  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62338  } else
62339  #endif
62340  #if CYTHON_FAST_PYCCALL
62341  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
62342  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_geometry, __pyx_n_s_DataItem, __pyx_t_11};
62343  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2683, __pyx_L1_error)
62344  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
62345  __Pyx_GOTREF(__pyx_t_3);
62346  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62347  } else
62348  #endif
62349  {
62350  __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2683, __pyx_L1_error)
62351  __Pyx_GOTREF(__pyx_t_4);
62352  if (__pyx_t_1) {
62353  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
62354  }
62355  __Pyx_INCREF(__pyx_v_geometry);
62356  __Pyx_GIVEREF(__pyx_v_geometry);
62357  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_geometry);
62358  __Pyx_INCREF(__pyx_n_s_DataItem);
62359  __Pyx_GIVEREF(__pyx_n_s_DataItem);
62360  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_n_s_DataItem);
62361  __Pyx_GIVEREF(__pyx_t_11);
62362  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_t_11);
62363  __pyx_t_11 = 0;
62364  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2683, __pyx_L1_error)
62365  __Pyx_GOTREF(__pyx_t_3);
62366  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62367  }
62368  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62369  __pyx_v_nodes = __pyx_t_3;
62370  __pyx_t_3 = 0;
62371 
62372  /* "mbd/CouplingFSI.pyx":2689
62373  * "Precision": "8",
62374  * "Dimensions": "{0:d} {1:d}".format(pos.shape[0], pos.shape[1])})
62375  * nodes.text = "{0}.h5:/nodesSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount) # <<<<<<<<<<<<<<
62376  * all_names = self._record_names+self._record_etas_names
62377  * for name in all_names:
62378  */
62379  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_h5_nodesSpatial_Domain_1_d, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2689, __pyx_L1_error)
62380  __Pyx_GOTREF(__pyx_t_2);
62381  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2689, __pyx_L1_error)
62382  __Pyx_GOTREF(__pyx_t_4);
62383  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2689, __pyx_L1_error)
62384  __Pyx_GOTREF(__pyx_t_11);
62385  __Pyx_GIVEREF(__pyx_t_4);
62386  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
62387  __Pyx_INCREF(__pyx_kp_s_utf_8);
62388  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
62389  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_s_utf_8);
62390  __pyx_t_4 = 0;
62391  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2689, __pyx_L1_error)
62392  __Pyx_GOTREF(__pyx_t_4);
62393  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62394  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_tCount); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2689, __pyx_L1_error)
62395  __Pyx_GOTREF(__pyx_t_11);
62396  __pyx_t_1 = NULL;
62397  __pyx_t_5 = 0;
62398  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
62399  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
62400  if (likely(__pyx_t_1)) {
62401  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
62402  __Pyx_INCREF(__pyx_t_1);
62403  __Pyx_INCREF(function);
62404  __Pyx_DECREF_SET(__pyx_t_2, function);
62405  __pyx_t_5 = 1;
62406  }
62407  }
62408  #if CYTHON_FAST_PYCALL
62409  if (PyFunction_Check(__pyx_t_2)) {
62410  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_t_11};
62411  __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2689, __pyx_L1_error)
62412  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
62413  __Pyx_GOTREF(__pyx_t_3);
62414  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62415  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62416  } else
62417  #endif
62418  #if CYTHON_FAST_PYCCALL
62419  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
62420  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_4, __pyx_t_11};
62421  __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2689, __pyx_L1_error)
62422  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
62423  __Pyx_GOTREF(__pyx_t_3);
62424  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62425  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62426  } else
62427  #endif
62428  {
62429  __pyx_t_10 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2689, __pyx_L1_error)
62430  __Pyx_GOTREF(__pyx_t_10);
62431  if (__pyx_t_1) {
62432  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL;
62433  }
62434  __Pyx_GIVEREF(__pyx_t_4);
62435  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_5, __pyx_t_4);
62436  __Pyx_GIVEREF(__pyx_t_11);
62437  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_5, __pyx_t_11);
62438  __pyx_t_4 = 0;
62439  __pyx_t_11 = 0;
62440  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2689, __pyx_L1_error)
62441  __Pyx_GOTREF(__pyx_t_3);
62442  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
62443  }
62444  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62445  if (__Pyx_PyObject_SetAttrStr(__pyx_v_nodes, __pyx_n_s_text, __pyx_t_3) < 0) __PYX_ERR(0, 2689, __pyx_L1_error)
62446  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62447 
62448  /* "mbd/CouplingFSI.pyx":2690
62449  * "Dimensions": "{0:d} {1:d}".format(pos.shape[0], pos.shape[1])})
62450  * nodes.text = "{0}.h5:/nodesSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
62451  * all_names = self._record_names+self._record_etas_names # <<<<<<<<<<<<<<
62452  * for name in all_names:
62453  * attr = ET.SubElement(arGrid,
62454  */
62455  __pyx_t_3 = PyNumber_Add(__pyx_v_self->_record_names, __pyx_v_self->_record_etas_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2690, __pyx_L1_error)
62456  __Pyx_GOTREF(__pyx_t_3);
62457  __pyx_v_all_names = __pyx_t_3;
62458  __pyx_t_3 = 0;
62459 
62460  /* "mbd/CouplingFSI.pyx":2691
62461  * nodes.text = "{0}.h5:/nodesSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
62462  * all_names = self._record_names+self._record_etas_names
62463  * for name in all_names: # <<<<<<<<<<<<<<
62464  * attr = ET.SubElement(arGrid,
62465  * "Attribute",
62466  */
62467  if (likely(PyList_CheckExact(__pyx_v_all_names)) || PyTuple_CheckExact(__pyx_v_all_names)) {
62468  __pyx_t_3 = __pyx_v_all_names; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
62469  __pyx_t_12 = NULL;
62470  } else {
62471  __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_all_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2691, __pyx_L1_error)
62472  __Pyx_GOTREF(__pyx_t_3);
62473  __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2691, __pyx_L1_error)
62474  }
62475  for (;;) {
62476  if (likely(!__pyx_t_12)) {
62477  if (likely(PyList_CheckExact(__pyx_t_3))) {
62478  if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
62479  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
62480  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2691, __pyx_L1_error)
62481  #else
62482  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error)
62483  __Pyx_GOTREF(__pyx_t_2);
62484  #endif
62485  } else {
62486  if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
62487  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
62488  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2691, __pyx_L1_error)
62489  #else
62490  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2691, __pyx_L1_error)
62491  __Pyx_GOTREF(__pyx_t_2);
62492  #endif
62493  }
62494  } else {
62495  __pyx_t_2 = __pyx_t_12(__pyx_t_3);
62496  if (unlikely(!__pyx_t_2)) {
62497  PyObject* exc_type = PyErr_Occurred();
62498  if (exc_type) {
62499  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
62500  else __PYX_ERR(0, 2691, __pyx_L1_error)
62501  }
62502  break;
62503  }
62504  __Pyx_GOTREF(__pyx_t_2);
62505  }
62506  __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
62507  __pyx_t_2 = 0;
62508 
62509  /* "mbd/CouplingFSI.pyx":2692
62510  * all_names = self._record_names+self._record_etas_names
62511  * for name in all_names:
62512  * attr = ET.SubElement(arGrid, # <<<<<<<<<<<<<<
62513  * "Attribute",
62514  * {"Name": name,
62515  */
62516  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ET); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2692, __pyx_L1_error)
62517  __Pyx_GOTREF(__pyx_t_10);
62518  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2692, __pyx_L1_error)
62519  __Pyx_GOTREF(__pyx_t_11);
62520  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
62521 
62522  /* "mbd/CouplingFSI.pyx":2694
62523  * attr = ET.SubElement(arGrid,
62524  * "Attribute",
62525  * {"Name": name, # <<<<<<<<<<<<<<
62526  * "AttributeType": "Scalar",
62527  * "Center": "Node"})
62528  */
62529  __pyx_t_10 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2694, __pyx_L1_error)
62530  __Pyx_GOTREF(__pyx_t_10);
62531  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_Name, __pyx_v_name) < 0) __PYX_ERR(0, 2694, __pyx_L1_error)
62532  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_AttributeType, __pyx_n_s_Scalar) < 0) __PYX_ERR(0, 2694, __pyx_L1_error)
62533  if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_Center, __pyx_n_s_Node) < 0) __PYX_ERR(0, 2694, __pyx_L1_error)
62534  __pyx_t_4 = NULL;
62535  __pyx_t_5 = 0;
62536  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
62537  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
62538  if (likely(__pyx_t_4)) {
62539  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
62540  __Pyx_INCREF(__pyx_t_4);
62541  __Pyx_INCREF(function);
62542  __Pyx_DECREF_SET(__pyx_t_11, function);
62543  __pyx_t_5 = 1;
62544  }
62545  }
62546  #if CYTHON_FAST_PYCALL
62547  if (PyFunction_Check(__pyx_t_11)) {
62548  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGrid, __pyx_n_s_Attribute, __pyx_t_10};
62549  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2692, __pyx_L1_error)
62550  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
62551  __Pyx_GOTREF(__pyx_t_2);
62552  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
62553  } else
62554  #endif
62555  #if CYTHON_FAST_PYCCALL
62556  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
62557  PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arGrid, __pyx_n_s_Attribute, __pyx_t_10};
62558  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2692, __pyx_L1_error)
62559  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
62560  __Pyx_GOTREF(__pyx_t_2);
62561  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
62562  } else
62563  #endif
62564  {
62565  __pyx_t_1 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2692, __pyx_L1_error)
62566  __Pyx_GOTREF(__pyx_t_1);
62567  if (__pyx_t_4) {
62568  __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
62569  }
62570  __Pyx_INCREF(__pyx_v_arGrid);
62571  __Pyx_GIVEREF(__pyx_v_arGrid);
62572  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_5, __pyx_v_arGrid);
62573  __Pyx_INCREF(__pyx_n_s_Attribute);
62574  __Pyx_GIVEREF(__pyx_n_s_Attribute);
62575  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_5, __pyx_n_s_Attribute);
62576  __Pyx_GIVEREF(__pyx_t_10);
62577  PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_5, __pyx_t_10);
62578  __pyx_t_10 = 0;
62579  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2692, __pyx_L1_error)
62580  __Pyx_GOTREF(__pyx_t_2);
62581  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62582  }
62583  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62584  __Pyx_XDECREF_SET(__pyx_v_attr, __pyx_t_2);
62585  __pyx_t_2 = 0;
62586 
62587  /* "mbd/CouplingFSI.pyx":2697
62588  * "AttributeType": "Scalar",
62589  * "Center": "Node"})
62590  * data = ET.SubElement(attr, # <<<<<<<<<<<<<<
62591  * "DataItem",
62592  * {"Format": dataItemFormat,
62593  */
62594  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_ET); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2697, __pyx_L1_error)
62595  __Pyx_GOTREF(__pyx_t_11);
62596  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error)
62597  __Pyx_GOTREF(__pyx_t_1);
62598  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62599 
62600  /* "mbd/CouplingFSI.pyx":2699
62601  * data = ET.SubElement(attr,
62602  * "DataItem",
62603  * {"Format": dataItemFormat, # <<<<<<<<<<<<<<
62604  * "DataType": "Float",
62605  * "Precision": "8",
62606  */
62607  __pyx_t_11 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2699, __pyx_L1_error)
62608  __Pyx_GOTREF(__pyx_t_11);
62609  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_Format, __pyx_v_dataItemFormat) < 0) __PYX_ERR(0, 2699, __pyx_L1_error)
62610  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_DataType, __pyx_n_s_Float) < 0) __PYX_ERR(0, 2699, __pyx_L1_error)
62611  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_Precision, __pyx_kp_s_8) < 0) __PYX_ERR(0, 2699, __pyx_L1_error)
62612 
62613  /* "mbd/CouplingFSI.pyx":2702
62614  * "DataType": "Float",
62615  * "Precision": "8",
62616  * "Dimensions": "{0:d}".format(pos.shape[0])}) # <<<<<<<<<<<<<<
62617  * data.text = "{0}.h5:/{1}_t{2:d}".format(str(self.hdfFileName,'utf-8'), name, tCount)
62618  *
62619  */
62620  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_d, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2702, __pyx_L1_error)
62621  __Pyx_GOTREF(__pyx_t_4);
62622  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pos, __pyx_n_s_shape); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2702, __pyx_L1_error)
62623  __Pyx_GOTREF(__pyx_t_6);
62624  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2702, __pyx_L1_error)
62625  __Pyx_GOTREF(__pyx_t_9);
62626  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
62627  __pyx_t_6 = NULL;
62628  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
62629  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
62630  if (likely(__pyx_t_6)) {
62631  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
62632  __Pyx_INCREF(__pyx_t_6);
62633  __Pyx_INCREF(function);
62634  __Pyx_DECREF_SET(__pyx_t_4, function);
62635  }
62636  }
62637  __pyx_t_10 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9);
62638  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
62639  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
62640  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2702, __pyx_L1_error)
62641  __Pyx_GOTREF(__pyx_t_10);
62642  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62643  if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_Dimensions, __pyx_t_10) < 0) __PYX_ERR(0, 2699, __pyx_L1_error)
62644  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
62645  __pyx_t_10 = NULL;
62646  __pyx_t_5 = 0;
62647  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
62648  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
62649  if (likely(__pyx_t_10)) {
62650  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62651  __Pyx_INCREF(__pyx_t_10);
62652  __Pyx_INCREF(function);
62653  __Pyx_DECREF_SET(__pyx_t_1, function);
62654  __pyx_t_5 = 1;
62655  }
62656  }
62657  #if CYTHON_FAST_PYCALL
62658  if (PyFunction_Check(__pyx_t_1)) {
62659  PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_attr, __pyx_n_s_DataItem, __pyx_t_11};
62660  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2697, __pyx_L1_error)
62661  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
62662  __Pyx_GOTREF(__pyx_t_2);
62663  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62664  } else
62665  #endif
62666  #if CYTHON_FAST_PYCCALL
62667  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
62668  PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_attr, __pyx_n_s_DataItem, __pyx_t_11};
62669  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2697, __pyx_L1_error)
62670  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
62671  __Pyx_GOTREF(__pyx_t_2);
62672  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62673  } else
62674  #endif
62675  {
62676  __pyx_t_4 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2697, __pyx_L1_error)
62677  __Pyx_GOTREF(__pyx_t_4);
62678  if (__pyx_t_10) {
62679  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10); __pyx_t_10 = NULL;
62680  }
62681  __Pyx_INCREF(__pyx_v_attr);
62682  __Pyx_GIVEREF(__pyx_v_attr);
62683  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_v_attr);
62684  __Pyx_INCREF(__pyx_n_s_DataItem);
62685  __Pyx_GIVEREF(__pyx_n_s_DataItem);
62686  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_n_s_DataItem);
62687  __Pyx_GIVEREF(__pyx_t_11);
62688  PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_5, __pyx_t_11);
62689  __pyx_t_11 = 0;
62690  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2697, __pyx_L1_error)
62691  __Pyx_GOTREF(__pyx_t_2);
62692  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62693  }
62694  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62695  __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_2);
62696  __pyx_t_2 = 0;
62697 
62698  /* "mbd/CouplingFSI.pyx":2703
62699  * "Precision": "8",
62700  * "Dimensions": "{0:d}".format(pos.shape[0])})
62701  * data.text = "{0}.h5:/{1}_t{2:d}".format(str(self.hdfFileName,'utf-8'), name, tCount) # <<<<<<<<<<<<<<
62702  *
62703  * tree = ET.ElementTree(root)
62704  */
62705  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_h5_1__t_2_d, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2703, __pyx_L1_error)
62706  __Pyx_GOTREF(__pyx_t_1);
62707  __pyx_t_4 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2703, __pyx_L1_error)
62708  __Pyx_GOTREF(__pyx_t_4);
62709  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2703, __pyx_L1_error)
62710  __Pyx_GOTREF(__pyx_t_11);
62711  __Pyx_GIVEREF(__pyx_t_4);
62712  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
62713  __Pyx_INCREF(__pyx_kp_s_utf_8);
62714  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
62715  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_s_utf_8);
62716  __pyx_t_4 = 0;
62717  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2703, __pyx_L1_error)
62718  __Pyx_GOTREF(__pyx_t_4);
62719  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62720  __pyx_t_11 = __Pyx_PyInt_From_int(__pyx_v_tCount); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2703, __pyx_L1_error)
62721  __Pyx_GOTREF(__pyx_t_11);
62722  __pyx_t_10 = NULL;
62723  __pyx_t_5 = 0;
62724  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
62725  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
62726  if (likely(__pyx_t_10)) {
62727  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62728  __Pyx_INCREF(__pyx_t_10);
62729  __Pyx_INCREF(function);
62730  __Pyx_DECREF_SET(__pyx_t_1, function);
62731  __pyx_t_5 = 1;
62732  }
62733  }
62734  #if CYTHON_FAST_PYCALL
62735  if (PyFunction_Check(__pyx_t_1)) {
62736  PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_4, __pyx_v_name, __pyx_t_11};
62737  __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2703, __pyx_L1_error)
62738  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
62739  __Pyx_GOTREF(__pyx_t_2);
62740  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62741  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62742  } else
62743  #endif
62744  #if CYTHON_FAST_PYCCALL
62745  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
62746  PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_t_4, __pyx_v_name, __pyx_t_11};
62747  __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2703, __pyx_L1_error)
62748  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
62749  __Pyx_GOTREF(__pyx_t_2);
62750  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
62751  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
62752  } else
62753  #endif
62754  {
62755  __pyx_t_9 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2703, __pyx_L1_error)
62756  __Pyx_GOTREF(__pyx_t_9);
62757  if (__pyx_t_10) {
62758  __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
62759  }
62760  __Pyx_GIVEREF(__pyx_t_4);
62761  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_5, __pyx_t_4);
62762  __Pyx_INCREF(__pyx_v_name);
62763  __Pyx_GIVEREF(__pyx_v_name);
62764  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_5, __pyx_v_name);
62765  __Pyx_GIVEREF(__pyx_t_11);
62766  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_5, __pyx_t_11);
62767  __pyx_t_4 = 0;
62768  __pyx_t_11 = 0;
62769  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2703, __pyx_L1_error)
62770  __Pyx_GOTREF(__pyx_t_2);
62771  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
62772  }
62773  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62774  if (__Pyx_PyObject_SetAttrStr(__pyx_v_data, __pyx_n_s_text, __pyx_t_2) < 0) __PYX_ERR(0, 2703, __pyx_L1_error)
62775  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62776 
62777  /* "mbd/CouplingFSI.pyx":2691
62778  * nodes.text = "{0}.h5:/nodesSpatial_Domain{1:d}".format(str(self.hdfFileName,'utf-8'),tCount)
62779  * all_names = self._record_names+self._record_etas_names
62780  * for name in all_names: # <<<<<<<<<<<<<<
62781  * attr = ET.SubElement(arGrid,
62782  * "Attribute",
62783  */
62784  }
62785  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62786 
62787  /* "mbd/CouplingFSI.pyx":2705
62788  * data.text = "{0}.h5:/{1}_t{2:d}".format(str(self.hdfFileName,'utf-8'), name, tCount)
62789  *
62790  * tree = ET.ElementTree(root) # <<<<<<<<<<<<<<
62791  *
62792  * with open(xmlFile, "wb") as f:
62793  */
62794  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ET); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2705, __pyx_L1_error)
62795  __Pyx_GOTREF(__pyx_t_2);
62796  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ElementTree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
62797  __Pyx_GOTREF(__pyx_t_1);
62798  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62799  __pyx_t_2 = NULL;
62800  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
62801  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
62802  if (likely(__pyx_t_2)) {
62803  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62804  __Pyx_INCREF(__pyx_t_2);
62805  __Pyx_INCREF(function);
62806  __Pyx_DECREF_SET(__pyx_t_1, function);
62807  }
62808  }
62809  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_v_root) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_root);
62810  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
62811  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2705, __pyx_L1_error)
62812  __Pyx_GOTREF(__pyx_t_3);
62813  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62814  __pyx_v_tree = __pyx_t_3;
62815  __pyx_t_3 = 0;
62816 
62817  /* "mbd/CouplingFSI.pyx":2707
62818  * tree = ET.ElementTree(root)
62819  *
62820  * with open(xmlFile, "wb") as f: # <<<<<<<<<<<<<<
62821  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
62822  * f.write(bytes(xmlHeader,"utf-8"))
62823  */
62824  /*with:*/ {
62825  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2707, __pyx_L1_error)
62826  __Pyx_GOTREF(__pyx_t_3);
62827  __Pyx_INCREF(__pyx_v_xmlFile);
62828  __Pyx_GIVEREF(__pyx_v_xmlFile);
62829  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xmlFile);
62830  __Pyx_INCREF(__pyx_n_s_wb);
62831  __Pyx_GIVEREF(__pyx_n_s_wb);
62832  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_wb);
62833  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2707, __pyx_L1_error)
62834  __Pyx_GOTREF(__pyx_t_1);
62835  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62836  __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2707, __pyx_L1_error)
62837  __Pyx_GOTREF(__pyx_t_13);
62838  __pyx_t_2 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2707, __pyx_L5_error)
62839  __Pyx_GOTREF(__pyx_t_2);
62840  __pyx_t_9 = NULL;
62841  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
62842  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
62843  if (likely(__pyx_t_9)) {
62844  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
62845  __Pyx_INCREF(__pyx_t_9);
62846  __Pyx_INCREF(function);
62847  __Pyx_DECREF_SET(__pyx_t_2, function);
62848  }
62849  }
62850  __pyx_t_3 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
62851  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
62852  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2707, __pyx_L5_error)
62853  __Pyx_GOTREF(__pyx_t_3);
62854  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62855  __pyx_t_2 = __pyx_t_3;
62856  __pyx_t_3 = 0;
62857  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62858  /*try:*/ {
62859  {
62860  __Pyx_PyThreadState_declare
62861  __Pyx_PyThreadState_assign
62862  __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
62863  __Pyx_XGOTREF(__pyx_t_14);
62864  __Pyx_XGOTREF(__pyx_t_15);
62865  __Pyx_XGOTREF(__pyx_t_16);
62866  /*try:*/ {
62867  __pyx_v_f = __pyx_t_2;
62868  __pyx_t_2 = 0;
62869 
62870  /* "mbd/CouplingFSI.pyx":2708
62871  *
62872  * with open(xmlFile, "wb") as f:
62873  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n" # <<<<<<<<<<<<<<
62874  * f.write(bytes(xmlHeader,"utf-8"))
62875  * indentXML(tree.getroot())
62876  */
62877  __Pyx_INCREF(__pyx_kp_s_xml_version_1_0_DOCTYPE_Xdmf_SY);
62878  __pyx_v_xmlHeader = __pyx_kp_s_xml_version_1_0_DOCTYPE_Xdmf_SY;
62879 
62880  /* "mbd/CouplingFSI.pyx":2709
62881  * with open(xmlFile, "wb") as f:
62882  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
62883  * f.write(bytes(xmlHeader,"utf-8")) # <<<<<<<<<<<<<<
62884  * indentXML(tree.getroot())
62885  * tree.write(f)
62886  */
62887  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2709, __pyx_L9_error)
62888  __Pyx_GOTREF(__pyx_t_1);
62889  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2709, __pyx_L9_error)
62890  __Pyx_GOTREF(__pyx_t_3);
62891  __Pyx_INCREF(__pyx_v_xmlHeader);
62892  __Pyx_GIVEREF(__pyx_v_xmlHeader);
62893  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_xmlHeader);
62894  __Pyx_INCREF(__pyx_kp_s_utf_8);
62895  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
62896  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
62897  __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2709, __pyx_L9_error)
62898  __Pyx_GOTREF(__pyx_t_9);
62899  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62900  __pyx_t_3 = NULL;
62901  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
62902  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
62903  if (likely(__pyx_t_3)) {
62904  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62905  __Pyx_INCREF(__pyx_t_3);
62906  __Pyx_INCREF(function);
62907  __Pyx_DECREF_SET(__pyx_t_1, function);
62908  }
62909  }
62910  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9);
62911  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
62912  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
62913  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2709, __pyx_L9_error)
62914  __Pyx_GOTREF(__pyx_t_2);
62915  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62916  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62917 
62918  /* "mbd/CouplingFSI.pyx":2710
62919  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
62920  * f.write(bytes(xmlHeader,"utf-8"))
62921  * indentXML(tree.getroot()) # <<<<<<<<<<<<<<
62922  * tree.write(f)
62923  *
62924  */
62925  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_indentXML); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2710, __pyx_L9_error)
62926  __Pyx_GOTREF(__pyx_t_1);
62927  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_tree, __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2710, __pyx_L9_error)
62928  __Pyx_GOTREF(__pyx_t_3);
62929  __pyx_t_11 = NULL;
62930  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
62931  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
62932  if (likely(__pyx_t_11)) {
62933  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
62934  __Pyx_INCREF(__pyx_t_11);
62935  __Pyx_INCREF(function);
62936  __Pyx_DECREF_SET(__pyx_t_3, function);
62937  }
62938  }
62939  __pyx_t_9 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
62940  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
62941  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2710, __pyx_L9_error)
62942  __Pyx_GOTREF(__pyx_t_9);
62943  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
62944  __pyx_t_3 = NULL;
62945  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
62946  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
62947  if (likely(__pyx_t_3)) {
62948  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62949  __Pyx_INCREF(__pyx_t_3);
62950  __Pyx_INCREF(function);
62951  __Pyx_DECREF_SET(__pyx_t_1, function);
62952  }
62953  }
62954  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9);
62955  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
62956  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
62957  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2710, __pyx_L9_error)
62958  __Pyx_GOTREF(__pyx_t_2);
62959  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62960  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62961 
62962  /* "mbd/CouplingFSI.pyx":2711
62963  * f.write(bytes(xmlHeader,"utf-8"))
62964  * indentXML(tree.getroot())
62965  * tree.write(f) # <<<<<<<<<<<<<<
62966  *
62967  * # dump xml str in h5 file
62968  */
62969  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tree, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2711, __pyx_L9_error)
62970  __Pyx_GOTREF(__pyx_t_1);
62971  __pyx_t_9 = NULL;
62972  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
62973  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
62974  if (likely(__pyx_t_9)) {
62975  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
62976  __Pyx_INCREF(__pyx_t_9);
62977  __Pyx_INCREF(function);
62978  __Pyx_DECREF_SET(__pyx_t_1, function);
62979  }
62980  }
62981  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_v_f) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_f);
62982  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
62983  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2711, __pyx_L9_error)
62984  __Pyx_GOTREF(__pyx_t_2);
62985  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
62986  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
62987 
62988  /* "mbd/CouplingFSI.pyx":2707
62989  * tree = ET.ElementTree(root)
62990  *
62991  * with open(xmlFile, "wb") as f: # <<<<<<<<<<<<<<
62992  * xmlHeader = "<?xml version=\"1.0\" ?>\n<!DOCTYPE Xdmf SYSTEM \"Xdmf.dtd\" []>\n"
62993  * f.write(bytes(xmlHeader,"utf-8"))
62994  */
62995  }
62996  __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
62997  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
62998  __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
62999  goto __pyx_L14_try_end;
63000  __pyx_L9_error:;
63001  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
63002  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
63003  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
63004  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
63005  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
63006  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
63007  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
63008  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
63009  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
63010  /*except:*/ {
63011  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
63012  if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_9) < 0) __PYX_ERR(0, 2707, __pyx_L11_except_error)
63013  __Pyx_GOTREF(__pyx_t_2);
63014  __Pyx_GOTREF(__pyx_t_1);
63015  __Pyx_GOTREF(__pyx_t_9);
63016  __pyx_t_3 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2707, __pyx_L11_except_error)
63017  __Pyx_GOTREF(__pyx_t_3);
63018  __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_3, NULL);
63019  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
63020  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63021  if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 2707, __pyx_L11_except_error)
63022  __Pyx_GOTREF(__pyx_t_17);
63023  __pyx_t_18 = __Pyx_PyObject_IsTrue(__pyx_t_17);
63024  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
63025  if (__pyx_t_18 < 0) __PYX_ERR(0, 2707, __pyx_L11_except_error)
63026  __pyx_t_19 = ((!(__pyx_t_18 != 0)) != 0);
63027  if (__pyx_t_19) {
63028  __Pyx_GIVEREF(__pyx_t_2);
63029  __Pyx_GIVEREF(__pyx_t_1);
63030  __Pyx_XGIVEREF(__pyx_t_9);
63031  __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_9);
63032  __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_9 = 0;
63033  __PYX_ERR(0, 2707, __pyx_L11_except_error)
63034  }
63035  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
63036  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
63037  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
63038  goto __pyx_L10_exception_handled;
63039  }
63040  __pyx_L11_except_error:;
63041  __Pyx_XGIVEREF(__pyx_t_14);
63042  __Pyx_XGIVEREF(__pyx_t_15);
63043  __Pyx_XGIVEREF(__pyx_t_16);
63044  __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
63045  goto __pyx_L1_error;
63046  __pyx_L10_exception_handled:;
63047  __Pyx_XGIVEREF(__pyx_t_14);
63048  __Pyx_XGIVEREF(__pyx_t_15);
63049  __Pyx_XGIVEREF(__pyx_t_16);
63050  __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
63051  __pyx_L14_try_end:;
63052  }
63053  }
63054  /*finally:*/ {
63055  /*normal exit:*/{
63056  if (__pyx_t_13) {
63057  __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__88, NULL);
63058  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
63059  if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 2707, __pyx_L1_error)
63060  __Pyx_GOTREF(__pyx_t_16);
63061  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
63062  }
63063  goto __pyx_L8;
63064  }
63065  __pyx_L8:;
63066  }
63067  goto __pyx_L18;
63068  __pyx_L5_error:;
63069  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
63070  goto __pyx_L1_error;
63071  __pyx_L18:;
63072  }
63073 
63074  /* "mbd/CouplingFSI.pyx":2714
63075  *
63076  * # dump xml str in h5 file
63077  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5' # <<<<<<<<<<<<<<
63078  * f = h5py.File(hdfFileName, 'a', libver='latest')
63079  * datav = ET.tostring(arGrid)
63080  */
63081  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error)
63082  __Pyx_GOTREF(__pyx_t_1);
63083  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
63084  __Pyx_GOTREF(__pyx_t_2);
63085  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63086  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error)
63087  __Pyx_GOTREF(__pyx_t_1);
63088  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63089  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
63090  __Pyx_GOTREF(__pyx_t_2);
63091  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logDir); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2714, __pyx_L1_error)
63092  __Pyx_GOTREF(__pyx_t_3);
63093  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63094  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
63095  __Pyx_GOTREF(__pyx_t_2);
63096  __Pyx_GIVEREF(__pyx_t_3);
63097  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
63098  __Pyx_INCREF(__pyx_kp_s_utf_8);
63099  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
63100  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_utf_8);
63101  __pyx_t_3 = 0;
63102  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2714, __pyx_L1_error)
63103  __Pyx_GOTREF(__pyx_t_3);
63104  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63105  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2714, __pyx_L1_error)
63106  __Pyx_GOTREF(__pyx_t_2);
63107  __pyx_t_11 = NULL;
63108  __pyx_t_5 = 0;
63109  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
63110  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
63111  if (likely(__pyx_t_11)) {
63112  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
63113  __Pyx_INCREF(__pyx_t_11);
63114  __Pyx_INCREF(function);
63115  __Pyx_DECREF_SET(__pyx_t_1, function);
63116  __pyx_t_5 = 1;
63117  }
63118  }
63119  #if CYTHON_FAST_PYCALL
63120  if (PyFunction_Check(__pyx_t_1)) {
63121  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_2};
63122  __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2714, __pyx_L1_error)
63123  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
63124  __Pyx_GOTREF(__pyx_t_9);
63125  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63126  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63127  } else
63128  #endif
63129  #if CYTHON_FAST_PYCCALL
63130  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
63131  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_2};
63132  __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2714, __pyx_L1_error)
63133  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
63134  __Pyx_GOTREF(__pyx_t_9);
63135  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63136  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63137  } else
63138  #endif
63139  {
63140  __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2714, __pyx_L1_error)
63141  __Pyx_GOTREF(__pyx_t_4);
63142  if (__pyx_t_11) {
63143  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_11); __pyx_t_11 = NULL;
63144  }
63145  __Pyx_GIVEREF(__pyx_t_3);
63146  PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_t_3);
63147  __Pyx_GIVEREF(__pyx_t_2);
63148  PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_t_2);
63149  __pyx_t_3 = 0;
63150  __pyx_t_2 = 0;
63151  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2714, __pyx_L1_error)
63152  __Pyx_GOTREF(__pyx_t_9);
63153  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63154  }
63155  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63156  __pyx_t_1 = PyNumber_Add(__pyx_t_9, __pyx_kp_b_h5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error)
63157  __Pyx_GOTREF(__pyx_t_1);
63158  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
63159  __pyx_v_hdfFileName = __pyx_t_1;
63160  __pyx_t_1 = 0;
63161 
63162  /* "mbd/CouplingFSI.pyx":2715
63163  * # dump xml str in h5 file
63164  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
63165  * f = h5py.File(hdfFileName, 'a', libver='latest') # <<<<<<<<<<<<<<
63166  * datav = ET.tostring(arGrid)
63167  * dset = f.create_dataset('Mesh_Spatial_Domain_{0:d}'.format(tCount),
63168  */
63169  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_h5py); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2715, __pyx_L1_error)
63170  __Pyx_GOTREF(__pyx_t_1);
63171  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_File); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2715, __pyx_L1_error)
63172  __Pyx_GOTREF(__pyx_t_9);
63173  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63174  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2715, __pyx_L1_error)
63175  __Pyx_GOTREF(__pyx_t_1);
63176  __Pyx_INCREF(__pyx_v_hdfFileName);
63177  __Pyx_GIVEREF(__pyx_v_hdfFileName);
63178  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_hdfFileName);
63179  __Pyx_INCREF(__pyx_n_s_a);
63180  __Pyx_GIVEREF(__pyx_n_s_a);
63181  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_a);
63182  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2715, __pyx_L1_error)
63183  __Pyx_GOTREF(__pyx_t_4);
63184  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_libver, __pyx_n_s_latest) < 0) __PYX_ERR(0, 2715, __pyx_L1_error)
63185  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2715, __pyx_L1_error)
63186  __Pyx_GOTREF(__pyx_t_2);
63187  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
63188  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63189  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63190  __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_2);
63191  __pyx_t_2 = 0;
63192 
63193  /* "mbd/CouplingFSI.pyx":2716
63194  * hdfFileName = os.path.join(bytes(Profiling.logDir,'utf-8'), self.hdfFileName)+b'.h5'
63195  * f = h5py.File(hdfFileName, 'a', libver='latest')
63196  * datav = ET.tostring(arGrid) # <<<<<<<<<<<<<<
63197  * dset = f.create_dataset('Mesh_Spatial_Domain_{0:d}'.format(tCount),
63198  * (1,),
63199  */
63200  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ET); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2716, __pyx_L1_error)
63201  __Pyx_GOTREF(__pyx_t_4);
63202  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2716, __pyx_L1_error)
63203  __Pyx_GOTREF(__pyx_t_1);
63204  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63205  __pyx_t_4 = NULL;
63206  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
63207  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
63208  if (likely(__pyx_t_4)) {
63209  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
63210  __Pyx_INCREF(__pyx_t_4);
63211  __Pyx_INCREF(function);
63212  __Pyx_DECREF_SET(__pyx_t_1, function);
63213  }
63214  }
63215  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_arGrid) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_arGrid);
63216  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
63217  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2716, __pyx_L1_error)
63218  __Pyx_GOTREF(__pyx_t_2);
63219  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63220  __pyx_v_datav = __pyx_t_2;
63221  __pyx_t_2 = 0;
63222 
63223  /* "mbd/CouplingFSI.pyx":2717
63224  * f = h5py.File(hdfFileName, 'a', libver='latest')
63225  * datav = ET.tostring(arGrid)
63226  * dset = f.create_dataset('Mesh_Spatial_Domain_{0:d}'.format(tCount), # <<<<<<<<<<<<<<
63227  * (1,),
63228  * dtype=h5py.special_dtype(vlen=str))
63229  */
63230  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_create_dataset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2717, __pyx_L1_error)
63231  __Pyx_GOTREF(__pyx_t_2);
63232  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_Mesh_Spatial_Domain__0_d, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2717, __pyx_L1_error)
63233  __Pyx_GOTREF(__pyx_t_4);
63234  __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_tCount); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2717, __pyx_L1_error)
63235  __Pyx_GOTREF(__pyx_t_9);
63236  __pyx_t_3 = NULL;
63237  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
63238  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
63239  if (likely(__pyx_t_3)) {
63240  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
63241  __Pyx_INCREF(__pyx_t_3);
63242  __Pyx_INCREF(function);
63243  __Pyx_DECREF_SET(__pyx_t_4, function);
63244  }
63245  }
63246  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9);
63247  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
63248  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
63249  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2717, __pyx_L1_error)
63250  __Pyx_GOTREF(__pyx_t_1);
63251  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63252 
63253  /* "mbd/CouplingFSI.pyx":2718
63254  * datav = ET.tostring(arGrid)
63255  * dset = f.create_dataset('Mesh_Spatial_Domain_{0:d}'.format(tCount),
63256  * (1,), # <<<<<<<<<<<<<<
63257  * dtype=h5py.special_dtype(vlen=str))
63258  * dset[...] = datav
63259  */
63260  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2717, __pyx_L1_error)
63261  __Pyx_GOTREF(__pyx_t_4);
63262  __Pyx_GIVEREF(__pyx_t_1);
63263  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
63264  __Pyx_INCREF(__pyx_tuple__91);
63265  __Pyx_GIVEREF(__pyx_tuple__91);
63266  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_tuple__91);
63267  __pyx_t_1 = 0;
63268 
63269  /* "mbd/CouplingFSI.pyx":2719
63270  * dset = f.create_dataset('Mesh_Spatial_Domain_{0:d}'.format(tCount),
63271  * (1,),
63272  * dtype=h5py.special_dtype(vlen=str)) # <<<<<<<<<<<<<<
63273  * dset[...] = datav
63274  * # close file
63275  */
63276  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2719, __pyx_L1_error)
63277  __Pyx_GOTREF(__pyx_t_1);
63278  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_h5py); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2719, __pyx_L1_error)
63279  __Pyx_GOTREF(__pyx_t_9);
63280  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_special_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2719, __pyx_L1_error)
63281  __Pyx_GOTREF(__pyx_t_3);
63282  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
63283  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2719, __pyx_L1_error)
63284  __Pyx_GOTREF(__pyx_t_9);
63285  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_vlen, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 2719, __pyx_L1_error)
63286  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2719, __pyx_L1_error)
63287  __Pyx_GOTREF(__pyx_t_11);
63288  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63289  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
63290  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 2719, __pyx_L1_error)
63291  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
63292 
63293  /* "mbd/CouplingFSI.pyx":2717
63294  * f = h5py.File(hdfFileName, 'a', libver='latest')
63295  * datav = ET.tostring(arGrid)
63296  * dset = f.create_dataset('Mesh_Spatial_Domain_{0:d}'.format(tCount), # <<<<<<<<<<<<<<
63297  * (1,),
63298  * dtype=h5py.special_dtype(vlen=str))
63299  */
63300  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2717, __pyx_L1_error)
63301  __Pyx_GOTREF(__pyx_t_11);
63302  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63303  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63304  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63305  __pyx_v_dset = __pyx_t_11;
63306  __pyx_t_11 = 0;
63307 
63308  /* "mbd/CouplingFSI.pyx":2720
63309  * (1,),
63310  * dtype=h5py.special_dtype(vlen=str))
63311  * dset[...] = datav # <<<<<<<<<<<<<<
63312  * # close file
63313  * f.close()
63314  */
63315  if (unlikely(PyObject_SetItem(__pyx_v_dset, Py_Ellipsis, __pyx_v_datav) < 0)) __PYX_ERR(0, 2720, __pyx_L1_error)
63316 
63317  /* "mbd/CouplingFSI.pyx":2722
63318  * dset[...] = datav
63319  * # close file
63320  * f.close() # <<<<<<<<<<<<<<
63321  * Profiling.logEvent('finished recording xmf file of '+str(self.name))
63322  *
63323  */
63324  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2722, __pyx_L1_error)
63325  __Pyx_GOTREF(__pyx_t_1);
63326  __pyx_t_4 = NULL;
63327  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
63328  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
63329  if (likely(__pyx_t_4)) {
63330  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
63331  __Pyx_INCREF(__pyx_t_4);
63332  __Pyx_INCREF(function);
63333  __Pyx_DECREF_SET(__pyx_t_1, function);
63334  }
63335  }
63336  __pyx_t_11 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
63337  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
63338  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2722, __pyx_L1_error)
63339  __Pyx_GOTREF(__pyx_t_11);
63340  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63341  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
63342 
63343  /* "mbd/CouplingFSI.pyx":2723
63344  * # close file
63345  * f.close()
63346  * Profiling.logEvent('finished recording xmf file of '+str(self.name)) # <<<<<<<<<<<<<<
63347  *
63348  * def _recordValues(self):
63349  */
63350  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2723, __pyx_L1_error)
63351  __Pyx_GOTREF(__pyx_t_1);
63352  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2723, __pyx_L1_error)
63353  __Pyx_GOTREF(__pyx_t_4);
63354  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63355  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2723, __pyx_L1_error)
63356  __Pyx_GOTREF(__pyx_t_1);
63357  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2723, __pyx_L1_error)
63358  __Pyx_GOTREF(__pyx_t_2);
63359  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63360  __pyx_t_1 = PyNumber_Add(__pyx_kp_s_finished_recording_xmf_file_of, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2723, __pyx_L1_error)
63361  __Pyx_GOTREF(__pyx_t_1);
63362  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63363  __pyx_t_2 = NULL;
63364  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
63365  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
63366  if (likely(__pyx_t_2)) {
63367  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
63368  __Pyx_INCREF(__pyx_t_2);
63369  __Pyx_INCREF(function);
63370  __Pyx_DECREF_SET(__pyx_t_4, function);
63371  }
63372  }
63373  __pyx_t_11 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1);
63374  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
63375  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63376  if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2723, __pyx_L1_error)
63377  __Pyx_GOTREF(__pyx_t_11);
63378  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63379  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
63380 
63381  /* "mbd/CouplingFSI.pyx":2635
63382  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
63383  *
63384  * def _recordXML(self): # <<<<<<<<<<<<<<
63385  * Profiling.logEvent('recording xml file of '+str(self.name))
63386  * tCount = self.tCount
63387  */
63388 
63389  /* function exit code */
63390  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
63391  goto __pyx_L0;
63392  __pyx_L1_error:;
63393  __Pyx_XDECREF(__pyx_t_1);
63394  __Pyx_XDECREF(__pyx_t_2);
63395  __Pyx_XDECREF(__pyx_t_3);
63396  __Pyx_XDECREF(__pyx_t_4);
63397  __Pyx_XDECREF(__pyx_t_6);
63398  __Pyx_XDECREF(__pyx_t_7);
63399  __Pyx_XDECREF(__pyx_t_9);
63400  __Pyx_XDECREF(__pyx_t_10);
63401  __Pyx_XDECREF(__pyx_t_11);
63402  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordXML", __pyx_clineno, __pyx_lineno, __pyx_filename);
63403  __pyx_r = NULL;
63404  __pyx_L0:;
63405  __Pyx_XDECREF(__pyx_v_t);
63406  __Pyx_XDECREF(__pyx_v_xmlFile);
63407  __Pyx_XDECREF(__pyx_v_root);
63408  __Pyx_XDECREF(__pyx_v_domain);
63409  __Pyx_XDECREF(__pyx_v_arGridCollection);
63410  __Pyx_XDECREF(__pyx_v_Xdmf_ElementTopology);
63411  __Pyx_XDECREF(__pyx_v_pos);
63412  __Pyx_XDECREF(__pyx_v_dataItemFormat);
63413  __Pyx_XDECREF(__pyx_v_arGrid);
63414  __Pyx_XDECREF(__pyx_v_arTime);
63415  __Pyx_XDECREF(__pyx_v_topology);
63416  __Pyx_XDECREF(__pyx_v_elements);
63417  __Pyx_XDECREF(__pyx_v_geometry);
63418  __Pyx_XDECREF(__pyx_v_nodes);
63419  __Pyx_XDECREF(__pyx_v_all_names);
63420  __Pyx_XDECREF(__pyx_v_name);
63421  __Pyx_XDECREF(__pyx_v_attr);
63422  __Pyx_XDECREF(__pyx_v_data);
63423  __Pyx_XDECREF(__pyx_v_tree);
63424  __Pyx_XDECREF(__pyx_v_f);
63425  __Pyx_XDECREF(__pyx_v_xmlHeader);
63426  __Pyx_XDECREF(__pyx_v_hdfFileName);
63427  __Pyx_XDECREF(__pyx_v_datav);
63428  __Pyx_XDECREF(__pyx_v_dset);
63429  __Pyx_XGIVEREF(__pyx_r);
63430  __Pyx_TraceReturn(__pyx_r, 0);
63431  __Pyx_RefNannyFinishContext();
63432  return __pyx_r;
63433 }
63434 
63435 /* "mbd/CouplingFSI.pyx":2725
63436  * Profiling.logEvent('finished recording xmf file of '+str(self.name))
63437  *
63438  * def _recordValues(self): # <<<<<<<<<<<<<<
63439  * """Records values in csv files
63440  * """
63441  */
63442 
63443 /* Python wrapper */
63444 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11_recordValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
63445 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_10_recordValues[] = "ProtChMoorings._recordValues(self)\nRecords values in csv files\n ";
63446 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_11_recordValues = {"_recordValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11_recordValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_10_recordValues};
63447 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11_recordValues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
63448  PyObject *__pyx_r = 0;
63449  __Pyx_RefNannyDeclarations
63450  __Pyx_RefNannySetupContext("_recordValues (wrapper)", 0);
63451  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10_recordValues(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
63452 
63453  /* function exit code */
63454  __Pyx_RefNannyFinishContext();
63455  return __pyx_r;
63456 }
63457 
63458 /* "mbd/CouplingFSI.pyx":2730
63459  * Profiling.logEvent('recording values file of '+str(self.name))
63460  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
63461  * def record(record_file, row, mode='a'): # <<<<<<<<<<<<<<
63462  * with open(record_file, mode) as csvfile:
63463  * writer = csv.writer(csvfile, delimiter=',')
63464  */
63465 
63466 /* Python wrapper */
63467 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_1record(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
63468 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_1record = {"record", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_1record, METH_VARARGS|METH_KEYWORDS, 0};
63469 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_1record(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
63470  PyObject *__pyx_v_record_file = 0;
63471  PyObject *__pyx_v_row = 0;
63472  PyObject *__pyx_v_mode = 0;
63473  int __pyx_lineno = 0;
63474  const char *__pyx_filename = NULL;
63475  int __pyx_clineno = 0;
63476  PyObject *__pyx_r = 0;
63477  __Pyx_RefNannyDeclarations
63478  __Pyx_RefNannySetupContext("record (wrapper)", 0);
63479  {
63480  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record_file,&__pyx_n_s_row,&__pyx_n_s_mode,0};
63481  PyObject* values[3] = {0,0,0};
63482  values[2] = ((PyObject *)((PyObject*)__pyx_n_s_a));
63483  if (unlikely(__pyx_kwds)) {
63484  Py_ssize_t kw_args;
63485  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
63486  switch (pos_args) {
63487  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
63488  CYTHON_FALLTHROUGH;
63489  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
63490  CYTHON_FALLTHROUGH;
63491  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
63492  CYTHON_FALLTHROUGH;
63493  case 0: break;
63494  default: goto __pyx_L5_argtuple_error;
63495  }
63496  kw_args = PyDict_Size(__pyx_kwds);
63497  switch (pos_args) {
63498  case 0:
63499  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record_file)) != 0)) kw_args--;
63500  else goto __pyx_L5_argtuple_error;
63501  CYTHON_FALLTHROUGH;
63502  case 1:
63503  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
63504  else {
63505  __Pyx_RaiseArgtupleInvalid("record", 0, 2, 3, 1); __PYX_ERR(0, 2730, __pyx_L3_error)
63506  }
63507  CYTHON_FALLTHROUGH;
63508  case 2:
63509  if (kw_args > 0) {
63510  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
63511  if (value) { values[2] = value; kw_args--; }
63512  }
63513  }
63514  if (unlikely(kw_args > 0)) {
63515  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "record") < 0)) __PYX_ERR(0, 2730, __pyx_L3_error)
63516  }
63517  } else {
63518  switch (PyTuple_GET_SIZE(__pyx_args)) {
63519  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
63520  CYTHON_FALLTHROUGH;
63521  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
63522  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
63523  break;
63524  default: goto __pyx_L5_argtuple_error;
63525  }
63526  }
63527  __pyx_v_record_file = values[0];
63528  __pyx_v_row = values[1];
63529  __pyx_v_mode = values[2];
63530  }
63531  goto __pyx_L4_argument_unpacking_done;
63532  __pyx_L5_argtuple_error:;
63533  __Pyx_RaiseArgtupleInvalid("record", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2730, __pyx_L3_error)
63534  __pyx_L3_error:;
63535  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordValues.record", __pyx_clineno, __pyx_lineno, __pyx_filename);
63536  __Pyx_RefNannyFinishContext();
63537  return NULL;
63538  __pyx_L4_argument_unpacking_done:;
63539  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_record(__pyx_self, __pyx_v_record_file, __pyx_v_row, __pyx_v_mode);
63540 
63541  /* function exit code */
63542  __Pyx_RefNannyFinishContext();
63543  return __pyx_r;
63544 }
63545 
63546 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_record(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_record_file, PyObject *__pyx_v_row, PyObject *__pyx_v_mode) {
63547  PyObject *__pyx_v_csvfile = NULL;
63548  PyObject *__pyx_v_writer = NULL;
63549  PyObject *__pyx_r = NULL;
63550  __Pyx_TraceDeclarations
63551  __Pyx_RefNannyDeclarations
63552  PyObject *__pyx_t_1 = NULL;
63553  PyObject *__pyx_t_2 = NULL;
63554  PyObject *__pyx_t_3 = NULL;
63555  PyObject *__pyx_t_4 = NULL;
63556  PyObject *__pyx_t_5 = NULL;
63557  PyObject *__pyx_t_6 = NULL;
63558  PyObject *__pyx_t_7 = NULL;
63559  PyObject *__pyx_t_8 = NULL;
63560  PyObject *__pyx_t_9 = NULL;
63561  int __pyx_t_10;
63562  int __pyx_t_11;
63563  int __pyx_lineno = 0;
63564  const char *__pyx_filename = NULL;
63565  int __pyx_clineno = 0;
63566  __Pyx_RefNannySetupContext("record", 0);
63567  __Pyx_TraceCall("record", __pyx_f[0], 2730, 0, __PYX_ERR(0, 2730, __pyx_L1_error));
63568 
63569  /* "mbd/CouplingFSI.pyx":2731
63570  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
63571  * def record(record_file, row, mode='a'):
63572  * with open(record_file, mode) as csvfile: # <<<<<<<<<<<<<<
63573  * writer = csv.writer(csvfile, delimiter=',')
63574  * writer.writerow(row)
63575  */
63576  /*with:*/ {
63577  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2731, __pyx_L1_error)
63578  __Pyx_GOTREF(__pyx_t_1);
63579  __Pyx_INCREF(__pyx_v_record_file);
63580  __Pyx_GIVEREF(__pyx_v_record_file);
63581  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_record_file);
63582  __Pyx_INCREF(__pyx_v_mode);
63583  __Pyx_GIVEREF(__pyx_v_mode);
63584  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_mode);
63585  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2731, __pyx_L1_error)
63586  __Pyx_GOTREF(__pyx_t_2);
63587  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63588  __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2731, __pyx_L1_error)
63589  __Pyx_GOTREF(__pyx_t_3);
63590  __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2731, __pyx_L3_error)
63591  __Pyx_GOTREF(__pyx_t_4);
63592  __pyx_t_5 = NULL;
63593  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
63594  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
63595  if (likely(__pyx_t_5)) {
63596  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
63597  __Pyx_INCREF(__pyx_t_5);
63598  __Pyx_INCREF(function);
63599  __Pyx_DECREF_SET(__pyx_t_4, function);
63600  }
63601  }
63602  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
63603  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
63604  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2731, __pyx_L3_error)
63605  __Pyx_GOTREF(__pyx_t_1);
63606  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63607  __pyx_t_4 = __pyx_t_1;
63608  __pyx_t_1 = 0;
63609  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63610  /*try:*/ {
63611  {
63612  __Pyx_PyThreadState_declare
63613  __Pyx_PyThreadState_assign
63614  __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
63615  __Pyx_XGOTREF(__pyx_t_6);
63616  __Pyx_XGOTREF(__pyx_t_7);
63617  __Pyx_XGOTREF(__pyx_t_8);
63618  /*try:*/ {
63619  __pyx_v_csvfile = __pyx_t_4;
63620  __pyx_t_4 = 0;
63621 
63622  /* "mbd/CouplingFSI.pyx":2732
63623  * def record(record_file, row, mode='a'):
63624  * with open(record_file, mode) as csvfile:
63625  * writer = csv.writer(csvfile, delimiter=',') # <<<<<<<<<<<<<<
63626  * writer.writerow(row)
63627  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
63628  */
63629  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_csv_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L7_error)
63630  __Pyx_GOTREF(__pyx_t_4);
63631  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_writer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2732, __pyx_L7_error)
63632  __Pyx_GOTREF(__pyx_t_2);
63633  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63634  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2732, __pyx_L7_error)
63635  __Pyx_GOTREF(__pyx_t_4);
63636  __Pyx_INCREF(__pyx_v_csvfile);
63637  __Pyx_GIVEREF(__pyx_v_csvfile);
63638  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_csvfile);
63639  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2732, __pyx_L7_error)
63640  __Pyx_GOTREF(__pyx_t_1);
63641  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_delimiter, __pyx_kp_s__87) < 0) __PYX_ERR(0, 2732, __pyx_L7_error)
63642  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2732, __pyx_L7_error)
63643  __Pyx_GOTREF(__pyx_t_5);
63644  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63645  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63646  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63647  __pyx_v_writer = __pyx_t_5;
63648  __pyx_t_5 = 0;
63649 
63650  /* "mbd/CouplingFSI.pyx":2733
63651  * with open(record_file, mode) as csvfile:
63652  * writer = csv.writer(csvfile, delimiter=',')
63653  * writer.writerow(row) # <<<<<<<<<<<<<<
63654  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
63655  * if self.ProtChSystem.model is not None:
63656  */
63657  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_writer, __pyx_n_s_writerow); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2733, __pyx_L7_error)
63658  __Pyx_GOTREF(__pyx_t_1);
63659  __pyx_t_4 = NULL;
63660  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
63661  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
63662  if (likely(__pyx_t_4)) {
63663  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
63664  __Pyx_INCREF(__pyx_t_4);
63665  __Pyx_INCREF(function);
63666  __Pyx_DECREF_SET(__pyx_t_1, function);
63667  }
63668  }
63669  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_row) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_row);
63670  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
63671  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2733, __pyx_L7_error)
63672  __Pyx_GOTREF(__pyx_t_5);
63673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63674  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
63675 
63676  /* "mbd/CouplingFSI.pyx":2731
63677  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
63678  * def record(record_file, row, mode='a'):
63679  * with open(record_file, mode) as csvfile: # <<<<<<<<<<<<<<
63680  * writer = csv.writer(csvfile, delimiter=',')
63681  * writer.writerow(row)
63682  */
63683  }
63684  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
63685  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
63686  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
63687  goto __pyx_L12_try_end;
63688  __pyx_L7_error:;
63689  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
63690  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
63691  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
63692  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
63693  /*except:*/ {
63694  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordValues.record", __pyx_clineno, __pyx_lineno, __pyx_filename);
63695  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 2731, __pyx_L9_except_error)
63696  __Pyx_GOTREF(__pyx_t_5);
63697  __Pyx_GOTREF(__pyx_t_1);
63698  __Pyx_GOTREF(__pyx_t_4);
63699  __pyx_t_2 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2731, __pyx_L9_except_error)
63700  __Pyx_GOTREF(__pyx_t_2);
63701  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL);
63702  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63703  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63704  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2731, __pyx_L9_except_error)
63705  __Pyx_GOTREF(__pyx_t_9);
63706  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_9);
63707  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
63708  if (__pyx_t_10 < 0) __PYX_ERR(0, 2731, __pyx_L9_except_error)
63709  __pyx_t_11 = ((!(__pyx_t_10 != 0)) != 0);
63710  if (__pyx_t_11) {
63711  __Pyx_GIVEREF(__pyx_t_5);
63712  __Pyx_GIVEREF(__pyx_t_1);
63713  __Pyx_XGIVEREF(__pyx_t_4);
63714  __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_1, __pyx_t_4);
63715  __pyx_t_5 = 0; __pyx_t_1 = 0; __pyx_t_4 = 0;
63716  __PYX_ERR(0, 2731, __pyx_L9_except_error)
63717  }
63718  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
63719  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
63720  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
63721  goto __pyx_L8_exception_handled;
63722  }
63723  __pyx_L9_except_error:;
63724  __Pyx_XGIVEREF(__pyx_t_6);
63725  __Pyx_XGIVEREF(__pyx_t_7);
63726  __Pyx_XGIVEREF(__pyx_t_8);
63727  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
63728  goto __pyx_L1_error;
63729  __pyx_L8_exception_handled:;
63730  __Pyx_XGIVEREF(__pyx_t_6);
63731  __Pyx_XGIVEREF(__pyx_t_7);
63732  __Pyx_XGIVEREF(__pyx_t_8);
63733  __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
63734  __pyx_L12_try_end:;
63735  }
63736  }
63737  /*finally:*/ {
63738  /*normal exit:*/{
63739  if (__pyx_t_3) {
63740  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__88, NULL);
63741  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63742  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2731, __pyx_L1_error)
63743  __Pyx_GOTREF(__pyx_t_8);
63744  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
63745  }
63746  goto __pyx_L6;
63747  }
63748  __pyx_L6:;
63749  }
63750  goto __pyx_L16;
63751  __pyx_L3_error:;
63752  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63753  goto __pyx_L1_error;
63754  __pyx_L16:;
63755  }
63756 
63757  /* "mbd/CouplingFSI.pyx":2730
63758  * Profiling.logEvent('recording values file of '+str(self.name))
63759  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
63760  * def record(record_file, row, mode='a'): # <<<<<<<<<<<<<<
63761  * with open(record_file, mode) as csvfile:
63762  * writer = csv.writer(csvfile, delimiter=',')
63763  */
63764 
63765  /* function exit code */
63766  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
63767  goto __pyx_L0;
63768  __pyx_L1_error:;
63769  __Pyx_XDECREF(__pyx_t_1);
63770  __Pyx_XDECREF(__pyx_t_2);
63771  __Pyx_XDECREF(__pyx_t_4);
63772  __Pyx_XDECREF(__pyx_t_5);
63773  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordValues.record", __pyx_clineno, __pyx_lineno, __pyx_filename);
63774  __pyx_r = NULL;
63775  __pyx_L0:;
63776  __Pyx_XDECREF(__pyx_v_csvfile);
63777  __Pyx_XDECREF(__pyx_v_writer);
63778  __Pyx_XGIVEREF(__pyx_r);
63779  __Pyx_TraceReturn(__pyx_r, 0);
63780  __Pyx_RefNannyFinishContext();
63781  return __pyx_r;
63782 }
63783 
63784 /* "mbd/CouplingFSI.pyx":2725
63785  * Profiling.logEvent('finished recording xmf file of '+str(self.name))
63786  *
63787  * def _recordValues(self): # <<<<<<<<<<<<<<
63788  * """Records values in csv files
63789  * """
63790  */
63791 
63792 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10_recordValues(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
63793  PyObject *__pyx_v_record = 0;
63794  PyObject *__pyx_v_t_chrono = NULL;
63795  PyObject *__pyx_v_t_last = NULL;
63796  CYTHON_UNUSED PyObject *__pyx_v_dt_last = NULL;
63797  PyObject *__pyx_v_t = NULL;
63798  PyObject *__pyx_v_t_sim = NULL;
63799  PyObject *__pyx_v_header_x = NULL;
63800  PyObject *__pyx_v_i = NULL;
63801  PyObject *__pyx_v_file_name = NULL;
63802  PyObject *__pyx_v_row = NULL;
63803  PyObject *__pyx_v_Tb = NULL;
63804  PyObject *__pyx_v_Tf = NULL;
63805  PyObject *__pyx_r = NULL;
63806  __Pyx_TraceDeclarations
63807  __Pyx_RefNannyDeclarations
63808  PyObject *__pyx_t_1 = NULL;
63809  PyObject *__pyx_t_2 = NULL;
63810  PyObject *__pyx_t_3 = NULL;
63811  PyObject *__pyx_t_4 = NULL;
63812  PyObject *__pyx_t_5 = NULL;
63813  int __pyx_t_6;
63814  PyObject *__pyx_t_7 = NULL;
63815  int __pyx_t_8;
63816  int __pyx_t_9;
63817  PyObject *__pyx_t_10 = NULL;
63818  PyObject *__pyx_t_11 = NULL;
63819  PyObject *__pyx_t_12 = NULL;
63820  Py_ssize_t __pyx_t_13;
63821  PyObject *(*__pyx_t_14)(PyObject *);
63822  PyObject *__pyx_t_15 = NULL;
63823  int __pyx_lineno = 0;
63824  const char *__pyx_filename = NULL;
63825  int __pyx_clineno = 0;
63826  __Pyx_TraceFrameInit(__pyx_codeobj__155)
63827  __Pyx_RefNannySetupContext("_recordValues", 0);
63828  __Pyx_TraceCall("_recordValues", __pyx_f[0], 2725, 0, __PYX_ERR(0, 2725, __pyx_L1_error));
63829 
63830  /* "mbd/CouplingFSI.pyx":2728
63831  * """Records values in csv files
63832  * """
63833  * Profiling.logEvent('recording values file of '+str(self.name)) # <<<<<<<<<<<<<<
63834  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
63835  * def record(record_file, row, mode='a'):
63836  */
63837  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2728, __pyx_L1_error)
63838  __Pyx_GOTREF(__pyx_t_2);
63839  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2728, __pyx_L1_error)
63840  __Pyx_GOTREF(__pyx_t_3);
63841  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63842  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2728, __pyx_L1_error)
63843  __Pyx_GOTREF(__pyx_t_2);
63844  __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2728, __pyx_L1_error)
63845  __Pyx_GOTREF(__pyx_t_4);
63846  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63847  __pyx_t_2 = PyNumber_Add(__pyx_kp_s_recording_values_file_of, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2728, __pyx_L1_error)
63848  __Pyx_GOTREF(__pyx_t_2);
63849  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63850  __pyx_t_4 = NULL;
63851  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
63852  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
63853  if (likely(__pyx_t_4)) {
63854  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
63855  __Pyx_INCREF(__pyx_t_4);
63856  __Pyx_INCREF(function);
63857  __Pyx_DECREF_SET(__pyx_t_3, function);
63858  }
63859  }
63860  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
63861  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
63862  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63863  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2728, __pyx_L1_error)
63864  __Pyx_GOTREF(__pyx_t_1);
63865  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63866  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
63867 
63868  /* "mbd/CouplingFSI.pyx":2729
63869  * """
63870  * Profiling.logEvent('recording values file of '+str(self.name))
63871  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8') # <<<<<<<<<<<<<<
63872  * def record(record_file, row, mode='a'):
63873  * with open(record_file, mode) as csvfile:
63874  */
63875  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2729, __pyx_L1_error)
63876  __Pyx_GOTREF(__pyx_t_3);
63877  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __pyx_L1_error)
63878  __Pyx_GOTREF(__pyx_t_2);
63879  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63880  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_join); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2729, __pyx_L1_error)
63881  __Pyx_GOTREF(__pyx_t_3);
63882  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63883  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __pyx_L1_error)
63884  __Pyx_GOTREF(__pyx_t_2);
63885  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logDir); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2729, __pyx_L1_error)
63886  __Pyx_GOTREF(__pyx_t_4);
63887  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63888  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __pyx_L1_error)
63889  __Pyx_GOTREF(__pyx_t_2);
63890  __Pyx_GIVEREF(__pyx_t_4);
63891  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
63892  __Pyx_INCREF(__pyx_kp_s_utf_8);
63893  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
63894  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_utf_8);
63895  __pyx_t_4 = 0;
63896  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyBytes_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2729, __pyx_L1_error)
63897  __Pyx_GOTREF(__pyx_t_4);
63898  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63899  __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __pyx_L1_error)
63900  __Pyx_GOTREF(__pyx_t_2);
63901  __pyx_t_5 = NULL;
63902  __pyx_t_6 = 0;
63903  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
63904  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
63905  if (likely(__pyx_t_5)) {
63906  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
63907  __Pyx_INCREF(__pyx_t_5);
63908  __Pyx_INCREF(function);
63909  __Pyx_DECREF_SET(__pyx_t_3, function);
63910  __pyx_t_6 = 1;
63911  }
63912  }
63913  #if CYTHON_FAST_PYCALL
63914  if (PyFunction_Check(__pyx_t_3)) {
63915  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2};
63916  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2729, __pyx_L1_error)
63917  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
63918  __Pyx_GOTREF(__pyx_t_1);
63919  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63920  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63921  } else
63922  #endif
63923  #if CYTHON_FAST_PYCCALL
63924  if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
63925  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_4, __pyx_t_2};
63926  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2729, __pyx_L1_error)
63927  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
63928  __Pyx_GOTREF(__pyx_t_1);
63929  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
63930  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
63931  } else
63932  #endif
63933  {
63934  __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2729, __pyx_L1_error)
63935  __Pyx_GOTREF(__pyx_t_7);
63936  if (__pyx_t_5) {
63937  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
63938  }
63939  __Pyx_GIVEREF(__pyx_t_4);
63940  PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
63941  __Pyx_GIVEREF(__pyx_t_2);
63942  PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_2);
63943  __pyx_t_4 = 0;
63944  __pyx_t_2 = 0;
63945  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2729, __pyx_L1_error)
63946  __Pyx_GOTREF(__pyx_t_1);
63947  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
63948  }
63949  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63950  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2729, __pyx_L1_error)
63951  __Pyx_GOTREF(__pyx_t_3);
63952  __Pyx_GIVEREF(__pyx_t_1);
63953  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
63954  __Pyx_INCREF(__pyx_kp_s_utf_8);
63955  __Pyx_GIVEREF(__pyx_kp_s_utf_8);
63956  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s_utf_8);
63957  __pyx_t_1 = 0;
63958  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2729, __pyx_L1_error)
63959  __Pyx_GOTREF(__pyx_t_1);
63960  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
63961  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 2729, __pyx_L1_error)
63962  __Pyx_GIVEREF(__pyx_t_1);
63963  __Pyx_GOTREF(__pyx_v_self->record_file);
63964  __Pyx_DECREF(__pyx_v_self->record_file);
63965  __pyx_v_self->record_file = ((PyObject*)__pyx_t_1);
63966  __pyx_t_1 = 0;
63967 
63968  /* "mbd/CouplingFSI.pyx":2730
63969  * Profiling.logEvent('recording values file of '+str(self.name))
63970  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
63971  * def record(record_file, row, mode='a'): # <<<<<<<<<<<<<<
63972  * with open(record_file, mode) as csvfile:
63973  * writer = csv.writer(csvfile, delimiter=',')
63974  */
63975  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_1record, 0, __pyx_n_s_recordValues_locals_record, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2730, __pyx_L1_error)
63976  __Pyx_GOTREF(__pyx_t_1);
63977  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__158);
63978  __pyx_v_record = __pyx_t_1;
63979  __pyx_t_1 = 0;
63980 
63981  /* "mbd/CouplingFSI.pyx":2734
63982  * writer = csv.writer(csvfile, delimiter=',')
63983  * writer.writerow(row)
63984  * t_chrono = self.ProtChSystem.ChSystem.GetChTime() # <<<<<<<<<<<<<<
63985  * if self.ProtChSystem.model is not None:
63986  * t_last = self.ProtChSystem.model.stepController.t_model_last
63987  */
63988  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->ChSystem, __pyx_n_s_GetChTime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2734, __pyx_L1_error)
63989  __Pyx_GOTREF(__pyx_t_3);
63990  __pyx_t_7 = NULL;
63991  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
63992  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
63993  if (likely(__pyx_t_7)) {
63994  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
63995  __Pyx_INCREF(__pyx_t_7);
63996  __Pyx_INCREF(function);
63997  __Pyx_DECREF_SET(__pyx_t_3, function);
63998  }
63999  }
64000  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
64001  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
64002  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2734, __pyx_L1_error)
64003  __Pyx_GOTREF(__pyx_t_1);
64004  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64005  __pyx_v_t_chrono = __pyx_t_1;
64006  __pyx_t_1 = 0;
64007 
64008  /* "mbd/CouplingFSI.pyx":2735
64009  * writer.writerow(row)
64010  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
64011  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
64012  * t_last = self.ProtChSystem.model.stepController.t_model_last
64013  * try:
64014  */
64015  __pyx_t_8 = (__pyx_v_self->ProtChSystem->model != Py_None);
64016  __pyx_t_9 = (__pyx_t_8 != 0);
64017  if (__pyx_t_9) {
64018 
64019  /* "mbd/CouplingFSI.pyx":2736
64020  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
64021  * if self.ProtChSystem.model is not None:
64022  * t_last = self.ProtChSystem.model.stepController.t_model_last # <<<<<<<<<<<<<<
64023  * try:
64024  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
64025  */
64026  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_stepController); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2736, __pyx_L1_error)
64027  __Pyx_GOTREF(__pyx_t_1);
64028  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_t_model_last); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2736, __pyx_L1_error)
64029  __Pyx_GOTREF(__pyx_t_3);
64030  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64031  __pyx_v_t_last = __pyx_t_3;
64032  __pyx_t_3 = 0;
64033 
64034  /* "mbd/CouplingFSI.pyx":2737
64035  * if self.ProtChSystem.model is not None:
64036  * t_last = self.ProtChSystem.model.stepController.t_model_last
64037  * try: # <<<<<<<<<<<<<<
64038  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
64039  * except:
64040  */
64041  {
64042  __Pyx_PyThreadState_declare
64043  __Pyx_PyThreadState_assign
64044  __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
64045  __Pyx_XGOTREF(__pyx_t_10);
64046  __Pyx_XGOTREF(__pyx_t_11);
64047  __Pyx_XGOTREF(__pyx_t_12);
64048  /*try:*/ {
64049 
64050  /* "mbd/CouplingFSI.pyx":2738
64051  * t_last = self.ProtChSystem.model.stepController.t_model_last
64052  * try:
64053  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last # <<<<<<<<<<<<<<
64054  * except:
64055  * dt_last = 0
64056  */
64057  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ProtChSystem->model, __pyx_n_s_levelModelList); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2738, __pyx_L4_error)
64058  __Pyx_GOTREF(__pyx_t_3);
64059  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2738, __pyx_L4_error)
64060  __Pyx_GOTREF(__pyx_t_1);
64061  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64062  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dt_last); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2738, __pyx_L4_error)
64063  __Pyx_GOTREF(__pyx_t_3);
64064  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64065  __pyx_v_dt_last = __pyx_t_3;
64066  __pyx_t_3 = 0;
64067 
64068  /* "mbd/CouplingFSI.pyx":2737
64069  * if self.ProtChSystem.model is not None:
64070  * t_last = self.ProtChSystem.model.stepController.t_model_last
64071  * try: # <<<<<<<<<<<<<<
64072  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
64073  * except:
64074  */
64075  }
64076  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
64077  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
64078  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
64079  goto __pyx_L9_try_end;
64080  __pyx_L4_error:;
64081  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
64082  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
64083  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
64084  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
64085  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
64086  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
64087 
64088  /* "mbd/CouplingFSI.pyx":2739
64089  * try:
64090  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
64091  * except: # <<<<<<<<<<<<<<
64092  * dt_last = 0
64093  * t = t_last
64094  */
64095  /*except:*/ {
64096  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
64097  if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_7) < 0) __PYX_ERR(0, 2739, __pyx_L6_except_error)
64098  __Pyx_GOTREF(__pyx_t_3);
64099  __Pyx_GOTREF(__pyx_t_1);
64100  __Pyx_GOTREF(__pyx_t_7);
64101 
64102  /* "mbd/CouplingFSI.pyx":2740
64103  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
64104  * except:
64105  * dt_last = 0 # <<<<<<<<<<<<<<
64106  * t = t_last
64107  * else:
64108  */
64109  __Pyx_INCREF(__pyx_int_0);
64110  __Pyx_XDECREF_SET(__pyx_v_dt_last, __pyx_int_0);
64111  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
64112  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
64113  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
64114  goto __pyx_L5_exception_handled;
64115  }
64116  __pyx_L6_except_error:;
64117 
64118  /* "mbd/CouplingFSI.pyx":2737
64119  * if self.ProtChSystem.model is not None:
64120  * t_last = self.ProtChSystem.model.stepController.t_model_last
64121  * try: # <<<<<<<<<<<<<<
64122  * dt_last = self.ProtChSystem.model.levelModelList[-1].dt_last
64123  * except:
64124  */
64125  __Pyx_XGIVEREF(__pyx_t_10);
64126  __Pyx_XGIVEREF(__pyx_t_11);
64127  __Pyx_XGIVEREF(__pyx_t_12);
64128  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
64129  goto __pyx_L1_error;
64130  __pyx_L5_exception_handled:;
64131  __Pyx_XGIVEREF(__pyx_t_10);
64132  __Pyx_XGIVEREF(__pyx_t_11);
64133  __Pyx_XGIVEREF(__pyx_t_12);
64134  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
64135  __pyx_L9_try_end:;
64136  }
64137 
64138  /* "mbd/CouplingFSI.pyx":2741
64139  * except:
64140  * dt_last = 0
64141  * t = t_last # <<<<<<<<<<<<<<
64142  * else:
64143  * t = t_chrono
64144  */
64145  __Pyx_INCREF(__pyx_v_t_last);
64146  __pyx_v_t = __pyx_v_t_last;
64147 
64148  /* "mbd/CouplingFSI.pyx":2735
64149  * writer.writerow(row)
64150  * t_chrono = self.ProtChSystem.ChSystem.GetChTime()
64151  * if self.ProtChSystem.model is not None: # <<<<<<<<<<<<<<
64152  * t_last = self.ProtChSystem.model.stepController.t_model_last
64153  * try:
64154  */
64155  goto __pyx_L3;
64156  }
64157 
64158  /* "mbd/CouplingFSI.pyx":2743
64159  * t = t_last
64160  * else:
64161  * t = t_chrono # <<<<<<<<<<<<<<
64162  * t_sim = Profiling.time()-Profiling.startTime
64163  * if t == 0:
64164  */
64165  /*else*/ {
64166  __Pyx_INCREF(__pyx_v_t_chrono);
64167  __pyx_v_t = __pyx_v_t_chrono;
64168  }
64169  __pyx_L3:;
64170 
64171  /* "mbd/CouplingFSI.pyx":2744
64172  * else:
64173  * t = t_chrono
64174  * t_sim = Profiling.time()-Profiling.startTime # <<<<<<<<<<<<<<
64175  * if t == 0:
64176  * header_x = []
64177  */
64178  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2744, __pyx_L1_error)
64179  __Pyx_GOTREF(__pyx_t_1);
64180  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2744, __pyx_L1_error)
64181  __Pyx_GOTREF(__pyx_t_3);
64182  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64183  __pyx_t_1 = NULL;
64184  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
64185  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
64186  if (likely(__pyx_t_1)) {
64187  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
64188  __Pyx_INCREF(__pyx_t_1);
64189  __Pyx_INCREF(function);
64190  __Pyx_DECREF_SET(__pyx_t_3, function);
64191  }
64192  }
64193  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
64194  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
64195  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2744, __pyx_L1_error)
64196  __Pyx_GOTREF(__pyx_t_7);
64197  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64198  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2744, __pyx_L1_error)
64199  __Pyx_GOTREF(__pyx_t_3);
64200  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_startTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2744, __pyx_L1_error)
64201  __Pyx_GOTREF(__pyx_t_1);
64202  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64203  __pyx_t_3 = PyNumber_Subtract(__pyx_t_7, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2744, __pyx_L1_error)
64204  __Pyx_GOTREF(__pyx_t_3);
64205  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
64206  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64207  __pyx_v_t_sim = __pyx_t_3;
64208  __pyx_t_3 = 0;
64209 
64210  /* "mbd/CouplingFSI.pyx":2745
64211  * t = t_chrono
64212  * t_sim = Profiling.time()-Profiling.startTime
64213  * if t == 0: # <<<<<<<<<<<<<<
64214  * header_x = []
64215  * for i in range(self.thisptr.nodes.size()):
64216  */
64217  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_t, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2745, __pyx_L1_error)
64218  __Pyx_GOTREF(__pyx_t_3);
64219  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2745, __pyx_L1_error)
64220  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64221  if (__pyx_t_9) {
64222 
64223  /* "mbd/CouplingFSI.pyx":2746
64224  * t_sim = Profiling.time()-Profiling.startTime
64225  * if t == 0:
64226  * header_x = [] # <<<<<<<<<<<<<<
64227  * for i in range(self.thisptr.nodes.size()):
64228  * header_x += ['x'+str(i), 'y'+str(i), 'z'+str(i)]
64229  */
64230  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2746, __pyx_L1_error)
64231  __Pyx_GOTREF(__pyx_t_3);
64232  __pyx_v_header_x = ((PyObject*)__pyx_t_3);
64233  __pyx_t_3 = 0;
64234 
64235  /* "mbd/CouplingFSI.pyx":2747
64236  * if t == 0:
64237  * header_x = []
64238  * for i in range(self.thisptr.nodes.size()): # <<<<<<<<<<<<<<
64239  * header_x += ['x'+str(i), 'y'+str(i), 'z'+str(i)]
64240  * # time
64241  */
64242  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->thisptr->nodes.size()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2747, __pyx_L1_error)
64243  __Pyx_GOTREF(__pyx_t_3);
64244  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __pyx_L1_error)
64245  __Pyx_GOTREF(__pyx_t_1);
64246  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64247  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
64248  __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_13 = 0;
64249  __pyx_t_14 = NULL;
64250  } else {
64251  __pyx_t_13 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2747, __pyx_L1_error)
64252  __Pyx_GOTREF(__pyx_t_3);
64253  __pyx_t_14 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2747, __pyx_L1_error)
64254  }
64255  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64256  for (;;) {
64257  if (likely(!__pyx_t_14)) {
64258  if (likely(PyList_CheckExact(__pyx_t_3))) {
64259  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_3)) break;
64260  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
64261  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2747, __pyx_L1_error)
64262  #else
64263  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __pyx_L1_error)
64264  __Pyx_GOTREF(__pyx_t_1);
64265  #endif
64266  } else {
64267  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
64268  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
64269  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2747, __pyx_L1_error)
64270  #else
64271  __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2747, __pyx_L1_error)
64272  __Pyx_GOTREF(__pyx_t_1);
64273  #endif
64274  }
64275  } else {
64276  __pyx_t_1 = __pyx_t_14(__pyx_t_3);
64277  if (unlikely(!__pyx_t_1)) {
64278  PyObject* exc_type = PyErr_Occurred();
64279  if (exc_type) {
64280  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
64281  else __PYX_ERR(0, 2747, __pyx_L1_error)
64282  }
64283  break;
64284  }
64285  __Pyx_GOTREF(__pyx_t_1);
64286  }
64287  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
64288  __pyx_t_1 = 0;
64289 
64290  /* "mbd/CouplingFSI.pyx":2748
64291  * header_x = []
64292  * for i in range(self.thisptr.nodes.size()):
64293  * header_x += ['x'+str(i), 'y'+str(i), 'z'+str(i)] # <<<<<<<<<<<<<<
64294  * # time
64295  * file_name = '_t.csv'
64296  */
64297  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __pyx_L1_error)
64298  __Pyx_GOTREF(__pyx_t_1);
64299  __pyx_t_7 = PyNumber_Add(__pyx_n_s_x, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2748, __pyx_L1_error)
64300  __Pyx_GOTREF(__pyx_t_7);
64301  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64302  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __pyx_L1_error)
64303  __Pyx_GOTREF(__pyx_t_1);
64304  __pyx_t_2 = PyNumber_Add(__pyx_n_s_y, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2748, __pyx_L1_error)
64305  __Pyx_GOTREF(__pyx_t_2);
64306  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64307  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __pyx_L1_error)
64308  __Pyx_GOTREF(__pyx_t_1);
64309  __pyx_t_4 = PyNumber_Add(__pyx_n_s_z, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2748, __pyx_L1_error)
64310  __Pyx_GOTREF(__pyx_t_4);
64311  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64312  __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2748, __pyx_L1_error)
64313  __Pyx_GOTREF(__pyx_t_1);
64314  __Pyx_GIVEREF(__pyx_t_7);
64315  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_7);
64316  __Pyx_GIVEREF(__pyx_t_2);
64317  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
64318  __Pyx_GIVEREF(__pyx_t_4);
64319  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
64320  __pyx_t_7 = 0;
64321  __pyx_t_2 = 0;
64322  __pyx_t_4 = 0;
64323  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_header_x, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2748, __pyx_L1_error)
64324  __Pyx_GOTREF(__pyx_t_4);
64325  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
64326  __Pyx_DECREF_SET(__pyx_v_header_x, ((PyObject*)__pyx_t_4));
64327  __pyx_t_4 = 0;
64328 
64329  /* "mbd/CouplingFSI.pyx":2747
64330  * if t == 0:
64331  * header_x = []
64332  * for i in range(self.thisptr.nodes.size()): # <<<<<<<<<<<<<<
64333  * header_x += ['x'+str(i), 'y'+str(i), 'z'+str(i)]
64334  * # time
64335  */
64336  }
64337  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64338 
64339  /* "mbd/CouplingFSI.pyx":2745
64340  * t = t_chrono
64341  * t_sim = Profiling.time()-Profiling.startTime
64342  * if t == 0: # <<<<<<<<<<<<<<
64343  * header_x = []
64344  * for i in range(self.thisptr.nodes.size()):
64345  */
64346  }
64347 
64348  /* "mbd/CouplingFSI.pyx":2750
64349  * header_x += ['x'+str(i), 'y'+str(i), 'z'+str(i)]
64350  * # time
64351  * file_name = '_t.csv' # <<<<<<<<<<<<<<
64352  * if t == 0:
64353  * row = ['t', 't_ch', 't_sim']
64354  */
64355  __Pyx_INCREF(__pyx_kp_s_t_csv);
64356  __pyx_v_file_name = __pyx_kp_s_t_csv;
64357 
64358  /* "mbd/CouplingFSI.pyx":2751
64359  * # time
64360  * file_name = '_t.csv'
64361  * if t == 0: # <<<<<<<<<<<<<<
64362  * row = ['t', 't_ch', 't_sim']
64363  * record(self.record_file+file_name, row, 'w')
64364  */
64365  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_t, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2751, __pyx_L1_error)
64366  __Pyx_GOTREF(__pyx_t_3);
64367  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2751, __pyx_L1_error)
64368  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64369  if (__pyx_t_9) {
64370 
64371  /* "mbd/CouplingFSI.pyx":2752
64372  * file_name = '_t.csv'
64373  * if t == 0:
64374  * row = ['t', 't_ch', 't_sim'] # <<<<<<<<<<<<<<
64375  * record(self.record_file+file_name, row, 'w')
64376  * row = [t, t_chrono, t_sim]
64377  */
64378  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2752, __pyx_L1_error)
64379  __Pyx_GOTREF(__pyx_t_3);
64380  __Pyx_INCREF(__pyx_n_s_t);
64381  __Pyx_GIVEREF(__pyx_n_s_t);
64382  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_t);
64383  __Pyx_INCREF(__pyx_n_s_t_ch);
64384  __Pyx_GIVEREF(__pyx_n_s_t_ch);
64385  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_t_ch);
64386  __Pyx_INCREF(__pyx_n_s_t_sim);
64387  __Pyx_GIVEREF(__pyx_n_s_t_sim);
64388  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_s_t_sim);
64389  __pyx_v_row = ((PyObject*)__pyx_t_3);
64390  __pyx_t_3 = 0;
64391 
64392  /* "mbd/CouplingFSI.pyx":2753
64393  * if t == 0:
64394  * row = ['t', 't_ch', 't_sim']
64395  * record(self.record_file+file_name, row, 'w') # <<<<<<<<<<<<<<
64396  * row = [t, t_chrono, t_sim]
64397  * record(self.record_file+file_name, row)
64398  */
64399  __pyx_t_3 = PyNumber_Add(__pyx_v_self->record_file, __pyx_v_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2753, __pyx_L1_error)
64400  __Pyx_GOTREF(__pyx_t_3);
64401  __pyx_t_4 = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_record(__pyx_v_record, __pyx_t_3, __pyx_v_row, __pyx_n_s_w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2753, __pyx_L1_error)
64402  __Pyx_GOTREF(__pyx_t_4);
64403  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64404  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64405 
64406  /* "mbd/CouplingFSI.pyx":2751
64407  * # time
64408  * file_name = '_t.csv'
64409  * if t == 0: # <<<<<<<<<<<<<<
64410  * row = ['t', 't_ch', 't_sim']
64411  * record(self.record_file+file_name, row, 'w')
64412  */
64413  }
64414 
64415  /* "mbd/CouplingFSI.pyx":2754
64416  * row = ['t', 't_ch', 't_sim']
64417  * record(self.record_file+file_name, row, 'w')
64418  * row = [t, t_chrono, t_sim] # <<<<<<<<<<<<<<
64419  * record(self.record_file+file_name, row)
64420  * # # Positions
64421  */
64422  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2754, __pyx_L1_error)
64423  __Pyx_GOTREF(__pyx_t_4);
64424  __Pyx_INCREF(__pyx_v_t);
64425  __Pyx_GIVEREF(__pyx_v_t);
64426  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_t);
64427  __Pyx_INCREF(__pyx_v_t_chrono);
64428  __Pyx_GIVEREF(__pyx_v_t_chrono);
64429  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_v_t_chrono);
64430  __Pyx_INCREF(__pyx_v_t_sim);
64431  __Pyx_GIVEREF(__pyx_v_t_sim);
64432  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_v_t_sim);
64433  __Pyx_XDECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_4));
64434  __pyx_t_4 = 0;
64435 
64436  /* "mbd/CouplingFSI.pyx":2755
64437  * record(self.record_file+file_name, row, 'w')
64438  * row = [t, t_chrono, t_sim]
64439  * record(self.record_file+file_name, row) # <<<<<<<<<<<<<<
64440  * # # Positions
64441  * # file_name = '_pos.csv'
64442  */
64443  __pyx_t_4 = PyNumber_Add(__pyx_v_self->record_file, __pyx_v_file_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2755, __pyx_L1_error)
64444  __Pyx_GOTREF(__pyx_t_4);
64445  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2755, __pyx_L1_error)
64446  __Pyx_GOTREF(__pyx_t_3);
64447  __Pyx_GIVEREF(__pyx_t_4);
64448  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
64449  __Pyx_INCREF(__pyx_v_row);
64450  __Pyx_GIVEREF(__pyx_v_row);
64451  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_row);
64452  __pyx_t_4 = 0;
64453  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_record, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2755, __pyx_L1_error)
64454  __Pyx_GOTREF(__pyx_t_4);
64455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64456  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64457 
64458  /* "mbd/CouplingFSI.pyx":2778
64459  * # record(self.record_file+file_name, row)
64460  * # Fairlead / anchor tensions
64461  * file_name = '_tens.csv' # <<<<<<<<<<<<<<
64462  * if t == 0:
64463  * row = ['Tb0', 'Tb1', 'Tb2', 'Tf0', 'Tf1', 'Tf2']
64464  */
64465  __Pyx_INCREF(__pyx_kp_s_tens_csv);
64466  __Pyx_DECREF_SET(__pyx_v_file_name, __pyx_kp_s_tens_csv);
64467 
64468  /* "mbd/CouplingFSI.pyx":2779
64469  * # Fairlead / anchor tensions
64470  * file_name = '_tens.csv'
64471  * if t == 0: # <<<<<<<<<<<<<<
64472  * row = ['Tb0', 'Tb1', 'Tb2', 'Tf0', 'Tf1', 'Tf2']
64473  * record(self.record_file+file_name, row, 'w')
64474  */
64475  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_t, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2779, __pyx_L1_error)
64476  __Pyx_GOTREF(__pyx_t_4);
64477  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2779, __pyx_L1_error)
64478  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64479  if (__pyx_t_9) {
64480 
64481  /* "mbd/CouplingFSI.pyx":2780
64482  * file_name = '_tens.csv'
64483  * if t == 0:
64484  * row = ['Tb0', 'Tb1', 'Tb2', 'Tf0', 'Tf1', 'Tf2'] # <<<<<<<<<<<<<<
64485  * record(self.record_file+file_name, row, 'w')
64486  * Tb = self.getTensionBack()
64487  */
64488  __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2780, __pyx_L1_error)
64489  __Pyx_GOTREF(__pyx_t_4);
64490  __Pyx_INCREF(__pyx_n_s_Tb0);
64491  __Pyx_GIVEREF(__pyx_n_s_Tb0);
64492  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_s_Tb0);
64493  __Pyx_INCREF(__pyx_n_s_Tb1);
64494  __Pyx_GIVEREF(__pyx_n_s_Tb1);
64495  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_s_Tb1);
64496  __Pyx_INCREF(__pyx_n_s_Tb2);
64497  __Pyx_GIVEREF(__pyx_n_s_Tb2);
64498  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_n_s_Tb2);
64499  __Pyx_INCREF(__pyx_n_s_Tf0);
64500  __Pyx_GIVEREF(__pyx_n_s_Tf0);
64501  PyList_SET_ITEM(__pyx_t_4, 3, __pyx_n_s_Tf0);
64502  __Pyx_INCREF(__pyx_n_s_Tf1);
64503  __Pyx_GIVEREF(__pyx_n_s_Tf1);
64504  PyList_SET_ITEM(__pyx_t_4, 4, __pyx_n_s_Tf1);
64505  __Pyx_INCREF(__pyx_n_s_Tf2);
64506  __Pyx_GIVEREF(__pyx_n_s_Tf2);
64507  PyList_SET_ITEM(__pyx_t_4, 5, __pyx_n_s_Tf2);
64508  __Pyx_DECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_4));
64509  __pyx_t_4 = 0;
64510 
64511  /* "mbd/CouplingFSI.pyx":2781
64512  * if t == 0:
64513  * row = ['Tb0', 'Tb1', 'Tb2', 'Tf0', 'Tf1', 'Tf2']
64514  * record(self.record_file+file_name, row, 'w') # <<<<<<<<<<<<<<
64515  * Tb = self.getTensionBack()
64516  * Tf = self.getTensionFront()
64517  */
64518  __pyx_t_4 = PyNumber_Add(__pyx_v_self->record_file, __pyx_v_file_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2781, __pyx_L1_error)
64519  __Pyx_GOTREF(__pyx_t_4);
64520  __pyx_t_3 = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_recordValues_record(__pyx_v_record, __pyx_t_4, __pyx_v_row, __pyx_n_s_w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2781, __pyx_L1_error)
64521  __Pyx_GOTREF(__pyx_t_3);
64522  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64523  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64524 
64525  /* "mbd/CouplingFSI.pyx":2779
64526  * # Fairlead / anchor tensions
64527  * file_name = '_tens.csv'
64528  * if t == 0: # <<<<<<<<<<<<<<
64529  * row = ['Tb0', 'Tb1', 'Tb2', 'Tf0', 'Tf1', 'Tf2']
64530  * record(self.record_file+file_name, row, 'w')
64531  */
64532  }
64533 
64534  /* "mbd/CouplingFSI.pyx":2782
64535  * row = ['Tb0', 'Tb1', 'Tb2', 'Tf0', 'Tf1', 'Tf2']
64536  * record(self.record_file+file_name, row, 'w')
64537  * Tb = self.getTensionBack() # <<<<<<<<<<<<<<
64538  * Tf = self.getTensionFront()
64539  * row = [Tb[0], Tb[1], Tb[2], Tf[0], Tf[1], Tf[2]]
64540  */
64541  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTensionBack); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2782, __pyx_L1_error)
64542  __Pyx_GOTREF(__pyx_t_4);
64543  __pyx_t_1 = NULL;
64544  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
64545  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
64546  if (likely(__pyx_t_1)) {
64547  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
64548  __Pyx_INCREF(__pyx_t_1);
64549  __Pyx_INCREF(function);
64550  __Pyx_DECREF_SET(__pyx_t_4, function);
64551  }
64552  }
64553  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
64554  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
64555  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2782, __pyx_L1_error)
64556  __Pyx_GOTREF(__pyx_t_3);
64557  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64558  __pyx_v_Tb = __pyx_t_3;
64559  __pyx_t_3 = 0;
64560 
64561  /* "mbd/CouplingFSI.pyx":2783
64562  * record(self.record_file+file_name, row, 'w')
64563  * Tb = self.getTensionBack()
64564  * Tf = self.getTensionFront() # <<<<<<<<<<<<<<
64565  * row = [Tb[0], Tb[1], Tb[2], Tf[0], Tf[1], Tf[2]]
64566  * record(self.record_file+file_name, row)
64567  */
64568  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getTensionFront); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2783, __pyx_L1_error)
64569  __Pyx_GOTREF(__pyx_t_4);
64570  __pyx_t_1 = NULL;
64571  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
64572  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
64573  if (likely(__pyx_t_1)) {
64574  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
64575  __Pyx_INCREF(__pyx_t_1);
64576  __Pyx_INCREF(function);
64577  __Pyx_DECREF_SET(__pyx_t_4, function);
64578  }
64579  }
64580  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
64581  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
64582  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2783, __pyx_L1_error)
64583  __Pyx_GOTREF(__pyx_t_3);
64584  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64585  __pyx_v_Tf = __pyx_t_3;
64586  __pyx_t_3 = 0;
64587 
64588  /* "mbd/CouplingFSI.pyx":2784
64589  * Tb = self.getTensionBack()
64590  * Tf = self.getTensionFront()
64591  * row = [Tb[0], Tb[1], Tb[2], Tf[0], Tf[1], Tf[2]] # <<<<<<<<<<<<<<
64592  * record(self.record_file+file_name, row)
64593  * # Tensions
64594  */
64595  __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_Tb, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2784, __pyx_L1_error)
64596  __Pyx_GOTREF(__pyx_t_3);
64597  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_Tb, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2784, __pyx_L1_error)
64598  __Pyx_GOTREF(__pyx_t_4);
64599  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_Tb, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error)
64600  __Pyx_GOTREF(__pyx_t_1);
64601  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_Tf, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2784, __pyx_L1_error)
64602  __Pyx_GOTREF(__pyx_t_2);
64603  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_Tf, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2784, __pyx_L1_error)
64604  __Pyx_GOTREF(__pyx_t_7);
64605  __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_Tf, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2784, __pyx_L1_error)
64606  __Pyx_GOTREF(__pyx_t_5);
64607  __pyx_t_15 = PyList_New(6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2784, __pyx_L1_error)
64608  __Pyx_GOTREF(__pyx_t_15);
64609  __Pyx_GIVEREF(__pyx_t_3);
64610  PyList_SET_ITEM(__pyx_t_15, 0, __pyx_t_3);
64611  __Pyx_GIVEREF(__pyx_t_4);
64612  PyList_SET_ITEM(__pyx_t_15, 1, __pyx_t_4);
64613  __Pyx_GIVEREF(__pyx_t_1);
64614  PyList_SET_ITEM(__pyx_t_15, 2, __pyx_t_1);
64615  __Pyx_GIVEREF(__pyx_t_2);
64616  PyList_SET_ITEM(__pyx_t_15, 3, __pyx_t_2);
64617  __Pyx_GIVEREF(__pyx_t_7);
64618  PyList_SET_ITEM(__pyx_t_15, 4, __pyx_t_7);
64619  __Pyx_GIVEREF(__pyx_t_5);
64620  PyList_SET_ITEM(__pyx_t_15, 5, __pyx_t_5);
64621  __pyx_t_3 = 0;
64622  __pyx_t_4 = 0;
64623  __pyx_t_1 = 0;
64624  __pyx_t_2 = 0;
64625  __pyx_t_7 = 0;
64626  __pyx_t_5 = 0;
64627  __Pyx_DECREF_SET(__pyx_v_row, ((PyObject*)__pyx_t_15));
64628  __pyx_t_15 = 0;
64629 
64630  /* "mbd/CouplingFSI.pyx":2785
64631  * Tf = self.getTensionFront()
64632  * row = [Tb[0], Tb[1], Tb[2], Tf[0], Tf[1], Tf[2]]
64633  * record(self.record_file+file_name, row) # <<<<<<<<<<<<<<
64634  * # Tensions
64635  * # for i in range(len(self._record_etas)):
64636  */
64637  __pyx_t_15 = PyNumber_Add(__pyx_v_self->record_file, __pyx_v_file_name); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2785, __pyx_L1_error)
64638  __Pyx_GOTREF(__pyx_t_15);
64639  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2785, __pyx_L1_error)
64640  __Pyx_GOTREF(__pyx_t_5);
64641  __Pyx_GIVEREF(__pyx_t_15);
64642  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_15);
64643  __Pyx_INCREF(__pyx_v_row);
64644  __Pyx_GIVEREF(__pyx_v_row);
64645  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_row);
64646  __pyx_t_15 = 0;
64647  __pyx_t_15 = __Pyx_PyObject_Call(__pyx_v_record, __pyx_t_5, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2785, __pyx_L1_error)
64648  __Pyx_GOTREF(__pyx_t_15);
64649  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
64650  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
64651 
64652  /* "mbd/CouplingFSI.pyx":2823
64653  * # row = (accelerations.flatten('C')).tolist()
64654  * # record(self.record_file+file_name, row)
64655  * Profiling.logEvent('finished recording values file of '+str(self.name)) # <<<<<<<<<<<<<<
64656  *
64657  * def getTensionBack(self):
64658  */
64659  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2823, __pyx_L1_error)
64660  __Pyx_GOTREF(__pyx_t_5);
64661  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2823, __pyx_L1_error)
64662  __Pyx_GOTREF(__pyx_t_7);
64663  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
64664  __pyx_t_5 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2823, __pyx_L1_error)
64665  __Pyx_GOTREF(__pyx_t_5);
64666  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2823, __pyx_L1_error)
64667  __Pyx_GOTREF(__pyx_t_2);
64668  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
64669  __pyx_t_5 = PyNumber_Add(__pyx_kp_s_finished_recording_values_file_o, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2823, __pyx_L1_error)
64670  __Pyx_GOTREF(__pyx_t_5);
64671  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
64672  __pyx_t_2 = NULL;
64673  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
64674  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
64675  if (likely(__pyx_t_2)) {
64676  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
64677  __Pyx_INCREF(__pyx_t_2);
64678  __Pyx_INCREF(function);
64679  __Pyx_DECREF_SET(__pyx_t_7, function);
64680  }
64681  }
64682  __pyx_t_15 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_5);
64683  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
64684  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
64685  if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2823, __pyx_L1_error)
64686  __Pyx_GOTREF(__pyx_t_15);
64687  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
64688  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
64689 
64690  /* "mbd/CouplingFSI.pyx":2725
64691  * Profiling.logEvent('finished recording xmf file of '+str(self.name))
64692  *
64693  * def _recordValues(self): # <<<<<<<<<<<<<<
64694  * """Records values in csv files
64695  * """
64696  */
64697 
64698  /* function exit code */
64699  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
64700  goto __pyx_L0;
64701  __pyx_L1_error:;
64702  __Pyx_XDECREF(__pyx_t_1);
64703  __Pyx_XDECREF(__pyx_t_2);
64704  __Pyx_XDECREF(__pyx_t_3);
64705  __Pyx_XDECREF(__pyx_t_4);
64706  __Pyx_XDECREF(__pyx_t_5);
64707  __Pyx_XDECREF(__pyx_t_7);
64708  __Pyx_XDECREF(__pyx_t_15);
64709  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._recordValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
64710  __pyx_r = NULL;
64711  __pyx_L0:;
64712  __Pyx_XDECREF(__pyx_v_record);
64713  __Pyx_XDECREF(__pyx_v_t_chrono);
64714  __Pyx_XDECREF(__pyx_v_t_last);
64715  __Pyx_XDECREF(__pyx_v_dt_last);
64716  __Pyx_XDECREF(__pyx_v_t);
64717  __Pyx_XDECREF(__pyx_v_t_sim);
64718  __Pyx_XDECREF(__pyx_v_header_x);
64719  __Pyx_XDECREF(__pyx_v_i);
64720  __Pyx_XDECREF(__pyx_v_file_name);
64721  __Pyx_XDECREF(__pyx_v_row);
64722  __Pyx_XDECREF(__pyx_v_Tb);
64723  __Pyx_XDECREF(__pyx_v_Tf);
64724  __Pyx_XGIVEREF(__pyx_r);
64725  __Pyx_TraceReturn(__pyx_r, 0);
64726  __Pyx_RefNannyFinishContext();
64727  return __pyx_r;
64728 }
64729 
64730 /* "mbd/CouplingFSI.pyx":2825
64731  * Profiling.logEvent('finished recording values file of '+str(self.name))
64732  *
64733  * def getTensionBack(self): # <<<<<<<<<<<<<<
64734  * """
64735  * Get Tension at the back of the cable
64736  */
64737 
64738 /* Python wrapper */
64739 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13getTensionBack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
64740 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_12getTensionBack[] = "ProtChMoorings.getTensionBack(self)\n\n Get Tension at the back of the cable\n ";
64741 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_13getTensionBack = {"getTensionBack", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13getTensionBack, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_12getTensionBack};
64742 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13getTensionBack(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
64743  PyObject *__pyx_r = 0;
64744  __Pyx_RefNannyDeclarations
64745  __Pyx_RefNannySetupContext("getTensionBack (wrapper)", 0);
64746  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12getTensionBack(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
64747 
64748  /* function exit code */
64749  __Pyx_RefNannyFinishContext();
64750  return __pyx_r;
64751 }
64752 
64753 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12getTensionBack(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
64754  ChVector<double> __pyx_v_T;
64755  PyObject *__pyx_r = NULL;
64756  __Pyx_TraceDeclarations
64757  __Pyx_RefNannyDeclarations
64758  bool __pyx_t_1;
64759  PyObject *__pyx_t_2 = NULL;
64760  PyObject *__pyx_t_3 = NULL;
64761  PyObject *__pyx_t_4 = NULL;
64762  PyObject *__pyx_t_5 = NULL;
64763  PyObject *__pyx_t_6 = NULL;
64764  PyObject *__pyx_t_7 = NULL;
64765  int __pyx_lineno = 0;
64766  const char *__pyx_filename = NULL;
64767  int __pyx_clineno = 0;
64768  __Pyx_TraceFrameInit(__pyx_codeobj__159)
64769  __Pyx_RefNannySetupContext("getTensionBack", 0);
64770  __Pyx_TraceCall("getTensionBack", __pyx_f[0], 2825, 0, __PYX_ERR(0, 2825, __pyx_L1_error));
64771 
64772  /* "mbd/CouplingFSI.pyx":2830
64773  * """
64774  * cdef ch.ChVector T
64775  * if self.thisptr.constraint_back: # <<<<<<<<<<<<<<
64776  * T = deref(self.thisptr.constraint_back).Get_react_force()
64777  * return np.array([T.x(), T.y(), T.z()])
64778  */
64779  __pyx_t_1 = __pyx_v_self->thisptr->constraint_back.operator bool();
64780  if (__pyx_t_1) {
64781 
64782  /* "mbd/CouplingFSI.pyx":2831
64783  * cdef ch.ChVector T
64784  * if self.thisptr.constraint_back:
64785  * T = deref(self.thisptr.constraint_back).Get_react_force() # <<<<<<<<<<<<<<
64786  * return np.array([T.x(), T.y(), T.z()])
64787  * else:
64788  */
64789  __pyx_v_T = (*__pyx_v_self->thisptr->constraint_back).Get_react_force();
64790 
64791  /* "mbd/CouplingFSI.pyx":2832
64792  * if self.thisptr.constraint_back:
64793  * T = deref(self.thisptr.constraint_back).Get_react_force()
64794  * return np.array([T.x(), T.y(), T.z()]) # <<<<<<<<<<<<<<
64795  * else:
64796  * return np.zeros(3)
64797  */
64798  __Pyx_XDECREF(__pyx_r);
64799  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2832, __pyx_L1_error)
64800  __Pyx_GOTREF(__pyx_t_3);
64801  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2832, __pyx_L1_error)
64802  __Pyx_GOTREF(__pyx_t_4);
64803  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64804  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_T.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2832, __pyx_L1_error)
64805  __Pyx_GOTREF(__pyx_t_3);
64806  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_T.y()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2832, __pyx_L1_error)
64807  __Pyx_GOTREF(__pyx_t_5);
64808  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_T.z()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2832, __pyx_L1_error)
64809  __Pyx_GOTREF(__pyx_t_6);
64810  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2832, __pyx_L1_error)
64811  __Pyx_GOTREF(__pyx_t_7);
64812  __Pyx_GIVEREF(__pyx_t_3);
64813  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
64814  __Pyx_GIVEREF(__pyx_t_5);
64815  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
64816  __Pyx_GIVEREF(__pyx_t_6);
64817  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
64818  __pyx_t_3 = 0;
64819  __pyx_t_5 = 0;
64820  __pyx_t_6 = 0;
64821  __pyx_t_6 = NULL;
64822  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
64823  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
64824  if (likely(__pyx_t_6)) {
64825  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
64826  __Pyx_INCREF(__pyx_t_6);
64827  __Pyx_INCREF(function);
64828  __Pyx_DECREF_SET(__pyx_t_4, function);
64829  }
64830  }
64831  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
64832  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
64833  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
64834  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2832, __pyx_L1_error)
64835  __Pyx_GOTREF(__pyx_t_2);
64836  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64837  __pyx_r = __pyx_t_2;
64838  __pyx_t_2 = 0;
64839  goto __pyx_L0;
64840 
64841  /* "mbd/CouplingFSI.pyx":2830
64842  * """
64843  * cdef ch.ChVector T
64844  * if self.thisptr.constraint_back: # <<<<<<<<<<<<<<
64845  * T = deref(self.thisptr.constraint_back).Get_react_force()
64846  * return np.array([T.x(), T.y(), T.z()])
64847  */
64848  }
64849 
64850  /* "mbd/CouplingFSI.pyx":2834
64851  * return np.array([T.x(), T.y(), T.z()])
64852  * else:
64853  * return np.zeros(3) # <<<<<<<<<<<<<<
64854  *
64855  * def getTensionFront(self):
64856  */
64857  /*else*/ {
64858  __Pyx_XDECREF(__pyx_r);
64859  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2834, __pyx_L1_error)
64860  __Pyx_GOTREF(__pyx_t_4);
64861  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2834, __pyx_L1_error)
64862  __Pyx_GOTREF(__pyx_t_7);
64863  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
64864  __pyx_t_4 = NULL;
64865  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
64866  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
64867  if (likely(__pyx_t_4)) {
64868  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
64869  __Pyx_INCREF(__pyx_t_4);
64870  __Pyx_INCREF(function);
64871  __Pyx_DECREF_SET(__pyx_t_7, function);
64872  }
64873  }
64874  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_3);
64875  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
64876  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2834, __pyx_L1_error)
64877  __Pyx_GOTREF(__pyx_t_2);
64878  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
64879  __pyx_r = __pyx_t_2;
64880  __pyx_t_2 = 0;
64881  goto __pyx_L0;
64882  }
64883 
64884  /* "mbd/CouplingFSI.pyx":2825
64885  * Profiling.logEvent('finished recording values file of '+str(self.name))
64886  *
64887  * def getTensionBack(self): # <<<<<<<<<<<<<<
64888  * """
64889  * Get Tension at the back of the cable
64890  */
64891 
64892  /* function exit code */
64893  __pyx_L1_error:;
64894  __Pyx_XDECREF(__pyx_t_2);
64895  __Pyx_XDECREF(__pyx_t_3);
64896  __Pyx_XDECREF(__pyx_t_4);
64897  __Pyx_XDECREF(__pyx_t_5);
64898  __Pyx_XDECREF(__pyx_t_6);
64899  __Pyx_XDECREF(__pyx_t_7);
64900  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getTensionBack", __pyx_clineno, __pyx_lineno, __pyx_filename);
64901  __pyx_r = NULL;
64902  __pyx_L0:;
64903  __Pyx_XGIVEREF(__pyx_r);
64904  __Pyx_TraceReturn(__pyx_r, 0);
64905  __Pyx_RefNannyFinishContext();
64906  return __pyx_r;
64907 }
64908 
64909 /* "mbd/CouplingFSI.pyx":2836
64910  * return np.zeros(3)
64911  *
64912  * def getTensionFront(self): # <<<<<<<<<<<<<<
64913  * """
64914  * Get Tension at the front of the cable
64915  */
64916 
64917 /* Python wrapper */
64918 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_15getTensionFront(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
64919 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_14getTensionFront[] = "ProtChMoorings.getTensionFront(self)\n\n Get Tension at the front of the cable\n ";
64920 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_15getTensionFront = {"getTensionFront", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_15getTensionFront, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_14getTensionFront};
64921 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_15getTensionFront(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
64922  PyObject *__pyx_r = 0;
64923  __Pyx_RefNannyDeclarations
64924  __Pyx_RefNannySetupContext("getTensionFront (wrapper)", 0);
64925  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14getTensionFront(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
64926 
64927  /* function exit code */
64928  __Pyx_RefNannyFinishContext();
64929  return __pyx_r;
64930 }
64931 
64932 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14getTensionFront(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
64933  ChVector<double> __pyx_v_T;
64934  PyObject *__pyx_r = NULL;
64935  __Pyx_TraceDeclarations
64936  __Pyx_RefNannyDeclarations
64937  bool __pyx_t_1;
64938  PyObject *__pyx_t_2 = NULL;
64939  PyObject *__pyx_t_3 = NULL;
64940  PyObject *__pyx_t_4 = NULL;
64941  PyObject *__pyx_t_5 = NULL;
64942  PyObject *__pyx_t_6 = NULL;
64943  PyObject *__pyx_t_7 = NULL;
64944  int __pyx_lineno = 0;
64945  const char *__pyx_filename = NULL;
64946  int __pyx_clineno = 0;
64947  __Pyx_TraceFrameInit(__pyx_codeobj__160)
64948  __Pyx_RefNannySetupContext("getTensionFront", 0);
64949  __Pyx_TraceCall("getTensionFront", __pyx_f[0], 2836, 0, __PYX_ERR(0, 2836, __pyx_L1_error));
64950 
64951  /* "mbd/CouplingFSI.pyx":2841
64952  * """
64953  * cdef ch.ChVector T
64954  * if self.thisptr.constraint_front: # <<<<<<<<<<<<<<
64955  * T = deref(self.thisptr.constraint_front).Get_react_force()
64956  * return np.array([T.x(), T.y(), T.z()])
64957  */
64958  __pyx_t_1 = __pyx_v_self->thisptr->constraint_front.operator bool();
64959  if (__pyx_t_1) {
64960 
64961  /* "mbd/CouplingFSI.pyx":2842
64962  * cdef ch.ChVector T
64963  * if self.thisptr.constraint_front:
64964  * T = deref(self.thisptr.constraint_front).Get_react_force() # <<<<<<<<<<<<<<
64965  * return np.array([T.x(), T.y(), T.z()])
64966  * else:
64967  */
64968  __pyx_v_T = (*__pyx_v_self->thisptr->constraint_front).Get_react_force();
64969 
64970  /* "mbd/CouplingFSI.pyx":2843
64971  * if self.thisptr.constraint_front:
64972  * T = deref(self.thisptr.constraint_front).Get_react_force()
64973  * return np.array([T.x(), T.y(), T.z()]) # <<<<<<<<<<<<<<
64974  * else:
64975  * return np.zeros(3)
64976  */
64977  __Pyx_XDECREF(__pyx_r);
64978  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2843, __pyx_L1_error)
64979  __Pyx_GOTREF(__pyx_t_3);
64980  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2843, __pyx_L1_error)
64981  __Pyx_GOTREF(__pyx_t_4);
64982  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
64983  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_T.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2843, __pyx_L1_error)
64984  __Pyx_GOTREF(__pyx_t_3);
64985  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_T.y()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2843, __pyx_L1_error)
64986  __Pyx_GOTREF(__pyx_t_5);
64987  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_T.z()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2843, __pyx_L1_error)
64988  __Pyx_GOTREF(__pyx_t_6);
64989  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2843, __pyx_L1_error)
64990  __Pyx_GOTREF(__pyx_t_7);
64991  __Pyx_GIVEREF(__pyx_t_3);
64992  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
64993  __Pyx_GIVEREF(__pyx_t_5);
64994  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
64995  __Pyx_GIVEREF(__pyx_t_6);
64996  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
64997  __pyx_t_3 = 0;
64998  __pyx_t_5 = 0;
64999  __pyx_t_6 = 0;
65000  __pyx_t_6 = NULL;
65001  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
65002  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
65003  if (likely(__pyx_t_6)) {
65004  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
65005  __Pyx_INCREF(__pyx_t_6);
65006  __Pyx_INCREF(function);
65007  __Pyx_DECREF_SET(__pyx_t_4, function);
65008  }
65009  }
65010  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
65011  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
65012  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
65013  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2843, __pyx_L1_error)
65014  __Pyx_GOTREF(__pyx_t_2);
65015  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65016  __pyx_r = __pyx_t_2;
65017  __pyx_t_2 = 0;
65018  goto __pyx_L0;
65019 
65020  /* "mbd/CouplingFSI.pyx":2841
65021  * """
65022  * cdef ch.ChVector T
65023  * if self.thisptr.constraint_front: # <<<<<<<<<<<<<<
65024  * T = deref(self.thisptr.constraint_front).Get_react_force()
65025  * return np.array([T.x(), T.y(), T.z()])
65026  */
65027  }
65028 
65029  /* "mbd/CouplingFSI.pyx":2845
65030  * return np.array([T.x(), T.y(), T.z()])
65031  * else:
65032  * return np.zeros(3) # <<<<<<<<<<<<<<
65033  *
65034  * def calculate_init(self):
65035  */
65036  /*else*/ {
65037  __Pyx_XDECREF(__pyx_r);
65038  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2845, __pyx_L1_error)
65039  __Pyx_GOTREF(__pyx_t_4);
65040  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2845, __pyx_L1_error)
65041  __Pyx_GOTREF(__pyx_t_7);
65042  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65043  __pyx_t_4 = NULL;
65044  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
65045  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
65046  if (likely(__pyx_t_4)) {
65047  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
65048  __Pyx_INCREF(__pyx_t_4);
65049  __Pyx_INCREF(function);
65050  __Pyx_DECREF_SET(__pyx_t_7, function);
65051  }
65052  }
65053  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_3);
65054  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
65055  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2845, __pyx_L1_error)
65056  __Pyx_GOTREF(__pyx_t_2);
65057  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
65058  __pyx_r = __pyx_t_2;
65059  __pyx_t_2 = 0;
65060  goto __pyx_L0;
65061  }
65062 
65063  /* "mbd/CouplingFSI.pyx":2836
65064  * return np.zeros(3)
65065  *
65066  * def getTensionFront(self): # <<<<<<<<<<<<<<
65067  * """
65068  * Get Tension at the front of the cable
65069  */
65070 
65071  /* function exit code */
65072  __pyx_L1_error:;
65073  __Pyx_XDECREF(__pyx_t_2);
65074  __Pyx_XDECREF(__pyx_t_3);
65075  __Pyx_XDECREF(__pyx_t_4);
65076  __Pyx_XDECREF(__pyx_t_5);
65077  __Pyx_XDECREF(__pyx_t_6);
65078  __Pyx_XDECREF(__pyx_t_7);
65079  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getTensionFront", __pyx_clineno, __pyx_lineno, __pyx_filename);
65080  __pyx_r = NULL;
65081  __pyx_L0:;
65082  __Pyx_XGIVEREF(__pyx_r);
65083  __Pyx_TraceReturn(__pyx_r, 0);
65084  __Pyx_RefNannyFinishContext();
65085  return __pyx_r;
65086 }
65087 
65088 /* "mbd/CouplingFSI.pyx":2847
65089  * return np.zeros(3)
65090  *
65091  * def calculate_init(self): # <<<<<<<<<<<<<<
65092  * # build position vector of nodes (for each segment)
65093  * # self.setNodesPosition()
65094  */
65095 
65096 /* Python wrapper */
65097 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_17calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
65098 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_16calculate_init[] = "ProtChMoorings.calculate_init(self)";
65099 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_17calculate_init = {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_17calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_16calculate_init};
65100 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_17calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
65101  PyObject *__pyx_r = 0;
65102  __Pyx_RefNannyDeclarations
65103  __Pyx_RefNannySetupContext("calculate_init (wrapper)", 0);
65104  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_16calculate_init(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
65105 
65106  /* function exit code */
65107  __Pyx_RefNannyFinishContext();
65108  return __pyx_r;
65109 }
65110 
65111 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_16calculate_init(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
65112  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_v_nb_nodes;
65113  PyObject *__pyx_r = NULL;
65114  __Pyx_TraceDeclarations
65115  __Pyx_RefNannyDeclarations
65116  int __pyx_t_1;
65117  int __pyx_t_2;
65118  PyObject *__pyx_t_3 = NULL;
65119  PyObject *__pyx_t_4 = NULL;
65120  PyObject *__pyx_t_5 = NULL;
65121  PyObject *__pyx_t_6 = NULL;
65122  PyObject *__pyx_t_7 = NULL;
65123  __Pyx_memviewslice __pyx_t_8 = { 0, 0, { 0 }, { 0 }, { 0 } };
65124  int __pyx_lineno = 0;
65125  const char *__pyx_filename = NULL;
65126  int __pyx_clineno = 0;
65127  __Pyx_TraceFrameInit(__pyx_codeobj__161)
65128  __Pyx_RefNannySetupContext("calculate_init", 0);
65129  __Pyx_TraceCall("calculate_init", __pyx_f[0], 2847, 0, __PYX_ERR(0, 2847, __pyx_L1_error));
65130 
65131  /* "mbd/CouplingFSI.pyx":2851
65132  * # self.setNodesPosition()
65133  * # build cable (nodes, elements, etc)
65134  * self.thisptr.buildCable() # <<<<<<<<<<<<<<
65135  * if self.beam_type == "BeamEuler":
65136  * nb_nodes = self.thisptr.nodesRot.size()
65137  */
65138  __pyx_v_self->thisptr->buildCable();
65139 
65140  /* "mbd/CouplingFSI.pyx":2852
65141  * # build cable (nodes, elements, etc)
65142  * self.thisptr.buildCable()
65143  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
65144  * nb_nodes = self.thisptr.nodesRot.size()
65145  * else:
65146  */
65147  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
65148  if (__pyx_t_1) {
65149 
65150  /* "mbd/CouplingFSI.pyx":2853
65151  * self.thisptr.buildCable()
65152  * if self.beam_type == "BeamEuler":
65153  * nb_nodes = self.thisptr.nodesRot.size() # <<<<<<<<<<<<<<
65154  * else:
65155  * nb_nodes = self.thisptr.nodes.size()
65156  */
65157  __pyx_v_nb_nodes = __pyx_v_self->thisptr->nodesRot.size();
65158 
65159  /* "mbd/CouplingFSI.pyx":2852
65160  * # build cable (nodes, elements, etc)
65161  * self.thisptr.buildCable()
65162  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
65163  * nb_nodes = self.thisptr.nodesRot.size()
65164  * else:
65165  */
65166  goto __pyx_L3;
65167  }
65168 
65169  /* "mbd/CouplingFSI.pyx":2855
65170  * nb_nodes = self.thisptr.nodesRot.size()
65171  * else:
65172  * nb_nodes = self.thisptr.nodes.size() # <<<<<<<<<<<<<<
65173  * if self.fluid_velocity_array is None:
65174  * self.fluid_velocity_array = np.zeros((nb_nodes, 3))
65175  */
65176  /*else*/ {
65177  __pyx_v_nb_nodes = __pyx_v_self->thisptr->nodes.size();
65178  }
65179  __pyx_L3:;
65180 
65181  /* "mbd/CouplingFSI.pyx":2856
65182  * else:
65183  * nb_nodes = self.thisptr.nodes.size()
65184  * if self.fluid_velocity_array is None: # <<<<<<<<<<<<<<
65185  * self.fluid_velocity_array = np.zeros((nb_nodes, 3))
65186  * self.fluid_velocity_array_previous = np.zeros((nb_nodes, 3))
65187  */
65188  __pyx_t_1 = (((PyObject *)__pyx_v_self->fluid_velocity_array) == Py_None);
65189  __pyx_t_2 = (__pyx_t_1 != 0);
65190  if (__pyx_t_2) {
65191 
65192  /* "mbd/CouplingFSI.pyx":2857
65193  * nb_nodes = self.thisptr.nodes.size()
65194  * if self.fluid_velocity_array is None:
65195  * self.fluid_velocity_array = np.zeros((nb_nodes, 3)) # <<<<<<<<<<<<<<
65196  * self.fluid_velocity_array_previous = np.zeros((nb_nodes, 3))
65197  * if self.fluid_acceleration_array is None:
65198  */
65199  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2857, __pyx_L1_error)
65200  __Pyx_GOTREF(__pyx_t_4);
65201  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2857, __pyx_L1_error)
65202  __Pyx_GOTREF(__pyx_t_5);
65203  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65204  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_nb_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2857, __pyx_L1_error)
65205  __Pyx_GOTREF(__pyx_t_4);
65206  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2857, __pyx_L1_error)
65207  __Pyx_GOTREF(__pyx_t_6);
65208  __Pyx_GIVEREF(__pyx_t_4);
65209  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
65210  __Pyx_INCREF(__pyx_int_3);
65211  __Pyx_GIVEREF(__pyx_int_3);
65212  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_3);
65213  __pyx_t_4 = 0;
65214  __pyx_t_4 = NULL;
65215  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
65216  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
65217  if (likely(__pyx_t_4)) {
65218  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
65219  __Pyx_INCREF(__pyx_t_4);
65220  __Pyx_INCREF(function);
65221  __Pyx_DECREF_SET(__pyx_t_5, function);
65222  }
65223  }
65224  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6);
65225  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
65226  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65227  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2857, __pyx_L1_error)
65228  __Pyx_GOTREF(__pyx_t_3);
65229  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65230  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2857, __pyx_L1_error)
65231  __Pyx_GIVEREF(__pyx_t_3);
65232  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array);
65233  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array));
65234  __pyx_v_self->fluid_velocity_array = ((PyArrayObject *)__pyx_t_3);
65235  __pyx_t_3 = 0;
65236 
65237  /* "mbd/CouplingFSI.pyx":2858
65238  * if self.fluid_velocity_array is None:
65239  * self.fluid_velocity_array = np.zeros((nb_nodes, 3))
65240  * self.fluid_velocity_array_previous = np.zeros((nb_nodes, 3)) # <<<<<<<<<<<<<<
65241  * if self.fluid_acceleration_array is None:
65242  * self.fluid_acceleration_array = np.zeros((nb_nodes, 3))
65243  */
65244  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2858, __pyx_L1_error)
65245  __Pyx_GOTREF(__pyx_t_5);
65246  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2858, __pyx_L1_error)
65247  __Pyx_GOTREF(__pyx_t_6);
65248  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65249  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_nb_nodes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2858, __pyx_L1_error)
65250  __Pyx_GOTREF(__pyx_t_5);
65251  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2858, __pyx_L1_error)
65252  __Pyx_GOTREF(__pyx_t_4);
65253  __Pyx_GIVEREF(__pyx_t_5);
65254  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
65255  __Pyx_INCREF(__pyx_int_3);
65256  __Pyx_GIVEREF(__pyx_int_3);
65257  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);
65258  __pyx_t_5 = 0;
65259  __pyx_t_5 = NULL;
65260  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
65261  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
65262  if (likely(__pyx_t_5)) {
65263  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
65264  __Pyx_INCREF(__pyx_t_5);
65265  __Pyx_INCREF(function);
65266  __Pyx_DECREF_SET(__pyx_t_6, function);
65267  }
65268  }
65269  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4);
65270  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
65271  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65272  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2858, __pyx_L1_error)
65273  __Pyx_GOTREF(__pyx_t_3);
65274  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65275  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2858, __pyx_L1_error)
65276  __Pyx_GIVEREF(__pyx_t_3);
65277  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array_previous);
65278  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array_previous));
65279  __pyx_v_self->fluid_velocity_array_previous = ((PyArrayObject *)__pyx_t_3);
65280  __pyx_t_3 = 0;
65281 
65282  /* "mbd/CouplingFSI.pyx":2856
65283  * else:
65284  * nb_nodes = self.thisptr.nodes.size()
65285  * if self.fluid_velocity_array is None: # <<<<<<<<<<<<<<
65286  * self.fluid_velocity_array = np.zeros((nb_nodes, 3))
65287  * self.fluid_velocity_array_previous = np.zeros((nb_nodes, 3))
65288  */
65289  }
65290 
65291  /* "mbd/CouplingFSI.pyx":2859
65292  * self.fluid_velocity_array = np.zeros((nb_nodes, 3))
65293  * self.fluid_velocity_array_previous = np.zeros((nb_nodes, 3))
65294  * if self.fluid_acceleration_array is None: # <<<<<<<<<<<<<<
65295  * self.fluid_acceleration_array = np.zeros((nb_nodes, 3))
65296  * if self.fluid_density_array is None:
65297  */
65298  __pyx_t_2 = (((PyObject *)__pyx_v_self->fluid_acceleration_array) == Py_None);
65299  __pyx_t_1 = (__pyx_t_2 != 0);
65300  if (__pyx_t_1) {
65301 
65302  /* "mbd/CouplingFSI.pyx":2860
65303  * self.fluid_velocity_array_previous = np.zeros((nb_nodes, 3))
65304  * if self.fluid_acceleration_array is None:
65305  * self.fluid_acceleration_array = np.zeros((nb_nodes, 3)) # <<<<<<<<<<<<<<
65306  * if self.fluid_density_array is None:
65307  * self.fluid_density_array = np.zeros(nb_nodes)
65308  */
65309  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2860, __pyx_L1_error)
65310  __Pyx_GOTREF(__pyx_t_6);
65311  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2860, __pyx_L1_error)
65312  __Pyx_GOTREF(__pyx_t_4);
65313  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65314  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_nb_nodes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2860, __pyx_L1_error)
65315  __Pyx_GOTREF(__pyx_t_6);
65316  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2860, __pyx_L1_error)
65317  __Pyx_GOTREF(__pyx_t_5);
65318  __Pyx_GIVEREF(__pyx_t_6);
65319  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6);
65320  __Pyx_INCREF(__pyx_int_3);
65321  __Pyx_GIVEREF(__pyx_int_3);
65322  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
65323  __pyx_t_6 = 0;
65324  __pyx_t_6 = NULL;
65325  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
65326  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
65327  if (likely(__pyx_t_6)) {
65328  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
65329  __Pyx_INCREF(__pyx_t_6);
65330  __Pyx_INCREF(function);
65331  __Pyx_DECREF_SET(__pyx_t_4, function);
65332  }
65333  }
65334  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
65335  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
65336  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65337  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2860, __pyx_L1_error)
65338  __Pyx_GOTREF(__pyx_t_3);
65339  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65340  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2860, __pyx_L1_error)
65341  __Pyx_GIVEREF(__pyx_t_3);
65342  __Pyx_GOTREF(__pyx_v_self->fluid_acceleration_array);
65343  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_acceleration_array));
65344  __pyx_v_self->fluid_acceleration_array = ((PyArrayObject *)__pyx_t_3);
65345  __pyx_t_3 = 0;
65346 
65347  /* "mbd/CouplingFSI.pyx":2859
65348  * self.fluid_velocity_array = np.zeros((nb_nodes, 3))
65349  * self.fluid_velocity_array_previous = np.zeros((nb_nodes, 3))
65350  * if self.fluid_acceleration_array is None: # <<<<<<<<<<<<<<
65351  * self.fluid_acceleration_array = np.zeros((nb_nodes, 3))
65352  * if self.fluid_density_array is None:
65353  */
65354  }
65355 
65356  /* "mbd/CouplingFSI.pyx":2861
65357  * if self.fluid_acceleration_array is None:
65358  * self.fluid_acceleration_array = np.zeros((nb_nodes, 3))
65359  * if self.fluid_density_array is None: # <<<<<<<<<<<<<<
65360  * self.fluid_density_array = np.zeros(nb_nodes)
65361  * self.nearest_node_array = np.zeros(nb_nodes, dtype=np.int32)
65362  */
65363  __pyx_t_1 = (((PyObject *)__pyx_v_self->fluid_density_array) == Py_None);
65364  __pyx_t_2 = (__pyx_t_1 != 0);
65365  if (__pyx_t_2) {
65366 
65367  /* "mbd/CouplingFSI.pyx":2862
65368  * self.fluid_acceleration_array = np.zeros((nb_nodes, 3))
65369  * if self.fluid_density_array is None:
65370  * self.fluid_density_array = np.zeros(nb_nodes) # <<<<<<<<<<<<<<
65371  * self.nearest_node_array = np.zeros(nb_nodes, dtype=np.int32)
65372  * self.containing_element_array = np.zeros(nb_nodes, dtype=np.int32)
65373  */
65374  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2862, __pyx_L1_error)
65375  __Pyx_GOTREF(__pyx_t_4);
65376  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2862, __pyx_L1_error)
65377  __Pyx_GOTREF(__pyx_t_5);
65378  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65379  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_nb_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2862, __pyx_L1_error)
65380  __Pyx_GOTREF(__pyx_t_4);
65381  __pyx_t_6 = NULL;
65382  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
65383  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
65384  if (likely(__pyx_t_6)) {
65385  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
65386  __Pyx_INCREF(__pyx_t_6);
65387  __Pyx_INCREF(function);
65388  __Pyx_DECREF_SET(__pyx_t_5, function);
65389  }
65390  }
65391  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
65392  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
65393  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65394  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2862, __pyx_L1_error)
65395  __Pyx_GOTREF(__pyx_t_3);
65396  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65397  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 2862, __pyx_L1_error)
65398  __Pyx_GIVEREF(__pyx_t_3);
65399  __Pyx_GOTREF(__pyx_v_self->fluid_density_array);
65400  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_density_array));
65401  __pyx_v_self->fluid_density_array = ((PyArrayObject *)__pyx_t_3);
65402  __pyx_t_3 = 0;
65403 
65404  /* "mbd/CouplingFSI.pyx":2861
65405  * if self.fluid_acceleration_array is None:
65406  * self.fluid_acceleration_array = np.zeros((nb_nodes, 3))
65407  * if self.fluid_density_array is None: # <<<<<<<<<<<<<<
65408  * self.fluid_density_array = np.zeros(nb_nodes)
65409  * self.nearest_node_array = np.zeros(nb_nodes, dtype=np.int32)
65410  */
65411  }
65412 
65413  /* "mbd/CouplingFSI.pyx":2863
65414  * if self.fluid_density_array is None:
65415  * self.fluid_density_array = np.zeros(nb_nodes)
65416  * self.nearest_node_array = np.zeros(nb_nodes, dtype=np.int32) # <<<<<<<<<<<<<<
65417  * self.containing_element_array = np.zeros(nb_nodes, dtype=np.int32)
65418  * self.owning_rank = np.zeros(nb_nodes, dtype=np.int32)
65419  */
65420  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2863, __pyx_L1_error)
65421  __Pyx_GOTREF(__pyx_t_3);
65422  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2863, __pyx_L1_error)
65423  __Pyx_GOTREF(__pyx_t_5);
65424  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65425  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_nb_nodes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2863, __pyx_L1_error)
65426  __Pyx_GOTREF(__pyx_t_3);
65427  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2863, __pyx_L1_error)
65428  __Pyx_GOTREF(__pyx_t_4);
65429  __Pyx_GIVEREF(__pyx_t_3);
65430  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
65431  __pyx_t_3 = 0;
65432  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2863, __pyx_L1_error)
65433  __Pyx_GOTREF(__pyx_t_3);
65434  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2863, __pyx_L1_error)
65435  __Pyx_GOTREF(__pyx_t_6);
65436  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2863, __pyx_L1_error)
65437  __Pyx_GOTREF(__pyx_t_7);
65438  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65439  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(0, 2863, __pyx_L1_error)
65440  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
65441  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2863, __pyx_L1_error)
65442  __Pyx_GOTREF(__pyx_t_7);
65443  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65444  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65445  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65446  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_7, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 2863, __pyx_L1_error)
65447  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
65448  __PYX_XDEC_MEMVIEW(&__pyx_v_self->nearest_node_array, 0);
65449  __pyx_v_self->nearest_node_array = __pyx_t_8;
65450  __pyx_t_8.memview = NULL;
65451  __pyx_t_8.data = NULL;
65452 
65453  /* "mbd/CouplingFSI.pyx":2864
65454  * self.fluid_density_array = np.zeros(nb_nodes)
65455  * self.nearest_node_array = np.zeros(nb_nodes, dtype=np.int32)
65456  * self.containing_element_array = np.zeros(nb_nodes, dtype=np.int32) # <<<<<<<<<<<<<<
65457  * self.owning_rank = np.zeros(nb_nodes, dtype=np.int32)
65458  *
65459  */
65460  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2864, __pyx_L1_error)
65461  __Pyx_GOTREF(__pyx_t_7);
65462  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2864, __pyx_L1_error)
65463  __Pyx_GOTREF(__pyx_t_3);
65464  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
65465  __pyx_t_7 = __Pyx_PyInt_FromSize_t(__pyx_v_nb_nodes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2864, __pyx_L1_error)
65466  __Pyx_GOTREF(__pyx_t_7);
65467  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2864, __pyx_L1_error)
65468  __Pyx_GOTREF(__pyx_t_4);
65469  __Pyx_GIVEREF(__pyx_t_7);
65470  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
65471  __pyx_t_7 = 0;
65472  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2864, __pyx_L1_error)
65473  __Pyx_GOTREF(__pyx_t_7);
65474  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2864, __pyx_L1_error)
65475  __Pyx_GOTREF(__pyx_t_5);
65476  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int32); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2864, __pyx_L1_error)
65477  __Pyx_GOTREF(__pyx_t_6);
65478  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65479  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 2864, __pyx_L1_error)
65480  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65481  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2864, __pyx_L1_error)
65482  __Pyx_GOTREF(__pyx_t_6);
65483  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65484  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65485  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
65486  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 2864, __pyx_L1_error)
65487  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65488  __PYX_XDEC_MEMVIEW(&__pyx_v_self->containing_element_array, 0);
65489  __pyx_v_self->containing_element_array = __pyx_t_8;
65490  __pyx_t_8.memview = NULL;
65491  __pyx_t_8.data = NULL;
65492 
65493  /* "mbd/CouplingFSI.pyx":2865
65494  * self.nearest_node_array = np.zeros(nb_nodes, dtype=np.int32)
65495  * self.containing_element_array = np.zeros(nb_nodes, dtype=np.int32)
65496  * self.owning_rank = np.zeros(nb_nodes, dtype=np.int32) # <<<<<<<<<<<<<<
65497  *
65498  * def prestep(self):
65499  */
65500  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2865, __pyx_L1_error)
65501  __Pyx_GOTREF(__pyx_t_6);
65502  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2865, __pyx_L1_error)
65503  __Pyx_GOTREF(__pyx_t_7);
65504  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65505  __pyx_t_6 = __Pyx_PyInt_FromSize_t(__pyx_v_nb_nodes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2865, __pyx_L1_error)
65506  __Pyx_GOTREF(__pyx_t_6);
65507  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2865, __pyx_L1_error)
65508  __Pyx_GOTREF(__pyx_t_4);
65509  __Pyx_GIVEREF(__pyx_t_6);
65510  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
65511  __pyx_t_6 = 0;
65512  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2865, __pyx_L1_error)
65513  __Pyx_GOTREF(__pyx_t_6);
65514  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2865, __pyx_L1_error)
65515  __Pyx_GOTREF(__pyx_t_3);
65516  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2865, __pyx_L1_error)
65517  __Pyx_GOTREF(__pyx_t_5);
65518  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65519  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 2865, __pyx_L1_error)
65520  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65521  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2865, __pyx_L1_error)
65522  __Pyx_GOTREF(__pyx_t_5);
65523  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
65524  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65525  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
65526  __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 2865, __pyx_L1_error)
65527  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65528  __PYX_XDEC_MEMVIEW(&__pyx_v_self->owning_rank, 0);
65529  __pyx_v_self->owning_rank = __pyx_t_8;
65530  __pyx_t_8.memview = NULL;
65531  __pyx_t_8.data = NULL;
65532 
65533  /* "mbd/CouplingFSI.pyx":2847
65534  * return np.zeros(3)
65535  *
65536  * def calculate_init(self): # <<<<<<<<<<<<<<
65537  * # build position vector of nodes (for each segment)
65538  * # self.setNodesPosition()
65539  */
65540 
65541  /* function exit code */
65542  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
65543  goto __pyx_L0;
65544  __pyx_L1_error:;
65545  __Pyx_XDECREF(__pyx_t_3);
65546  __Pyx_XDECREF(__pyx_t_4);
65547  __Pyx_XDECREF(__pyx_t_5);
65548  __Pyx_XDECREF(__pyx_t_6);
65549  __Pyx_XDECREF(__pyx_t_7);
65550  __PYX_XDEC_MEMVIEW(&__pyx_t_8, 1);
65551  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.calculate_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
65552  __pyx_r = NULL;
65553  __pyx_L0:;
65554  __Pyx_XGIVEREF(__pyx_r);
65555  __Pyx_TraceReturn(__pyx_r, 0);
65556  __Pyx_RefNannyFinishContext();
65557  return __pyx_r;
65558 }
65559 
65560 /* "mbd/CouplingFSI.pyx":2867
65561  * self.owning_rank = np.zeros(nb_nodes, dtype=np.int32)
65562  *
65563  * def prestep(self): # <<<<<<<<<<<<<<
65564  * """Sets external forces on the cable (if any)
65565  * """
65566  */
65567 
65568 /* Python wrapper */
65569 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19prestep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
65570 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_18prestep[] = "ProtChMoorings.prestep(self)\nSets external forces on the cable (if any)\n ";
65571 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_19prestep = {"prestep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19prestep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_18prestep};
65572 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19prestep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
65573  PyObject *__pyx_r = 0;
65574  __Pyx_RefNannyDeclarations
65575  __Pyx_RefNannySetupContext("prestep (wrapper)", 0);
65576  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18prestep(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
65577 
65578  /* function exit code */
65579  __Pyx_RefNannyFinishContext();
65580  return __pyx_r;
65581 }
65582 
65583 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18prestep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
65584  PyObject *__pyx_r = NULL;
65585  __Pyx_TraceDeclarations
65586  __Pyx_RefNannyDeclarations
65587  int __pyx_t_1;
65588  int __pyx_t_2;
65589  int __pyx_t_3;
65590  PyObject *__pyx_t_4 = NULL;
65591  PyObject *__pyx_t_5 = NULL;
65592  PyObject *__pyx_t_6 = NULL;
65593  int __pyx_lineno = 0;
65594  const char *__pyx_filename = NULL;
65595  int __pyx_clineno = 0;
65596  __Pyx_TraceFrameInit(__pyx_codeobj__162)
65597  __Pyx_RefNannySetupContext("prestep", 0);
65598  __Pyx_TraceCall("prestep", __pyx_f[0], 2867, 0, __PYX_ERR(0, 2867, __pyx_L1_error));
65599 
65600  /* "mbd/CouplingFSI.pyx":2870
65601  * """Sets external forces on the cable (if any)
65602  * """
65603  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True: # <<<<<<<<<<<<<<
65604  * self.setExternalForces()
65605  * elif self.external_forces_manual is True:
65606  */
65607  __pyx_t_2 = (__pyx_v_self->ProtChSystem->model != Py_None);
65608  __pyx_t_3 = (__pyx_t_2 != 0);
65609  if (__pyx_t_3) {
65610  } else {
65611  __pyx_t_1 = __pyx_t_3;
65612  goto __pyx_L4_bool_binop_done;
65613  }
65614  __pyx_t_3 = ((__pyx_v_self->external_forces_from_ns == 1) != 0);
65615  __pyx_t_1 = __pyx_t_3;
65616  __pyx_L4_bool_binop_done:;
65617  if (__pyx_t_1) {
65618 
65619  /* "mbd/CouplingFSI.pyx":2871
65620  * """
65621  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
65622  * self.setExternalForces() # <<<<<<<<<<<<<<
65623  * elif self.external_forces_manual is True:
65624  * self.setExternalForces()
65625  */
65626  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setExternalForces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2871, __pyx_L1_error)
65627  __Pyx_GOTREF(__pyx_t_5);
65628  __pyx_t_6 = NULL;
65629  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
65630  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
65631  if (likely(__pyx_t_6)) {
65632  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
65633  __Pyx_INCREF(__pyx_t_6);
65634  __Pyx_INCREF(function);
65635  __Pyx_DECREF_SET(__pyx_t_5, function);
65636  }
65637  }
65638  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
65639  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
65640  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2871, __pyx_L1_error)
65641  __Pyx_GOTREF(__pyx_t_4);
65642  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65643  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65644 
65645  /* "mbd/CouplingFSI.pyx":2870
65646  * """Sets external forces on the cable (if any)
65647  * """
65648  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True: # <<<<<<<<<<<<<<
65649  * self.setExternalForces()
65650  * elif self.external_forces_manual is True:
65651  */
65652  goto __pyx_L3;
65653  }
65654 
65655  /* "mbd/CouplingFSI.pyx":2872
65656  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
65657  * self.setExternalForces()
65658  * elif self.external_forces_manual is True: # <<<<<<<<<<<<<<
65659  * self.setExternalForces()
65660  *
65661  */
65662  __pyx_t_1 = ((__pyx_v_self->external_forces_manual == 1) != 0);
65663  if (__pyx_t_1) {
65664 
65665  /* "mbd/CouplingFSI.pyx":2873
65666  * self.setExternalForces()
65667  * elif self.external_forces_manual is True:
65668  * self.setExternalForces() # <<<<<<<<<<<<<<
65669  *
65670  * def poststep(self):
65671  */
65672  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_setExternalForces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2873, __pyx_L1_error)
65673  __Pyx_GOTREF(__pyx_t_5);
65674  __pyx_t_6 = NULL;
65675  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
65676  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
65677  if (likely(__pyx_t_6)) {
65678  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
65679  __Pyx_INCREF(__pyx_t_6);
65680  __Pyx_INCREF(function);
65681  __Pyx_DECREF_SET(__pyx_t_5, function);
65682  }
65683  }
65684  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
65685  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
65686  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2873, __pyx_L1_error)
65687  __Pyx_GOTREF(__pyx_t_4);
65688  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65689  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65690 
65691  /* "mbd/CouplingFSI.pyx":2872
65692  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
65693  * self.setExternalForces()
65694  * elif self.external_forces_manual is True: # <<<<<<<<<<<<<<
65695  * self.setExternalForces()
65696  *
65697  */
65698  }
65699  __pyx_L3:;
65700 
65701  /* "mbd/CouplingFSI.pyx":2867
65702  * self.owning_rank = np.zeros(nb_nodes, dtype=np.int32)
65703  *
65704  * def prestep(self): # <<<<<<<<<<<<<<
65705  * """Sets external forces on the cable (if any)
65706  * """
65707  */
65708 
65709  /* function exit code */
65710  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
65711  goto __pyx_L0;
65712  __pyx_L1_error:;
65713  __Pyx_XDECREF(__pyx_t_4);
65714  __Pyx_XDECREF(__pyx_t_5);
65715  __Pyx_XDECREF(__pyx_t_6);
65716  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.prestep", __pyx_clineno, __pyx_lineno, __pyx_filename);
65717  __pyx_r = NULL;
65718  __pyx_L0:;
65719  __Pyx_XGIVEREF(__pyx_r);
65720  __Pyx_TraceReturn(__pyx_r, 0);
65721  __Pyx_RefNannyFinishContext();
65722  return __pyx_r;
65723 }
65724 
65725 /* "mbd/CouplingFSI.pyx":2875
65726  * self.setExternalForces()
65727  *
65728  * def poststep(self): # <<<<<<<<<<<<<<
65729  * """Records values
65730  * """
65731  */
65732 
65733 /* Python wrapper */
65734 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_21poststep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
65735 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_20poststep[] = "ProtChMoorings.poststep(self)\nRecords values\n ";
65736 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_21poststep = {"poststep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_21poststep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_20poststep};
65737 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_21poststep(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
65738  PyObject *__pyx_r = 0;
65739  __Pyx_RefNannyDeclarations
65740  __Pyx_RefNannySetupContext("poststep (wrapper)", 0);
65741  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20poststep(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
65742 
65743  /* function exit code */
65744  __Pyx_RefNannyFinishContext();
65745  return __pyx_r;
65746 }
65747 
65748 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20poststep(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
65749  PyObject *__pyx_v_comm = NULL;
65750  PyObject *__pyx_r = NULL;
65751  __Pyx_TraceDeclarations
65752  __Pyx_RefNannyDeclarations
65753  int __pyx_t_1;
65754  PyObject *__pyx_t_2 = NULL;
65755  PyObject *__pyx_t_3 = NULL;
65756  PyObject *__pyx_t_4 = NULL;
65757  PyObject *__pyx_t_5 = NULL;
65758  int __pyx_t_6;
65759  int __pyx_lineno = 0;
65760  const char *__pyx_filename = NULL;
65761  int __pyx_clineno = 0;
65762  __Pyx_TraceFrameInit(__pyx_codeobj__163)
65763  __Pyx_RefNannySetupContext("poststep", 0);
65764  __Pyx_TraceCall("poststep", __pyx_f[0], 2875, 0, __PYX_ERR(0, 2875, __pyx_L1_error));
65765 
65766  /* "mbd/CouplingFSI.pyx":2878
65767  * """Records values
65768  * """
65769  * if self.initialized is False: # <<<<<<<<<<<<<<
65770  * self.initialized = True
65771  * comm = Comm.get().comm.tompi4py()
65772  */
65773  __pyx_t_1 = ((__pyx_v_self->initialized == 0) != 0);
65774  if (__pyx_t_1) {
65775 
65776  /* "mbd/CouplingFSI.pyx":2879
65777  * """
65778  * if self.initialized is False:
65779  * self.initialized = True # <<<<<<<<<<<<<<
65780  * comm = Comm.get().comm.tompi4py()
65781  * if comm.rank == 0 and self.ProtChSystem.record_values is True:
65782  */
65783  __pyx_v_self->initialized = 1;
65784 
65785  /* "mbd/CouplingFSI.pyx":2878
65786  * """Records values
65787  * """
65788  * if self.initialized is False: # <<<<<<<<<<<<<<
65789  * self.initialized = True
65790  * comm = Comm.get().comm.tompi4py()
65791  */
65792  }
65793 
65794  /* "mbd/CouplingFSI.pyx":2880
65795  * if self.initialized is False:
65796  * self.initialized = True
65797  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
65798  * if comm.rank == 0 and self.ProtChSystem.record_values is True:
65799  * self._recordValues()
65800  */
65801  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Comm); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2880, __pyx_L1_error)
65802  __Pyx_GOTREF(__pyx_t_4);
65803  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2880, __pyx_L1_error)
65804  __Pyx_GOTREF(__pyx_t_5);
65805  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
65806  __pyx_t_4 = NULL;
65807  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
65808  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
65809  if (likely(__pyx_t_4)) {
65810  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
65811  __Pyx_INCREF(__pyx_t_4);
65812  __Pyx_INCREF(function);
65813  __Pyx_DECREF_SET(__pyx_t_5, function);
65814  }
65815  }
65816  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
65817  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
65818  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2880, __pyx_L1_error)
65819  __Pyx_GOTREF(__pyx_t_3);
65820  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65821  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_comm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2880, __pyx_L1_error)
65822  __Pyx_GOTREF(__pyx_t_5);
65823  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65824  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2880, __pyx_L1_error)
65825  __Pyx_GOTREF(__pyx_t_3);
65826  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
65827  __pyx_t_5 = NULL;
65828  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
65829  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
65830  if (likely(__pyx_t_5)) {
65831  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
65832  __Pyx_INCREF(__pyx_t_5);
65833  __Pyx_INCREF(function);
65834  __Pyx_DECREF_SET(__pyx_t_3, function);
65835  }
65836  }
65837  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
65838  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
65839  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2880, __pyx_L1_error)
65840  __Pyx_GOTREF(__pyx_t_2);
65841  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65842  __pyx_v_comm = __pyx_t_2;
65843  __pyx_t_2 = 0;
65844 
65845  /* "mbd/CouplingFSI.pyx":2881
65846  * self.initialized = True
65847  * comm = Comm.get().comm.tompi4py()
65848  * if comm.rank == 0 and self.ProtChSystem.record_values is True: # <<<<<<<<<<<<<<
65849  * self._recordValues()
65850  * self._recordH5()
65851  */
65852  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_rank); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2881, __pyx_L1_error)
65853  __Pyx_GOTREF(__pyx_t_2);
65854  __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2881, __pyx_L1_error)
65855  __Pyx_GOTREF(__pyx_t_3);
65856  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
65857  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2881, __pyx_L1_error)
65858  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65859  if (__pyx_t_6) {
65860  } else {
65861  __pyx_t_1 = __pyx_t_6;
65862  goto __pyx_L5_bool_binop_done;
65863  }
65864  __pyx_t_6 = ((__pyx_v_self->ProtChSystem->record_values == 1) != 0);
65865  __pyx_t_1 = __pyx_t_6;
65866  __pyx_L5_bool_binop_done:;
65867  if (__pyx_t_1) {
65868 
65869  /* "mbd/CouplingFSI.pyx":2882
65870  * comm = Comm.get().comm.tompi4py()
65871  * if comm.rank == 0 and self.ProtChSystem.record_values is True:
65872  * self._recordValues() # <<<<<<<<<<<<<<
65873  * self._recordH5()
65874  * self._recordXML()
65875  */
65876  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_recordValues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2882, __pyx_L1_error)
65877  __Pyx_GOTREF(__pyx_t_2);
65878  __pyx_t_5 = NULL;
65879  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
65880  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
65881  if (likely(__pyx_t_5)) {
65882  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
65883  __Pyx_INCREF(__pyx_t_5);
65884  __Pyx_INCREF(function);
65885  __Pyx_DECREF_SET(__pyx_t_2, function);
65886  }
65887  }
65888  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
65889  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
65890  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2882, __pyx_L1_error)
65891  __Pyx_GOTREF(__pyx_t_3);
65892  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
65893  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65894 
65895  /* "mbd/CouplingFSI.pyx":2883
65896  * if comm.rank == 0 and self.ProtChSystem.record_values is True:
65897  * self._recordValues()
65898  * self._recordH5() # <<<<<<<<<<<<<<
65899  * self._recordXML()
65900  * self.tCount += 1
65901  */
65902  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_recordH5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2883, __pyx_L1_error)
65903  __Pyx_GOTREF(__pyx_t_2);
65904  __pyx_t_5 = NULL;
65905  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
65906  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
65907  if (likely(__pyx_t_5)) {
65908  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
65909  __Pyx_INCREF(__pyx_t_5);
65910  __Pyx_INCREF(function);
65911  __Pyx_DECREF_SET(__pyx_t_2, function);
65912  }
65913  }
65914  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
65915  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
65916  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2883, __pyx_L1_error)
65917  __Pyx_GOTREF(__pyx_t_3);
65918  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
65919  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65920 
65921  /* "mbd/CouplingFSI.pyx":2884
65922  * self._recordValues()
65923  * self._recordH5()
65924  * self._recordXML() # <<<<<<<<<<<<<<
65925  * self.tCount += 1
65926  *
65927  */
65928  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_recordXML); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __pyx_L1_error)
65929  __Pyx_GOTREF(__pyx_t_2);
65930  __pyx_t_5 = NULL;
65931  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
65932  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
65933  if (likely(__pyx_t_5)) {
65934  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
65935  __Pyx_INCREF(__pyx_t_5);
65936  __Pyx_INCREF(function);
65937  __Pyx_DECREF_SET(__pyx_t_2, function);
65938  }
65939  }
65940  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
65941  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
65942  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2884, __pyx_L1_error)
65943  __Pyx_GOTREF(__pyx_t_3);
65944  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
65945  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
65946 
65947  /* "mbd/CouplingFSI.pyx":2885
65948  * self._recordH5()
65949  * self._recordXML()
65950  * self.tCount += 1 # <<<<<<<<<<<<<<
65951  *
65952  * def setApplyDrag(self, bool boolval):
65953  */
65954  __pyx_v_self->tCount = (__pyx_v_self->tCount + 1);
65955 
65956  /* "mbd/CouplingFSI.pyx":2881
65957  * self.initialized = True
65958  * comm = Comm.get().comm.tompi4py()
65959  * if comm.rank == 0 and self.ProtChSystem.record_values is True: # <<<<<<<<<<<<<<
65960  * self._recordValues()
65961  * self._recordH5()
65962  */
65963  }
65964 
65965  /* "mbd/CouplingFSI.pyx":2875
65966  * self.setExternalForces()
65967  *
65968  * def poststep(self): # <<<<<<<<<<<<<<
65969  * """Records values
65970  * """
65971  */
65972 
65973  /* function exit code */
65974  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
65975  goto __pyx_L0;
65976  __pyx_L1_error:;
65977  __Pyx_XDECREF(__pyx_t_2);
65978  __Pyx_XDECREF(__pyx_t_3);
65979  __Pyx_XDECREF(__pyx_t_4);
65980  __Pyx_XDECREF(__pyx_t_5);
65981  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.poststep", __pyx_clineno, __pyx_lineno, __pyx_filename);
65982  __pyx_r = NULL;
65983  __pyx_L0:;
65984  __Pyx_XDECREF(__pyx_v_comm);
65985  __Pyx_XGIVEREF(__pyx_r);
65986  __Pyx_TraceReturn(__pyx_r, 0);
65987  __Pyx_RefNannyFinishContext();
65988  return __pyx_r;
65989 }
65990 
65991 /* "mbd/CouplingFSI.pyx":2887
65992  * self.tCount += 1
65993  *
65994  * def setApplyDrag(self, bool boolval): # <<<<<<<<<<<<<<
65995  * for i in range(self.thisptr.cables.size()):
65996  * deref(self.thisptr.cables[i]).applyDrag = boolval
65997  */
65998 
65999 /* Python wrapper */
66000 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23setApplyDrag(PyObject *__pyx_v_self, PyObject *__pyx_arg_boolval); /*proto*/
66001 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_22setApplyDrag[] = "ProtChMoorings.setApplyDrag(self, bool boolval)";
66002 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_23setApplyDrag = {"setApplyDrag", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23setApplyDrag, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_22setApplyDrag};
66003 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23setApplyDrag(PyObject *__pyx_v_self, PyObject *__pyx_arg_boolval) {
66004  bool __pyx_v_boolval;
66005  int __pyx_lineno = 0;
66006  const char *__pyx_filename = NULL;
66007  int __pyx_clineno = 0;
66008  PyObject *__pyx_r = 0;
66009  __Pyx_RefNannyDeclarations
66010  __Pyx_RefNannySetupContext("setApplyDrag (wrapper)", 0);
66011  assert(__pyx_arg_boolval); {
66012  __pyx_v_boolval = __Pyx_PyObject_IsTrue(__pyx_arg_boolval); if (unlikely((__pyx_v_boolval == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2887, __pyx_L3_error)
66013  }
66014  goto __pyx_L4_argument_unpacking_done;
66015  __pyx_L3_error:;
66016  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setApplyDrag", __pyx_clineno, __pyx_lineno, __pyx_filename);
66017  __Pyx_RefNannyFinishContext();
66018  return NULL;
66019  __pyx_L4_argument_unpacking_done:;
66020  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22setApplyDrag(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((bool)__pyx_v_boolval));
66021 
66022  /* function exit code */
66023  __Pyx_RefNannyFinishContext();
66024  return __pyx_r;
66025 }
66026 
66027 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22setApplyDrag(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_boolval) {
66028  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_v_i;
66029  PyObject *__pyx_r = NULL;
66030  __Pyx_TraceDeclarations
66031  __Pyx_RefNannyDeclarations
66032  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_1;
66033  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_2;
66034  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_3;
66035  int __pyx_lineno = 0;
66036  const char *__pyx_filename = NULL;
66037  int __pyx_clineno = 0;
66038  __Pyx_TraceFrameInit(__pyx_codeobj__164)
66039  __Pyx_RefNannySetupContext("setApplyDrag", 0);
66040  __Pyx_TraceCall("setApplyDrag", __pyx_f[0], 2887, 0, __PYX_ERR(0, 2887, __pyx_L1_error));
66041 
66042  /* "mbd/CouplingFSI.pyx":2888
66043  *
66044  * def setApplyDrag(self, bool boolval):
66045  * for i in range(self.thisptr.cables.size()): # <<<<<<<<<<<<<<
66046  * deref(self.thisptr.cables[i]).applyDrag = boolval
66047  *
66048  */
66049  __pyx_t_1 = __pyx_v_self->thisptr->cables.size();
66050  __pyx_t_2 = __pyx_t_1;
66051  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
66052  __pyx_v_i = __pyx_t_3;
66053 
66054  /* "mbd/CouplingFSI.pyx":2889
66055  * def setApplyDrag(self, bool boolval):
66056  * for i in range(self.thisptr.cables.size()):
66057  * deref(self.thisptr.cables[i]).applyDrag = boolval # <<<<<<<<<<<<<<
66058  *
66059  * def setApplyAddedMass(self, bool boolval):
66060  */
66061  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).applyDrag = __pyx_v_boolval;
66062  }
66063 
66064  /* "mbd/CouplingFSI.pyx":2887
66065  * self.tCount += 1
66066  *
66067  * def setApplyDrag(self, bool boolval): # <<<<<<<<<<<<<<
66068  * for i in range(self.thisptr.cables.size()):
66069  * deref(self.thisptr.cables[i]).applyDrag = boolval
66070  */
66071 
66072  /* function exit code */
66073  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66074  goto __pyx_L0;
66075  __pyx_L1_error:;
66076  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setApplyDrag", __pyx_clineno, __pyx_lineno, __pyx_filename);
66077  __pyx_r = NULL;
66078  __pyx_L0:;
66079  __Pyx_XGIVEREF(__pyx_r);
66080  __Pyx_TraceReturn(__pyx_r, 0);
66081  __Pyx_RefNannyFinishContext();
66082  return __pyx_r;
66083 }
66084 
66085 /* "mbd/CouplingFSI.pyx":2891
66086  * deref(self.thisptr.cables[i]).applyDrag = boolval
66087  *
66088  * def setApplyAddedMass(self, bool boolval): # <<<<<<<<<<<<<<
66089  * for i in range(self.thisptr.cables.size()):
66090  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
66091  */
66092 
66093 /* Python wrapper */
66094 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_25setApplyAddedMass(PyObject *__pyx_v_self, PyObject *__pyx_arg_boolval); /*proto*/
66095 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_24setApplyAddedMass[] = "ProtChMoorings.setApplyAddedMass(self, bool boolval)";
66096 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_25setApplyAddedMass = {"setApplyAddedMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_25setApplyAddedMass, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_24setApplyAddedMass};
66097 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_25setApplyAddedMass(PyObject *__pyx_v_self, PyObject *__pyx_arg_boolval) {
66098  bool __pyx_v_boolval;
66099  int __pyx_lineno = 0;
66100  const char *__pyx_filename = NULL;
66101  int __pyx_clineno = 0;
66102  PyObject *__pyx_r = 0;
66103  __Pyx_RefNannyDeclarations
66104  __Pyx_RefNannySetupContext("setApplyAddedMass (wrapper)", 0);
66105  assert(__pyx_arg_boolval); {
66106  __pyx_v_boolval = __Pyx_PyObject_IsTrue(__pyx_arg_boolval); if (unlikely((__pyx_v_boolval == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2891, __pyx_L3_error)
66107  }
66108  goto __pyx_L4_argument_unpacking_done;
66109  __pyx_L3_error:;
66110  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setApplyAddedMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
66111  __Pyx_RefNannyFinishContext();
66112  return NULL;
66113  __pyx_L4_argument_unpacking_done:;
66114  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24setApplyAddedMass(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((bool)__pyx_v_boolval));
66115 
66116  /* function exit code */
66117  __Pyx_RefNannyFinishContext();
66118  return __pyx_r;
66119 }
66120 
66121 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24setApplyAddedMass(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_boolval) {
66122  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_v_i;
66123  PyObject *__pyx_r = NULL;
66124  __Pyx_TraceDeclarations
66125  __Pyx_RefNannyDeclarations
66126  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_1;
66127  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_2;
66128  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_3;
66129  int __pyx_lineno = 0;
66130  const char *__pyx_filename = NULL;
66131  int __pyx_clineno = 0;
66132  __Pyx_TraceFrameInit(__pyx_codeobj__165)
66133  __Pyx_RefNannySetupContext("setApplyAddedMass", 0);
66134  __Pyx_TraceCall("setApplyAddedMass", __pyx_f[0], 2891, 0, __PYX_ERR(0, 2891, __pyx_L1_error));
66135 
66136  /* "mbd/CouplingFSI.pyx":2892
66137  *
66138  * def setApplyAddedMass(self, bool boolval):
66139  * for i in range(self.thisptr.cables.size()): # <<<<<<<<<<<<<<
66140  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
66141  *
66142  */
66143  __pyx_t_1 = __pyx_v_self->thisptr->cables.size();
66144  __pyx_t_2 = __pyx_t_1;
66145  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
66146  __pyx_v_i = __pyx_t_3;
66147 
66148  /* "mbd/CouplingFSI.pyx":2893
66149  * def setApplyAddedMass(self, bool boolval):
66150  * for i in range(self.thisptr.cables.size()):
66151  * deref(self.thisptr.cables[i]).applyAddedMass = boolval # <<<<<<<<<<<<<<
66152  *
66153  * def setApplyBuoyancy(self, bool boolval):
66154  */
66155  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).applyAddedMass = __pyx_v_boolval;
66156  }
66157 
66158  /* "mbd/CouplingFSI.pyx":2891
66159  * deref(self.thisptr.cables[i]).applyDrag = boolval
66160  *
66161  * def setApplyAddedMass(self, bool boolval): # <<<<<<<<<<<<<<
66162  * for i in range(self.thisptr.cables.size()):
66163  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
66164  */
66165 
66166  /* function exit code */
66167  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66168  goto __pyx_L0;
66169  __pyx_L1_error:;
66170  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setApplyAddedMass", __pyx_clineno, __pyx_lineno, __pyx_filename);
66171  __pyx_r = NULL;
66172  __pyx_L0:;
66173  __Pyx_XGIVEREF(__pyx_r);
66174  __Pyx_TraceReturn(__pyx_r, 0);
66175  __Pyx_RefNannyFinishContext();
66176  return __pyx_r;
66177 }
66178 
66179 /* "mbd/CouplingFSI.pyx":2895
66180  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
66181  *
66182  * def setApplyBuoyancy(self, bool boolval): # <<<<<<<<<<<<<<
66183  * for i in range(self.thisptr.cables.size()):
66184  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
66185  */
66186 
66187 /* Python wrapper */
66188 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_27setApplyBuoyancy(PyObject *__pyx_v_self, PyObject *__pyx_arg_boolval); /*proto*/
66189 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_26setApplyBuoyancy[] = "ProtChMoorings.setApplyBuoyancy(self, bool boolval)";
66190 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_27setApplyBuoyancy = {"setApplyBuoyancy", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_27setApplyBuoyancy, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_26setApplyBuoyancy};
66191 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_27setApplyBuoyancy(PyObject *__pyx_v_self, PyObject *__pyx_arg_boolval) {
66192  bool __pyx_v_boolval;
66193  int __pyx_lineno = 0;
66194  const char *__pyx_filename = NULL;
66195  int __pyx_clineno = 0;
66196  PyObject *__pyx_r = 0;
66197  __Pyx_RefNannyDeclarations
66198  __Pyx_RefNannySetupContext("setApplyBuoyancy (wrapper)", 0);
66199  assert(__pyx_arg_boolval); {
66200  __pyx_v_boolval = __Pyx_PyObject_IsTrue(__pyx_arg_boolval); if (unlikely((__pyx_v_boolval == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2895, __pyx_L3_error)
66201  }
66202  goto __pyx_L4_argument_unpacking_done;
66203  __pyx_L3_error:;
66204  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setApplyBuoyancy", __pyx_clineno, __pyx_lineno, __pyx_filename);
66205  __Pyx_RefNannyFinishContext();
66206  return NULL;
66207  __pyx_L4_argument_unpacking_done:;
66208  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_26setApplyBuoyancy(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((bool)__pyx_v_boolval));
66209 
66210  /* function exit code */
66211  __Pyx_RefNannyFinishContext();
66212  return __pyx_r;
66213 }
66214 
66215 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_26setApplyBuoyancy(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_boolval) {
66216  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_v_i;
66217  PyObject *__pyx_r = NULL;
66218  __Pyx_TraceDeclarations
66219  __Pyx_RefNannyDeclarations
66220  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_1;
66221  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_2;
66222  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_3;
66223  int __pyx_lineno = 0;
66224  const char *__pyx_filename = NULL;
66225  int __pyx_clineno = 0;
66226  __Pyx_TraceFrameInit(__pyx_codeobj__166)
66227  __Pyx_RefNannySetupContext("setApplyBuoyancy", 0);
66228  __Pyx_TraceCall("setApplyBuoyancy", __pyx_f[0], 2895, 0, __PYX_ERR(0, 2895, __pyx_L1_error));
66229 
66230  /* "mbd/CouplingFSI.pyx":2896
66231  *
66232  * def setApplyBuoyancy(self, bool boolval):
66233  * for i in range(self.thisptr.cables.size()): # <<<<<<<<<<<<<<
66234  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
66235  *
66236  */
66237  __pyx_t_1 = __pyx_v_self->thisptr->cables.size();
66238  __pyx_t_2 = __pyx_t_1;
66239  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
66240  __pyx_v_i = __pyx_t_3;
66241 
66242  /* "mbd/CouplingFSI.pyx":2897
66243  * def setApplyBuoyancy(self, bool boolval):
66244  * for i in range(self.thisptr.cables.size()):
66245  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval # <<<<<<<<<<<<<<
66246  *
66247  * def setNodesPositionFunction(self, function_position, function_tangent=None):
66248  */
66249  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).applyBuoyancy = __pyx_v_boolval;
66250  }
66251 
66252  /* "mbd/CouplingFSI.pyx":2895
66253  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
66254  *
66255  * def setApplyBuoyancy(self, bool boolval): # <<<<<<<<<<<<<<
66256  * for i in range(self.thisptr.cables.size()):
66257  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
66258  */
66259 
66260  /* function exit code */
66261  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66262  goto __pyx_L0;
66263  __pyx_L1_error:;
66264  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setApplyBuoyancy", __pyx_clineno, __pyx_lineno, __pyx_filename);
66265  __pyx_r = NULL;
66266  __pyx_L0:;
66267  __Pyx_XGIVEREF(__pyx_r);
66268  __Pyx_TraceReturn(__pyx_r, 0);
66269  __Pyx_RefNannyFinishContext();
66270  return __pyx_r;
66271 }
66272 
66273 /* "mbd/CouplingFSI.pyx":2899
66274  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
66275  *
66276  * def setNodesPositionFunction(self, function_position, function_tangent=None): # <<<<<<<<<<<<<<
66277  * """Function to build nodes
66278  *
66279  */
66280 
66281 /* Python wrapper */
66282 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29setNodesPositionFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
66283 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_28setNodesPositionFunction[] = "ProtChMoorings.setNodesPositionFunction(self, function_position, function_tangent=None)\nFunction to build nodes\n\n Parameters\n ----------\n function_position:\n Must be a function taking one argument (e.g. distance\n along cable) and returning 3 arguments (x, y, z) coords.\n function_position: Optional\n Must be a function taking one argument (e.g. distance\n along cable) and returning 3 arguments (x, y, z) tangents at coords.\n ";
66284 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_29setNodesPositionFunction = {"setNodesPositionFunction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29setNodesPositionFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_28setNodesPositionFunction};
66285 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29setNodesPositionFunction(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
66286  PyObject *__pyx_v_function_position = 0;
66287  PyObject *__pyx_v_function_tangent = 0;
66288  int __pyx_lineno = 0;
66289  const char *__pyx_filename = NULL;
66290  int __pyx_clineno = 0;
66291  PyObject *__pyx_r = 0;
66292  __Pyx_RefNannyDeclarations
66293  __Pyx_RefNannySetupContext("setNodesPositionFunction (wrapper)", 0);
66294  {
66295  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_function_position,&__pyx_n_s_function_tangent,0};
66296  PyObject* values[2] = {0,0};
66297  values[1] = ((PyObject *)Py_None);
66298  if (unlikely(__pyx_kwds)) {
66299  Py_ssize_t kw_args;
66300  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
66301  switch (pos_args) {
66302  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
66303  CYTHON_FALLTHROUGH;
66304  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
66305  CYTHON_FALLTHROUGH;
66306  case 0: break;
66307  default: goto __pyx_L5_argtuple_error;
66308  }
66309  kw_args = PyDict_Size(__pyx_kwds);
66310  switch (pos_args) {
66311  case 0:
66312  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_function_position)) != 0)) kw_args--;
66313  else goto __pyx_L5_argtuple_error;
66314  CYTHON_FALLTHROUGH;
66315  case 1:
66316  if (kw_args > 0) {
66317  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_function_tangent);
66318  if (value) { values[1] = value; kw_args--; }
66319  }
66320  }
66321  if (unlikely(kw_args > 0)) {
66322  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNodesPositionFunction") < 0)) __PYX_ERR(0, 2899, __pyx_L3_error)
66323  }
66324  } else {
66325  switch (PyTuple_GET_SIZE(__pyx_args)) {
66326  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
66327  CYTHON_FALLTHROUGH;
66328  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
66329  break;
66330  default: goto __pyx_L5_argtuple_error;
66331  }
66332  }
66333  __pyx_v_function_position = values[0];
66334  __pyx_v_function_tangent = values[1];
66335  }
66336  goto __pyx_L4_argument_unpacking_done;
66337  __pyx_L5_argtuple_error:;
66338  __Pyx_RaiseArgtupleInvalid("setNodesPositionFunction", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2899, __pyx_L3_error)
66339  __pyx_L3_error:;
66340  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setNodesPositionFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
66341  __Pyx_RefNannyFinishContext();
66342  return NULL;
66343  __pyx_L4_argument_unpacking_done:;
66344  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_28setNodesPositionFunction(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_function_position, __pyx_v_function_tangent);
66345 
66346  /* function exit code */
66347  __Pyx_RefNannyFinishContext();
66348  return __pyx_r;
66349 }
66350 
66351 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_28setNodesPositionFunction(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_function_position, PyObject *__pyx_v_function_tangent) {
66352  PyObject *__pyx_r = NULL;
66353  __Pyx_TraceDeclarations
66354  __Pyx_RefNannyDeclarations
66355  int __pyx_lineno = 0;
66356  const char *__pyx_filename = NULL;
66357  int __pyx_clineno = 0;
66358  __Pyx_TraceFrameInit(__pyx_codeobj__167)
66359  __Pyx_RefNannySetupContext("setNodesPositionFunction", 0);
66360  __Pyx_TraceCall("setNodesPositionFunction", __pyx_f[0], 2899, 0, __PYX_ERR(0, 2899, __pyx_L1_error));
66361 
66362  /* "mbd/CouplingFSI.pyx":2911
66363  * along cable) and returning 3 arguments (x, y, z) tangents at coords.
66364  * """
66365  * self.nodes_function = function_position # <<<<<<<<<<<<<<
66366  * self.nodes_function_tangent = function_tangent
66367  *
66368  */
66369  __Pyx_INCREF(__pyx_v_function_position);
66370  __Pyx_GIVEREF(__pyx_v_function_position);
66371  __Pyx_GOTREF(__pyx_v_self->nodes_function);
66372  __Pyx_DECREF(__pyx_v_self->nodes_function);
66373  __pyx_v_self->nodes_function = __pyx_v_function_position;
66374 
66375  /* "mbd/CouplingFSI.pyx":2912
66376  * """
66377  * self.nodes_function = function_position
66378  * self.nodes_function_tangent = function_tangent # <<<<<<<<<<<<<<
66379  *
66380  * def setFluidVelocityFunction(self, function):
66381  */
66382  __Pyx_INCREF(__pyx_v_function_tangent);
66383  __Pyx_GIVEREF(__pyx_v_function_tangent);
66384  __Pyx_GOTREF(__pyx_v_self->nodes_function_tangent);
66385  __Pyx_DECREF(__pyx_v_self->nodes_function_tangent);
66386  __pyx_v_self->nodes_function_tangent = __pyx_v_function_tangent;
66387 
66388  /* "mbd/CouplingFSI.pyx":2899
66389  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
66390  *
66391  * def setNodesPositionFunction(self, function_position, function_tangent=None): # <<<<<<<<<<<<<<
66392  * """Function to build nodes
66393  *
66394  */
66395 
66396  /* function exit code */
66397  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66398  goto __pyx_L0;
66399  __pyx_L1_error:;
66400  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setNodesPositionFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
66401  __pyx_r = NULL;
66402  __pyx_L0:;
66403  __Pyx_XGIVEREF(__pyx_r);
66404  __Pyx_TraceReturn(__pyx_r, 0);
66405  __Pyx_RefNannyFinishContext();
66406  return __pyx_r;
66407 }
66408 
66409 /* "mbd/CouplingFSI.pyx":2914
66410  * self.nodes_function_tangent = function_tangent
66411  *
66412  * def setFluidVelocityFunction(self, function): # <<<<<<<<<<<<<<
66413  * """Function to build nodes
66414  *
66415  */
66416 
66417 /* Python wrapper */
66418 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_31setFluidVelocityFunction(PyObject *__pyx_v_self, PyObject *__pyx_v_function); /*proto*/
66419 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_30setFluidVelocityFunction[] = "ProtChMoorings.setFluidVelocityFunction(self, function)\nFunction to build nodes\n\n Parameters\n ----------\n function:\n Must be a function taking two arguments (3D coordinates\n and time), and returning velocity (x, y, z).\n ";
66420 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_31setFluidVelocityFunction = {"setFluidVelocityFunction", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_31setFluidVelocityFunction, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_30setFluidVelocityFunction};
66421 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_31setFluidVelocityFunction(PyObject *__pyx_v_self, PyObject *__pyx_v_function) {
66422  PyObject *__pyx_r = 0;
66423  __Pyx_RefNannyDeclarations
66424  __Pyx_RefNannySetupContext("setFluidVelocityFunction (wrapper)", 0);
66425  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_30setFluidVelocityFunction(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_function));
66426 
66427  /* function exit code */
66428  __Pyx_RefNannyFinishContext();
66429  return __pyx_r;
66430 }
66431 
66432 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_30setFluidVelocityFunction(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_function) {
66433  PyObject *__pyx_r = NULL;
66434  __Pyx_TraceDeclarations
66435  __Pyx_RefNannyDeclarations
66436  int __pyx_lineno = 0;
66437  const char *__pyx_filename = NULL;
66438  int __pyx_clineno = 0;
66439  __Pyx_TraceFrameInit(__pyx_codeobj__168)
66440  __Pyx_RefNannySetupContext("setFluidVelocityFunction", 0);
66441  __Pyx_TraceCall("setFluidVelocityFunction", __pyx_f[0], 2914, 0, __PYX_ERR(0, 2914, __pyx_L1_error));
66442 
66443  /* "mbd/CouplingFSI.pyx":2923
66444  * and time), and returning velocity (x, y, z).
66445  * """
66446  * self.fluid_velocity_function = function # <<<<<<<<<<<<<<
66447  *
66448  * def fixFrontNode(self, bool fixed):
66449  */
66450  __Pyx_INCREF(__pyx_v_function);
66451  __Pyx_GIVEREF(__pyx_v_function);
66452  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_function);
66453  __Pyx_DECREF(__pyx_v_self->fluid_velocity_function);
66454  __pyx_v_self->fluid_velocity_function = __pyx_v_function;
66455 
66456  /* "mbd/CouplingFSI.pyx":2914
66457  * self.nodes_function_tangent = function_tangent
66458  *
66459  * def setFluidVelocityFunction(self, function): # <<<<<<<<<<<<<<
66460  * """Function to build nodes
66461  *
66462  */
66463 
66464  /* function exit code */
66465  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66466  goto __pyx_L0;
66467  __pyx_L1_error:;
66468  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setFluidVelocityFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
66469  __pyx_r = NULL;
66470  __pyx_L0:;
66471  __Pyx_XGIVEREF(__pyx_r);
66472  __Pyx_TraceReturn(__pyx_r, 0);
66473  __Pyx_RefNannyFinishContext();
66474  return __pyx_r;
66475 }
66476 
66477 /* "mbd/CouplingFSI.pyx":2925
66478  * self.fluid_velocity_function = function
66479  *
66480  * def fixFrontNode(self, bool fixed): # <<<<<<<<<<<<<<
66481  * """Fix front node of cable
66482  *
66483  */
66484 
66485 /* Python wrapper */
66486 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_33fixFrontNode(PyObject *__pyx_v_self, PyObject *__pyx_arg_fixed); /*proto*/
66487 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_32fixFrontNode[] = "ProtChMoorings.fixFrontNode(self, bool fixed)\nFix front node of cable\n\n Parameters\n ----------\n fixed: bool\n Fixes node if True\n ";
66488 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_33fixFrontNode = {"fixFrontNode", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_33fixFrontNode, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_32fixFrontNode};
66489 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_33fixFrontNode(PyObject *__pyx_v_self, PyObject *__pyx_arg_fixed) {
66490  bool __pyx_v_fixed;
66491  int __pyx_lineno = 0;
66492  const char *__pyx_filename = NULL;
66493  int __pyx_clineno = 0;
66494  PyObject *__pyx_r = 0;
66495  __Pyx_RefNannyDeclarations
66496  __Pyx_RefNannySetupContext("fixFrontNode (wrapper)", 0);
66497  assert(__pyx_arg_fixed); {
66498  __pyx_v_fixed = __Pyx_PyObject_IsTrue(__pyx_arg_fixed); if (unlikely((__pyx_v_fixed == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2925, __pyx_L3_error)
66499  }
66500  goto __pyx_L4_argument_unpacking_done;
66501  __pyx_L3_error:;
66502  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fixFrontNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
66503  __Pyx_RefNannyFinishContext();
66504  return NULL;
66505  __pyx_L4_argument_unpacking_done:;
66506  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_32fixFrontNode(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((bool)__pyx_v_fixed));
66507 
66508  /* function exit code */
66509  __Pyx_RefNannyFinishContext();
66510  return __pyx_r;
66511 }
66512 
66513 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_32fixFrontNode(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_fixed) {
66514  PyObject *__pyx_r = NULL;
66515  __Pyx_TraceDeclarations
66516  __Pyx_RefNannyDeclarations
66517  int __pyx_t_1;
66518  int __pyx_lineno = 0;
66519  const char *__pyx_filename = NULL;
66520  int __pyx_clineno = 0;
66521  __Pyx_TraceFrameInit(__pyx_codeobj__169)
66522  __Pyx_RefNannySetupContext("fixFrontNode", 0);
66523  __Pyx_TraceCall("fixFrontNode", __pyx_f[0], 2925, 0, __PYX_ERR(0, 2925, __pyx_L1_error));
66524 
66525  /* "mbd/CouplingFSI.pyx":2933
66526  * Fixes node if True
66527  * """
66528  * assert self.nodes_built is True, 'call buildNodes() before calling this function' # <<<<<<<<<<<<<<
66529  * if self.beam_type == "BeamEuler":
66530  * deref(self.thisptr.nodesRot.front()).SetFixed(fixed)
66531  */
66532  #ifndef CYTHON_WITHOUT_ASSERTIONS
66533  if (unlikely(!Py_OptimizeFlag)) {
66534  if (unlikely(!((__pyx_v_self->nodes_built == 1) != 0))) {
66535  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_call_buildNodes_before_calling_t);
66536  __PYX_ERR(0, 2933, __pyx_L1_error)
66537  }
66538  }
66539  #endif
66540 
66541  /* "mbd/CouplingFSI.pyx":2934
66542  * """
66543  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66544  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
66545  * deref(self.thisptr.nodesRot.front()).SetFixed(fixed)
66546  * else:
66547  */
66548  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
66549  if (__pyx_t_1) {
66550 
66551  /* "mbd/CouplingFSI.pyx":2935
66552  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66553  * if self.beam_type == "BeamEuler":
66554  * deref(self.thisptr.nodesRot.front()).SetFixed(fixed) # <<<<<<<<<<<<<<
66555  * else:
66556  * deref(self.thisptr.nodes.front()).SetFixed(fixed)
66557  */
66558  (*__pyx_v_self->thisptr->nodesRot.front()).SetFixed(__pyx_v_fixed);
66559 
66560  /* "mbd/CouplingFSI.pyx":2934
66561  * """
66562  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66563  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
66564  * deref(self.thisptr.nodesRot.front()).SetFixed(fixed)
66565  * else:
66566  */
66567  goto __pyx_L3;
66568  }
66569 
66570  /* "mbd/CouplingFSI.pyx":2937
66571  * deref(self.thisptr.nodesRot.front()).SetFixed(fixed)
66572  * else:
66573  * deref(self.thisptr.nodes.front()).SetFixed(fixed) # <<<<<<<<<<<<<<
66574  *
66575  * def fixBackNode(self, bool fixed):
66576  */
66577  /*else*/ {
66578  (*__pyx_v_self->thisptr->nodes.front()).SetFixed(__pyx_v_fixed);
66579  }
66580  __pyx_L3:;
66581 
66582  /* "mbd/CouplingFSI.pyx":2925
66583  * self.fluid_velocity_function = function
66584  *
66585  * def fixFrontNode(self, bool fixed): # <<<<<<<<<<<<<<
66586  * """Fix front node of cable
66587  *
66588  */
66589 
66590  /* function exit code */
66591  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66592  goto __pyx_L0;
66593  __pyx_L1_error:;
66594  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fixFrontNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
66595  __pyx_r = NULL;
66596  __pyx_L0:;
66597  __Pyx_XGIVEREF(__pyx_r);
66598  __Pyx_TraceReturn(__pyx_r, 0);
66599  __Pyx_RefNannyFinishContext();
66600  return __pyx_r;
66601 }
66602 
66603 /* "mbd/CouplingFSI.pyx":2939
66604  * deref(self.thisptr.nodes.front()).SetFixed(fixed)
66605  *
66606  * def fixBackNode(self, bool fixed): # <<<<<<<<<<<<<<
66607  * """Fix back node of cable
66608  *
66609  */
66610 
66611 /* Python wrapper */
66612 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_35fixBackNode(PyObject *__pyx_v_self, PyObject *__pyx_arg_fixed); /*proto*/
66613 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_34fixBackNode[] = "ProtChMoorings.fixBackNode(self, bool fixed)\nFix back node of cable\n\n Parameters\n ----------\n fixed: bool\n Fixes node if True\n ";
66614 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_35fixBackNode = {"fixBackNode", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_35fixBackNode, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_34fixBackNode};
66615 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_35fixBackNode(PyObject *__pyx_v_self, PyObject *__pyx_arg_fixed) {
66616  bool __pyx_v_fixed;
66617  int __pyx_lineno = 0;
66618  const char *__pyx_filename = NULL;
66619  int __pyx_clineno = 0;
66620  PyObject *__pyx_r = 0;
66621  __Pyx_RefNannyDeclarations
66622  __Pyx_RefNannySetupContext("fixBackNode (wrapper)", 0);
66623  assert(__pyx_arg_fixed); {
66624  __pyx_v_fixed = __Pyx_PyObject_IsTrue(__pyx_arg_fixed); if (unlikely((__pyx_v_fixed == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2939, __pyx_L3_error)
66625  }
66626  goto __pyx_L4_argument_unpacking_done;
66627  __pyx_L3_error:;
66628  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fixBackNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
66629  __Pyx_RefNannyFinishContext();
66630  return NULL;
66631  __pyx_L4_argument_unpacking_done:;
66632  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_34fixBackNode(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((bool)__pyx_v_fixed));
66633 
66634  /* function exit code */
66635  __Pyx_RefNannyFinishContext();
66636  return __pyx_r;
66637 }
66638 
66639 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_34fixBackNode(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, bool __pyx_v_fixed) {
66640  PyObject *__pyx_r = NULL;
66641  __Pyx_TraceDeclarations
66642  __Pyx_RefNannyDeclarations
66643  int __pyx_t_1;
66644  int __pyx_lineno = 0;
66645  const char *__pyx_filename = NULL;
66646  int __pyx_clineno = 0;
66647  __Pyx_TraceFrameInit(__pyx_codeobj__170)
66648  __Pyx_RefNannySetupContext("fixBackNode", 0);
66649  __Pyx_TraceCall("fixBackNode", __pyx_f[0], 2939, 0, __PYX_ERR(0, 2939, __pyx_L1_error));
66650 
66651  /* "mbd/CouplingFSI.pyx":2947
66652  * Fixes node if True
66653  * """
66654  * assert self.nodes_built is True, 'call buildNodes() before calling this function' # <<<<<<<<<<<<<<
66655  * if self.beam_type == "BeamEuler":
66656  * deref(self.thisptr.nodesRot.back()).SetFixed(fixed)
66657  */
66658  #ifndef CYTHON_WITHOUT_ASSERTIONS
66659  if (unlikely(!Py_OptimizeFlag)) {
66660  if (unlikely(!((__pyx_v_self->nodes_built == 1) != 0))) {
66661  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_call_buildNodes_before_calling_t);
66662  __PYX_ERR(0, 2947, __pyx_L1_error)
66663  }
66664  }
66665  #endif
66666 
66667  /* "mbd/CouplingFSI.pyx":2948
66668  * """
66669  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66670  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
66671  * deref(self.thisptr.nodesRot.back()).SetFixed(fixed)
66672  * else:
66673  */
66674  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
66675  if (__pyx_t_1) {
66676 
66677  /* "mbd/CouplingFSI.pyx":2949
66678  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66679  * if self.beam_type == "BeamEuler":
66680  * deref(self.thisptr.nodesRot.back()).SetFixed(fixed) # <<<<<<<<<<<<<<
66681  * else:
66682  * deref(self.thisptr.nodes.back()).SetFixed(fixed)
66683  */
66684  (*__pyx_v_self->thisptr->nodesRot.back()).SetFixed(__pyx_v_fixed);
66685 
66686  /* "mbd/CouplingFSI.pyx":2948
66687  * """
66688  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66689  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
66690  * deref(self.thisptr.nodesRot.back()).SetFixed(fixed)
66691  * else:
66692  */
66693  goto __pyx_L3;
66694  }
66695 
66696  /* "mbd/CouplingFSI.pyx":2951
66697  * deref(self.thisptr.nodesRot.back()).SetFixed(fixed)
66698  * else:
66699  * deref(self.thisptr.nodes.back()).SetFixed(fixed) # <<<<<<<<<<<<<<
66700  *
66701  * def attachBackNodeToBody(self, ProtChBody body):
66702  */
66703  /*else*/ {
66704  (*__pyx_v_self->thisptr->nodes.back()).SetFixed(__pyx_v_fixed);
66705  }
66706  __pyx_L3:;
66707 
66708  /* "mbd/CouplingFSI.pyx":2939
66709  * deref(self.thisptr.nodes.front()).SetFixed(fixed)
66710  *
66711  * def fixBackNode(self, bool fixed): # <<<<<<<<<<<<<<
66712  * """Fix back node of cable
66713  *
66714  */
66715 
66716  /* function exit code */
66717  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66718  goto __pyx_L0;
66719  __pyx_L1_error:;
66720  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fixBackNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
66721  __pyx_r = NULL;
66722  __pyx_L0:;
66723  __Pyx_XGIVEREF(__pyx_r);
66724  __Pyx_TraceReturn(__pyx_r, 0);
66725  __Pyx_RefNannyFinishContext();
66726  return __pyx_r;
66727 }
66728 
66729 /* "mbd/CouplingFSI.pyx":2953
66730  * deref(self.thisptr.nodes.back()).SetFixed(fixed)
66731  *
66732  * def attachBackNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
66733  * """Attaches back node to a body with ChLinkLockLock
66734  *
66735  */
66736 
66737 /* Python wrapper */
66738 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_37attachBackNodeToBody(PyObject *__pyx_v_self, PyObject *__pyx_v_body); /*proto*/
66739 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_36attachBackNodeToBody[] = "ProtChMoorings.attachBackNodeToBody(self, ProtChBody body)\nAttaches back node to a body with ChLinkLockLock\n\n Parameters\n ----------\n body: ProtChBody\n body to which the node will be attached\n ";
66740 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_37attachBackNodeToBody = {"attachBackNodeToBody", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_37attachBackNodeToBody, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_36attachBackNodeToBody};
66741 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_37attachBackNodeToBody(PyObject *__pyx_v_self, PyObject *__pyx_v_body) {
66742  int __pyx_lineno = 0;
66743  const char *__pyx_filename = NULL;
66744  int __pyx_clineno = 0;
66745  PyObject *__pyx_r = 0;
66746  __Pyx_RefNannyDeclarations
66747  __Pyx_RefNannySetupContext("attachBackNodeToBody (wrapper)", 0);
66748  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body), __pyx_ptype_3mbd_11CouplingFSI_ProtChBody, 1, "body", 0))) __PYX_ERR(0, 2953, __pyx_L1_error)
66749  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_36attachBackNodeToBody(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_body));
66750 
66751  /* function exit code */
66752  goto __pyx_L0;
66753  __pyx_L1_error:;
66754  __pyx_r = NULL;
66755  __pyx_L0:;
66756  __Pyx_RefNannyFinishContext();
66757  return __pyx_r;
66758 }
66759 
66760 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_36attachBackNodeToBody(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_body) {
66761  PyObject *__pyx_r = NULL;
66762  __Pyx_TraceDeclarations
66763  __Pyx_RefNannyDeclarations
66764  int __pyx_lineno = 0;
66765  const char *__pyx_filename = NULL;
66766  int __pyx_clineno = 0;
66767  __Pyx_TraceFrameInit(__pyx_codeobj__171)
66768  __Pyx_RefNannySetupContext("attachBackNodeToBody", 0);
66769  __Pyx_TraceCall("attachBackNodeToBody", __pyx_f[0], 2953, 0, __PYX_ERR(0, 2953, __pyx_L1_error));
66770 
66771  /* "mbd/CouplingFSI.pyx":2961
66772  * body to which the node will be attached
66773  * """
66774  * assert self.nodes_built is True, 'call buildNodes() before calling this function' # <<<<<<<<<<<<<<
66775  * self.thisptr.attachBackNodeToBody(body.thisptr.body)
66776  *
66777  */
66778  #ifndef CYTHON_WITHOUT_ASSERTIONS
66779  if (unlikely(!Py_OptimizeFlag)) {
66780  if (unlikely(!((__pyx_v_self->nodes_built == 1) != 0))) {
66781  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_call_buildNodes_before_calling_t);
66782  __PYX_ERR(0, 2961, __pyx_L1_error)
66783  }
66784  }
66785  #endif
66786 
66787  /* "mbd/CouplingFSI.pyx":2962
66788  * """
66789  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66790  * self.thisptr.attachBackNodeToBody(body.thisptr.body) # <<<<<<<<<<<<<<
66791  *
66792  * def attachFrontNodeToBody(self, ProtChBody body):
66793  */
66794  __pyx_v_self->thisptr->attachBackNodeToBody(__pyx_v_body->thisptr->body);
66795 
66796  /* "mbd/CouplingFSI.pyx":2953
66797  * deref(self.thisptr.nodes.back()).SetFixed(fixed)
66798  *
66799  * def attachBackNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
66800  * """Attaches back node to a body with ChLinkLockLock
66801  *
66802  */
66803 
66804  /* function exit code */
66805  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66806  goto __pyx_L0;
66807  __pyx_L1_error:;
66808  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.attachBackNodeToBody", __pyx_clineno, __pyx_lineno, __pyx_filename);
66809  __pyx_r = NULL;
66810  __pyx_L0:;
66811  __Pyx_XGIVEREF(__pyx_r);
66812  __Pyx_TraceReturn(__pyx_r, 0);
66813  __Pyx_RefNannyFinishContext();
66814  return __pyx_r;
66815 }
66816 
66817 /* "mbd/CouplingFSI.pyx":2964
66818  * self.thisptr.attachBackNodeToBody(body.thisptr.body)
66819  *
66820  * def attachFrontNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
66821  * """Attaches front node to a body with ChLinkLockLock
66822  *
66823  */
66824 
66825 /* Python wrapper */
66826 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_39attachFrontNodeToBody(PyObject *__pyx_v_self, PyObject *__pyx_v_body); /*proto*/
66827 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_38attachFrontNodeToBody[] = "ProtChMoorings.attachFrontNodeToBody(self, ProtChBody body)\nAttaches front node to a body with ChLinkLockLock\n\n Parameters\n ----------\n body: ProtChBody\n body to which the node will be attached\n ";
66828 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_39attachFrontNodeToBody = {"attachFrontNodeToBody", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_39attachFrontNodeToBody, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_38attachFrontNodeToBody};
66829 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_39attachFrontNodeToBody(PyObject *__pyx_v_self, PyObject *__pyx_v_body) {
66830  int __pyx_lineno = 0;
66831  const char *__pyx_filename = NULL;
66832  int __pyx_clineno = 0;
66833  PyObject *__pyx_r = 0;
66834  __Pyx_RefNannyDeclarations
66835  __Pyx_RefNannySetupContext("attachFrontNodeToBody (wrapper)", 0);
66836  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_body), __pyx_ptype_3mbd_11CouplingFSI_ProtChBody, 1, "body", 0))) __PYX_ERR(0, 2964, __pyx_L1_error)
66837  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_38attachFrontNodeToBody(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_v_body));
66838 
66839  /* function exit code */
66840  goto __pyx_L0;
66841  __pyx_L1_error:;
66842  __pyx_r = NULL;
66843  __pyx_L0:;
66844  __Pyx_RefNannyFinishContext();
66845  return __pyx_r;
66846 }
66847 
66848 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_38attachFrontNodeToBody(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *__pyx_v_body) {
66849  PyObject *__pyx_r = NULL;
66850  __Pyx_TraceDeclarations
66851  __Pyx_RefNannyDeclarations
66852  int __pyx_lineno = 0;
66853  const char *__pyx_filename = NULL;
66854  int __pyx_clineno = 0;
66855  __Pyx_TraceFrameInit(__pyx_codeobj__172)
66856  __Pyx_RefNannySetupContext("attachFrontNodeToBody", 0);
66857  __Pyx_TraceCall("attachFrontNodeToBody", __pyx_f[0], 2964, 0, __PYX_ERR(0, 2964, __pyx_L1_error));
66858 
66859  /* "mbd/CouplingFSI.pyx":2972
66860  * body to which the node will be attached
66861  * """
66862  * assert self.nodes_built is True, 'call buildNodes() before calling this function' # <<<<<<<<<<<<<<
66863  * self.thisptr.attachFrontNodeToBody(body.thisptr.body)
66864  *
66865  */
66866  #ifndef CYTHON_WITHOUT_ASSERTIONS
66867  if (unlikely(!Py_OptimizeFlag)) {
66868  if (unlikely(!((__pyx_v_self->nodes_built == 1) != 0))) {
66869  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_call_buildNodes_before_calling_t);
66870  __PYX_ERR(0, 2972, __pyx_L1_error)
66871  }
66872  }
66873  #endif
66874 
66875  /* "mbd/CouplingFSI.pyx":2973
66876  * """
66877  * assert self.nodes_built is True, 'call buildNodes() before calling this function'
66878  * self.thisptr.attachFrontNodeToBody(body.thisptr.body) # <<<<<<<<<<<<<<
66879  *
66880  * def getTensionElement(self, int i=0, eta=0.):
66881  */
66882  __pyx_v_self->thisptr->attachFrontNodeToBody(__pyx_v_body->thisptr->body);
66883 
66884  /* "mbd/CouplingFSI.pyx":2964
66885  * self.thisptr.attachBackNodeToBody(body.thisptr.body)
66886  *
66887  * def attachFrontNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
66888  * """Attaches front node to a body with ChLinkLockLock
66889  *
66890  */
66891 
66892  /* function exit code */
66893  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
66894  goto __pyx_L0;
66895  __pyx_L1_error:;
66896  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.attachFrontNodeToBody", __pyx_clineno, __pyx_lineno, __pyx_filename);
66897  __pyx_r = NULL;
66898  __pyx_L0:;
66899  __Pyx_XGIVEREF(__pyx_r);
66900  __Pyx_TraceReturn(__pyx_r, 0);
66901  __Pyx_RefNannyFinishContext();
66902  return __pyx_r;
66903 }
66904 
66905 /* "mbd/CouplingFSI.pyx":2975
66906  * self.thisptr.attachFrontNodeToBody(body.thisptr.body)
66907  *
66908  * def getTensionElement(self, int i=0, eta=0.): # <<<<<<<<<<<<<<
66909  * cdef ch.ChVector[double] F
66910  * F = self.thisptr.getTensionElement(i, eta)
66911  */
66912 
66913 /* Python wrapper */
66914 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_41getTensionElement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
66915 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_40getTensionElement[] = "ProtChMoorings.getTensionElement(self, int i=0, eta=0.)";
66916 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_41getTensionElement = {"getTensionElement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_41getTensionElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_40getTensionElement};
66917 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_41getTensionElement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
66918  int __pyx_v_i;
66919  PyObject *__pyx_v_eta = 0;
66920  int __pyx_lineno = 0;
66921  const char *__pyx_filename = NULL;
66922  int __pyx_clineno = 0;
66923  PyObject *__pyx_r = 0;
66924  __Pyx_RefNannyDeclarations
66925  __Pyx_RefNannySetupContext("getTensionElement (wrapper)", 0);
66926  {
66927  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_eta,0};
66928  PyObject* values[2] = {0,0};
66929  values[1] = ((PyObject *)__pyx_float_0_);
66930  if (unlikely(__pyx_kwds)) {
66931  Py_ssize_t kw_args;
66932  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
66933  switch (pos_args) {
66934  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
66935  CYTHON_FALLTHROUGH;
66936  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
66937  CYTHON_FALLTHROUGH;
66938  case 0: break;
66939  default: goto __pyx_L5_argtuple_error;
66940  }
66941  kw_args = PyDict_Size(__pyx_kwds);
66942  switch (pos_args) {
66943  case 0:
66944  if (kw_args > 0) {
66945  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_i);
66946  if (value) { values[0] = value; kw_args--; }
66947  }
66948  CYTHON_FALLTHROUGH;
66949  case 1:
66950  if (kw_args > 0) {
66951  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eta);
66952  if (value) { values[1] = value; kw_args--; }
66953  }
66954  }
66955  if (unlikely(kw_args > 0)) {
66956  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTensionElement") < 0)) __PYX_ERR(0, 2975, __pyx_L3_error)
66957  }
66958  } else {
66959  switch (PyTuple_GET_SIZE(__pyx_args)) {
66960  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
66961  CYTHON_FALLTHROUGH;
66962  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
66963  CYTHON_FALLTHROUGH;
66964  case 0: break;
66965  default: goto __pyx_L5_argtuple_error;
66966  }
66967  }
66968  if (values[0]) {
66969  __pyx_v_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2975, __pyx_L3_error)
66970  } else {
66971  __pyx_v_i = ((int)0);
66972  }
66973  __pyx_v_eta = values[1];
66974  }
66975  goto __pyx_L4_argument_unpacking_done;
66976  __pyx_L5_argtuple_error:;
66977  __Pyx_RaiseArgtupleInvalid("getTensionElement", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2975, __pyx_L3_error)
66978  __pyx_L3_error:;
66979  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getTensionElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
66980  __Pyx_RefNannyFinishContext();
66981  return NULL;
66982  __pyx_L4_argument_unpacking_done:;
66983  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_40getTensionElement(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_i, __pyx_v_eta);
66984 
66985  /* function exit code */
66986  __Pyx_RefNannyFinishContext();
66987  return __pyx_r;
66988 }
66989 
66990 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_40getTensionElement(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, int __pyx_v_i, PyObject *__pyx_v_eta) {
66991  ChVector<double> __pyx_v_F;
66992  PyObject *__pyx_r = NULL;
66993  __Pyx_TraceDeclarations
66994  __Pyx_RefNannyDeclarations
66995  double __pyx_t_1;
66996  PyObject *__pyx_t_2 = NULL;
66997  PyObject *__pyx_t_3 = NULL;
66998  PyObject *__pyx_t_4 = NULL;
66999  PyObject *__pyx_t_5 = NULL;
67000  PyObject *__pyx_t_6 = NULL;
67001  PyObject *__pyx_t_7 = NULL;
67002  int __pyx_lineno = 0;
67003  const char *__pyx_filename = NULL;
67004  int __pyx_clineno = 0;
67005  __Pyx_TraceFrameInit(__pyx_codeobj__173)
67006  __Pyx_RefNannySetupContext("getTensionElement", 0);
67007  __Pyx_TraceCall("getTensionElement", __pyx_f[0], 2975, 0, __PYX_ERR(0, 2975, __pyx_L1_error));
67008 
67009  /* "mbd/CouplingFSI.pyx":2977
67010  * def getTensionElement(self, int i=0, eta=0.):
67011  * cdef ch.ChVector[double] F
67012  * F = self.thisptr.getTensionElement(i, eta) # <<<<<<<<<<<<<<
67013  * return np.array([F.x(), F.y(), F.z()])
67014  *
67015  */
67016  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_eta); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2977, __pyx_L1_error)
67017  __pyx_v_F = ((ChVector<double> )__pyx_v_self->thisptr->getTensionElement(__pyx_v_i, __pyx_t_1));
67018 
67019  /* "mbd/CouplingFSI.pyx":2978
67020  * cdef ch.ChVector[double] F
67021  * F = self.thisptr.getTensionElement(i, eta)
67022  * return np.array([F.x(), F.y(), F.z()]) # <<<<<<<<<<<<<<
67023  *
67024  * def getNodesTension(self, eta=0.):
67025  */
67026  __Pyx_XDECREF(__pyx_r);
67027  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2978, __pyx_L1_error)
67028  __Pyx_GOTREF(__pyx_t_3);
67029  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_array); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2978, __pyx_L1_error)
67030  __Pyx_GOTREF(__pyx_t_4);
67031  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
67032  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_F.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2978, __pyx_L1_error)
67033  __Pyx_GOTREF(__pyx_t_3);
67034  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_F.y()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2978, __pyx_L1_error)
67035  __Pyx_GOTREF(__pyx_t_5);
67036  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_F.z()); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2978, __pyx_L1_error)
67037  __Pyx_GOTREF(__pyx_t_6);
67038  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2978, __pyx_L1_error)
67039  __Pyx_GOTREF(__pyx_t_7);
67040  __Pyx_GIVEREF(__pyx_t_3);
67041  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
67042  __Pyx_GIVEREF(__pyx_t_5);
67043  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
67044  __Pyx_GIVEREF(__pyx_t_6);
67045  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
67046  __pyx_t_3 = 0;
67047  __pyx_t_5 = 0;
67048  __pyx_t_6 = 0;
67049  __pyx_t_6 = NULL;
67050  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
67051  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
67052  if (likely(__pyx_t_6)) {
67053  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
67054  __Pyx_INCREF(__pyx_t_6);
67055  __Pyx_INCREF(function);
67056  __Pyx_DECREF_SET(__pyx_t_4, function);
67057  }
67058  }
67059  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7);
67060  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
67061  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
67062  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2978, __pyx_L1_error)
67063  __Pyx_GOTREF(__pyx_t_2);
67064  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
67065  __pyx_r = __pyx_t_2;
67066  __pyx_t_2 = 0;
67067  goto __pyx_L0;
67068 
67069  /* "mbd/CouplingFSI.pyx":2975
67070  * self.thisptr.attachFrontNodeToBody(body.thisptr.body)
67071  *
67072  * def getTensionElement(self, int i=0, eta=0.): # <<<<<<<<<<<<<<
67073  * cdef ch.ChVector[double] F
67074  * F = self.thisptr.getTensionElement(i, eta)
67075  */
67076 
67077  /* function exit code */
67078  __pyx_L1_error:;
67079  __Pyx_XDECREF(__pyx_t_2);
67080  __Pyx_XDECREF(__pyx_t_3);
67081  __Pyx_XDECREF(__pyx_t_4);
67082  __Pyx_XDECREF(__pyx_t_5);
67083  __Pyx_XDECREF(__pyx_t_6);
67084  __Pyx_XDECREF(__pyx_t_7);
67085  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getTensionElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
67086  __pyx_r = NULL;
67087  __pyx_L0:;
67088  __Pyx_XGIVEREF(__pyx_r);
67089  __Pyx_TraceReturn(__pyx_r, 0);
67090  __Pyx_RefNannyFinishContext();
67091  return __pyx_r;
67092 }
67093 
67094 /* "mbd/CouplingFSI.pyx":2980
67095  * return np.array([F.x(), F.y(), F.z()])
67096  *
67097  * def getNodesTension(self, eta=0.): # <<<<<<<<<<<<<<
67098  * cdef ch.ChVector[double] vec
67099  * if self.beam_type == 'BeamEuler':
67100  */
67101 
67102 /* Python wrapper */
67103 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_43getNodesTension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
67104 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_42getNodesTension[] = "ProtChMoorings.getNodesTension(self, eta=0.)";
67105 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_43getNodesTension = {"getNodesTension", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_43getNodesTension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_42getNodesTension};
67106 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_43getNodesTension(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
67107  PyObject *__pyx_v_eta = 0;
67108  int __pyx_lineno = 0;
67109  const char *__pyx_filename = NULL;
67110  int __pyx_clineno = 0;
67111  PyObject *__pyx_r = 0;
67112  __Pyx_RefNannyDeclarations
67113  __Pyx_RefNannySetupContext("getNodesTension (wrapper)", 0);
67114  {
67115  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eta,0};
67116  PyObject* values[1] = {0};
67117  values[0] = ((PyObject *)__pyx_float_0_);
67118  if (unlikely(__pyx_kwds)) {
67119  Py_ssize_t kw_args;
67120  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
67121  switch (pos_args) {
67122  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67123  CYTHON_FALLTHROUGH;
67124  case 0: break;
67125  default: goto __pyx_L5_argtuple_error;
67126  }
67127  kw_args = PyDict_Size(__pyx_kwds);
67128  switch (pos_args) {
67129  case 0:
67130  if (kw_args > 0) {
67131  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eta);
67132  if (value) { values[0] = value; kw_args--; }
67133  }
67134  }
67135  if (unlikely(kw_args > 0)) {
67136  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getNodesTension") < 0)) __PYX_ERR(0, 2980, __pyx_L3_error)
67137  }
67138  } else {
67139  switch (PyTuple_GET_SIZE(__pyx_args)) {
67140  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67141  CYTHON_FALLTHROUGH;
67142  case 0: break;
67143  default: goto __pyx_L5_argtuple_error;
67144  }
67145  }
67146  __pyx_v_eta = values[0];
67147  }
67148  goto __pyx_L4_argument_unpacking_done;
67149  __pyx_L5_argtuple_error:;
67150  __Pyx_RaiseArgtupleInvalid("getNodesTension", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2980, __pyx_L3_error)
67151  __pyx_L3_error:;
67152  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getNodesTension", __pyx_clineno, __pyx_lineno, __pyx_filename);
67153  __Pyx_RefNannyFinishContext();
67154  return NULL;
67155  __pyx_L4_argument_unpacking_done:;
67156  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_42getNodesTension(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_eta);
67157 
67158  /* function exit code */
67159  __Pyx_RefNannyFinishContext();
67160  return __pyx_r;
67161 }
67162 
67163 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_42getNodesTension(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_eta) {
67164  ChVector<double> __pyx_v_vec;
67165  PyObject *__pyx_v_T = NULL;
67166  PyObject *__pyx_v_i = NULL;
67167  PyObject *__pyx_r = NULL;
67168  __Pyx_TraceDeclarations
67169  __Pyx_RefNannyDeclarations
67170  int __pyx_t_1;
67171  PyObject *__pyx_t_2 = NULL;
67172  PyObject *__pyx_t_3 = NULL;
67173  PyObject *__pyx_t_4 = NULL;
67174  PyObject *__pyx_t_5 = NULL;
67175  Py_ssize_t __pyx_t_6;
67176  PyObject *(*__pyx_t_7)(PyObject *);
67177  int __pyx_t_8;
67178  double __pyx_t_9;
67179  PyObject *__pyx_t_10 = NULL;
67180  int __pyx_lineno = 0;
67181  const char *__pyx_filename = NULL;
67182  int __pyx_clineno = 0;
67183  __Pyx_TraceFrameInit(__pyx_codeobj__174)
67184  __Pyx_RefNannySetupContext("getNodesTension", 0);
67185  __Pyx_TraceCall("getNodesTension", __pyx_f[0], 2980, 0, __PYX_ERR(0, 2980, __pyx_L1_error));
67186 
67187  /* "mbd/CouplingFSI.pyx":2982
67188  * def getNodesTension(self, eta=0.):
67189  * cdef ch.ChVector[double] vec
67190  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
67191  * T = np.zeros((self.thisptr.nodesRot.size()-1,3 ))
67192  * else:
67193  */
67194  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
67195  if (__pyx_t_1) {
67196 
67197  /* "mbd/CouplingFSI.pyx":2983
67198  * cdef ch.ChVector[double] vec
67199  * if self.beam_type == 'BeamEuler':
67200  * T = np.zeros((self.thisptr.nodesRot.size()-1,3 )) # <<<<<<<<<<<<<<
67201  * else:
67202  * T = np.zeros(( self.thisptr.nodes.size()-1,3 ))
67203  */
67204  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error)
67205  __Pyx_GOTREF(__pyx_t_3);
67206  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2983, __pyx_L1_error)
67207  __Pyx_GOTREF(__pyx_t_4);
67208  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
67209  __pyx_t_3 = __Pyx_PyInt_FromSize_t((__pyx_v_self->thisptr->nodesRot.size() - 1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2983, __pyx_L1_error)
67210  __Pyx_GOTREF(__pyx_t_3);
67211  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2983, __pyx_L1_error)
67212  __Pyx_GOTREF(__pyx_t_5);
67213  __Pyx_GIVEREF(__pyx_t_3);
67214  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
67215  __Pyx_INCREF(__pyx_int_3);
67216  __Pyx_GIVEREF(__pyx_int_3);
67217  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
67218  __pyx_t_3 = 0;
67219  __pyx_t_3 = NULL;
67220  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
67221  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
67222  if (likely(__pyx_t_3)) {
67223  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
67224  __Pyx_INCREF(__pyx_t_3);
67225  __Pyx_INCREF(function);
67226  __Pyx_DECREF_SET(__pyx_t_4, function);
67227  }
67228  }
67229  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
67230  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
67231  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
67232  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2983, __pyx_L1_error)
67233  __Pyx_GOTREF(__pyx_t_2);
67234  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
67235  __pyx_v_T = __pyx_t_2;
67236  __pyx_t_2 = 0;
67237 
67238  /* "mbd/CouplingFSI.pyx":2982
67239  * def getNodesTension(self, eta=0.):
67240  * cdef ch.ChVector[double] vec
67241  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
67242  * T = np.zeros((self.thisptr.nodesRot.size()-1,3 ))
67243  * else:
67244  */
67245  goto __pyx_L3;
67246  }
67247 
67248  /* "mbd/CouplingFSI.pyx":2985
67249  * T = np.zeros((self.thisptr.nodesRot.size()-1,3 ))
67250  * else:
67251  * T = np.zeros(( self.thisptr.nodes.size()-1,3 )) # <<<<<<<<<<<<<<
67252  * for i in range(np.sum(self.nb_elems)):
67253  * vec = self.thisptr.getTensionElement(i, eta)
67254  */
67255  /*else*/ {
67256  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1_error)
67257  __Pyx_GOTREF(__pyx_t_4);
67258  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2985, __pyx_L1_error)
67259  __Pyx_GOTREF(__pyx_t_5);
67260  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
67261  __pyx_t_4 = __Pyx_PyInt_FromSize_t((__pyx_v_self->thisptr->nodes.size() - 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2985, __pyx_L1_error)
67262  __Pyx_GOTREF(__pyx_t_4);
67263  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2985, __pyx_L1_error)
67264  __Pyx_GOTREF(__pyx_t_3);
67265  __Pyx_GIVEREF(__pyx_t_4);
67266  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
67267  __Pyx_INCREF(__pyx_int_3);
67268  __Pyx_GIVEREF(__pyx_int_3);
67269  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_3);
67270  __pyx_t_4 = 0;
67271  __pyx_t_4 = NULL;
67272  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
67273  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
67274  if (likely(__pyx_t_4)) {
67275  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
67276  __Pyx_INCREF(__pyx_t_4);
67277  __Pyx_INCREF(function);
67278  __Pyx_DECREF_SET(__pyx_t_5, function);
67279  }
67280  }
67281  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3);
67282  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
67283  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
67284  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2985, __pyx_L1_error)
67285  __Pyx_GOTREF(__pyx_t_2);
67286  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
67287  __pyx_v_T = __pyx_t_2;
67288  __pyx_t_2 = 0;
67289  }
67290  __pyx_L3:;
67291 
67292  /* "mbd/CouplingFSI.pyx":2986
67293  * else:
67294  * T = np.zeros(( self.thisptr.nodes.size()-1,3 ))
67295  * for i in range(np.sum(self.nb_elems)): # <<<<<<<<<<<<<<
67296  * vec = self.thisptr.getTensionElement(i, eta)
67297  * T[i] = [vec.x(), vec.y(), vec.z()]
67298  */
67299  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2986, __pyx_L1_error)
67300  __Pyx_GOTREF(__pyx_t_5);
67301  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2986, __pyx_L1_error)
67302  __Pyx_GOTREF(__pyx_t_3);
67303  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
67304  __pyx_t_5 = NULL;
67305  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
67306  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
67307  if (likely(__pyx_t_5)) {
67308  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
67309  __Pyx_INCREF(__pyx_t_5);
67310  __Pyx_INCREF(function);
67311  __Pyx_DECREF_SET(__pyx_t_3, function);
67312  }
67313  }
67314  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, ((PyObject *)__pyx_v_self->nb_elems)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->nb_elems));
67315  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
67316  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __pyx_L1_error)
67317  __Pyx_GOTREF(__pyx_t_2);
67318  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
67319  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2986, __pyx_L1_error)
67320  __Pyx_GOTREF(__pyx_t_3);
67321  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67322  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
67323  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
67324  __pyx_t_7 = NULL;
67325  } else {
67326  __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __pyx_L1_error)
67327  __Pyx_GOTREF(__pyx_t_2);
67328  __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2986, __pyx_L1_error)
67329  }
67330  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
67331  for (;;) {
67332  if (likely(!__pyx_t_7)) {
67333  if (likely(PyList_CheckExact(__pyx_t_2))) {
67334  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
67335  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67336  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2986, __pyx_L1_error)
67337  #else
67338  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2986, __pyx_L1_error)
67339  __Pyx_GOTREF(__pyx_t_3);
67340  #endif
67341  } else {
67342  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
67343  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67344  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2986, __pyx_L1_error)
67345  #else
67346  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2986, __pyx_L1_error)
67347  __Pyx_GOTREF(__pyx_t_3);
67348  #endif
67349  }
67350  } else {
67351  __pyx_t_3 = __pyx_t_7(__pyx_t_2);
67352  if (unlikely(!__pyx_t_3)) {
67353  PyObject* exc_type = PyErr_Occurred();
67354  if (exc_type) {
67355  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
67356  else __PYX_ERR(0, 2986, __pyx_L1_error)
67357  }
67358  break;
67359  }
67360  __Pyx_GOTREF(__pyx_t_3);
67361  }
67362  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
67363  __pyx_t_3 = 0;
67364 
67365  /* "mbd/CouplingFSI.pyx":2987
67366  * T = np.zeros(( self.thisptr.nodes.size()-1,3 ))
67367  * for i in range(np.sum(self.nb_elems)):
67368  * vec = self.thisptr.getTensionElement(i, eta) # <<<<<<<<<<<<<<
67369  * T[i] = [vec.x(), vec.y(), vec.z()]
67370  * return T
67371  */
67372  __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_i); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2987, __pyx_L1_error)
67373  __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_v_eta); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2987, __pyx_L1_error)
67374  __pyx_v_vec = ((ChVector<double> )__pyx_v_self->thisptr->getTensionElement(__pyx_t_8, __pyx_t_9));
67375 
67376  /* "mbd/CouplingFSI.pyx":2988
67377  * for i in range(np.sum(self.nb_elems)):
67378  * vec = self.thisptr.getTensionElement(i, eta)
67379  * T[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
67380  * return T
67381  *
67382  */
67383  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2988, __pyx_L1_error)
67384  __Pyx_GOTREF(__pyx_t_3);
67385  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2988, __pyx_L1_error)
67386  __Pyx_GOTREF(__pyx_t_5);
67387  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2988, __pyx_L1_error)
67388  __Pyx_GOTREF(__pyx_t_4);
67389  __pyx_t_10 = PyList_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2988, __pyx_L1_error)
67390  __Pyx_GOTREF(__pyx_t_10);
67391  __Pyx_GIVEREF(__pyx_t_3);
67392  PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_3);
67393  __Pyx_GIVEREF(__pyx_t_5);
67394  PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_5);
67395  __Pyx_GIVEREF(__pyx_t_4);
67396  PyList_SET_ITEM(__pyx_t_10, 2, __pyx_t_4);
67397  __pyx_t_3 = 0;
67398  __pyx_t_5 = 0;
67399  __pyx_t_4 = 0;
67400  if (unlikely(PyObject_SetItem(__pyx_v_T, __pyx_v_i, __pyx_t_10) < 0)) __PYX_ERR(0, 2988, __pyx_L1_error)
67401  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
67402 
67403  /* "mbd/CouplingFSI.pyx":2986
67404  * else:
67405  * T = np.zeros(( self.thisptr.nodes.size()-1,3 ))
67406  * for i in range(np.sum(self.nb_elems)): # <<<<<<<<<<<<<<
67407  * vec = self.thisptr.getTensionElement(i, eta)
67408  * T[i] = [vec.x(), vec.y(), vec.z()]
67409  */
67410  }
67411  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67412 
67413  /* "mbd/CouplingFSI.pyx":2989
67414  * vec = self.thisptr.getTensionElement(i, eta)
67415  * T[i] = [vec.x(), vec.y(), vec.z()]
67416  * return T # <<<<<<<<<<<<<<
67417  *
67418  * def setDragCoefficients(self, double tangential, double normal, int segment_nb):
67419  */
67420  __Pyx_XDECREF(__pyx_r);
67421  __Pyx_INCREF(__pyx_v_T);
67422  __pyx_r = __pyx_v_T;
67423  goto __pyx_L0;
67424 
67425  /* "mbd/CouplingFSI.pyx":2980
67426  * return np.array([F.x(), F.y(), F.z()])
67427  *
67428  * def getNodesTension(self, eta=0.): # <<<<<<<<<<<<<<
67429  * cdef ch.ChVector[double] vec
67430  * if self.beam_type == 'BeamEuler':
67431  */
67432 
67433  /* function exit code */
67434  __pyx_L1_error:;
67435  __Pyx_XDECREF(__pyx_t_2);
67436  __Pyx_XDECREF(__pyx_t_3);
67437  __Pyx_XDECREF(__pyx_t_4);
67438  __Pyx_XDECREF(__pyx_t_5);
67439  __Pyx_XDECREF(__pyx_t_10);
67440  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getNodesTension", __pyx_clineno, __pyx_lineno, __pyx_filename);
67441  __pyx_r = NULL;
67442  __pyx_L0:;
67443  __Pyx_XDECREF(__pyx_v_T);
67444  __Pyx_XDECREF(__pyx_v_i);
67445  __Pyx_XGIVEREF(__pyx_r);
67446  __Pyx_TraceReturn(__pyx_r, 0);
67447  __Pyx_RefNannyFinishContext();
67448  return __pyx_r;
67449 }
67450 
67451 /* "mbd/CouplingFSI.pyx":2991
67452  * return T
67453  *
67454  * def setDragCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
67455  * """Sets drag coefficients of cable
67456  *
67457  */
67458 
67459 /* Python wrapper */
67460 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_45setDragCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
67461 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_44setDragCoefficients[] = "ProtChMoorings.setDragCoefficients(self, double tangential, double normal, int segment_nb)\nSets drag coefficients of cable\n\n Parameters\n ----------\n tangential: double\n Tangential drag coefficient.\n normal: double\n Normal drag coefficient.\n segment_nb: int\n Segment number to which these coefficients apply.\n ";
67462 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_45setDragCoefficients = {"setDragCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_45setDragCoefficients, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_44setDragCoefficients};
67463 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_45setDragCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
67464  double __pyx_v_tangential;
67465  double __pyx_v_normal;
67466  int __pyx_v_segment_nb;
67467  int __pyx_lineno = 0;
67468  const char *__pyx_filename = NULL;
67469  int __pyx_clineno = 0;
67470  PyObject *__pyx_r = 0;
67471  __Pyx_RefNannyDeclarations
67472  __Pyx_RefNannySetupContext("setDragCoefficients (wrapper)", 0);
67473  {
67474  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tangential,&__pyx_n_s_normal,&__pyx_n_s_segment_nb,0};
67475  PyObject* values[3] = {0,0,0};
67476  if (unlikely(__pyx_kwds)) {
67477  Py_ssize_t kw_args;
67478  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
67479  switch (pos_args) {
67480  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
67481  CYTHON_FALLTHROUGH;
67482  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67483  CYTHON_FALLTHROUGH;
67484  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67485  CYTHON_FALLTHROUGH;
67486  case 0: break;
67487  default: goto __pyx_L5_argtuple_error;
67488  }
67489  kw_args = PyDict_Size(__pyx_kwds);
67490  switch (pos_args) {
67491  case 0:
67492  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tangential)) != 0)) kw_args--;
67493  else goto __pyx_L5_argtuple_error;
67494  CYTHON_FALLTHROUGH;
67495  case 1:
67496  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal)) != 0)) kw_args--;
67497  else {
67498  __Pyx_RaiseArgtupleInvalid("setDragCoefficients", 1, 3, 3, 1); __PYX_ERR(0, 2991, __pyx_L3_error)
67499  }
67500  CYTHON_FALLTHROUGH;
67501  case 2:
67502  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segment_nb)) != 0)) kw_args--;
67503  else {
67504  __Pyx_RaiseArgtupleInvalid("setDragCoefficients", 1, 3, 3, 2); __PYX_ERR(0, 2991, __pyx_L3_error)
67505  }
67506  }
67507  if (unlikely(kw_args > 0)) {
67508  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setDragCoefficients") < 0)) __PYX_ERR(0, 2991, __pyx_L3_error)
67509  }
67510  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
67511  goto __pyx_L5_argtuple_error;
67512  } else {
67513  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67514  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67515  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
67516  }
67517  __pyx_v_tangential = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_tangential == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2991, __pyx_L3_error)
67518  __pyx_v_normal = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_normal == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2991, __pyx_L3_error)
67519  __pyx_v_segment_nb = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_segment_nb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2991, __pyx_L3_error)
67520  }
67521  goto __pyx_L4_argument_unpacking_done;
67522  __pyx_L5_argtuple_error:;
67523  __Pyx_RaiseArgtupleInvalid("setDragCoefficients", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2991, __pyx_L3_error)
67524  __pyx_L3_error:;
67525  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setDragCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
67526  __Pyx_RefNannyFinishContext();
67527  return NULL;
67528  __pyx_L4_argument_unpacking_done:;
67529  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_44setDragCoefficients(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_tangential, __pyx_v_normal, __pyx_v_segment_nb);
67530 
67531  /* function exit code */
67532  __Pyx_RefNannyFinishContext();
67533  return __pyx_r;
67534 }
67535 
67536 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_44setDragCoefficients(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, double __pyx_v_tangential, double __pyx_v_normal, int __pyx_v_segment_nb) {
67537  PyObject *__pyx_r = NULL;
67538  __Pyx_TraceDeclarations
67539  __Pyx_RefNannyDeclarations
67540  int __pyx_lineno = 0;
67541  const char *__pyx_filename = NULL;
67542  int __pyx_clineno = 0;
67543  __Pyx_TraceFrameInit(__pyx_codeobj__175)
67544  __Pyx_RefNannySetupContext("setDragCoefficients", 0);
67545  __Pyx_TraceCall("setDragCoefficients", __pyx_f[0], 2991, 0, __PYX_ERR(0, 2991, __pyx_L1_error));
67546 
67547  /* "mbd/CouplingFSI.pyx":3003
67548  * Segment number to which these coefficients apply.
67549  * """
67550  * deref(self.thisptr.cables[segment_nb]).setDragCoefficients(tangential, normal) # <<<<<<<<<<<<<<
67551  *
67552  * def setAddedMassCoefficients(self, double tangential, double normal, int segment_nb):
67553  */
67554  (*(__pyx_v_self->thisptr->cables[__pyx_v_segment_nb])).setDragCoefficients(__pyx_v_tangential, __pyx_v_normal);
67555 
67556  /* "mbd/CouplingFSI.pyx":2991
67557  * return T
67558  *
67559  * def setDragCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
67560  * """Sets drag coefficients of cable
67561  *
67562  */
67563 
67564  /* function exit code */
67565  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
67566  goto __pyx_L0;
67567  __pyx_L1_error:;
67568  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setDragCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
67569  __pyx_r = NULL;
67570  __pyx_L0:;
67571  __Pyx_XGIVEREF(__pyx_r);
67572  __Pyx_TraceReturn(__pyx_r, 0);
67573  __Pyx_RefNannyFinishContext();
67574  return __pyx_r;
67575 }
67576 
67577 /* "mbd/CouplingFSI.pyx":3005
67578  * deref(self.thisptr.cables[segment_nb]).setDragCoefficients(tangential, normal)
67579  *
67580  * def setAddedMassCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
67581  * """Sets added mass coefficients of cable
67582  *
67583  */
67584 
67585 /* Python wrapper */
67586 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_47setAddedMassCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
67587 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_46setAddedMassCoefficients[] = "ProtChMoorings.setAddedMassCoefficients(self, double tangential, double normal, int segment_nb)\nSets added mass coefficients of cable\n\n Parameters\n ----------\n tangential: double\n Tangential added mass coefficient.\n normal: double\n Normal added mass coefficient.\n segment_nb: int\n Segment number to which these coefficients apply.\n ";
67588 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_47setAddedMassCoefficients = {"setAddedMassCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_47setAddedMassCoefficients, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_46setAddedMassCoefficients};
67589 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_47setAddedMassCoefficients(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
67590  double __pyx_v_tangential;
67591  double __pyx_v_normal;
67592  int __pyx_v_segment_nb;
67593  int __pyx_lineno = 0;
67594  const char *__pyx_filename = NULL;
67595  int __pyx_clineno = 0;
67596  PyObject *__pyx_r = 0;
67597  __Pyx_RefNannyDeclarations
67598  __Pyx_RefNannySetupContext("setAddedMassCoefficients (wrapper)", 0);
67599  {
67600  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tangential,&__pyx_n_s_normal,&__pyx_n_s_segment_nb,0};
67601  PyObject* values[3] = {0,0,0};
67602  if (unlikely(__pyx_kwds)) {
67603  Py_ssize_t kw_args;
67604  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
67605  switch (pos_args) {
67606  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
67607  CYTHON_FALLTHROUGH;
67608  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67609  CYTHON_FALLTHROUGH;
67610  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67611  CYTHON_FALLTHROUGH;
67612  case 0: break;
67613  default: goto __pyx_L5_argtuple_error;
67614  }
67615  kw_args = PyDict_Size(__pyx_kwds);
67616  switch (pos_args) {
67617  case 0:
67618  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tangential)) != 0)) kw_args--;
67619  else goto __pyx_L5_argtuple_error;
67620  CYTHON_FALLTHROUGH;
67621  case 1:
67622  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_normal)) != 0)) kw_args--;
67623  else {
67624  __Pyx_RaiseArgtupleInvalid("setAddedMassCoefficients", 1, 3, 3, 1); __PYX_ERR(0, 3005, __pyx_L3_error)
67625  }
67626  CYTHON_FALLTHROUGH;
67627  case 2:
67628  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segment_nb)) != 0)) kw_args--;
67629  else {
67630  __Pyx_RaiseArgtupleInvalid("setAddedMassCoefficients", 1, 3, 3, 2); __PYX_ERR(0, 3005, __pyx_L3_error)
67631  }
67632  }
67633  if (unlikely(kw_args > 0)) {
67634  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setAddedMassCoefficients") < 0)) __PYX_ERR(0, 3005, __pyx_L3_error)
67635  }
67636  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
67637  goto __pyx_L5_argtuple_error;
67638  } else {
67639  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67640  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67641  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
67642  }
67643  __pyx_v_tangential = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_tangential == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3005, __pyx_L3_error)
67644  __pyx_v_normal = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_normal == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3005, __pyx_L3_error)
67645  __pyx_v_segment_nb = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_segment_nb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3005, __pyx_L3_error)
67646  }
67647  goto __pyx_L4_argument_unpacking_done;
67648  __pyx_L5_argtuple_error:;
67649  __Pyx_RaiseArgtupleInvalid("setAddedMassCoefficients", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3005, __pyx_L3_error)
67650  __pyx_L3_error:;
67651  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setAddedMassCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
67652  __Pyx_RefNannyFinishContext();
67653  return NULL;
67654  __pyx_L4_argument_unpacking_done:;
67655  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_46setAddedMassCoefficients(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_tangential, __pyx_v_normal, __pyx_v_segment_nb);
67656 
67657  /* function exit code */
67658  __Pyx_RefNannyFinishContext();
67659  return __pyx_r;
67660 }
67661 
67662 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_46setAddedMassCoefficients(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, double __pyx_v_tangential, double __pyx_v_normal, int __pyx_v_segment_nb) {
67663  PyObject *__pyx_r = NULL;
67664  __Pyx_TraceDeclarations
67665  __Pyx_RefNannyDeclarations
67666  int __pyx_lineno = 0;
67667  const char *__pyx_filename = NULL;
67668  int __pyx_clineno = 0;
67669  __Pyx_TraceFrameInit(__pyx_codeobj__176)
67670  __Pyx_RefNannySetupContext("setAddedMassCoefficients", 0);
67671  __Pyx_TraceCall("setAddedMassCoefficients", __pyx_f[0], 3005, 0, __PYX_ERR(0, 3005, __pyx_L1_error));
67672 
67673  /* "mbd/CouplingFSI.pyx":3017
67674  * Segment number to which these coefficients apply.
67675  * """
67676  * deref(self.thisptr.cables[segment_nb]).setAddedMassCoefficients(tangential, normal) # <<<<<<<<<<<<<<
67677  *
67678  * def setRestLengthPerElement(self, double[:] length_array, int segment_nb):
67679  */
67680  (*(__pyx_v_self->thisptr->cables[__pyx_v_segment_nb])).setAddedMassCoefficients(__pyx_v_tangential, __pyx_v_normal);
67681 
67682  /* "mbd/CouplingFSI.pyx":3005
67683  * deref(self.thisptr.cables[segment_nb]).setDragCoefficients(tangential, normal)
67684  *
67685  * def setAddedMassCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
67686  * """Sets added mass coefficients of cable
67687  *
67688  */
67689 
67690  /* function exit code */
67691  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
67692  goto __pyx_L0;
67693  __pyx_L1_error:;
67694  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setAddedMassCoefficients", __pyx_clineno, __pyx_lineno, __pyx_filename);
67695  __pyx_r = NULL;
67696  __pyx_L0:;
67697  __Pyx_XGIVEREF(__pyx_r);
67698  __Pyx_TraceReturn(__pyx_r, 0);
67699  __Pyx_RefNannyFinishContext();
67700  return __pyx_r;
67701 }
67702 
67703 /* "mbd/CouplingFSI.pyx":3019
67704  * deref(self.thisptr.cables[segment_nb]).setAddedMassCoefficients(tangential, normal)
67705  *
67706  * def setRestLengthPerElement(self, double[:] length_array, int segment_nb): # <<<<<<<<<<<<<<
67707  * """Sets rest length per element of cable
67708  *
67709  */
67710 
67711 /* Python wrapper */
67712 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_49setRestLengthPerElement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
67713 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_48setRestLengthPerElement[] = "ProtChMoorings.setRestLengthPerElement(self, double[:] length_array, int segment_nb)\nSets rest length per element of cable\n\n Parameters\n ----------\n length_array: array_like[double]\n Rest length of each element of cable.\n segment_nb: int\n Segment number to which these rest lengths apply.\n ";
67714 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_49setRestLengthPerElement = {"setRestLengthPerElement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_49setRestLengthPerElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_48setRestLengthPerElement};
67715 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_49setRestLengthPerElement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
67716  __Pyx_memviewslice __pyx_v_length_array = { 0, 0, { 0 }, { 0 }, { 0 } };
67717  int __pyx_v_segment_nb;
67718  int __pyx_lineno = 0;
67719  const char *__pyx_filename = NULL;
67720  int __pyx_clineno = 0;
67721  PyObject *__pyx_r = 0;
67722  __Pyx_RefNannyDeclarations
67723  __Pyx_RefNannySetupContext("setRestLengthPerElement (wrapper)", 0);
67724  {
67725  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_length_array,&__pyx_n_s_segment_nb,0};
67726  PyObject* values[2] = {0,0};
67727  if (unlikely(__pyx_kwds)) {
67728  Py_ssize_t kw_args;
67729  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
67730  switch (pos_args) {
67731  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67732  CYTHON_FALLTHROUGH;
67733  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67734  CYTHON_FALLTHROUGH;
67735  case 0: break;
67736  default: goto __pyx_L5_argtuple_error;
67737  }
67738  kw_args = PyDict_Size(__pyx_kwds);
67739  switch (pos_args) {
67740  case 0:
67741  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_length_array)) != 0)) kw_args--;
67742  else goto __pyx_L5_argtuple_error;
67743  CYTHON_FALLTHROUGH;
67744  case 1:
67745  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segment_nb)) != 0)) kw_args--;
67746  else {
67747  __Pyx_RaiseArgtupleInvalid("setRestLengthPerElement", 1, 2, 2, 1); __PYX_ERR(0, 3019, __pyx_L3_error)
67748  }
67749  }
67750  if (unlikely(kw_args > 0)) {
67751  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRestLengthPerElement") < 0)) __PYX_ERR(0, 3019, __pyx_L3_error)
67752  }
67753  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
67754  goto __pyx_L5_argtuple_error;
67755  } else {
67756  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67757  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67758  }
67759  __pyx_v_length_array = __Pyx_PyObject_to_MemoryviewSlice_ds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_length_array.memview)) __PYX_ERR(0, 3019, __pyx_L3_error)
67760  __pyx_v_segment_nb = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_segment_nb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3019, __pyx_L3_error)
67761  }
67762  goto __pyx_L4_argument_unpacking_done;
67763  __pyx_L5_argtuple_error:;
67764  __Pyx_RaiseArgtupleInvalid("setRestLengthPerElement", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3019, __pyx_L3_error)
67765  __pyx_L3_error:;
67766  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setRestLengthPerElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
67767  __Pyx_RefNannyFinishContext();
67768  return NULL;
67769  __pyx_L4_argument_unpacking_done:;
67770  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_48setRestLengthPerElement(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_length_array, __pyx_v_segment_nb);
67771 
67772  /* function exit code */
67773  __Pyx_RefNannyFinishContext();
67774  return __pyx_r;
67775 }
67776 
67777 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_48setRestLengthPerElement(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, __Pyx_memviewslice __pyx_v_length_array, int __pyx_v_segment_nb) {
67778  std::vector<double> __pyx_v_vec;
67779  PyObject *__pyx_v_length = NULL;
67780  PyObject *__pyx_r = NULL;
67781  __Pyx_TraceDeclarations
67782  __Pyx_RefNannyDeclarations
67783  size_t __pyx_t_1;
67784  PyObject *__pyx_t_2 = NULL;
67785  PyObject *__pyx_t_3 = NULL;
67786  Py_ssize_t __pyx_t_4;
67787  PyObject *(*__pyx_t_5)(PyObject *);
67788  double __pyx_t_6;
67789  int __pyx_lineno = 0;
67790  const char *__pyx_filename = NULL;
67791  int __pyx_clineno = 0;
67792  __Pyx_TraceFrameInit(__pyx_codeobj__177)
67793  __Pyx_RefNannySetupContext("setRestLengthPerElement", 0);
67794  __Pyx_TraceCall("setRestLengthPerElement", __pyx_f[0], 3019, 0, __PYX_ERR(0, 3019, __pyx_L1_error));
67795 
67796  /* "mbd/CouplingFSI.pyx":3029
67797  * Segment number to which these rest lengths apply.
67798  * """
67799  * assert len(length_array) == deref(self.thisptr.cables[segment_nb]).nb_elems, 'array of length of elements not matching number of elements' # <<<<<<<<<<<<<<
67800  * cdef vector[double] vec
67801  * for length in length_array:
67802  */
67803  #ifndef CYTHON_WITHOUT_ASSERTIONS
67804  if (unlikely(!Py_OptimizeFlag)) {
67805  __pyx_t_1 = __Pyx_MemoryView_Len(__pyx_v_length_array);
67806  if (unlikely(!((__pyx_t_1 == (*(__pyx_v_self->thisptr->cables[__pyx_v_segment_nb])).nb_elems) != 0))) {
67807  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_array_of_length_of_elements_not);
67808  __PYX_ERR(0, 3029, __pyx_L1_error)
67809  }
67810  }
67811  #endif
67812 
67813  /* "mbd/CouplingFSI.pyx":3031
67814  * assert len(length_array) == deref(self.thisptr.cables[segment_nb]).nb_elems, 'array of length of elements not matching number of elements'
67815  * cdef vector[double] vec
67816  * for length in length_array: # <<<<<<<<<<<<<<
67817  * vec.push_back(length)
67818  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec)
67819  */
67820  __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_length_array, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
67821  __Pyx_GOTREF(__pyx_t_2);
67822  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
67823  __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
67824  __pyx_t_5 = NULL;
67825  } else {
67826  __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3031, __pyx_L1_error)
67827  __Pyx_GOTREF(__pyx_t_3);
67828  __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3031, __pyx_L1_error)
67829  }
67830  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
67831  for (;;) {
67832  if (likely(!__pyx_t_5)) {
67833  if (likely(PyList_CheckExact(__pyx_t_3))) {
67834  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
67835  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67836  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3031, __pyx_L1_error)
67837  #else
67838  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
67839  __Pyx_GOTREF(__pyx_t_2);
67840  #endif
67841  } else {
67842  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
67843  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
67844  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3031, __pyx_L1_error)
67845  #else
67846  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
67847  __Pyx_GOTREF(__pyx_t_2);
67848  #endif
67849  }
67850  } else {
67851  __pyx_t_2 = __pyx_t_5(__pyx_t_3);
67852  if (unlikely(!__pyx_t_2)) {
67853  PyObject* exc_type = PyErr_Occurred();
67854  if (exc_type) {
67855  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
67856  else __PYX_ERR(0, 3031, __pyx_L1_error)
67857  }
67858  break;
67859  }
67860  __Pyx_GOTREF(__pyx_t_2);
67861  }
67862  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
67863  __pyx_t_2 = 0;
67864 
67865  /* "mbd/CouplingFSI.pyx":3032
67866  * cdef vector[double] vec
67867  * for length in length_array:
67868  * vec.push_back(length) # <<<<<<<<<<<<<<
67869  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec)
67870  *
67871  */
67872  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_v_length); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3032, __pyx_L1_error)
67873  try {
67874  __pyx_v_vec.push_back(__pyx_t_6);
67875  } catch(...) {
67876  __Pyx_CppExn2PyErr();
67877  __PYX_ERR(0, 3032, __pyx_L1_error)
67878  }
67879 
67880  /* "mbd/CouplingFSI.pyx":3031
67881  * assert len(length_array) == deref(self.thisptr.cables[segment_nb]).nb_elems, 'array of length of elements not matching number of elements'
67882  * cdef vector[double] vec
67883  * for length in length_array: # <<<<<<<<<<<<<<
67884  * vec.push_back(length)
67885  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec)
67886  */
67887  }
67888  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
67889 
67890  /* "mbd/CouplingFSI.pyx":3033
67891  * for length in length_array:
67892  * vec.push_back(length)
67893  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec) # <<<<<<<<<<<<<<
67894  *
67895  * def setNodesPosition(self, double[:,:,:] positions=None, tangents=None):
67896  */
67897  (*(__pyx_v_self->thisptr->cables[__pyx_v_segment_nb])).setRestLengthPerElement(__pyx_v_vec);
67898 
67899  /* "mbd/CouplingFSI.pyx":3019
67900  * deref(self.thisptr.cables[segment_nb]).setAddedMassCoefficients(tangential, normal)
67901  *
67902  * def setRestLengthPerElement(self, double[:] length_array, int segment_nb): # <<<<<<<<<<<<<<
67903  * """Sets rest length per element of cable
67904  *
67905  */
67906 
67907  /* function exit code */
67908  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
67909  goto __pyx_L0;
67910  __pyx_L1_error:;
67911  __Pyx_XDECREF(__pyx_t_2);
67912  __Pyx_XDECREF(__pyx_t_3);
67913  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setRestLengthPerElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
67914  __pyx_r = NULL;
67915  __pyx_L0:;
67916  __Pyx_XDECREF(__pyx_v_length);
67917  __PYX_XDEC_MEMVIEW(&__pyx_v_length_array, 1);
67918  __Pyx_XGIVEREF(__pyx_r);
67919  __Pyx_TraceReturn(__pyx_r, 0);
67920  __Pyx_RefNannyFinishContext();
67921  return __pyx_r;
67922 }
67923 
67924 /* "mbd/CouplingFSI.pyx":3035
67925  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec)
67926  *
67927  * def setNodesPosition(self, double[:,:,:] positions=None, tangents=None): # <<<<<<<<<<<<<<
67928  * """Builds the nodes of the cable.
67929  *
67930  */
67931 
67932 /* Python wrapper */
67933 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_51setNodesPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
67934 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_50setNodesPosition[] = "ProtChMoorings.setNodesPosition(self, double[:, :, :] positions=None, tangents=None)\nBuilds the nodes of the cable.\n\n (!) Must be called after setNodesPositionFunction()\n ";
67935 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_51setNodesPosition = {"setNodesPosition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_51setNodesPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_50setNodesPosition};
67936 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_51setNodesPosition(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
67937  __Pyx_memviewslice __pyx_v_positions = { 0, 0, { 0 }, { 0 }, { 0 } };
67938  PyObject *__pyx_v_tangents = 0;
67939  int __pyx_lineno = 0;
67940  const char *__pyx_filename = NULL;
67941  int __pyx_clineno = 0;
67942  PyObject *__pyx_r = 0;
67943  __Pyx_RefNannyDeclarations
67944  __Pyx_RefNannySetupContext("setNodesPosition (wrapper)", 0);
67945  {
67946  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_positions,&__pyx_n_s_tangents,0};
67947  PyObject* values[2] = {0,0};
67948  values[1] = ((PyObject *)Py_None);
67949  if (unlikely(__pyx_kwds)) {
67950  Py_ssize_t kw_args;
67951  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
67952  switch (pos_args) {
67953  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67954  CYTHON_FALLTHROUGH;
67955  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67956  CYTHON_FALLTHROUGH;
67957  case 0: break;
67958  default: goto __pyx_L5_argtuple_error;
67959  }
67960  kw_args = PyDict_Size(__pyx_kwds);
67961  switch (pos_args) {
67962  case 0:
67963  if (kw_args > 0) {
67964  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_positions);
67965  if (value) { values[0] = value; kw_args--; }
67966  }
67967  CYTHON_FALLTHROUGH;
67968  case 1:
67969  if (kw_args > 0) {
67970  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tangents);
67971  if (value) { values[1] = value; kw_args--; }
67972  }
67973  }
67974  if (unlikely(kw_args > 0)) {
67975  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNodesPosition") < 0)) __PYX_ERR(0, 3035, __pyx_L3_error)
67976  }
67977  } else {
67978  switch (PyTuple_GET_SIZE(__pyx_args)) {
67979  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
67980  CYTHON_FALLTHROUGH;
67981  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
67982  CYTHON_FALLTHROUGH;
67983  case 0: break;
67984  default: goto __pyx_L5_argtuple_error;
67985  }
67986  }
67987  if (values[0]) {
67988  __pyx_v_positions = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_positions.memview)) __PYX_ERR(0, 3035, __pyx_L3_error)
67989  } else {
67990  __pyx_v_positions = __pyx_k__178;
67991  __PYX_INC_MEMVIEW(&__pyx_v_positions, 1);
67992  }
67993  __pyx_v_tangents = values[1];
67994  }
67995  goto __pyx_L4_argument_unpacking_done;
67996  __pyx_L5_argtuple_error:;
67997  __Pyx_RaiseArgtupleInvalid("setNodesPosition", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3035, __pyx_L3_error)
67998  __pyx_L3_error:;
67999  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setNodesPosition", __pyx_clineno, __pyx_lineno, __pyx_filename);
68000  __Pyx_RefNannyFinishContext();
68001  return NULL;
68002  __pyx_L4_argument_unpacking_done:;
68003  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_50setNodesPosition(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_positions, __pyx_v_tangents);
68004 
68005  /* function exit code */
68006  __Pyx_RefNannyFinishContext();
68007  return __pyx_r;
68008 }
68009 
68010 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_50setNodesPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, __Pyx_memviewslice __pyx_v_positions, PyObject *__pyx_v_tangents) {
68011  ChVector<double> __pyx_v_vec;
68012  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_v_i;
68013  double __pyx_v_L0;
68014  double __pyx_v_L;
68015  PyObject *__pyx_v_nb_elems = NULL;
68016  PyObject *__pyx_v_nb_nodes = NULL;
68017  PyObject *__pyx_v_ds = NULL;
68018  PyObject *__pyx_v_j = NULL;
68019  PyObject *__pyx_v_x = NULL;
68020  PyObject *__pyx_v_y = NULL;
68021  PyObject *__pyx_v_z = NULL;
68022  PyObject *__pyx_r = NULL;
68023  __Pyx_TraceDeclarations
68024  __Pyx_RefNannyDeclarations
68025  int __pyx_t_1;
68026  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_2;
68027  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_3;
68028  std::vector<std::shared_ptr<cppCable> > ::size_type __pyx_t_4;
68029  double __pyx_t_5;
68030  PyObject *__pyx_t_6 = NULL;
68031  int __pyx_t_7;
68032  PyObject *__pyx_t_8 = NULL;
68033  PyObject *__pyx_t_9 = NULL;
68034  Py_ssize_t __pyx_t_10;
68035  PyObject *(*__pyx_t_11)(PyObject *);
68036  PyObject *__pyx_t_12 = NULL;
68037  PyObject *__pyx_t_13 = NULL;
68038  PyObject *__pyx_t_14 = NULL;
68039  PyObject *(*__pyx_t_15)(PyObject *);
68040  double __pyx_t_16;
68041  double __pyx_t_17;
68042  __Pyx_memviewslice __pyx_t_18 = { 0, 0, { 0 }, { 0 }, { 0 } };
68043  size_t __pyx_t_19;
68044  Py_ssize_t __pyx_t_20;
68045  __Pyx_memviewslice __pyx_t_21 = { 0, 0, { 0 }, { 0 }, { 0 } };
68046  int __pyx_lineno = 0;
68047  const char *__pyx_filename = NULL;
68048  int __pyx_clineno = 0;
68049  __Pyx_TraceFrameInit(__pyx_codeobj__179)
68050  __Pyx_RefNannySetupContext("setNodesPosition", 0);
68051  __Pyx_TraceCall("setNodesPosition", __pyx_f[0], 3035, 0, __PYX_ERR(0, 3035, __pyx_L1_error));
68052 
68053  /* "mbd/CouplingFSI.pyx":3043
68054  * # self.nodes_tangents0 = tangents
68055  * cdef ch.ChVector[double] vec
68056  * if positions is None: # <<<<<<<<<<<<<<
68057  * for i in range(self.thisptr.cables.size()):
68058  * deref(self.thisptr.cables[i]).mvecs.clear()
68059  */
68060  __pyx_t_1 = ((((PyObject *) __pyx_v_positions.memview) == Py_None) != 0);
68061  if (__pyx_t_1) {
68062 
68063  /* "mbd/CouplingFSI.pyx":3044
68064  * cdef ch.ChVector[double] vec
68065  * if positions is None:
68066  * for i in range(self.thisptr.cables.size()): # <<<<<<<<<<<<<<
68067  * deref(self.thisptr.cables[i]).mvecs.clear()
68068  * L0 = deref(self.thisptr.cables[i]).L0
68069  */
68070  __pyx_t_2 = __pyx_v_self->thisptr->cables.size();
68071  __pyx_t_3 = __pyx_t_2;
68072  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
68073  __pyx_v_i = __pyx_t_4;
68074 
68075  /* "mbd/CouplingFSI.pyx":3045
68076  * if positions is None:
68077  * for i in range(self.thisptr.cables.size()):
68078  * deref(self.thisptr.cables[i]).mvecs.clear() # <<<<<<<<<<<<<<
68079  * L0 = deref(self.thisptr.cables[i]).L0
68080  * L = deref(self.thisptr.cables[i]).length
68081  */
68082  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs.clear();
68083 
68084  /* "mbd/CouplingFSI.pyx":3046
68085  * for i in range(self.thisptr.cables.size()):
68086  * deref(self.thisptr.cables[i]).mvecs.clear()
68087  * L0 = deref(self.thisptr.cables[i]).L0 # <<<<<<<<<<<<<<
68088  * L = deref(self.thisptr.cables[i]).length
68089  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68090  */
68091  __pyx_t_5 = (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).L0;
68092  __pyx_v_L0 = __pyx_t_5;
68093 
68094  /* "mbd/CouplingFSI.pyx":3047
68095  * deref(self.thisptr.cables[i]).mvecs.clear()
68096  * L0 = deref(self.thisptr.cables[i]).L0
68097  * L = deref(self.thisptr.cables[i]).length # <<<<<<<<<<<<<<
68098  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68099  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler":
68100  */
68101  __pyx_t_5 = (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).length;
68102  __pyx_v_L = __pyx_t_5;
68103 
68104  /* "mbd/CouplingFSI.pyx":3048
68105  * L0 = deref(self.thisptr.cables[i]).L0
68106  * L = deref(self.thisptr.cables[i]).length
68107  * nb_elems = deref(self.thisptr.cables[i]).nb_elems # <<<<<<<<<<<<<<
68108  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler":
68109  * nb_nodes = nb_elems+1
68110  */
68111  __pyx_t_6 = __Pyx_PyInt_From_int((*(__pyx_v_self->thisptr->cables[__pyx_v_i])).nb_elems); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3048, __pyx_L1_error)
68112  __Pyx_GOTREF(__pyx_t_6);
68113  __Pyx_XDECREF_SET(__pyx_v_nb_elems, __pyx_t_6);
68114  __pyx_t_6 = 0;
68115 
68116  /* "mbd/CouplingFSI.pyx":3049
68117  * L = deref(self.thisptr.cables[i]).length
68118  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68119  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
68120  * nb_nodes = nb_elems+1
68121  * else:
68122  */
68123  __pyx_t_7 = ((__pyx_v_self->beam_type == ((char const *)"CableANCF")) != 0);
68124  if (!__pyx_t_7) {
68125  } else {
68126  __pyx_t_1 = __pyx_t_7;
68127  goto __pyx_L7_bool_binop_done;
68128  }
68129  __pyx_t_7 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
68130  __pyx_t_1 = __pyx_t_7;
68131  __pyx_L7_bool_binop_done:;
68132  if (__pyx_t_1) {
68133 
68134  /* "mbd/CouplingFSI.pyx":3050
68135  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68136  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler":
68137  * nb_nodes = nb_elems+1 # <<<<<<<<<<<<<<
68138  * else:
68139  * print("set element type")
68140  */
68141  __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_nb_elems, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3050, __pyx_L1_error)
68142  __Pyx_GOTREF(__pyx_t_6);
68143  __Pyx_XDECREF_SET(__pyx_v_nb_nodes, __pyx_t_6);
68144  __pyx_t_6 = 0;
68145 
68146  /* "mbd/CouplingFSI.pyx":3049
68147  * L = deref(self.thisptr.cables[i]).length
68148  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68149  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
68150  * nb_nodes = nb_elems+1
68151  * else:
68152  */
68153  goto __pyx_L6;
68154  }
68155 
68156  /* "mbd/CouplingFSI.pyx":3052
68157  * nb_nodes = nb_elems+1
68158  * else:
68159  * print("set element type") # <<<<<<<<<<<<<<
68160  * sys.exit()
68161  * ds = L/(nb_nodes-1)
68162  */
68163  /*else*/ {
68164  if (__Pyx_PrintOne(0, __pyx_kp_s_set_element_type) < 0) __PYX_ERR(0, 3052, __pyx_L1_error)
68165 
68166  /* "mbd/CouplingFSI.pyx":3053
68167  * else:
68168  * print("set element type")
68169  * sys.exit() # <<<<<<<<<<<<<<
68170  * ds = L/(nb_nodes-1)
68171  * for j in range(nb_nodes):
68172  */
68173  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3053, __pyx_L1_error)
68174  __Pyx_GOTREF(__pyx_t_8);
68175  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_exit_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3053, __pyx_L1_error)
68176  __Pyx_GOTREF(__pyx_t_9);
68177  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68178  __pyx_t_8 = NULL;
68179  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
68180  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
68181  if (likely(__pyx_t_8)) {
68182  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
68183  __Pyx_INCREF(__pyx_t_8);
68184  __Pyx_INCREF(function);
68185  __Pyx_DECREF_SET(__pyx_t_9, function);
68186  }
68187  }
68188  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
68189  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
68190  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3053, __pyx_L1_error)
68191  __Pyx_GOTREF(__pyx_t_6);
68192  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68193  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
68194  }
68195  __pyx_L6:;
68196 
68197  /* "mbd/CouplingFSI.pyx":3054
68198  * print("set element type")
68199  * sys.exit()
68200  * ds = L/(nb_nodes-1) # <<<<<<<<<<<<<<
68201  * for j in range(nb_nodes):
68202  * x, y, z = self.nodes_function(L0+ds*j)
68203  */
68204  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_L); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3054, __pyx_L1_error)
68205  __Pyx_GOTREF(__pyx_t_6);
68206  if (unlikely(!__pyx_v_nb_nodes)) { __Pyx_RaiseUnboundLocalError("nb_nodes"); __PYX_ERR(0, 3054, __pyx_L1_error) }
68207  __pyx_t_9 = __Pyx_PyInt_SubtractObjC(__pyx_v_nb_nodes, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3054, __pyx_L1_error)
68208  __Pyx_GOTREF(__pyx_t_9);
68209  __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3054, __pyx_L1_error)
68210  __Pyx_GOTREF(__pyx_t_8);
68211  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
68212  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68213  __Pyx_XDECREF_SET(__pyx_v_ds, __pyx_t_8);
68214  __pyx_t_8 = 0;
68215 
68216  /* "mbd/CouplingFSI.pyx":3055
68217  * sys.exit()
68218  * ds = L/(nb_nodes-1)
68219  * for j in range(nb_nodes): # <<<<<<<<<<<<<<
68220  * x, y, z = self.nodes_function(L0+ds*j)
68221  * vec = ch.ChVector[double](x, y, z)
68222  */
68223  if (unlikely(!__pyx_v_nb_nodes)) { __Pyx_RaiseUnboundLocalError("nb_nodes"); __PYX_ERR(0, 3055, __pyx_L1_error) }
68224  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nb_nodes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3055, __pyx_L1_error)
68225  __Pyx_GOTREF(__pyx_t_8);
68226  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
68227  __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0;
68228  __pyx_t_11 = NULL;
68229  } else {
68230  __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3055, __pyx_L1_error)
68231  __Pyx_GOTREF(__pyx_t_9);
68232  __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3055, __pyx_L1_error)
68233  }
68234  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68235  for (;;) {
68236  if (likely(!__pyx_t_11)) {
68237  if (likely(PyList_CheckExact(__pyx_t_9))) {
68238  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break;
68239  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68240  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3055, __pyx_L1_error)
68241  #else
68242  __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3055, __pyx_L1_error)
68243  __Pyx_GOTREF(__pyx_t_8);
68244  #endif
68245  } else {
68246  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
68247  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68248  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3055, __pyx_L1_error)
68249  #else
68250  __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3055, __pyx_L1_error)
68251  __Pyx_GOTREF(__pyx_t_8);
68252  #endif
68253  }
68254  } else {
68255  __pyx_t_8 = __pyx_t_11(__pyx_t_9);
68256  if (unlikely(!__pyx_t_8)) {
68257  PyObject* exc_type = PyErr_Occurred();
68258  if (exc_type) {
68259  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
68260  else __PYX_ERR(0, 3055, __pyx_L1_error)
68261  }
68262  break;
68263  }
68264  __Pyx_GOTREF(__pyx_t_8);
68265  }
68266  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_8);
68267  __pyx_t_8 = 0;
68268 
68269  /* "mbd/CouplingFSI.pyx":3056
68270  * ds = L/(nb_nodes-1)
68271  * for j in range(nb_nodes):
68272  * x, y, z = self.nodes_function(L0+ds*j) # <<<<<<<<<<<<<<
68273  * vec = ch.ChVector[double](x, y, z)
68274  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
68275  */
68276  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_L0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3056, __pyx_L1_error)
68277  __Pyx_GOTREF(__pyx_t_6);
68278  __pyx_t_12 = PyNumber_Multiply(__pyx_v_ds, __pyx_v_j); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3056, __pyx_L1_error)
68279  __Pyx_GOTREF(__pyx_t_12);
68280  __pyx_t_13 = PyNumber_Add(__pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3056, __pyx_L1_error)
68281  __Pyx_GOTREF(__pyx_t_13);
68282  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
68283  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
68284  __Pyx_INCREF(__pyx_v_self->nodes_function);
68285  __pyx_t_12 = __pyx_v_self->nodes_function; __pyx_t_6 = NULL;
68286  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
68287  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
68288  if (likely(__pyx_t_6)) {
68289  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
68290  __Pyx_INCREF(__pyx_t_6);
68291  __Pyx_INCREF(function);
68292  __Pyx_DECREF_SET(__pyx_t_12, function);
68293  }
68294  }
68295  __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_6, __pyx_t_13) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13);
68296  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
68297  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
68298  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3056, __pyx_L1_error)
68299  __Pyx_GOTREF(__pyx_t_8);
68300  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
68301  if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
68302  PyObject* sequence = __pyx_t_8;
68303  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
68304  if (unlikely(size != 3)) {
68305  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
68306  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
68307  __PYX_ERR(0, 3056, __pyx_L1_error)
68308  }
68309  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68310  if (likely(PyTuple_CheckExact(sequence))) {
68311  __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0);
68312  __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1);
68313  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
68314  } else {
68315  __pyx_t_12 = PyList_GET_ITEM(sequence, 0);
68316  __pyx_t_13 = PyList_GET_ITEM(sequence, 1);
68317  __pyx_t_6 = PyList_GET_ITEM(sequence, 2);
68318  }
68319  __Pyx_INCREF(__pyx_t_12);
68320  __Pyx_INCREF(__pyx_t_13);
68321  __Pyx_INCREF(__pyx_t_6);
68322  #else
68323  __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3056, __pyx_L1_error)
68324  __Pyx_GOTREF(__pyx_t_12);
68325  __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3056, __pyx_L1_error)
68326  __Pyx_GOTREF(__pyx_t_13);
68327  __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3056, __pyx_L1_error)
68328  __Pyx_GOTREF(__pyx_t_6);
68329  #endif
68330  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68331  } else {
68332  Py_ssize_t index = -1;
68333  __pyx_t_14 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3056, __pyx_L1_error)
68334  __Pyx_GOTREF(__pyx_t_14);
68335  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68336  __pyx_t_15 = Py_TYPE(__pyx_t_14)->tp_iternext;
68337  index = 0; __pyx_t_12 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_12)) goto __pyx_L11_unpacking_failed;
68338  __Pyx_GOTREF(__pyx_t_12);
68339  index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L11_unpacking_failed;
68340  __Pyx_GOTREF(__pyx_t_13);
68341  index = 2; __pyx_t_6 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
68342  __Pyx_GOTREF(__pyx_t_6);
68343  if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 3) < 0) __PYX_ERR(0, 3056, __pyx_L1_error)
68344  __pyx_t_15 = NULL;
68345  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
68346  goto __pyx_L12_unpacking_done;
68347  __pyx_L11_unpacking_failed:;
68348  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
68349  __pyx_t_15 = NULL;
68350  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
68351  __PYX_ERR(0, 3056, __pyx_L1_error)
68352  __pyx_L12_unpacking_done:;
68353  }
68354  __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_12);
68355  __pyx_t_12 = 0;
68356  __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_13);
68357  __pyx_t_13 = 0;
68358  __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_6);
68359  __pyx_t_6 = 0;
68360 
68361  /* "mbd/CouplingFSI.pyx":3057
68362  * for j in range(nb_nodes):
68363  * x, y, z = self.nodes_function(L0+ds*j)
68364  * vec = ch.ChVector[double](x, y, z) # <<<<<<<<<<<<<<
68365  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
68366  * else:
68367  */
68368  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3057, __pyx_L1_error)
68369  __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_v_y); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3057, __pyx_L1_error)
68370  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_z); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3057, __pyx_L1_error)
68371  __pyx_v_vec = ChVector<double> (__pyx_t_5, __pyx_t_16, __pyx_t_17);
68372 
68373  /* "mbd/CouplingFSI.pyx":3058
68374  * x, y, z = self.nodes_function(L0+ds*j)
68375  * vec = ch.ChVector[double](x, y, z)
68376  * deref(self.thisptr.cables[i]).mvecs.push_back(vec) # <<<<<<<<<<<<<<
68377  * else:
68378  * for i in range(self.thisptr.cables.size()):
68379  */
68380  try {
68381  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs.push_back(((ChVector<double> &)__pyx_v_vec));
68382  } catch(...) {
68383  __Pyx_CppExn2PyErr();
68384  __PYX_ERR(0, 3058, __pyx_L1_error)
68385  }
68386 
68387  /* "mbd/CouplingFSI.pyx":3055
68388  * sys.exit()
68389  * ds = L/(nb_nodes-1)
68390  * for j in range(nb_nodes): # <<<<<<<<<<<<<<
68391  * x, y, z = self.nodes_function(L0+ds*j)
68392  * vec = ch.ChVector[double](x, y, z)
68393  */
68394  }
68395  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68396  }
68397 
68398  /* "mbd/CouplingFSI.pyx":3043
68399  * # self.nodes_tangents0 = tangents
68400  * cdef ch.ChVector[double] vec
68401  * if positions is None: # <<<<<<<<<<<<<<
68402  * for i in range(self.thisptr.cables.size()):
68403  * deref(self.thisptr.cables[i]).mvecs.clear()
68404  */
68405  goto __pyx_L3;
68406  }
68407 
68408  /* "mbd/CouplingFSI.pyx":3060
68409  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
68410  * else:
68411  * for i in range(self.thisptr.cables.size()): # <<<<<<<<<<<<<<
68412  * deref(self.thisptr.cables[i]).mvecs.clear()
68413  * nb_nodes = len(positions[i])
68414  */
68415  /*else*/ {
68416  __pyx_t_2 = __pyx_v_self->thisptr->cables.size();
68417  __pyx_t_3 = __pyx_t_2;
68418  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
68419  __pyx_v_i = __pyx_t_4;
68420 
68421  /* "mbd/CouplingFSI.pyx":3061
68422  * else:
68423  * for i in range(self.thisptr.cables.size()):
68424  * deref(self.thisptr.cables[i]).mvecs.clear() # <<<<<<<<<<<<<<
68425  * nb_nodes = len(positions[i])
68426  * for j in range(len(positions[i])):
68427  */
68428  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs.clear();
68429 
68430  /* "mbd/CouplingFSI.pyx":3062
68431  * for i in range(self.thisptr.cables.size()):
68432  * deref(self.thisptr.cables[i]).mvecs.clear()
68433  * nb_nodes = len(positions[i]) # <<<<<<<<<<<<<<
68434  * for j in range(len(positions[i])):
68435  * x, y, z = positions[i][j]
68436  */
68437  __pyx_t_18.data = __pyx_v_positions.data;
68438  __pyx_t_18.memview = __pyx_v_positions.memview;
68439  __PYX_INC_MEMVIEW(&__pyx_t_18, 0);
68440  {
68441  Py_ssize_t __pyx_tmp_idx = __pyx_v_i;
68442  Py_ssize_t __pyx_tmp_shape = __pyx_v_positions.shape[0];
68443  Py_ssize_t __pyx_tmp_stride = __pyx_v_positions.strides[0];
68444  if (__pyx_tmp_idx < 0)
68445  __pyx_tmp_idx += __pyx_tmp_shape;
68446  if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) {
68447  PyErr_SetString(PyExc_IndexError,
68448  "Index out of bounds (axis 0)");
68449  __PYX_ERR(0, 3062, __pyx_L1_error)
68450  }
68451  __pyx_t_18.data += __pyx_tmp_idx * __pyx_tmp_stride;
68452 }
68453 
68454 __pyx_t_18.shape[0] = __pyx_v_positions.shape[1];
68455 __pyx_t_18.strides[0] = __pyx_v_positions.strides[1];
68456  __pyx_t_18.suboffsets[0] = -1;
68457 
68458 __pyx_t_18.shape[1] = __pyx_v_positions.shape[2];
68459 __pyx_t_18.strides[1] = __pyx_v_positions.strides[2];
68460  __pyx_t_18.suboffsets[1] = -1;
68461 
68462 __pyx_t_19 = __Pyx_MemoryView_Len(__pyx_t_18);
68463  __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
68464  __pyx_t_18.memview = NULL;
68465  __pyx_t_18.data = NULL;
68466  __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_t_19); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3062, __pyx_L1_error)
68467  __Pyx_GOTREF(__pyx_t_9);
68468  __Pyx_XDECREF_SET(__pyx_v_nb_nodes, __pyx_t_9);
68469  __pyx_t_9 = 0;
68470 
68471  /* "mbd/CouplingFSI.pyx":3063
68472  * deref(self.thisptr.cables[i]).mvecs.clear()
68473  * nb_nodes = len(positions[i])
68474  * for j in range(len(positions[i])): # <<<<<<<<<<<<<<
68475  * x, y, z = positions[i][j]
68476  * vec = ch.ChVector[double](x, y, z)
68477  */
68478  __pyx_t_18.data = __pyx_v_positions.data;
68479  __pyx_t_18.memview = __pyx_v_positions.memview;
68480  __PYX_INC_MEMVIEW(&__pyx_t_18, 0);
68481  {
68482  Py_ssize_t __pyx_tmp_idx = __pyx_v_i;
68483  Py_ssize_t __pyx_tmp_shape = __pyx_v_positions.shape[0];
68484  Py_ssize_t __pyx_tmp_stride = __pyx_v_positions.strides[0];
68485  if (__pyx_tmp_idx < 0)
68486  __pyx_tmp_idx += __pyx_tmp_shape;
68487  if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) {
68488  PyErr_SetString(PyExc_IndexError,
68489  "Index out of bounds (axis 0)");
68490  __PYX_ERR(0, 3063, __pyx_L1_error)
68491  }
68492  __pyx_t_18.data += __pyx_tmp_idx * __pyx_tmp_stride;
68493 }
68494 
68495 __pyx_t_18.shape[0] = __pyx_v_positions.shape[1];
68496 __pyx_t_18.strides[0] = __pyx_v_positions.strides[1];
68497  __pyx_t_18.suboffsets[0] = -1;
68498 
68499 __pyx_t_18.shape[1] = __pyx_v_positions.shape[2];
68500 __pyx_t_18.strides[1] = __pyx_v_positions.strides[2];
68501  __pyx_t_18.suboffsets[1] = -1;
68502 
68503 __pyx_t_19 = __Pyx_MemoryView_Len(__pyx_t_18);
68504  __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
68505  __pyx_t_18.memview = NULL;
68506  __pyx_t_18.data = NULL;
68507  __pyx_t_9 = __Pyx_PyInt_FromSize_t(__pyx_t_19); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3063, __pyx_L1_error)
68508  __Pyx_GOTREF(__pyx_t_9);
68509  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3063, __pyx_L1_error)
68510  __Pyx_GOTREF(__pyx_t_8);
68511  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68512  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
68513  __pyx_t_9 = __pyx_t_8; __Pyx_INCREF(__pyx_t_9); __pyx_t_10 = 0;
68514  __pyx_t_11 = NULL;
68515  } else {
68516  __pyx_t_10 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3063, __pyx_L1_error)
68517  __Pyx_GOTREF(__pyx_t_9);
68518  __pyx_t_11 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3063, __pyx_L1_error)
68519  }
68520  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68521  for (;;) {
68522  if (likely(!__pyx_t_11)) {
68523  if (likely(PyList_CheckExact(__pyx_t_9))) {
68524  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_9)) break;
68525  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68526  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3063, __pyx_L1_error)
68527  #else
68528  __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3063, __pyx_L1_error)
68529  __Pyx_GOTREF(__pyx_t_8);
68530  #endif
68531  } else {
68532  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
68533  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68534  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3063, __pyx_L1_error)
68535  #else
68536  __pyx_t_8 = PySequence_ITEM(__pyx_t_9, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3063, __pyx_L1_error)
68537  __Pyx_GOTREF(__pyx_t_8);
68538  #endif
68539  }
68540  } else {
68541  __pyx_t_8 = __pyx_t_11(__pyx_t_9);
68542  if (unlikely(!__pyx_t_8)) {
68543  PyObject* exc_type = PyErr_Occurred();
68544  if (exc_type) {
68545  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
68546  else __PYX_ERR(0, 3063, __pyx_L1_error)
68547  }
68548  break;
68549  }
68550  __Pyx_GOTREF(__pyx_t_8);
68551  }
68552  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_8);
68553  __pyx_t_8 = 0;
68554 
68555  /* "mbd/CouplingFSI.pyx":3064
68556  * nb_nodes = len(positions[i])
68557  * for j in range(len(positions[i])):
68558  * x, y, z = positions[i][j] # <<<<<<<<<<<<<<
68559  * vec = ch.ChVector[double](x, y, z)
68560  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
68561  */
68562  __pyx_t_20 = __Pyx_PyIndex_AsSsize_t(__pyx_v_j); if (unlikely((__pyx_t_20 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3064, __pyx_L1_error)
68563  __pyx_t_21.data = __pyx_v_positions.data;
68564  __pyx_t_21.memview = __pyx_v_positions.memview;
68565  __PYX_INC_MEMVIEW(&__pyx_t_21, 0);
68566  {
68567  Py_ssize_t __pyx_tmp_idx = __pyx_v_i;
68568  Py_ssize_t __pyx_tmp_shape = __pyx_v_positions.shape[0];
68569  Py_ssize_t __pyx_tmp_stride = __pyx_v_positions.strides[0];
68570  if (__pyx_tmp_idx < 0)
68571  __pyx_tmp_idx += __pyx_tmp_shape;
68572  if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) {
68573  PyErr_SetString(PyExc_IndexError,
68574  "Index out of bounds (axis 0)");
68575  __PYX_ERR(0, 3064, __pyx_L1_error)
68576  }
68577  __pyx_t_21.data += __pyx_tmp_idx * __pyx_tmp_stride;
68578 }
68579 
68580 {
68581  Py_ssize_t __pyx_tmp_idx = __pyx_t_20;
68582  Py_ssize_t __pyx_tmp_shape = __pyx_v_positions.shape[1];
68583  Py_ssize_t __pyx_tmp_stride = __pyx_v_positions.strides[1];
68584  if (__pyx_tmp_idx < 0)
68585  __pyx_tmp_idx += __pyx_tmp_shape;
68586  if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) {
68587  PyErr_SetString(PyExc_IndexError,
68588  "Index out of bounds (axis 1)");
68589  __PYX_ERR(0, 3064, __pyx_L1_error)
68590  }
68591  __pyx_t_21.data += __pyx_tmp_idx * __pyx_tmp_stride;
68592 }
68593 
68594 __pyx_t_21.shape[0] = __pyx_v_positions.shape[2];
68595 __pyx_t_21.strides[0] = __pyx_v_positions.strides[2];
68596  __pyx_t_21.suboffsets[0] = -1;
68597 
68598 __pyx_t_8 = __pyx_memoryview_fromslice(__pyx_t_21, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3064, __pyx_L1_error)
68599  __Pyx_GOTREF(__pyx_t_8);
68600  __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1);
68601  __pyx_t_21.memview = NULL;
68602  __pyx_t_21.data = NULL;
68603  if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
68604  PyObject* sequence = __pyx_t_8;
68605  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
68606  if (unlikely(size != 3)) {
68607  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
68608  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
68609  __PYX_ERR(0, 3064, __pyx_L1_error)
68610  }
68611  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68612  if (likely(PyTuple_CheckExact(sequence))) {
68613  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
68614  __pyx_t_13 = PyTuple_GET_ITEM(sequence, 1);
68615  __pyx_t_12 = PyTuple_GET_ITEM(sequence, 2);
68616  } else {
68617  __pyx_t_6 = PyList_GET_ITEM(sequence, 0);
68618  __pyx_t_13 = PyList_GET_ITEM(sequence, 1);
68619  __pyx_t_12 = PyList_GET_ITEM(sequence, 2);
68620  }
68621  __Pyx_INCREF(__pyx_t_6);
68622  __Pyx_INCREF(__pyx_t_13);
68623  __Pyx_INCREF(__pyx_t_12);
68624  #else
68625  __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3064, __pyx_L1_error)
68626  __Pyx_GOTREF(__pyx_t_6);
68627  __pyx_t_13 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3064, __pyx_L1_error)
68628  __Pyx_GOTREF(__pyx_t_13);
68629  __pyx_t_12 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3064, __pyx_L1_error)
68630  __Pyx_GOTREF(__pyx_t_12);
68631  #endif
68632  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68633  } else {
68634  Py_ssize_t index = -1;
68635  __pyx_t_14 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3064, __pyx_L1_error)
68636  __Pyx_GOTREF(__pyx_t_14);
68637  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68638  __pyx_t_15 = Py_TYPE(__pyx_t_14)->tp_iternext;
68639  index = 0; __pyx_t_6 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L17_unpacking_failed;
68640  __Pyx_GOTREF(__pyx_t_6);
68641  index = 1; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L17_unpacking_failed;
68642  __Pyx_GOTREF(__pyx_t_13);
68643  index = 2; __pyx_t_12 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_12)) goto __pyx_L17_unpacking_failed;
68644  __Pyx_GOTREF(__pyx_t_12);
68645  if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 3) < 0) __PYX_ERR(0, 3064, __pyx_L1_error)
68646  __pyx_t_15 = NULL;
68647  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
68648  goto __pyx_L18_unpacking_done;
68649  __pyx_L17_unpacking_failed:;
68650  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
68651  __pyx_t_15 = NULL;
68652  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
68653  __PYX_ERR(0, 3064, __pyx_L1_error)
68654  __pyx_L18_unpacking_done:;
68655  }
68656  __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_6);
68657  __pyx_t_6 = 0;
68658  __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_13);
68659  __pyx_t_13 = 0;
68660  __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_12);
68661  __pyx_t_12 = 0;
68662 
68663  /* "mbd/CouplingFSI.pyx":3065
68664  * for j in range(len(positions[i])):
68665  * x, y, z = positions[i][j]
68666  * vec = ch.ChVector[double](x, y, z) # <<<<<<<<<<<<<<
68667  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
68668  * if tangents is None:
68669  */
68670  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3065, __pyx_L1_error)
68671  __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_v_y); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3065, __pyx_L1_error)
68672  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_z); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3065, __pyx_L1_error)
68673  __pyx_v_vec = ChVector<double> (__pyx_t_17, __pyx_t_16, __pyx_t_5);
68674 
68675  /* "mbd/CouplingFSI.pyx":3066
68676  * x, y, z = positions[i][j]
68677  * vec = ch.ChVector[double](x, y, z)
68678  * deref(self.thisptr.cables[i]).mvecs.push_back(vec) # <<<<<<<<<<<<<<
68679  * if tangents is None:
68680  * for i in range(self.thisptr.cables.size()):
68681  */
68682  try {
68683  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs.push_back(((ChVector<double> &)__pyx_v_vec));
68684  } catch(...) {
68685  __Pyx_CppExn2PyErr();
68686  __PYX_ERR(0, 3066, __pyx_L1_error)
68687  }
68688 
68689  /* "mbd/CouplingFSI.pyx":3063
68690  * deref(self.thisptr.cables[i]).mvecs.clear()
68691  * nb_nodes = len(positions[i])
68692  * for j in range(len(positions[i])): # <<<<<<<<<<<<<<
68693  * x, y, z = positions[i][j]
68694  * vec = ch.ChVector[double](x, y, z)
68695  */
68696  }
68697  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68698  }
68699  }
68700  __pyx_L3:;
68701 
68702  /* "mbd/CouplingFSI.pyx":3067
68703  * vec = ch.ChVector[double](x, y, z)
68704  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
68705  * if tangents is None: # <<<<<<<<<<<<<<
68706  * for i in range(self.thisptr.cables.size()):
68707  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
68708  */
68709  __pyx_t_1 = (__pyx_v_tangents == Py_None);
68710  __pyx_t_7 = (__pyx_t_1 != 0);
68711  if (__pyx_t_7) {
68712 
68713  /* "mbd/CouplingFSI.pyx":3068
68714  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
68715  * if tangents is None:
68716  * for i in range(self.thisptr.cables.size()): # <<<<<<<<<<<<<<
68717  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
68718  * L0 = deref(self.thisptr.cables[i]).L0
68719  */
68720  __pyx_t_2 = __pyx_v_self->thisptr->cables.size();
68721  __pyx_t_3 = __pyx_t_2;
68722  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
68723  __pyx_v_i = __pyx_t_4;
68724 
68725  /* "mbd/CouplingFSI.pyx":3069
68726  * if tangents is None:
68727  * for i in range(self.thisptr.cables.size()):
68728  * deref(self.thisptr.cables[i]).mvecs_tangents.clear() # <<<<<<<<<<<<<<
68729  * L0 = deref(self.thisptr.cables[i]).L0
68730  * L = deref(self.thisptr.cables[i]).length
68731  */
68732  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs_tangents.clear();
68733 
68734  /* "mbd/CouplingFSI.pyx":3070
68735  * for i in range(self.thisptr.cables.size()):
68736  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
68737  * L0 = deref(self.thisptr.cables[i]).L0 # <<<<<<<<<<<<<<
68738  * L = deref(self.thisptr.cables[i]).length
68739  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68740  */
68741  __pyx_t_5 = (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).L0;
68742  __pyx_v_L0 = __pyx_t_5;
68743 
68744  /* "mbd/CouplingFSI.pyx":3071
68745  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
68746  * L0 = deref(self.thisptr.cables[i]).L0
68747  * L = deref(self.thisptr.cables[i]).length # <<<<<<<<<<<<<<
68748  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68749  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler":
68750  */
68751  __pyx_t_5 = (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).length;
68752  __pyx_v_L = __pyx_t_5;
68753 
68754  /* "mbd/CouplingFSI.pyx":3072
68755  * L0 = deref(self.thisptr.cables[i]).L0
68756  * L = deref(self.thisptr.cables[i]).length
68757  * nb_elems = deref(self.thisptr.cables[i]).nb_elems # <<<<<<<<<<<<<<
68758  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler":
68759  * nb_nodes = nb_elems+1
68760  */
68761  __pyx_t_9 = __Pyx_PyInt_From_int((*(__pyx_v_self->thisptr->cables[__pyx_v_i])).nb_elems); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3072, __pyx_L1_error)
68762  __Pyx_GOTREF(__pyx_t_9);
68763  __Pyx_XDECREF_SET(__pyx_v_nb_elems, __pyx_t_9);
68764  __pyx_t_9 = 0;
68765 
68766  /* "mbd/CouplingFSI.pyx":3073
68767  * L = deref(self.thisptr.cables[i]).length
68768  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68769  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
68770  * nb_nodes = nb_elems+1
68771  * else:
68772  */
68773  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"CableANCF")) != 0);
68774  if (!__pyx_t_1) {
68775  } else {
68776  __pyx_t_7 = __pyx_t_1;
68777  goto __pyx_L23_bool_binop_done;
68778  }
68779  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
68780  __pyx_t_7 = __pyx_t_1;
68781  __pyx_L23_bool_binop_done:;
68782  if (__pyx_t_7) {
68783 
68784  /* "mbd/CouplingFSI.pyx":3074
68785  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68786  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler":
68787  * nb_nodes = nb_elems+1 # <<<<<<<<<<<<<<
68788  * else:
68789  * print("set element type")
68790  */
68791  __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_v_nb_elems, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3074, __pyx_L1_error)
68792  __Pyx_GOTREF(__pyx_t_9);
68793  __Pyx_XDECREF_SET(__pyx_v_nb_nodes, __pyx_t_9);
68794  __pyx_t_9 = 0;
68795 
68796  /* "mbd/CouplingFSI.pyx":3073
68797  * L = deref(self.thisptr.cables[i]).length
68798  * nb_elems = deref(self.thisptr.cables[i]).nb_elems
68799  * if self.beam_type == "CableANCF" or self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
68800  * nb_nodes = nb_elems+1
68801  * else:
68802  */
68803  goto __pyx_L22;
68804  }
68805 
68806  /* "mbd/CouplingFSI.pyx":3076
68807  * nb_nodes = nb_elems+1
68808  * else:
68809  * print("set element type") # <<<<<<<<<<<<<<
68810  * sys.exit()
68811  * ds = L/(nb_nodes-1)
68812  */
68813  /*else*/ {
68814  if (__Pyx_PrintOne(0, __pyx_kp_s_set_element_type) < 0) __PYX_ERR(0, 3076, __pyx_L1_error)
68815 
68816  /* "mbd/CouplingFSI.pyx":3077
68817  * else:
68818  * print("set element type")
68819  * sys.exit() # <<<<<<<<<<<<<<
68820  * ds = L/(nb_nodes-1)
68821  * for j in range(nb_nodes):
68822  */
68823  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3077, __pyx_L1_error)
68824  __Pyx_GOTREF(__pyx_t_8);
68825  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_exit_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3077, __pyx_L1_error)
68826  __Pyx_GOTREF(__pyx_t_12);
68827  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68828  __pyx_t_8 = NULL;
68829  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
68830  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_12);
68831  if (likely(__pyx_t_8)) {
68832  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
68833  __Pyx_INCREF(__pyx_t_8);
68834  __Pyx_INCREF(function);
68835  __Pyx_DECREF_SET(__pyx_t_12, function);
68836  }
68837  }
68838  __pyx_t_9 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_12);
68839  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
68840  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3077, __pyx_L1_error)
68841  __Pyx_GOTREF(__pyx_t_9);
68842  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
68843  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68844  }
68845  __pyx_L22:;
68846 
68847  /* "mbd/CouplingFSI.pyx":3078
68848  * print("set element type")
68849  * sys.exit()
68850  * ds = L/(nb_nodes-1) # <<<<<<<<<<<<<<
68851  * for j in range(nb_nodes):
68852  * x, y, z = self.nodes_function_tangent(L0+ds*j)
68853  */
68854  __pyx_t_9 = PyFloat_FromDouble(__pyx_v_L); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3078, __pyx_L1_error)
68855  __Pyx_GOTREF(__pyx_t_9);
68856  if (unlikely(!__pyx_v_nb_nodes)) { __Pyx_RaiseUnboundLocalError("nb_nodes"); __PYX_ERR(0, 3078, __pyx_L1_error) }
68857  __pyx_t_12 = __Pyx_PyInt_SubtractObjC(__pyx_v_nb_nodes, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3078, __pyx_L1_error)
68858  __Pyx_GOTREF(__pyx_t_12);
68859  __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_9, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3078, __pyx_L1_error)
68860  __Pyx_GOTREF(__pyx_t_8);
68861  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68862  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
68863  __Pyx_XDECREF_SET(__pyx_v_ds, __pyx_t_8);
68864  __pyx_t_8 = 0;
68865 
68866  /* "mbd/CouplingFSI.pyx":3079
68867  * sys.exit()
68868  * ds = L/(nb_nodes-1)
68869  * for j in range(nb_nodes): # <<<<<<<<<<<<<<
68870  * x, y, z = self.nodes_function_tangent(L0+ds*j)
68871  * vec = ch.ChVector[double](x, y, z)
68872  */
68873  if (unlikely(!__pyx_v_nb_nodes)) { __Pyx_RaiseUnboundLocalError("nb_nodes"); __PYX_ERR(0, 3079, __pyx_L1_error) }
68874  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_nb_nodes); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3079, __pyx_L1_error)
68875  __Pyx_GOTREF(__pyx_t_8);
68876  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
68877  __pyx_t_12 = __pyx_t_8; __Pyx_INCREF(__pyx_t_12); __pyx_t_10 = 0;
68878  __pyx_t_11 = NULL;
68879  } else {
68880  __pyx_t_10 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3079, __pyx_L1_error)
68881  __Pyx_GOTREF(__pyx_t_12);
68882  __pyx_t_11 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3079, __pyx_L1_error)
68883  }
68884  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68885  for (;;) {
68886  if (likely(!__pyx_t_11)) {
68887  if (likely(PyList_CheckExact(__pyx_t_12))) {
68888  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_12)) break;
68889  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68890  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3079, __pyx_L1_error)
68891  #else
68892  __pyx_t_8 = PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3079, __pyx_L1_error)
68893  __Pyx_GOTREF(__pyx_t_8);
68894  #endif
68895  } else {
68896  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
68897  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68898  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3079, __pyx_L1_error)
68899  #else
68900  __pyx_t_8 = PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3079, __pyx_L1_error)
68901  __Pyx_GOTREF(__pyx_t_8);
68902  #endif
68903  }
68904  } else {
68905  __pyx_t_8 = __pyx_t_11(__pyx_t_12);
68906  if (unlikely(!__pyx_t_8)) {
68907  PyObject* exc_type = PyErr_Occurred();
68908  if (exc_type) {
68909  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
68910  else __PYX_ERR(0, 3079, __pyx_L1_error)
68911  }
68912  break;
68913  }
68914  __Pyx_GOTREF(__pyx_t_8);
68915  }
68916  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_8);
68917  __pyx_t_8 = 0;
68918 
68919  /* "mbd/CouplingFSI.pyx":3080
68920  * ds = L/(nb_nodes-1)
68921  * for j in range(nb_nodes):
68922  * x, y, z = self.nodes_function_tangent(L0+ds*j) # <<<<<<<<<<<<<<
68923  * vec = ch.ChVector[double](x, y, z)
68924  * deref(self.thisptr.cables[i]).mvecs_tangents.push_back(vec)
68925  */
68926  __pyx_t_9 = PyFloat_FromDouble(__pyx_v_L0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3080, __pyx_L1_error)
68927  __Pyx_GOTREF(__pyx_t_9);
68928  __pyx_t_13 = PyNumber_Multiply(__pyx_v_ds, __pyx_v_j); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3080, __pyx_L1_error)
68929  __Pyx_GOTREF(__pyx_t_13);
68930  __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_t_13); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3080, __pyx_L1_error)
68931  __Pyx_GOTREF(__pyx_t_6);
68932  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
68933  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
68934  __Pyx_INCREF(__pyx_v_self->nodes_function_tangent);
68935  __pyx_t_13 = __pyx_v_self->nodes_function_tangent; __pyx_t_9 = NULL;
68936  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) {
68937  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_13);
68938  if (likely(__pyx_t_9)) {
68939  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
68940  __Pyx_INCREF(__pyx_t_9);
68941  __Pyx_INCREF(function);
68942  __Pyx_DECREF_SET(__pyx_t_13, function);
68943  }
68944  }
68945  __pyx_t_8 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_13, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_6);
68946  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
68947  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
68948  if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3080, __pyx_L1_error)
68949  __Pyx_GOTREF(__pyx_t_8);
68950  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
68951  if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
68952  PyObject* sequence = __pyx_t_8;
68953  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
68954  if (unlikely(size != 3)) {
68955  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
68956  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
68957  __PYX_ERR(0, 3080, __pyx_L1_error)
68958  }
68959  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
68960  if (likely(PyTuple_CheckExact(sequence))) {
68961  __pyx_t_13 = PyTuple_GET_ITEM(sequence, 0);
68962  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
68963  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 2);
68964  } else {
68965  __pyx_t_13 = PyList_GET_ITEM(sequence, 0);
68966  __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
68967  __pyx_t_9 = PyList_GET_ITEM(sequence, 2);
68968  }
68969  __Pyx_INCREF(__pyx_t_13);
68970  __Pyx_INCREF(__pyx_t_6);
68971  __Pyx_INCREF(__pyx_t_9);
68972  #else
68973  __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3080, __pyx_L1_error)
68974  __Pyx_GOTREF(__pyx_t_13);
68975  __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3080, __pyx_L1_error)
68976  __Pyx_GOTREF(__pyx_t_6);
68977  __pyx_t_9 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3080, __pyx_L1_error)
68978  __Pyx_GOTREF(__pyx_t_9);
68979  #endif
68980  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68981  } else {
68982  Py_ssize_t index = -1;
68983  __pyx_t_14 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3080, __pyx_L1_error)
68984  __Pyx_GOTREF(__pyx_t_14);
68985  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
68986  __pyx_t_15 = Py_TYPE(__pyx_t_14)->tp_iternext;
68987  index = 0; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L27_unpacking_failed;
68988  __Pyx_GOTREF(__pyx_t_13);
68989  index = 1; __pyx_t_6 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L27_unpacking_failed;
68990  __Pyx_GOTREF(__pyx_t_6);
68991  index = 2; __pyx_t_9 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_9)) goto __pyx_L27_unpacking_failed;
68992  __Pyx_GOTREF(__pyx_t_9);
68993  if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 3) < 0) __PYX_ERR(0, 3080, __pyx_L1_error)
68994  __pyx_t_15 = NULL;
68995  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
68996  goto __pyx_L28_unpacking_done;
68997  __pyx_L27_unpacking_failed:;
68998  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
68999  __pyx_t_15 = NULL;
69000  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
69001  __PYX_ERR(0, 3080, __pyx_L1_error)
69002  __pyx_L28_unpacking_done:;
69003  }
69004  __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_13);
69005  __pyx_t_13 = 0;
69006  __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_6);
69007  __pyx_t_6 = 0;
69008  __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_9);
69009  __pyx_t_9 = 0;
69010 
69011  /* "mbd/CouplingFSI.pyx":3081
69012  * for j in range(nb_nodes):
69013  * x, y, z = self.nodes_function_tangent(L0+ds*j)
69014  * vec = ch.ChVector[double](x, y, z) # <<<<<<<<<<<<<<
69015  * deref(self.thisptr.cables[i]).mvecs_tangents.push_back(vec)
69016  * else:
69017  */
69018  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3081, __pyx_L1_error)
69019  __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_v_y); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3081, __pyx_L1_error)
69020  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_z); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3081, __pyx_L1_error)
69021  __pyx_v_vec = ChVector<double> (__pyx_t_5, __pyx_t_16, __pyx_t_17);
69022 
69023  /* "mbd/CouplingFSI.pyx":3082
69024  * x, y, z = self.nodes_function_tangent(L0+ds*j)
69025  * vec = ch.ChVector[double](x, y, z)
69026  * deref(self.thisptr.cables[i]).mvecs_tangents.push_back(vec) # <<<<<<<<<<<<<<
69027  * else:
69028  * for i in range(self.thisptr.cables.size()):
69029  */
69030  try {
69031  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs_tangents.push_back(((ChVector<double> &)__pyx_v_vec));
69032  } catch(...) {
69033  __Pyx_CppExn2PyErr();
69034  __PYX_ERR(0, 3082, __pyx_L1_error)
69035  }
69036 
69037  /* "mbd/CouplingFSI.pyx":3079
69038  * sys.exit()
69039  * ds = L/(nb_nodes-1)
69040  * for j in range(nb_nodes): # <<<<<<<<<<<<<<
69041  * x, y, z = self.nodes_function_tangent(L0+ds*j)
69042  * vec = ch.ChVector[double](x, y, z)
69043  */
69044  }
69045  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
69046  }
69047 
69048  /* "mbd/CouplingFSI.pyx":3067
69049  * vec = ch.ChVector[double](x, y, z)
69050  * deref(self.thisptr.cables[i]).mvecs.push_back(vec)
69051  * if tangents is None: # <<<<<<<<<<<<<<
69052  * for i in range(self.thisptr.cables.size()):
69053  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
69054  */
69055  goto __pyx_L19;
69056  }
69057 
69058  /* "mbd/CouplingFSI.pyx":3084
69059  * deref(self.thisptr.cables[i]).mvecs_tangents.push_back(vec)
69060  * else:
69061  * for i in range(self.thisptr.cables.size()): # <<<<<<<<<<<<<<
69062  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
69063  * nb_nodes = len(tangents[i])
69064  */
69065  /*else*/ {
69066  __pyx_t_2 = __pyx_v_self->thisptr->cables.size();
69067  __pyx_t_3 = __pyx_t_2;
69068  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
69069  __pyx_v_i = __pyx_t_4;
69070 
69071  /* "mbd/CouplingFSI.pyx":3085
69072  * else:
69073  * for i in range(self.thisptr.cables.size()):
69074  * deref(self.thisptr.cables[i]).mvecs_tangents.clear() # <<<<<<<<<<<<<<
69075  * nb_nodes = len(tangents[i])
69076  * for j in range(len(tangents[i])):
69077  */
69078  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs_tangents.clear();
69079 
69080  /* "mbd/CouplingFSI.pyx":3086
69081  * for i in range(self.thisptr.cables.size()):
69082  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
69083  * nb_nodes = len(tangents[i]) # <<<<<<<<<<<<<<
69084  * for j in range(len(tangents[i])):
69085  * x, y, z = tangents[i][j]
69086  */
69087  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_tangents, __pyx_v_i, std::vector<std::shared_ptr<cppCable> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3086, __pyx_L1_error)
69088  __Pyx_GOTREF(__pyx_t_12);
69089  __pyx_t_10 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3086, __pyx_L1_error)
69090  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
69091  __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3086, __pyx_L1_error)
69092  __Pyx_GOTREF(__pyx_t_12);
69093  __Pyx_XDECREF_SET(__pyx_v_nb_nodes, __pyx_t_12);
69094  __pyx_t_12 = 0;
69095 
69096  /* "mbd/CouplingFSI.pyx":3087
69097  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
69098  * nb_nodes = len(tangents[i])
69099  * for j in range(len(tangents[i])): # <<<<<<<<<<<<<<
69100  * x, y, z = tangents[i][j]
69101  * vec = ch.ChVector[double](x, y, z)
69102  */
69103  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_tangents, __pyx_v_i, std::vector<std::shared_ptr<cppCable> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3087, __pyx_L1_error)
69104  __Pyx_GOTREF(__pyx_t_12);
69105  __pyx_t_10 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3087, __pyx_L1_error)
69106  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
69107  __pyx_t_12 = PyInt_FromSsize_t(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3087, __pyx_L1_error)
69108  __Pyx_GOTREF(__pyx_t_12);
69109  __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3087, __pyx_L1_error)
69110  __Pyx_GOTREF(__pyx_t_8);
69111  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
69112  if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
69113  __pyx_t_12 = __pyx_t_8; __Pyx_INCREF(__pyx_t_12); __pyx_t_10 = 0;
69114  __pyx_t_11 = NULL;
69115  } else {
69116  __pyx_t_10 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3087, __pyx_L1_error)
69117  __Pyx_GOTREF(__pyx_t_12);
69118  __pyx_t_11 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3087, __pyx_L1_error)
69119  }
69120  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
69121  for (;;) {
69122  if (likely(!__pyx_t_11)) {
69123  if (likely(PyList_CheckExact(__pyx_t_12))) {
69124  if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_12)) break;
69125  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
69126  __pyx_t_8 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3087, __pyx_L1_error)
69127  #else
69128  __pyx_t_8 = PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3087, __pyx_L1_error)
69129  __Pyx_GOTREF(__pyx_t_8);
69130  #endif
69131  } else {
69132  if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
69133  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
69134  __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 3087, __pyx_L1_error)
69135  #else
69136  __pyx_t_8 = PySequence_ITEM(__pyx_t_12, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3087, __pyx_L1_error)
69137  __Pyx_GOTREF(__pyx_t_8);
69138  #endif
69139  }
69140  } else {
69141  __pyx_t_8 = __pyx_t_11(__pyx_t_12);
69142  if (unlikely(!__pyx_t_8)) {
69143  PyObject* exc_type = PyErr_Occurred();
69144  if (exc_type) {
69145  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
69146  else __PYX_ERR(0, 3087, __pyx_L1_error)
69147  }
69148  break;
69149  }
69150  __Pyx_GOTREF(__pyx_t_8);
69151  }
69152  __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_8);
69153  __pyx_t_8 = 0;
69154 
69155  /* "mbd/CouplingFSI.pyx":3088
69156  * nb_nodes = len(tangents[i])
69157  * for j in range(len(tangents[i])):
69158  * x, y, z = tangents[i][j] # <<<<<<<<<<<<<<
69159  * vec = ch.ChVector[double](x, y, z)
69160  * deref(self.thisptr.cables[i]).mvecs_tangents.push_back(vec)
69161  */
69162  __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_tangents, __pyx_v_i, std::vector<std::shared_ptr<cppCable> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3088, __pyx_L1_error)
69163  __Pyx_GOTREF(__pyx_t_8);
69164  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_j); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3088, __pyx_L1_error)
69165  __Pyx_GOTREF(__pyx_t_9);
69166  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
69167  if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
69168  PyObject* sequence = __pyx_t_9;
69169  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
69170  if (unlikely(size != 3)) {
69171  if (size > 3) __Pyx_RaiseTooManyValuesError(3);
69172  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
69173  __PYX_ERR(0, 3088, __pyx_L1_error)
69174  }
69175  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
69176  if (likely(PyTuple_CheckExact(sequence))) {
69177  __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
69178  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
69179  __pyx_t_13 = PyTuple_GET_ITEM(sequence, 2);
69180  } else {
69181  __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
69182  __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
69183  __pyx_t_13 = PyList_GET_ITEM(sequence, 2);
69184  }
69185  __Pyx_INCREF(__pyx_t_8);
69186  __Pyx_INCREF(__pyx_t_6);
69187  __Pyx_INCREF(__pyx_t_13);
69188  #else
69189  __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3088, __pyx_L1_error)
69190  __Pyx_GOTREF(__pyx_t_8);
69191  __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3088, __pyx_L1_error)
69192  __Pyx_GOTREF(__pyx_t_6);
69193  __pyx_t_13 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3088, __pyx_L1_error)
69194  __Pyx_GOTREF(__pyx_t_13);
69195  #endif
69196  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
69197  } else {
69198  Py_ssize_t index = -1;
69199  __pyx_t_14 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3088, __pyx_L1_error)
69200  __Pyx_GOTREF(__pyx_t_14);
69201  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
69202  __pyx_t_15 = Py_TYPE(__pyx_t_14)->tp_iternext;
69203  index = 0; __pyx_t_8 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_8)) goto __pyx_L33_unpacking_failed;
69204  __Pyx_GOTREF(__pyx_t_8);
69205  index = 1; __pyx_t_6 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_6)) goto __pyx_L33_unpacking_failed;
69206  __Pyx_GOTREF(__pyx_t_6);
69207  index = 2; __pyx_t_13 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_13)) goto __pyx_L33_unpacking_failed;
69208  __Pyx_GOTREF(__pyx_t_13);
69209  if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 3) < 0) __PYX_ERR(0, 3088, __pyx_L1_error)
69210  __pyx_t_15 = NULL;
69211  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
69212  goto __pyx_L34_unpacking_done;
69213  __pyx_L33_unpacking_failed:;
69214  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
69215  __pyx_t_15 = NULL;
69216  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
69217  __PYX_ERR(0, 3088, __pyx_L1_error)
69218  __pyx_L34_unpacking_done:;
69219  }
69220  __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_8);
69221  __pyx_t_8 = 0;
69222  __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_6);
69223  __pyx_t_6 = 0;
69224  __Pyx_XDECREF_SET(__pyx_v_z, __pyx_t_13);
69225  __pyx_t_13 = 0;
69226 
69227  /* "mbd/CouplingFSI.pyx":3089
69228  * for j in range(len(tangents[i])):
69229  * x, y, z = tangents[i][j]
69230  * vec = ch.ChVector[double](x, y, z) # <<<<<<<<<<<<<<
69231  * deref(self.thisptr.cables[i]).mvecs_tangents.push_back(vec)
69232  * # self.buildNodes()
69233  */
69234  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_v_x); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3089, __pyx_L1_error)
69235  __pyx_t_16 = __pyx_PyFloat_AsDouble(__pyx_v_y); if (unlikely((__pyx_t_16 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3089, __pyx_L1_error)
69236  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_z); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3089, __pyx_L1_error)
69237  __pyx_v_vec = ChVector<double> (__pyx_t_17, __pyx_t_16, __pyx_t_5);
69238 
69239  /* "mbd/CouplingFSI.pyx":3090
69240  * x, y, z = tangents[i][j]
69241  * vec = ch.ChVector[double](x, y, z)
69242  * deref(self.thisptr.cables[i]).mvecs_tangents.push_back(vec) # <<<<<<<<<<<<<<
69243  * # self.buildNodes()
69244  *
69245  */
69246  try {
69247  (*(__pyx_v_self->thisptr->cables[__pyx_v_i])).mvecs_tangents.push_back(((ChVector<double> &)__pyx_v_vec));
69248  } catch(...) {
69249  __Pyx_CppExn2PyErr();
69250  __PYX_ERR(0, 3090, __pyx_L1_error)
69251  }
69252 
69253  /* "mbd/CouplingFSI.pyx":3087
69254  * deref(self.thisptr.cables[i]).mvecs_tangents.clear()
69255  * nb_nodes = len(tangents[i])
69256  * for j in range(len(tangents[i])): # <<<<<<<<<<<<<<
69257  * x, y, z = tangents[i][j]
69258  * vec = ch.ChVector[double](x, y, z)
69259  */
69260  }
69261  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
69262  }
69263  }
69264  __pyx_L19:;
69265 
69266  /* "mbd/CouplingFSI.pyx":3035
69267  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec)
69268  *
69269  * def setNodesPosition(self, double[:,:,:] positions=None, tangents=None): # <<<<<<<<<<<<<<
69270  * """Builds the nodes of the cable.
69271  *
69272  */
69273 
69274  /* function exit code */
69275  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
69276  goto __pyx_L0;
69277  __pyx_L1_error:;
69278  __Pyx_XDECREF(__pyx_t_6);
69279  __Pyx_XDECREF(__pyx_t_8);
69280  __Pyx_XDECREF(__pyx_t_9);
69281  __Pyx_XDECREF(__pyx_t_12);
69282  __Pyx_XDECREF(__pyx_t_13);
69283  __Pyx_XDECREF(__pyx_t_14);
69284  __PYX_XDEC_MEMVIEW(&__pyx_t_18, 1);
69285  __PYX_XDEC_MEMVIEW(&__pyx_t_21, 1);
69286  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setNodesPosition", __pyx_clineno, __pyx_lineno, __pyx_filename);
69287  __pyx_r = NULL;
69288  __pyx_L0:;
69289  __Pyx_XDECREF(__pyx_v_nb_elems);
69290  __Pyx_XDECREF(__pyx_v_nb_nodes);
69291  __Pyx_XDECREF(__pyx_v_ds);
69292  __Pyx_XDECREF(__pyx_v_j);
69293  __Pyx_XDECREF(__pyx_v_x);
69294  __Pyx_XDECREF(__pyx_v_y);
69295  __Pyx_XDECREF(__pyx_v_z);
69296  __PYX_XDEC_MEMVIEW(&__pyx_v_positions, 1);
69297  __Pyx_XGIVEREF(__pyx_r);
69298  __Pyx_TraceReturn(__pyx_r, 0);
69299  __Pyx_RefNannyFinishContext();
69300  return __pyx_r;
69301 }
69302 
69303 /* "mbd/CouplingFSI.pyx":3093
69304  * # self.buildNodes()
69305  *
69306  * def buildNodes(self): # <<<<<<<<<<<<<<
69307  * # build nodes
69308  * self.thisptr.buildNodes()
69309  */
69310 
69311 /* Python wrapper */
69312 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_53buildNodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
69313 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_52buildNodes[] = "ProtChMoorings.buildNodes(self)";
69314 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_53buildNodes = {"buildNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_53buildNodes, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_52buildNodes};
69315 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_53buildNodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
69316  PyObject *__pyx_r = 0;
69317  __Pyx_RefNannyDeclarations
69318  __Pyx_RefNannySetupContext("buildNodes (wrapper)", 0);
69319  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_52buildNodes(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
69320 
69321  /* function exit code */
69322  __Pyx_RefNannyFinishContext();
69323  return __pyx_r;
69324 }
69325 
69326 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_52buildNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
69327  SwigPyObject *__pyx_v_swig_obj;
69328  int __pyx_v_nodeN;
69329  PyObject *__pyx_v_node = NULL;
69330  int __pyx_v_elemN;
69331  PyObject *__pyx_v_elem = NULL;
69332  PyObject *__pyx_r = NULL;
69333  __Pyx_TraceDeclarations
69334  __Pyx_RefNannyDeclarations
69335  PyObject *__pyx_t_1 = NULL;
69336  int __pyx_t_2;
69337  int __pyx_t_3;
69338  int __pyx_t_4;
69339  int __pyx_t_5;
69340  PyObject *__pyx_t_6 = NULL;
69341  PyObject *__pyx_t_7 = NULL;
69342  __Pyx_FakeReference<std::shared_ptr<ChNodeFEAxyzrot> > __pyx_t_8;
69343  __Pyx_FakeReference<std::shared_ptr<ChNodeFEAxyzD> > __pyx_t_9;
69344  __Pyx_FakeReference<std::shared_ptr<ChElementCableANCF> > __pyx_t_10;
69345  __Pyx_FakeReference<std::shared_ptr<ChElementCableANCF> > __pyx_t_11;
69346  int __pyx_lineno = 0;
69347  const char *__pyx_filename = NULL;
69348  int __pyx_clineno = 0;
69349  __Pyx_TraceFrameInit(__pyx_codeobj__180)
69350  __Pyx_RefNannySetupContext("buildNodes", 0);
69351  __Pyx_TraceCall("buildNodes", __pyx_f[0], 3093, 0, __PYX_ERR(0, 3093, __pyx_L1_error));
69352 
69353  /* "mbd/CouplingFSI.pyx":3095
69354  * def buildNodes(self):
69355  * # build nodes
69356  * self.thisptr.buildNodes() # <<<<<<<<<<<<<<
69357  * # get pointers to access nodes in python
69358  * cdef SwigPyObject *swig_obj
69359  */
69360  __pyx_v_self->thisptr->buildNodes();
69361 
69362  /* "mbd/CouplingFSI.pyx":3099
69363  * cdef SwigPyObject *swig_obj
69364  * cdef int nodeN
69365  * self.nodes = [] # <<<<<<<<<<<<<<
69366  * for nodeN in range(self.thisptr.nb_nodes_tot):
69367  * if self.beam_type == "BeamEuler":
69368  */
69369  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3099, __pyx_L1_error)
69370  __Pyx_GOTREF(__pyx_t_1);
69371  __Pyx_GIVEREF(__pyx_t_1);
69372  __Pyx_GOTREF(__pyx_v_self->nodes);
69373  __Pyx_DECREF(__pyx_v_self->nodes);
69374  __pyx_v_self->nodes = __pyx_t_1;
69375  __pyx_t_1 = 0;
69376 
69377  /* "mbd/CouplingFSI.pyx":3100
69378  * cdef int nodeN
69379  * self.nodes = []
69380  * for nodeN in range(self.thisptr.nb_nodes_tot): # <<<<<<<<<<<<<<
69381  * if self.beam_type == "BeamEuler":
69382  * node = chrono_fea.ChNodeFEAxyzrot()
69383  */
69384  __pyx_t_2 = __pyx_v_self->thisptr->nb_nodes_tot;
69385  __pyx_t_3 = __pyx_t_2;
69386  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
69387  __pyx_v_nodeN = __pyx_t_4;
69388 
69389  /* "mbd/CouplingFSI.pyx":3101
69390  * self.nodes = []
69391  * for nodeN in range(self.thisptr.nb_nodes_tot):
69392  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69393  * node = chrono_fea.ChNodeFEAxyzrot()
69394  * elif self.beam_type == "CableANCF":
69395  */
69396  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
69397  if (__pyx_t_5) {
69398 
69399  /* "mbd/CouplingFSI.pyx":3102
69400  * for nodeN in range(self.thisptr.nb_nodes_tot):
69401  * if self.beam_type == "BeamEuler":
69402  * node = chrono_fea.ChNodeFEAxyzrot() # <<<<<<<<<<<<<<
69403  * elif self.beam_type == "CableANCF":
69404  * node = chrono_fea.ChNodeFEAxyzD()
69405  */
69406  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_chrono_fea); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3102, __pyx_L1_error)
69407  __Pyx_GOTREF(__pyx_t_6);
69408  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ChNodeFEAxyzrot); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3102, __pyx_L1_error)
69409  __Pyx_GOTREF(__pyx_t_7);
69410  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
69411  __pyx_t_6 = NULL;
69412  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
69413  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
69414  if (likely(__pyx_t_6)) {
69415  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
69416  __Pyx_INCREF(__pyx_t_6);
69417  __Pyx_INCREF(function);
69418  __Pyx_DECREF_SET(__pyx_t_7, function);
69419  }
69420  }
69421  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
69422  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
69423  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3102, __pyx_L1_error)
69424  __Pyx_GOTREF(__pyx_t_1);
69425  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69426  __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_1);
69427  __pyx_t_1 = 0;
69428 
69429  /* "mbd/CouplingFSI.pyx":3101
69430  * self.nodes = []
69431  * for nodeN in range(self.thisptr.nb_nodes_tot):
69432  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69433  * node = chrono_fea.ChNodeFEAxyzrot()
69434  * elif self.beam_type == "CableANCF":
69435  */
69436  goto __pyx_L5;
69437  }
69438 
69439  /* "mbd/CouplingFSI.pyx":3103
69440  * if self.beam_type == "BeamEuler":
69441  * node = chrono_fea.ChNodeFEAxyzrot()
69442  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69443  * node = chrono_fea.ChNodeFEAxyzD()
69444  * node.this.disown()
69445  */
69446  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"CableANCF")) != 0);
69447  if (__pyx_t_5) {
69448 
69449  /* "mbd/CouplingFSI.pyx":3104
69450  * node = chrono_fea.ChNodeFEAxyzrot()
69451  * elif self.beam_type == "CableANCF":
69452  * node = chrono_fea.ChNodeFEAxyzD() # <<<<<<<<<<<<<<
69453  * node.this.disown()
69454  * swig_obj = <SwigPyObject*> node.this
69455  */
69456  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_chrono_fea); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3104, __pyx_L1_error)
69457  __Pyx_GOTREF(__pyx_t_7);
69458  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_ChNodeFEAxyzD); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3104, __pyx_L1_error)
69459  __Pyx_GOTREF(__pyx_t_6);
69460  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69461  __pyx_t_7 = NULL;
69462  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
69463  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
69464  if (likely(__pyx_t_7)) {
69465  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
69466  __Pyx_INCREF(__pyx_t_7);
69467  __Pyx_INCREF(function);
69468  __Pyx_DECREF_SET(__pyx_t_6, function);
69469  }
69470  }
69471  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
69472  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
69473  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3104, __pyx_L1_error)
69474  __Pyx_GOTREF(__pyx_t_1);
69475  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
69476  __Pyx_XDECREF_SET(__pyx_v_node, __pyx_t_1);
69477  __pyx_t_1 = 0;
69478 
69479  /* "mbd/CouplingFSI.pyx":3103
69480  * if self.beam_type == "BeamEuler":
69481  * node = chrono_fea.ChNodeFEAxyzrot()
69482  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69483  * node = chrono_fea.ChNodeFEAxyzD()
69484  * node.this.disown()
69485  */
69486  }
69487  __pyx_L5:;
69488 
69489  /* "mbd/CouplingFSI.pyx":3105
69490  * elif self.beam_type == "CableANCF":
69491  * node = chrono_fea.ChNodeFEAxyzD()
69492  * node.this.disown() # <<<<<<<<<<<<<<
69493  * swig_obj = <SwigPyObject*> node.this
69494  * if self.beam_type == "BeamEuler":
69495  */
69496  if (unlikely(!__pyx_v_node)) { __Pyx_RaiseUnboundLocalError("node"); __PYX_ERR(0, 3105, __pyx_L1_error) }
69497  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_this); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3105, __pyx_L1_error)
69498  __Pyx_GOTREF(__pyx_t_6);
69499  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_disown); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3105, __pyx_L1_error)
69500  __Pyx_GOTREF(__pyx_t_7);
69501  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
69502  __pyx_t_6 = NULL;
69503  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
69504  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
69505  if (likely(__pyx_t_6)) {
69506  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
69507  __Pyx_INCREF(__pyx_t_6);
69508  __Pyx_INCREF(function);
69509  __Pyx_DECREF_SET(__pyx_t_7, function);
69510  }
69511  }
69512  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
69513  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
69514  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3105, __pyx_L1_error)
69515  __Pyx_GOTREF(__pyx_t_1);
69516  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69517  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
69518 
69519  /* "mbd/CouplingFSI.pyx":3106
69520  * node = chrono_fea.ChNodeFEAxyzD()
69521  * node.this.disown()
69522  * swig_obj = <SwigPyObject*> node.this # <<<<<<<<<<<<<<
69523  * if self.beam_type == "BeamEuler":
69524  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzrot]*> &self.thisptr.nodesRot.at(nodeN)
69525  */
69526  if (unlikely(!__pyx_v_node)) { __Pyx_RaiseUnboundLocalError("node"); __PYX_ERR(0, 3106, __pyx_L1_error) }
69527  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_this); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3106, __pyx_L1_error)
69528  __Pyx_GOTREF(__pyx_t_1);
69529  __pyx_v_swig_obj = ((SwigPyObject *)__pyx_t_1);
69530  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
69531 
69532  /* "mbd/CouplingFSI.pyx":3107
69533  * node.this.disown()
69534  * swig_obj = <SwigPyObject*> node.this
69535  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69536  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzrot]*> &self.thisptr.nodesRot.at(nodeN)
69537  * elif self.beam_type == "CableANCF":
69538  */
69539  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
69540  if (__pyx_t_5) {
69541 
69542  /* "mbd/CouplingFSI.pyx":3108
69543  * swig_obj = <SwigPyObject*> node.this
69544  * if self.beam_type == "BeamEuler":
69545  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzrot]*> &self.thisptr.nodesRot.at(nodeN) # <<<<<<<<<<<<<<
69546  * elif self.beam_type == "CableANCF":
69547  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzD]*> &self.thisptr.nodes.at(nodeN)
69548  */
69549  try {
69550  __pyx_t_8 = __pyx_v_self->thisptr->nodesRot.at(__pyx_v_nodeN);
69551  } catch(...) {
69552  __Pyx_CppExn2PyErr();
69553  __PYX_ERR(0, 3108, __pyx_L1_error)
69554  }
69555  __pyx_v_swig_obj->ptr = ((std::shared_ptr<ChNodeFEAxyzrot> *)(&__pyx_t_8));
69556 
69557  /* "mbd/CouplingFSI.pyx":3107
69558  * node.this.disown()
69559  * swig_obj = <SwigPyObject*> node.this
69560  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69561  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzrot]*> &self.thisptr.nodesRot.at(nodeN)
69562  * elif self.beam_type == "CableANCF":
69563  */
69564  goto __pyx_L6;
69565  }
69566 
69567  /* "mbd/CouplingFSI.pyx":3109
69568  * if self.beam_type == "BeamEuler":
69569  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzrot]*> &self.thisptr.nodesRot.at(nodeN)
69570  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69571  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzD]*> &self.thisptr.nodes.at(nodeN)
69572  * self.nodes += [node]
69573  */
69574  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"CableANCF")) != 0);
69575  if (__pyx_t_5) {
69576 
69577  /* "mbd/CouplingFSI.pyx":3110
69578  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzrot]*> &self.thisptr.nodesRot.at(nodeN)
69579  * elif self.beam_type == "CableANCF":
69580  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzD]*> &self.thisptr.nodes.at(nodeN) # <<<<<<<<<<<<<<
69581  * self.nodes += [node]
69582  * self.nodes_built = True
69583  */
69584  try {
69585  __pyx_t_9 = __pyx_v_self->thisptr->nodes.at(__pyx_v_nodeN);
69586  } catch(...) {
69587  __Pyx_CppExn2PyErr();
69588  __PYX_ERR(0, 3110, __pyx_L1_error)
69589  }
69590  __pyx_v_swig_obj->ptr = ((std::shared_ptr<ChNodeFEAxyzD> *)(&__pyx_t_9));
69591 
69592  /* "mbd/CouplingFSI.pyx":3109
69593  * if self.beam_type == "BeamEuler":
69594  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzrot]*> &self.thisptr.nodesRot.at(nodeN)
69595  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69596  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzD]*> &self.thisptr.nodes.at(nodeN)
69597  * self.nodes += [node]
69598  */
69599  }
69600  __pyx_L6:;
69601 
69602  /* "mbd/CouplingFSI.pyx":3111
69603  * elif self.beam_type == "CableANCF":
69604  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzD]*> &self.thisptr.nodes.at(nodeN)
69605  * self.nodes += [node] # <<<<<<<<<<<<<<
69606  * self.nodes_built = True
69607  * # build elements
69608  */
69609  if (unlikely(!__pyx_v_node)) { __Pyx_RaiseUnboundLocalError("node"); __PYX_ERR(0, 3111, __pyx_L1_error) }
69610  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3111, __pyx_L1_error)
69611  __Pyx_GOTREF(__pyx_t_1);
69612  __Pyx_INCREF(__pyx_v_node);
69613  __Pyx_GIVEREF(__pyx_v_node);
69614  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_node);
69615  __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_self->nodes, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3111, __pyx_L1_error)
69616  __Pyx_GOTREF(__pyx_t_7);
69617  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
69618  __Pyx_GIVEREF(__pyx_t_7);
69619  __Pyx_GOTREF(__pyx_v_self->nodes);
69620  __Pyx_DECREF(__pyx_v_self->nodes);
69621  __pyx_v_self->nodes = __pyx_t_7;
69622  __pyx_t_7 = 0;
69623  }
69624 
69625  /* "mbd/CouplingFSI.pyx":3112
69626  * swig_obj.ptr = <shared_ptr[ch.ChNodeFEAxyzD]*> &self.thisptr.nodes.at(nodeN)
69627  * self.nodes += [node]
69628  * self.nodes_built = True # <<<<<<<<<<<<<<
69629  * # build elements
69630  * self.thisptr.buildElements()
69631  */
69632  __pyx_v_self->nodes_built = 1;
69633 
69634  /* "mbd/CouplingFSI.pyx":3114
69635  * self.nodes_built = True
69636  * # build elements
69637  * self.thisptr.buildElements() # <<<<<<<<<<<<<<
69638  * # get pointers to access elements in python
69639  * cdef int elemN
69640  */
69641  __pyx_v_self->thisptr->buildElements();
69642 
69643  /* "mbd/CouplingFSI.pyx":3117
69644  * # get pointers to access elements in python
69645  * cdef int elemN
69646  * self.elements = [] # <<<<<<<<<<<<<<
69647  * for elemN in range(self.thisptr.nb_elems_tot):
69648  * if self.beam_type == "BeamEuler":
69649  */
69650  __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3117, __pyx_L1_error)
69651  __Pyx_GOTREF(__pyx_t_7);
69652  __Pyx_GIVEREF(__pyx_t_7);
69653  __Pyx_GOTREF(__pyx_v_self->elements);
69654  __Pyx_DECREF(__pyx_v_self->elements);
69655  __pyx_v_self->elements = __pyx_t_7;
69656  __pyx_t_7 = 0;
69657 
69658  /* "mbd/CouplingFSI.pyx":3118
69659  * cdef int elemN
69660  * self.elements = []
69661  * for elemN in range(self.thisptr.nb_elems_tot): # <<<<<<<<<<<<<<
69662  * if self.beam_type == "BeamEuler":
69663  * elem = chrono_fea.ChElementBeamEuler()
69664  */
69665  __pyx_t_2 = __pyx_v_self->thisptr->nb_elems_tot;
69666  __pyx_t_3 = __pyx_t_2;
69667  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
69668  __pyx_v_elemN = __pyx_t_4;
69669 
69670  /* "mbd/CouplingFSI.pyx":3119
69671  * self.elements = []
69672  * for elemN in range(self.thisptr.nb_elems_tot):
69673  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69674  * elem = chrono_fea.ChElementBeamEuler()
69675  * elif self.beam_type == "CableANCF":
69676  */
69677  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
69678  if (__pyx_t_5) {
69679 
69680  /* "mbd/CouplingFSI.pyx":3120
69681  * for elemN in range(self.thisptr.nb_elems_tot):
69682  * if self.beam_type == "BeamEuler":
69683  * elem = chrono_fea.ChElementBeamEuler() # <<<<<<<<<<<<<<
69684  * elif self.beam_type == "CableANCF":
69685  * elem = chrono_fea.ChElementCableANCF()
69686  */
69687  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_chrono_fea); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3120, __pyx_L1_error)
69688  __Pyx_GOTREF(__pyx_t_1);
69689  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ChElementBeamEuler); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3120, __pyx_L1_error)
69690  __Pyx_GOTREF(__pyx_t_6);
69691  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
69692  __pyx_t_1 = NULL;
69693  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
69694  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
69695  if (likely(__pyx_t_1)) {
69696  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
69697  __Pyx_INCREF(__pyx_t_1);
69698  __Pyx_INCREF(function);
69699  __Pyx_DECREF_SET(__pyx_t_6, function);
69700  }
69701  }
69702  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
69703  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
69704  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3120, __pyx_L1_error)
69705  __Pyx_GOTREF(__pyx_t_7);
69706  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
69707  __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_7);
69708  __pyx_t_7 = 0;
69709 
69710  /* "mbd/CouplingFSI.pyx":3119
69711  * self.elements = []
69712  * for elemN in range(self.thisptr.nb_elems_tot):
69713  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69714  * elem = chrono_fea.ChElementBeamEuler()
69715  * elif self.beam_type == "CableANCF":
69716  */
69717  goto __pyx_L9;
69718  }
69719 
69720  /* "mbd/CouplingFSI.pyx":3121
69721  * if self.beam_type == "BeamEuler":
69722  * elem = chrono_fea.ChElementBeamEuler()
69723  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69724  * elem = chrono_fea.ChElementCableANCF()
69725  * elem.this.disown()
69726  */
69727  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"CableANCF")) != 0);
69728  if (__pyx_t_5) {
69729 
69730  /* "mbd/CouplingFSI.pyx":3122
69731  * elem = chrono_fea.ChElementBeamEuler()
69732  * elif self.beam_type == "CableANCF":
69733  * elem = chrono_fea.ChElementCableANCF() # <<<<<<<<<<<<<<
69734  * elem.this.disown()
69735  * swig_obj = <SwigPyObject*> elem.this
69736  */
69737  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_chrono_fea); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3122, __pyx_L1_error)
69738  __Pyx_GOTREF(__pyx_t_6);
69739  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ChElementCableANCF); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3122, __pyx_L1_error)
69740  __Pyx_GOTREF(__pyx_t_1);
69741  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
69742  __pyx_t_6 = NULL;
69743  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
69744  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
69745  if (likely(__pyx_t_6)) {
69746  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
69747  __Pyx_INCREF(__pyx_t_6);
69748  __Pyx_INCREF(function);
69749  __Pyx_DECREF_SET(__pyx_t_1, function);
69750  }
69751  }
69752  __pyx_t_7 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
69753  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
69754  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3122, __pyx_L1_error)
69755  __Pyx_GOTREF(__pyx_t_7);
69756  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
69757  __Pyx_XDECREF_SET(__pyx_v_elem, __pyx_t_7);
69758  __pyx_t_7 = 0;
69759 
69760  /* "mbd/CouplingFSI.pyx":3121
69761  * if self.beam_type == "BeamEuler":
69762  * elem = chrono_fea.ChElementBeamEuler()
69763  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69764  * elem = chrono_fea.ChElementCableANCF()
69765  * elem.this.disown()
69766  */
69767  }
69768  __pyx_L9:;
69769 
69770  /* "mbd/CouplingFSI.pyx":3123
69771  * elif self.beam_type == "CableANCF":
69772  * elem = chrono_fea.ChElementCableANCF()
69773  * elem.this.disown() # <<<<<<<<<<<<<<
69774  * swig_obj = <SwigPyObject*> elem.this
69775  * if self.beam_type == "BeamEuler":
69776  */
69777  if (unlikely(!__pyx_v_elem)) { __Pyx_RaiseUnboundLocalError("elem"); __PYX_ERR(0, 3123, __pyx_L1_error) }
69778  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_this); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3123, __pyx_L1_error)
69779  __Pyx_GOTREF(__pyx_t_1);
69780  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_disown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3123, __pyx_L1_error)
69781  __Pyx_GOTREF(__pyx_t_6);
69782  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
69783  __pyx_t_1 = NULL;
69784  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
69785  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
69786  if (likely(__pyx_t_1)) {
69787  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
69788  __Pyx_INCREF(__pyx_t_1);
69789  __Pyx_INCREF(function);
69790  __Pyx_DECREF_SET(__pyx_t_6, function);
69791  }
69792  }
69793  __pyx_t_7 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
69794  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
69795  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3123, __pyx_L1_error)
69796  __Pyx_GOTREF(__pyx_t_7);
69797  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
69798  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69799 
69800  /* "mbd/CouplingFSI.pyx":3124
69801  * elem = chrono_fea.ChElementCableANCF()
69802  * elem.this.disown()
69803  * swig_obj = <SwigPyObject*> elem.this # <<<<<<<<<<<<<<
69804  * if self.beam_type == "BeamEuler":
69805  * swig_obj.ptr = <shared_ptr[ch.ChElementBeamEuler]*> &self.thisptr.elemsCableANCF.at(elemN)
69806  */
69807  if (unlikely(!__pyx_v_elem)) { __Pyx_RaiseUnboundLocalError("elem"); __PYX_ERR(0, 3124, __pyx_L1_error) }
69808  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_elem, __pyx_n_s_this); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3124, __pyx_L1_error)
69809  __Pyx_GOTREF(__pyx_t_7);
69810  __pyx_v_swig_obj = ((SwigPyObject *)__pyx_t_7);
69811  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69812 
69813  /* "mbd/CouplingFSI.pyx":3125
69814  * elem.this.disown()
69815  * swig_obj = <SwigPyObject*> elem.this
69816  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69817  * swig_obj.ptr = <shared_ptr[ch.ChElementBeamEuler]*> &self.thisptr.elemsCableANCF.at(elemN)
69818  * elif self.beam_type == "CableANCF":
69819  */
69820  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
69821  if (__pyx_t_5) {
69822 
69823  /* "mbd/CouplingFSI.pyx":3126
69824  * swig_obj = <SwigPyObject*> elem.this
69825  * if self.beam_type == "BeamEuler":
69826  * swig_obj.ptr = <shared_ptr[ch.ChElementBeamEuler]*> &self.thisptr.elemsCableANCF.at(elemN) # <<<<<<<<<<<<<<
69827  * elif self.beam_type == "CableANCF":
69828  * swig_obj.ptr = <shared_ptr[ch.ChElementCableANCF]*> &self.thisptr.elemsCableANCF.at(elemN)
69829  */
69830  try {
69831  __pyx_t_10 = __pyx_v_self->thisptr->elemsCableANCF.at(__pyx_v_elemN);
69832  } catch(...) {
69833  __Pyx_CppExn2PyErr();
69834  __PYX_ERR(0, 3126, __pyx_L1_error)
69835  }
69836  __pyx_v_swig_obj->ptr = ((std::shared_ptr<ChElementBeamEuler> *)(&__pyx_t_10));
69837 
69838  /* "mbd/CouplingFSI.pyx":3125
69839  * elem.this.disown()
69840  * swig_obj = <SwigPyObject*> elem.this
69841  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69842  * swig_obj.ptr = <shared_ptr[ch.ChElementBeamEuler]*> &self.thisptr.elemsCableANCF.at(elemN)
69843  * elif self.beam_type == "CableANCF":
69844  */
69845  goto __pyx_L10;
69846  }
69847 
69848  /* "mbd/CouplingFSI.pyx":3127
69849  * if self.beam_type == "BeamEuler":
69850  * swig_obj.ptr = <shared_ptr[ch.ChElementBeamEuler]*> &self.thisptr.elemsCableANCF.at(elemN)
69851  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69852  * swig_obj.ptr = <shared_ptr[ch.ChElementCableANCF]*> &self.thisptr.elemsCableANCF.at(elemN)
69853  * self.elements += [elem]
69854  */
69855  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"CableANCF")) != 0);
69856  if (__pyx_t_5) {
69857 
69858  /* "mbd/CouplingFSI.pyx":3128
69859  * swig_obj.ptr = <shared_ptr[ch.ChElementBeamEuler]*> &self.thisptr.elemsCableANCF.at(elemN)
69860  * elif self.beam_type == "CableANCF":
69861  * swig_obj.ptr = <shared_ptr[ch.ChElementCableANCF]*> &self.thisptr.elemsCableANCF.at(elemN) # <<<<<<<<<<<<<<
69862  * self.elements += [elem]
69863  * if self.beam_type == "BeamEuler":
69864  */
69865  try {
69866  __pyx_t_11 = __pyx_v_self->thisptr->elemsCableANCF.at(__pyx_v_elemN);
69867  } catch(...) {
69868  __Pyx_CppExn2PyErr();
69869  __PYX_ERR(0, 3128, __pyx_L1_error)
69870  }
69871  __pyx_v_swig_obj->ptr = ((std::shared_ptr<ChElementCableANCF> *)(&__pyx_t_11));
69872 
69873  /* "mbd/CouplingFSI.pyx":3127
69874  * if self.beam_type == "BeamEuler":
69875  * swig_obj.ptr = <shared_ptr[ch.ChElementBeamEuler]*> &self.thisptr.elemsCableANCF.at(elemN)
69876  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69877  * swig_obj.ptr = <shared_ptr[ch.ChElementCableANCF]*> &self.thisptr.elemsCableANCF.at(elemN)
69878  * self.elements += [elem]
69879  */
69880  }
69881  __pyx_L10:;
69882 
69883  /* "mbd/CouplingFSI.pyx":3129
69884  * elif self.beam_type == "CableANCF":
69885  * swig_obj.ptr = <shared_ptr[ch.ChElementCableANCF]*> &self.thisptr.elemsCableANCF.at(elemN)
69886  * self.elements += [elem] # <<<<<<<<<<<<<<
69887  * if self.beam_type == "BeamEuler":
69888  * self.nodes_nb = self.thisptr.nodesRot.size()
69889  */
69890  if (unlikely(!__pyx_v_elem)) { __Pyx_RaiseUnboundLocalError("elem"); __PYX_ERR(0, 3129, __pyx_L1_error) }
69891  __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3129, __pyx_L1_error)
69892  __Pyx_GOTREF(__pyx_t_7);
69893  __Pyx_INCREF(__pyx_v_elem);
69894  __Pyx_GIVEREF(__pyx_v_elem);
69895  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_v_elem);
69896  __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_self->elements, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3129, __pyx_L1_error)
69897  __Pyx_GOTREF(__pyx_t_6);
69898  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69899  __Pyx_GIVEREF(__pyx_t_6);
69900  __Pyx_GOTREF(__pyx_v_self->elements);
69901  __Pyx_DECREF(__pyx_v_self->elements);
69902  __pyx_v_self->elements = __pyx_t_6;
69903  __pyx_t_6 = 0;
69904  }
69905 
69906  /* "mbd/CouplingFSI.pyx":3130
69907  * swig_obj.ptr = <shared_ptr[ch.ChElementCableANCF]*> &self.thisptr.elemsCableANCF.at(elemN)
69908  * self.elements += [elem]
69909  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69910  * self.nodes_nb = self.thisptr.nodesRot.size()
69911  * elif self.beam_type == "CableANCF":
69912  */
69913  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
69914  if (__pyx_t_5) {
69915 
69916  /* "mbd/CouplingFSI.pyx":3131
69917  * self.elements += [elem]
69918  * if self.beam_type == "BeamEuler":
69919  * self.nodes_nb = self.thisptr.nodesRot.size() # <<<<<<<<<<<<<<
69920  * elif self.beam_type == "CableANCF":
69921  * self.nodes_nb = self.thisptr.nodes.size()
69922  */
69923  __pyx_v_self->nodes_nb = __pyx_v_self->thisptr->nodesRot.size();
69924 
69925  /* "mbd/CouplingFSI.pyx":3130
69926  * swig_obj.ptr = <shared_ptr[ch.ChElementCableANCF]*> &self.thisptr.elemsCableANCF.at(elemN)
69927  * self.elements += [elem]
69928  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
69929  * self.nodes_nb = self.thisptr.nodesRot.size()
69930  * elif self.beam_type == "CableANCF":
69931  */
69932  goto __pyx_L11;
69933  }
69934 
69935  /* "mbd/CouplingFSI.pyx":3132
69936  * if self.beam_type == "BeamEuler":
69937  * self.nodes_nb = self.thisptr.nodesRot.size()
69938  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69939  * self.nodes_nb = self.thisptr.nodes.size()
69940  * else:
69941  */
69942  __pyx_t_5 = ((__pyx_v_self->beam_type == ((char const *)"CableANCF")) != 0);
69943  if (__pyx_t_5) {
69944 
69945  /* "mbd/CouplingFSI.pyx":3133
69946  * self.nodes_nb = self.thisptr.nodesRot.size()
69947  * elif self.beam_type == "CableANCF":
69948  * self.nodes_nb = self.thisptr.nodes.size() # <<<<<<<<<<<<<<
69949  * else:
69950  * print("set element type")
69951  */
69952  __pyx_v_self->nodes_nb = __pyx_v_self->thisptr->nodes.size();
69953 
69954  /* "mbd/CouplingFSI.pyx":3132
69955  * if self.beam_type == "BeamEuler":
69956  * self.nodes_nb = self.thisptr.nodesRot.size()
69957  * elif self.beam_type == "CableANCF": # <<<<<<<<<<<<<<
69958  * self.nodes_nb = self.thisptr.nodes.size()
69959  * else:
69960  */
69961  goto __pyx_L11;
69962  }
69963 
69964  /* "mbd/CouplingFSI.pyx":3135
69965  * self.nodes_nb = self.thisptr.nodes.size()
69966  * else:
69967  * print("set element type") # <<<<<<<<<<<<<<
69968  * sys.exit()
69969  *
69970  */
69971  /*else*/ {
69972  if (__Pyx_PrintOne(0, __pyx_kp_s_set_element_type) < 0) __PYX_ERR(0, 3135, __pyx_L1_error)
69973 
69974  /* "mbd/CouplingFSI.pyx":3136
69975  * else:
69976  * print("set element type")
69977  * sys.exit() # <<<<<<<<<<<<<<
69978  *
69979  * def getNodesPosition(self):
69980  */
69981  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3136, __pyx_L1_error)
69982  __Pyx_GOTREF(__pyx_t_7);
69983  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_exit_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3136, __pyx_L1_error)
69984  __Pyx_GOTREF(__pyx_t_1);
69985  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
69986  __pyx_t_7 = NULL;
69987  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
69988  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
69989  if (likely(__pyx_t_7)) {
69990  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
69991  __Pyx_INCREF(__pyx_t_7);
69992  __Pyx_INCREF(function);
69993  __Pyx_DECREF_SET(__pyx_t_1, function);
69994  }
69995  }
69996  __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1);
69997  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
69998  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3136, __pyx_L1_error)
69999  __Pyx_GOTREF(__pyx_t_6);
70000  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
70001  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
70002  }
70003  __pyx_L11:;
70004 
70005  /* "mbd/CouplingFSI.pyx":3093
70006  * # self.buildNodes()
70007  *
70008  * def buildNodes(self): # <<<<<<<<<<<<<<
70009  * # build nodes
70010  * self.thisptr.buildNodes()
70011  */
70012 
70013  /* function exit code */
70014  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
70015  goto __pyx_L0;
70016  __pyx_L1_error:;
70017  __Pyx_XDECREF(__pyx_t_1);
70018  __Pyx_XDECREF(__pyx_t_6);
70019  __Pyx_XDECREF(__pyx_t_7);
70020  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.buildNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
70021  __pyx_r = NULL;
70022  __pyx_L0:;
70023  __Pyx_XDECREF(__pyx_v_node);
70024  __Pyx_XDECREF(__pyx_v_elem);
70025  __Pyx_XGIVEREF(__pyx_r);
70026  __Pyx_TraceReturn(__pyx_r, 0);
70027  __Pyx_RefNannyFinishContext();
70028  return __pyx_r;
70029 }
70030 
70031 /* "mbd/CouplingFSI.pyx":3138
70032  * sys.exit()
70033  *
70034  * def getNodesPosition(self): # <<<<<<<<<<<<<<
70035  * """Gives array of nodes position
70036  *
70037  */
70038 
70039 /* Python wrapper */
70040 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_55getNodesPosition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
70041 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_54getNodesPosition[] = "ProtChMoorings.getNodesPosition(self)\nGives array of nodes position\n\n Returns\n -------\n pos: np.ndarray\n Array of nodes position.\n ";
70042 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_55getNodesPosition = {"getNodesPosition", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_55getNodesPosition, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_54getNodesPosition};
70043 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_55getNodesPosition(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
70044  PyObject *__pyx_r = 0;
70045  __Pyx_RefNannyDeclarations
70046  __Pyx_RefNannySetupContext("getNodesPosition (wrapper)", 0);
70047  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_54getNodesPosition(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
70048 
70049  /* function exit code */
70050  __Pyx_RefNannyFinishContext();
70051  return __pyx_r;
70052 }
70053 
70054 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_54getNodesPosition(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
70055  PyObject *__pyx_v_pos = NULL;
70056  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_v_i;
70057  ChVector<double> __pyx_v_vec;
70058  PyObject *__pyx_r = NULL;
70059  __Pyx_TraceDeclarations
70060  __Pyx_RefNannyDeclarations
70061  int __pyx_t_1;
70062  PyObject *__pyx_t_2 = NULL;
70063  PyObject *__pyx_t_3 = NULL;
70064  PyObject *__pyx_t_4 = NULL;
70065  PyObject *__pyx_t_5 = NULL;
70066  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_t_6;
70067  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_t_7;
70068  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_8;
70069  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_9;
70070  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_10;
70071  int __pyx_lineno = 0;
70072  const char *__pyx_filename = NULL;
70073  int __pyx_clineno = 0;
70074  __Pyx_TraceFrameInit(__pyx_codeobj__181)
70075  __Pyx_RefNannySetupContext("getNodesPosition", 0);
70076  __Pyx_TraceCall("getNodesPosition", __pyx_f[0], 3138, 0, __PYX_ERR(0, 3138, __pyx_L1_error));
70077 
70078  /* "mbd/CouplingFSI.pyx":3146
70079  * Array of nodes position.
70080  * """
70081  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
70082  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70083  * for i in range(self.thisptr.nodesRot.size()):
70084  */
70085  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
70086  if (__pyx_t_1) {
70087 
70088  /* "mbd/CouplingFSI.pyx":3147
70089  * """
70090  * if self.beam_type == 'BeamEuler':
70091  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 )) # <<<<<<<<<<<<<<
70092  * for i in range(self.thisptr.nodesRot.size()):
70093  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
70094  */
70095  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3147, __pyx_L1_error)
70096  __Pyx_GOTREF(__pyx_t_3);
70097  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3147, __pyx_L1_error)
70098  __Pyx_GOTREF(__pyx_t_4);
70099  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
70100  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->thisptr->nodesRot.size()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3147, __pyx_L1_error)
70101  __Pyx_GOTREF(__pyx_t_3);
70102  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3147, __pyx_L1_error)
70103  __Pyx_GOTREF(__pyx_t_5);
70104  __Pyx_GIVEREF(__pyx_t_3);
70105  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
70106  __Pyx_INCREF(__pyx_int_3);
70107  __Pyx_GIVEREF(__pyx_int_3);
70108  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
70109  __pyx_t_3 = 0;
70110  __pyx_t_3 = NULL;
70111  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
70112  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
70113  if (likely(__pyx_t_3)) {
70114  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
70115  __Pyx_INCREF(__pyx_t_3);
70116  __Pyx_INCREF(function);
70117  __Pyx_DECREF_SET(__pyx_t_4, function);
70118  }
70119  }
70120  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
70121  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
70122  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70123  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3147, __pyx_L1_error)
70124  __Pyx_GOTREF(__pyx_t_2);
70125  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70126  __pyx_v_pos = __pyx_t_2;
70127  __pyx_t_2 = 0;
70128 
70129  /* "mbd/CouplingFSI.pyx":3148
70130  * if self.beam_type == 'BeamEuler':
70131  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70132  * for i in range(self.thisptr.nodesRot.size()): # <<<<<<<<<<<<<<
70133  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
70134  * pos[i] = [vec.x(), vec.y(), vec.z()]
70135  */
70136  __pyx_t_6 = __pyx_v_self->thisptr->nodesRot.size();
70137  __pyx_t_7 = __pyx_t_6;
70138  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
70139  __pyx_v_i = __pyx_t_8;
70140 
70141  /* "mbd/CouplingFSI.pyx":3149
70142  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70143  * for i in range(self.thisptr.nodesRot.size()):
70144  * vec = deref(self.thisptr.nodesRot[i]).GetPos() # <<<<<<<<<<<<<<
70145  * pos[i] = [vec.x(), vec.y(), vec.z()]
70146  * return pos
70147  */
70148  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodesRot[__pyx_v_i])).GetPos();
70149 
70150  /* "mbd/CouplingFSI.pyx":3150
70151  * for i in range(self.thisptr.nodesRot.size()):
70152  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
70153  * pos[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
70154  * return pos
70155  * else:
70156  */
70157  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
70158  __Pyx_GOTREF(__pyx_t_2);
70159  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3150, __pyx_L1_error)
70160  __Pyx_GOTREF(__pyx_t_4);
70161  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3150, __pyx_L1_error)
70162  __Pyx_GOTREF(__pyx_t_5);
70163  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3150, __pyx_L1_error)
70164  __Pyx_GOTREF(__pyx_t_3);
70165  __Pyx_GIVEREF(__pyx_t_2);
70166  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
70167  __Pyx_GIVEREF(__pyx_t_4);
70168  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
70169  __Pyx_GIVEREF(__pyx_t_5);
70170  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_5);
70171  __pyx_t_2 = 0;
70172  __pyx_t_4 = 0;
70173  __pyx_t_5 = 0;
70174  if (unlikely(__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_3, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3150, __pyx_L1_error)
70175  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
70176  }
70177 
70178  /* "mbd/CouplingFSI.pyx":3151
70179  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
70180  * pos[i] = [vec.x(), vec.y(), vec.z()]
70181  * return pos # <<<<<<<<<<<<<<
70182  * else:
70183  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70184  */
70185  __Pyx_XDECREF(__pyx_r);
70186  __Pyx_INCREF(__pyx_v_pos);
70187  __pyx_r = __pyx_v_pos;
70188  goto __pyx_L0;
70189 
70190  /* "mbd/CouplingFSI.pyx":3146
70191  * Array of nodes position.
70192  * """
70193  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
70194  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70195  * for i in range(self.thisptr.nodesRot.size()):
70196  */
70197  }
70198 
70199  /* "mbd/CouplingFSI.pyx":3153
70200  * return pos
70201  * else:
70202  * pos = np.zeros(( self.thisptr.nodes.size(),3 )) # <<<<<<<<<<<<<<
70203  * for i in range(self.thisptr.nodes.size()):
70204  * vec = deref(self.thisptr.nodes[i]).GetPos()
70205  */
70206  /*else*/ {
70207  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3153, __pyx_L1_error)
70208  __Pyx_GOTREF(__pyx_t_5);
70209  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3153, __pyx_L1_error)
70210  __Pyx_GOTREF(__pyx_t_4);
70211  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70212  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_self->thisptr->nodes.size()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3153, __pyx_L1_error)
70213  __Pyx_GOTREF(__pyx_t_5);
70214  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error)
70215  __Pyx_GOTREF(__pyx_t_2);
70216  __Pyx_GIVEREF(__pyx_t_5);
70217  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
70218  __Pyx_INCREF(__pyx_int_3);
70219  __Pyx_GIVEREF(__pyx_int_3);
70220  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
70221  __pyx_t_5 = 0;
70222  __pyx_t_5 = NULL;
70223  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
70224  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
70225  if (likely(__pyx_t_5)) {
70226  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
70227  __Pyx_INCREF(__pyx_t_5);
70228  __Pyx_INCREF(function);
70229  __Pyx_DECREF_SET(__pyx_t_4, function);
70230  }
70231  }
70232  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
70233  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
70234  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
70235  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3153, __pyx_L1_error)
70236  __Pyx_GOTREF(__pyx_t_3);
70237  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70238  __pyx_v_pos = __pyx_t_3;
70239  __pyx_t_3 = 0;
70240 
70241  /* "mbd/CouplingFSI.pyx":3154
70242  * else:
70243  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70244  * for i in range(self.thisptr.nodes.size()): # <<<<<<<<<<<<<<
70245  * vec = deref(self.thisptr.nodes[i]).GetPos()
70246  * pos[i] = [vec.x(), vec.y(), vec.z()]
70247  */
70248  __pyx_t_8 = __pyx_v_self->thisptr->nodes.size();
70249  __pyx_t_9 = __pyx_t_8;
70250  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
70251  __pyx_v_i = __pyx_t_10;
70252 
70253  /* "mbd/CouplingFSI.pyx":3155
70254  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70255  * for i in range(self.thisptr.nodes.size()):
70256  * vec = deref(self.thisptr.nodes[i]).GetPos() # <<<<<<<<<<<<<<
70257  * pos[i] = [vec.x(), vec.y(), vec.z()]
70258  * return pos
70259  */
70260  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodes[__pyx_v_i])).GetPos();
70261 
70262  /* "mbd/CouplingFSI.pyx":3156
70263  * for i in range(self.thisptr.nodes.size()):
70264  * vec = deref(self.thisptr.nodes[i]).GetPos()
70265  * pos[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
70266  * return pos
70267  *
70268  */
70269  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3156, __pyx_L1_error)
70270  __Pyx_GOTREF(__pyx_t_3);
70271  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3156, __pyx_L1_error)
70272  __Pyx_GOTREF(__pyx_t_4);
70273  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3156, __pyx_L1_error)
70274  __Pyx_GOTREF(__pyx_t_2);
70275  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3156, __pyx_L1_error)
70276  __Pyx_GOTREF(__pyx_t_5);
70277  __Pyx_GIVEREF(__pyx_t_3);
70278  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
70279  __Pyx_GIVEREF(__pyx_t_4);
70280  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
70281  __Pyx_GIVEREF(__pyx_t_2);
70282  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_2);
70283  __pyx_t_3 = 0;
70284  __pyx_t_4 = 0;
70285  __pyx_t_2 = 0;
70286  if (unlikely(__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_5, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3156, __pyx_L1_error)
70287  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70288  }
70289 
70290  /* "mbd/CouplingFSI.pyx":3157
70291  * vec = deref(self.thisptr.nodes[i]).GetPos()
70292  * pos[i] = [vec.x(), vec.y(), vec.z()]
70293  * return pos # <<<<<<<<<<<<<<
70294  *
70295  * def getNodesVelocity(self):
70296  */
70297  __Pyx_XDECREF(__pyx_r);
70298  __Pyx_INCREF(__pyx_v_pos);
70299  __pyx_r = __pyx_v_pos;
70300  goto __pyx_L0;
70301  }
70302 
70303  /* "mbd/CouplingFSI.pyx":3138
70304  * sys.exit()
70305  *
70306  * def getNodesPosition(self): # <<<<<<<<<<<<<<
70307  * """Gives array of nodes position
70308  *
70309  */
70310 
70311  /* function exit code */
70312  __pyx_L1_error:;
70313  __Pyx_XDECREF(__pyx_t_2);
70314  __Pyx_XDECREF(__pyx_t_3);
70315  __Pyx_XDECREF(__pyx_t_4);
70316  __Pyx_XDECREF(__pyx_t_5);
70317  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getNodesPosition", __pyx_clineno, __pyx_lineno, __pyx_filename);
70318  __pyx_r = NULL;
70319  __pyx_L0:;
70320  __Pyx_XDECREF(__pyx_v_pos);
70321  __Pyx_XGIVEREF(__pyx_r);
70322  __Pyx_TraceReturn(__pyx_r, 0);
70323  __Pyx_RefNannyFinishContext();
70324  return __pyx_r;
70325 }
70326 
70327 /* "mbd/CouplingFSI.pyx":3159
70328  * return pos
70329  *
70330  * def getNodesVelocity(self): # <<<<<<<<<<<<<<
70331  * """Gives array of nodes velocity
70332  *
70333  */
70334 
70335 /* Python wrapper */
70336 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_57getNodesVelocity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
70337 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_56getNodesVelocity[] = "ProtChMoorings.getNodesVelocity(self)\nGives array of nodes velocity\n\n Returns\n -------\n pos: np.ndarray\n Array of nodes velocity.\n ";
70338 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_57getNodesVelocity = {"getNodesVelocity", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_57getNodesVelocity, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_56getNodesVelocity};
70339 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_57getNodesVelocity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
70340  PyObject *__pyx_r = 0;
70341  __Pyx_RefNannyDeclarations
70342  __Pyx_RefNannySetupContext("getNodesVelocity (wrapper)", 0);
70343  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_56getNodesVelocity(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
70344 
70345  /* function exit code */
70346  __Pyx_RefNannyFinishContext();
70347  return __pyx_r;
70348 }
70349 
70350 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_56getNodesVelocity(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
70351  PyObject *__pyx_v_pos = NULL;
70352  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_v_i;
70353  ChVector<double> __pyx_v_vec;
70354  PyObject *__pyx_r = NULL;
70355  __Pyx_TraceDeclarations
70356  __Pyx_RefNannyDeclarations
70357  int __pyx_t_1;
70358  PyObject *__pyx_t_2 = NULL;
70359  PyObject *__pyx_t_3 = NULL;
70360  PyObject *__pyx_t_4 = NULL;
70361  PyObject *__pyx_t_5 = NULL;
70362  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_t_6;
70363  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_t_7;
70364  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_t_8;
70365  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_9;
70366  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_10;
70367  int __pyx_lineno = 0;
70368  const char *__pyx_filename = NULL;
70369  int __pyx_clineno = 0;
70370  __Pyx_TraceFrameInit(__pyx_codeobj__182)
70371  __Pyx_RefNannySetupContext("getNodesVelocity", 0);
70372  __Pyx_TraceCall("getNodesVelocity", __pyx_f[0], 3159, 0, __PYX_ERR(0, 3159, __pyx_L1_error));
70373 
70374  /* "mbd/CouplingFSI.pyx":3167
70375  * Array of nodes velocity.
70376  * """
70377  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
70378  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70379  * for i in range(self.thisptr.nodesRot.size()):
70380  */
70381  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
70382  if (__pyx_t_1) {
70383 
70384  /* "mbd/CouplingFSI.pyx":3168
70385  * """
70386  * if self.beam_type == 'BeamEuler':
70387  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 )) # <<<<<<<<<<<<<<
70388  * for i in range(self.thisptr.nodesRot.size()):
70389  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dt()
70390  */
70391  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3168, __pyx_L1_error)
70392  __Pyx_GOTREF(__pyx_t_3);
70393  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3168, __pyx_L1_error)
70394  __Pyx_GOTREF(__pyx_t_4);
70395  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
70396  __pyx_t_3 = __Pyx_PyInt_FromSize_t(__pyx_v_self->thisptr->nodesRot.size()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3168, __pyx_L1_error)
70397  __Pyx_GOTREF(__pyx_t_3);
70398  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3168, __pyx_L1_error)
70399  __Pyx_GOTREF(__pyx_t_5);
70400  __Pyx_GIVEREF(__pyx_t_3);
70401  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
70402  __Pyx_INCREF(__pyx_int_3);
70403  __Pyx_GIVEREF(__pyx_int_3);
70404  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
70405  __pyx_t_3 = 0;
70406  __pyx_t_3 = NULL;
70407  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
70408  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
70409  if (likely(__pyx_t_3)) {
70410  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
70411  __Pyx_INCREF(__pyx_t_3);
70412  __Pyx_INCREF(function);
70413  __Pyx_DECREF_SET(__pyx_t_4, function);
70414  }
70415  }
70416  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
70417  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
70418  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70419  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3168, __pyx_L1_error)
70420  __Pyx_GOTREF(__pyx_t_2);
70421  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70422  __pyx_v_pos = __pyx_t_2;
70423  __pyx_t_2 = 0;
70424 
70425  /* "mbd/CouplingFSI.pyx":3169
70426  * if self.beam_type == 'BeamEuler':
70427  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70428  * for i in range(self.thisptr.nodesRot.size()): # <<<<<<<<<<<<<<
70429  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dt()
70430  * pos[i] = [vec.x(), vec.y(), vec.z()]
70431  */
70432  __pyx_t_6 = __pyx_v_self->thisptr->nodesRot.size();
70433  __pyx_t_7 = __pyx_t_6;
70434  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
70435  __pyx_v_i = __pyx_t_8;
70436 
70437  /* "mbd/CouplingFSI.pyx":3170
70438  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70439  * for i in range(self.thisptr.nodesRot.size()):
70440  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dt() # <<<<<<<<<<<<<<
70441  * pos[i] = [vec.x(), vec.y(), vec.z()]
70442  * return pos
70443  */
70444  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodesRot[__pyx_v_i])).GetPos_dt();
70445 
70446  /* "mbd/CouplingFSI.pyx":3171
70447  * for i in range(self.thisptr.nodesRot.size()):
70448  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dt()
70449  * pos[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
70450  * return pos
70451  * else:
70452  */
70453  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3171, __pyx_L1_error)
70454  __Pyx_GOTREF(__pyx_t_2);
70455  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3171, __pyx_L1_error)
70456  __Pyx_GOTREF(__pyx_t_4);
70457  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3171, __pyx_L1_error)
70458  __Pyx_GOTREF(__pyx_t_5);
70459  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L1_error)
70460  __Pyx_GOTREF(__pyx_t_3);
70461  __Pyx_GIVEREF(__pyx_t_2);
70462  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
70463  __Pyx_GIVEREF(__pyx_t_4);
70464  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
70465  __Pyx_GIVEREF(__pyx_t_5);
70466  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_5);
70467  __pyx_t_2 = 0;
70468  __pyx_t_4 = 0;
70469  __pyx_t_5 = 0;
70470  if (unlikely(__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_3, std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3171, __pyx_L1_error)
70471  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
70472  }
70473 
70474  /* "mbd/CouplingFSI.pyx":3172
70475  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dt()
70476  * pos[i] = [vec.x(), vec.y(), vec.z()]
70477  * return pos # <<<<<<<<<<<<<<
70478  * else:
70479  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70480  */
70481  __Pyx_XDECREF(__pyx_r);
70482  __Pyx_INCREF(__pyx_v_pos);
70483  __pyx_r = __pyx_v_pos;
70484  goto __pyx_L0;
70485 
70486  /* "mbd/CouplingFSI.pyx":3167
70487  * Array of nodes velocity.
70488  * """
70489  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
70490  * pos = np.zeros(( self.thisptr.nodesRot.size(),3 ))
70491  * for i in range(self.thisptr.nodesRot.size()):
70492  */
70493  }
70494 
70495  /* "mbd/CouplingFSI.pyx":3174
70496  * return pos
70497  * else:
70498  * pos = np.zeros(( self.thisptr.nodes.size(),3 )) # <<<<<<<<<<<<<<
70499  * for i in range(self.thisptr.nodes.size()):
70500  * vec = deref(self.thisptr.nodes[i]).GetPos_dt()
70501  */
70502  /*else*/ {
70503  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3174, __pyx_L1_error)
70504  __Pyx_GOTREF(__pyx_t_5);
70505  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3174, __pyx_L1_error)
70506  __Pyx_GOTREF(__pyx_t_4);
70507  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70508  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_self->thisptr->nodes.size()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3174, __pyx_L1_error)
70509  __Pyx_GOTREF(__pyx_t_5);
70510  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3174, __pyx_L1_error)
70511  __Pyx_GOTREF(__pyx_t_2);
70512  __Pyx_GIVEREF(__pyx_t_5);
70513  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
70514  __Pyx_INCREF(__pyx_int_3);
70515  __Pyx_GIVEREF(__pyx_int_3);
70516  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
70517  __pyx_t_5 = 0;
70518  __pyx_t_5 = NULL;
70519  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
70520  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
70521  if (likely(__pyx_t_5)) {
70522  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
70523  __Pyx_INCREF(__pyx_t_5);
70524  __Pyx_INCREF(function);
70525  __Pyx_DECREF_SET(__pyx_t_4, function);
70526  }
70527  }
70528  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
70529  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
70530  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
70531  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3174, __pyx_L1_error)
70532  __Pyx_GOTREF(__pyx_t_3);
70533  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70534  __pyx_v_pos = __pyx_t_3;
70535  __pyx_t_3 = 0;
70536 
70537  /* "mbd/CouplingFSI.pyx":3175
70538  * else:
70539  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70540  * for i in range(self.thisptr.nodes.size()): # <<<<<<<<<<<<<<
70541  * vec = deref(self.thisptr.nodes[i]).GetPos_dt()
70542  * pos[i] = [vec.x(), vec.y(), vec.z()]
70543  */
70544  __pyx_t_9 = __pyx_v_self->thisptr->nodes.size();
70545  __pyx_t_10 = __pyx_t_9;
70546  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_10; __pyx_t_6+=1) {
70547  __pyx_v_i = __pyx_t_6;
70548 
70549  /* "mbd/CouplingFSI.pyx":3176
70550  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70551  * for i in range(self.thisptr.nodes.size()):
70552  * vec = deref(self.thisptr.nodes[i]).GetPos_dt() # <<<<<<<<<<<<<<
70553  * pos[i] = [vec.x(), vec.y(), vec.z()]
70554  * return pos
70555  */
70556  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodes[__pyx_v_i])).GetPos_dt();
70557 
70558  /* "mbd/CouplingFSI.pyx":3177
70559  * for i in range(self.thisptr.nodes.size()):
70560  * vec = deref(self.thisptr.nodes[i]).GetPos_dt()
70561  * pos[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
70562  * return pos
70563  *
70564  */
70565  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3177, __pyx_L1_error)
70566  __Pyx_GOTREF(__pyx_t_3);
70567  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3177, __pyx_L1_error)
70568  __Pyx_GOTREF(__pyx_t_4);
70569  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3177, __pyx_L1_error)
70570  __Pyx_GOTREF(__pyx_t_2);
70571  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3177, __pyx_L1_error)
70572  __Pyx_GOTREF(__pyx_t_5);
70573  __Pyx_GIVEREF(__pyx_t_3);
70574  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
70575  __Pyx_GIVEREF(__pyx_t_4);
70576  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
70577  __Pyx_GIVEREF(__pyx_t_2);
70578  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_2);
70579  __pyx_t_3 = 0;
70580  __pyx_t_4 = 0;
70581  __pyx_t_2 = 0;
70582  if (unlikely(__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_5, std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3177, __pyx_L1_error)
70583  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70584  }
70585 
70586  /* "mbd/CouplingFSI.pyx":3178
70587  * vec = deref(self.thisptr.nodes[i]).GetPos_dt()
70588  * pos[i] = [vec.x(), vec.y(), vec.z()]
70589  * return pos # <<<<<<<<<<<<<<
70590  *
70591  * def getNodesAcceleration(self):
70592  */
70593  __Pyx_XDECREF(__pyx_r);
70594  __Pyx_INCREF(__pyx_v_pos);
70595  __pyx_r = __pyx_v_pos;
70596  goto __pyx_L0;
70597  }
70598 
70599  /* "mbd/CouplingFSI.pyx":3159
70600  * return pos
70601  *
70602  * def getNodesVelocity(self): # <<<<<<<<<<<<<<
70603  * """Gives array of nodes velocity
70604  *
70605  */
70606 
70607  /* function exit code */
70608  __pyx_L1_error:;
70609  __Pyx_XDECREF(__pyx_t_2);
70610  __Pyx_XDECREF(__pyx_t_3);
70611  __Pyx_XDECREF(__pyx_t_4);
70612  __Pyx_XDECREF(__pyx_t_5);
70613  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getNodesVelocity", __pyx_clineno, __pyx_lineno, __pyx_filename);
70614  __pyx_r = NULL;
70615  __pyx_L0:;
70616  __Pyx_XDECREF(__pyx_v_pos);
70617  __Pyx_XGIVEREF(__pyx_r);
70618  __Pyx_TraceReturn(__pyx_r, 0);
70619  __Pyx_RefNannyFinishContext();
70620  return __pyx_r;
70621 }
70622 
70623 /* "mbd/CouplingFSI.pyx":3180
70624  * return pos
70625  *
70626  * def getNodesAcceleration(self): # <<<<<<<<<<<<<<
70627  * """Gives array of nodes acceleration
70628  *
70629  */
70630 
70631 /* Python wrapper */
70632 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_59getNodesAcceleration(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
70633 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_58getNodesAcceleration[] = "ProtChMoorings.getNodesAcceleration(self)\nGives array of nodes acceleration\n\n Returns\n -------\n pos: np.ndarray\n Array of nodes acceleration.\n ";
70634 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_59getNodesAcceleration = {"getNodesAcceleration", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_59getNodesAcceleration, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_58getNodesAcceleration};
70635 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_59getNodesAcceleration(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
70636  PyObject *__pyx_r = 0;
70637  __Pyx_RefNannyDeclarations
70638  __Pyx_RefNannySetupContext("getNodesAcceleration (wrapper)", 0);
70639  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_58getNodesAcceleration(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
70640 
70641  /* function exit code */
70642  __Pyx_RefNannyFinishContext();
70643  return __pyx_r;
70644 }
70645 
70646 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_58getNodesAcceleration(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
70647  PyObject *__pyx_v_pos = NULL;
70648  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_v_i;
70649  ChVector<double> __pyx_v_vec;
70650  PyObject *__pyx_r = NULL;
70651  __Pyx_TraceDeclarations
70652  __Pyx_RefNannyDeclarations
70653  int __pyx_t_1;
70654  PyObject *__pyx_t_2 = NULL;
70655  PyObject *__pyx_t_3 = NULL;
70656  PyObject *__pyx_t_4 = NULL;
70657  PyObject *__pyx_t_5 = NULL;
70658  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_t_6;
70659  std::vector<std::shared_ptr<ChNodeFEAxyzrot> > ::size_type __pyx_t_7;
70660  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_8;
70661  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_9;
70662  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_10;
70663  int __pyx_lineno = 0;
70664  const char *__pyx_filename = NULL;
70665  int __pyx_clineno = 0;
70666  __Pyx_TraceFrameInit(__pyx_codeobj__183)
70667  __Pyx_RefNannySetupContext("getNodesAcceleration", 0);
70668  __Pyx_TraceCall("getNodesAcceleration", __pyx_f[0], 3180, 0, __PYX_ERR(0, 3180, __pyx_L1_error));
70669 
70670  /* "mbd/CouplingFSI.pyx":3188
70671  * Array of nodes acceleration.
70672  * """
70673  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
70674  * pos = np.zeros((self.nodes_nb,3 ))
70675  * for i in range(self.thisptr.nodesRot.size()):
70676  */
70677  __pyx_t_1 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
70678  if (__pyx_t_1) {
70679 
70680  /* "mbd/CouplingFSI.pyx":3189
70681  * """
70682  * if self.beam_type == 'BeamEuler':
70683  * pos = np.zeros((self.nodes_nb,3 )) # <<<<<<<<<<<<<<
70684  * for i in range(self.thisptr.nodesRot.size()):
70685  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dtdt()
70686  */
70687  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __pyx_L1_error)
70688  __Pyx_GOTREF(__pyx_t_3);
70689  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3189, __pyx_L1_error)
70690  __Pyx_GOTREF(__pyx_t_4);
70691  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
70692  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->nodes_nb); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __pyx_L1_error)
70693  __Pyx_GOTREF(__pyx_t_3);
70694  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3189, __pyx_L1_error)
70695  __Pyx_GOTREF(__pyx_t_5);
70696  __Pyx_GIVEREF(__pyx_t_3);
70697  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
70698  __Pyx_INCREF(__pyx_int_3);
70699  __Pyx_GIVEREF(__pyx_int_3);
70700  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3);
70701  __pyx_t_3 = 0;
70702  __pyx_t_3 = NULL;
70703  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
70704  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
70705  if (likely(__pyx_t_3)) {
70706  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
70707  __Pyx_INCREF(__pyx_t_3);
70708  __Pyx_INCREF(function);
70709  __Pyx_DECREF_SET(__pyx_t_4, function);
70710  }
70711  }
70712  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
70713  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
70714  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70715  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3189, __pyx_L1_error)
70716  __Pyx_GOTREF(__pyx_t_2);
70717  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70718  __pyx_v_pos = __pyx_t_2;
70719  __pyx_t_2 = 0;
70720 
70721  /* "mbd/CouplingFSI.pyx":3190
70722  * if self.beam_type == 'BeamEuler':
70723  * pos = np.zeros((self.nodes_nb,3 ))
70724  * for i in range(self.thisptr.nodesRot.size()): # <<<<<<<<<<<<<<
70725  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dtdt()
70726  * pos[i] = [vec.x(), vec.y(), vec.z()]
70727  */
70728  __pyx_t_6 = __pyx_v_self->thisptr->nodesRot.size();
70729  __pyx_t_7 = __pyx_t_6;
70730  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
70731  __pyx_v_i = __pyx_t_8;
70732 
70733  /* "mbd/CouplingFSI.pyx":3191
70734  * pos = np.zeros((self.nodes_nb,3 ))
70735  * for i in range(self.thisptr.nodesRot.size()):
70736  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dtdt() # <<<<<<<<<<<<<<
70737  * pos[i] = [vec.x(), vec.y(), vec.z()]
70738  * return pos
70739  */
70740  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodesRot[__pyx_v_i])).GetPos_dtdt();
70741 
70742  /* "mbd/CouplingFSI.pyx":3192
70743  * for i in range(self.thisptr.nodesRot.size()):
70744  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dtdt()
70745  * pos[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
70746  * return pos
70747  * else:
70748  */
70749  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3192, __pyx_L1_error)
70750  __Pyx_GOTREF(__pyx_t_2);
70751  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3192, __pyx_L1_error)
70752  __Pyx_GOTREF(__pyx_t_4);
70753  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3192, __pyx_L1_error)
70754  __Pyx_GOTREF(__pyx_t_5);
70755  __pyx_t_3 = PyList_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3192, __pyx_L1_error)
70756  __Pyx_GOTREF(__pyx_t_3);
70757  __Pyx_GIVEREF(__pyx_t_2);
70758  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
70759  __Pyx_GIVEREF(__pyx_t_4);
70760  PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_4);
70761  __Pyx_GIVEREF(__pyx_t_5);
70762  PyList_SET_ITEM(__pyx_t_3, 2, __pyx_t_5);
70763  __pyx_t_2 = 0;
70764  __pyx_t_4 = 0;
70765  __pyx_t_5 = 0;
70766  if (unlikely(__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_3, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3192, __pyx_L1_error)
70767  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
70768  }
70769 
70770  /* "mbd/CouplingFSI.pyx":3193
70771  * vec = deref(self.thisptr.nodesRot[i]).GetPos_dtdt()
70772  * pos[i] = [vec.x(), vec.y(), vec.z()]
70773  * return pos # <<<<<<<<<<<<<<
70774  * else:
70775  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70776  */
70777  __Pyx_XDECREF(__pyx_r);
70778  __Pyx_INCREF(__pyx_v_pos);
70779  __pyx_r = __pyx_v_pos;
70780  goto __pyx_L0;
70781 
70782  /* "mbd/CouplingFSI.pyx":3188
70783  * Array of nodes acceleration.
70784  * """
70785  * if self.beam_type == 'BeamEuler': # <<<<<<<<<<<<<<
70786  * pos = np.zeros((self.nodes_nb,3 ))
70787  * for i in range(self.thisptr.nodesRot.size()):
70788  */
70789  }
70790 
70791  /* "mbd/CouplingFSI.pyx":3195
70792  * return pos
70793  * else:
70794  * pos = np.zeros(( self.thisptr.nodes.size(),3 )) # <<<<<<<<<<<<<<
70795  * for i in range(self.thisptr.nodes.size()):
70796  * vec = deref(self.thisptr.nodes[i]).GetPos_dtdt()
70797  */
70798  /*else*/ {
70799  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3195, __pyx_L1_error)
70800  __Pyx_GOTREF(__pyx_t_5);
70801  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3195, __pyx_L1_error)
70802  __Pyx_GOTREF(__pyx_t_4);
70803  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70804  __pyx_t_5 = __Pyx_PyInt_FromSize_t(__pyx_v_self->thisptr->nodes.size()); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3195, __pyx_L1_error)
70805  __Pyx_GOTREF(__pyx_t_5);
70806  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3195, __pyx_L1_error)
70807  __Pyx_GOTREF(__pyx_t_2);
70808  __Pyx_GIVEREF(__pyx_t_5);
70809  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
70810  __Pyx_INCREF(__pyx_int_3);
70811  __Pyx_GIVEREF(__pyx_int_3);
70812  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_3);
70813  __pyx_t_5 = 0;
70814  __pyx_t_5 = NULL;
70815  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
70816  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
70817  if (likely(__pyx_t_5)) {
70818  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
70819  __Pyx_INCREF(__pyx_t_5);
70820  __Pyx_INCREF(function);
70821  __Pyx_DECREF_SET(__pyx_t_4, function);
70822  }
70823  }
70824  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2);
70825  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
70826  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
70827  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L1_error)
70828  __Pyx_GOTREF(__pyx_t_3);
70829  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70830  __pyx_v_pos = __pyx_t_3;
70831  __pyx_t_3 = 0;
70832 
70833  /* "mbd/CouplingFSI.pyx":3196
70834  * else:
70835  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70836  * for i in range(self.thisptr.nodes.size()): # <<<<<<<<<<<<<<
70837  * vec = deref(self.thisptr.nodes[i]).GetPos_dtdt()
70838  * pos[i] = [vec.x(), vec.y(), vec.z()]
70839  */
70840  __pyx_t_8 = __pyx_v_self->thisptr->nodes.size();
70841  __pyx_t_9 = __pyx_t_8;
70842  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
70843  __pyx_v_i = __pyx_t_10;
70844 
70845  /* "mbd/CouplingFSI.pyx":3197
70846  * pos = np.zeros(( self.thisptr.nodes.size(),3 ))
70847  * for i in range(self.thisptr.nodes.size()):
70848  * vec = deref(self.thisptr.nodes[i]).GetPos_dtdt() # <<<<<<<<<<<<<<
70849  * pos[i] = [vec.x(), vec.y(), vec.z()]
70850  * return pos
70851  */
70852  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodes[__pyx_v_i])).GetPos_dtdt();
70853 
70854  /* "mbd/CouplingFSI.pyx":3198
70855  * for i in range(self.thisptr.nodes.size()):
70856  * vec = deref(self.thisptr.nodes[i]).GetPos_dtdt()
70857  * pos[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
70858  * return pos
70859  *
70860  */
70861  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3198, __pyx_L1_error)
70862  __Pyx_GOTREF(__pyx_t_3);
70863  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3198, __pyx_L1_error)
70864  __Pyx_GOTREF(__pyx_t_4);
70865  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3198, __pyx_L1_error)
70866  __Pyx_GOTREF(__pyx_t_2);
70867  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3198, __pyx_L1_error)
70868  __Pyx_GOTREF(__pyx_t_5);
70869  __Pyx_GIVEREF(__pyx_t_3);
70870  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
70871  __Pyx_GIVEREF(__pyx_t_4);
70872  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
70873  __Pyx_GIVEREF(__pyx_t_2);
70874  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_2);
70875  __pyx_t_3 = 0;
70876  __pyx_t_4 = 0;
70877  __pyx_t_2 = 0;
70878  if (unlikely(__Pyx_SetItemInt(__pyx_v_pos, __pyx_v_i, __pyx_t_5, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3198, __pyx_L1_error)
70879  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
70880  }
70881 
70882  /* "mbd/CouplingFSI.pyx":3199
70883  * vec = deref(self.thisptr.nodes[i]).GetPos_dtdt()
70884  * pos[i] = [vec.x(), vec.y(), vec.z()]
70885  * return pos # <<<<<<<<<<<<<<
70886  *
70887  * def getDragForces(self):
70888  */
70889  __Pyx_XDECREF(__pyx_r);
70890  __Pyx_INCREF(__pyx_v_pos);
70891  __pyx_r = __pyx_v_pos;
70892  goto __pyx_L0;
70893  }
70894 
70895  /* "mbd/CouplingFSI.pyx":3180
70896  * return pos
70897  *
70898  * def getNodesAcceleration(self): # <<<<<<<<<<<<<<
70899  * """Gives array of nodes acceleration
70900  *
70901  */
70902 
70903  /* function exit code */
70904  __pyx_L1_error:;
70905  __Pyx_XDECREF(__pyx_t_2);
70906  __Pyx_XDECREF(__pyx_t_3);
70907  __Pyx_XDECREF(__pyx_t_4);
70908  __Pyx_XDECREF(__pyx_t_5);
70909  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getNodesAcceleration", __pyx_clineno, __pyx_lineno, __pyx_filename);
70910  __pyx_r = NULL;
70911  __pyx_L0:;
70912  __Pyx_XDECREF(__pyx_v_pos);
70913  __Pyx_XGIVEREF(__pyx_r);
70914  __Pyx_TraceReturn(__pyx_r, 0);
70915  __Pyx_RefNannyFinishContext();
70916  return __pyx_r;
70917 }
70918 
70919 /* "mbd/CouplingFSI.pyx":3201
70920  * return pos
70921  *
70922  * def getDragForces(self): # <<<<<<<<<<<<<<
70923  * cdef ch.ChVector Fd
70924  * drag = np.zeros((self.nodes_nb,3 ))
70925  */
70926 
70927 /* Python wrapper */
70928 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_61getDragForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
70929 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_60getDragForces[] = "ProtChMoorings.getDragForces(self)";
70930 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_61getDragForces = {"getDragForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_61getDragForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_60getDragForces};
70931 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_61getDragForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
70932  PyObject *__pyx_r = 0;
70933  __Pyx_RefNannyDeclarations
70934  __Pyx_RefNannySetupContext("getDragForces (wrapper)", 0);
70935  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_60getDragForces(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
70936 
70937  /* function exit code */
70938  __Pyx_RefNannyFinishContext();
70939  return __pyx_r;
70940 }
70941 
70942 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_60getDragForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
70943  ChVector<double> __pyx_v_Fd;
70944  PyObject *__pyx_v_drag = NULL;
70945  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_v_i;
70946  PyObject *__pyx_r = NULL;
70947  __Pyx_TraceDeclarations
70948  __Pyx_RefNannyDeclarations
70949  PyObject *__pyx_t_1 = NULL;
70950  PyObject *__pyx_t_2 = NULL;
70951  PyObject *__pyx_t_3 = NULL;
70952  PyObject *__pyx_t_4 = NULL;
70953  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_t_5;
70954  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_t_6;
70955  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_t_7;
70956  int __pyx_lineno = 0;
70957  const char *__pyx_filename = NULL;
70958  int __pyx_clineno = 0;
70959  __Pyx_TraceFrameInit(__pyx_codeobj__184)
70960  __Pyx_RefNannySetupContext("getDragForces", 0);
70961  __Pyx_TraceCall("getDragForces", __pyx_f[0], 3201, 0, __PYX_ERR(0, 3201, __pyx_L1_error));
70962 
70963  /* "mbd/CouplingFSI.pyx":3203
70964  * def getDragForces(self):
70965  * cdef ch.ChVector Fd
70966  * drag = np.zeros((self.nodes_nb,3 )) # <<<<<<<<<<<<<<
70967  * for i in range(self.thisptr.forces_drag.size()):
70968  * Fd = deref(self.thisptr.forces_drag[i])
70969  */
70970  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3203, __pyx_L1_error)
70971  __Pyx_GOTREF(__pyx_t_2);
70972  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3203, __pyx_L1_error)
70973  __Pyx_GOTREF(__pyx_t_3);
70974  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
70975  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nodes_nb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3203, __pyx_L1_error)
70976  __Pyx_GOTREF(__pyx_t_2);
70977  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3203, __pyx_L1_error)
70978  __Pyx_GOTREF(__pyx_t_4);
70979  __Pyx_GIVEREF(__pyx_t_2);
70980  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
70981  __Pyx_INCREF(__pyx_int_3);
70982  __Pyx_GIVEREF(__pyx_int_3);
70983  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);
70984  __pyx_t_2 = 0;
70985  __pyx_t_2 = NULL;
70986  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
70987  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
70988  if (likely(__pyx_t_2)) {
70989  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
70990  __Pyx_INCREF(__pyx_t_2);
70991  __Pyx_INCREF(function);
70992  __Pyx_DECREF_SET(__pyx_t_3, function);
70993  }
70994  }
70995  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
70996  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
70997  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
70998  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3203, __pyx_L1_error)
70999  __Pyx_GOTREF(__pyx_t_1);
71000  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
71001  __pyx_v_drag = __pyx_t_1;
71002  __pyx_t_1 = 0;
71003 
71004  /* "mbd/CouplingFSI.pyx":3204
71005  * cdef ch.ChVector Fd
71006  * drag = np.zeros((self.nodes_nb,3 ))
71007  * for i in range(self.thisptr.forces_drag.size()): # <<<<<<<<<<<<<<
71008  * Fd = deref(self.thisptr.forces_drag[i])
71009  * drag[i] = [Fd.x(), Fd.y(), Fd.z()]
71010  */
71011  __pyx_t_5 = __pyx_v_self->thisptr->forces_drag.size();
71012  __pyx_t_6 = __pyx_t_5;
71013  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
71014  __pyx_v_i = __pyx_t_7;
71015 
71016  /* "mbd/CouplingFSI.pyx":3205
71017  * drag = np.zeros((self.nodes_nb,3 ))
71018  * for i in range(self.thisptr.forces_drag.size()):
71019  * Fd = deref(self.thisptr.forces_drag[i]) # <<<<<<<<<<<<<<
71020  * drag[i] = [Fd.x(), Fd.y(), Fd.z()]
71021  * return drag
71022  */
71023  __pyx_v_Fd = (*(__pyx_v_self->thisptr->forces_drag[__pyx_v_i]));
71024 
71025  /* "mbd/CouplingFSI.pyx":3206
71026  * for i in range(self.thisptr.forces_drag.size()):
71027  * Fd = deref(self.thisptr.forces_drag[i])
71028  * drag[i] = [Fd.x(), Fd.y(), Fd.z()] # <<<<<<<<<<<<<<
71029  * return drag
71030  *
71031  */
71032  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_Fd.x()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3206, __pyx_L1_error)
71033  __Pyx_GOTREF(__pyx_t_1);
71034  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_Fd.y()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3206, __pyx_L1_error)
71035  __Pyx_GOTREF(__pyx_t_3);
71036  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_Fd.z()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3206, __pyx_L1_error)
71037  __Pyx_GOTREF(__pyx_t_4);
71038  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3206, __pyx_L1_error)
71039  __Pyx_GOTREF(__pyx_t_2);
71040  __Pyx_GIVEREF(__pyx_t_1);
71041  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
71042  __Pyx_GIVEREF(__pyx_t_3);
71043  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
71044  __Pyx_GIVEREF(__pyx_t_4);
71045  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
71046  __pyx_t_1 = 0;
71047  __pyx_t_3 = 0;
71048  __pyx_t_4 = 0;
71049  if (unlikely(__Pyx_SetItemInt(__pyx_v_drag, __pyx_v_i, __pyx_t_2, std::vector<std::shared_ptr<ChVector<double> > > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3206, __pyx_L1_error)
71050  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
71051  }
71052 
71053  /* "mbd/CouplingFSI.pyx":3207
71054  * Fd = deref(self.thisptr.forces_drag[i])
71055  * drag[i] = [Fd.x(), Fd.y(), Fd.z()]
71056  * return drag # <<<<<<<<<<<<<<
71057  *
71058  * def getAddedMassForces(self):
71059  */
71060  __Pyx_XDECREF(__pyx_r);
71061  __Pyx_INCREF(__pyx_v_drag);
71062  __pyx_r = __pyx_v_drag;
71063  goto __pyx_L0;
71064 
71065  /* "mbd/CouplingFSI.pyx":3201
71066  * return pos
71067  *
71068  * def getDragForces(self): # <<<<<<<<<<<<<<
71069  * cdef ch.ChVector Fd
71070  * drag = np.zeros((self.nodes_nb,3 ))
71071  */
71072 
71073  /* function exit code */
71074  __pyx_L1_error:;
71075  __Pyx_XDECREF(__pyx_t_1);
71076  __Pyx_XDECREF(__pyx_t_2);
71077  __Pyx_XDECREF(__pyx_t_3);
71078  __Pyx_XDECREF(__pyx_t_4);
71079  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getDragForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
71080  __pyx_r = NULL;
71081  __pyx_L0:;
71082  __Pyx_XDECREF(__pyx_v_drag);
71083  __Pyx_XGIVEREF(__pyx_r);
71084  __Pyx_TraceReturn(__pyx_r, 0);
71085  __Pyx_RefNannyFinishContext();
71086  return __pyx_r;
71087 }
71088 
71089 /* "mbd/CouplingFSI.pyx":3209
71090  * return drag
71091  *
71092  * def getAddedMassForces(self): # <<<<<<<<<<<<<<
71093  * cdef ch.ChVector Fd
71094  * drag = np.zeros((self.nodes_nb,3 ))
71095  */
71096 
71097 /* Python wrapper */
71098 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_63getAddedMassForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
71099 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_62getAddedMassForces[] = "ProtChMoorings.getAddedMassForces(self)";
71100 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_63getAddedMassForces = {"getAddedMassForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_63getAddedMassForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_62getAddedMassForces};
71101 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_63getAddedMassForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
71102  PyObject *__pyx_r = 0;
71103  __Pyx_RefNannyDeclarations
71104  __Pyx_RefNannySetupContext("getAddedMassForces (wrapper)", 0);
71105  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_62getAddedMassForces(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
71106 
71107  /* function exit code */
71108  __Pyx_RefNannyFinishContext();
71109  return __pyx_r;
71110 }
71111 
71112 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_62getAddedMassForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
71113  ChVector<double> __pyx_v_Fd;
71114  PyObject *__pyx_v_drag = NULL;
71115  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_v_i;
71116  PyObject *__pyx_r = NULL;
71117  __Pyx_TraceDeclarations
71118  __Pyx_RefNannyDeclarations
71119  PyObject *__pyx_t_1 = NULL;
71120  PyObject *__pyx_t_2 = NULL;
71121  PyObject *__pyx_t_3 = NULL;
71122  PyObject *__pyx_t_4 = NULL;
71123  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_t_5;
71124  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_t_6;
71125  std::vector<std::shared_ptr<ChVector<double> > > ::size_type __pyx_t_7;
71126  int __pyx_lineno = 0;
71127  const char *__pyx_filename = NULL;
71128  int __pyx_clineno = 0;
71129  __Pyx_TraceFrameInit(__pyx_codeobj__185)
71130  __Pyx_RefNannySetupContext("getAddedMassForces", 0);
71131  __Pyx_TraceCall("getAddedMassForces", __pyx_f[0], 3209, 0, __PYX_ERR(0, 3209, __pyx_L1_error));
71132 
71133  /* "mbd/CouplingFSI.pyx":3211
71134  * def getAddedMassForces(self):
71135  * cdef ch.ChVector Fd
71136  * drag = np.zeros((self.nodes_nb,3 )) # <<<<<<<<<<<<<<
71137  * for i in range(self.thisptr.forces_addedmass.size()):
71138  * Fd = deref(self.thisptr.forces_addedmass[i])
71139  */
71140  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
71141  __Pyx_GOTREF(__pyx_t_2);
71142  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3211, __pyx_L1_error)
71143  __Pyx_GOTREF(__pyx_t_3);
71144  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
71145  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->nodes_nb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
71146  __Pyx_GOTREF(__pyx_t_2);
71147  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3211, __pyx_L1_error)
71148  __Pyx_GOTREF(__pyx_t_4);
71149  __Pyx_GIVEREF(__pyx_t_2);
71150  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
71151  __Pyx_INCREF(__pyx_int_3);
71152  __Pyx_GIVEREF(__pyx_int_3);
71153  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);
71154  __pyx_t_2 = 0;
71155  __pyx_t_2 = NULL;
71156  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
71157  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
71158  if (likely(__pyx_t_2)) {
71159  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
71160  __Pyx_INCREF(__pyx_t_2);
71161  __Pyx_INCREF(function);
71162  __Pyx_DECREF_SET(__pyx_t_3, function);
71163  }
71164  }
71165  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
71166  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
71167  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
71168  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
71169  __Pyx_GOTREF(__pyx_t_1);
71170  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
71171  __pyx_v_drag = __pyx_t_1;
71172  __pyx_t_1 = 0;
71173 
71174  /* "mbd/CouplingFSI.pyx":3212
71175  * cdef ch.ChVector Fd
71176  * drag = np.zeros((self.nodes_nb,3 ))
71177  * for i in range(self.thisptr.forces_addedmass.size()): # <<<<<<<<<<<<<<
71178  * Fd = deref(self.thisptr.forces_addedmass[i])
71179  * drag[i] = [Fd.x(), Fd.y(), Fd.z()]
71180  */
71181  __pyx_t_5 = __pyx_v_self->thisptr->forces_addedmass.size();
71182  __pyx_t_6 = __pyx_t_5;
71183  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
71184  __pyx_v_i = __pyx_t_7;
71185 
71186  /* "mbd/CouplingFSI.pyx":3213
71187  * drag = np.zeros((self.nodes_nb,3 ))
71188  * for i in range(self.thisptr.forces_addedmass.size()):
71189  * Fd = deref(self.thisptr.forces_addedmass[i]) # <<<<<<<<<<<<<<
71190  * drag[i] = [Fd.x(), Fd.y(), Fd.z()]
71191  * return drag
71192  */
71193  __pyx_v_Fd = (*(__pyx_v_self->thisptr->forces_addedmass[__pyx_v_i]));
71194 
71195  /* "mbd/CouplingFSI.pyx":3214
71196  * for i in range(self.thisptr.forces_addedmass.size()):
71197  * Fd = deref(self.thisptr.forces_addedmass[i])
71198  * drag[i] = [Fd.x(), Fd.y(), Fd.z()] # <<<<<<<<<<<<<<
71199  * return drag
71200  *
71201  */
71202  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_Fd.x()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3214, __pyx_L1_error)
71203  __Pyx_GOTREF(__pyx_t_1);
71204  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_Fd.y()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3214, __pyx_L1_error)
71205  __Pyx_GOTREF(__pyx_t_3);
71206  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_Fd.z()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3214, __pyx_L1_error)
71207  __Pyx_GOTREF(__pyx_t_4);
71208  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3214, __pyx_L1_error)
71209  __Pyx_GOTREF(__pyx_t_2);
71210  __Pyx_GIVEREF(__pyx_t_1);
71211  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
71212  __Pyx_GIVEREF(__pyx_t_3);
71213  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
71214  __Pyx_GIVEREF(__pyx_t_4);
71215  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
71216  __pyx_t_1 = 0;
71217  __pyx_t_3 = 0;
71218  __pyx_t_4 = 0;
71219  if (unlikely(__Pyx_SetItemInt(__pyx_v_drag, __pyx_v_i, __pyx_t_2, std::vector<std::shared_ptr<ChVector<double> > > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3214, __pyx_L1_error)
71220  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
71221  }
71222 
71223  /* "mbd/CouplingFSI.pyx":3215
71224  * Fd = deref(self.thisptr.forces_addedmass[i])
71225  * drag[i] = [Fd.x(), Fd.y(), Fd.z()]
71226  * return drag # <<<<<<<<<<<<<<
71227  *
71228  * def setIyy(self, double Iyy, int cable_nb):
71229  */
71230  __Pyx_XDECREF(__pyx_r);
71231  __Pyx_INCREF(__pyx_v_drag);
71232  __pyx_r = __pyx_v_drag;
71233  goto __pyx_L0;
71234 
71235  /* "mbd/CouplingFSI.pyx":3209
71236  * return drag
71237  *
71238  * def getAddedMassForces(self): # <<<<<<<<<<<<<<
71239  * cdef ch.ChVector Fd
71240  * drag = np.zeros((self.nodes_nb,3 ))
71241  */
71242 
71243  /* function exit code */
71244  __pyx_L1_error:;
71245  __Pyx_XDECREF(__pyx_t_1);
71246  __Pyx_XDECREF(__pyx_t_2);
71247  __Pyx_XDECREF(__pyx_t_3);
71248  __Pyx_XDECREF(__pyx_t_4);
71249  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getAddedMassForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
71250  __pyx_r = NULL;
71251  __pyx_L0:;
71252  __Pyx_XDECREF(__pyx_v_drag);
71253  __Pyx_XGIVEREF(__pyx_r);
71254  __Pyx_TraceReturn(__pyx_r, 0);
71255  __Pyx_RefNannyFinishContext();
71256  return __pyx_r;
71257 }
71258 
71259 /* "mbd/CouplingFSI.pyx":3217
71260  * return drag
71261  *
71262  * def setIyy(self, double Iyy, int cable_nb): # <<<<<<<<<<<<<<
71263  * deref(self.thisptr.cables[cable_nb]).setIyy(Iyy)
71264  *
71265  */
71266 
71267 /* Python wrapper */
71268 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_65setIyy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
71269 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_64setIyy[] = "ProtChMoorings.setIyy(self, double Iyy, int cable_nb)";
71270 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_65setIyy = {"setIyy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_65setIyy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_64setIyy};
71271 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_65setIyy(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
71272  double __pyx_v_Iyy;
71273  int __pyx_v_cable_nb;
71274  int __pyx_lineno = 0;
71275  const char *__pyx_filename = NULL;
71276  int __pyx_clineno = 0;
71277  PyObject *__pyx_r = 0;
71278  __Pyx_RefNannyDeclarations
71279  __Pyx_RefNannySetupContext("setIyy (wrapper)", 0);
71280  {
71281  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_Iyy,&__pyx_n_s_cable_nb,0};
71282  PyObject* values[2] = {0,0};
71283  if (unlikely(__pyx_kwds)) {
71284  Py_ssize_t kw_args;
71285  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
71286  switch (pos_args) {
71287  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
71288  CYTHON_FALLTHROUGH;
71289  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
71290  CYTHON_FALLTHROUGH;
71291  case 0: break;
71292  default: goto __pyx_L5_argtuple_error;
71293  }
71294  kw_args = PyDict_Size(__pyx_kwds);
71295  switch (pos_args) {
71296  case 0:
71297  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Iyy)) != 0)) kw_args--;
71298  else goto __pyx_L5_argtuple_error;
71299  CYTHON_FALLTHROUGH;
71300  case 1:
71301  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cable_nb)) != 0)) kw_args--;
71302  else {
71303  __Pyx_RaiseArgtupleInvalid("setIyy", 1, 2, 2, 1); __PYX_ERR(0, 3217, __pyx_L3_error)
71304  }
71305  }
71306  if (unlikely(kw_args > 0)) {
71307  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setIyy") < 0)) __PYX_ERR(0, 3217, __pyx_L3_error)
71308  }
71309  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
71310  goto __pyx_L5_argtuple_error;
71311  } else {
71312  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
71313  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
71314  }
71315  __pyx_v_Iyy = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_Iyy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3217, __pyx_L3_error)
71316  __pyx_v_cable_nb = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_cable_nb == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3217, __pyx_L3_error)
71317  }
71318  goto __pyx_L4_argument_unpacking_done;
71319  __pyx_L5_argtuple_error:;
71320  __Pyx_RaiseArgtupleInvalid("setIyy", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3217, __pyx_L3_error)
71321  __pyx_L3_error:;
71322  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setIyy", __pyx_clineno, __pyx_lineno, __pyx_filename);
71323  __Pyx_RefNannyFinishContext();
71324  return NULL;
71325  __pyx_L4_argument_unpacking_done:;
71326  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_64setIyy(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_Iyy, __pyx_v_cable_nb);
71327 
71328  /* function exit code */
71329  __Pyx_RefNannyFinishContext();
71330  return __pyx_r;
71331 }
71332 
71333 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_64setIyy(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, double __pyx_v_Iyy, int __pyx_v_cable_nb) {
71334  PyObject *__pyx_r = NULL;
71335  __Pyx_TraceDeclarations
71336  __Pyx_RefNannyDeclarations
71337  int __pyx_lineno = 0;
71338  const char *__pyx_filename = NULL;
71339  int __pyx_clineno = 0;
71340  __Pyx_TraceFrameInit(__pyx_codeobj__186)
71341  __Pyx_RefNannySetupContext("setIyy", 0);
71342  __Pyx_TraceCall("setIyy", __pyx_f[0], 3217, 0, __PYX_ERR(0, 3217, __pyx_L1_error));
71343 
71344  /* "mbd/CouplingFSI.pyx":3218
71345  *
71346  * def setIyy(self, double Iyy, int cable_nb):
71347  * deref(self.thisptr.cables[cable_nb]).setIyy(Iyy) # <<<<<<<<<<<<<<
71348  *
71349  *
71350  */
71351  (*(__pyx_v_self->thisptr->cables[__pyx_v_cable_nb])).setIyy(__pyx_v_Iyy);
71352 
71353  /* "mbd/CouplingFSI.pyx":3217
71354  * return drag
71355  *
71356  * def setIyy(self, double Iyy, int cable_nb): # <<<<<<<<<<<<<<
71357  * deref(self.thisptr.cables[cable_nb]).setIyy(Iyy)
71358  *
71359  */
71360 
71361  /* function exit code */
71362  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
71363  goto __pyx_L0;
71364  __pyx_L1_error:;
71365  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setIyy", __pyx_clineno, __pyx_lineno, __pyx_filename);
71366  __pyx_r = NULL;
71367  __pyx_L0:;
71368  __Pyx_XGIVEREF(__pyx_r);
71369  __Pyx_TraceReturn(__pyx_r, 0);
71370  __Pyx_RefNannyFinishContext();
71371  return __pyx_r;
71372 }
71373 
71374 /* "mbd/CouplingFSI.pyx":3221
71375  *
71376  *
71377  * def getNodesD(self): # <<<<<<<<<<<<<<
71378  * """Gives direction of nodes
71379  *
71380  */
71381 
71382 /* Python wrapper */
71383 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_67getNodesD(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
71384 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_66getNodesD[] = "ProtChMoorings.getNodesD(self)\nGives direction of nodes\n\n Returns\n -------\n dire: np.ndarray\n Array of nodes direction.\n ";
71385 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_67getNodesD = {"getNodesD", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_67getNodesD, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_66getNodesD};
71386 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_67getNodesD(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
71387  PyObject *__pyx_r = 0;
71388  __Pyx_RefNannyDeclarations
71389  __Pyx_RefNannySetupContext("getNodesD (wrapper)", 0);
71390  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_66getNodesD(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
71391 
71392  /* function exit code */
71393  __Pyx_RefNannyFinishContext();
71394  return __pyx_r;
71395 }
71396 
71397 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_66getNodesD(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
71398  PyObject *__pyx_v_dire = NULL;
71399  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_v_i;
71400  ChVector<double> __pyx_v_vec;
71401  PyObject *__pyx_r = NULL;
71402  __Pyx_TraceDeclarations
71403  __Pyx_RefNannyDeclarations
71404  PyObject *__pyx_t_1 = NULL;
71405  PyObject *__pyx_t_2 = NULL;
71406  PyObject *__pyx_t_3 = NULL;
71407  PyObject *__pyx_t_4 = NULL;
71408  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_5;
71409  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_6;
71410  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_7;
71411  int __pyx_lineno = 0;
71412  const char *__pyx_filename = NULL;
71413  int __pyx_clineno = 0;
71414  __Pyx_TraceFrameInit(__pyx_codeobj__187)
71415  __Pyx_RefNannySetupContext("getNodesD", 0);
71416  __Pyx_TraceCall("getNodesD", __pyx_f[0], 3221, 0, __PYX_ERR(0, 3221, __pyx_L1_error));
71417 
71418  /* "mbd/CouplingFSI.pyx":3229
71419  * Array of nodes direction.
71420  * """
71421  * dire = np.zeros(( self.thisptr.nodes.size(),3 )) # <<<<<<<<<<<<<<
71422  * for i in range(self.thisptr.nodes.size()):
71423  * vec = deref(self.thisptr.nodes[i]).GetD()
71424  */
71425  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3229, __pyx_L1_error)
71426  __Pyx_GOTREF(__pyx_t_2);
71427  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3229, __pyx_L1_error)
71428  __Pyx_GOTREF(__pyx_t_3);
71429  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
71430  __pyx_t_2 = __Pyx_PyInt_FromSize_t(__pyx_v_self->thisptr->nodes.size()); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3229, __pyx_L1_error)
71431  __Pyx_GOTREF(__pyx_t_2);
71432  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3229, __pyx_L1_error)
71433  __Pyx_GOTREF(__pyx_t_4);
71434  __Pyx_GIVEREF(__pyx_t_2);
71435  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
71436  __Pyx_INCREF(__pyx_int_3);
71437  __Pyx_GIVEREF(__pyx_int_3);
71438  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3);
71439  __pyx_t_2 = 0;
71440  __pyx_t_2 = NULL;
71441  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
71442  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
71443  if (likely(__pyx_t_2)) {
71444  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
71445  __Pyx_INCREF(__pyx_t_2);
71446  __Pyx_INCREF(function);
71447  __Pyx_DECREF_SET(__pyx_t_3, function);
71448  }
71449  }
71450  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
71451  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
71452  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
71453  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
71454  __Pyx_GOTREF(__pyx_t_1);
71455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
71456  __pyx_v_dire = __pyx_t_1;
71457  __pyx_t_1 = 0;
71458 
71459  /* "mbd/CouplingFSI.pyx":3230
71460  * """
71461  * dire = np.zeros(( self.thisptr.nodes.size(),3 ))
71462  * for i in range(self.thisptr.nodes.size()): # <<<<<<<<<<<<<<
71463  * vec = deref(self.thisptr.nodes[i]).GetD()
71464  * dire[i] = [vec.x(), vec.y(), vec.z()]
71465  */
71466  __pyx_t_5 = __pyx_v_self->thisptr->nodes.size();
71467  __pyx_t_6 = __pyx_t_5;
71468  for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
71469  __pyx_v_i = __pyx_t_7;
71470 
71471  /* "mbd/CouplingFSI.pyx":3231
71472  * dire = np.zeros(( self.thisptr.nodes.size(),3 ))
71473  * for i in range(self.thisptr.nodes.size()):
71474  * vec = deref(self.thisptr.nodes[i]).GetD() # <<<<<<<<<<<<<<
71475  * dire[i] = [vec.x(), vec.y(), vec.z()]
71476  * return dire
71477  */
71478  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodes[__pyx_v_i])).GetD();
71479 
71480  /* "mbd/CouplingFSI.pyx":3232
71481  * for i in range(self.thisptr.nodes.size()):
71482  * vec = deref(self.thisptr.nodes[i]).GetD()
71483  * dire[i] = [vec.x(), vec.y(), vec.z()] # <<<<<<<<<<<<<<
71484  * return dire
71485  *
71486  */
71487  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_vec.x()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3232, __pyx_L1_error)
71488  __Pyx_GOTREF(__pyx_t_1);
71489  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_vec.y()); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3232, __pyx_L1_error)
71490  __Pyx_GOTREF(__pyx_t_3);
71491  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_vec.z()); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3232, __pyx_L1_error)
71492  __Pyx_GOTREF(__pyx_t_4);
71493  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3232, __pyx_L1_error)
71494  __Pyx_GOTREF(__pyx_t_2);
71495  __Pyx_GIVEREF(__pyx_t_1);
71496  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
71497  __Pyx_GIVEREF(__pyx_t_3);
71498  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
71499  __Pyx_GIVEREF(__pyx_t_4);
71500  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_4);
71501  __pyx_t_1 = 0;
71502  __pyx_t_3 = 0;
71503  __pyx_t_4 = 0;
71504  if (unlikely(__Pyx_SetItemInt(__pyx_v_dire, __pyx_v_i, __pyx_t_2, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3232, __pyx_L1_error)
71505  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
71506  }
71507 
71508  /* "mbd/CouplingFSI.pyx":3233
71509  * vec = deref(self.thisptr.nodes[i]).GetD()
71510  * dire[i] = [vec.x(), vec.y(), vec.z()]
71511  * return dire # <<<<<<<<<<<<<<
71512  *
71513  * def setContactMaterial(self, mat):
71514  */
71515  __Pyx_XDECREF(__pyx_r);
71516  __Pyx_INCREF(__pyx_v_dire);
71517  __pyx_r = __pyx_v_dire;
71518  goto __pyx_L0;
71519 
71520  /* "mbd/CouplingFSI.pyx":3221
71521  *
71522  *
71523  * def getNodesD(self): # <<<<<<<<<<<<<<
71524  * """Gives direction of nodes
71525  *
71526  */
71527 
71528  /* function exit code */
71529  __pyx_L1_error:;
71530  __Pyx_XDECREF(__pyx_t_1);
71531  __Pyx_XDECREF(__pyx_t_2);
71532  __Pyx_XDECREF(__pyx_t_3);
71533  __Pyx_XDECREF(__pyx_t_4);
71534  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.getNodesD", __pyx_clineno, __pyx_lineno, __pyx_filename);
71535  __pyx_r = NULL;
71536  __pyx_L0:;
71537  __Pyx_XDECREF(__pyx_v_dire);
71538  __Pyx_XGIVEREF(__pyx_r);
71539  __Pyx_TraceReturn(__pyx_r, 0);
71540  __Pyx_RefNannyFinishContext();
71541  return __pyx_r;
71542 }
71543 
71544 /* "mbd/CouplingFSI.pyx":3235
71545  * return dire
71546  *
71547  * def setContactMaterial(self, mat): # <<<<<<<<<<<<<<
71548  * """Sets contact material of the cable
71549  *
71550  */
71551 
71552 /* Python wrapper */
71553 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_69setContactMaterial(PyObject *__pyx_v_self, PyObject *__pyx_v_mat); /*proto*/
71554 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_68setContactMaterial[] = "ProtChMoorings.setContactMaterial(self, mat)\nSets contact material of the cable\n\n Parameters\n ----------\n mat: ChMaterialSurfaceSMC\n Material of cable.\n ";
71555 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_69setContactMaterial = {"setContactMaterial", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_69setContactMaterial, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_68setContactMaterial};
71556 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_69setContactMaterial(PyObject *__pyx_v_self, PyObject *__pyx_v_mat) {
71557  PyObject *__pyx_r = 0;
71558  __Pyx_RefNannyDeclarations
71559  __Pyx_RefNannySetupContext("setContactMaterial (wrapper)", 0);
71560  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_68setContactMaterial(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_mat));
71561 
71562  /* function exit code */
71563  __Pyx_RefNannyFinishContext();
71564  return __pyx_r;
71565 }
71566 
71567 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_68setContactMaterial(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_mat) {
71568  SwigPyObject *__pyx_v_swig_obj;
71569  std::shared_ptr<ChMaterialSurfaceSMC> *__pyx_v_pt_to_shp;
71570  std::shared_ptr<ChMaterialSurfaceSMC> __pyx_v_matp;
71571  PyObject *__pyx_r = NULL;
71572  __Pyx_TraceDeclarations
71573  __Pyx_RefNannyDeclarations
71574  PyObject *__pyx_t_1 = NULL;
71575  int __pyx_lineno = 0;
71576  const char *__pyx_filename = NULL;
71577  int __pyx_clineno = 0;
71578  __Pyx_TraceFrameInit(__pyx_codeobj__188)
71579  __Pyx_RefNannySetupContext("setContactMaterial", 0);
71580  __Pyx_TraceCall("setContactMaterial", __pyx_f[0], 3235, 0, __PYX_ERR(0, 3235, __pyx_L1_error));
71581 
71582  /* "mbd/CouplingFSI.pyx":3243
71583  * Material of cable.
71584  * """
71585  * cdef SwigPyObject *swig_obj = <SwigPyObject*> mat.this # <<<<<<<<<<<<<<
71586  * cdef shared_ptr[ch.ChMaterialSurfaceSMC]* pt_to_shp = <shared_ptr[ch.ChMaterialSurfaceSMC]*> swig_obj.ptr;
71587  * cdef shared_ptr[ch.ChMaterialSurfaceSMC] matp = pt_to_shp[0]
71588  */
71589  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_this); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3243, __pyx_L1_error)
71590  __Pyx_GOTREF(__pyx_t_1);
71591  __pyx_v_swig_obj = ((SwigPyObject *)__pyx_t_1);
71592  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
71593 
71594  /* "mbd/CouplingFSI.pyx":3244
71595  * """
71596  * cdef SwigPyObject *swig_obj = <SwigPyObject*> mat.this
71597  * cdef shared_ptr[ch.ChMaterialSurfaceSMC]* pt_to_shp = <shared_ptr[ch.ChMaterialSurfaceSMC]*> swig_obj.ptr; # <<<<<<<<<<<<<<
71598  * cdef shared_ptr[ch.ChMaterialSurfaceSMC] matp = pt_to_shp[0]
71599  * self.thisptr.setContactMaterial(matp)
71600  */
71601  __pyx_v_pt_to_shp = ((std::shared_ptr<ChMaterialSurfaceSMC> *)__pyx_v_swig_obj->ptr);
71602 
71603  /* "mbd/CouplingFSI.pyx":3245
71604  * cdef SwigPyObject *swig_obj = <SwigPyObject*> mat.this
71605  * cdef shared_ptr[ch.ChMaterialSurfaceSMC]* pt_to_shp = <shared_ptr[ch.ChMaterialSurfaceSMC]*> swig_obj.ptr;
71606  * cdef shared_ptr[ch.ChMaterialSurfaceSMC] matp = pt_to_shp[0] # <<<<<<<<<<<<<<
71607  * self.thisptr.setContactMaterial(matp)
71608  *
71609  */
71610  __pyx_v_matp = (__pyx_v_pt_to_shp[0]);
71611 
71612  /* "mbd/CouplingFSI.pyx":3246
71613  * cdef shared_ptr[ch.ChMaterialSurfaceSMC]* pt_to_shp = <shared_ptr[ch.ChMaterialSurfaceSMC]*> swig_obj.ptr;
71614  * cdef shared_ptr[ch.ChMaterialSurfaceSMC] matp = pt_to_shp[0]
71615  * self.thisptr.setContactMaterial(matp) # <<<<<<<<<<<<<<
71616  *
71617  * def setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None,
71618  */
71619  __pyx_v_self->thisptr->setContactMaterial(__pyx_v_matp);
71620 
71621  /* "mbd/CouplingFSI.pyx":3235
71622  * return dire
71623  *
71624  * def setContactMaterial(self, mat): # <<<<<<<<<<<<<<
71625  * """Sets contact material of the cable
71626  *
71627  */
71628 
71629  /* function exit code */
71630  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
71631  goto __pyx_L0;
71632  __pyx_L1_error:;
71633  __Pyx_XDECREF(__pyx_t_1);
71634  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setContactMaterial", __pyx_clineno, __pyx_lineno, __pyx_filename);
71635  __pyx_r = NULL;
71636  __pyx_L0:;
71637  __Pyx_XGIVEREF(__pyx_r);
71638  __Pyx_TraceReturn(__pyx_r, 0);
71639  __Pyx_RefNannyFinishContext();
71640  return __pyx_r;
71641 }
71642 
71643 /* "mbd/CouplingFSI.pyx":3248
71644  * self.thisptr.setContactMaterial(matp)
71645  *
71646  * def setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None, # <<<<<<<<<<<<<<
71647  * fluid_acceleration_array=None):
71648  * """
71649  */
71650 
71651 /* Python wrapper */
71652 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_71setExternalForces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
71653 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_70setExternalForces[] = "ProtChMoorings.setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None, fluid_acceleration_array=None)\n\n Sets external forces acting on cables\n Pass fluid velocity_array as argument only for debugging (must be an array as long as the number of nodes)\n ";
71654 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_71setExternalForces = {"setExternalForces", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_71setExternalForces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_70setExternalForces};
71655 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_71setExternalForces(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
71656  PyObject *__pyx_v_fluid_velocity_array = 0;
71657  PyObject *__pyx_v_fluid_density_array = 0;
71658  PyObject *__pyx_v_fluid_acceleration_array = 0;
71659  int __pyx_lineno = 0;
71660  const char *__pyx_filename = NULL;
71661  int __pyx_clineno = 0;
71662  PyObject *__pyx_r = 0;
71663  __Pyx_RefNannyDeclarations
71664  __Pyx_RefNannySetupContext("setExternalForces (wrapper)", 0);
71665  {
71666  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fluid_velocity_array,&__pyx_n_s_fluid_density_array,&__pyx_n_s_fluid_acceleration_array,0};
71667  PyObject* values[3] = {0,0,0};
71668  values[0] = ((PyObject *)Py_None);
71669  values[1] = ((PyObject *)Py_None);
71670 
71671  /* "mbd/CouplingFSI.pyx":3249
71672  *
71673  * def setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None,
71674  * fluid_acceleration_array=None): # <<<<<<<<<<<<<<
71675  * """
71676  * Sets external forces acting on cables
71677  */
71678  values[2] = ((PyObject *)Py_None);
71679  if (unlikely(__pyx_kwds)) {
71680  Py_ssize_t kw_args;
71681  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
71682  switch (pos_args) {
71683  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
71684  CYTHON_FALLTHROUGH;
71685  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
71686  CYTHON_FALLTHROUGH;
71687  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
71688  CYTHON_FALLTHROUGH;
71689  case 0: break;
71690  default: goto __pyx_L5_argtuple_error;
71691  }
71692  kw_args = PyDict_Size(__pyx_kwds);
71693  switch (pos_args) {
71694  case 0:
71695  if (kw_args > 0) {
71696  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fluid_velocity_array);
71697  if (value) { values[0] = value; kw_args--; }
71698  }
71699  CYTHON_FALLTHROUGH;
71700  case 1:
71701  if (kw_args > 0) {
71702  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fluid_density_array);
71703  if (value) { values[1] = value; kw_args--; }
71704  }
71705  CYTHON_FALLTHROUGH;
71706  case 2:
71707  if (kw_args > 0) {
71708  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fluid_acceleration_array);
71709  if (value) { values[2] = value; kw_args--; }
71710  }
71711  }
71712  if (unlikely(kw_args > 0)) {
71713  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setExternalForces") < 0)) __PYX_ERR(0, 3248, __pyx_L3_error)
71714  }
71715  } else {
71716  switch (PyTuple_GET_SIZE(__pyx_args)) {
71717  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
71718  CYTHON_FALLTHROUGH;
71719  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
71720  CYTHON_FALLTHROUGH;
71721  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
71722  CYTHON_FALLTHROUGH;
71723  case 0: break;
71724  default: goto __pyx_L5_argtuple_error;
71725  }
71726  }
71727  __pyx_v_fluid_velocity_array = values[0];
71728  __pyx_v_fluid_density_array = values[1];
71729  __pyx_v_fluid_acceleration_array = values[2];
71730  }
71731  goto __pyx_L4_argument_unpacking_done;
71732  __pyx_L5_argtuple_error:;
71733  __Pyx_RaiseArgtupleInvalid("setExternalForces", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3248, __pyx_L3_error)
71734  __pyx_L3_error:;
71735  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setExternalForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
71736  __Pyx_RefNannyFinishContext();
71737  return NULL;
71738  __pyx_L4_argument_unpacking_done:;
71739  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_70setExternalForces(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), __pyx_v_fluid_velocity_array, __pyx_v_fluid_density_array, __pyx_v_fluid_acceleration_array);
71740 
71741  /* "mbd/CouplingFSI.pyx":3248
71742  * self.thisptr.setContactMaterial(matp)
71743  *
71744  * def setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None, # <<<<<<<<<<<<<<
71745  * fluid_acceleration_array=None):
71746  * """
71747  */
71748 
71749  /* function exit code */
71750  __Pyx_RefNannyFinishContext();
71751  return __pyx_r;
71752 }
71753 
71754 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_70setExternalForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_fluid_velocity_array, PyObject *__pyx_v_fluid_density_array, PyObject *__pyx_v_fluid_acceleration_array) {
71755  std::vector<ChVector<double> > __pyx_v_fluid_velocity;
71756  std::vector<ChVector<double> > __pyx_v_fluid_acceleration;
71757  ChVector<double> __pyx_v_vel;
71758  ChVector<double> __pyx_v_acc;
71759  std::vector<double> __pyx_v_fluid_density;
71760  double __pyx_v_dens;
71761  PyObject *__pyx_v_comm = NULL;
71762  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_v_nb_nodes;
71763  bool __pyx_v_mesh_search;
71764  bool __pyx_v_dist_search;
71765  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_v_i;
71766  ChVector<double> __pyx_v_vec;
71767  double __pyx_v_x;
71768  double __pyx_v_y;
71769  double __pyx_v_z;
71770  PyObject *__pyx_v_coords = NULL;
71771  PyObject *__pyx_v_vel_arr = NULL;
71772  CYTHON_UNUSED PyObject *__pyx_v_vel_grad_arr = NULL;
71773  PyObject *__pyx_v_xi = NULL;
71774  PyObject *__pyx_v_nearest_node = NULL;
71775  PyObject *__pyx_v_el = NULL;
71776  PyObject *__pyx_v_rank = NULL;
71777  PyObject *__pyx_r = NULL;
71778  __Pyx_TraceDeclarations
71779  __Pyx_RefNannyDeclarations
71780  PyObject *__pyx_t_1 = NULL;
71781  int __pyx_t_2;
71782  int __pyx_t_3;
71783  PyObject *__pyx_t_4 = NULL;
71784  PyObject *__pyx_t_5 = NULL;
71785  PyObject *__pyx_t_6 = NULL;
71786  int __pyx_t_7;
71787  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_8;
71788  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_9;
71789  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_10;
71790  PyObject *__pyx_t_11 = NULL;
71791  PyObject *__pyx_t_12 = NULL;
71792  std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type __pyx_t_13;
71793  int __pyx_t_14;
71794  PyObject *(*__pyx_t_15)(PyObject *);
71795  int __pyx_t_16;
71796  double __pyx_t_17;
71797  double __pyx_t_18;
71798  double __pyx_t_19;
71799  int __pyx_lineno = 0;
71800  const char *__pyx_filename = NULL;
71801  int __pyx_clineno = 0;
71802  __Pyx_TraceFrameInit(__pyx_codeobj__189)
71803  __Pyx_RefNannySetupContext("setExternalForces", 0);
71804  __Pyx_TraceCall("setExternalForces", __pyx_f[0], 3248, 0, __PYX_ERR(0, 3248, __pyx_L1_error));
71805 
71806  /* "mbd/CouplingFSI.pyx":3256
71807  * # get velocity at nodes
71808  * # cdef np.ndarray fluid_velocity = np.zeros((len(self.thisptr.nodes.size()), 3))
71809  * self.fluid_velocity_array_previous[:] = self.fluid_velocity_array # <<<<<<<<<<<<<<
71810  * if fluid_velocity_array is not None:
71811  * self.fluid_velocity_array = fluid_velocity_array
71812  */
71813  __pyx_t_1 = ((PyObject *)__pyx_v_self->fluid_velocity_array);
71814  __Pyx_INCREF(__pyx_t_1);
71815  if (__Pyx_PyObject_SetSlice(((PyObject *)__pyx_v_self->fluid_velocity_array_previous), __pyx_t_1, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 3256, __pyx_L1_error)
71816  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
71817 
71818  /* "mbd/CouplingFSI.pyx":3257
71819  * # cdef np.ndarray fluid_velocity = np.zeros((len(self.thisptr.nodes.size()), 3))
71820  * self.fluid_velocity_array_previous[:] = self.fluid_velocity_array
71821  * if fluid_velocity_array is not None: # <<<<<<<<<<<<<<
71822  * self.fluid_velocity_array = fluid_velocity_array
71823  * if fluid_density_array is not None:
71824  */
71825  __pyx_t_2 = (__pyx_v_fluid_velocity_array != Py_None);
71826  __pyx_t_3 = (__pyx_t_2 != 0);
71827  if (__pyx_t_3) {
71828 
71829  /* "mbd/CouplingFSI.pyx":3258
71830  * self.fluid_velocity_array_previous[:] = self.fluid_velocity_array
71831  * if fluid_velocity_array is not None:
71832  * self.fluid_velocity_array = fluid_velocity_array # <<<<<<<<<<<<<<
71833  * if fluid_density_array is not None:
71834  * self.fluid_density_array = fluid_density_array
71835  */
71836  if (!(likely(((__pyx_v_fluid_velocity_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fluid_velocity_array, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3258, __pyx_L1_error)
71837  __pyx_t_1 = __pyx_v_fluid_velocity_array;
71838  __Pyx_INCREF(__pyx_t_1);
71839  __Pyx_GIVEREF(__pyx_t_1);
71840  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array);
71841  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array));
71842  __pyx_v_self->fluid_velocity_array = ((PyArrayObject *)__pyx_t_1);
71843  __pyx_t_1 = 0;
71844 
71845  /* "mbd/CouplingFSI.pyx":3257
71846  * # cdef np.ndarray fluid_velocity = np.zeros((len(self.thisptr.nodes.size()), 3))
71847  * self.fluid_velocity_array_previous[:] = self.fluid_velocity_array
71848  * if fluid_velocity_array is not None: # <<<<<<<<<<<<<<
71849  * self.fluid_velocity_array = fluid_velocity_array
71850  * if fluid_density_array is not None:
71851  */
71852  }
71853 
71854  /* "mbd/CouplingFSI.pyx":3259
71855  * if fluid_velocity_array is not None:
71856  * self.fluid_velocity_array = fluid_velocity_array
71857  * if fluid_density_array is not None: # <<<<<<<<<<<<<<
71858  * self.fluid_density_array = fluid_density_array
71859  * if fluid_acceleration_array is not None:
71860  */
71861  __pyx_t_3 = (__pyx_v_fluid_density_array != Py_None);
71862  __pyx_t_2 = (__pyx_t_3 != 0);
71863  if (__pyx_t_2) {
71864 
71865  /* "mbd/CouplingFSI.pyx":3260
71866  * self.fluid_velocity_array = fluid_velocity_array
71867  * if fluid_density_array is not None:
71868  * self.fluid_density_array = fluid_density_array # <<<<<<<<<<<<<<
71869  * if fluid_acceleration_array is not None:
71870  * self.fluid_acceleration_array = fluid_acceleration_array
71871  */
71872  if (!(likely(((__pyx_v_fluid_density_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fluid_density_array, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3260, __pyx_L1_error)
71873  __pyx_t_1 = __pyx_v_fluid_density_array;
71874  __Pyx_INCREF(__pyx_t_1);
71875  __Pyx_GIVEREF(__pyx_t_1);
71876  __Pyx_GOTREF(__pyx_v_self->fluid_density_array);
71877  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_density_array));
71878  __pyx_v_self->fluid_density_array = ((PyArrayObject *)__pyx_t_1);
71879  __pyx_t_1 = 0;
71880 
71881  /* "mbd/CouplingFSI.pyx":3259
71882  * if fluid_velocity_array is not None:
71883  * self.fluid_velocity_array = fluid_velocity_array
71884  * if fluid_density_array is not None: # <<<<<<<<<<<<<<
71885  * self.fluid_density_array = fluid_density_array
71886  * if fluid_acceleration_array is not None:
71887  */
71888  }
71889 
71890  /* "mbd/CouplingFSI.pyx":3261
71891  * if fluid_density_array is not None:
71892  * self.fluid_density_array = fluid_density_array
71893  * if fluid_acceleration_array is not None: # <<<<<<<<<<<<<<
71894  * self.fluid_acceleration_array = fluid_acceleration_array
71895  * cdef vector[ch.ChVector[double]] fluid_velocity
71896  */
71897  __pyx_t_2 = (__pyx_v_fluid_acceleration_array != Py_None);
71898  __pyx_t_3 = (__pyx_t_2 != 0);
71899  if (__pyx_t_3) {
71900 
71901  /* "mbd/CouplingFSI.pyx":3262
71902  * self.fluid_density_array = fluid_density_array
71903  * if fluid_acceleration_array is not None:
71904  * self.fluid_acceleration_array = fluid_acceleration_array # <<<<<<<<<<<<<<
71905  * cdef vector[ch.ChVector[double]] fluid_velocity
71906  * cdef vector[ch.ChVector[double]] fluid_acceleration
71907  */
71908  if (!(likely(((__pyx_v_fluid_acceleration_array) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_fluid_acceleration_array, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 3262, __pyx_L1_error)
71909  __pyx_t_1 = __pyx_v_fluid_acceleration_array;
71910  __Pyx_INCREF(__pyx_t_1);
71911  __Pyx_GIVEREF(__pyx_t_1);
71912  __Pyx_GOTREF(__pyx_v_self->fluid_acceleration_array);
71913  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_acceleration_array));
71914  __pyx_v_self->fluid_acceleration_array = ((PyArrayObject *)__pyx_t_1);
71915  __pyx_t_1 = 0;
71916 
71917  /* "mbd/CouplingFSI.pyx":3261
71918  * if fluid_density_array is not None:
71919  * self.fluid_density_array = fluid_density_array
71920  * if fluid_acceleration_array is not None: # <<<<<<<<<<<<<<
71921  * self.fluid_acceleration_array = fluid_acceleration_array
71922  * cdef vector[ch.ChVector[double]] fluid_velocity
71923  */
71924  }
71925 
71926  /* "mbd/CouplingFSI.pyx":3269
71927  * cdef vector[double] fluid_density
71928  * cdef double dens
71929  * comm = Comm.get().comm.tompi4py() # <<<<<<<<<<<<<<
71930  * if self.beam_type == "BeamEuler":
71931  * nb_nodes = self.thisptr.nodesRot.size()
71932  */
71933  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Comm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3269, __pyx_L1_error)
71934  __Pyx_GOTREF(__pyx_t_5);
71935  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3269, __pyx_L1_error)
71936  __Pyx_GOTREF(__pyx_t_6);
71937  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
71938  __pyx_t_5 = NULL;
71939  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
71940  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
71941  if (likely(__pyx_t_5)) {
71942  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
71943  __Pyx_INCREF(__pyx_t_5);
71944  __Pyx_INCREF(function);
71945  __Pyx_DECREF_SET(__pyx_t_6, function);
71946  }
71947  }
71948  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
71949  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
71950  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3269, __pyx_L1_error)
71951  __Pyx_GOTREF(__pyx_t_4);
71952  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
71953  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_comm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3269, __pyx_L1_error)
71954  __Pyx_GOTREF(__pyx_t_6);
71955  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
71956  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_tompi4py); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3269, __pyx_L1_error)
71957  __Pyx_GOTREF(__pyx_t_4);
71958  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
71959  __pyx_t_6 = NULL;
71960  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
71961  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
71962  if (likely(__pyx_t_6)) {
71963  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
71964  __Pyx_INCREF(__pyx_t_6);
71965  __Pyx_INCREF(function);
71966  __Pyx_DECREF_SET(__pyx_t_4, function);
71967  }
71968  }
71969  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
71970  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
71971  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3269, __pyx_L1_error)
71972  __Pyx_GOTREF(__pyx_t_1);
71973  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
71974  __pyx_v_comm = __pyx_t_1;
71975  __pyx_t_1 = 0;
71976 
71977  /* "mbd/CouplingFSI.pyx":3270
71978  * cdef double dens
71979  * comm = Comm.get().comm.tompi4py()
71980  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
71981  * nb_nodes = self.thisptr.nodesRot.size()
71982  * else:
71983  */
71984  __pyx_t_3 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
71985  if (__pyx_t_3) {
71986 
71987  /* "mbd/CouplingFSI.pyx":3271
71988  * comm = Comm.get().comm.tompi4py()
71989  * if self.beam_type == "BeamEuler":
71990  * nb_nodes = self.thisptr.nodesRot.size() # <<<<<<<<<<<<<<
71991  * else:
71992  * nb_nodes = self.thisptr.nodes.size()
71993  */
71994  __pyx_v_nb_nodes = __pyx_v_self->thisptr->nodesRot.size();
71995 
71996  /* "mbd/CouplingFSI.pyx":3270
71997  * cdef double dens
71998  * comm = Comm.get().comm.tompi4py()
71999  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
72000  * nb_nodes = self.thisptr.nodesRot.size()
72001  * else:
72002  */
72003  goto __pyx_L6;
72004  }
72005 
72006  /* "mbd/CouplingFSI.pyx":3273
72007  * nb_nodes = self.thisptr.nodesRot.size()
72008  * else:
72009  * nb_nodes = self.thisptr.nodes.size() # <<<<<<<<<<<<<<
72010  * cdef bool mesh_search = False
72011  * cdef bool dist_search = False
72012  */
72013  /*else*/ {
72014  __pyx_v_nb_nodes = __pyx_v_self->thisptr->nodes.size();
72015  }
72016  __pyx_L6:;
72017 
72018  /* "mbd/CouplingFSI.pyx":3274
72019  * else:
72020  * nb_nodes = self.thisptr.nodes.size()
72021  * cdef bool mesh_search = False # <<<<<<<<<<<<<<
72022  * cdef bool dist_search = False
72023  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
72024  */
72025  __pyx_v_mesh_search = 0;
72026 
72027  /* "mbd/CouplingFSI.pyx":3275
72028  * nb_nodes = self.thisptr.nodes.size()
72029  * cdef bool mesh_search = False
72030  * cdef bool dist_search = False # <<<<<<<<<<<<<<
72031  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
72032  * mesh_search = True
72033  */
72034  __pyx_v_dist_search = 0;
72035 
72036  /* "mbd/CouplingFSI.pyx":3276
72037  * cdef bool mesh_search = False
72038  * cdef bool dist_search = False
72039  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True: # <<<<<<<<<<<<<<
72040  * mesh_search = True
72041  * if self.ProtChSystem.dist_search is True:
72042  */
72043  __pyx_t_2 = (__pyx_v_self->ProtChSystem->model != Py_None);
72044  __pyx_t_7 = (__pyx_t_2 != 0);
72045  if (__pyx_t_7) {
72046  } else {
72047  __pyx_t_3 = __pyx_t_7;
72048  goto __pyx_L8_bool_binop_done;
72049  }
72050  __pyx_t_7 = ((__pyx_v_self->external_forces_from_ns == 1) != 0);
72051  __pyx_t_3 = __pyx_t_7;
72052  __pyx_L8_bool_binop_done:;
72053  if (__pyx_t_3) {
72054 
72055  /* "mbd/CouplingFSI.pyx":3277
72056  * cdef bool dist_search = False
72057  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
72058  * mesh_search = True # <<<<<<<<<<<<<<
72059  * if self.ProtChSystem.dist_search is True:
72060  * dist_search = True
72061  */
72062  __pyx_v_mesh_search = 1;
72063 
72064  /* "mbd/CouplingFSI.pyx":3278
72065  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
72066  * mesh_search = True
72067  * if self.ProtChSystem.dist_search is True: # <<<<<<<<<<<<<<
72068  * dist_search = True
72069  * if self.ProtChSystem.first_step is True:
72070  */
72071  __pyx_t_3 = ((__pyx_v_self->ProtChSystem->dist_search == 1) != 0);
72072  if (__pyx_t_3) {
72073 
72074  /* "mbd/CouplingFSI.pyx":3279
72075  * mesh_search = True
72076  * if self.ProtChSystem.dist_search is True:
72077  * dist_search = True # <<<<<<<<<<<<<<
72078  * if self.ProtChSystem.first_step is True:
72079  * if self.ProtChSystem.build_kdtree is True:
72080  */
72081  __pyx_v_dist_search = 1;
72082 
72083  /* "mbd/CouplingFSI.pyx":3280
72084  * if self.ProtChSystem.dist_search is True:
72085  * dist_search = True
72086  * if self.ProtChSystem.first_step is True: # <<<<<<<<<<<<<<
72087  * if self.ProtChSystem.build_kdtree is True:
72088  * dist_search = False
72089  */
72090  __pyx_t_3 = ((__pyx_v_self->ProtChSystem->first_step == 1) != 0);
72091  if (__pyx_t_3) {
72092 
72093  /* "mbd/CouplingFSI.pyx":3281
72094  * dist_search = True
72095  * if self.ProtChSystem.first_step is True:
72096  * if self.ProtChSystem.build_kdtree is True: # <<<<<<<<<<<<<<
72097  * dist_search = False
72098  * if dist_search is True:
72099  */
72100  __pyx_t_3 = ((__pyx_v_self->ProtChSystem->build_kdtree == 1) != 0);
72101  if (__pyx_t_3) {
72102 
72103  /* "mbd/CouplingFSI.pyx":3282
72104  * if self.ProtChSystem.first_step is True:
72105  * if self.ProtChSystem.build_kdtree is True:
72106  * dist_search = False # <<<<<<<<<<<<<<
72107  * if dist_search is True:
72108  * Profiling.logEvent("Starting distance search for cable nodes")
72109  */
72110  __pyx_v_dist_search = 0;
72111 
72112  /* "mbd/CouplingFSI.pyx":3281
72113  * dist_search = True
72114  * if self.ProtChSystem.first_step is True:
72115  * if self.ProtChSystem.build_kdtree is True: # <<<<<<<<<<<<<<
72116  * dist_search = False
72117  * if dist_search is True:
72118  */
72119  }
72120 
72121  /* "mbd/CouplingFSI.pyx":3280
72122  * if self.ProtChSystem.dist_search is True:
72123  * dist_search = True
72124  * if self.ProtChSystem.first_step is True: # <<<<<<<<<<<<<<
72125  * if self.ProtChSystem.build_kdtree is True:
72126  * dist_search = False
72127  */
72128  }
72129 
72130  /* "mbd/CouplingFSI.pyx":3278
72131  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True:
72132  * mesh_search = True
72133  * if self.ProtChSystem.dist_search is True: # <<<<<<<<<<<<<<
72134  * dist_search = True
72135  * if self.ProtChSystem.first_step is True:
72136  */
72137  }
72138 
72139  /* "mbd/CouplingFSI.pyx":3283
72140  * if self.ProtChSystem.build_kdtree is True:
72141  * dist_search = False
72142  * if dist_search is True: # <<<<<<<<<<<<<<
72143  * Profiling.logEvent("Starting distance search for cable nodes")
72144  * else:
72145  */
72146  __pyx_t_3 = ((__pyx_v_dist_search == 1) != 0);
72147  if (__pyx_t_3) {
72148 
72149  /* "mbd/CouplingFSI.pyx":3284
72150  * dist_search = False
72151  * if dist_search is True:
72152  * Profiling.logEvent("Starting distance search for cable nodes") # <<<<<<<<<<<<<<
72153  * else:
72154  * Profiling.logEvent("Starting k-d tree search for cable nodes")
72155  */
72156  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3284, __pyx_L1_error)
72157  __Pyx_GOTREF(__pyx_t_4);
72158  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3284, __pyx_L1_error)
72159  __Pyx_GOTREF(__pyx_t_6);
72160  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72161  __pyx_t_4 = NULL;
72162  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
72163  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
72164  if (likely(__pyx_t_4)) {
72165  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
72166  __Pyx_INCREF(__pyx_t_4);
72167  __Pyx_INCREF(function);
72168  __Pyx_DECREF_SET(__pyx_t_6, function);
72169  }
72170  }
72171  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_kp_s_Starting_distance_search_for_cab) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_s_Starting_distance_search_for_cab);
72172  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
72173  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3284, __pyx_L1_error)
72174  __Pyx_GOTREF(__pyx_t_1);
72175  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72176  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
72177 
72178  /* "mbd/CouplingFSI.pyx":3283
72179  * if self.ProtChSystem.build_kdtree is True:
72180  * dist_search = False
72181  * if dist_search is True: # <<<<<<<<<<<<<<
72182  * Profiling.logEvent("Starting distance search for cable nodes")
72183  * else:
72184  */
72185  goto __pyx_L13;
72186  }
72187 
72188  /* "mbd/CouplingFSI.pyx":3286
72189  * Profiling.logEvent("Starting distance search for cable nodes")
72190  * else:
72191  * Profiling.logEvent("Starting k-d tree search for cable nodes") # <<<<<<<<<<<<<<
72192  * for i in range(nb_nodes):
72193  * if self.beam_type == "BeamEuler":
72194  */
72195  /*else*/ {
72196  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3286, __pyx_L1_error)
72197  __Pyx_GOTREF(__pyx_t_6);
72198  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3286, __pyx_L1_error)
72199  __Pyx_GOTREF(__pyx_t_4);
72200  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72201  __pyx_t_6 = NULL;
72202  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
72203  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
72204  if (likely(__pyx_t_6)) {
72205  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
72206  __Pyx_INCREF(__pyx_t_6);
72207  __Pyx_INCREF(function);
72208  __Pyx_DECREF_SET(__pyx_t_4, function);
72209  }
72210  }
72211  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_kp_s_Starting_k_d_tree_search_for_cab) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_Starting_k_d_tree_search_for_cab);
72212  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
72213  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3286, __pyx_L1_error)
72214  __Pyx_GOTREF(__pyx_t_1);
72215  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72216  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
72217  }
72218  __pyx_L13:;
72219 
72220  /* "mbd/CouplingFSI.pyx":3276
72221  * cdef bool mesh_search = False
72222  * cdef bool dist_search = False
72223  * if self.ProtChSystem.model is not None and self.external_forces_from_ns is True: # <<<<<<<<<<<<<<
72224  * mesh_search = True
72225  * if self.ProtChSystem.dist_search is True:
72226  */
72227  }
72228 
72229  /* "mbd/CouplingFSI.pyx":3287
72230  * else:
72231  * Profiling.logEvent("Starting k-d tree search for cable nodes")
72232  * for i in range(nb_nodes): # <<<<<<<<<<<<<<
72233  * if self.beam_type == "BeamEuler":
72234  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
72235  */
72236  __pyx_t_8 = __pyx_v_nb_nodes;
72237  __pyx_t_9 = __pyx_t_8;
72238  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
72239  __pyx_v_i = __pyx_t_10;
72240 
72241  /* "mbd/CouplingFSI.pyx":3288
72242  * Profiling.logEvent("Starting k-d tree search for cable nodes")
72243  * for i in range(nb_nodes):
72244  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
72245  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
72246  * else:
72247  */
72248  __pyx_t_3 = ((__pyx_v_self->beam_type == ((char const *)"BeamEuler")) != 0);
72249  if (__pyx_t_3) {
72250 
72251  /* "mbd/CouplingFSI.pyx":3289
72252  * for i in range(nb_nodes):
72253  * if self.beam_type == "BeamEuler":
72254  * vec = deref(self.thisptr.nodesRot[i]).GetPos() # <<<<<<<<<<<<<<
72255  * else:
72256  * vec = deref(self.thisptr.nodes[i]).GetPos()
72257  */
72258  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodesRot[__pyx_v_i])).GetPos();
72259 
72260  /* "mbd/CouplingFSI.pyx":3288
72261  * Profiling.logEvent("Starting k-d tree search for cable nodes")
72262  * for i in range(nb_nodes):
72263  * if self.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
72264  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
72265  * else:
72266  */
72267  goto __pyx_L16;
72268  }
72269 
72270  /* "mbd/CouplingFSI.pyx":3291
72271  * vec = deref(self.thisptr.nodesRot[i]).GetPos()
72272  * else:
72273  * vec = deref(self.thisptr.nodes[i]).GetPos() # <<<<<<<<<<<<<<
72274  * x = vec.x()
72275  * y = vec.y()
72276  */
72277  /*else*/ {
72278  __pyx_v_vec = (*(__pyx_v_self->thisptr->nodes[__pyx_v_i])).GetPos();
72279  }
72280  __pyx_L16:;
72281 
72282  /* "mbd/CouplingFSI.pyx":3292
72283  * else:
72284  * vec = deref(self.thisptr.nodes[i]).GetPos()
72285  * x = vec.x() # <<<<<<<<<<<<<<
72286  * y = vec.y()
72287  * z = vec.z()
72288  */
72289  __pyx_v_x = __pyx_v_vec.x();
72290 
72291  /* "mbd/CouplingFSI.pyx":3293
72292  * vec = deref(self.thisptr.nodes[i]).GetPos()
72293  * x = vec.x()
72294  * y = vec.y() # <<<<<<<<<<<<<<
72295  * z = vec.z()
72296  * coords = np.array([x, y, z])
72297  */
72298  __pyx_v_y = __pyx_v_vec.y();
72299 
72300  /* "mbd/CouplingFSI.pyx":3294
72301  * x = vec.x()
72302  * y = vec.y()
72303  * z = vec.z() # <<<<<<<<<<<<<<
72304  * coords = np.array([x, y, z])
72305  * vel_arr = np.zeros(3)
72306  */
72307  __pyx_v_z = __pyx_v_vec.z();
72308 
72309  /* "mbd/CouplingFSI.pyx":3295
72310  * y = vec.y()
72311  * z = vec.z()
72312  * coords = np.array([x, y, z]) # <<<<<<<<<<<<<<
72313  * vel_arr = np.zeros(3)
72314  * if mesh_search is True:
72315  */
72316  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
72317  __Pyx_GOTREF(__pyx_t_4);
72318  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3295, __pyx_L1_error)
72319  __Pyx_GOTREF(__pyx_t_6);
72320  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72321  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
72322  __Pyx_GOTREF(__pyx_t_4);
72323  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3295, __pyx_L1_error)
72324  __Pyx_GOTREF(__pyx_t_5);
72325  __pyx_t_11 = PyFloat_FromDouble(__pyx_v_z); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3295, __pyx_L1_error)
72326  __Pyx_GOTREF(__pyx_t_11);
72327  __pyx_t_12 = PyList_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3295, __pyx_L1_error)
72328  __Pyx_GOTREF(__pyx_t_12);
72329  __Pyx_GIVEREF(__pyx_t_4);
72330  PyList_SET_ITEM(__pyx_t_12, 0, __pyx_t_4);
72331  __Pyx_GIVEREF(__pyx_t_5);
72332  PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_5);
72333  __Pyx_GIVEREF(__pyx_t_11);
72334  PyList_SET_ITEM(__pyx_t_12, 2, __pyx_t_11);
72335  __pyx_t_4 = 0;
72336  __pyx_t_5 = 0;
72337  __pyx_t_11 = 0;
72338  __pyx_t_11 = NULL;
72339  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
72340  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
72341  if (likely(__pyx_t_11)) {
72342  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
72343  __Pyx_INCREF(__pyx_t_11);
72344  __Pyx_INCREF(function);
72345  __Pyx_DECREF_SET(__pyx_t_6, function);
72346  }
72347  }
72348  __pyx_t_1 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_11, __pyx_t_12) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_12);
72349  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
72350  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72351  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3295, __pyx_L1_error)
72352  __Pyx_GOTREF(__pyx_t_1);
72353  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72354  __Pyx_XDECREF_SET(__pyx_v_coords, __pyx_t_1);
72355  __pyx_t_1 = 0;
72356 
72357  /* "mbd/CouplingFSI.pyx":3296
72358  * z = vec.z()
72359  * coords = np.array([x, y, z])
72360  * vel_arr = np.zeros(3) # <<<<<<<<<<<<<<
72361  * if mesh_search is True:
72362  * vel_grad_arr = np.zeros(3)
72363  */
72364  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3296, __pyx_L1_error)
72365  __Pyx_GOTREF(__pyx_t_6);
72366  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3296, __pyx_L1_error)
72367  __Pyx_GOTREF(__pyx_t_12);
72368  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72369  __pyx_t_6 = NULL;
72370  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
72371  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
72372  if (likely(__pyx_t_6)) {
72373  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
72374  __Pyx_INCREF(__pyx_t_6);
72375  __Pyx_INCREF(function);
72376  __Pyx_DECREF_SET(__pyx_t_12, function);
72377  }
72378  }
72379  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_int_3);
72380  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
72381  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3296, __pyx_L1_error)
72382  __Pyx_GOTREF(__pyx_t_1);
72383  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72384  __Pyx_XDECREF_SET(__pyx_v_vel_arr, __pyx_t_1);
72385  __pyx_t_1 = 0;
72386 
72387  /* "mbd/CouplingFSI.pyx":3297
72388  * coords = np.array([x, y, z])
72389  * vel_arr = np.zeros(3)
72390  * if mesh_search is True: # <<<<<<<<<<<<<<
72391  * vel_grad_arr = np.zeros(3)
72392  * if dist_search is True:
72393  */
72394  __pyx_t_3 = ((__pyx_v_mesh_search == 1) != 0);
72395  if (__pyx_t_3) {
72396 
72397  /* "mbd/CouplingFSI.pyx":3298
72398  * vel_arr = np.zeros(3)
72399  * if mesh_search is True:
72400  * vel_grad_arr = np.zeros(3) # <<<<<<<<<<<<<<
72401  * if dist_search is True:
72402  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsDist(coords=coords[:self.nd],
72403  */
72404  __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_np); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3298, __pyx_L1_error)
72405  __Pyx_GOTREF(__pyx_t_12);
72406  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3298, __pyx_L1_error)
72407  __Pyx_GOTREF(__pyx_t_6);
72408  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72409  __pyx_t_12 = NULL;
72410  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
72411  __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_6);
72412  if (likely(__pyx_t_12)) {
72413  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
72414  __Pyx_INCREF(__pyx_t_12);
72415  __Pyx_INCREF(function);
72416  __Pyx_DECREF_SET(__pyx_t_6, function);
72417  }
72418  }
72419  __pyx_t_1 = (__pyx_t_12) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_12, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_int_3);
72420  __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
72421  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error)
72422  __Pyx_GOTREF(__pyx_t_1);
72423  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72424  __Pyx_XDECREF_SET(__pyx_v_vel_grad_arr, __pyx_t_1);
72425  __pyx_t_1 = 0;
72426 
72427  /* "mbd/CouplingFSI.pyx":3299
72428  * if mesh_search is True:
72429  * vel_grad_arr = np.zeros(3)
72430  * if dist_search is True: # <<<<<<<<<<<<<<
72431  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsDist(coords=coords[:self.nd],
72432  * node_guess=self.nearest_node_array[i],
72433  */
72434  __pyx_t_3 = ((__pyx_v_dist_search == 1) != 0);
72435  if (__pyx_t_3) {
72436 
72437  /* "mbd/CouplingFSI.pyx":3300
72438  * vel_grad_arr = np.zeros(3)
72439  * if dist_search is True:
72440  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsDist(coords=coords[:self.nd], # <<<<<<<<<<<<<<
72441  * node_guess=self.nearest_node_array[i],
72442  * eN_guess=self.containing_element_array[i],
72443  */
72444  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ProtChSystem), __pyx_n_s_findElementContainingCoordsDist); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3300, __pyx_L1_error)
72445  __Pyx_GOTREF(__pyx_t_1);
72446  __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3300, __pyx_L1_error)
72447  __Pyx_GOTREF(__pyx_t_6);
72448  __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_v_coords, 0, __pyx_v_self->nd, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3300, __pyx_L1_error)
72449  __Pyx_GOTREF(__pyx_t_12);
72450  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_coords, __pyx_t_12) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
72451  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72452 
72453  /* "mbd/CouplingFSI.pyx":3301
72454  * if dist_search is True:
72455  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsDist(coords=coords[:self.nd],
72456  * node_guess=self.nearest_node_array[i], # <<<<<<<<<<<<<<
72457  * eN_guess=self.containing_element_array[i],
72458  * rank_guess=self.owning_rank[i])
72459  */
72460  if (unlikely(!__pyx_v_self->nearest_node_array.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3301, __pyx_L1_error)}
72461  __pyx_t_13 = __pyx_v_i;
72462  __pyx_t_14 = -1;
72463  if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_self->nearest_node_array.shape[0])) __pyx_t_14 = 0;
72464  if (unlikely(__pyx_t_14 != -1)) {
72465  __Pyx_RaiseBufferIndexError(__pyx_t_14);
72466  __PYX_ERR(0, 3301, __pyx_L1_error)
72467  }
72468  __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ (__pyx_v_self->nearest_node_array.data + __pyx_t_13 * __pyx_v_self->nearest_node_array.strides[0]) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3301, __pyx_L1_error)
72469  __Pyx_GOTREF(__pyx_t_12);
72470  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_node_guess, __pyx_t_12) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
72471  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72472 
72473  /* "mbd/CouplingFSI.pyx":3302
72474  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsDist(coords=coords[:self.nd],
72475  * node_guess=self.nearest_node_array[i],
72476  * eN_guess=self.containing_element_array[i], # <<<<<<<<<<<<<<
72477  * rank_guess=self.owning_rank[i])
72478  * else:
72479  */
72480  if (unlikely(!__pyx_v_self->containing_element_array.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3302, __pyx_L1_error)}
72481  __pyx_t_13 = __pyx_v_i;
72482  __pyx_t_14 = -1;
72483  if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_self->containing_element_array.shape[0])) __pyx_t_14 = 0;
72484  if (unlikely(__pyx_t_14 != -1)) {
72485  __Pyx_RaiseBufferIndexError(__pyx_t_14);
72486  __PYX_ERR(0, 3302, __pyx_L1_error)
72487  }
72488  __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ (__pyx_v_self->containing_element_array.data + __pyx_t_13 * __pyx_v_self->containing_element_array.strides[0]) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3302, __pyx_L1_error)
72489  __Pyx_GOTREF(__pyx_t_12);
72490  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_eN_guess, __pyx_t_12) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
72491  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72492 
72493  /* "mbd/CouplingFSI.pyx":3303
72494  * node_guess=self.nearest_node_array[i],
72495  * eN_guess=self.containing_element_array[i],
72496  * rank_guess=self.owning_rank[i]) # <<<<<<<<<<<<<<
72497  * else:
72498  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsKD(coords[:self.nd])
72499  */
72500  if (unlikely(!__pyx_v_self->owning_rank.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3303, __pyx_L1_error)}
72501  __pyx_t_13 = __pyx_v_i;
72502  __pyx_t_14 = -1;
72503  if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_self->owning_rank.shape[0])) __pyx_t_14 = 0;
72504  if (unlikely(__pyx_t_14 != -1)) {
72505  __Pyx_RaiseBufferIndexError(__pyx_t_14);
72506  __PYX_ERR(0, 3303, __pyx_L1_error)
72507  }
72508  __pyx_t_12 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ (__pyx_v_self->owning_rank.data + __pyx_t_13 * __pyx_v_self->owning_rank.strides[0]) )))); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3303, __pyx_L1_error)
72509  __Pyx_GOTREF(__pyx_t_12);
72510  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_rank_guess, __pyx_t_12) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
72511  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72512 
72513  /* "mbd/CouplingFSI.pyx":3300
72514  * vel_grad_arr = np.zeros(3)
72515  * if dist_search is True:
72516  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsDist(coords=coords[:self.nd], # <<<<<<<<<<<<<<
72517  * node_guess=self.nearest_node_array[i],
72518  * eN_guess=self.containing_element_array[i],
72519  */
72520  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3300, __pyx_L1_error)
72521  __Pyx_GOTREF(__pyx_t_12);
72522  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
72523  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72524  if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
72525  PyObject* sequence = __pyx_t_12;
72526  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
72527  if (unlikely(size != 4)) {
72528  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
72529  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
72530  __PYX_ERR(0, 3300, __pyx_L1_error)
72531  }
72532  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
72533  if (likely(PyTuple_CheckExact(sequence))) {
72534  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
72535  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
72536  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 2);
72537  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3);
72538  } else {
72539  __pyx_t_6 = PyList_GET_ITEM(sequence, 0);
72540  __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
72541  __pyx_t_11 = PyList_GET_ITEM(sequence, 2);
72542  __pyx_t_5 = PyList_GET_ITEM(sequence, 3);
72543  }
72544  __Pyx_INCREF(__pyx_t_6);
72545  __Pyx_INCREF(__pyx_t_1);
72546  __Pyx_INCREF(__pyx_t_11);
72547  __Pyx_INCREF(__pyx_t_5);
72548  #else
72549  {
72550  Py_ssize_t i;
72551  PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_1,&__pyx_t_11,&__pyx_t_5};
72552  for (i=0; i < 4; i++) {
72553  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3300, __pyx_L1_error)
72554  __Pyx_GOTREF(item);
72555  *(temps[i]) = item;
72556  }
72557  }
72558  #endif
72559  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72560  } else {
72561  Py_ssize_t index = -1;
72562  PyObject** temps[4] = {&__pyx_t_6,&__pyx_t_1,&__pyx_t_11,&__pyx_t_5};
72563  __pyx_t_4 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3300, __pyx_L1_error)
72564  __Pyx_GOTREF(__pyx_t_4);
72565  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72566  __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext;
72567  for (index=0; index < 4; index++) {
72568  PyObject* item = __pyx_t_15(__pyx_t_4); if (unlikely(!item)) goto __pyx_L19_unpacking_failed;
72569  __Pyx_GOTREF(item);
72570  *(temps[index]) = item;
72571  }
72572  if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_4), 4) < 0) __PYX_ERR(0, 3300, __pyx_L1_error)
72573  __pyx_t_15 = NULL;
72574  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72575  goto __pyx_L20_unpacking_done;
72576  __pyx_L19_unpacking_failed:;
72577  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72578  __pyx_t_15 = NULL;
72579  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
72580  __PYX_ERR(0, 3300, __pyx_L1_error)
72581  __pyx_L20_unpacking_done:;
72582  }
72583  __Pyx_XDECREF_SET(__pyx_v_xi, __pyx_t_6);
72584  __pyx_t_6 = 0;
72585  __Pyx_XDECREF_SET(__pyx_v_nearest_node, __pyx_t_1);
72586  __pyx_t_1 = 0;
72587  __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_11);
72588  __pyx_t_11 = 0;
72589  __Pyx_XDECREF_SET(__pyx_v_rank, __pyx_t_5);
72590  __pyx_t_5 = 0;
72591 
72592  /* "mbd/CouplingFSI.pyx":3299
72593  * if mesh_search is True:
72594  * vel_grad_arr = np.zeros(3)
72595  * if dist_search is True: # <<<<<<<<<<<<<<
72596  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsDist(coords=coords[:self.nd],
72597  * node_guess=self.nearest_node_array[i],
72598  */
72599  goto __pyx_L18;
72600  }
72601 
72602  /* "mbd/CouplingFSI.pyx":3305
72603  * rank_guess=self.owning_rank[i])
72604  * else:
72605  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsKD(coords[:self.nd]) # <<<<<<<<<<<<<<
72606  * if el is None:
72607  * el = -1
72608  */
72609  /*else*/ {
72610  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ProtChSystem), __pyx_n_s_findElementContainingCoordsKD); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3305, __pyx_L1_error)
72611  __Pyx_GOTREF(__pyx_t_5);
72612  __pyx_t_11 = __Pyx_PyObject_GetSlice(__pyx_v_coords, 0, __pyx_v_self->nd, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3305, __pyx_L1_error)
72613  __Pyx_GOTREF(__pyx_t_11);
72614  __pyx_t_1 = NULL;
72615  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
72616  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
72617  if (likely(__pyx_t_1)) {
72618  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
72619  __Pyx_INCREF(__pyx_t_1);
72620  __Pyx_INCREF(function);
72621  __Pyx_DECREF_SET(__pyx_t_5, function);
72622  }
72623  }
72624  __pyx_t_12 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_t_11) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11);
72625  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
72626  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
72627  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3305, __pyx_L1_error)
72628  __Pyx_GOTREF(__pyx_t_12);
72629  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
72630  if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
72631  PyObject* sequence = __pyx_t_12;
72632  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
72633  if (unlikely(size != 4)) {
72634  if (size > 4) __Pyx_RaiseTooManyValuesError(4);
72635  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
72636  __PYX_ERR(0, 3305, __pyx_L1_error)
72637  }
72638  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
72639  if (likely(PyTuple_CheckExact(sequence))) {
72640  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
72641  __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1);
72642  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2);
72643  __pyx_t_6 = PyTuple_GET_ITEM(sequence, 3);
72644  } else {
72645  __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
72646  __pyx_t_11 = PyList_GET_ITEM(sequence, 1);
72647  __pyx_t_1 = PyList_GET_ITEM(sequence, 2);
72648  __pyx_t_6 = PyList_GET_ITEM(sequence, 3);
72649  }
72650  __Pyx_INCREF(__pyx_t_5);
72651  __Pyx_INCREF(__pyx_t_11);
72652  __Pyx_INCREF(__pyx_t_1);
72653  __Pyx_INCREF(__pyx_t_6);
72654  #else
72655  {
72656  Py_ssize_t i;
72657  PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_11,&__pyx_t_1,&__pyx_t_6};
72658  for (i=0; i < 4; i++) {
72659  PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 3305, __pyx_L1_error)
72660  __Pyx_GOTREF(item);
72661  *(temps[i]) = item;
72662  }
72663  }
72664  #endif
72665  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72666  } else {
72667  Py_ssize_t index = -1;
72668  PyObject** temps[4] = {&__pyx_t_5,&__pyx_t_11,&__pyx_t_1,&__pyx_t_6};
72669  __pyx_t_4 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3305, __pyx_L1_error)
72670  __Pyx_GOTREF(__pyx_t_4);
72671  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72672  __pyx_t_15 = Py_TYPE(__pyx_t_4)->tp_iternext;
72673  for (index=0; index < 4; index++) {
72674  PyObject* item = __pyx_t_15(__pyx_t_4); if (unlikely(!item)) goto __pyx_L21_unpacking_failed;
72675  __Pyx_GOTREF(item);
72676  *(temps[index]) = item;
72677  }
72678  if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_4), 4) < 0) __PYX_ERR(0, 3305, __pyx_L1_error)
72679  __pyx_t_15 = NULL;
72680  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72681  goto __pyx_L22_unpacking_done;
72682  __pyx_L21_unpacking_failed:;
72683  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
72684  __pyx_t_15 = NULL;
72685  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
72686  __PYX_ERR(0, 3305, __pyx_L1_error)
72687  __pyx_L22_unpacking_done:;
72688  }
72689  __Pyx_XDECREF_SET(__pyx_v_xi, __pyx_t_5);
72690  __pyx_t_5 = 0;
72691  __Pyx_XDECREF_SET(__pyx_v_nearest_node, __pyx_t_11);
72692  __pyx_t_11 = 0;
72693  __Pyx_XDECREF_SET(__pyx_v_el, __pyx_t_1);
72694  __pyx_t_1 = 0;
72695  __Pyx_XDECREF_SET(__pyx_v_rank, __pyx_t_6);
72696  __pyx_t_6 = 0;
72697  }
72698  __pyx_L18:;
72699 
72700  /* "mbd/CouplingFSI.pyx":3306
72701  * else:
72702  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsKD(coords[:self.nd])
72703  * if el is None: # <<<<<<<<<<<<<<
72704  * el = -1
72705  * self.nearest_node_array[i] = nearest_node
72706  */
72707  __pyx_t_3 = (__pyx_v_el == Py_None);
72708  __pyx_t_7 = (__pyx_t_3 != 0);
72709  if (__pyx_t_7) {
72710 
72711  /* "mbd/CouplingFSI.pyx":3307
72712  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsKD(coords[:self.nd])
72713  * if el is None:
72714  * el = -1 # <<<<<<<<<<<<<<
72715  * self.nearest_node_array[i] = nearest_node
72716  * self.containing_element_array[i] = el
72717  */
72718  __Pyx_INCREF(__pyx_int_neg_1);
72719  __Pyx_DECREF_SET(__pyx_v_el, __pyx_int_neg_1);
72720 
72721  /* "mbd/CouplingFSI.pyx":3306
72722  * else:
72723  * xi, nearest_node, el, rank = self.ProtChSystem.findElementContainingCoordsKD(coords[:self.nd])
72724  * if el is None: # <<<<<<<<<<<<<<
72725  * el = -1
72726  * self.nearest_node_array[i] = nearest_node
72727  */
72728  }
72729 
72730  /* "mbd/CouplingFSI.pyx":3308
72731  * if el is None:
72732  * el = -1
72733  * self.nearest_node_array[i] = nearest_node # <<<<<<<<<<<<<<
72734  * self.containing_element_array[i] = el
72735  * self.owning_rank[i] = rank
72736  */
72737  __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_nearest_node); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3308, __pyx_L1_error)
72738  if (unlikely(!__pyx_v_self->nearest_node_array.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3308, __pyx_L1_error)}
72739  __pyx_t_13 = __pyx_v_i;
72740  __pyx_t_16 = -1;
72741  if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_self->nearest_node_array.shape[0])) __pyx_t_16 = 0;
72742  if (unlikely(__pyx_t_16 != -1)) {
72743  __Pyx_RaiseBufferIndexError(__pyx_t_16);
72744  __PYX_ERR(0, 3308, __pyx_L1_error)
72745  }
72746  *((int *) ( /* dim=0 */ (__pyx_v_self->nearest_node_array.data + __pyx_t_13 * __pyx_v_self->nearest_node_array.strides[0]) )) = __pyx_t_14;
72747 
72748  /* "mbd/CouplingFSI.pyx":3309
72749  * el = -1
72750  * self.nearest_node_array[i] = nearest_node
72751  * self.containing_element_array[i] = el # <<<<<<<<<<<<<<
72752  * self.owning_rank[i] = rank
72753  * comm.barrier()
72754  */
72755  __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_el); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3309, __pyx_L1_error)
72756  if (unlikely(!__pyx_v_self->containing_element_array.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3309, __pyx_L1_error)}
72757  __pyx_t_13 = __pyx_v_i;
72758  __pyx_t_16 = -1;
72759  if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_self->containing_element_array.shape[0])) __pyx_t_16 = 0;
72760  if (unlikely(__pyx_t_16 != -1)) {
72761  __Pyx_RaiseBufferIndexError(__pyx_t_16);
72762  __PYX_ERR(0, 3309, __pyx_L1_error)
72763  }
72764  *((int *) ( /* dim=0 */ (__pyx_v_self->containing_element_array.data + __pyx_t_13 * __pyx_v_self->containing_element_array.strides[0]) )) = __pyx_t_14;
72765 
72766  /* "mbd/CouplingFSI.pyx":3310
72767  * self.nearest_node_array[i] = nearest_node
72768  * self.containing_element_array[i] = el
72769  * self.owning_rank[i] = rank # <<<<<<<<<<<<<<
72770  * comm.barrier()
72771  * if rank is not None and xi is not None:
72772  */
72773  __pyx_t_14 = __Pyx_PyInt_As_int(__pyx_v_rank); if (unlikely((__pyx_t_14 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3310, __pyx_L1_error)
72774  if (unlikely(!__pyx_v_self->owning_rank.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(0, 3310, __pyx_L1_error)}
72775  __pyx_t_13 = __pyx_v_i;
72776  __pyx_t_16 = -1;
72777  if (unlikely(__pyx_t_13 >= (size_t)__pyx_v_self->owning_rank.shape[0])) __pyx_t_16 = 0;
72778  if (unlikely(__pyx_t_16 != -1)) {
72779  __Pyx_RaiseBufferIndexError(__pyx_t_16);
72780  __PYX_ERR(0, 3310, __pyx_L1_error)
72781  }
72782  *((int *) ( /* dim=0 */ (__pyx_v_self->owning_rank.data + __pyx_t_13 * __pyx_v_self->owning_rank.strides[0]) )) = __pyx_t_14;
72783 
72784  /* "mbd/CouplingFSI.pyx":3311
72785  * self.containing_element_array[i] = el
72786  * self.owning_rank[i] = rank
72787  * comm.barrier() # <<<<<<<<<<<<<<
72788  * if rank is not None and xi is not None:
72789  * vel_arr[:] = self.ProtChSystem.getFluidVelocityLocalCoords(xi, el, rank)
72790  */
72791  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3311, __pyx_L1_error)
72792  __Pyx_GOTREF(__pyx_t_6);
72793  __pyx_t_1 = NULL;
72794  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
72795  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
72796  if (likely(__pyx_t_1)) {
72797  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
72798  __Pyx_INCREF(__pyx_t_1);
72799  __Pyx_INCREF(function);
72800  __Pyx_DECREF_SET(__pyx_t_6, function);
72801  }
72802  }
72803  __pyx_t_12 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
72804  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
72805  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3311, __pyx_L1_error)
72806  __Pyx_GOTREF(__pyx_t_12);
72807  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72808  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72809 
72810  /* "mbd/CouplingFSI.pyx":3312
72811  * self.owning_rank[i] = rank
72812  * comm.barrier()
72813  * if rank is not None and xi is not None: # <<<<<<<<<<<<<<
72814  * vel_arr[:] = self.ProtChSystem.getFluidVelocityLocalCoords(xi, el, rank)
72815  * else: # means node is outside domain
72816  */
72817  __pyx_t_3 = (__pyx_v_rank != Py_None);
72818  __pyx_t_2 = (__pyx_t_3 != 0);
72819  if (__pyx_t_2) {
72820  } else {
72821  __pyx_t_7 = __pyx_t_2;
72822  goto __pyx_L25_bool_binop_done;
72823  }
72824  __pyx_t_2 = (__pyx_v_xi != Py_None);
72825  __pyx_t_3 = (__pyx_t_2 != 0);
72826  __pyx_t_7 = __pyx_t_3;
72827  __pyx_L25_bool_binop_done:;
72828  if (__pyx_t_7) {
72829 
72830  /* "mbd/CouplingFSI.pyx":3313
72831  * comm.barrier()
72832  * if rank is not None and xi is not None:
72833  * vel_arr[:] = self.ProtChSystem.getFluidVelocityLocalCoords(xi, el, rank) # <<<<<<<<<<<<<<
72834  * else: # means node is outside domain
72835  * if self.fluid_velocity_function is not None:
72836  */
72837  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ProtChSystem), __pyx_n_s_getFluidVelocityLocalCoords); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3313, __pyx_L1_error)
72838  __Pyx_GOTREF(__pyx_t_6);
72839  __pyx_t_1 = NULL;
72840  __pyx_t_14 = 0;
72841  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
72842  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
72843  if (likely(__pyx_t_1)) {
72844  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
72845  __Pyx_INCREF(__pyx_t_1);
72846  __Pyx_INCREF(function);
72847  __Pyx_DECREF_SET(__pyx_t_6, function);
72848  __pyx_t_14 = 1;
72849  }
72850  }
72851  #if CYTHON_FAST_PYCALL
72852  if (PyFunction_Check(__pyx_t_6)) {
72853  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_xi, __pyx_v_el, __pyx_v_rank};
72854  __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3313, __pyx_L1_error)
72855  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
72856  __Pyx_GOTREF(__pyx_t_12);
72857  } else
72858  #endif
72859  #if CYTHON_FAST_PYCCALL
72860  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
72861  PyObject *__pyx_temp[4] = {__pyx_t_1, __pyx_v_xi, __pyx_v_el, __pyx_v_rank};
72862  __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_14, 3+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3313, __pyx_L1_error)
72863  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
72864  __Pyx_GOTREF(__pyx_t_12);
72865  } else
72866  #endif
72867  {
72868  __pyx_t_11 = PyTuple_New(3+__pyx_t_14); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3313, __pyx_L1_error)
72869  __Pyx_GOTREF(__pyx_t_11);
72870  if (__pyx_t_1) {
72871  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
72872  }
72873  __Pyx_INCREF(__pyx_v_xi);
72874  __Pyx_GIVEREF(__pyx_v_xi);
72875  PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_14, __pyx_v_xi);
72876  __Pyx_INCREF(__pyx_v_el);
72877  __Pyx_GIVEREF(__pyx_v_el);
72878  PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_14, __pyx_v_el);
72879  __Pyx_INCREF(__pyx_v_rank);
72880  __Pyx_GIVEREF(__pyx_v_rank);
72881  PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_14, __pyx_v_rank);
72882  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3313, __pyx_L1_error)
72883  __Pyx_GOTREF(__pyx_t_12);
72884  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
72885  }
72886  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72887  if (__Pyx_PyObject_SetSlice(__pyx_v_vel_arr, __pyx_t_12, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 3313, __pyx_L1_error)
72888  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72889 
72890  /* "mbd/CouplingFSI.pyx":3312
72891  * self.owning_rank[i] = rank
72892  * comm.barrier()
72893  * if rank is not None and xi is not None: # <<<<<<<<<<<<<<
72894  * vel_arr[:] = self.ProtChSystem.getFluidVelocityLocalCoords(xi, el, rank)
72895  * else: # means node is outside domain
72896  */
72897  goto __pyx_L24;
72898  }
72899 
72900  /* "mbd/CouplingFSI.pyx":3315
72901  * vel_arr[:] = self.ProtChSystem.getFluidVelocityLocalCoords(xi, el, rank)
72902  * else: # means node is outside domain
72903  * if self.fluid_velocity_function is not None: # <<<<<<<<<<<<<<
72904  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t)
72905  * else:
72906  */
72907  /*else*/ {
72908  __pyx_t_7 = (__pyx_v_self->fluid_velocity_function != Py_None);
72909  __pyx_t_3 = (__pyx_t_7 != 0);
72910  if (__pyx_t_3) {
72911 
72912  /* "mbd/CouplingFSI.pyx":3316
72913  * else: # means node is outside domain
72914  * if self.fluid_velocity_function is not None:
72915  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t) # <<<<<<<<<<<<<<
72916  * else:
72917  * vel_arr[:] = 0.
72918  */
72919  __pyx_t_6 = PyFloat_FromDouble(__pyx_v_self->ProtChSystem->t); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3316, __pyx_L1_error)
72920  __Pyx_GOTREF(__pyx_t_6);
72921  __Pyx_INCREF(__pyx_v_self->fluid_velocity_function);
72922  __pyx_t_11 = __pyx_v_self->fluid_velocity_function; __pyx_t_1 = NULL;
72923  __pyx_t_14 = 0;
72924  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
72925  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
72926  if (likely(__pyx_t_1)) {
72927  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
72928  __Pyx_INCREF(__pyx_t_1);
72929  __Pyx_INCREF(function);
72930  __Pyx_DECREF_SET(__pyx_t_11, function);
72931  __pyx_t_14 = 1;
72932  }
72933  }
72934  #if CYTHON_FAST_PYCALL
72935  if (PyFunction_Check(__pyx_t_11)) {
72936  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_coords, __pyx_t_6};
72937  __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3316, __pyx_L1_error)
72938  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
72939  __Pyx_GOTREF(__pyx_t_12);
72940  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72941  } else
72942  #endif
72943  #if CYTHON_FAST_PYCCALL
72944  if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
72945  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_coords, __pyx_t_6};
72946  __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3316, __pyx_L1_error)
72947  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
72948  __Pyx_GOTREF(__pyx_t_12);
72949  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
72950  } else
72951  #endif
72952  {
72953  __pyx_t_5 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3316, __pyx_L1_error)
72954  __Pyx_GOTREF(__pyx_t_5);
72955  if (__pyx_t_1) {
72956  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
72957  }
72958  __Pyx_INCREF(__pyx_v_coords);
72959  __Pyx_GIVEREF(__pyx_v_coords);
72960  PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_14, __pyx_v_coords);
72961  __Pyx_GIVEREF(__pyx_t_6);
72962  PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_14, __pyx_t_6);
72963  __pyx_t_6 = 0;
72964  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_5, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3316, __pyx_L1_error)
72965  __Pyx_GOTREF(__pyx_t_12);
72966  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
72967  }
72968  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
72969  if (__Pyx_PyObject_SetSlice(__pyx_v_vel_arr, __pyx_t_12, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 3316, __pyx_L1_error)
72970  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
72971 
72972  /* "mbd/CouplingFSI.pyx":3315
72973  * vel_arr[:] = self.ProtChSystem.getFluidVelocityLocalCoords(xi, el, rank)
72974  * else: # means node is outside domain
72975  * if self.fluid_velocity_function is not None: # <<<<<<<<<<<<<<
72976  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t)
72977  * else:
72978  */
72979  goto __pyx_L27;
72980  }
72981 
72982  /* "mbd/CouplingFSI.pyx":3318
72983  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t)
72984  * else:
72985  * vel_arr[:] = 0. # <<<<<<<<<<<<<<
72986  * comm.barrier()
72987  * else:
72988  */
72989  /*else*/ {
72990  if (__Pyx_PyObject_SetSlice(__pyx_v_vel_arr, __pyx_float_0_, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 3318, __pyx_L1_error)
72991  }
72992  __pyx_L27:;
72993  }
72994  __pyx_L24:;
72995 
72996  /* "mbd/CouplingFSI.pyx":3319
72997  * else:
72998  * vel_arr[:] = 0.
72999  * comm.barrier() # <<<<<<<<<<<<<<
73000  * else:
73001  * if self.fluid_velocity_function is not None:
73002  */
73003  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_comm, __pyx_n_s_barrier); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3319, __pyx_L1_error)
73004  __Pyx_GOTREF(__pyx_t_11);
73005  __pyx_t_5 = NULL;
73006  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
73007  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
73008  if (likely(__pyx_t_5)) {
73009  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
73010  __Pyx_INCREF(__pyx_t_5);
73011  __Pyx_INCREF(function);
73012  __Pyx_DECREF_SET(__pyx_t_11, function);
73013  }
73014  }
73015  __pyx_t_12 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_11);
73016  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
73017  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3319, __pyx_L1_error)
73018  __Pyx_GOTREF(__pyx_t_12);
73019  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
73020  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73021 
73022  /* "mbd/CouplingFSI.pyx":3297
73023  * coords = np.array([x, y, z])
73024  * vel_arr = np.zeros(3)
73025  * if mesh_search is True: # <<<<<<<<<<<<<<
73026  * vel_grad_arr = np.zeros(3)
73027  * if dist_search is True:
73028  */
73029  goto __pyx_L17;
73030  }
73031 
73032  /* "mbd/CouplingFSI.pyx":3321
73033  * comm.barrier()
73034  * else:
73035  * if self.fluid_velocity_function is not None: # <<<<<<<<<<<<<<
73036  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t)
73037  * else:
73038  */
73039  /*else*/ {
73040  __pyx_t_3 = (__pyx_v_self->fluid_velocity_function != Py_None);
73041  __pyx_t_7 = (__pyx_t_3 != 0);
73042  if (__pyx_t_7) {
73043 
73044  /* "mbd/CouplingFSI.pyx":3322
73045  * else:
73046  * if self.fluid_velocity_function is not None:
73047  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t) # <<<<<<<<<<<<<<
73048  * else:
73049  * vel_arr[:] = 0
73050  */
73051  __pyx_t_11 = PyFloat_FromDouble(__pyx_v_self->ProtChSystem->t); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3322, __pyx_L1_error)
73052  __Pyx_GOTREF(__pyx_t_11);
73053  __Pyx_INCREF(__pyx_v_self->fluid_velocity_function);
73054  __pyx_t_5 = __pyx_v_self->fluid_velocity_function; __pyx_t_6 = NULL;
73055  __pyx_t_14 = 0;
73056  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
73057  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
73058  if (likely(__pyx_t_6)) {
73059  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
73060  __Pyx_INCREF(__pyx_t_6);
73061  __Pyx_INCREF(function);
73062  __Pyx_DECREF_SET(__pyx_t_5, function);
73063  __pyx_t_14 = 1;
73064  }
73065  }
73066  #if CYTHON_FAST_PYCALL
73067  if (PyFunction_Check(__pyx_t_5)) {
73068  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_coords, __pyx_t_11};
73069  __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3322, __pyx_L1_error)
73070  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
73071  __Pyx_GOTREF(__pyx_t_12);
73072  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
73073  } else
73074  #endif
73075  #if CYTHON_FAST_PYCCALL
73076  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
73077  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_coords, __pyx_t_11};
73078  __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3322, __pyx_L1_error)
73079  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
73080  __Pyx_GOTREF(__pyx_t_12);
73081  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
73082  } else
73083  #endif
73084  {
73085  __pyx_t_1 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3322, __pyx_L1_error)
73086  __Pyx_GOTREF(__pyx_t_1);
73087  if (__pyx_t_6) {
73088  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
73089  }
73090  __Pyx_INCREF(__pyx_v_coords);
73091  __Pyx_GIVEREF(__pyx_v_coords);
73092  PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_14, __pyx_v_coords);
73093  __Pyx_GIVEREF(__pyx_t_11);
73094  PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_14, __pyx_t_11);
73095  __pyx_t_11 = 0;
73096  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3322, __pyx_L1_error)
73097  __Pyx_GOTREF(__pyx_t_12);
73098  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73099  }
73100  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
73101  if (__Pyx_PyObject_SetSlice(__pyx_v_vel_arr, __pyx_t_12, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 3322, __pyx_L1_error)
73102  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73103 
73104  /* "mbd/CouplingFSI.pyx":3321
73105  * comm.barrier()
73106  * else:
73107  * if self.fluid_velocity_function is not None: # <<<<<<<<<<<<<<
73108  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t)
73109  * else:
73110  */
73111  goto __pyx_L28;
73112  }
73113 
73114  /* "mbd/CouplingFSI.pyx":3324
73115  * vel_arr[:] = self.fluid_velocity_function(coords, self.ProtChSystem.t)
73116  * else:
73117  * vel_arr[:] = 0 # <<<<<<<<<<<<<<
73118  * self.fluid_velocity_array[i] = vel_arr
73119  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73120  */
73121  /*else*/ {
73122  if (__Pyx_PyObject_SetSlice(__pyx_v_vel_arr, __pyx_int_0, 0, 0, NULL, NULL, &__pyx_slice__30, 0, 0, 1) < 0) __PYX_ERR(0, 3324, __pyx_L1_error)
73123  }
73124  __pyx_L28:;
73125  }
73126  __pyx_L17:;
73127 
73128  /* "mbd/CouplingFSI.pyx":3325
73129  * else:
73130  * vel_arr[:] = 0
73131  * self.fluid_velocity_array[i] = vel_arr # <<<<<<<<<<<<<<
73132  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73133  * if self.fluid_velocity_function is not None and fluid_velocity_array is None:
73134  */
73135  if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_self->fluid_velocity_array), __pyx_v_i, __pyx_v_vel_arr, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3325, __pyx_L1_error)
73136 
73137  /* "mbd/CouplingFSI.pyx":3326
73138  * vel_arr[:] = 0
73139  * self.fluid_velocity_array[i] = vel_arr
73140  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2]) # <<<<<<<<<<<<<<
73141  * if self.fluid_velocity_function is not None and fluid_velocity_array is None:
73142  * vel_arr = self.fluid_velocity_function(coords, self.ProtChSystem.t)
73143  */
73144  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_vel_arr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3326, __pyx_L1_error)
73145  __Pyx_GOTREF(__pyx_t_12);
73146  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3326, __pyx_L1_error)
73147  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73148  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_vel_arr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3326, __pyx_L1_error)
73149  __Pyx_GOTREF(__pyx_t_12);
73150  __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_18 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3326, __pyx_L1_error)
73151  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73152  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_vel_arr, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3326, __pyx_L1_error)
73153  __Pyx_GOTREF(__pyx_t_12);
73154  __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3326, __pyx_L1_error)
73155  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73156  __pyx_v_vel = ChVector<double> (__pyx_t_17, __pyx_t_18, __pyx_t_19);
73157 
73158  /* "mbd/CouplingFSI.pyx":3327
73159  * self.fluid_velocity_array[i] = vel_arr
73160  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73161  * if self.fluid_velocity_function is not None and fluid_velocity_array is None: # <<<<<<<<<<<<<<
73162  * vel_arr = self.fluid_velocity_function(coords, self.ProtChSystem.t)
73163  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73164  */
73165  __pyx_t_3 = (__pyx_v_self->fluid_velocity_function != Py_None);
73166  __pyx_t_2 = (__pyx_t_3 != 0);
73167  if (__pyx_t_2) {
73168  } else {
73169  __pyx_t_7 = __pyx_t_2;
73170  goto __pyx_L30_bool_binop_done;
73171  }
73172  __pyx_t_2 = (__pyx_v_fluid_velocity_array == Py_None);
73173  __pyx_t_3 = (__pyx_t_2 != 0);
73174  __pyx_t_7 = __pyx_t_3;
73175  __pyx_L30_bool_binop_done:;
73176  if (__pyx_t_7) {
73177 
73178  /* "mbd/CouplingFSI.pyx":3328
73179  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73180  * if self.fluid_velocity_function is not None and fluid_velocity_array is None:
73181  * vel_arr = self.fluid_velocity_function(coords, self.ProtChSystem.t) # <<<<<<<<<<<<<<
73182  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73183  * else:
73184  */
73185  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_self->ProtChSystem->t); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3328, __pyx_L1_error)
73186  __Pyx_GOTREF(__pyx_t_5);
73187  __Pyx_INCREF(__pyx_v_self->fluid_velocity_function);
73188  __pyx_t_1 = __pyx_v_self->fluid_velocity_function; __pyx_t_11 = NULL;
73189  __pyx_t_14 = 0;
73190  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
73191  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
73192  if (likely(__pyx_t_11)) {
73193  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
73194  __Pyx_INCREF(__pyx_t_11);
73195  __Pyx_INCREF(function);
73196  __Pyx_DECREF_SET(__pyx_t_1, function);
73197  __pyx_t_14 = 1;
73198  }
73199  }
73200  #if CYTHON_FAST_PYCALL
73201  if (PyFunction_Check(__pyx_t_1)) {
73202  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_coords, __pyx_t_5};
73203  __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3328, __pyx_L1_error)
73204  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
73205  __Pyx_GOTREF(__pyx_t_12);
73206  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
73207  } else
73208  #endif
73209  #if CYTHON_FAST_PYCCALL
73210  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
73211  PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_coords, __pyx_t_5};
73212  __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_14, 2+__pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3328, __pyx_L1_error)
73213  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
73214  __Pyx_GOTREF(__pyx_t_12);
73215  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
73216  } else
73217  #endif
73218  {
73219  __pyx_t_6 = PyTuple_New(2+__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3328, __pyx_L1_error)
73220  __Pyx_GOTREF(__pyx_t_6);
73221  if (__pyx_t_11) {
73222  __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_11); __pyx_t_11 = NULL;
73223  }
73224  __Pyx_INCREF(__pyx_v_coords);
73225  __Pyx_GIVEREF(__pyx_v_coords);
73226  PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_14, __pyx_v_coords);
73227  __Pyx_GIVEREF(__pyx_t_5);
73228  PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_14, __pyx_t_5);
73229  __pyx_t_5 = 0;
73230  __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3328, __pyx_L1_error)
73231  __Pyx_GOTREF(__pyx_t_12);
73232  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
73233  }
73234  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73235  __Pyx_DECREF_SET(__pyx_v_vel_arr, __pyx_t_12);
73236  __pyx_t_12 = 0;
73237 
73238  /* "mbd/CouplingFSI.pyx":3329
73239  * if self.fluid_velocity_function is not None and fluid_velocity_array is None:
73240  * vel_arr = self.fluid_velocity_function(coords, self.ProtChSystem.t)
73241  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2]) # <<<<<<<<<<<<<<
73242  * else:
73243  * vel = ch.ChVector[double](self.fluid_velocity_array[i][0], self.fluid_velocity_array[i][1], self.fluid_velocity_array[i][2])
73244  */
73245  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_vel_arr, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3329, __pyx_L1_error)
73246  __Pyx_GOTREF(__pyx_t_12);
73247  __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3329, __pyx_L1_error)
73248  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73249  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_vel_arr, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3329, __pyx_L1_error)
73250  __Pyx_GOTREF(__pyx_t_12);
73251  __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_18 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3329, __pyx_L1_error)
73252  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73253  __pyx_t_12 = __Pyx_GetItemInt(__pyx_v_vel_arr, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3329, __pyx_L1_error)
73254  __Pyx_GOTREF(__pyx_t_12);
73255  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3329, __pyx_L1_error)
73256  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73257  __pyx_v_vel = ChVector<double> (__pyx_t_19, __pyx_t_18, __pyx_t_17);
73258 
73259  /* "mbd/CouplingFSI.pyx":3327
73260  * self.fluid_velocity_array[i] = vel_arr
73261  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73262  * if self.fluid_velocity_function is not None and fluid_velocity_array is None: # <<<<<<<<<<<<<<
73263  * vel_arr = self.fluid_velocity_function(coords, self.ProtChSystem.t)
73264  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73265  */
73266  goto __pyx_L29;
73267  }
73268 
73269  /* "mbd/CouplingFSI.pyx":3331
73270  * vel = ch.ChVector[double](vel_arr[0], vel_arr[1], vel_arr[2])
73271  * else:
73272  * vel = ch.ChVector[double](self.fluid_velocity_array[i][0], self.fluid_velocity_array[i][1], self.fluid_velocity_array[i][2]) # <<<<<<<<<<<<<<
73273  * fluid_velocity.push_back(vel)
73274  * self.fluid_acceleration_array[i] = (self.fluid_velocity_array[i]-self.fluid_velocity_array_previous[i])/self.ProtChSystem.proteus_dt
73275  */
73276  /*else*/ {
73277  __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_velocity_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3331, __pyx_L1_error)
73278  __Pyx_GOTREF(__pyx_t_12);
73279  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_12, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3331, __pyx_L1_error)
73280  __Pyx_GOTREF(__pyx_t_1);
73281  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73282  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3331, __pyx_L1_error)
73283  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73284  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_velocity_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3331, __pyx_L1_error)
73285  __Pyx_GOTREF(__pyx_t_1);
73286  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3331, __pyx_L1_error)
73287  __Pyx_GOTREF(__pyx_t_12);
73288  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73289  __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_18 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3331, __pyx_L1_error)
73290  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73291  __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_velocity_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3331, __pyx_L1_error)
73292  __Pyx_GOTREF(__pyx_t_12);
73293  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_12, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3331, __pyx_L1_error)
73294  __Pyx_GOTREF(__pyx_t_1);
73295  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73296  __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3331, __pyx_L1_error)
73297  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73298  __pyx_v_vel = ChVector<double> (__pyx_t_17, __pyx_t_18, __pyx_t_19);
73299  }
73300  __pyx_L29:;
73301 
73302  /* "mbd/CouplingFSI.pyx":3332
73303  * else:
73304  * vel = ch.ChVector[double](self.fluid_velocity_array[i][0], self.fluid_velocity_array[i][1], self.fluid_velocity_array[i][2])
73305  * fluid_velocity.push_back(vel) # <<<<<<<<<<<<<<
73306  * self.fluid_acceleration_array[i] = (self.fluid_velocity_array[i]-self.fluid_velocity_array_previous[i])/self.ProtChSystem.proteus_dt
73307  * # acc = du/dt+u.grad(u)
73308  */
73309  try {
73310  __pyx_v_fluid_velocity.push_back(__pyx_v_vel);
73311  } catch(...) {
73312  __Pyx_CppExn2PyErr();
73313  __PYX_ERR(0, 3332, __pyx_L1_error)
73314  }
73315 
73316  /* "mbd/CouplingFSI.pyx":3333
73317  * vel = ch.ChVector[double](self.fluid_velocity_array[i][0], self.fluid_velocity_array[i][1], self.fluid_velocity_array[i][2])
73318  * fluid_velocity.push_back(vel)
73319  * self.fluid_acceleration_array[i] = (self.fluid_velocity_array[i]-self.fluid_velocity_array_previous[i])/self.ProtChSystem.proteus_dt # <<<<<<<<<<<<<<
73320  * # acc = du/dt+u.grad(u)
73321  * #vel_grad_arr[:] = self.ProtChSystem.getFluidVelocityGradientLocalCoords(xi, el, rank)
73322  */
73323  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_velocity_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error)
73324  __Pyx_GOTREF(__pyx_t_1);
73325  __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_velocity_array_previous), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3333, __pyx_L1_error)
73326  __Pyx_GOTREF(__pyx_t_12);
73327  __pyx_t_6 = PyNumber_Subtract(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3333, __pyx_L1_error)
73328  __Pyx_GOTREF(__pyx_t_6);
73329  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73330  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73331  __pyx_t_12 = PyFloat_FromDouble(__pyx_v_self->ProtChSystem->proteus_dt); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3333, __pyx_L1_error)
73332  __Pyx_GOTREF(__pyx_t_12);
73333  __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_6, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3333, __pyx_L1_error)
73334  __Pyx_GOTREF(__pyx_t_1);
73335  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
73336  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73337  if (unlikely(__Pyx_SetItemInt(((PyObject *)__pyx_v_self->fluid_acceleration_array), __pyx_v_i, __pyx_t_1, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1) < 0)) __PYX_ERR(0, 3333, __pyx_L1_error)
73338  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73339 
73340  /* "mbd/CouplingFSI.pyx":3338
73341  * #acc_arr = (vel_arr-fluid_velocity_array_previous[i])/dt+vel_arr*vel_grad_arr
73342  * #arr[:self.nd] = self.ProtChSystem.findFluidVelocityAtCoords(coords[:self.nd])
73343  * acc = ch.ChVector[double](self.fluid_acceleration_array[i][0], self.fluid_acceleration_array[i][1], self.fluid_acceleration_array[i][2]) # <<<<<<<<<<<<<<
73344  * fluid_acceleration.push_back(acc)
73345  * dens = self.fluid_density_array[i]
73346  */
73347  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_acceleration_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3338, __pyx_L1_error)
73348  __Pyx_GOTREF(__pyx_t_1);
73349  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3338, __pyx_L1_error)
73350  __Pyx_GOTREF(__pyx_t_12);
73351  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73352  __pyx_t_19 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_19 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3338, __pyx_L1_error)
73353  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73354  __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_acceleration_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3338, __pyx_L1_error)
73355  __Pyx_GOTREF(__pyx_t_12);
73356  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_12, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3338, __pyx_L1_error)
73357  __Pyx_GOTREF(__pyx_t_1);
73358  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73359  __pyx_t_18 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_18 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3338, __pyx_L1_error)
73360  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73361  __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_acceleration_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3338, __pyx_L1_error)
73362  __Pyx_GOTREF(__pyx_t_1);
73363  __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3338, __pyx_L1_error)
73364  __Pyx_GOTREF(__pyx_t_12);
73365  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73366  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3338, __pyx_L1_error)
73367  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73368  __pyx_v_acc = ChVector<double> (__pyx_t_19, __pyx_t_18, __pyx_t_17);
73369 
73370  /* "mbd/CouplingFSI.pyx":3339
73371  * #arr[:self.nd] = self.ProtChSystem.findFluidVelocityAtCoords(coords[:self.nd])
73372  * acc = ch.ChVector[double](self.fluid_acceleration_array[i][0], self.fluid_acceleration_array[i][1], self.fluid_acceleration_array[i][2])
73373  * fluid_acceleration.push_back(acc) # <<<<<<<<<<<<<<
73374  * dens = self.fluid_density_array[i]
73375  * fluid_density.push_back(dens)
73376  */
73377  try {
73378  __pyx_v_fluid_acceleration.push_back(__pyx_v_acc);
73379  } catch(...) {
73380  __Pyx_CppExn2PyErr();
73381  __PYX_ERR(0, 3339, __pyx_L1_error)
73382  }
73383 
73384  /* "mbd/CouplingFSI.pyx":3340
73385  * acc = ch.ChVector[double](self.fluid_acceleration_array[i][0], self.fluid_acceleration_array[i][1], self.fluid_acceleration_array[i][2])
73386  * fluid_acceleration.push_back(acc)
73387  * dens = self.fluid_density_array[i] # <<<<<<<<<<<<<<
73388  * fluid_density.push_back(dens)
73389  * Profiling.logEvent("Finished search for cable nodes")
73390  */
73391  __pyx_t_12 = __Pyx_GetItemInt(((PyObject *)__pyx_v_self->fluid_density_array), __pyx_v_i, std::vector<std::shared_ptr<ChNodeFEAxyzD> > ::size_type, 0, __Pyx_PyInt_FromSize_t, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3340, __pyx_L1_error)
73392  __Pyx_GOTREF(__pyx_t_12);
73393  __pyx_t_17 = __pyx_PyFloat_AsDouble(__pyx_t_12); if (unlikely((__pyx_t_17 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3340, __pyx_L1_error)
73394  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73395  __pyx_v_dens = __pyx_t_17;
73396 
73397  /* "mbd/CouplingFSI.pyx":3341
73398  * fluid_acceleration.push_back(acc)
73399  * dens = self.fluid_density_array[i]
73400  * fluid_density.push_back(dens) # <<<<<<<<<<<<<<
73401  * Profiling.logEvent("Finished search for cable nodes")
73402  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration)
73403  */
73404  try {
73405  __pyx_v_fluid_density.push_back(__pyx_v_dens);
73406  } catch(...) {
73407  __Pyx_CppExn2PyErr();
73408  __PYX_ERR(0, 3341, __pyx_L1_error)
73409  }
73410  }
73411 
73412  /* "mbd/CouplingFSI.pyx":3342
73413  * dens = self.fluid_density_array[i]
73414  * fluid_density.push_back(dens)
73415  * Profiling.logEvent("Finished search for cable nodes") # <<<<<<<<<<<<<<
73416  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration)
73417  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
73418  */
73419  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3342, __pyx_L1_error)
73420  __Pyx_GOTREF(__pyx_t_1);
73421  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logEvent); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3342, __pyx_L1_error)
73422  __Pyx_GOTREF(__pyx_t_6);
73423  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73424  __pyx_t_1 = NULL;
73425  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
73426  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
73427  if (likely(__pyx_t_1)) {
73428  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
73429  __Pyx_INCREF(__pyx_t_1);
73430  __Pyx_INCREF(function);
73431  __Pyx_DECREF_SET(__pyx_t_6, function);
73432  }
73433  }
73434  __pyx_t_12 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_kp_s_Finished_search_for_cable_nodes) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_kp_s_Finished_search_for_cable_nodes);
73435  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
73436  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3342, __pyx_L1_error)
73437  __Pyx_GOTREF(__pyx_t_12);
73438  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
73439  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73440 
73441  /* "mbd/CouplingFSI.pyx":3343
73442  * fluid_density.push_back(dens)
73443  * Profiling.logEvent("Finished search for cable nodes")
73444  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration) # <<<<<<<<<<<<<<
73445  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
73446  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73447  */
73448  __pyx_v_self->thisptr->setFluidAccelerationAtNodes(((std::vector<ChVector<double> > )__pyx_v_fluid_acceleration));
73449 
73450  /* "mbd/CouplingFSI.pyx":3344
73451  * Profiling.logEvent("Finished search for cable nodes")
73452  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration)
73453  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity) # <<<<<<<<<<<<<<
73454  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73455  * self.updateForces()
73456  */
73457  __pyx_v_self->thisptr->setFluidVelocityAtNodes(((std::vector<ChVector<double> > )__pyx_v_fluid_velocity));
73458 
73459  /* "mbd/CouplingFSI.pyx":3345
73460  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration)
73461  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
73462  * self.thisptr.setFluidDensityAtNodes(fluid_density) # <<<<<<<<<<<<<<
73463  * self.updateForces()
73464  *
73465  */
73466  __pyx_v_self->thisptr->setFluidDensityAtNodes(__pyx_v_fluid_density);
73467 
73468  /* "mbd/CouplingFSI.pyx":3346
73469  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
73470  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73471  * self.updateForces() # <<<<<<<<<<<<<<
73472  *
73473  * def updateForces(self):
73474  */
73475  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_updateForces); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3346, __pyx_L1_error)
73476  __Pyx_GOTREF(__pyx_t_6);
73477  __pyx_t_1 = NULL;
73478  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
73479  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
73480  if (likely(__pyx_t_1)) {
73481  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
73482  __Pyx_INCREF(__pyx_t_1);
73483  __Pyx_INCREF(function);
73484  __Pyx_DECREF_SET(__pyx_t_6, function);
73485  }
73486  }
73487  __pyx_t_12 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
73488  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
73489  if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3346, __pyx_L1_error)
73490  __Pyx_GOTREF(__pyx_t_12);
73491  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
73492  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
73493 
73494  /* "mbd/CouplingFSI.pyx":3248
73495  * self.thisptr.setContactMaterial(matp)
73496  *
73497  * def setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None, # <<<<<<<<<<<<<<
73498  * fluid_acceleration_array=None):
73499  * """
73500  */
73501 
73502  /* function exit code */
73503  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
73504  goto __pyx_L0;
73505  __pyx_L1_error:;
73506  __Pyx_XDECREF(__pyx_t_1);
73507  __Pyx_XDECREF(__pyx_t_4);
73508  __Pyx_XDECREF(__pyx_t_5);
73509  __Pyx_XDECREF(__pyx_t_6);
73510  __Pyx_XDECREF(__pyx_t_11);
73511  __Pyx_XDECREF(__pyx_t_12);
73512  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setExternalForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
73513  __pyx_r = NULL;
73514  __pyx_L0:;
73515  __Pyx_XDECREF(__pyx_v_comm);
73516  __Pyx_XDECREF(__pyx_v_coords);
73517  __Pyx_XDECREF(__pyx_v_vel_arr);
73518  __Pyx_XDECREF(__pyx_v_vel_grad_arr);
73519  __Pyx_XDECREF(__pyx_v_xi);
73520  __Pyx_XDECREF(__pyx_v_nearest_node);
73521  __Pyx_XDECREF(__pyx_v_el);
73522  __Pyx_XDECREF(__pyx_v_rank);
73523  __Pyx_XGIVEREF(__pyx_r);
73524  __Pyx_TraceReturn(__pyx_r, 0);
73525  __Pyx_RefNannyFinishContext();
73526  return __pyx_r;
73527 }
73528 
73529 /* "mbd/CouplingFSI.pyx":3348
73530  * self.updateForces()
73531  *
73532  * def updateForces(self): # <<<<<<<<<<<<<<
73533  * # update drag forces
73534  * self.thisptr.updateDragForces()
73535  */
73536 
73537 /* Python wrapper */
73538 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_73updateForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
73539 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_72updateForces[] = "ProtChMoorings.updateForces(self)";
73540 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_73updateForces = {"updateForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_73updateForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_72updateForces};
73541 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_73updateForces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
73542  PyObject *__pyx_r = 0;
73543  __Pyx_RefNannyDeclarations
73544  __Pyx_RefNannySetupContext("updateForces (wrapper)", 0);
73545  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_72updateForces(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
73546 
73547  /* function exit code */
73548  __Pyx_RefNannyFinishContext();
73549  return __pyx_r;
73550 }
73551 
73552 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_72updateForces(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
73553  PyObject *__pyx_r = NULL;
73554  __Pyx_TraceDeclarations
73555  __Pyx_RefNannyDeclarations
73556  int __pyx_lineno = 0;
73557  const char *__pyx_filename = NULL;
73558  int __pyx_clineno = 0;
73559  __Pyx_TraceFrameInit(__pyx_codeobj__190)
73560  __Pyx_RefNannySetupContext("updateForces", 0);
73561  __Pyx_TraceCall("updateForces", __pyx_f[0], 3348, 0, __PYX_ERR(0, 3348, __pyx_L1_error));
73562 
73563  /* "mbd/CouplingFSI.pyx":3350
73564  * def updateForces(self):
73565  * # update drag forces
73566  * self.thisptr.updateDragForces() # <<<<<<<<<<<<<<
73567  * # update added mass forces
73568  * self.thisptr.updateAddedMassForces()
73569  */
73570  __pyx_v_self->thisptr->updateDragForces();
73571 
73572  /* "mbd/CouplingFSI.pyx":3352
73573  * self.thisptr.updateDragForces()
73574  * # update added mass forces
73575  * self.thisptr.updateAddedMassForces() # <<<<<<<<<<<<<<
73576  * # update buoyancy forces
73577  * # self.thisptr.updateBuoyancyForces()
73578  */
73579  __pyx_v_self->thisptr->updateAddedMassForces();
73580 
73581  /* "mbd/CouplingFSI.pyx":3356
73582  * # self.thisptr.updateBuoyancyForces()
73583  * # apply forces
73584  * self.thisptr.applyForces() # <<<<<<<<<<<<<<
73585  *
73586  * def setFluidDensityAtNodes(self, np.ndarray density_array):
73587  */
73588  __pyx_v_self->thisptr->applyForces();
73589 
73590  /* "mbd/CouplingFSI.pyx":3348
73591  * self.updateForces()
73592  *
73593  * def updateForces(self): # <<<<<<<<<<<<<<
73594  * # update drag forces
73595  * self.thisptr.updateDragForces()
73596  */
73597 
73598  /* function exit code */
73599  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
73600  goto __pyx_L0;
73601  __pyx_L1_error:;
73602  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.updateForces", __pyx_clineno, __pyx_lineno, __pyx_filename);
73603  __pyx_r = NULL;
73604  __pyx_L0:;
73605  __Pyx_XGIVEREF(__pyx_r);
73606  __Pyx_TraceReturn(__pyx_r, 0);
73607  __Pyx_RefNannyFinishContext();
73608  return __pyx_r;
73609 }
73610 
73611 /* "mbd/CouplingFSI.pyx":3358
73612  * self.thisptr.applyForces()
73613  *
73614  * def setFluidDensityAtNodes(self, np.ndarray density_array): # <<<<<<<<<<<<<<
73615  * cdef vector[double] fluid_density
73616  * self.fluid_density_array = density_array
73617  */
73618 
73619 /* Python wrapper */
73620 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_75setFluidDensityAtNodes(PyObject *__pyx_v_self, PyObject *__pyx_v_density_array); /*proto*/
73621 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_74setFluidDensityAtNodes[] = "ProtChMoorings.setFluidDensityAtNodes(self, ndarray density_array)";
73622 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_75setFluidDensityAtNodes = {"setFluidDensityAtNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_75setFluidDensityAtNodes, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_74setFluidDensityAtNodes};
73623 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_75setFluidDensityAtNodes(PyObject *__pyx_v_self, PyObject *__pyx_v_density_array) {
73624  int __pyx_lineno = 0;
73625  const char *__pyx_filename = NULL;
73626  int __pyx_clineno = 0;
73627  PyObject *__pyx_r = 0;
73628  __Pyx_RefNannyDeclarations
73629  __Pyx_RefNannySetupContext("setFluidDensityAtNodes (wrapper)", 0);
73630  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_density_array), __pyx_ptype_5numpy_ndarray, 1, "density_array", 0))) __PYX_ERR(0, 3358, __pyx_L1_error)
73631  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_74setFluidDensityAtNodes(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyArrayObject *)__pyx_v_density_array));
73632 
73633  /* function exit code */
73634  goto __pyx_L0;
73635  __pyx_L1_error:;
73636  __pyx_r = NULL;
73637  __pyx_L0:;
73638  __Pyx_RefNannyFinishContext();
73639  return __pyx_r;
73640 }
73641 
73642 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_74setFluidDensityAtNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyArrayObject *__pyx_v_density_array) {
73643  std::vector<double> __pyx_v_fluid_density;
73644  PyObject *__pyx_v_d = NULL;
73645  PyObject *__pyx_r = NULL;
73646  __Pyx_TraceDeclarations
73647  __Pyx_RefNannyDeclarations
73648  PyObject *__pyx_t_1 = NULL;
73649  Py_ssize_t __pyx_t_2;
73650  PyObject *(*__pyx_t_3)(PyObject *);
73651  PyObject *__pyx_t_4 = NULL;
73652  double __pyx_t_5;
73653  int __pyx_lineno = 0;
73654  const char *__pyx_filename = NULL;
73655  int __pyx_clineno = 0;
73656  __Pyx_TraceFrameInit(__pyx_codeobj__191)
73657  __Pyx_RefNannySetupContext("setFluidDensityAtNodes", 0);
73658  __Pyx_TraceCall("setFluidDensityAtNodes", __pyx_f[0], 3358, 0, __PYX_ERR(0, 3358, __pyx_L1_error));
73659 
73660  /* "mbd/CouplingFSI.pyx":3360
73661  * def setFluidDensityAtNodes(self, np.ndarray density_array):
73662  * cdef vector[double] fluid_density
73663  * self.fluid_density_array = density_array # <<<<<<<<<<<<<<
73664  * cdef double dens
73665  * for d in density_array:
73666  */
73667  __Pyx_INCREF(((PyObject *)__pyx_v_density_array));
73668  __Pyx_GIVEREF(((PyObject *)__pyx_v_density_array));
73669  __Pyx_GOTREF(__pyx_v_self->fluid_density_array);
73670  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_density_array));
73671  __pyx_v_self->fluid_density_array = __pyx_v_density_array;
73672 
73673  /* "mbd/CouplingFSI.pyx":3362
73674  * self.fluid_density_array = density_array
73675  * cdef double dens
73676  * for d in density_array: # <<<<<<<<<<<<<<
73677  * fluid_density.push_back(d)
73678  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73679  */
73680  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_density_array))) || PyTuple_CheckExact(((PyObject *)__pyx_v_density_array))) {
73681  __pyx_t_1 = ((PyObject *)__pyx_v_density_array); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
73682  __pyx_t_3 = NULL;
73683  } else {
73684  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_density_array)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
73685  __Pyx_GOTREF(__pyx_t_1);
73686  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3362, __pyx_L1_error)
73687  }
73688  for (;;) {
73689  if (likely(!__pyx_t_3)) {
73690  if (likely(PyList_CheckExact(__pyx_t_1))) {
73691  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
73692  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
73693  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3362, __pyx_L1_error)
73694  #else
73695  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3362, __pyx_L1_error)
73696  __Pyx_GOTREF(__pyx_t_4);
73697  #endif
73698  } else {
73699  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
73700  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
73701  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3362, __pyx_L1_error)
73702  #else
73703  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3362, __pyx_L1_error)
73704  __Pyx_GOTREF(__pyx_t_4);
73705  #endif
73706  }
73707  } else {
73708  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
73709  if (unlikely(!__pyx_t_4)) {
73710  PyObject* exc_type = PyErr_Occurred();
73711  if (exc_type) {
73712  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
73713  else __PYX_ERR(0, 3362, __pyx_L1_error)
73714  }
73715  break;
73716  }
73717  __Pyx_GOTREF(__pyx_t_4);
73718  }
73719  __Pyx_XDECREF_SET(__pyx_v_d, __pyx_t_4);
73720  __pyx_t_4 = 0;
73721 
73722  /* "mbd/CouplingFSI.pyx":3363
73723  * cdef double dens
73724  * for d in density_array:
73725  * fluid_density.push_back(d) # <<<<<<<<<<<<<<
73726  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73727  *
73728  */
73729  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_v_d); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3363, __pyx_L1_error)
73730  try {
73731  __pyx_v_fluid_density.push_back(__pyx_t_5);
73732  } catch(...) {
73733  __Pyx_CppExn2PyErr();
73734  __PYX_ERR(0, 3363, __pyx_L1_error)
73735  }
73736 
73737  /* "mbd/CouplingFSI.pyx":3362
73738  * self.fluid_density_array = density_array
73739  * cdef double dens
73740  * for d in density_array: # <<<<<<<<<<<<<<
73741  * fluid_density.push_back(d)
73742  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73743  */
73744  }
73745  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73746 
73747  /* "mbd/CouplingFSI.pyx":3364
73748  * for d in density_array:
73749  * fluid_density.push_back(d)
73750  * self.thisptr.setFluidDensityAtNodes(fluid_density) # <<<<<<<<<<<<<<
73751  *
73752  * def setFluidVelocityAtNodes(self, np.ndarray velocity_array):
73753  */
73754  __pyx_v_self->thisptr->setFluidDensityAtNodes(__pyx_v_fluid_density);
73755 
73756  /* "mbd/CouplingFSI.pyx":3358
73757  * self.thisptr.applyForces()
73758  *
73759  * def setFluidDensityAtNodes(self, np.ndarray density_array): # <<<<<<<<<<<<<<
73760  * cdef vector[double] fluid_density
73761  * self.fluid_density_array = density_array
73762  */
73763 
73764  /* function exit code */
73765  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
73766  goto __pyx_L0;
73767  __pyx_L1_error:;
73768  __Pyx_XDECREF(__pyx_t_1);
73769  __Pyx_XDECREF(__pyx_t_4);
73770  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setFluidDensityAtNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
73771  __pyx_r = NULL;
73772  __pyx_L0:;
73773  __Pyx_XDECREF(__pyx_v_d);
73774  __Pyx_XGIVEREF(__pyx_r);
73775  __Pyx_TraceReturn(__pyx_r, 0);
73776  __Pyx_RefNannyFinishContext();
73777  return __pyx_r;
73778 }
73779 
73780 /* "mbd/CouplingFSI.pyx":3366
73781  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73782  *
73783  * def setFluidVelocityAtNodes(self, np.ndarray velocity_array): # <<<<<<<<<<<<<<
73784  * cdef vector[ch.ChVector[double]] fluid_velocity
73785  * cdef ch.ChVector[double] vel
73786  */
73787 
73788 /* Python wrapper */
73789 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_77setFluidVelocityAtNodes(PyObject *__pyx_v_self, PyObject *__pyx_v_velocity_array); /*proto*/
73790 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_76setFluidVelocityAtNodes[] = "ProtChMoorings.setFluidVelocityAtNodes(self, ndarray velocity_array)";
73791 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_77setFluidVelocityAtNodes = {"setFluidVelocityAtNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_77setFluidVelocityAtNodes, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_76setFluidVelocityAtNodes};
73792 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_77setFluidVelocityAtNodes(PyObject *__pyx_v_self, PyObject *__pyx_v_velocity_array) {
73793  int __pyx_lineno = 0;
73794  const char *__pyx_filename = NULL;
73795  int __pyx_clineno = 0;
73796  PyObject *__pyx_r = 0;
73797  __Pyx_RefNannyDeclarations
73798  __Pyx_RefNannySetupContext("setFluidVelocityAtNodes (wrapper)", 0);
73799  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_velocity_array), __pyx_ptype_5numpy_ndarray, 1, "velocity_array", 0))) __PYX_ERR(0, 3366, __pyx_L1_error)
73800  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_76setFluidVelocityAtNodes(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyArrayObject *)__pyx_v_velocity_array));
73801 
73802  /* function exit code */
73803  goto __pyx_L0;
73804  __pyx_L1_error:;
73805  __pyx_r = NULL;
73806  __pyx_L0:;
73807  __Pyx_RefNannyFinishContext();
73808  return __pyx_r;
73809 }
73810 
73811 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_76setFluidVelocityAtNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyArrayObject *__pyx_v_velocity_array) {
73812  std::vector<ChVector<double> > __pyx_v_fluid_velocity;
73813  ChVector<double> __pyx_v_vel;
73814  PyObject *__pyx_v_v = NULL;
73815  PyObject *__pyx_r = NULL;
73816  __Pyx_TraceDeclarations
73817  __Pyx_RefNannyDeclarations
73818  PyObject *__pyx_t_1 = NULL;
73819  Py_ssize_t __pyx_t_2;
73820  PyObject *(*__pyx_t_3)(PyObject *);
73821  PyObject *__pyx_t_4 = NULL;
73822  double __pyx_t_5;
73823  double __pyx_t_6;
73824  double __pyx_t_7;
73825  int __pyx_lineno = 0;
73826  const char *__pyx_filename = NULL;
73827  int __pyx_clineno = 0;
73828  __Pyx_TraceFrameInit(__pyx_codeobj__192)
73829  __Pyx_RefNannySetupContext("setFluidVelocityAtNodes", 0);
73830  __Pyx_TraceCall("setFluidVelocityAtNodes", __pyx_f[0], 3366, 0, __PYX_ERR(0, 3366, __pyx_L1_error));
73831 
73832  /* "mbd/CouplingFSI.pyx":3369
73833  * cdef vector[ch.ChVector[double]] fluid_velocity
73834  * cdef ch.ChVector[double] vel
73835  * self.fluid_velocity_array = velocity_array # <<<<<<<<<<<<<<
73836  * for v in velocity_array:
73837  * vel = ch.ChVector[double](v[0], v[1], v[2])
73838  */
73839  __Pyx_INCREF(((PyObject *)__pyx_v_velocity_array));
73840  __Pyx_GIVEREF(((PyObject *)__pyx_v_velocity_array));
73841  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array);
73842  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array));
73843  __pyx_v_self->fluid_velocity_array = __pyx_v_velocity_array;
73844 
73845  /* "mbd/CouplingFSI.pyx":3370
73846  * cdef ch.ChVector[double] vel
73847  * self.fluid_velocity_array = velocity_array
73848  * for v in velocity_array: # <<<<<<<<<<<<<<
73849  * vel = ch.ChVector[double](v[0], v[1], v[2])
73850  * fluid_velocity.push_back(vel)
73851  */
73852  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_velocity_array))) || PyTuple_CheckExact(((PyObject *)__pyx_v_velocity_array))) {
73853  __pyx_t_1 = ((PyObject *)__pyx_v_velocity_array); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
73854  __pyx_t_3 = NULL;
73855  } else {
73856  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_velocity_array)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3370, __pyx_L1_error)
73857  __Pyx_GOTREF(__pyx_t_1);
73858  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3370, __pyx_L1_error)
73859  }
73860  for (;;) {
73861  if (likely(!__pyx_t_3)) {
73862  if (likely(PyList_CheckExact(__pyx_t_1))) {
73863  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
73864  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
73865  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3370, __pyx_L1_error)
73866  #else
73867  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3370, __pyx_L1_error)
73868  __Pyx_GOTREF(__pyx_t_4);
73869  #endif
73870  } else {
73871  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
73872  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
73873  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3370, __pyx_L1_error)
73874  #else
73875  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3370, __pyx_L1_error)
73876  __Pyx_GOTREF(__pyx_t_4);
73877  #endif
73878  }
73879  } else {
73880  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
73881  if (unlikely(!__pyx_t_4)) {
73882  PyObject* exc_type = PyErr_Occurred();
73883  if (exc_type) {
73884  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
73885  else __PYX_ERR(0, 3370, __pyx_L1_error)
73886  }
73887  break;
73888  }
73889  __Pyx_GOTREF(__pyx_t_4);
73890  }
73891  __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
73892  __pyx_t_4 = 0;
73893 
73894  /* "mbd/CouplingFSI.pyx":3371
73895  * self.fluid_velocity_array = velocity_array
73896  * for v in velocity_array:
73897  * vel = ch.ChVector[double](v[0], v[1], v[2]) # <<<<<<<<<<<<<<
73898  * fluid_velocity.push_back(vel)
73899  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
73900  */
73901  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_v, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3371, __pyx_L1_error)
73902  __Pyx_GOTREF(__pyx_t_4);
73903  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3371, __pyx_L1_error)
73904  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
73905  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_v, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3371, __pyx_L1_error)
73906  __Pyx_GOTREF(__pyx_t_4);
73907  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3371, __pyx_L1_error)
73908  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
73909  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_v, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3371, __pyx_L1_error)
73910  __Pyx_GOTREF(__pyx_t_4);
73911  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3371, __pyx_L1_error)
73912  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
73913  __pyx_v_vel = ChVector<double> (__pyx_t_5, __pyx_t_6, __pyx_t_7);
73914 
73915  /* "mbd/CouplingFSI.pyx":3372
73916  * for v in velocity_array:
73917  * vel = ch.ChVector[double](v[0], v[1], v[2])
73918  * fluid_velocity.push_back(vel) # <<<<<<<<<<<<<<
73919  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
73920  *
73921  */
73922  try {
73923  __pyx_v_fluid_velocity.push_back(__pyx_v_vel);
73924  } catch(...) {
73925  __Pyx_CppExn2PyErr();
73926  __PYX_ERR(0, 3372, __pyx_L1_error)
73927  }
73928 
73929  /* "mbd/CouplingFSI.pyx":3370
73930  * cdef ch.ChVector[double] vel
73931  * self.fluid_velocity_array = velocity_array
73932  * for v in velocity_array: # <<<<<<<<<<<<<<
73933  * vel = ch.ChVector[double](v[0], v[1], v[2])
73934  * fluid_velocity.push_back(vel)
73935  */
73936  }
73937  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
73938 
73939  /* "mbd/CouplingFSI.pyx":3373
73940  * vel = ch.ChVector[double](v[0], v[1], v[2])
73941  * fluid_velocity.push_back(vel)
73942  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity) # <<<<<<<<<<<<<<
73943  *
73944  * def setFluidAccelerationAtNodes(self, np.ndarray acceleration_array):
73945  */
73946  __pyx_v_self->thisptr->setFluidVelocityAtNodes(((std::vector<ChVector<double> > )__pyx_v_fluid_velocity));
73947 
73948  /* "mbd/CouplingFSI.pyx":3366
73949  * self.thisptr.setFluidDensityAtNodes(fluid_density)
73950  *
73951  * def setFluidVelocityAtNodes(self, np.ndarray velocity_array): # <<<<<<<<<<<<<<
73952  * cdef vector[ch.ChVector[double]] fluid_velocity
73953  * cdef ch.ChVector[double] vel
73954  */
73955 
73956  /* function exit code */
73957  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
73958  goto __pyx_L0;
73959  __pyx_L1_error:;
73960  __Pyx_XDECREF(__pyx_t_1);
73961  __Pyx_XDECREF(__pyx_t_4);
73962  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setFluidVelocityAtNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
73963  __pyx_r = NULL;
73964  __pyx_L0:;
73965  __Pyx_XDECREF(__pyx_v_v);
73966  __Pyx_XGIVEREF(__pyx_r);
73967  __Pyx_TraceReturn(__pyx_r, 0);
73968  __Pyx_RefNannyFinishContext();
73969  return __pyx_r;
73970 }
73971 
73972 /* "mbd/CouplingFSI.pyx":3375
73973  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
73974  *
73975  * def setFluidAccelerationAtNodes(self, np.ndarray acceleration_array): # <<<<<<<<<<<<<<
73976  * cdef vector[ch.ChVector[double]] fluid_acceleration
73977  * cdef ch.ChVector[double] acc
73978  */
73979 
73980 /* Python wrapper */
73981 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_79setFluidAccelerationAtNodes(PyObject *__pyx_v_self, PyObject *__pyx_v_acceleration_array); /*proto*/
73982 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_78setFluidAccelerationAtNodes[] = "ProtChMoorings.setFluidAccelerationAtNodes(self, ndarray acceleration_array)";
73983 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_79setFluidAccelerationAtNodes = {"setFluidAccelerationAtNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_79setFluidAccelerationAtNodes, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_78setFluidAccelerationAtNodes};
73984 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_79setFluidAccelerationAtNodes(PyObject *__pyx_v_self, PyObject *__pyx_v_acceleration_array) {
73985  int __pyx_lineno = 0;
73986  const char *__pyx_filename = NULL;
73987  int __pyx_clineno = 0;
73988  PyObject *__pyx_r = 0;
73989  __Pyx_RefNannyDeclarations
73990  __Pyx_RefNannySetupContext("setFluidAccelerationAtNodes (wrapper)", 0);
73991  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_acceleration_array), __pyx_ptype_5numpy_ndarray, 1, "acceleration_array", 0))) __PYX_ERR(0, 3375, __pyx_L1_error)
73992  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_78setFluidAccelerationAtNodes(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyArrayObject *)__pyx_v_acceleration_array));
73993 
73994  /* function exit code */
73995  goto __pyx_L0;
73996  __pyx_L1_error:;
73997  __pyx_r = NULL;
73998  __pyx_L0:;
73999  __Pyx_RefNannyFinishContext();
74000  return __pyx_r;
74001 }
74002 
74003 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_78setFluidAccelerationAtNodes(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyArrayObject *__pyx_v_acceleration_array) {
74004  std::vector<ChVector<double> > __pyx_v_fluid_acceleration;
74005  ChVector<double> __pyx_v_acc;
74006  PyObject *__pyx_v_a = NULL;
74007  PyObject *__pyx_r = NULL;
74008  __Pyx_TraceDeclarations
74009  __Pyx_RefNannyDeclarations
74010  PyObject *__pyx_t_1 = NULL;
74011  Py_ssize_t __pyx_t_2;
74012  PyObject *(*__pyx_t_3)(PyObject *);
74013  PyObject *__pyx_t_4 = NULL;
74014  double __pyx_t_5;
74015  double __pyx_t_6;
74016  double __pyx_t_7;
74017  int __pyx_lineno = 0;
74018  const char *__pyx_filename = NULL;
74019  int __pyx_clineno = 0;
74020  __Pyx_TraceFrameInit(__pyx_codeobj__193)
74021  __Pyx_RefNannySetupContext("setFluidAccelerationAtNodes", 0);
74022  __Pyx_TraceCall("setFluidAccelerationAtNodes", __pyx_f[0], 3375, 0, __PYX_ERR(0, 3375, __pyx_L1_error));
74023 
74024  /* "mbd/CouplingFSI.pyx":3378
74025  * cdef vector[ch.ChVector[double]] fluid_acceleration
74026  * cdef ch.ChVector[double] acc
74027  * self.fluid_acceleration_array = acceleration_array # <<<<<<<<<<<<<<
74028  * for a in acceleration_array:
74029  * acc = ch.ChVector[double](a[0], a[1], a[2])
74030  */
74031  __Pyx_INCREF(((PyObject *)__pyx_v_acceleration_array));
74032  __Pyx_GIVEREF(((PyObject *)__pyx_v_acceleration_array));
74033  __Pyx_GOTREF(__pyx_v_self->fluid_acceleration_array);
74034  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_acceleration_array));
74035  __pyx_v_self->fluid_acceleration_array = __pyx_v_acceleration_array;
74036 
74037  /* "mbd/CouplingFSI.pyx":3379
74038  * cdef ch.ChVector[double] acc
74039  * self.fluid_acceleration_array = acceleration_array
74040  * for a in acceleration_array: # <<<<<<<<<<<<<<
74041  * acc = ch.ChVector[double](a[0], a[1], a[2])
74042  * fluid_acceleration.push_back(acc)
74043  */
74044  if (likely(PyList_CheckExact(((PyObject *)__pyx_v_acceleration_array))) || PyTuple_CheckExact(((PyObject *)__pyx_v_acceleration_array))) {
74045  __pyx_t_1 = ((PyObject *)__pyx_v_acceleration_array); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
74046  __pyx_t_3 = NULL;
74047  } else {
74048  __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(((PyObject *)__pyx_v_acceleration_array)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3379, __pyx_L1_error)
74049  __Pyx_GOTREF(__pyx_t_1);
74050  __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3379, __pyx_L1_error)
74051  }
74052  for (;;) {
74053  if (likely(!__pyx_t_3)) {
74054  if (likely(PyList_CheckExact(__pyx_t_1))) {
74055  if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
74056  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
74057  __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3379, __pyx_L1_error)
74058  #else
74059  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3379, __pyx_L1_error)
74060  __Pyx_GOTREF(__pyx_t_4);
74061  #endif
74062  } else {
74063  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
74064  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
74065  __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 3379, __pyx_L1_error)
74066  #else
74067  __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3379, __pyx_L1_error)
74068  __Pyx_GOTREF(__pyx_t_4);
74069  #endif
74070  }
74071  } else {
74072  __pyx_t_4 = __pyx_t_3(__pyx_t_1);
74073  if (unlikely(!__pyx_t_4)) {
74074  PyObject* exc_type = PyErr_Occurred();
74075  if (exc_type) {
74076  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
74077  else __PYX_ERR(0, 3379, __pyx_L1_error)
74078  }
74079  break;
74080  }
74081  __Pyx_GOTREF(__pyx_t_4);
74082  }
74083  __Pyx_XDECREF_SET(__pyx_v_a, __pyx_t_4);
74084  __pyx_t_4 = 0;
74085 
74086  /* "mbd/CouplingFSI.pyx":3380
74087  * self.fluid_acceleration_array = acceleration_array
74088  * for a in acceleration_array:
74089  * acc = ch.ChVector[double](a[0], a[1], a[2]) # <<<<<<<<<<<<<<
74090  * fluid_acceleration.push_back(acc)
74091  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration)
74092  */
74093  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
74094  __Pyx_GOTREF(__pyx_t_4);
74095  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3380, __pyx_L1_error)
74096  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
74097  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
74098  __Pyx_GOTREF(__pyx_t_4);
74099  __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3380, __pyx_L1_error)
74100  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
74101  __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_a, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3380, __pyx_L1_error)
74102  __Pyx_GOTREF(__pyx_t_4);
74103  __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3380, __pyx_L1_error)
74104  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
74105  __pyx_v_acc = ChVector<double> (__pyx_t_5, __pyx_t_6, __pyx_t_7);
74106 
74107  /* "mbd/CouplingFSI.pyx":3381
74108  * for a in acceleration_array:
74109  * acc = ch.ChVector[double](a[0], a[1], a[2])
74110  * fluid_acceleration.push_back(acc) # <<<<<<<<<<<<<<
74111  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration)
74112  *
74113  */
74114  try {
74115  __pyx_v_fluid_acceleration.push_back(__pyx_v_acc);
74116  } catch(...) {
74117  __Pyx_CppExn2PyErr();
74118  __PYX_ERR(0, 3381, __pyx_L1_error)
74119  }
74120 
74121  /* "mbd/CouplingFSI.pyx":3379
74122  * cdef ch.ChVector[double] acc
74123  * self.fluid_acceleration_array = acceleration_array
74124  * for a in acceleration_array: # <<<<<<<<<<<<<<
74125  * acc = ch.ChVector[double](a[0], a[1], a[2])
74126  * fluid_acceleration.push_back(acc)
74127  */
74128  }
74129  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
74130 
74131  /* "mbd/CouplingFSI.pyx":3382
74132  * acc = ch.ChVector[double](a[0], a[1], a[2])
74133  * fluid_acceleration.push_back(acc)
74134  * self.thisptr.setFluidAccelerationAtNodes(fluid_acceleration) # <<<<<<<<<<<<<<
74135  *
74136  *
74137  */
74138  __pyx_v_self->thisptr->setFluidAccelerationAtNodes(((std::vector<ChVector<double> > )__pyx_v_fluid_acceleration));
74139 
74140  /* "mbd/CouplingFSI.pyx":3375
74141  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
74142  *
74143  * def setFluidAccelerationAtNodes(self, np.ndarray acceleration_array): # <<<<<<<<<<<<<<
74144  * cdef vector[ch.ChVector[double]] fluid_acceleration
74145  * cdef ch.ChVector[double] acc
74146  */
74147 
74148  /* function exit code */
74149  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
74150  goto __pyx_L0;
74151  __pyx_L1_error:;
74152  __Pyx_XDECREF(__pyx_t_1);
74153  __Pyx_XDECREF(__pyx_t_4);
74154  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.setFluidAccelerationAtNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
74155  __pyx_r = NULL;
74156  __pyx_L0:;
74157  __Pyx_XDECREF(__pyx_v_a);
74158  __Pyx_XGIVEREF(__pyx_r);
74159  __Pyx_TraceReturn(__pyx_r, 0);
74160  __Pyx_RefNannyFinishContext();
74161  return __pyx_r;
74162 }
74163 
74164 /* "mbd/CouplingFSI.pxd":318
74165  * # vector[pyfea.ChElementCableANCF] elems
74166  * # vector[ProtChCable] cables
74167  * str record_file # <<<<<<<<<<<<<<
74168  * object model
74169  * ProtChSystem ProtChSystem
74170  */
74171 
74172 /* Python wrapper */
74173 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_1__get__(PyObject *__pyx_v_self); /*proto*/
74174 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_1__get__(PyObject *__pyx_v_self) {
74175  PyObject *__pyx_r = 0;
74176  __Pyx_RefNannyDeclarations
74177  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
74178  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74179 
74180  /* function exit code */
74181  __Pyx_RefNannyFinishContext();
74182  return __pyx_r;
74183 }
74184 
74185 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74186  PyObject *__pyx_r = NULL;
74187  __Pyx_TraceDeclarations
74188  __Pyx_RefNannyDeclarations
74189  int __pyx_lineno = 0;
74190  const char *__pyx_filename = NULL;
74191  int __pyx_clineno = 0;
74192  __Pyx_RefNannySetupContext("__get__", 0);
74193  __Pyx_TraceCall("__get__", __pyx_f[2], 318, 0, __PYX_ERR(2, 318, __pyx_L1_error));
74194  __Pyx_XDECREF(__pyx_r);
74195  __Pyx_INCREF(__pyx_v_self->record_file);
74196  __pyx_r = __pyx_v_self->record_file;
74197  goto __pyx_L0;
74198 
74199  /* function exit code */
74200  __pyx_L1_error:;
74201  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.record_file.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74202  __pyx_r = NULL;
74203  __pyx_L0:;
74204  __Pyx_XGIVEREF(__pyx_r);
74205  __Pyx_TraceReturn(__pyx_r, 0);
74206  __Pyx_RefNannyFinishContext();
74207  return __pyx_r;
74208 }
74209 
74210 /* Python wrapper */
74211 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
74212 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
74213  int __pyx_r;
74214  __Pyx_RefNannyDeclarations
74215  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
74216  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
74217 
74218  /* function exit code */
74219  __Pyx_RefNannyFinishContext();
74220  return __pyx_r;
74221 }
74222 
74223 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
74224  int __pyx_r;
74225  __Pyx_TraceDeclarations
74226  __Pyx_RefNannyDeclarations
74227  PyObject *__pyx_t_1 = NULL;
74228  int __pyx_lineno = 0;
74229  const char *__pyx_filename = NULL;
74230  int __pyx_clineno = 0;
74231  __Pyx_RefNannySetupContext("__set__", 0);
74232  __Pyx_TraceCall("__set__", __pyx_f[2], 318, 0, __PYX_ERR(2, 318, __pyx_L1_error));
74233  if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(2, 318, __pyx_L1_error)
74234  __pyx_t_1 = __pyx_v_value;
74235  __Pyx_INCREF(__pyx_t_1);
74236  __Pyx_GIVEREF(__pyx_t_1);
74237  __Pyx_GOTREF(__pyx_v_self->record_file);
74238  __Pyx_DECREF(__pyx_v_self->record_file);
74239  __pyx_v_self->record_file = ((PyObject*)__pyx_t_1);
74240  __pyx_t_1 = 0;
74241 
74242  /* function exit code */
74243  __pyx_r = 0;
74244  goto __pyx_L0;
74245  __pyx_L1_error:;
74246  __Pyx_XDECREF(__pyx_t_1);
74247  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.record_file.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74248  __pyx_r = -1;
74249  __pyx_L0:;
74250  __Pyx_TraceReturn(Py_None, 0);
74251  __Pyx_RefNannyFinishContext();
74252  return __pyx_r;
74253 }
74254 
74255 /* Python wrapper */
74256 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_5__del__(PyObject *__pyx_v_self); /*proto*/
74257 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_5__del__(PyObject *__pyx_v_self) {
74258  int __pyx_r;
74259  __Pyx_RefNannyDeclarations
74260  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
74261  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74262 
74263  /* function exit code */
74264  __Pyx_RefNannyFinishContext();
74265  return __pyx_r;
74266 }
74267 
74268 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74269  int __pyx_r;
74270  __Pyx_TraceDeclarations
74271  __Pyx_RefNannyDeclarations
74272  int __pyx_lineno = 0;
74273  const char *__pyx_filename = NULL;
74274  int __pyx_clineno = 0;
74275  __Pyx_RefNannySetupContext("__del__", 0);
74276  __Pyx_TraceCall("__del__", __pyx_f[2], 318, 0, __PYX_ERR(2, 318, __pyx_L1_error));
74277  __Pyx_INCREF(Py_None);
74278  __Pyx_GIVEREF(Py_None);
74279  __Pyx_GOTREF(__pyx_v_self->record_file);
74280  __Pyx_DECREF(__pyx_v_self->record_file);
74281  __pyx_v_self->record_file = ((PyObject*)Py_None);
74282 
74283  /* function exit code */
74284  __pyx_r = 0;
74285  goto __pyx_L0;
74286  __pyx_L1_error:;
74287  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.record_file.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74288  __pyx_r = -1;
74289  __pyx_L0:;
74290  __Pyx_TraceReturn(Py_None, 0);
74291  __Pyx_RefNannyFinishContext();
74292  return __pyx_r;
74293 }
74294 
74295 /* "mbd/CouplingFSI.pxd":319
74296  * # vector[ProtChCable] cables
74297  * str record_file
74298  * object model # <<<<<<<<<<<<<<
74299  * ProtChSystem ProtChSystem
74300  * object Mesh
74301  */
74302 
74303 /* Python wrapper */
74304 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_1__get__(PyObject *__pyx_v_self); /*proto*/
74305 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_1__get__(PyObject *__pyx_v_self) {
74306  PyObject *__pyx_r = 0;
74307  __Pyx_RefNannyDeclarations
74308  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
74309  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74310 
74311  /* function exit code */
74312  __Pyx_RefNannyFinishContext();
74313  return __pyx_r;
74314 }
74315 
74316 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74317  PyObject *__pyx_r = NULL;
74318  __Pyx_TraceDeclarations
74319  __Pyx_RefNannyDeclarations
74320  int __pyx_lineno = 0;
74321  const char *__pyx_filename = NULL;
74322  int __pyx_clineno = 0;
74323  __Pyx_RefNannySetupContext("__get__", 0);
74324  __Pyx_TraceCall("__get__", __pyx_f[2], 319, 0, __PYX_ERR(2, 319, __pyx_L1_error));
74325  __Pyx_XDECREF(__pyx_r);
74326  __Pyx_INCREF(__pyx_v_self->model);
74327  __pyx_r = __pyx_v_self->model;
74328  goto __pyx_L0;
74329 
74330  /* function exit code */
74331  __pyx_L1_error:;
74332  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.model.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74333  __pyx_r = NULL;
74334  __pyx_L0:;
74335  __Pyx_XGIVEREF(__pyx_r);
74336  __Pyx_TraceReturn(__pyx_r, 0);
74337  __Pyx_RefNannyFinishContext();
74338  return __pyx_r;
74339 }
74340 
74341 /* Python wrapper */
74342 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
74343 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
74344  int __pyx_r;
74345  __Pyx_RefNannyDeclarations
74346  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
74347  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
74348 
74349  /* function exit code */
74350  __Pyx_RefNannyFinishContext();
74351  return __pyx_r;
74352 }
74353 
74354 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
74355  int __pyx_r;
74356  __Pyx_TraceDeclarations
74357  __Pyx_RefNannyDeclarations
74358  int __pyx_lineno = 0;
74359  const char *__pyx_filename = NULL;
74360  int __pyx_clineno = 0;
74361  __Pyx_RefNannySetupContext("__set__", 0);
74362  __Pyx_TraceCall("__set__", __pyx_f[2], 319, 0, __PYX_ERR(2, 319, __pyx_L1_error));
74363  __Pyx_INCREF(__pyx_v_value);
74364  __Pyx_GIVEREF(__pyx_v_value);
74365  __Pyx_GOTREF(__pyx_v_self->model);
74366  __Pyx_DECREF(__pyx_v_self->model);
74367  __pyx_v_self->model = __pyx_v_value;
74368 
74369  /* function exit code */
74370  __pyx_r = 0;
74371  goto __pyx_L0;
74372  __pyx_L1_error:;
74373  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74374  __pyx_r = -1;
74375  __pyx_L0:;
74376  __Pyx_TraceReturn(Py_None, 0);
74377  __Pyx_RefNannyFinishContext();
74378  return __pyx_r;
74379 }
74380 
74381 /* Python wrapper */
74382 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_5__del__(PyObject *__pyx_v_self); /*proto*/
74383 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_5__del__(PyObject *__pyx_v_self) {
74384  int __pyx_r;
74385  __Pyx_RefNannyDeclarations
74386  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
74387  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74388 
74389  /* function exit code */
74390  __Pyx_RefNannyFinishContext();
74391  return __pyx_r;
74392 }
74393 
74394 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74395  int __pyx_r;
74396  __Pyx_TraceDeclarations
74397  __Pyx_RefNannyDeclarations
74398  int __pyx_lineno = 0;
74399  const char *__pyx_filename = NULL;
74400  int __pyx_clineno = 0;
74401  __Pyx_RefNannySetupContext("__del__", 0);
74402  __Pyx_TraceCall("__del__", __pyx_f[2], 319, 0, __PYX_ERR(2, 319, __pyx_L1_error));
74403  __Pyx_INCREF(Py_None);
74404  __Pyx_GIVEREF(Py_None);
74405  __Pyx_GOTREF(__pyx_v_self->model);
74406  __Pyx_DECREF(__pyx_v_self->model);
74407  __pyx_v_self->model = Py_None;
74408 
74409  /* function exit code */
74410  __pyx_r = 0;
74411  goto __pyx_L0;
74412  __pyx_L1_error:;
74413  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.model.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74414  __pyx_r = -1;
74415  __pyx_L0:;
74416  __Pyx_TraceReturn(Py_None, 0);
74417  __Pyx_RefNannyFinishContext();
74418  return __pyx_r;
74419 }
74420 
74421 /* "mbd/CouplingFSI.pxd":320
74422  * str record_file
74423  * object model
74424  * ProtChSystem ProtChSystem # <<<<<<<<<<<<<<
74425  * object Mesh
74426  * int nd
74427  */
74428 
74429 /* Python wrapper */
74430 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_1__get__(PyObject *__pyx_v_self); /*proto*/
74431 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_1__get__(PyObject *__pyx_v_self) {
74432  PyObject *__pyx_r = 0;
74433  __Pyx_RefNannyDeclarations
74434  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
74435  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74436 
74437  /* function exit code */
74438  __Pyx_RefNannyFinishContext();
74439  return __pyx_r;
74440 }
74441 
74442 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74443  PyObject *__pyx_r = NULL;
74444  __Pyx_TraceDeclarations
74445  __Pyx_RefNannyDeclarations
74446  int __pyx_lineno = 0;
74447  const char *__pyx_filename = NULL;
74448  int __pyx_clineno = 0;
74449  __Pyx_RefNannySetupContext("__get__", 0);
74450  __Pyx_TraceCall("__get__", __pyx_f[2], 320, 0, __PYX_ERR(2, 320, __pyx_L1_error));
74451  __Pyx_XDECREF(__pyx_r);
74452  __Pyx_INCREF(((PyObject *)__pyx_v_self->ProtChSystem));
74453  __pyx_r = ((PyObject *)__pyx_v_self->ProtChSystem);
74454  goto __pyx_L0;
74455 
74456  /* function exit code */
74457  __pyx_L1_error:;
74458  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.ProtChSystem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74459  __pyx_r = NULL;
74460  __pyx_L0:;
74461  __Pyx_XGIVEREF(__pyx_r);
74462  __Pyx_TraceReturn(__pyx_r, 0);
74463  __Pyx_RefNannyFinishContext();
74464  return __pyx_r;
74465 }
74466 
74467 /* Python wrapper */
74468 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
74469 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
74470  int __pyx_r;
74471  __Pyx_RefNannyDeclarations
74472  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
74473  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
74474 
74475  /* function exit code */
74476  __Pyx_RefNannyFinishContext();
74477  return __pyx_r;
74478 }
74479 
74480 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
74481  int __pyx_r;
74482  __Pyx_TraceDeclarations
74483  __Pyx_RefNannyDeclarations
74484  PyObject *__pyx_t_1 = NULL;
74485  int __pyx_lineno = 0;
74486  const char *__pyx_filename = NULL;
74487  int __pyx_clineno = 0;
74488  __Pyx_RefNannySetupContext("__set__", 0);
74489  __Pyx_TraceCall("__set__", __pyx_f[2], 320, 0, __PYX_ERR(2, 320, __pyx_L1_error));
74490  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem))))) __PYX_ERR(2, 320, __pyx_L1_error)
74491  __pyx_t_1 = __pyx_v_value;
74492  __Pyx_INCREF(__pyx_t_1);
74493  __Pyx_GIVEREF(__pyx_t_1);
74494  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
74495  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
74496  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_t_1);
74497  __pyx_t_1 = 0;
74498 
74499  /* function exit code */
74500  __pyx_r = 0;
74501  goto __pyx_L0;
74502  __pyx_L1_error:;
74503  __Pyx_XDECREF(__pyx_t_1);
74504  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.ProtChSystem.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74505  __pyx_r = -1;
74506  __pyx_L0:;
74507  __Pyx_TraceReturn(Py_None, 0);
74508  __Pyx_RefNannyFinishContext();
74509  return __pyx_r;
74510 }
74511 
74512 /* Python wrapper */
74513 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_5__del__(PyObject *__pyx_v_self); /*proto*/
74514 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_5__del__(PyObject *__pyx_v_self) {
74515  int __pyx_r;
74516  __Pyx_RefNannyDeclarations
74517  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
74518  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74519 
74520  /* function exit code */
74521  __Pyx_RefNannyFinishContext();
74522  return __pyx_r;
74523 }
74524 
74525 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74526  int __pyx_r;
74527  __Pyx_TraceDeclarations
74528  __Pyx_RefNannyDeclarations
74529  int __pyx_lineno = 0;
74530  const char *__pyx_filename = NULL;
74531  int __pyx_clineno = 0;
74532  __Pyx_RefNannySetupContext("__del__", 0);
74533  __Pyx_TraceCall("__del__", __pyx_f[2], 320, 0, __PYX_ERR(2, 320, __pyx_L1_error));
74534  __Pyx_INCREF(Py_None);
74535  __Pyx_GIVEREF(Py_None);
74536  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
74537  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
74538  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None);
74539 
74540  /* function exit code */
74541  __pyx_r = 0;
74542  goto __pyx_L0;
74543  __pyx_L1_error:;
74544  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.ProtChSystem.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74545  __pyx_r = -1;
74546  __pyx_L0:;
74547  __Pyx_TraceReturn(Py_None, 0);
74548  __Pyx_RefNannyFinishContext();
74549  return __pyx_r;
74550 }
74551 
74552 /* "mbd/CouplingFSI.pxd":321
74553  * object model
74554  * ProtChSystem ProtChSystem
74555  * object Mesh # <<<<<<<<<<<<<<
74556  * int nd
74557  * object nodes_function
74558  */
74559 
74560 /* Python wrapper */
74561 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_1__get__(PyObject *__pyx_v_self); /*proto*/
74562 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_1__get__(PyObject *__pyx_v_self) {
74563  PyObject *__pyx_r = 0;
74564  __Pyx_RefNannyDeclarations
74565  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
74566  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74567 
74568  /* function exit code */
74569  __Pyx_RefNannyFinishContext();
74570  return __pyx_r;
74571 }
74572 
74573 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74574  PyObject *__pyx_r = NULL;
74575  __Pyx_TraceDeclarations
74576  __Pyx_RefNannyDeclarations
74577  int __pyx_lineno = 0;
74578  const char *__pyx_filename = NULL;
74579  int __pyx_clineno = 0;
74580  __Pyx_RefNannySetupContext("__get__", 0);
74581  __Pyx_TraceCall("__get__", __pyx_f[2], 321, 0, __PYX_ERR(2, 321, __pyx_L1_error));
74582  __Pyx_XDECREF(__pyx_r);
74583  __Pyx_INCREF(__pyx_v_self->Mesh);
74584  __pyx_r = __pyx_v_self->Mesh;
74585  goto __pyx_L0;
74586 
74587  /* function exit code */
74588  __pyx_L1_error:;
74589  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.Mesh.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74590  __pyx_r = NULL;
74591  __pyx_L0:;
74592  __Pyx_XGIVEREF(__pyx_r);
74593  __Pyx_TraceReturn(__pyx_r, 0);
74594  __Pyx_RefNannyFinishContext();
74595  return __pyx_r;
74596 }
74597 
74598 /* Python wrapper */
74599 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
74600 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
74601  int __pyx_r;
74602  __Pyx_RefNannyDeclarations
74603  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
74604  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
74605 
74606  /* function exit code */
74607  __Pyx_RefNannyFinishContext();
74608  return __pyx_r;
74609 }
74610 
74611 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
74612  int __pyx_r;
74613  __Pyx_TraceDeclarations
74614  __Pyx_RefNannyDeclarations
74615  int __pyx_lineno = 0;
74616  const char *__pyx_filename = NULL;
74617  int __pyx_clineno = 0;
74618  __Pyx_RefNannySetupContext("__set__", 0);
74619  __Pyx_TraceCall("__set__", __pyx_f[2], 321, 0, __PYX_ERR(2, 321, __pyx_L1_error));
74620  __Pyx_INCREF(__pyx_v_value);
74621  __Pyx_GIVEREF(__pyx_v_value);
74622  __Pyx_GOTREF(__pyx_v_self->Mesh);
74623  __Pyx_DECREF(__pyx_v_self->Mesh);
74624  __pyx_v_self->Mesh = __pyx_v_value;
74625 
74626  /* function exit code */
74627  __pyx_r = 0;
74628  goto __pyx_L0;
74629  __pyx_L1_error:;
74630  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.Mesh.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74631  __pyx_r = -1;
74632  __pyx_L0:;
74633  __Pyx_TraceReturn(Py_None, 0);
74634  __Pyx_RefNannyFinishContext();
74635  return __pyx_r;
74636 }
74637 
74638 /* Python wrapper */
74639 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_5__del__(PyObject *__pyx_v_self); /*proto*/
74640 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_5__del__(PyObject *__pyx_v_self) {
74641  int __pyx_r;
74642  __Pyx_RefNannyDeclarations
74643  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
74644  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74645 
74646  /* function exit code */
74647  __Pyx_RefNannyFinishContext();
74648  return __pyx_r;
74649 }
74650 
74651 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74652  int __pyx_r;
74653  __Pyx_TraceDeclarations
74654  __Pyx_RefNannyDeclarations
74655  int __pyx_lineno = 0;
74656  const char *__pyx_filename = NULL;
74657  int __pyx_clineno = 0;
74658  __Pyx_RefNannySetupContext("__del__", 0);
74659  __Pyx_TraceCall("__del__", __pyx_f[2], 321, 0, __PYX_ERR(2, 321, __pyx_L1_error));
74660  __Pyx_INCREF(Py_None);
74661  __Pyx_GIVEREF(Py_None);
74662  __Pyx_GOTREF(__pyx_v_self->Mesh);
74663  __Pyx_DECREF(__pyx_v_self->Mesh);
74664  __pyx_v_self->Mesh = Py_None;
74665 
74666  /* function exit code */
74667  __pyx_r = 0;
74668  goto __pyx_L0;
74669  __pyx_L1_error:;
74670  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.Mesh.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74671  __pyx_r = -1;
74672  __pyx_L0:;
74673  __Pyx_TraceReturn(Py_None, 0);
74674  __Pyx_RefNannyFinishContext();
74675  return __pyx_r;
74676 }
74677 
74678 /* "mbd/CouplingFSI.pxd":322
74679  * ProtChSystem ProtChSystem
74680  * object Mesh
74681  * int nd # <<<<<<<<<<<<<<
74682  * object nodes_function
74683  * object nodes_function_tangent
74684  */
74685 
74686 /* Python wrapper */
74687 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_2nd_1__get__(PyObject *__pyx_v_self); /*proto*/
74688 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_2nd_1__get__(PyObject *__pyx_v_self) {
74689  PyObject *__pyx_r = 0;
74690  __Pyx_RefNannyDeclarations
74691  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
74692  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2nd___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74693 
74694  /* function exit code */
74695  __Pyx_RefNannyFinishContext();
74696  return __pyx_r;
74697 }
74698 
74699 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2nd___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74700  PyObject *__pyx_r = NULL;
74701  __Pyx_TraceDeclarations
74702  __Pyx_RefNannyDeclarations
74703  PyObject *__pyx_t_1 = NULL;
74704  int __pyx_lineno = 0;
74705  const char *__pyx_filename = NULL;
74706  int __pyx_clineno = 0;
74707  __Pyx_RefNannySetupContext("__get__", 0);
74708  __Pyx_TraceCall("__get__", __pyx_f[2], 322, 0, __PYX_ERR(2, 322, __pyx_L1_error));
74709  __Pyx_XDECREF(__pyx_r);
74710  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nd); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 322, __pyx_L1_error)
74711  __Pyx_GOTREF(__pyx_t_1);
74712  __pyx_r = __pyx_t_1;
74713  __pyx_t_1 = 0;
74714  goto __pyx_L0;
74715 
74716  /* function exit code */
74717  __pyx_L1_error:;
74718  __Pyx_XDECREF(__pyx_t_1);
74719  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nd.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74720  __pyx_r = NULL;
74721  __pyx_L0:;
74722  __Pyx_XGIVEREF(__pyx_r);
74723  __Pyx_TraceReturn(__pyx_r, 0);
74724  __Pyx_RefNannyFinishContext();
74725  return __pyx_r;
74726 }
74727 
74728 /* Python wrapper */
74729 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
74730 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_2nd_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
74731  int __pyx_r;
74732  __Pyx_RefNannyDeclarations
74733  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
74734  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2nd_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
74735 
74736  /* function exit code */
74737  __Pyx_RefNannyFinishContext();
74738  return __pyx_r;
74739 }
74740 
74741 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_2nd_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
74742  int __pyx_r;
74743  __Pyx_TraceDeclarations
74744  __Pyx_RefNannyDeclarations
74745  int __pyx_t_1;
74746  int __pyx_lineno = 0;
74747  const char *__pyx_filename = NULL;
74748  int __pyx_clineno = 0;
74749  __Pyx_RefNannySetupContext("__set__", 0);
74750  __Pyx_TraceCall("__set__", __pyx_f[2], 322, 0, __PYX_ERR(2, 322, __pyx_L1_error));
74751  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 322, __pyx_L1_error)
74752  __pyx_v_self->nd = __pyx_t_1;
74753 
74754  /* function exit code */
74755  __pyx_r = 0;
74756  goto __pyx_L0;
74757  __pyx_L1_error:;
74758  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nd.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74759  __pyx_r = -1;
74760  __pyx_L0:;
74761  __Pyx_TraceReturn(Py_None, 0);
74762  __Pyx_RefNannyFinishContext();
74763  return __pyx_r;
74764 }
74765 
74766 /* "mbd/CouplingFSI.pxd":323
74767  * object Mesh
74768  * int nd
74769  * object nodes_function # <<<<<<<<<<<<<<
74770  * object nodes_function_tangent
74771  * object fluid_velocity_function
74772  */
74773 
74774 /* Python wrapper */
74775 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_1__get__(PyObject *__pyx_v_self); /*proto*/
74776 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_1__get__(PyObject *__pyx_v_self) {
74777  PyObject *__pyx_r = 0;
74778  __Pyx_RefNannyDeclarations
74779  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
74780  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74781 
74782  /* function exit code */
74783  __Pyx_RefNannyFinishContext();
74784  return __pyx_r;
74785 }
74786 
74787 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74788  PyObject *__pyx_r = NULL;
74789  __Pyx_TraceDeclarations
74790  __Pyx_RefNannyDeclarations
74791  int __pyx_lineno = 0;
74792  const char *__pyx_filename = NULL;
74793  int __pyx_clineno = 0;
74794  __Pyx_RefNannySetupContext("__get__", 0);
74795  __Pyx_TraceCall("__get__", __pyx_f[2], 323, 0, __PYX_ERR(2, 323, __pyx_L1_error));
74796  __Pyx_XDECREF(__pyx_r);
74797  __Pyx_INCREF(__pyx_v_self->nodes_function);
74798  __pyx_r = __pyx_v_self->nodes_function;
74799  goto __pyx_L0;
74800 
74801  /* function exit code */
74802  __pyx_L1_error:;
74803  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_function.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74804  __pyx_r = NULL;
74805  __pyx_L0:;
74806  __Pyx_XGIVEREF(__pyx_r);
74807  __Pyx_TraceReturn(__pyx_r, 0);
74808  __Pyx_RefNannyFinishContext();
74809  return __pyx_r;
74810 }
74811 
74812 /* Python wrapper */
74813 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
74814 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
74815  int __pyx_r;
74816  __Pyx_RefNannyDeclarations
74817  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
74818  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
74819 
74820  /* function exit code */
74821  __Pyx_RefNannyFinishContext();
74822  return __pyx_r;
74823 }
74824 
74825 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
74826  int __pyx_r;
74827  __Pyx_TraceDeclarations
74828  __Pyx_RefNannyDeclarations
74829  int __pyx_lineno = 0;
74830  const char *__pyx_filename = NULL;
74831  int __pyx_clineno = 0;
74832  __Pyx_RefNannySetupContext("__set__", 0);
74833  __Pyx_TraceCall("__set__", __pyx_f[2], 323, 0, __PYX_ERR(2, 323, __pyx_L1_error));
74834  __Pyx_INCREF(__pyx_v_value);
74835  __Pyx_GIVEREF(__pyx_v_value);
74836  __Pyx_GOTREF(__pyx_v_self->nodes_function);
74837  __Pyx_DECREF(__pyx_v_self->nodes_function);
74838  __pyx_v_self->nodes_function = __pyx_v_value;
74839 
74840  /* function exit code */
74841  __pyx_r = 0;
74842  goto __pyx_L0;
74843  __pyx_L1_error:;
74844  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_function.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74845  __pyx_r = -1;
74846  __pyx_L0:;
74847  __Pyx_TraceReturn(Py_None, 0);
74848  __Pyx_RefNannyFinishContext();
74849  return __pyx_r;
74850 }
74851 
74852 /* Python wrapper */
74853 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_5__del__(PyObject *__pyx_v_self); /*proto*/
74854 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_5__del__(PyObject *__pyx_v_self) {
74855  int __pyx_r;
74856  __Pyx_RefNannyDeclarations
74857  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
74858  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74859 
74860  /* function exit code */
74861  __Pyx_RefNannyFinishContext();
74862  return __pyx_r;
74863 }
74864 
74865 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74866  int __pyx_r;
74867  __Pyx_TraceDeclarations
74868  __Pyx_RefNannyDeclarations
74869  int __pyx_lineno = 0;
74870  const char *__pyx_filename = NULL;
74871  int __pyx_clineno = 0;
74872  __Pyx_RefNannySetupContext("__del__", 0);
74873  __Pyx_TraceCall("__del__", __pyx_f[2], 323, 0, __PYX_ERR(2, 323, __pyx_L1_error));
74874  __Pyx_INCREF(Py_None);
74875  __Pyx_GIVEREF(Py_None);
74876  __Pyx_GOTREF(__pyx_v_self->nodes_function);
74877  __Pyx_DECREF(__pyx_v_self->nodes_function);
74878  __pyx_v_self->nodes_function = Py_None;
74879 
74880  /* function exit code */
74881  __pyx_r = 0;
74882  goto __pyx_L0;
74883  __pyx_L1_error:;
74884  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_function.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74885  __pyx_r = -1;
74886  __pyx_L0:;
74887  __Pyx_TraceReturn(Py_None, 0);
74888  __Pyx_RefNannyFinishContext();
74889  return __pyx_r;
74890 }
74891 
74892 /* "mbd/CouplingFSI.pxd":324
74893  * int nd
74894  * object nodes_function
74895  * object nodes_function_tangent # <<<<<<<<<<<<<<
74896  * object fluid_velocity_function
74897  * ProtChBody body_front
74898  */
74899 
74900 /* Python wrapper */
74901 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_1__get__(PyObject *__pyx_v_self); /*proto*/
74902 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_1__get__(PyObject *__pyx_v_self) {
74903  PyObject *__pyx_r = 0;
74904  __Pyx_RefNannyDeclarations
74905  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
74906  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74907 
74908  /* function exit code */
74909  __Pyx_RefNannyFinishContext();
74910  return __pyx_r;
74911 }
74912 
74913 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74914  PyObject *__pyx_r = NULL;
74915  __Pyx_TraceDeclarations
74916  __Pyx_RefNannyDeclarations
74917  int __pyx_lineno = 0;
74918  const char *__pyx_filename = NULL;
74919  int __pyx_clineno = 0;
74920  __Pyx_RefNannySetupContext("__get__", 0);
74921  __Pyx_TraceCall("__get__", __pyx_f[2], 324, 0, __PYX_ERR(2, 324, __pyx_L1_error));
74922  __Pyx_XDECREF(__pyx_r);
74923  __Pyx_INCREF(__pyx_v_self->nodes_function_tangent);
74924  __pyx_r = __pyx_v_self->nodes_function_tangent;
74925  goto __pyx_L0;
74926 
74927  /* function exit code */
74928  __pyx_L1_error:;
74929  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_function_tangent.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74930  __pyx_r = NULL;
74931  __pyx_L0:;
74932  __Pyx_XGIVEREF(__pyx_r);
74933  __Pyx_TraceReturn(__pyx_r, 0);
74934  __Pyx_RefNannyFinishContext();
74935  return __pyx_r;
74936 }
74937 
74938 /* Python wrapper */
74939 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
74940 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
74941  int __pyx_r;
74942  __Pyx_RefNannyDeclarations
74943  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
74944  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
74945 
74946  /* function exit code */
74947  __Pyx_RefNannyFinishContext();
74948  return __pyx_r;
74949 }
74950 
74951 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
74952  int __pyx_r;
74953  __Pyx_TraceDeclarations
74954  __Pyx_RefNannyDeclarations
74955  int __pyx_lineno = 0;
74956  const char *__pyx_filename = NULL;
74957  int __pyx_clineno = 0;
74958  __Pyx_RefNannySetupContext("__set__", 0);
74959  __Pyx_TraceCall("__set__", __pyx_f[2], 324, 0, __PYX_ERR(2, 324, __pyx_L1_error));
74960  __Pyx_INCREF(__pyx_v_value);
74961  __Pyx_GIVEREF(__pyx_v_value);
74962  __Pyx_GOTREF(__pyx_v_self->nodes_function_tangent);
74963  __Pyx_DECREF(__pyx_v_self->nodes_function_tangent);
74964  __pyx_v_self->nodes_function_tangent = __pyx_v_value;
74965 
74966  /* function exit code */
74967  __pyx_r = 0;
74968  goto __pyx_L0;
74969  __pyx_L1_error:;
74970  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_function_tangent.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
74971  __pyx_r = -1;
74972  __pyx_L0:;
74973  __Pyx_TraceReturn(Py_None, 0);
74974  __Pyx_RefNannyFinishContext();
74975  return __pyx_r;
74976 }
74977 
74978 /* Python wrapper */
74979 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_5__del__(PyObject *__pyx_v_self); /*proto*/
74980 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_5__del__(PyObject *__pyx_v_self) {
74981  int __pyx_r;
74982  __Pyx_RefNannyDeclarations
74983  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
74984  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
74985 
74986  /* function exit code */
74987  __Pyx_RefNannyFinishContext();
74988  return __pyx_r;
74989 }
74990 
74991 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
74992  int __pyx_r;
74993  __Pyx_TraceDeclarations
74994  __Pyx_RefNannyDeclarations
74995  int __pyx_lineno = 0;
74996  const char *__pyx_filename = NULL;
74997  int __pyx_clineno = 0;
74998  __Pyx_RefNannySetupContext("__del__", 0);
74999  __Pyx_TraceCall("__del__", __pyx_f[2], 324, 0, __PYX_ERR(2, 324, __pyx_L1_error));
75000  __Pyx_INCREF(Py_None);
75001  __Pyx_GIVEREF(Py_None);
75002  __Pyx_GOTREF(__pyx_v_self->nodes_function_tangent);
75003  __Pyx_DECREF(__pyx_v_self->nodes_function_tangent);
75004  __pyx_v_self->nodes_function_tangent = Py_None;
75005 
75006  /* function exit code */
75007  __pyx_r = 0;
75008  goto __pyx_L0;
75009  __pyx_L1_error:;
75010  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_function_tangent.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75011  __pyx_r = -1;
75012  __pyx_L0:;
75013  __Pyx_TraceReturn(Py_None, 0);
75014  __Pyx_RefNannyFinishContext();
75015  return __pyx_r;
75016 }
75017 
75018 /* "mbd/CouplingFSI.pxd":325
75019  * object nodes_function
75020  * object nodes_function_tangent
75021  * object fluid_velocity_function # <<<<<<<<<<<<<<
75022  * ProtChBody body_front
75023  * ProtChBody body_back
75024  */
75025 
75026 /* Python wrapper */
75027 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_1__get__(PyObject *__pyx_v_self); /*proto*/
75028 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_1__get__(PyObject *__pyx_v_self) {
75029  PyObject *__pyx_r = 0;
75030  __Pyx_RefNannyDeclarations
75031  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75032  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75033 
75034  /* function exit code */
75035  __Pyx_RefNannyFinishContext();
75036  return __pyx_r;
75037 }
75038 
75039 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75040  PyObject *__pyx_r = NULL;
75041  __Pyx_TraceDeclarations
75042  __Pyx_RefNannyDeclarations
75043  int __pyx_lineno = 0;
75044  const char *__pyx_filename = NULL;
75045  int __pyx_clineno = 0;
75046  __Pyx_RefNannySetupContext("__get__", 0);
75047  __Pyx_TraceCall("__get__", __pyx_f[2], 325, 0, __PYX_ERR(2, 325, __pyx_L1_error));
75048  __Pyx_XDECREF(__pyx_r);
75049  __Pyx_INCREF(__pyx_v_self->fluid_velocity_function);
75050  __pyx_r = __pyx_v_self->fluid_velocity_function;
75051  goto __pyx_L0;
75052 
75053  /* function exit code */
75054  __pyx_L1_error:;
75055  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_function.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75056  __pyx_r = NULL;
75057  __pyx_L0:;
75058  __Pyx_XGIVEREF(__pyx_r);
75059  __Pyx_TraceReturn(__pyx_r, 0);
75060  __Pyx_RefNannyFinishContext();
75061  return __pyx_r;
75062 }
75063 
75064 /* Python wrapper */
75065 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75066 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75067  int __pyx_r;
75068  __Pyx_RefNannyDeclarations
75069  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75070  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75071 
75072  /* function exit code */
75073  __Pyx_RefNannyFinishContext();
75074  return __pyx_r;
75075 }
75076 
75077 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75078  int __pyx_r;
75079  __Pyx_TraceDeclarations
75080  __Pyx_RefNannyDeclarations
75081  int __pyx_lineno = 0;
75082  const char *__pyx_filename = NULL;
75083  int __pyx_clineno = 0;
75084  __Pyx_RefNannySetupContext("__set__", 0);
75085  __Pyx_TraceCall("__set__", __pyx_f[2], 325, 0, __PYX_ERR(2, 325, __pyx_L1_error));
75086  __Pyx_INCREF(__pyx_v_value);
75087  __Pyx_GIVEREF(__pyx_v_value);
75088  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_function);
75089  __Pyx_DECREF(__pyx_v_self->fluid_velocity_function);
75090  __pyx_v_self->fluid_velocity_function = __pyx_v_value;
75091 
75092  /* function exit code */
75093  __pyx_r = 0;
75094  goto __pyx_L0;
75095  __pyx_L1_error:;
75096  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_function.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75097  __pyx_r = -1;
75098  __pyx_L0:;
75099  __Pyx_TraceReturn(Py_None, 0);
75100  __Pyx_RefNannyFinishContext();
75101  return __pyx_r;
75102 }
75103 
75104 /* Python wrapper */
75105 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_5__del__(PyObject *__pyx_v_self); /*proto*/
75106 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_5__del__(PyObject *__pyx_v_self) {
75107  int __pyx_r;
75108  __Pyx_RefNannyDeclarations
75109  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
75110  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75111 
75112  /* function exit code */
75113  __Pyx_RefNannyFinishContext();
75114  return __pyx_r;
75115 }
75116 
75117 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75118  int __pyx_r;
75119  __Pyx_TraceDeclarations
75120  __Pyx_RefNannyDeclarations
75121  int __pyx_lineno = 0;
75122  const char *__pyx_filename = NULL;
75123  int __pyx_clineno = 0;
75124  __Pyx_RefNannySetupContext("__del__", 0);
75125  __Pyx_TraceCall("__del__", __pyx_f[2], 325, 0, __PYX_ERR(2, 325, __pyx_L1_error));
75126  __Pyx_INCREF(Py_None);
75127  __Pyx_GIVEREF(Py_None);
75128  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_function);
75129  __Pyx_DECREF(__pyx_v_self->fluid_velocity_function);
75130  __pyx_v_self->fluid_velocity_function = Py_None;
75131 
75132  /* function exit code */
75133  __pyx_r = 0;
75134  goto __pyx_L0;
75135  __pyx_L1_error:;
75136  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_function.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75137  __pyx_r = -1;
75138  __pyx_L0:;
75139  __Pyx_TraceReturn(Py_None, 0);
75140  __Pyx_RefNannyFinishContext();
75141  return __pyx_r;
75142 }
75143 
75144 /* "mbd/CouplingFSI.pxd":326
75145  * object nodes_function_tangent
75146  * object fluid_velocity_function
75147  * ProtChBody body_front # <<<<<<<<<<<<<<
75148  * ProtChBody body_back
75149  * bool front_body
75150  */
75151 
75152 /* Python wrapper */
75153 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_1__get__(PyObject *__pyx_v_self); /*proto*/
75154 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_1__get__(PyObject *__pyx_v_self) {
75155  PyObject *__pyx_r = 0;
75156  __Pyx_RefNannyDeclarations
75157  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75158  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75159 
75160  /* function exit code */
75161  __Pyx_RefNannyFinishContext();
75162  return __pyx_r;
75163 }
75164 
75165 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75166  PyObject *__pyx_r = NULL;
75167  __Pyx_TraceDeclarations
75168  __Pyx_RefNannyDeclarations
75169  int __pyx_lineno = 0;
75170  const char *__pyx_filename = NULL;
75171  int __pyx_clineno = 0;
75172  __Pyx_RefNannySetupContext("__get__", 0);
75173  __Pyx_TraceCall("__get__", __pyx_f[2], 326, 0, __PYX_ERR(2, 326, __pyx_L1_error));
75174  __Pyx_XDECREF(__pyx_r);
75175  __Pyx_INCREF(((PyObject *)__pyx_v_self->body_front));
75176  __pyx_r = ((PyObject *)__pyx_v_self->body_front);
75177  goto __pyx_L0;
75178 
75179  /* function exit code */
75180  __pyx_L1_error:;
75181  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.body_front.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75182  __pyx_r = NULL;
75183  __pyx_L0:;
75184  __Pyx_XGIVEREF(__pyx_r);
75185  __Pyx_TraceReturn(__pyx_r, 0);
75186  __Pyx_RefNannyFinishContext();
75187  return __pyx_r;
75188 }
75189 
75190 /* Python wrapper */
75191 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75192 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75193  int __pyx_r;
75194  __Pyx_RefNannyDeclarations
75195  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75196  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75197 
75198  /* function exit code */
75199  __Pyx_RefNannyFinishContext();
75200  return __pyx_r;
75201 }
75202 
75203 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75204  int __pyx_r;
75205  __Pyx_TraceDeclarations
75206  __Pyx_RefNannyDeclarations
75207  PyObject *__pyx_t_1 = NULL;
75208  int __pyx_lineno = 0;
75209  const char *__pyx_filename = NULL;
75210  int __pyx_clineno = 0;
75211  __Pyx_RefNannySetupContext("__set__", 0);
75212  __Pyx_TraceCall("__set__", __pyx_f[2], 326, 0, __PYX_ERR(2, 326, __pyx_L1_error));
75213  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ProtChBody))))) __PYX_ERR(2, 326, __pyx_L1_error)
75214  __pyx_t_1 = __pyx_v_value;
75215  __Pyx_INCREF(__pyx_t_1);
75216  __Pyx_GIVEREF(__pyx_t_1);
75217  __Pyx_GOTREF(__pyx_v_self->body_front);
75218  __Pyx_DECREF(((PyObject *)__pyx_v_self->body_front));
75219  __pyx_v_self->body_front = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_t_1);
75220  __pyx_t_1 = 0;
75221 
75222  /* function exit code */
75223  __pyx_r = 0;
75224  goto __pyx_L0;
75225  __pyx_L1_error:;
75226  __Pyx_XDECREF(__pyx_t_1);
75227  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.body_front.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75228  __pyx_r = -1;
75229  __pyx_L0:;
75230  __Pyx_TraceReturn(Py_None, 0);
75231  __Pyx_RefNannyFinishContext();
75232  return __pyx_r;
75233 }
75234 
75235 /* Python wrapper */
75236 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_5__del__(PyObject *__pyx_v_self); /*proto*/
75237 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_5__del__(PyObject *__pyx_v_self) {
75238  int __pyx_r;
75239  __Pyx_RefNannyDeclarations
75240  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
75241  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75242 
75243  /* function exit code */
75244  __Pyx_RefNannyFinishContext();
75245  return __pyx_r;
75246 }
75247 
75248 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75249  int __pyx_r;
75250  __Pyx_TraceDeclarations
75251  __Pyx_RefNannyDeclarations
75252  int __pyx_lineno = 0;
75253  const char *__pyx_filename = NULL;
75254  int __pyx_clineno = 0;
75255  __Pyx_RefNannySetupContext("__del__", 0);
75256  __Pyx_TraceCall("__del__", __pyx_f[2], 326, 0, __PYX_ERR(2, 326, __pyx_L1_error));
75257  __Pyx_INCREF(Py_None);
75258  __Pyx_GIVEREF(Py_None);
75259  __Pyx_GOTREF(__pyx_v_self->body_front);
75260  __Pyx_DECREF(((PyObject *)__pyx_v_self->body_front));
75261  __pyx_v_self->body_front = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)Py_None);
75262 
75263  /* function exit code */
75264  __pyx_r = 0;
75265  goto __pyx_L0;
75266  __pyx_L1_error:;
75267  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.body_front.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75268  __pyx_r = -1;
75269  __pyx_L0:;
75270  __Pyx_TraceReturn(Py_None, 0);
75271  __Pyx_RefNannyFinishContext();
75272  return __pyx_r;
75273 }
75274 
75275 /* "mbd/CouplingFSI.pxd":327
75276  * object fluid_velocity_function
75277  * ProtChBody body_front
75278  * ProtChBody body_back # <<<<<<<<<<<<<<
75279  * bool front_body
75280  * bool back_body
75281  */
75282 
75283 /* Python wrapper */
75284 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_1__get__(PyObject *__pyx_v_self); /*proto*/
75285 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_1__get__(PyObject *__pyx_v_self) {
75286  PyObject *__pyx_r = 0;
75287  __Pyx_RefNannyDeclarations
75288  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75289  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75290 
75291  /* function exit code */
75292  __Pyx_RefNannyFinishContext();
75293  return __pyx_r;
75294 }
75295 
75296 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75297  PyObject *__pyx_r = NULL;
75298  __Pyx_TraceDeclarations
75299  __Pyx_RefNannyDeclarations
75300  int __pyx_lineno = 0;
75301  const char *__pyx_filename = NULL;
75302  int __pyx_clineno = 0;
75303  __Pyx_RefNannySetupContext("__get__", 0);
75304  __Pyx_TraceCall("__get__", __pyx_f[2], 327, 0, __PYX_ERR(2, 327, __pyx_L1_error));
75305  __Pyx_XDECREF(__pyx_r);
75306  __Pyx_INCREF(((PyObject *)__pyx_v_self->body_back));
75307  __pyx_r = ((PyObject *)__pyx_v_self->body_back);
75308  goto __pyx_L0;
75309 
75310  /* function exit code */
75311  __pyx_L1_error:;
75312  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.body_back.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75313  __pyx_r = NULL;
75314  __pyx_L0:;
75315  __Pyx_XGIVEREF(__pyx_r);
75316  __Pyx_TraceReturn(__pyx_r, 0);
75317  __Pyx_RefNannyFinishContext();
75318  return __pyx_r;
75319 }
75320 
75321 /* Python wrapper */
75322 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75323 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75324  int __pyx_r;
75325  __Pyx_RefNannyDeclarations
75326  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75327  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75328 
75329  /* function exit code */
75330  __Pyx_RefNannyFinishContext();
75331  return __pyx_r;
75332 }
75333 
75334 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75335  int __pyx_r;
75336  __Pyx_TraceDeclarations
75337  __Pyx_RefNannyDeclarations
75338  PyObject *__pyx_t_1 = NULL;
75339  int __pyx_lineno = 0;
75340  const char *__pyx_filename = NULL;
75341  int __pyx_clineno = 0;
75342  __Pyx_RefNannySetupContext("__set__", 0);
75343  __Pyx_TraceCall("__set__", __pyx_f[2], 327, 0, __PYX_ERR(2, 327, __pyx_L1_error));
75344  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ProtChBody))))) __PYX_ERR(2, 327, __pyx_L1_error)
75345  __pyx_t_1 = __pyx_v_value;
75346  __Pyx_INCREF(__pyx_t_1);
75347  __Pyx_GIVEREF(__pyx_t_1);
75348  __Pyx_GOTREF(__pyx_v_self->body_back);
75349  __Pyx_DECREF(((PyObject *)__pyx_v_self->body_back));
75350  __pyx_v_self->body_back = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)__pyx_t_1);
75351  __pyx_t_1 = 0;
75352 
75353  /* function exit code */
75354  __pyx_r = 0;
75355  goto __pyx_L0;
75356  __pyx_L1_error:;
75357  __Pyx_XDECREF(__pyx_t_1);
75358  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.body_back.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75359  __pyx_r = -1;
75360  __pyx_L0:;
75361  __Pyx_TraceReturn(Py_None, 0);
75362  __Pyx_RefNannyFinishContext();
75363  return __pyx_r;
75364 }
75365 
75366 /* Python wrapper */
75367 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_5__del__(PyObject *__pyx_v_self); /*proto*/
75368 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_5__del__(PyObject *__pyx_v_self) {
75369  int __pyx_r;
75370  __Pyx_RefNannyDeclarations
75371  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
75372  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75373 
75374  /* function exit code */
75375  __Pyx_RefNannyFinishContext();
75376  return __pyx_r;
75377 }
75378 
75379 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75380  int __pyx_r;
75381  __Pyx_TraceDeclarations
75382  __Pyx_RefNannyDeclarations
75383  int __pyx_lineno = 0;
75384  const char *__pyx_filename = NULL;
75385  int __pyx_clineno = 0;
75386  __Pyx_RefNannySetupContext("__del__", 0);
75387  __Pyx_TraceCall("__del__", __pyx_f[2], 327, 0, __PYX_ERR(2, 327, __pyx_L1_error));
75388  __Pyx_INCREF(Py_None);
75389  __Pyx_GIVEREF(Py_None);
75390  __Pyx_GOTREF(__pyx_v_self->body_back);
75391  __Pyx_DECREF(((PyObject *)__pyx_v_self->body_back));
75392  __pyx_v_self->body_back = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)Py_None);
75393 
75394  /* function exit code */
75395  __pyx_r = 0;
75396  goto __pyx_L0;
75397  __pyx_L1_error:;
75398  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.body_back.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75399  __pyx_r = -1;
75400  __pyx_L0:;
75401  __Pyx_TraceReturn(Py_None, 0);
75402  __Pyx_RefNannyFinishContext();
75403  return __pyx_r;
75404 }
75405 
75406 /* "mbd/CouplingFSI.pxd":328
75407  * ProtChBody body_front
75408  * ProtChBody body_back
75409  * bool front_body # <<<<<<<<<<<<<<
75410  * bool back_body
75411  * bool nodes_built
75412  */
75413 
75414 /* Python wrapper */
75415 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_1__get__(PyObject *__pyx_v_self); /*proto*/
75416 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_1__get__(PyObject *__pyx_v_self) {
75417  PyObject *__pyx_r = 0;
75418  __Pyx_RefNannyDeclarations
75419  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75420  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10front_body___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75421 
75422  /* function exit code */
75423  __Pyx_RefNannyFinishContext();
75424  return __pyx_r;
75425 }
75426 
75427 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10front_body___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75428  PyObject *__pyx_r = NULL;
75429  __Pyx_TraceDeclarations
75430  __Pyx_RefNannyDeclarations
75431  PyObject *__pyx_t_1 = NULL;
75432  int __pyx_lineno = 0;
75433  const char *__pyx_filename = NULL;
75434  int __pyx_clineno = 0;
75435  __Pyx_RefNannySetupContext("__get__", 0);
75436  __Pyx_TraceCall("__get__", __pyx_f[2], 328, 0, __PYX_ERR(2, 328, __pyx_L1_error));
75437  __Pyx_XDECREF(__pyx_r);
75438  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->front_body); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 328, __pyx_L1_error)
75439  __Pyx_GOTREF(__pyx_t_1);
75440  __pyx_r = __pyx_t_1;
75441  __pyx_t_1 = 0;
75442  goto __pyx_L0;
75443 
75444  /* function exit code */
75445  __pyx_L1_error:;
75446  __Pyx_XDECREF(__pyx_t_1);
75447  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.front_body.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75448  __pyx_r = NULL;
75449  __pyx_L0:;
75450  __Pyx_XGIVEREF(__pyx_r);
75451  __Pyx_TraceReturn(__pyx_r, 0);
75452  __Pyx_RefNannyFinishContext();
75453  return __pyx_r;
75454 }
75455 
75456 /* Python wrapper */
75457 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75458 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75459  int __pyx_r;
75460  __Pyx_RefNannyDeclarations
75461  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75462  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75463 
75464  /* function exit code */
75465  __Pyx_RefNannyFinishContext();
75466  return __pyx_r;
75467 }
75468 
75469 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75470  int __pyx_r;
75471  __Pyx_TraceDeclarations
75472  __Pyx_RefNannyDeclarations
75473  bool __pyx_t_1;
75474  int __pyx_lineno = 0;
75475  const char *__pyx_filename = NULL;
75476  int __pyx_clineno = 0;
75477  __Pyx_RefNannySetupContext("__set__", 0);
75478  __Pyx_TraceCall("__set__", __pyx_f[2], 328, 0, __PYX_ERR(2, 328, __pyx_L1_error));
75479  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 328, __pyx_L1_error)
75480  __pyx_v_self->front_body = __pyx_t_1;
75481 
75482  /* function exit code */
75483  __pyx_r = 0;
75484  goto __pyx_L0;
75485  __pyx_L1_error:;
75486  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.front_body.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75487  __pyx_r = -1;
75488  __pyx_L0:;
75489  __Pyx_TraceReturn(Py_None, 0);
75490  __Pyx_RefNannyFinishContext();
75491  return __pyx_r;
75492 }
75493 
75494 /* "mbd/CouplingFSI.pxd":329
75495  * ProtChBody body_back
75496  * bool front_body
75497  * bool back_body # <<<<<<<<<<<<<<
75498  * bool nodes_built
75499  * bool external_forces_from_ns
75500  */
75501 
75502 /* Python wrapper */
75503 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_1__get__(PyObject *__pyx_v_self); /*proto*/
75504 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_1__get__(PyObject *__pyx_v_self) {
75505  PyObject *__pyx_r = 0;
75506  __Pyx_RefNannyDeclarations
75507  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75508  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9back_body___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75509 
75510  /* function exit code */
75511  __Pyx_RefNannyFinishContext();
75512  return __pyx_r;
75513 }
75514 
75515 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9back_body___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75516  PyObject *__pyx_r = NULL;
75517  __Pyx_TraceDeclarations
75518  __Pyx_RefNannyDeclarations
75519  PyObject *__pyx_t_1 = NULL;
75520  int __pyx_lineno = 0;
75521  const char *__pyx_filename = NULL;
75522  int __pyx_clineno = 0;
75523  __Pyx_RefNannySetupContext("__get__", 0);
75524  __Pyx_TraceCall("__get__", __pyx_f[2], 329, 0, __PYX_ERR(2, 329, __pyx_L1_error));
75525  __Pyx_XDECREF(__pyx_r);
75526  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->back_body); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 329, __pyx_L1_error)
75527  __Pyx_GOTREF(__pyx_t_1);
75528  __pyx_r = __pyx_t_1;
75529  __pyx_t_1 = 0;
75530  goto __pyx_L0;
75531 
75532  /* function exit code */
75533  __pyx_L1_error:;
75534  __Pyx_XDECREF(__pyx_t_1);
75535  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.back_body.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75536  __pyx_r = NULL;
75537  __pyx_L0:;
75538  __Pyx_XGIVEREF(__pyx_r);
75539  __Pyx_TraceReturn(__pyx_r, 0);
75540  __Pyx_RefNannyFinishContext();
75541  return __pyx_r;
75542 }
75543 
75544 /* Python wrapper */
75545 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75546 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75547  int __pyx_r;
75548  __Pyx_RefNannyDeclarations
75549  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75550  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75551 
75552  /* function exit code */
75553  __Pyx_RefNannyFinishContext();
75554  return __pyx_r;
75555 }
75556 
75557 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75558  int __pyx_r;
75559  __Pyx_TraceDeclarations
75560  __Pyx_RefNannyDeclarations
75561  bool __pyx_t_1;
75562  int __pyx_lineno = 0;
75563  const char *__pyx_filename = NULL;
75564  int __pyx_clineno = 0;
75565  __Pyx_RefNannySetupContext("__set__", 0);
75566  __Pyx_TraceCall("__set__", __pyx_f[2], 329, 0, __PYX_ERR(2, 329, __pyx_L1_error));
75567  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 329, __pyx_L1_error)
75568  __pyx_v_self->back_body = __pyx_t_1;
75569 
75570  /* function exit code */
75571  __pyx_r = 0;
75572  goto __pyx_L0;
75573  __pyx_L1_error:;
75574  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.back_body.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75575  __pyx_r = -1;
75576  __pyx_L0:;
75577  __Pyx_TraceReturn(Py_None, 0);
75578  __Pyx_RefNannyFinishContext();
75579  return __pyx_r;
75580 }
75581 
75582 /* "mbd/CouplingFSI.pxd":330
75583  * bool front_body
75584  * bool back_body
75585  * bool nodes_built # <<<<<<<<<<<<<<
75586  * bool external_forces_from_ns
75587  * bool external_forces_manual
75588  */
75589 
75590 /* Python wrapper */
75591 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_1__get__(PyObject *__pyx_v_self); /*proto*/
75592 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_1__get__(PyObject *__pyx_v_self) {
75593  PyObject *__pyx_r = 0;
75594  __Pyx_RefNannyDeclarations
75595  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75596  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75597 
75598  /* function exit code */
75599  __Pyx_RefNannyFinishContext();
75600  return __pyx_r;
75601 }
75602 
75603 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75604  PyObject *__pyx_r = NULL;
75605  __Pyx_TraceDeclarations
75606  __Pyx_RefNannyDeclarations
75607  PyObject *__pyx_t_1 = NULL;
75608  int __pyx_lineno = 0;
75609  const char *__pyx_filename = NULL;
75610  int __pyx_clineno = 0;
75611  __Pyx_RefNannySetupContext("__get__", 0);
75612  __Pyx_TraceCall("__get__", __pyx_f[2], 330, 0, __PYX_ERR(2, 330, __pyx_L1_error));
75613  __Pyx_XDECREF(__pyx_r);
75614  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->nodes_built); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 330, __pyx_L1_error)
75615  __Pyx_GOTREF(__pyx_t_1);
75616  __pyx_r = __pyx_t_1;
75617  __pyx_t_1 = 0;
75618  goto __pyx_L0;
75619 
75620  /* function exit code */
75621  __pyx_L1_error:;
75622  __Pyx_XDECREF(__pyx_t_1);
75623  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_built.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75624  __pyx_r = NULL;
75625  __pyx_L0:;
75626  __Pyx_XGIVEREF(__pyx_r);
75627  __Pyx_TraceReturn(__pyx_r, 0);
75628  __Pyx_RefNannyFinishContext();
75629  return __pyx_r;
75630 }
75631 
75632 /* Python wrapper */
75633 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75634 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75635  int __pyx_r;
75636  __Pyx_RefNannyDeclarations
75637  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75638  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75639 
75640  /* function exit code */
75641  __Pyx_RefNannyFinishContext();
75642  return __pyx_r;
75643 }
75644 
75645 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75646  int __pyx_r;
75647  __Pyx_TraceDeclarations
75648  __Pyx_RefNannyDeclarations
75649  bool __pyx_t_1;
75650  int __pyx_lineno = 0;
75651  const char *__pyx_filename = NULL;
75652  int __pyx_clineno = 0;
75653  __Pyx_RefNannySetupContext("__set__", 0);
75654  __Pyx_TraceCall("__set__", __pyx_f[2], 330, 0, __PYX_ERR(2, 330, __pyx_L1_error));
75655  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 330, __pyx_L1_error)
75656  __pyx_v_self->nodes_built = __pyx_t_1;
75657 
75658  /* function exit code */
75659  __pyx_r = 0;
75660  goto __pyx_L0;
75661  __pyx_L1_error:;
75662  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_built.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75663  __pyx_r = -1;
75664  __pyx_L0:;
75665  __Pyx_TraceReturn(Py_None, 0);
75666  __Pyx_RefNannyFinishContext();
75667  return __pyx_r;
75668 }
75669 
75670 /* "mbd/CouplingFSI.pxd":331
75671  * bool back_body
75672  * bool nodes_built
75673  * bool external_forces_from_ns # <<<<<<<<<<<<<<
75674  * bool external_forces_manual
75675  * np.ndarray fluid_density_array
75676  */
75677 
75678 /* Python wrapper */
75679 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_1__get__(PyObject *__pyx_v_self); /*proto*/
75680 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_1__get__(PyObject *__pyx_v_self) {
75681  PyObject *__pyx_r = 0;
75682  __Pyx_RefNannyDeclarations
75683  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75684  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75685 
75686  /* function exit code */
75687  __Pyx_RefNannyFinishContext();
75688  return __pyx_r;
75689 }
75690 
75691 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75692  PyObject *__pyx_r = NULL;
75693  __Pyx_TraceDeclarations
75694  __Pyx_RefNannyDeclarations
75695  PyObject *__pyx_t_1 = NULL;
75696  int __pyx_lineno = 0;
75697  const char *__pyx_filename = NULL;
75698  int __pyx_clineno = 0;
75699  __Pyx_RefNannySetupContext("__get__", 0);
75700  __Pyx_TraceCall("__get__", __pyx_f[2], 331, 0, __PYX_ERR(2, 331, __pyx_L1_error));
75701  __Pyx_XDECREF(__pyx_r);
75702  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->external_forces_from_ns); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 331, __pyx_L1_error)
75703  __Pyx_GOTREF(__pyx_t_1);
75704  __pyx_r = __pyx_t_1;
75705  __pyx_t_1 = 0;
75706  goto __pyx_L0;
75707 
75708  /* function exit code */
75709  __pyx_L1_error:;
75710  __Pyx_XDECREF(__pyx_t_1);
75711  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.external_forces_from_ns.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75712  __pyx_r = NULL;
75713  __pyx_L0:;
75714  __Pyx_XGIVEREF(__pyx_r);
75715  __Pyx_TraceReturn(__pyx_r, 0);
75716  __Pyx_RefNannyFinishContext();
75717  return __pyx_r;
75718 }
75719 
75720 /* Python wrapper */
75721 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75722 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75723  int __pyx_r;
75724  __Pyx_RefNannyDeclarations
75725  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75726  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75727 
75728  /* function exit code */
75729  __Pyx_RefNannyFinishContext();
75730  return __pyx_r;
75731 }
75732 
75733 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75734  int __pyx_r;
75735  __Pyx_TraceDeclarations
75736  __Pyx_RefNannyDeclarations
75737  bool __pyx_t_1;
75738  int __pyx_lineno = 0;
75739  const char *__pyx_filename = NULL;
75740  int __pyx_clineno = 0;
75741  __Pyx_RefNannySetupContext("__set__", 0);
75742  __Pyx_TraceCall("__set__", __pyx_f[2], 331, 0, __PYX_ERR(2, 331, __pyx_L1_error));
75743  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 331, __pyx_L1_error)
75744  __pyx_v_self->external_forces_from_ns = __pyx_t_1;
75745 
75746  /* function exit code */
75747  __pyx_r = 0;
75748  goto __pyx_L0;
75749  __pyx_L1_error:;
75750  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.external_forces_from_ns.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75751  __pyx_r = -1;
75752  __pyx_L0:;
75753  __Pyx_TraceReturn(Py_None, 0);
75754  __Pyx_RefNannyFinishContext();
75755  return __pyx_r;
75756 }
75757 
75758 /* "mbd/CouplingFSI.pxd":332
75759  * bool nodes_built
75760  * bool external_forces_from_ns
75761  * bool external_forces_manual # <<<<<<<<<<<<<<
75762  * np.ndarray fluid_density_array
75763  * np.ndarray fluid_velocity_array
75764  */
75765 
75766 /* Python wrapper */
75767 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_1__get__(PyObject *__pyx_v_self); /*proto*/
75768 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_1__get__(PyObject *__pyx_v_self) {
75769  PyObject *__pyx_r = 0;
75770  __Pyx_RefNannyDeclarations
75771  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75772  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75773 
75774  /* function exit code */
75775  __Pyx_RefNannyFinishContext();
75776  return __pyx_r;
75777 }
75778 
75779 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75780  PyObject *__pyx_r = NULL;
75781  __Pyx_TraceDeclarations
75782  __Pyx_RefNannyDeclarations
75783  PyObject *__pyx_t_1 = NULL;
75784  int __pyx_lineno = 0;
75785  const char *__pyx_filename = NULL;
75786  int __pyx_clineno = 0;
75787  __Pyx_RefNannySetupContext("__get__", 0);
75788  __Pyx_TraceCall("__get__", __pyx_f[2], 332, 0, __PYX_ERR(2, 332, __pyx_L1_error));
75789  __Pyx_XDECREF(__pyx_r);
75790  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->external_forces_manual); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 332, __pyx_L1_error)
75791  __Pyx_GOTREF(__pyx_t_1);
75792  __pyx_r = __pyx_t_1;
75793  __pyx_t_1 = 0;
75794  goto __pyx_L0;
75795 
75796  /* function exit code */
75797  __pyx_L1_error:;
75798  __Pyx_XDECREF(__pyx_t_1);
75799  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.external_forces_manual.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75800  __pyx_r = NULL;
75801  __pyx_L0:;
75802  __Pyx_XGIVEREF(__pyx_r);
75803  __Pyx_TraceReturn(__pyx_r, 0);
75804  __Pyx_RefNannyFinishContext();
75805  return __pyx_r;
75806 }
75807 
75808 /* Python wrapper */
75809 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75810 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75811  int __pyx_r;
75812  __Pyx_RefNannyDeclarations
75813  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75814  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75815 
75816  /* function exit code */
75817  __Pyx_RefNannyFinishContext();
75818  return __pyx_r;
75819 }
75820 
75821 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75822  int __pyx_r;
75823  __Pyx_TraceDeclarations
75824  __Pyx_RefNannyDeclarations
75825  bool __pyx_t_1;
75826  int __pyx_lineno = 0;
75827  const char *__pyx_filename = NULL;
75828  int __pyx_clineno = 0;
75829  __Pyx_RefNannySetupContext("__set__", 0);
75830  __Pyx_TraceCall("__set__", __pyx_f[2], 332, 0, __PYX_ERR(2, 332, __pyx_L1_error));
75831  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 332, __pyx_L1_error)
75832  __pyx_v_self->external_forces_manual = __pyx_t_1;
75833 
75834  /* function exit code */
75835  __pyx_r = 0;
75836  goto __pyx_L0;
75837  __pyx_L1_error:;
75838  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.external_forces_manual.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75839  __pyx_r = -1;
75840  __pyx_L0:;
75841  __Pyx_TraceReturn(Py_None, 0);
75842  __Pyx_RefNannyFinishContext();
75843  return __pyx_r;
75844 }
75845 
75846 /* "mbd/CouplingFSI.pxd":333
75847  * bool external_forces_from_ns
75848  * bool external_forces_manual
75849  * np.ndarray fluid_density_array # <<<<<<<<<<<<<<
75850  * np.ndarray fluid_velocity_array
75851  * np.ndarray fluid_velocity_array_previous
75852  */
75853 
75854 /* Python wrapper */
75855 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_1__get__(PyObject *__pyx_v_self); /*proto*/
75856 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_1__get__(PyObject *__pyx_v_self) {
75857  PyObject *__pyx_r = 0;
75858  __Pyx_RefNannyDeclarations
75859  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75860  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75861 
75862  /* function exit code */
75863  __Pyx_RefNannyFinishContext();
75864  return __pyx_r;
75865 }
75866 
75867 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75868  PyObject *__pyx_r = NULL;
75869  __Pyx_TraceDeclarations
75870  __Pyx_RefNannyDeclarations
75871  int __pyx_lineno = 0;
75872  const char *__pyx_filename = NULL;
75873  int __pyx_clineno = 0;
75874  __Pyx_RefNannySetupContext("__get__", 0);
75875  __Pyx_TraceCall("__get__", __pyx_f[2], 333, 0, __PYX_ERR(2, 333, __pyx_L1_error));
75876  __Pyx_XDECREF(__pyx_r);
75877  __Pyx_INCREF(((PyObject *)__pyx_v_self->fluid_density_array));
75878  __pyx_r = ((PyObject *)__pyx_v_self->fluid_density_array);
75879  goto __pyx_L0;
75880 
75881  /* function exit code */
75882  __pyx_L1_error:;
75883  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_density_array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75884  __pyx_r = NULL;
75885  __pyx_L0:;
75886  __Pyx_XGIVEREF(__pyx_r);
75887  __Pyx_TraceReturn(__pyx_r, 0);
75888  __Pyx_RefNannyFinishContext();
75889  return __pyx_r;
75890 }
75891 
75892 /* Python wrapper */
75893 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
75894 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
75895  int __pyx_r;
75896  __Pyx_RefNannyDeclarations
75897  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
75898  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
75899 
75900  /* function exit code */
75901  __Pyx_RefNannyFinishContext();
75902  return __pyx_r;
75903 }
75904 
75905 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
75906  int __pyx_r;
75907  __Pyx_TraceDeclarations
75908  __Pyx_RefNannyDeclarations
75909  PyObject *__pyx_t_1 = NULL;
75910  int __pyx_lineno = 0;
75911  const char *__pyx_filename = NULL;
75912  int __pyx_clineno = 0;
75913  __Pyx_RefNannySetupContext("__set__", 0);
75914  __Pyx_TraceCall("__set__", __pyx_f[2], 333, 0, __PYX_ERR(2, 333, __pyx_L1_error));
75915  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 333, __pyx_L1_error)
75916  __pyx_t_1 = __pyx_v_value;
75917  __Pyx_INCREF(__pyx_t_1);
75918  __Pyx_GIVEREF(__pyx_t_1);
75919  __Pyx_GOTREF(__pyx_v_self->fluid_density_array);
75920  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_density_array));
75921  __pyx_v_self->fluid_density_array = ((PyArrayObject *)__pyx_t_1);
75922  __pyx_t_1 = 0;
75923 
75924  /* function exit code */
75925  __pyx_r = 0;
75926  goto __pyx_L0;
75927  __pyx_L1_error:;
75928  __Pyx_XDECREF(__pyx_t_1);
75929  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_density_array.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75930  __pyx_r = -1;
75931  __pyx_L0:;
75932  __Pyx_TraceReturn(Py_None, 0);
75933  __Pyx_RefNannyFinishContext();
75934  return __pyx_r;
75935 }
75936 
75937 /* Python wrapper */
75938 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_5__del__(PyObject *__pyx_v_self); /*proto*/
75939 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_5__del__(PyObject *__pyx_v_self) {
75940  int __pyx_r;
75941  __Pyx_RefNannyDeclarations
75942  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
75943  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75944 
75945  /* function exit code */
75946  __Pyx_RefNannyFinishContext();
75947  return __pyx_r;
75948 }
75949 
75950 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75951  int __pyx_r;
75952  __Pyx_TraceDeclarations
75953  __Pyx_RefNannyDeclarations
75954  int __pyx_lineno = 0;
75955  const char *__pyx_filename = NULL;
75956  int __pyx_clineno = 0;
75957  __Pyx_RefNannySetupContext("__del__", 0);
75958  __Pyx_TraceCall("__del__", __pyx_f[2], 333, 0, __PYX_ERR(2, 333, __pyx_L1_error));
75959  __Pyx_INCREF(Py_None);
75960  __Pyx_GIVEREF(Py_None);
75961  __Pyx_GOTREF(__pyx_v_self->fluid_density_array);
75962  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_density_array));
75963  __pyx_v_self->fluid_density_array = ((PyArrayObject *)Py_None);
75964 
75965  /* function exit code */
75966  __pyx_r = 0;
75967  goto __pyx_L0;
75968  __pyx_L1_error:;
75969  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_density_array.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
75970  __pyx_r = -1;
75971  __pyx_L0:;
75972  __Pyx_TraceReturn(Py_None, 0);
75973  __Pyx_RefNannyFinishContext();
75974  return __pyx_r;
75975 }
75976 
75977 /* "mbd/CouplingFSI.pxd":334
75978  * bool external_forces_manual
75979  * np.ndarray fluid_density_array
75980  * np.ndarray fluid_velocity_array # <<<<<<<<<<<<<<
75981  * np.ndarray fluid_velocity_array_previous
75982  * np.ndarray fluid_acceleration_array
75983  */
75984 
75985 /* Python wrapper */
75986 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_1__get__(PyObject *__pyx_v_self); /*proto*/
75987 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_1__get__(PyObject *__pyx_v_self) {
75988  PyObject *__pyx_r = 0;
75989  __Pyx_RefNannyDeclarations
75990  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
75991  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
75992 
75993  /* function exit code */
75994  __Pyx_RefNannyFinishContext();
75995  return __pyx_r;
75996 }
75997 
75998 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
75999  PyObject *__pyx_r = NULL;
76000  __Pyx_TraceDeclarations
76001  __Pyx_RefNannyDeclarations
76002  int __pyx_lineno = 0;
76003  const char *__pyx_filename = NULL;
76004  int __pyx_clineno = 0;
76005  __Pyx_RefNannySetupContext("__get__", 0);
76006  __Pyx_TraceCall("__get__", __pyx_f[2], 334, 0, __PYX_ERR(2, 334, __pyx_L1_error));
76007  __Pyx_XDECREF(__pyx_r);
76008  __Pyx_INCREF(((PyObject *)__pyx_v_self->fluid_velocity_array));
76009  __pyx_r = ((PyObject *)__pyx_v_self->fluid_velocity_array);
76010  goto __pyx_L0;
76011 
76012  /* function exit code */
76013  __pyx_L1_error:;
76014  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76015  __pyx_r = NULL;
76016  __pyx_L0:;
76017  __Pyx_XGIVEREF(__pyx_r);
76018  __Pyx_TraceReturn(__pyx_r, 0);
76019  __Pyx_RefNannyFinishContext();
76020  return __pyx_r;
76021 }
76022 
76023 /* Python wrapper */
76024 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76025 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76026  int __pyx_r;
76027  __Pyx_RefNannyDeclarations
76028  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76029  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76030 
76031  /* function exit code */
76032  __Pyx_RefNannyFinishContext();
76033  return __pyx_r;
76034 }
76035 
76036 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76037  int __pyx_r;
76038  __Pyx_TraceDeclarations
76039  __Pyx_RefNannyDeclarations
76040  PyObject *__pyx_t_1 = NULL;
76041  int __pyx_lineno = 0;
76042  const char *__pyx_filename = NULL;
76043  int __pyx_clineno = 0;
76044  __Pyx_RefNannySetupContext("__set__", 0);
76045  __Pyx_TraceCall("__set__", __pyx_f[2], 334, 0, __PYX_ERR(2, 334, __pyx_L1_error));
76046  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 334, __pyx_L1_error)
76047  __pyx_t_1 = __pyx_v_value;
76048  __Pyx_INCREF(__pyx_t_1);
76049  __Pyx_GIVEREF(__pyx_t_1);
76050  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array);
76051  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array));
76052  __pyx_v_self->fluid_velocity_array = ((PyArrayObject *)__pyx_t_1);
76053  __pyx_t_1 = 0;
76054 
76055  /* function exit code */
76056  __pyx_r = 0;
76057  goto __pyx_L0;
76058  __pyx_L1_error:;
76059  __Pyx_XDECREF(__pyx_t_1);
76060  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_array.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76061  __pyx_r = -1;
76062  __pyx_L0:;
76063  __Pyx_TraceReturn(Py_None, 0);
76064  __Pyx_RefNannyFinishContext();
76065  return __pyx_r;
76066 }
76067 
76068 /* Python wrapper */
76069 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_5__del__(PyObject *__pyx_v_self); /*proto*/
76070 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_5__del__(PyObject *__pyx_v_self) {
76071  int __pyx_r;
76072  __Pyx_RefNannyDeclarations
76073  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
76074  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76075 
76076  /* function exit code */
76077  __Pyx_RefNannyFinishContext();
76078  return __pyx_r;
76079 }
76080 
76081 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76082  int __pyx_r;
76083  __Pyx_TraceDeclarations
76084  __Pyx_RefNannyDeclarations
76085  int __pyx_lineno = 0;
76086  const char *__pyx_filename = NULL;
76087  int __pyx_clineno = 0;
76088  __Pyx_RefNannySetupContext("__del__", 0);
76089  __Pyx_TraceCall("__del__", __pyx_f[2], 334, 0, __PYX_ERR(2, 334, __pyx_L1_error));
76090  __Pyx_INCREF(Py_None);
76091  __Pyx_GIVEREF(Py_None);
76092  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array);
76093  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array));
76094  __pyx_v_self->fluid_velocity_array = ((PyArrayObject *)Py_None);
76095 
76096  /* function exit code */
76097  __pyx_r = 0;
76098  goto __pyx_L0;
76099  __pyx_L1_error:;
76100  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_array.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76101  __pyx_r = -1;
76102  __pyx_L0:;
76103  __Pyx_TraceReturn(Py_None, 0);
76104  __Pyx_RefNannyFinishContext();
76105  return __pyx_r;
76106 }
76107 
76108 /* "mbd/CouplingFSI.pxd":335
76109  * np.ndarray fluid_density_array
76110  * np.ndarray fluid_velocity_array
76111  * np.ndarray fluid_velocity_array_previous # <<<<<<<<<<<<<<
76112  * np.ndarray fluid_acceleration_array
76113  * string name
76114  */
76115 
76116 /* Python wrapper */
76117 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_1__get__(PyObject *__pyx_v_self); /*proto*/
76118 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_1__get__(PyObject *__pyx_v_self) {
76119  PyObject *__pyx_r = 0;
76120  __Pyx_RefNannyDeclarations
76121  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76122  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76123 
76124  /* function exit code */
76125  __Pyx_RefNannyFinishContext();
76126  return __pyx_r;
76127 }
76128 
76129 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76130  PyObject *__pyx_r = NULL;
76131  __Pyx_TraceDeclarations
76132  __Pyx_RefNannyDeclarations
76133  int __pyx_lineno = 0;
76134  const char *__pyx_filename = NULL;
76135  int __pyx_clineno = 0;
76136  __Pyx_RefNannySetupContext("__get__", 0);
76137  __Pyx_TraceCall("__get__", __pyx_f[2], 335, 0, __PYX_ERR(2, 335, __pyx_L1_error));
76138  __Pyx_XDECREF(__pyx_r);
76139  __Pyx_INCREF(((PyObject *)__pyx_v_self->fluid_velocity_array_previous));
76140  __pyx_r = ((PyObject *)__pyx_v_self->fluid_velocity_array_previous);
76141  goto __pyx_L0;
76142 
76143  /* function exit code */
76144  __pyx_L1_error:;
76145  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_array_previous.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76146  __pyx_r = NULL;
76147  __pyx_L0:;
76148  __Pyx_XGIVEREF(__pyx_r);
76149  __Pyx_TraceReturn(__pyx_r, 0);
76150  __Pyx_RefNannyFinishContext();
76151  return __pyx_r;
76152 }
76153 
76154 /* Python wrapper */
76155 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76156 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76157  int __pyx_r;
76158  __Pyx_RefNannyDeclarations
76159  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76160  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76161 
76162  /* function exit code */
76163  __Pyx_RefNannyFinishContext();
76164  return __pyx_r;
76165 }
76166 
76167 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76168  int __pyx_r;
76169  __Pyx_TraceDeclarations
76170  __Pyx_RefNannyDeclarations
76171  PyObject *__pyx_t_1 = NULL;
76172  int __pyx_lineno = 0;
76173  const char *__pyx_filename = NULL;
76174  int __pyx_clineno = 0;
76175  __Pyx_RefNannySetupContext("__set__", 0);
76176  __Pyx_TraceCall("__set__", __pyx_f[2], 335, 0, __PYX_ERR(2, 335, __pyx_L1_error));
76177  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 335, __pyx_L1_error)
76178  __pyx_t_1 = __pyx_v_value;
76179  __Pyx_INCREF(__pyx_t_1);
76180  __Pyx_GIVEREF(__pyx_t_1);
76181  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array_previous);
76182  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array_previous));
76183  __pyx_v_self->fluid_velocity_array_previous = ((PyArrayObject *)__pyx_t_1);
76184  __pyx_t_1 = 0;
76185 
76186  /* function exit code */
76187  __pyx_r = 0;
76188  goto __pyx_L0;
76189  __pyx_L1_error:;
76190  __Pyx_XDECREF(__pyx_t_1);
76191  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_array_previous.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76192  __pyx_r = -1;
76193  __pyx_L0:;
76194  __Pyx_TraceReturn(Py_None, 0);
76195  __Pyx_RefNannyFinishContext();
76196  return __pyx_r;
76197 }
76198 
76199 /* Python wrapper */
76200 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_5__del__(PyObject *__pyx_v_self); /*proto*/
76201 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_5__del__(PyObject *__pyx_v_self) {
76202  int __pyx_r;
76203  __Pyx_RefNannyDeclarations
76204  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
76205  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76206 
76207  /* function exit code */
76208  __Pyx_RefNannyFinishContext();
76209  return __pyx_r;
76210 }
76211 
76212 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76213  int __pyx_r;
76214  __Pyx_TraceDeclarations
76215  __Pyx_RefNannyDeclarations
76216  int __pyx_lineno = 0;
76217  const char *__pyx_filename = NULL;
76218  int __pyx_clineno = 0;
76219  __Pyx_RefNannySetupContext("__del__", 0);
76220  __Pyx_TraceCall("__del__", __pyx_f[2], 335, 0, __PYX_ERR(2, 335, __pyx_L1_error));
76221  __Pyx_INCREF(Py_None);
76222  __Pyx_GIVEREF(Py_None);
76223  __Pyx_GOTREF(__pyx_v_self->fluid_velocity_array_previous);
76224  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_velocity_array_previous));
76225  __pyx_v_self->fluid_velocity_array_previous = ((PyArrayObject *)Py_None);
76226 
76227  /* function exit code */
76228  __pyx_r = 0;
76229  goto __pyx_L0;
76230  __pyx_L1_error:;
76231  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_velocity_array_previous.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76232  __pyx_r = -1;
76233  __pyx_L0:;
76234  __Pyx_TraceReturn(Py_None, 0);
76235  __Pyx_RefNannyFinishContext();
76236  return __pyx_r;
76237 }
76238 
76239 /* "mbd/CouplingFSI.pxd":336
76240  * np.ndarray fluid_velocity_array
76241  * np.ndarray fluid_velocity_array_previous
76242  * np.ndarray fluid_acceleration_array # <<<<<<<<<<<<<<
76243  * string name
76244  * string beam_type
76245  */
76246 
76247 /* Python wrapper */
76248 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_1__get__(PyObject *__pyx_v_self); /*proto*/
76249 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_1__get__(PyObject *__pyx_v_self) {
76250  PyObject *__pyx_r = 0;
76251  __Pyx_RefNannyDeclarations
76252  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76253  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76254 
76255  /* function exit code */
76256  __Pyx_RefNannyFinishContext();
76257  return __pyx_r;
76258 }
76259 
76260 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76261  PyObject *__pyx_r = NULL;
76262  __Pyx_TraceDeclarations
76263  __Pyx_RefNannyDeclarations
76264  int __pyx_lineno = 0;
76265  const char *__pyx_filename = NULL;
76266  int __pyx_clineno = 0;
76267  __Pyx_RefNannySetupContext("__get__", 0);
76268  __Pyx_TraceCall("__get__", __pyx_f[2], 336, 0, __PYX_ERR(2, 336, __pyx_L1_error));
76269  __Pyx_XDECREF(__pyx_r);
76270  __Pyx_INCREF(((PyObject *)__pyx_v_self->fluid_acceleration_array));
76271  __pyx_r = ((PyObject *)__pyx_v_self->fluid_acceleration_array);
76272  goto __pyx_L0;
76273 
76274  /* function exit code */
76275  __pyx_L1_error:;
76276  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_acceleration_array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76277  __pyx_r = NULL;
76278  __pyx_L0:;
76279  __Pyx_XGIVEREF(__pyx_r);
76280  __Pyx_TraceReturn(__pyx_r, 0);
76281  __Pyx_RefNannyFinishContext();
76282  return __pyx_r;
76283 }
76284 
76285 /* Python wrapper */
76286 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76287 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76288  int __pyx_r;
76289  __Pyx_RefNannyDeclarations
76290  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76291  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76292 
76293  /* function exit code */
76294  __Pyx_RefNannyFinishContext();
76295  return __pyx_r;
76296 }
76297 
76298 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76299  int __pyx_r;
76300  __Pyx_TraceDeclarations
76301  __Pyx_RefNannyDeclarations
76302  PyObject *__pyx_t_1 = NULL;
76303  int __pyx_lineno = 0;
76304  const char *__pyx_filename = NULL;
76305  int __pyx_clineno = 0;
76306  __Pyx_RefNannySetupContext("__set__", 0);
76307  __Pyx_TraceCall("__set__", __pyx_f[2], 336, 0, __PYX_ERR(2, 336, __pyx_L1_error));
76308  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 336, __pyx_L1_error)
76309  __pyx_t_1 = __pyx_v_value;
76310  __Pyx_INCREF(__pyx_t_1);
76311  __Pyx_GIVEREF(__pyx_t_1);
76312  __Pyx_GOTREF(__pyx_v_self->fluid_acceleration_array);
76313  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_acceleration_array));
76314  __pyx_v_self->fluid_acceleration_array = ((PyArrayObject *)__pyx_t_1);
76315  __pyx_t_1 = 0;
76316 
76317  /* function exit code */
76318  __pyx_r = 0;
76319  goto __pyx_L0;
76320  __pyx_L1_error:;
76321  __Pyx_XDECREF(__pyx_t_1);
76322  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_acceleration_array.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76323  __pyx_r = -1;
76324  __pyx_L0:;
76325  __Pyx_TraceReturn(Py_None, 0);
76326  __Pyx_RefNannyFinishContext();
76327  return __pyx_r;
76328 }
76329 
76330 /* Python wrapper */
76331 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_5__del__(PyObject *__pyx_v_self); /*proto*/
76332 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_5__del__(PyObject *__pyx_v_self) {
76333  int __pyx_r;
76334  __Pyx_RefNannyDeclarations
76335  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
76336  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76337 
76338  /* function exit code */
76339  __Pyx_RefNannyFinishContext();
76340  return __pyx_r;
76341 }
76342 
76343 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76344  int __pyx_r;
76345  __Pyx_TraceDeclarations
76346  __Pyx_RefNannyDeclarations
76347  int __pyx_lineno = 0;
76348  const char *__pyx_filename = NULL;
76349  int __pyx_clineno = 0;
76350  __Pyx_RefNannySetupContext("__del__", 0);
76351  __Pyx_TraceCall("__del__", __pyx_f[2], 336, 0, __PYX_ERR(2, 336, __pyx_L1_error));
76352  __Pyx_INCREF(Py_None);
76353  __Pyx_GIVEREF(Py_None);
76354  __Pyx_GOTREF(__pyx_v_self->fluid_acceleration_array);
76355  __Pyx_DECREF(((PyObject *)__pyx_v_self->fluid_acceleration_array));
76356  __pyx_v_self->fluid_acceleration_array = ((PyArrayObject *)Py_None);
76357 
76358  /* function exit code */
76359  __pyx_r = 0;
76360  goto __pyx_L0;
76361  __pyx_L1_error:;
76362  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.fluid_acceleration_array.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76363  __pyx_r = -1;
76364  __pyx_L0:;
76365  __Pyx_TraceReturn(Py_None, 0);
76366  __Pyx_RefNannyFinishContext();
76367  return __pyx_r;
76368 }
76369 
76370 /* "mbd/CouplingFSI.pxd":337
76371  * np.ndarray fluid_velocity_array_previous
76372  * np.ndarray fluid_acceleration_array
76373  * string name # <<<<<<<<<<<<<<
76374  * string beam_type
76375  * int nodes_nb # number of nodes
76376  */
76377 
76378 /* Python wrapper */
76379 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
76380 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4name_1__get__(PyObject *__pyx_v_self) {
76381  PyObject *__pyx_r = 0;
76382  __Pyx_RefNannyDeclarations
76383  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76384  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4name___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76385 
76386  /* function exit code */
76387  __Pyx_RefNannyFinishContext();
76388  return __pyx_r;
76389 }
76390 
76391 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4name___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76392  PyObject *__pyx_r = NULL;
76393  __Pyx_TraceDeclarations
76394  __Pyx_RefNannyDeclarations
76395  PyObject *__pyx_t_1 = NULL;
76396  int __pyx_lineno = 0;
76397  const char *__pyx_filename = NULL;
76398  int __pyx_clineno = 0;
76399  __Pyx_RefNannySetupContext("__get__", 0);
76400  __Pyx_TraceCall("__get__", __pyx_f[2], 337, 0, __PYX_ERR(2, 337, __pyx_L1_error));
76401  __Pyx_XDECREF(__pyx_r);
76402  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 337, __pyx_L1_error)
76403  __Pyx_GOTREF(__pyx_t_1);
76404  __pyx_r = __pyx_t_1;
76405  __pyx_t_1 = 0;
76406  goto __pyx_L0;
76407 
76408  /* function exit code */
76409  __pyx_L1_error:;
76410  __Pyx_XDECREF(__pyx_t_1);
76411  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76412  __pyx_r = NULL;
76413  __pyx_L0:;
76414  __Pyx_XGIVEREF(__pyx_r);
76415  __Pyx_TraceReturn(__pyx_r, 0);
76416  __Pyx_RefNannyFinishContext();
76417  return __pyx_r;
76418 }
76419 
76420 /* Python wrapper */
76421 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76422 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76423  int __pyx_r;
76424  __Pyx_RefNannyDeclarations
76425  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76426  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4name_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76427 
76428  /* function exit code */
76429  __Pyx_RefNannyFinishContext();
76430  return __pyx_r;
76431 }
76432 
76433 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_4name_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76434  int __pyx_r;
76435  __Pyx_TraceDeclarations
76436  __Pyx_RefNannyDeclarations
76437  std::string __pyx_t_1;
76438  int __pyx_lineno = 0;
76439  const char *__pyx_filename = NULL;
76440  int __pyx_clineno = 0;
76441  __Pyx_RefNannySetupContext("__set__", 0);
76442  __Pyx_TraceCall("__set__", __pyx_f[2], 337, 0, __PYX_ERR(2, 337, __pyx_L1_error));
76443  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 337, __pyx_L1_error)
76444  __pyx_v_self->name = __pyx_t_1;
76445 
76446  /* function exit code */
76447  __pyx_r = 0;
76448  goto __pyx_L0;
76449  __pyx_L1_error:;
76450  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76451  __pyx_r = -1;
76452  __pyx_L0:;
76453  __Pyx_TraceReturn(Py_None, 0);
76454  __Pyx_RefNannyFinishContext();
76455  return __pyx_r;
76456 }
76457 
76458 /* "mbd/CouplingFSI.pxd":338
76459  * np.ndarray fluid_acceleration_array
76460  * string name
76461  * string beam_type # <<<<<<<<<<<<<<
76462  * int nodes_nb # number of nodes
76463  * np.ndarray nb_elems
76464  */
76465 
76466 /* Python wrapper */
76467 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_1__get__(PyObject *__pyx_v_self); /*proto*/
76468 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_1__get__(PyObject *__pyx_v_self) {
76469  PyObject *__pyx_r = 0;
76470  __Pyx_RefNannyDeclarations
76471  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76472  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76473 
76474  /* function exit code */
76475  __Pyx_RefNannyFinishContext();
76476  return __pyx_r;
76477 }
76478 
76479 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76480  PyObject *__pyx_r = NULL;
76481  __Pyx_TraceDeclarations
76482  __Pyx_RefNannyDeclarations
76483  PyObject *__pyx_t_1 = NULL;
76484  int __pyx_lineno = 0;
76485  const char *__pyx_filename = NULL;
76486  int __pyx_clineno = 0;
76487  __Pyx_RefNannySetupContext("__get__", 0);
76488  __Pyx_TraceCall("__get__", __pyx_f[2], 338, 0, __PYX_ERR(2, 338, __pyx_L1_error));
76489  __Pyx_XDECREF(__pyx_r);
76490  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->beam_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 338, __pyx_L1_error)
76491  __Pyx_GOTREF(__pyx_t_1);
76492  __pyx_r = __pyx_t_1;
76493  __pyx_t_1 = 0;
76494  goto __pyx_L0;
76495 
76496  /* function exit code */
76497  __pyx_L1_error:;
76498  __Pyx_XDECREF(__pyx_t_1);
76499  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.beam_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76500  __pyx_r = NULL;
76501  __pyx_L0:;
76502  __Pyx_XGIVEREF(__pyx_r);
76503  __Pyx_TraceReturn(__pyx_r, 0);
76504  __Pyx_RefNannyFinishContext();
76505  return __pyx_r;
76506 }
76507 
76508 /* Python wrapper */
76509 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76510 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76511  int __pyx_r;
76512  __Pyx_RefNannyDeclarations
76513  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76514  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76515 
76516  /* function exit code */
76517  __Pyx_RefNannyFinishContext();
76518  return __pyx_r;
76519 }
76520 
76521 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76522  int __pyx_r;
76523  __Pyx_TraceDeclarations
76524  __Pyx_RefNannyDeclarations
76525  std::string __pyx_t_1;
76526  int __pyx_lineno = 0;
76527  const char *__pyx_filename = NULL;
76528  int __pyx_clineno = 0;
76529  __Pyx_RefNannySetupContext("__set__", 0);
76530  __Pyx_TraceCall("__set__", __pyx_f[2], 338, 0, __PYX_ERR(2, 338, __pyx_L1_error));
76531  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 338, __pyx_L1_error)
76532  __pyx_v_self->beam_type = __pyx_t_1;
76533 
76534  /* function exit code */
76535  __pyx_r = 0;
76536  goto __pyx_L0;
76537  __pyx_L1_error:;
76538  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.beam_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76539  __pyx_r = -1;
76540  __pyx_L0:;
76541  __Pyx_TraceReturn(Py_None, 0);
76542  __Pyx_RefNannyFinishContext();
76543  return __pyx_r;
76544 }
76545 
76546 /* "mbd/CouplingFSI.pxd":339
76547  * string name
76548  * string beam_type
76549  * int nodes_nb # number of nodes # <<<<<<<<<<<<<<
76550  * np.ndarray nb_elems
76551  * double[:] _record_etas
76552  */
76553 
76554 /* Python wrapper */
76555 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_1__get__(PyObject *__pyx_v_self); /*proto*/
76556 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_1__get__(PyObject *__pyx_v_self) {
76557  PyObject *__pyx_r = 0;
76558  __Pyx_RefNannyDeclarations
76559  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76560  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76561 
76562  /* function exit code */
76563  __Pyx_RefNannyFinishContext();
76564  return __pyx_r;
76565 }
76566 
76567 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76568  PyObject *__pyx_r = NULL;
76569  __Pyx_TraceDeclarations
76570  __Pyx_RefNannyDeclarations
76571  PyObject *__pyx_t_1 = NULL;
76572  int __pyx_lineno = 0;
76573  const char *__pyx_filename = NULL;
76574  int __pyx_clineno = 0;
76575  __Pyx_RefNannySetupContext("__get__", 0);
76576  __Pyx_TraceCall("__get__", __pyx_f[2], 339, 0, __PYX_ERR(2, 339, __pyx_L1_error));
76577  __Pyx_XDECREF(__pyx_r);
76578  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nodes_nb); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 339, __pyx_L1_error)
76579  __Pyx_GOTREF(__pyx_t_1);
76580  __pyx_r = __pyx_t_1;
76581  __pyx_t_1 = 0;
76582  goto __pyx_L0;
76583 
76584  /* function exit code */
76585  __pyx_L1_error:;
76586  __Pyx_XDECREF(__pyx_t_1);
76587  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_nb.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76588  __pyx_r = NULL;
76589  __pyx_L0:;
76590  __Pyx_XGIVEREF(__pyx_r);
76591  __Pyx_TraceReturn(__pyx_r, 0);
76592  __Pyx_RefNannyFinishContext();
76593  return __pyx_r;
76594 }
76595 
76596 /* Python wrapper */
76597 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76598 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76599  int __pyx_r;
76600  __Pyx_RefNannyDeclarations
76601  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76602  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76603 
76604  /* function exit code */
76605  __Pyx_RefNannyFinishContext();
76606  return __pyx_r;
76607 }
76608 
76609 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76610  int __pyx_r;
76611  __Pyx_TraceDeclarations
76612  __Pyx_RefNannyDeclarations
76613  int __pyx_t_1;
76614  int __pyx_lineno = 0;
76615  const char *__pyx_filename = NULL;
76616  int __pyx_clineno = 0;
76617  __Pyx_RefNannySetupContext("__set__", 0);
76618  __Pyx_TraceCall("__set__", __pyx_f[2], 339, 0, __PYX_ERR(2, 339, __pyx_L1_error));
76619  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 339, __pyx_L1_error)
76620  __pyx_v_self->nodes_nb = __pyx_t_1;
76621 
76622  /* function exit code */
76623  __pyx_r = 0;
76624  goto __pyx_L0;
76625  __pyx_L1_error:;
76626  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes_nb.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76627  __pyx_r = -1;
76628  __pyx_L0:;
76629  __Pyx_TraceReturn(Py_None, 0);
76630  __Pyx_RefNannyFinishContext();
76631  return __pyx_r;
76632 }
76633 
76634 /* "mbd/CouplingFSI.pxd":340
76635  * string beam_type
76636  * int nodes_nb # number of nodes
76637  * np.ndarray nb_elems # <<<<<<<<<<<<<<
76638  * double[:] _record_etas
76639  * object _record_names
76640  */
76641 
76642 /* Python wrapper */
76643 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_1__get__(PyObject *__pyx_v_self); /*proto*/
76644 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_1__get__(PyObject *__pyx_v_self) {
76645  PyObject *__pyx_r = 0;
76646  __Pyx_RefNannyDeclarations
76647  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76648  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76649 
76650  /* function exit code */
76651  __Pyx_RefNannyFinishContext();
76652  return __pyx_r;
76653 }
76654 
76655 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76656  PyObject *__pyx_r = NULL;
76657  __Pyx_TraceDeclarations
76658  __Pyx_RefNannyDeclarations
76659  int __pyx_lineno = 0;
76660  const char *__pyx_filename = NULL;
76661  int __pyx_clineno = 0;
76662  __Pyx_RefNannySetupContext("__get__", 0);
76663  __Pyx_TraceCall("__get__", __pyx_f[2], 340, 0, __PYX_ERR(2, 340, __pyx_L1_error));
76664  __Pyx_XDECREF(__pyx_r);
76665  __Pyx_INCREF(((PyObject *)__pyx_v_self->nb_elems));
76666  __pyx_r = ((PyObject *)__pyx_v_self->nb_elems);
76667  goto __pyx_L0;
76668 
76669  /* function exit code */
76670  __pyx_L1_error:;
76671  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nb_elems.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76672  __pyx_r = NULL;
76673  __pyx_L0:;
76674  __Pyx_XGIVEREF(__pyx_r);
76675  __Pyx_TraceReturn(__pyx_r, 0);
76676  __Pyx_RefNannyFinishContext();
76677  return __pyx_r;
76678 }
76679 
76680 /* Python wrapper */
76681 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76682 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76683  int __pyx_r;
76684  __Pyx_RefNannyDeclarations
76685  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76686  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76687 
76688  /* function exit code */
76689  __Pyx_RefNannyFinishContext();
76690  return __pyx_r;
76691 }
76692 
76693 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76694  int __pyx_r;
76695  __Pyx_TraceDeclarations
76696  __Pyx_RefNannyDeclarations
76697  PyObject *__pyx_t_1 = NULL;
76698  int __pyx_lineno = 0;
76699  const char *__pyx_filename = NULL;
76700  int __pyx_clineno = 0;
76701  __Pyx_RefNannySetupContext("__set__", 0);
76702  __Pyx_TraceCall("__set__", __pyx_f[2], 340, 0, __PYX_ERR(2, 340, __pyx_L1_error));
76703  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 340, __pyx_L1_error)
76704  __pyx_t_1 = __pyx_v_value;
76705  __Pyx_INCREF(__pyx_t_1);
76706  __Pyx_GIVEREF(__pyx_t_1);
76707  __Pyx_GOTREF(__pyx_v_self->nb_elems);
76708  __Pyx_DECREF(((PyObject *)__pyx_v_self->nb_elems));
76709  __pyx_v_self->nb_elems = ((PyArrayObject *)__pyx_t_1);
76710  __pyx_t_1 = 0;
76711 
76712  /* function exit code */
76713  __pyx_r = 0;
76714  goto __pyx_L0;
76715  __pyx_L1_error:;
76716  __Pyx_XDECREF(__pyx_t_1);
76717  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nb_elems.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76718  __pyx_r = -1;
76719  __pyx_L0:;
76720  __Pyx_TraceReturn(Py_None, 0);
76721  __Pyx_RefNannyFinishContext();
76722  return __pyx_r;
76723 }
76724 
76725 /* Python wrapper */
76726 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_5__del__(PyObject *__pyx_v_self); /*proto*/
76727 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_5__del__(PyObject *__pyx_v_self) {
76728  int __pyx_r;
76729  __Pyx_RefNannyDeclarations
76730  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
76731  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76732 
76733  /* function exit code */
76734  __Pyx_RefNannyFinishContext();
76735  return __pyx_r;
76736 }
76737 
76738 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76739  int __pyx_r;
76740  __Pyx_TraceDeclarations
76741  __Pyx_RefNannyDeclarations
76742  int __pyx_lineno = 0;
76743  const char *__pyx_filename = NULL;
76744  int __pyx_clineno = 0;
76745  __Pyx_RefNannySetupContext("__del__", 0);
76746  __Pyx_TraceCall("__del__", __pyx_f[2], 340, 0, __PYX_ERR(2, 340, __pyx_L1_error));
76747  __Pyx_INCREF(Py_None);
76748  __Pyx_GIVEREF(Py_None);
76749  __Pyx_GOTREF(__pyx_v_self->nb_elems);
76750  __Pyx_DECREF(((PyObject *)__pyx_v_self->nb_elems));
76751  __pyx_v_self->nb_elems = ((PyArrayObject *)Py_None);
76752 
76753  /* function exit code */
76754  __pyx_r = 0;
76755  goto __pyx_L0;
76756  __pyx_L1_error:;
76757  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nb_elems.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76758  __pyx_r = -1;
76759  __pyx_L0:;
76760  __Pyx_TraceReturn(Py_None, 0);
76761  __Pyx_RefNannyFinishContext();
76762  return __pyx_r;
76763 }
76764 
76765 /* "mbd/CouplingFSI.pxd":341
76766  * int nodes_nb # number of nodes
76767  * np.ndarray nb_elems
76768  * double[:] _record_etas # <<<<<<<<<<<<<<
76769  * object _record_names
76770  * object _record_etas_names
76771  */
76772 
76773 /* Python wrapper */
76774 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_1__get__(PyObject *__pyx_v_self); /*proto*/
76775 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_1__get__(PyObject *__pyx_v_self) {
76776  PyObject *__pyx_r = 0;
76777  __Pyx_RefNannyDeclarations
76778  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76779  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76780 
76781  /* function exit code */
76782  __Pyx_RefNannyFinishContext();
76783  return __pyx_r;
76784 }
76785 
76786 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76787  PyObject *__pyx_r = NULL;
76788  __Pyx_TraceDeclarations
76789  __Pyx_RefNannyDeclarations
76790  PyObject *__pyx_t_1 = NULL;
76791  int __pyx_lineno = 0;
76792  const char *__pyx_filename = NULL;
76793  int __pyx_clineno = 0;
76794  __Pyx_RefNannySetupContext("__get__", 0);
76795  __Pyx_TraceCall("__get__", __pyx_f[2], 341, 0, __PYX_ERR(2, 341, __pyx_L1_error));
76796  __Pyx_XDECREF(__pyx_r);
76797  if (unlikely(!__pyx_v_self->_record_etas.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(2, 341, __pyx_L1_error)}
76798  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->_record_etas, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 341, __pyx_L1_error)
76799  __Pyx_GOTREF(__pyx_t_1);
76800  __pyx_r = __pyx_t_1;
76801  __pyx_t_1 = 0;
76802  goto __pyx_L0;
76803 
76804  /* function exit code */
76805  __pyx_L1_error:;
76806  __Pyx_XDECREF(__pyx_t_1);
76807  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_etas.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76808  __pyx_r = NULL;
76809  __pyx_L0:;
76810  __Pyx_XGIVEREF(__pyx_r);
76811  __Pyx_TraceReturn(__pyx_r, 0);
76812  __Pyx_RefNannyFinishContext();
76813  return __pyx_r;
76814 }
76815 
76816 /* Python wrapper */
76817 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76818 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76819  int __pyx_r;
76820  __Pyx_RefNannyDeclarations
76821  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76822  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76823 
76824  /* function exit code */
76825  __Pyx_RefNannyFinishContext();
76826  return __pyx_r;
76827 }
76828 
76829 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76830  int __pyx_r;
76831  __Pyx_TraceDeclarations
76832  __Pyx_RefNannyDeclarations
76833  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
76834  int __pyx_lineno = 0;
76835  const char *__pyx_filename = NULL;
76836  int __pyx_clineno = 0;
76837  __Pyx_RefNannySetupContext("__set__", 0);
76838  __Pyx_TraceCall("__set__", __pyx_f[2], 341, 0, __PYX_ERR(2, 341, __pyx_L1_error));
76839  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(2, 341, __pyx_L1_error)
76840  __PYX_XDEC_MEMVIEW(&__pyx_v_self->_record_etas, 0);
76841  __pyx_v_self->_record_etas = __pyx_t_1;
76842  __pyx_t_1.memview = NULL;
76843  __pyx_t_1.data = NULL;
76844 
76845  /* function exit code */
76846  __pyx_r = 0;
76847  goto __pyx_L0;
76848  __pyx_L1_error:;
76849  __PYX_XDEC_MEMVIEW(&__pyx_t_1, 1);
76850  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_etas.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76851  __pyx_r = -1;
76852  __pyx_L0:;
76853  __Pyx_TraceReturn(Py_None, 0);
76854  __Pyx_RefNannyFinishContext();
76855  return __pyx_r;
76856 }
76857 
76858 /* "mbd/CouplingFSI.pxd":342
76859  * np.ndarray nb_elems
76860  * double[:] _record_etas
76861  * object _record_names # <<<<<<<<<<<<<<
76862  * object _record_etas_names
76863  * bool initialized
76864  */
76865 
76866 /* Python wrapper */
76867 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_1__get__(PyObject *__pyx_v_self); /*proto*/
76868 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_1__get__(PyObject *__pyx_v_self) {
76869  PyObject *__pyx_r = 0;
76870  __Pyx_RefNannyDeclarations
76871  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76872  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76873 
76874  /* function exit code */
76875  __Pyx_RefNannyFinishContext();
76876  return __pyx_r;
76877 }
76878 
76879 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76880  PyObject *__pyx_r = NULL;
76881  __Pyx_TraceDeclarations
76882  __Pyx_RefNannyDeclarations
76883  int __pyx_lineno = 0;
76884  const char *__pyx_filename = NULL;
76885  int __pyx_clineno = 0;
76886  __Pyx_RefNannySetupContext("__get__", 0);
76887  __Pyx_TraceCall("__get__", __pyx_f[2], 342, 0, __PYX_ERR(2, 342, __pyx_L1_error));
76888  __Pyx_XDECREF(__pyx_r);
76889  __Pyx_INCREF(__pyx_v_self->_record_names);
76890  __pyx_r = __pyx_v_self->_record_names;
76891  goto __pyx_L0;
76892 
76893  /* function exit code */
76894  __pyx_L1_error:;
76895  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76896  __pyx_r = NULL;
76897  __pyx_L0:;
76898  __Pyx_XGIVEREF(__pyx_r);
76899  __Pyx_TraceReturn(__pyx_r, 0);
76900  __Pyx_RefNannyFinishContext();
76901  return __pyx_r;
76902 }
76903 
76904 /* Python wrapper */
76905 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
76906 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
76907  int __pyx_r;
76908  __Pyx_RefNannyDeclarations
76909  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
76910  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
76911 
76912  /* function exit code */
76913  __Pyx_RefNannyFinishContext();
76914  return __pyx_r;
76915 }
76916 
76917 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
76918  int __pyx_r;
76919  __Pyx_TraceDeclarations
76920  __Pyx_RefNannyDeclarations
76921  int __pyx_lineno = 0;
76922  const char *__pyx_filename = NULL;
76923  int __pyx_clineno = 0;
76924  __Pyx_RefNannySetupContext("__set__", 0);
76925  __Pyx_TraceCall("__set__", __pyx_f[2], 342, 0, __PYX_ERR(2, 342, __pyx_L1_error));
76926  __Pyx_INCREF(__pyx_v_value);
76927  __Pyx_GIVEREF(__pyx_v_value);
76928  __Pyx_GOTREF(__pyx_v_self->_record_names);
76929  __Pyx_DECREF(__pyx_v_self->_record_names);
76930  __pyx_v_self->_record_names = __pyx_v_value;
76931 
76932  /* function exit code */
76933  __pyx_r = 0;
76934  goto __pyx_L0;
76935  __pyx_L1_error:;
76936  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_names.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76937  __pyx_r = -1;
76938  __pyx_L0:;
76939  __Pyx_TraceReturn(Py_None, 0);
76940  __Pyx_RefNannyFinishContext();
76941  return __pyx_r;
76942 }
76943 
76944 /* Python wrapper */
76945 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_5__del__(PyObject *__pyx_v_self); /*proto*/
76946 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_5__del__(PyObject *__pyx_v_self) {
76947  int __pyx_r;
76948  __Pyx_RefNannyDeclarations
76949  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
76950  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76951 
76952  /* function exit code */
76953  __Pyx_RefNannyFinishContext();
76954  return __pyx_r;
76955 }
76956 
76957 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
76958  int __pyx_r;
76959  __Pyx_TraceDeclarations
76960  __Pyx_RefNannyDeclarations
76961  int __pyx_lineno = 0;
76962  const char *__pyx_filename = NULL;
76963  int __pyx_clineno = 0;
76964  __Pyx_RefNannySetupContext("__del__", 0);
76965  __Pyx_TraceCall("__del__", __pyx_f[2], 342, 0, __PYX_ERR(2, 342, __pyx_L1_error));
76966  __Pyx_INCREF(Py_None);
76967  __Pyx_GIVEREF(Py_None);
76968  __Pyx_GOTREF(__pyx_v_self->_record_names);
76969  __Pyx_DECREF(__pyx_v_self->_record_names);
76970  __pyx_v_self->_record_names = Py_None;
76971 
76972  /* function exit code */
76973  __pyx_r = 0;
76974  goto __pyx_L0;
76975  __pyx_L1_error:;
76976  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_names.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
76977  __pyx_r = -1;
76978  __pyx_L0:;
76979  __Pyx_TraceReturn(Py_None, 0);
76980  __Pyx_RefNannyFinishContext();
76981  return __pyx_r;
76982 }
76983 
76984 /* "mbd/CouplingFSI.pxd":343
76985  * double[:] _record_etas
76986  * object _record_names
76987  * object _record_etas_names # <<<<<<<<<<<<<<
76988  * bool initialized
76989  * int[:] nearest_node_array
76990  */
76991 
76992 /* Python wrapper */
76993 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_1__get__(PyObject *__pyx_v_self); /*proto*/
76994 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_1__get__(PyObject *__pyx_v_self) {
76995  PyObject *__pyx_r = 0;
76996  __Pyx_RefNannyDeclarations
76997  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
76998  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
76999 
77000  /* function exit code */
77001  __Pyx_RefNannyFinishContext();
77002  return __pyx_r;
77003 }
77004 
77005 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77006  PyObject *__pyx_r = NULL;
77007  __Pyx_TraceDeclarations
77008  __Pyx_RefNannyDeclarations
77009  int __pyx_lineno = 0;
77010  const char *__pyx_filename = NULL;
77011  int __pyx_clineno = 0;
77012  __Pyx_RefNannySetupContext("__get__", 0);
77013  __Pyx_TraceCall("__get__", __pyx_f[2], 343, 0, __PYX_ERR(2, 343, __pyx_L1_error));
77014  __Pyx_XDECREF(__pyx_r);
77015  __Pyx_INCREF(__pyx_v_self->_record_etas_names);
77016  __pyx_r = __pyx_v_self->_record_etas_names;
77017  goto __pyx_L0;
77018 
77019  /* function exit code */
77020  __pyx_L1_error:;
77021  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_etas_names.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77022  __pyx_r = NULL;
77023  __pyx_L0:;
77024  __Pyx_XGIVEREF(__pyx_r);
77025  __Pyx_TraceReturn(__pyx_r, 0);
77026  __Pyx_RefNannyFinishContext();
77027  return __pyx_r;
77028 }
77029 
77030 /* Python wrapper */
77031 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77032 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77033  int __pyx_r;
77034  __Pyx_RefNannyDeclarations
77035  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77036  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77037 
77038  /* function exit code */
77039  __Pyx_RefNannyFinishContext();
77040  return __pyx_r;
77041 }
77042 
77043 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77044  int __pyx_r;
77045  __Pyx_TraceDeclarations
77046  __Pyx_RefNannyDeclarations
77047  int __pyx_lineno = 0;
77048  const char *__pyx_filename = NULL;
77049  int __pyx_clineno = 0;
77050  __Pyx_RefNannySetupContext("__set__", 0);
77051  __Pyx_TraceCall("__set__", __pyx_f[2], 343, 0, __PYX_ERR(2, 343, __pyx_L1_error));
77052  __Pyx_INCREF(__pyx_v_value);
77053  __Pyx_GIVEREF(__pyx_v_value);
77054  __Pyx_GOTREF(__pyx_v_self->_record_etas_names);
77055  __Pyx_DECREF(__pyx_v_self->_record_etas_names);
77056  __pyx_v_self->_record_etas_names = __pyx_v_value;
77057 
77058  /* function exit code */
77059  __pyx_r = 0;
77060  goto __pyx_L0;
77061  __pyx_L1_error:;
77062  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_etas_names.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77063  __pyx_r = -1;
77064  __pyx_L0:;
77065  __Pyx_TraceReturn(Py_None, 0);
77066  __Pyx_RefNannyFinishContext();
77067  return __pyx_r;
77068 }
77069 
77070 /* Python wrapper */
77071 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_5__del__(PyObject *__pyx_v_self); /*proto*/
77072 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_5__del__(PyObject *__pyx_v_self) {
77073  int __pyx_r;
77074  __Pyx_RefNannyDeclarations
77075  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
77076  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77077 
77078  /* function exit code */
77079  __Pyx_RefNannyFinishContext();
77080  return __pyx_r;
77081 }
77082 
77083 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77084  int __pyx_r;
77085  __Pyx_TraceDeclarations
77086  __Pyx_RefNannyDeclarations
77087  int __pyx_lineno = 0;
77088  const char *__pyx_filename = NULL;
77089  int __pyx_clineno = 0;
77090  __Pyx_RefNannySetupContext("__del__", 0);
77091  __Pyx_TraceCall("__del__", __pyx_f[2], 343, 0, __PYX_ERR(2, 343, __pyx_L1_error));
77092  __Pyx_INCREF(Py_None);
77093  __Pyx_GIVEREF(Py_None);
77094  __Pyx_GOTREF(__pyx_v_self->_record_etas_names);
77095  __Pyx_DECREF(__pyx_v_self->_record_etas_names);
77096  __pyx_v_self->_record_etas_names = Py_None;
77097 
77098  /* function exit code */
77099  __pyx_r = 0;
77100  goto __pyx_L0;
77101  __pyx_L1_error:;
77102  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings._record_etas_names.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77103  __pyx_r = -1;
77104  __pyx_L0:;
77105  __Pyx_TraceReturn(Py_None, 0);
77106  __Pyx_RefNannyFinishContext();
77107  return __pyx_r;
77108 }
77109 
77110 /* "mbd/CouplingFSI.pxd":344
77111  * object _record_names
77112  * object _record_etas_names
77113  * bool initialized # <<<<<<<<<<<<<<
77114  * int[:] nearest_node_array
77115  * int[:] containing_element_array
77116  */
77117 
77118 /* Python wrapper */
77119 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_1__get__(PyObject *__pyx_v_self); /*proto*/
77120 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_1__get__(PyObject *__pyx_v_self) {
77121  PyObject *__pyx_r = 0;
77122  __Pyx_RefNannyDeclarations
77123  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77124  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11initialized___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77125 
77126  /* function exit code */
77127  __Pyx_RefNannyFinishContext();
77128  return __pyx_r;
77129 }
77130 
77131 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11initialized___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77132  PyObject *__pyx_r = NULL;
77133  __Pyx_TraceDeclarations
77134  __Pyx_RefNannyDeclarations
77135  PyObject *__pyx_t_1 = NULL;
77136  int __pyx_lineno = 0;
77137  const char *__pyx_filename = NULL;
77138  int __pyx_clineno = 0;
77139  __Pyx_RefNannySetupContext("__get__", 0);
77140  __Pyx_TraceCall("__get__", __pyx_f[2], 344, 0, __PYX_ERR(2, 344, __pyx_L1_error));
77141  __Pyx_XDECREF(__pyx_r);
77142  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->initialized); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 344, __pyx_L1_error)
77143  __Pyx_GOTREF(__pyx_t_1);
77144  __pyx_r = __pyx_t_1;
77145  __pyx_t_1 = 0;
77146  goto __pyx_L0;
77147 
77148  /* function exit code */
77149  __pyx_L1_error:;
77150  __Pyx_XDECREF(__pyx_t_1);
77151  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.initialized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77152  __pyx_r = NULL;
77153  __pyx_L0:;
77154  __Pyx_XGIVEREF(__pyx_r);
77155  __Pyx_TraceReturn(__pyx_r, 0);
77156  __Pyx_RefNannyFinishContext();
77157  return __pyx_r;
77158 }
77159 
77160 /* Python wrapper */
77161 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77162 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77163  int __pyx_r;
77164  __Pyx_RefNannyDeclarations
77165  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77166  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77167 
77168  /* function exit code */
77169  __Pyx_RefNannyFinishContext();
77170  return __pyx_r;
77171 }
77172 
77173 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77174  int __pyx_r;
77175  __Pyx_TraceDeclarations
77176  __Pyx_RefNannyDeclarations
77177  bool __pyx_t_1;
77178  int __pyx_lineno = 0;
77179  const char *__pyx_filename = NULL;
77180  int __pyx_clineno = 0;
77181  __Pyx_RefNannySetupContext("__set__", 0);
77182  __Pyx_TraceCall("__set__", __pyx_f[2], 344, 0, __PYX_ERR(2, 344, __pyx_L1_error));
77183  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(2, 344, __pyx_L1_error)
77184  __pyx_v_self->initialized = __pyx_t_1;
77185 
77186  /* function exit code */
77187  __pyx_r = 0;
77188  goto __pyx_L0;
77189  __pyx_L1_error:;
77190  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.initialized.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77191  __pyx_r = -1;
77192  __pyx_L0:;
77193  __Pyx_TraceReturn(Py_None, 0);
77194  __Pyx_RefNannyFinishContext();
77195  return __pyx_r;
77196 }
77197 
77198 /* "mbd/CouplingFSI.pxd":345
77199  * object _record_etas_names
77200  * bool initialized
77201  * int[:] nearest_node_array # <<<<<<<<<<<<<<
77202  * int[:] containing_element_array
77203  * int[:] owning_rank
77204  */
77205 
77206 /* Python wrapper */
77207 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_1__get__(PyObject *__pyx_v_self); /*proto*/
77208 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_1__get__(PyObject *__pyx_v_self) {
77209  PyObject *__pyx_r = 0;
77210  __Pyx_RefNannyDeclarations
77211  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77212  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77213 
77214  /* function exit code */
77215  __Pyx_RefNannyFinishContext();
77216  return __pyx_r;
77217 }
77218 
77219 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77220  PyObject *__pyx_r = NULL;
77221  __Pyx_TraceDeclarations
77222  __Pyx_RefNannyDeclarations
77223  PyObject *__pyx_t_1 = NULL;
77224  int __pyx_lineno = 0;
77225  const char *__pyx_filename = NULL;
77226  int __pyx_clineno = 0;
77227  __Pyx_RefNannySetupContext("__get__", 0);
77228  __Pyx_TraceCall("__get__", __pyx_f[2], 345, 0, __PYX_ERR(2, 345, __pyx_L1_error));
77229  __Pyx_XDECREF(__pyx_r);
77230  if (unlikely(!__pyx_v_self->nearest_node_array.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(2, 345, __pyx_L1_error)}
77231  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->nearest_node_array, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 345, __pyx_L1_error)
77232  __Pyx_GOTREF(__pyx_t_1);
77233  __pyx_r = __pyx_t_1;
77234  __pyx_t_1 = 0;
77235  goto __pyx_L0;
77236 
77237  /* function exit code */
77238  __pyx_L1_error:;
77239  __Pyx_XDECREF(__pyx_t_1);
77240  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nearest_node_array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77241  __pyx_r = NULL;
77242  __pyx_L0:;
77243  __Pyx_XGIVEREF(__pyx_r);
77244  __Pyx_TraceReturn(__pyx_r, 0);
77245  __Pyx_RefNannyFinishContext();
77246  return __pyx_r;
77247 }
77248 
77249 /* Python wrapper */
77250 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77251 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77252  int __pyx_r;
77253  __Pyx_RefNannyDeclarations
77254  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77255  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77256 
77257  /* function exit code */
77258  __Pyx_RefNannyFinishContext();
77259  return __pyx_r;
77260 }
77261 
77262 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77263  int __pyx_r;
77264  __Pyx_TraceDeclarations
77265  __Pyx_RefNannyDeclarations
77266  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
77267  int __pyx_lineno = 0;
77268  const char *__pyx_filename = NULL;
77269  int __pyx_clineno = 0;
77270  __Pyx_RefNannySetupContext("__set__", 0);
77271  __Pyx_TraceCall("__set__", __pyx_f[2], 345, 0, __PYX_ERR(2, 345, __pyx_L1_error));
77272  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(2, 345, __pyx_L1_error)
77273  __PYX_XDEC_MEMVIEW(&__pyx_v_self->nearest_node_array, 0);
77274  __pyx_v_self->nearest_node_array = __pyx_t_1;
77275  __pyx_t_1.memview = NULL;
77276  __pyx_t_1.data = NULL;
77277 
77278  /* function exit code */
77279  __pyx_r = 0;
77280  goto __pyx_L0;
77281  __pyx_L1_error:;
77282  __PYX_XDEC_MEMVIEW(&__pyx_t_1, 1);
77283  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nearest_node_array.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77284  __pyx_r = -1;
77285  __pyx_L0:;
77286  __Pyx_TraceReturn(Py_None, 0);
77287  __Pyx_RefNannyFinishContext();
77288  return __pyx_r;
77289 }
77290 
77291 /* "mbd/CouplingFSI.pxd":346
77292  * bool initialized
77293  * int[:] nearest_node_array
77294  * int[:] containing_element_array # <<<<<<<<<<<<<<
77295  * int[:] owning_rank
77296  * string hdfFileName
77297  */
77298 
77299 /* Python wrapper */
77300 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_1__get__(PyObject *__pyx_v_self); /*proto*/
77301 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_1__get__(PyObject *__pyx_v_self) {
77302  PyObject *__pyx_r = 0;
77303  __Pyx_RefNannyDeclarations
77304  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77305  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77306 
77307  /* function exit code */
77308  __Pyx_RefNannyFinishContext();
77309  return __pyx_r;
77310 }
77311 
77312 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77313  PyObject *__pyx_r = NULL;
77314  __Pyx_TraceDeclarations
77315  __Pyx_RefNannyDeclarations
77316  PyObject *__pyx_t_1 = NULL;
77317  int __pyx_lineno = 0;
77318  const char *__pyx_filename = NULL;
77319  int __pyx_clineno = 0;
77320  __Pyx_RefNannySetupContext("__get__", 0);
77321  __Pyx_TraceCall("__get__", __pyx_f[2], 346, 0, __PYX_ERR(2, 346, __pyx_L1_error));
77322  __Pyx_XDECREF(__pyx_r);
77323  if (unlikely(!__pyx_v_self->containing_element_array.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(2, 346, __pyx_L1_error)}
77324  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->containing_element_array, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 346, __pyx_L1_error)
77325  __Pyx_GOTREF(__pyx_t_1);
77326  __pyx_r = __pyx_t_1;
77327  __pyx_t_1 = 0;
77328  goto __pyx_L0;
77329 
77330  /* function exit code */
77331  __pyx_L1_error:;
77332  __Pyx_XDECREF(__pyx_t_1);
77333  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.containing_element_array.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77334  __pyx_r = NULL;
77335  __pyx_L0:;
77336  __Pyx_XGIVEREF(__pyx_r);
77337  __Pyx_TraceReturn(__pyx_r, 0);
77338  __Pyx_RefNannyFinishContext();
77339  return __pyx_r;
77340 }
77341 
77342 /* Python wrapper */
77343 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77344 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77345  int __pyx_r;
77346  __Pyx_RefNannyDeclarations
77347  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77348  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77349 
77350  /* function exit code */
77351  __Pyx_RefNannyFinishContext();
77352  return __pyx_r;
77353 }
77354 
77355 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77356  int __pyx_r;
77357  __Pyx_TraceDeclarations
77358  __Pyx_RefNannyDeclarations
77359  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
77360  int __pyx_lineno = 0;
77361  const char *__pyx_filename = NULL;
77362  int __pyx_clineno = 0;
77363  __Pyx_RefNannySetupContext("__set__", 0);
77364  __Pyx_TraceCall("__set__", __pyx_f[2], 346, 0, __PYX_ERR(2, 346, __pyx_L1_error));
77365  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(2, 346, __pyx_L1_error)
77366  __PYX_XDEC_MEMVIEW(&__pyx_v_self->containing_element_array, 0);
77367  __pyx_v_self->containing_element_array = __pyx_t_1;
77368  __pyx_t_1.memview = NULL;
77369  __pyx_t_1.data = NULL;
77370 
77371  /* function exit code */
77372  __pyx_r = 0;
77373  goto __pyx_L0;
77374  __pyx_L1_error:;
77375  __PYX_XDEC_MEMVIEW(&__pyx_t_1, 1);
77376  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.containing_element_array.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77377  __pyx_r = -1;
77378  __pyx_L0:;
77379  __Pyx_TraceReturn(Py_None, 0);
77380  __Pyx_RefNannyFinishContext();
77381  return __pyx_r;
77382 }
77383 
77384 /* "mbd/CouplingFSI.pxd":347
77385  * int[:] nearest_node_array
77386  * int[:] containing_element_array
77387  * int[:] owning_rank # <<<<<<<<<<<<<<
77388  * string hdfFileName
77389  * double[:] tCount_value
77390  */
77391 
77392 /* Python wrapper */
77393 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_1__get__(PyObject *__pyx_v_self); /*proto*/
77394 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_1__get__(PyObject *__pyx_v_self) {
77395  PyObject *__pyx_r = 0;
77396  __Pyx_RefNannyDeclarations
77397  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77398  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77399 
77400  /* function exit code */
77401  __Pyx_RefNannyFinishContext();
77402  return __pyx_r;
77403 }
77404 
77405 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77406  PyObject *__pyx_r = NULL;
77407  __Pyx_TraceDeclarations
77408  __Pyx_RefNannyDeclarations
77409  PyObject *__pyx_t_1 = NULL;
77410  int __pyx_lineno = 0;
77411  const char *__pyx_filename = NULL;
77412  int __pyx_clineno = 0;
77413  __Pyx_RefNannySetupContext("__get__", 0);
77414  __Pyx_TraceCall("__get__", __pyx_f[2], 347, 0, __PYX_ERR(2, 347, __pyx_L1_error));
77415  __Pyx_XDECREF(__pyx_r);
77416  if (unlikely(!__pyx_v_self->owning_rank.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(2, 347, __pyx_L1_error)}
77417  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->owning_rank, 1, (PyObject *(*)(char *)) __pyx_memview_get_int, (int (*)(char *, PyObject *)) __pyx_memview_set_int, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 347, __pyx_L1_error)
77418  __Pyx_GOTREF(__pyx_t_1);
77419  __pyx_r = __pyx_t_1;
77420  __pyx_t_1 = 0;
77421  goto __pyx_L0;
77422 
77423  /* function exit code */
77424  __pyx_L1_error:;
77425  __Pyx_XDECREF(__pyx_t_1);
77426  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.owning_rank.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77427  __pyx_r = NULL;
77428  __pyx_L0:;
77429  __Pyx_XGIVEREF(__pyx_r);
77430  __Pyx_TraceReturn(__pyx_r, 0);
77431  __Pyx_RefNannyFinishContext();
77432  return __pyx_r;
77433 }
77434 
77435 /* Python wrapper */
77436 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77437 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77438  int __pyx_r;
77439  __Pyx_RefNannyDeclarations
77440  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77441  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77442 
77443  /* function exit code */
77444  __Pyx_RefNannyFinishContext();
77445  return __pyx_r;
77446 }
77447 
77448 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77449  int __pyx_r;
77450  __Pyx_TraceDeclarations
77451  __Pyx_RefNannyDeclarations
77452  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
77453  int __pyx_lineno = 0;
77454  const char *__pyx_filename = NULL;
77455  int __pyx_clineno = 0;
77456  __Pyx_RefNannySetupContext("__set__", 0);
77457  __Pyx_TraceCall("__set__", __pyx_f[2], 347, 0, __PYX_ERR(2, 347, __pyx_L1_error));
77458  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_int(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(2, 347, __pyx_L1_error)
77459  __PYX_XDEC_MEMVIEW(&__pyx_v_self->owning_rank, 0);
77460  __pyx_v_self->owning_rank = __pyx_t_1;
77461  __pyx_t_1.memview = NULL;
77462  __pyx_t_1.data = NULL;
77463 
77464  /* function exit code */
77465  __pyx_r = 0;
77466  goto __pyx_L0;
77467  __pyx_L1_error:;
77468  __PYX_XDEC_MEMVIEW(&__pyx_t_1, 1);
77469  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.owning_rank.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77470  __pyx_r = -1;
77471  __pyx_L0:;
77472  __Pyx_TraceReturn(Py_None, 0);
77473  __Pyx_RefNannyFinishContext();
77474  return __pyx_r;
77475 }
77476 
77477 /* "mbd/CouplingFSI.pxd":348
77478  * int[:] containing_element_array
77479  * int[:] owning_rank
77480  * string hdfFileName # <<<<<<<<<<<<<<
77481  * double[:] tCount_value
77482  * int tCount
77483  */
77484 
77485 /* Python wrapper */
77486 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_1__get__(PyObject *__pyx_v_self); /*proto*/
77487 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_1__get__(PyObject *__pyx_v_self) {
77488  PyObject *__pyx_r = 0;
77489  __Pyx_RefNannyDeclarations
77490  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77491  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77492 
77493  /* function exit code */
77494  __Pyx_RefNannyFinishContext();
77495  return __pyx_r;
77496 }
77497 
77498 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77499  PyObject *__pyx_r = NULL;
77500  __Pyx_TraceDeclarations
77501  __Pyx_RefNannyDeclarations
77502  PyObject *__pyx_t_1 = NULL;
77503  int __pyx_lineno = 0;
77504  const char *__pyx_filename = NULL;
77505  int __pyx_clineno = 0;
77506  __Pyx_RefNannySetupContext("__get__", 0);
77507  __Pyx_TraceCall("__get__", __pyx_f[2], 348, 0, __PYX_ERR(2, 348, __pyx_L1_error));
77508  __Pyx_XDECREF(__pyx_r);
77509  __pyx_t_1 = __pyx_convert_PyBytes_string_to_py_std__in_string(__pyx_v_self->hdfFileName); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 348, __pyx_L1_error)
77510  __Pyx_GOTREF(__pyx_t_1);
77511  __pyx_r = __pyx_t_1;
77512  __pyx_t_1 = 0;
77513  goto __pyx_L0;
77514 
77515  /* function exit code */
77516  __pyx_L1_error:;
77517  __Pyx_XDECREF(__pyx_t_1);
77518  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.hdfFileName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77519  __pyx_r = NULL;
77520  __pyx_L0:;
77521  __Pyx_XGIVEREF(__pyx_r);
77522  __Pyx_TraceReturn(__pyx_r, 0);
77523  __Pyx_RefNannyFinishContext();
77524  return __pyx_r;
77525 }
77526 
77527 /* Python wrapper */
77528 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77529 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77530  int __pyx_r;
77531  __Pyx_RefNannyDeclarations
77532  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77533  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77534 
77535  /* function exit code */
77536  __Pyx_RefNannyFinishContext();
77537  return __pyx_r;
77538 }
77539 
77540 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77541  int __pyx_r;
77542  __Pyx_TraceDeclarations
77543  __Pyx_RefNannyDeclarations
77544  std::string __pyx_t_1;
77545  int __pyx_lineno = 0;
77546  const char *__pyx_filename = NULL;
77547  int __pyx_clineno = 0;
77548  __Pyx_RefNannySetupContext("__set__", 0);
77549  __Pyx_TraceCall("__set__", __pyx_f[2], 348, 0, __PYX_ERR(2, 348, __pyx_L1_error));
77550  __pyx_t_1 = __pyx_convert_string_from_py_std__in_string(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(2, 348, __pyx_L1_error)
77551  __pyx_v_self->hdfFileName = __pyx_t_1;
77552 
77553  /* function exit code */
77554  __pyx_r = 0;
77555  goto __pyx_L0;
77556  __pyx_L1_error:;
77557  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.hdfFileName.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77558  __pyx_r = -1;
77559  __pyx_L0:;
77560  __Pyx_TraceReturn(Py_None, 0);
77561  __Pyx_RefNannyFinishContext();
77562  return __pyx_r;
77563 }
77564 
77565 /* "mbd/CouplingFSI.pxd":349
77566  * int[:] owning_rank
77567  * string hdfFileName
77568  * double[:] tCount_value # <<<<<<<<<<<<<<
77569  * int tCount
77570  * object nodes
77571  */
77572 
77573 /* Python wrapper */
77574 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_1__get__(PyObject *__pyx_v_self); /*proto*/
77575 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_1__get__(PyObject *__pyx_v_self) {
77576  PyObject *__pyx_r = 0;
77577  __Pyx_RefNannyDeclarations
77578  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77579  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77580 
77581  /* function exit code */
77582  __Pyx_RefNannyFinishContext();
77583  return __pyx_r;
77584 }
77585 
77586 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77587  PyObject *__pyx_r = NULL;
77588  __Pyx_TraceDeclarations
77589  __Pyx_RefNannyDeclarations
77590  PyObject *__pyx_t_1 = NULL;
77591  int __pyx_lineno = 0;
77592  const char *__pyx_filename = NULL;
77593  int __pyx_clineno = 0;
77594  __Pyx_RefNannySetupContext("__get__", 0);
77595  __Pyx_TraceCall("__get__", __pyx_f[2], 349, 0, __PYX_ERR(2, 349, __pyx_L1_error));
77596  __Pyx_XDECREF(__pyx_r);
77597  if (unlikely(!__pyx_v_self->tCount_value.memview)) {PyErr_SetString(PyExc_AttributeError,"Memoryview is not initialized");__PYX_ERR(2, 349, __pyx_L1_error)}
77598  __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_self->tCount_value, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 349, __pyx_L1_error)
77599  __Pyx_GOTREF(__pyx_t_1);
77600  __pyx_r = __pyx_t_1;
77601  __pyx_t_1 = 0;
77602  goto __pyx_L0;
77603 
77604  /* function exit code */
77605  __pyx_L1_error:;
77606  __Pyx_XDECREF(__pyx_t_1);
77607  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.tCount_value.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77608  __pyx_r = NULL;
77609  __pyx_L0:;
77610  __Pyx_XGIVEREF(__pyx_r);
77611  __Pyx_TraceReturn(__pyx_r, 0);
77612  __Pyx_RefNannyFinishContext();
77613  return __pyx_r;
77614 }
77615 
77616 /* Python wrapper */
77617 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77618 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77619  int __pyx_r;
77620  __Pyx_RefNannyDeclarations
77621  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77622  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77623 
77624  /* function exit code */
77625  __Pyx_RefNannyFinishContext();
77626  return __pyx_r;
77627 }
77628 
77629 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77630  int __pyx_r;
77631  __Pyx_TraceDeclarations
77632  __Pyx_RefNannyDeclarations
77633  __Pyx_memviewslice __pyx_t_1 = { 0, 0, { 0 }, { 0 }, { 0 } };
77634  int __pyx_lineno = 0;
77635  const char *__pyx_filename = NULL;
77636  int __pyx_clineno = 0;
77637  __Pyx_RefNannySetupContext("__set__", 0);
77638  __Pyx_TraceCall("__set__", __pyx_f[2], 349, 0, __PYX_ERR(2, 349, __pyx_L1_error));
77639  __pyx_t_1 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_v_value, PyBUF_WRITABLE); if (unlikely(!__pyx_t_1.memview)) __PYX_ERR(2, 349, __pyx_L1_error)
77640  __PYX_XDEC_MEMVIEW(&__pyx_v_self->tCount_value, 0);
77641  __pyx_v_self->tCount_value = __pyx_t_1;
77642  __pyx_t_1.memview = NULL;
77643  __pyx_t_1.data = NULL;
77644 
77645  /* function exit code */
77646  __pyx_r = 0;
77647  goto __pyx_L0;
77648  __pyx_L1_error:;
77649  __PYX_XDEC_MEMVIEW(&__pyx_t_1, 1);
77650  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.tCount_value.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77651  __pyx_r = -1;
77652  __pyx_L0:;
77653  __Pyx_TraceReturn(Py_None, 0);
77654  __Pyx_RefNannyFinishContext();
77655  return __pyx_r;
77656 }
77657 
77658 /* "mbd/CouplingFSI.pxd":350
77659  * string hdfFileName
77660  * double[:] tCount_value
77661  * int tCount # <<<<<<<<<<<<<<
77662  * object nodes
77663  * object elements
77664  */
77665 
77666 /* Python wrapper */
77667 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_1__get__(PyObject *__pyx_v_self); /*proto*/
77668 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_1__get__(PyObject *__pyx_v_self) {
77669  PyObject *__pyx_r = 0;
77670  __Pyx_RefNannyDeclarations
77671  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77672  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6tCount___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77673 
77674  /* function exit code */
77675  __Pyx_RefNannyFinishContext();
77676  return __pyx_r;
77677 }
77678 
77679 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6tCount___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77680  PyObject *__pyx_r = NULL;
77681  __Pyx_TraceDeclarations
77682  __Pyx_RefNannyDeclarations
77683  PyObject *__pyx_t_1 = NULL;
77684  int __pyx_lineno = 0;
77685  const char *__pyx_filename = NULL;
77686  int __pyx_clineno = 0;
77687  __Pyx_RefNannySetupContext("__get__", 0);
77688  __Pyx_TraceCall("__get__", __pyx_f[2], 350, 0, __PYX_ERR(2, 350, __pyx_L1_error));
77689  __Pyx_XDECREF(__pyx_r);
77690  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 350, __pyx_L1_error)
77691  __Pyx_GOTREF(__pyx_t_1);
77692  __pyx_r = __pyx_t_1;
77693  __pyx_t_1 = 0;
77694  goto __pyx_L0;
77695 
77696  /* function exit code */
77697  __pyx_L1_error:;
77698  __Pyx_XDECREF(__pyx_t_1);
77699  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.tCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77700  __pyx_r = NULL;
77701  __pyx_L0:;
77702  __Pyx_XGIVEREF(__pyx_r);
77703  __Pyx_TraceReturn(__pyx_r, 0);
77704  __Pyx_RefNannyFinishContext();
77705  return __pyx_r;
77706 }
77707 
77708 /* Python wrapper */
77709 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77710 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77711  int __pyx_r;
77712  __Pyx_RefNannyDeclarations
77713  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77714  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77715 
77716  /* function exit code */
77717  __Pyx_RefNannyFinishContext();
77718  return __pyx_r;
77719 }
77720 
77721 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77722  int __pyx_r;
77723  __Pyx_TraceDeclarations
77724  __Pyx_RefNannyDeclarations
77725  int __pyx_t_1;
77726  int __pyx_lineno = 0;
77727  const char *__pyx_filename = NULL;
77728  int __pyx_clineno = 0;
77729  __Pyx_RefNannySetupContext("__set__", 0);
77730  __Pyx_TraceCall("__set__", __pyx_f[2], 350, 0, __PYX_ERR(2, 350, __pyx_L1_error));
77731  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 350, __pyx_L1_error)
77732  __pyx_v_self->tCount = __pyx_t_1;
77733 
77734  /* function exit code */
77735  __pyx_r = 0;
77736  goto __pyx_L0;
77737  __pyx_L1_error:;
77738  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.tCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77739  __pyx_r = -1;
77740  __pyx_L0:;
77741  __Pyx_TraceReturn(Py_None, 0);
77742  __Pyx_RefNannyFinishContext();
77743  return __pyx_r;
77744 }
77745 
77746 /* "mbd/CouplingFSI.pxd":351
77747  * double[:] tCount_value
77748  * int tCount
77749  * object nodes # <<<<<<<<<<<<<<
77750  * object elements
77751  *
77752  */
77753 
77754 /* Python wrapper */
77755 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_1__get__(PyObject *__pyx_v_self); /*proto*/
77756 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_1__get__(PyObject *__pyx_v_self) {
77757  PyObject *__pyx_r = 0;
77758  __Pyx_RefNannyDeclarations
77759  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77760  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77761 
77762  /* function exit code */
77763  __Pyx_RefNannyFinishContext();
77764  return __pyx_r;
77765 }
77766 
77767 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77768  PyObject *__pyx_r = NULL;
77769  __Pyx_TraceDeclarations
77770  __Pyx_RefNannyDeclarations
77771  int __pyx_lineno = 0;
77772  const char *__pyx_filename = NULL;
77773  int __pyx_clineno = 0;
77774  __Pyx_RefNannySetupContext("__get__", 0);
77775  __Pyx_TraceCall("__get__", __pyx_f[2], 351, 0, __PYX_ERR(2, 351, __pyx_L1_error));
77776  __Pyx_XDECREF(__pyx_r);
77777  __Pyx_INCREF(__pyx_v_self->nodes);
77778  __pyx_r = __pyx_v_self->nodes;
77779  goto __pyx_L0;
77780 
77781  /* function exit code */
77782  __pyx_L1_error:;
77783  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77784  __pyx_r = NULL;
77785  __pyx_L0:;
77786  __Pyx_XGIVEREF(__pyx_r);
77787  __Pyx_TraceReturn(__pyx_r, 0);
77788  __Pyx_RefNannyFinishContext();
77789  return __pyx_r;
77790 }
77791 
77792 /* Python wrapper */
77793 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77794 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77795  int __pyx_r;
77796  __Pyx_RefNannyDeclarations
77797  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77798  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77799 
77800  /* function exit code */
77801  __Pyx_RefNannyFinishContext();
77802  return __pyx_r;
77803 }
77804 
77805 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77806  int __pyx_r;
77807  __Pyx_TraceDeclarations
77808  __Pyx_RefNannyDeclarations
77809  int __pyx_lineno = 0;
77810  const char *__pyx_filename = NULL;
77811  int __pyx_clineno = 0;
77812  __Pyx_RefNannySetupContext("__set__", 0);
77813  __Pyx_TraceCall("__set__", __pyx_f[2], 351, 0, __PYX_ERR(2, 351, __pyx_L1_error));
77814  __Pyx_INCREF(__pyx_v_value);
77815  __Pyx_GIVEREF(__pyx_v_value);
77816  __Pyx_GOTREF(__pyx_v_self->nodes);
77817  __Pyx_DECREF(__pyx_v_self->nodes);
77818  __pyx_v_self->nodes = __pyx_v_value;
77819 
77820  /* function exit code */
77821  __pyx_r = 0;
77822  goto __pyx_L0;
77823  __pyx_L1_error:;
77824  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77825  __pyx_r = -1;
77826  __pyx_L0:;
77827  __Pyx_TraceReturn(Py_None, 0);
77828  __Pyx_RefNannyFinishContext();
77829  return __pyx_r;
77830 }
77831 
77832 /* Python wrapper */
77833 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_5__del__(PyObject *__pyx_v_self); /*proto*/
77834 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_5__del__(PyObject *__pyx_v_self) {
77835  int __pyx_r;
77836  __Pyx_RefNannyDeclarations
77837  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
77838  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77839 
77840  /* function exit code */
77841  __Pyx_RefNannyFinishContext();
77842  return __pyx_r;
77843 }
77844 
77845 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77846  int __pyx_r;
77847  __Pyx_TraceDeclarations
77848  __Pyx_RefNannyDeclarations
77849  int __pyx_lineno = 0;
77850  const char *__pyx_filename = NULL;
77851  int __pyx_clineno = 0;
77852  __Pyx_RefNannySetupContext("__del__", 0);
77853  __Pyx_TraceCall("__del__", __pyx_f[2], 351, 0, __PYX_ERR(2, 351, __pyx_L1_error));
77854  __Pyx_INCREF(Py_None);
77855  __Pyx_GIVEREF(Py_None);
77856  __Pyx_GOTREF(__pyx_v_self->nodes);
77857  __Pyx_DECREF(__pyx_v_self->nodes);
77858  __pyx_v_self->nodes = Py_None;
77859 
77860  /* function exit code */
77861  __pyx_r = 0;
77862  goto __pyx_L0;
77863  __pyx_L1_error:;
77864  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.nodes.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77865  __pyx_r = -1;
77866  __pyx_L0:;
77867  __Pyx_TraceReturn(Py_None, 0);
77868  __Pyx_RefNannyFinishContext();
77869  return __pyx_r;
77870 }
77871 
77872 /* "mbd/CouplingFSI.pxd":352
77873  * int tCount
77874  * object nodes
77875  * object elements # <<<<<<<<<<<<<<
77876  *
77877  *
77878  */
77879 
77880 /* Python wrapper */
77881 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_1__get__(PyObject *__pyx_v_self); /*proto*/
77882 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_1__get__(PyObject *__pyx_v_self) {
77883  PyObject *__pyx_r = 0;
77884  __Pyx_RefNannyDeclarations
77885  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
77886  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77887 
77888  /* function exit code */
77889  __Pyx_RefNannyFinishContext();
77890  return __pyx_r;
77891 }
77892 
77893 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77894  PyObject *__pyx_r = NULL;
77895  __Pyx_TraceDeclarations
77896  __Pyx_RefNannyDeclarations
77897  int __pyx_lineno = 0;
77898  const char *__pyx_filename = NULL;
77899  int __pyx_clineno = 0;
77900  __Pyx_RefNannySetupContext("__get__", 0);
77901  __Pyx_TraceCall("__get__", __pyx_f[2], 352, 0, __PYX_ERR(2, 352, __pyx_L1_error));
77902  __Pyx_XDECREF(__pyx_r);
77903  __Pyx_INCREF(__pyx_v_self->elements);
77904  __pyx_r = __pyx_v_self->elements;
77905  goto __pyx_L0;
77906 
77907  /* function exit code */
77908  __pyx_L1_error:;
77909  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.elements.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77910  __pyx_r = NULL;
77911  __pyx_L0:;
77912  __Pyx_XGIVEREF(__pyx_r);
77913  __Pyx_TraceReturn(__pyx_r, 0);
77914  __Pyx_RefNannyFinishContext();
77915  return __pyx_r;
77916 }
77917 
77918 /* Python wrapper */
77919 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
77920 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
77921  int __pyx_r;
77922  __Pyx_RefNannyDeclarations
77923  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
77924  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v_value));
77925 
77926  /* function exit code */
77927  __Pyx_RefNannyFinishContext();
77928  return __pyx_r;
77929 }
77930 
77931 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, PyObject *__pyx_v_value) {
77932  int __pyx_r;
77933  __Pyx_TraceDeclarations
77934  __Pyx_RefNannyDeclarations
77935  int __pyx_lineno = 0;
77936  const char *__pyx_filename = NULL;
77937  int __pyx_clineno = 0;
77938  __Pyx_RefNannySetupContext("__set__", 0);
77939  __Pyx_TraceCall("__set__", __pyx_f[2], 352, 0, __PYX_ERR(2, 352, __pyx_L1_error));
77940  __Pyx_INCREF(__pyx_v_value);
77941  __Pyx_GIVEREF(__pyx_v_value);
77942  __Pyx_GOTREF(__pyx_v_self->elements);
77943  __Pyx_DECREF(__pyx_v_self->elements);
77944  __pyx_v_self->elements = __pyx_v_value;
77945 
77946  /* function exit code */
77947  __pyx_r = 0;
77948  goto __pyx_L0;
77949  __pyx_L1_error:;
77950  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.elements.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77951  __pyx_r = -1;
77952  __pyx_L0:;
77953  __Pyx_TraceReturn(Py_None, 0);
77954  __Pyx_RefNannyFinishContext();
77955  return __pyx_r;
77956 }
77957 
77958 /* Python wrapper */
77959 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_5__del__(PyObject *__pyx_v_self); /*proto*/
77960 static int __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_5__del__(PyObject *__pyx_v_self) {
77961  int __pyx_r;
77962  __Pyx_RefNannyDeclarations
77963  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
77964  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
77965 
77966  /* function exit code */
77967  __Pyx_RefNannyFinishContext();
77968  return __pyx_r;
77969 }
77970 
77971 static int __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_8elements_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
77972  int __pyx_r;
77973  __Pyx_TraceDeclarations
77974  __Pyx_RefNannyDeclarations
77975  int __pyx_lineno = 0;
77976  const char *__pyx_filename = NULL;
77977  int __pyx_clineno = 0;
77978  __Pyx_RefNannySetupContext("__del__", 0);
77979  __Pyx_TraceCall("__del__", __pyx_f[2], 352, 0, __PYX_ERR(2, 352, __pyx_L1_error));
77980  __Pyx_INCREF(Py_None);
77981  __Pyx_GIVEREF(Py_None);
77982  __Pyx_GOTREF(__pyx_v_self->elements);
77983  __Pyx_DECREF(__pyx_v_self->elements);
77984  __pyx_v_self->elements = Py_None;
77985 
77986  /* function exit code */
77987  __pyx_r = 0;
77988  goto __pyx_L0;
77989  __pyx_L1_error:;
77990  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.elements.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
77991  __pyx_r = -1;
77992  __pyx_L0:;
77993  __Pyx_TraceReturn(Py_None, 0);
77994  __Pyx_RefNannyFinishContext();
77995  return __pyx_r;
77996 }
77997 
77998 /* "(tree fragment)":1
77999  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
78000  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78001  * def __setstate_cython__(self, __pyx_state):
78002  */
78003 
78004 /* Python wrapper */
78005 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_81__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
78006 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_80__reduce_cython__[] = "ProtChMoorings.__reduce_cython__(self)";
78007 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_81__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_81__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_80__reduce_cython__};
78008 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_81__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
78009  PyObject *__pyx_r = 0;
78010  __Pyx_RefNannyDeclarations
78011  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
78012  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_80__reduce_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self));
78013 
78014  /* function exit code */
78015  __Pyx_RefNannyFinishContext();
78016  return __pyx_r;
78017 }
78018 
78019 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_80__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self) {
78020  PyObject *__pyx_r = NULL;
78021  __Pyx_TraceDeclarations
78022  __Pyx_RefNannyDeclarations
78023  PyObject *__pyx_t_1 = NULL;
78024  int __pyx_lineno = 0;
78025  const char *__pyx_filename = NULL;
78026  int __pyx_clineno = 0;
78027  __Pyx_TraceFrameInit(__pyx_codeobj__194)
78028  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
78029  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
78030 
78031  /* "(tree fragment)":2
78032  * def __reduce_cython__(self):
78033  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
78034  * def __setstate_cython__(self, __pyx_state):
78035  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78036  */
78037  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__195, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
78038  __Pyx_GOTREF(__pyx_t_1);
78039  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
78040  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
78041  __PYX_ERR(1, 2, __pyx_L1_error)
78042 
78043  /* "(tree fragment)":1
78044  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
78045  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78046  * def __setstate_cython__(self, __pyx_state):
78047  */
78048 
78049  /* function exit code */
78050  __pyx_L1_error:;
78051  __Pyx_XDECREF(__pyx_t_1);
78052  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78053  __pyx_r = NULL;
78054  __Pyx_XGIVEREF(__pyx_r);
78055  __Pyx_TraceReturn(__pyx_r, 0);
78056  __Pyx_RefNannyFinishContext();
78057  return __pyx_r;
78058 }
78059 
78060 /* "(tree fragment)":3
78061  * def __reduce_cython__(self):
78062  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78063  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
78064  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78065  */
78066 
78067 /* Python wrapper */
78068 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_83__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
78069 static char __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_82__setstate_cython__[] = "ProtChMoorings.__setstate_cython__(self, __pyx_state)";
78070 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_83__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_83__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_82__setstate_cython__};
78071 static PyObject *__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_83__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
78072  PyObject *__pyx_r = 0;
78073  __Pyx_RefNannyDeclarations
78074  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
78075  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_82__setstate_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
78076 
78077  /* function exit code */
78078  __Pyx_RefNannyFinishContext();
78079  return __pyx_r;
78080 }
78081 
78082 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14ProtChMoorings_82__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
78083  PyObject *__pyx_r = NULL;
78084  __Pyx_TraceDeclarations
78085  __Pyx_RefNannyDeclarations
78086  PyObject *__pyx_t_1 = NULL;
78087  int __pyx_lineno = 0;
78088  const char *__pyx_filename = NULL;
78089  int __pyx_clineno = 0;
78090  __Pyx_TraceFrameInit(__pyx_codeobj__196)
78091  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
78092  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
78093 
78094  /* "(tree fragment)":4
78095  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78096  * def __setstate_cython__(self, __pyx_state):
78097  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
78098  */
78099  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__197, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
78100  __Pyx_GOTREF(__pyx_t_1);
78101  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
78102  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
78103  __PYX_ERR(1, 4, __pyx_L1_error)
78104 
78105  /* "(tree fragment)":3
78106  * def __reduce_cython__(self):
78107  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78108  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
78109  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
78110  */
78111 
78112  /* function exit code */
78113  __pyx_L1_error:;
78114  __Pyx_XDECREF(__pyx_t_1);
78115  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChMoorings.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
78116  __pyx_r = NULL;
78117  __Pyx_XGIVEREF(__pyx_r);
78118  __Pyx_TraceReturn(__pyx_r, 0);
78119  __Pyx_RefNannyFinishContext();
78120  return __pyx_r;
78121 }
78122 
78123 /* "mbd/CouplingFSI.pyx":3385
78124  *
78125  *
78126  * def getLocalNearestNode(coords, kdtree): # <<<<<<<<<<<<<<
78127  * """Finds nearest node to coordinates (local)
78128  * Parameters
78129  */
78130 
78131 /* Python wrapper */
78132 static PyObject *__pyx_pw_3mbd_11CouplingFSI_1getLocalNearestNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
78133 static char __pyx_doc_3mbd_11CouplingFSI_getLocalNearestNode[] = "getLocalNearestNode(coords, kdtree)\nFinds nearest node to coordinates (local)\n Parameters\n ----------\n coords: array_like\n coordinates from which to find nearest node\n kdtree: scipy.spatial.cKDTree\n instance of scipy kdtree\n\n Returns\n -------\n node: int\n nearest node index\n distance: float\n distance to nearest node\n ";
78134 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_1getLocalNearestNode = {"getLocalNearestNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_1getLocalNearestNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_getLocalNearestNode};
78135 static PyObject *__pyx_pw_3mbd_11CouplingFSI_1getLocalNearestNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
78136  PyObject *__pyx_v_coords = 0;
78137  PyObject *__pyx_v_kdtree = 0;
78138  int __pyx_lineno = 0;
78139  const char *__pyx_filename = NULL;
78140  int __pyx_clineno = 0;
78141  PyObject *__pyx_r = 0;
78142  __Pyx_RefNannyDeclarations
78143  __Pyx_RefNannySetupContext("getLocalNearestNode (wrapper)", 0);
78144  {
78145  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_coords,&__pyx_n_s_kdtree,0};
78146  PyObject* values[2] = {0,0};
78147  if (unlikely(__pyx_kwds)) {
78148  Py_ssize_t kw_args;
78149  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
78150  switch (pos_args) {
78151  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
78152  CYTHON_FALLTHROUGH;
78153  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
78154  CYTHON_FALLTHROUGH;
78155  case 0: break;
78156  default: goto __pyx_L5_argtuple_error;
78157  }
78158  kw_args = PyDict_Size(__pyx_kwds);
78159  switch (pos_args) {
78160  case 0:
78161  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coords)) != 0)) kw_args--;
78162  else goto __pyx_L5_argtuple_error;
78163  CYTHON_FALLTHROUGH;
78164  case 1:
78165  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_kdtree)) != 0)) kw_args--;
78166  else {
78167  __Pyx_RaiseArgtupleInvalid("getLocalNearestNode", 1, 2, 2, 1); __PYX_ERR(0, 3385, __pyx_L3_error)
78168  }
78169  }
78170  if (unlikely(kw_args > 0)) {
78171  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getLocalNearestNode") < 0)) __PYX_ERR(0, 3385, __pyx_L3_error)
78172  }
78173  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
78174  goto __pyx_L5_argtuple_error;
78175  } else {
78176  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
78177  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
78178  }
78179  __pyx_v_coords = values[0];
78180  __pyx_v_kdtree = values[1];
78181  }
78182  goto __pyx_L4_argument_unpacking_done;
78183  __pyx_L5_argtuple_error:;
78184  __Pyx_RaiseArgtupleInvalid("getLocalNearestNode", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3385, __pyx_L3_error)
78185  __pyx_L3_error:;
78186  __Pyx_AddTraceback("mbd.CouplingFSI.getLocalNearestNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
78187  __Pyx_RefNannyFinishContext();
78188  return NULL;
78189  __pyx_L4_argument_unpacking_done:;
78190  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_getLocalNearestNode(__pyx_self, __pyx_v_coords, __pyx_v_kdtree);
78191 
78192  /* function exit code */
78193  __Pyx_RefNannyFinishContext();
78194  return __pyx_r;
78195 }
78196 
78197 static PyObject *__pyx_pf_3mbd_11CouplingFSI_getLocalNearestNode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_coords, PyObject *__pyx_v_kdtree) {
78198  PyObject *__pyx_v_distance = NULL;
78199  PyObject *__pyx_v_node = NULL;
78200  PyObject *__pyx_r = NULL;
78201  __Pyx_TraceDeclarations
78202  __Pyx_RefNannyDeclarations
78203  PyObject *__pyx_t_1 = NULL;
78204  PyObject *__pyx_t_2 = NULL;
78205  PyObject *__pyx_t_3 = NULL;
78206  PyObject *__pyx_t_4 = NULL;
78207  PyObject *(*__pyx_t_5)(PyObject *);
78208  int __pyx_lineno = 0;
78209  const char *__pyx_filename = NULL;
78210  int __pyx_clineno = 0;
78211  __Pyx_TraceFrameInit(__pyx_codeobj__198)
78212  __Pyx_RefNannySetupContext("getLocalNearestNode", 0);
78213  __Pyx_TraceCall("getLocalNearestNode", __pyx_f[0], 3385, 0, __PYX_ERR(0, 3385, __pyx_L1_error));
78214 
78215  /* "mbd/CouplingFSI.pyx":3402
78216  * """
78217  * # determine local nearest node distance
78218  * distance, node = kdtree.query(coords) # <<<<<<<<<<<<<<
78219  * return node, distance
78220  *
78221  */
78222  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kdtree, __pyx_n_s_query); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3402, __pyx_L1_error)
78223  __Pyx_GOTREF(__pyx_t_2);
78224  __pyx_t_3 = NULL;
78225  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
78226  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
78227  if (likely(__pyx_t_3)) {
78228  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
78229  __Pyx_INCREF(__pyx_t_3);
78230  __Pyx_INCREF(function);
78231  __Pyx_DECREF_SET(__pyx_t_2, function);
78232  }
78233  }
78234  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_coords) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_coords);
78235  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
78236  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3402, __pyx_L1_error)
78237  __Pyx_GOTREF(__pyx_t_1);
78238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78239  if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
78240  PyObject* sequence = __pyx_t_1;
78241  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
78242  if (unlikely(size != 2)) {
78243  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
78244  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
78245  __PYX_ERR(0, 3402, __pyx_L1_error)
78246  }
78247  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
78248  if (likely(PyTuple_CheckExact(sequence))) {
78249  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
78250  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
78251  } else {
78252  __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
78253  __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
78254  }
78255  __Pyx_INCREF(__pyx_t_2);
78256  __Pyx_INCREF(__pyx_t_3);
78257  #else
78258  __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3402, __pyx_L1_error)
78259  __Pyx_GOTREF(__pyx_t_2);
78260  __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3402, __pyx_L1_error)
78261  __Pyx_GOTREF(__pyx_t_3);
78262  #endif
78263  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
78264  } else {
78265  Py_ssize_t index = -1;
78266  __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3402, __pyx_L1_error)
78267  __Pyx_GOTREF(__pyx_t_4);
78268  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
78269  __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
78270  index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
78271  __Pyx_GOTREF(__pyx_t_2);
78272  index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
78273  __Pyx_GOTREF(__pyx_t_3);
78274  if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 3402, __pyx_L1_error)
78275  __pyx_t_5 = NULL;
78276  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
78277  goto __pyx_L4_unpacking_done;
78278  __pyx_L3_unpacking_failed:;
78279  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
78280  __pyx_t_5 = NULL;
78281  if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
78282  __PYX_ERR(0, 3402, __pyx_L1_error)
78283  __pyx_L4_unpacking_done:;
78284  }
78285  __pyx_v_distance = __pyx_t_2;
78286  __pyx_t_2 = 0;
78287  __pyx_v_node = __pyx_t_3;
78288  __pyx_t_3 = 0;
78289 
78290  /* "mbd/CouplingFSI.pyx":3403
78291  * # determine local nearest node distance
78292  * distance, node = kdtree.query(coords)
78293  * return node, distance # <<<<<<<<<<<<<<
78294  *
78295  * cdef pyxGetLocalNearestNode(double[:] coords,
78296  */
78297  __Pyx_XDECREF(__pyx_r);
78298  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3403, __pyx_L1_error)
78299  __Pyx_GOTREF(__pyx_t_1);
78300  __Pyx_INCREF(__pyx_v_node);
78301  __Pyx_GIVEREF(__pyx_v_node);
78302  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_node);
78303  __Pyx_INCREF(__pyx_v_distance);
78304  __Pyx_GIVEREF(__pyx_v_distance);
78305  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_distance);
78306  __pyx_r = __pyx_t_1;
78307  __pyx_t_1 = 0;
78308  goto __pyx_L0;
78309 
78310  /* "mbd/CouplingFSI.pyx":3385
78311  *
78312  *
78313  * def getLocalNearestNode(coords, kdtree): # <<<<<<<<<<<<<<
78314  * """Finds nearest node to coordinates (local)
78315  * Parameters
78316  */
78317 
78318  /* function exit code */
78319  __pyx_L1_error:;
78320  __Pyx_XDECREF(__pyx_t_1);
78321  __Pyx_XDECREF(__pyx_t_2);
78322  __Pyx_XDECREF(__pyx_t_3);
78323  __Pyx_XDECREF(__pyx_t_4);
78324  __Pyx_AddTraceback("mbd.CouplingFSI.getLocalNearestNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
78325  __pyx_r = NULL;
78326  __pyx_L0:;
78327  __Pyx_XDECREF(__pyx_v_distance);
78328  __Pyx_XDECREF(__pyx_v_node);
78329  __Pyx_XGIVEREF(__pyx_r);
78330  __Pyx_TraceReturn(__pyx_r, 0);
78331  __Pyx_RefNannyFinishContext();
78332  return __pyx_r;
78333 }
78334 
78335 /* "mbd/CouplingFSI.pyx":3405
78336  * return node, distance
78337  *
78338  * cdef pyxGetLocalNearestNode(double[:] coords, # <<<<<<<<<<<<<<
78339  * double[:,:] nodeArray,
78340  * int[:] nodeStarOffsets,
78341  */
78342 
78343 static PyObject *__pyx_f_3mbd_11CouplingFSI_pyxGetLocalNearestNode(__Pyx_memviewslice __pyx_v_coords, __Pyx_memviewslice __pyx_v_nodeArray, __Pyx_memviewslice __pyx_v_nodeStarOffsets, __Pyx_memviewslice __pyx_v_nodeStarArray, int __pyx_v_node, CYTHON_UNUSED int __pyx_v_rank) {
78344  int __pyx_v_nearest_node;
78345  int __pyx_v_nearest_node0;
78346  double __pyx_v_dist;
78347  double __pyx_v_min_dist;
78348  __Pyx_memviewslice __pyx_v_node_coords = { 0, 0, { 0 }, { 0 }, { 0 } };
78349  bool __pyx_v_found_node;
78350  PyObject *__pyx_v_nOffset = NULL;
78351  PyObject *__pyx_r = NULL;
78352  __Pyx_TraceDeclarations
78353  __Pyx_RefNannyDeclarations
78354  PyObject *__pyx_t_1 = NULL;
78355  PyObject *__pyx_t_2 = NULL;
78356  PyObject *__pyx_t_3 = NULL;
78357  PyObject *__pyx_t_4 = NULL;
78358  int __pyx_t_5;
78359  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
78360  Py_ssize_t __pyx_t_7;
78361  Py_ssize_t __pyx_t_8;
78362  Py_ssize_t __pyx_t_9;
78363  Py_ssize_t __pyx_t_10;
78364  Py_ssize_t __pyx_t_11;
78365  Py_ssize_t __pyx_t_12;
78366  Py_ssize_t __pyx_t_13;
78367  Py_ssize_t __pyx_t_14;
78368  Py_ssize_t __pyx_t_15;
78369  Py_ssize_t __pyx_t_16;
78370  Py_ssize_t __pyx_t_17;
78371  Py_ssize_t __pyx_t_18;
78372  int __pyx_t_19;
78373  Py_ssize_t __pyx_t_20;
78374  PyObject *(*__pyx_t_21)(PyObject *);
78375  Py_ssize_t __pyx_t_22;
78376  int __pyx_lineno = 0;
78377  const char *__pyx_filename = NULL;
78378  int __pyx_clineno = 0;
78379  __Pyx_RefNannySetupContext("pyxGetLocalNearestNode", 0);
78380  __Pyx_TraceCall("pyxGetLocalNearestNode", __pyx_f[0], 3405, 0, __PYX_ERR(0, 3405, __pyx_L1_error));
78381 
78382  /* "mbd/CouplingFSI.pyx":3435
78383  * """
78384  * # determine local nearest node distance
78385  * cdef int nearest_node = copy.deepcopy(node) # <<<<<<<<<<<<<<
78386  * cdef int nearest_node0 = copy.deepcopy(node)
78387  * cdef int nOffsets
78388  */
78389  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3435, __pyx_L1_error)
78390  __Pyx_GOTREF(__pyx_t_2);
78391  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3435, __pyx_L1_error)
78392  __Pyx_GOTREF(__pyx_t_3);
78393  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78394  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3435, __pyx_L1_error)
78395  __Pyx_GOTREF(__pyx_t_2);
78396  __pyx_t_4 = NULL;
78397  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
78398  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
78399  if (likely(__pyx_t_4)) {
78400  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
78401  __Pyx_INCREF(__pyx_t_4);
78402  __Pyx_INCREF(function);
78403  __Pyx_DECREF_SET(__pyx_t_3, function);
78404  }
78405  }
78406  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
78407  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
78408  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78409  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3435, __pyx_L1_error)
78410  __Pyx_GOTREF(__pyx_t_1);
78411  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
78412  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3435, __pyx_L1_error)
78413  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
78414  __pyx_v_nearest_node = __pyx_t_5;
78415 
78416  /* "mbd/CouplingFSI.pyx":3436
78417  * # determine local nearest node distance
78418  * cdef int nearest_node = copy.deepcopy(node)
78419  * cdef int nearest_node0 = copy.deepcopy(node) # <<<<<<<<<<<<<<
78420  * cdef int nOffsets
78421  * cdef double dist
78422  */
78423  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3436, __pyx_L1_error)
78424  __Pyx_GOTREF(__pyx_t_3);
78425  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3436, __pyx_L1_error)
78426  __Pyx_GOTREF(__pyx_t_2);
78427  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
78428  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3436, __pyx_L1_error)
78429  __Pyx_GOTREF(__pyx_t_3);
78430  __pyx_t_4 = NULL;
78431  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
78432  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
78433  if (likely(__pyx_t_4)) {
78434  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
78435  __Pyx_INCREF(__pyx_t_4);
78436  __Pyx_INCREF(function);
78437  __Pyx_DECREF_SET(__pyx_t_2, function);
78438  }
78439  }
78440  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
78441  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
78442  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
78443  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3436, __pyx_L1_error)
78444  __Pyx_GOTREF(__pyx_t_1);
78445  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78446  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3436, __pyx_L1_error)
78447  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
78448  __pyx_v_nearest_node0 = __pyx_t_5;
78449 
78450  /* "mbd/CouplingFSI.pyx":3441
78451  * cdef double min_dist
78452  * cdef double[:] node_coords
78453  * cdef bool found_node = False # <<<<<<<<<<<<<<
78454  * node_coords = nodeArray[node]
78455  * min_dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78456  */
78457  __pyx_v_found_node = 0;
78458 
78459  /* "mbd/CouplingFSI.pyx":3442
78460  * cdef double[:] node_coords
78461  * cdef bool found_node = False
78462  * node_coords = nodeArray[node] # <<<<<<<<<<<<<<
78463  * min_dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78464  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78465  */
78466  __pyx_t_6.data = __pyx_v_nodeArray.data;
78467  __pyx_t_6.memview = __pyx_v_nodeArray.memview;
78468  __PYX_INC_MEMVIEW(&__pyx_t_6, 0);
78469  {
78470  Py_ssize_t __pyx_tmp_idx = __pyx_v_node;
78471  Py_ssize_t __pyx_tmp_shape = __pyx_v_nodeArray.shape[0];
78472  Py_ssize_t __pyx_tmp_stride = __pyx_v_nodeArray.strides[0];
78473  if (__pyx_tmp_idx < 0)
78474  __pyx_tmp_idx += __pyx_tmp_shape;
78475  if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) {
78476  PyErr_SetString(PyExc_IndexError,
78477  "Index out of bounds (axis 0)");
78478  __PYX_ERR(0, 3442, __pyx_L1_error)
78479  }
78480  __pyx_t_6.data += __pyx_tmp_idx * __pyx_tmp_stride;
78481 }
78482 
78483 __pyx_t_6.shape[0] = __pyx_v_nodeArray.shape[1];
78484 __pyx_t_6.strides[0] = __pyx_v_nodeArray.strides[1];
78485  __pyx_t_6.suboffsets[0] = -1;
78486 
78487 __pyx_v_node_coords = __pyx_t_6;
78488  __pyx_t_6.memview = NULL;
78489  __pyx_t_6.data = NULL;
78490 
78491  /* "mbd/CouplingFSI.pyx":3443
78492  * cdef bool found_node = False
78493  * node_coords = nodeArray[node]
78494  * min_dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\ # <<<<<<<<<<<<<<
78495  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78496  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78497  */
78498  __pyx_t_7 = 0;
78499  __pyx_t_5 = -1;
78500  if (__pyx_t_7 < 0) {
78501  __pyx_t_7 += __pyx_v_node_coords.shape[0];
78502  if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
78503  } else if (unlikely(__pyx_t_7 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78504  if (unlikely(__pyx_t_5 != -1)) {
78505  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78506  __PYX_ERR(0, 3443, __pyx_L1_error)
78507  }
78508  __pyx_t_8 = 0;
78509  __pyx_t_5 = -1;
78510  if (__pyx_t_8 < 0) {
78511  __pyx_t_8 += __pyx_v_coords.shape[0];
78512  if (unlikely(__pyx_t_8 < 0)) __pyx_t_5 = 0;
78513  } else if (unlikely(__pyx_t_8 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78514  if (unlikely(__pyx_t_5 != -1)) {
78515  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78516  __PYX_ERR(0, 3443, __pyx_L1_error)
78517  }
78518  __pyx_t_9 = 0;
78519  __pyx_t_5 = -1;
78520  if (__pyx_t_9 < 0) {
78521  __pyx_t_9 += __pyx_v_node_coords.shape[0];
78522  if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0;
78523  } else if (unlikely(__pyx_t_9 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78524  if (unlikely(__pyx_t_5 != -1)) {
78525  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78526  __PYX_ERR(0, 3443, __pyx_L1_error)
78527  }
78528  __pyx_t_10 = 0;
78529  __pyx_t_5 = -1;
78530  if (__pyx_t_10 < 0) {
78531  __pyx_t_10 += __pyx_v_coords.shape[0];
78532  if (unlikely(__pyx_t_10 < 0)) __pyx_t_5 = 0;
78533  } else if (unlikely(__pyx_t_10 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78534  if (unlikely(__pyx_t_5 != -1)) {
78535  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78536  __PYX_ERR(0, 3443, __pyx_L1_error)
78537  }
78538 
78539  /* "mbd/CouplingFSI.pyx":3444
78540  * node_coords = nodeArray[node]
78541  * min_dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78542  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\ # <<<<<<<<<<<<<<
78543  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78544  * while found_node is False:
78545  */
78546  __pyx_t_11 = 1;
78547  __pyx_t_5 = -1;
78548  if (__pyx_t_11 < 0) {
78549  __pyx_t_11 += __pyx_v_node_coords.shape[0];
78550  if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0;
78551  } else if (unlikely(__pyx_t_11 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78552  if (unlikely(__pyx_t_5 != -1)) {
78553  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78554  __PYX_ERR(0, 3444, __pyx_L1_error)
78555  }
78556  __pyx_t_12 = 1;
78557  __pyx_t_5 = -1;
78558  if (__pyx_t_12 < 0) {
78559  __pyx_t_12 += __pyx_v_coords.shape[0];
78560  if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0;
78561  } else if (unlikely(__pyx_t_12 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78562  if (unlikely(__pyx_t_5 != -1)) {
78563  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78564  __PYX_ERR(0, 3444, __pyx_L1_error)
78565  }
78566  __pyx_t_13 = 1;
78567  __pyx_t_5 = -1;
78568  if (__pyx_t_13 < 0) {
78569  __pyx_t_13 += __pyx_v_node_coords.shape[0];
78570  if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0;
78571  } else if (unlikely(__pyx_t_13 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78572  if (unlikely(__pyx_t_5 != -1)) {
78573  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78574  __PYX_ERR(0, 3444, __pyx_L1_error)
78575  }
78576  __pyx_t_14 = 1;
78577  __pyx_t_5 = -1;
78578  if (__pyx_t_14 < 0) {
78579  __pyx_t_14 += __pyx_v_coords.shape[0];
78580  if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0;
78581  } else if (unlikely(__pyx_t_14 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78582  if (unlikely(__pyx_t_5 != -1)) {
78583  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78584  __PYX_ERR(0, 3444, __pyx_L1_error)
78585  }
78586 
78587  /* "mbd/CouplingFSI.pyx":3445
78588  * min_dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78589  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78590  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2]) # <<<<<<<<<<<<<<
78591  * while found_node is False:
78592  * nearest_node0 = nearest_node
78593  */
78594  __pyx_t_15 = 2;
78595  __pyx_t_5 = -1;
78596  if (__pyx_t_15 < 0) {
78597  __pyx_t_15 += __pyx_v_node_coords.shape[0];
78598  if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0;
78599  } else if (unlikely(__pyx_t_15 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78600  if (unlikely(__pyx_t_5 != -1)) {
78601  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78602  __PYX_ERR(0, 3445, __pyx_L1_error)
78603  }
78604  __pyx_t_16 = 2;
78605  __pyx_t_5 = -1;
78606  if (__pyx_t_16 < 0) {
78607  __pyx_t_16 += __pyx_v_coords.shape[0];
78608  if (unlikely(__pyx_t_16 < 0)) __pyx_t_5 = 0;
78609  } else if (unlikely(__pyx_t_16 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78610  if (unlikely(__pyx_t_5 != -1)) {
78611  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78612  __PYX_ERR(0, 3445, __pyx_L1_error)
78613  }
78614  __pyx_t_17 = 2;
78615  __pyx_t_5 = -1;
78616  if (__pyx_t_17 < 0) {
78617  __pyx_t_17 += __pyx_v_node_coords.shape[0];
78618  if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0;
78619  } else if (unlikely(__pyx_t_17 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78620  if (unlikely(__pyx_t_5 != -1)) {
78621  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78622  __PYX_ERR(0, 3445, __pyx_L1_error)
78623  }
78624  __pyx_t_18 = 2;
78625  __pyx_t_5 = -1;
78626  if (__pyx_t_18 < 0) {
78627  __pyx_t_18 += __pyx_v_coords.shape[0];
78628  if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
78629  } else if (unlikely(__pyx_t_18 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78630  if (unlikely(__pyx_t_5 != -1)) {
78631  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78632  __PYX_ERR(0, 3445, __pyx_L1_error)
78633  }
78634 
78635  /* "mbd/CouplingFSI.pyx":3444
78636  * node_coords = nodeArray[node]
78637  * min_dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78638  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\ # <<<<<<<<<<<<<<
78639  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78640  * while found_node is False:
78641  */
78642  __pyx_v_min_dist = (((((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_7 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_8 * __pyx_v_coords.strides[0]) )))) * ((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_9 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_10 * __pyx_v_coords.strides[0]) ))))) + (((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_11 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_12 * __pyx_v_coords.strides[0]) )))) * ((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_13 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_14 * __pyx_v_coords.strides[0]) )))))) + (((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_15 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_16 * __pyx_v_coords.strides[0]) )))) * ((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_17 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_18 * __pyx_v_coords.strides[0]) ))))));
78643 
78644  /* "mbd/CouplingFSI.pyx":3446
78645  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78646  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78647  * while found_node is False: # <<<<<<<<<<<<<<
78648  * nearest_node0 = nearest_node
78649  * for nOffset in range(nodeStarOffsets[nearest_node0],
78650  */
78651  while (1) {
78652  __pyx_t_19 = ((__pyx_v_found_node == 0) != 0);
78653  if (!__pyx_t_19) break;
78654 
78655  /* "mbd/CouplingFSI.pyx":3447
78656  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78657  * while found_node is False:
78658  * nearest_node0 = nearest_node # <<<<<<<<<<<<<<
78659  * for nOffset in range(nodeStarOffsets[nearest_node0],
78660  * nodeStarOffsets[nearest_node0+1]):
78661  */
78662  __pyx_v_nearest_node0 = __pyx_v_nearest_node;
78663 
78664  /* "mbd/CouplingFSI.pyx":3448
78665  * while found_node is False:
78666  * nearest_node0 = nearest_node
78667  * for nOffset in range(nodeStarOffsets[nearest_node0], # <<<<<<<<<<<<<<
78668  * nodeStarOffsets[nearest_node0+1]):
78669  * node = nodeStarArray[nOffset]
78670  */
78671  __pyx_t_18 = __pyx_v_nearest_node0;
78672  __pyx_t_5 = -1;
78673  if (__pyx_t_18 < 0) {
78674  __pyx_t_18 += __pyx_v_nodeStarOffsets.shape[0];
78675  if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
78676  } else if (unlikely(__pyx_t_18 >= __pyx_v_nodeStarOffsets.shape[0])) __pyx_t_5 = 0;
78677  if (unlikely(__pyx_t_5 != -1)) {
78678  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78679  __PYX_ERR(0, 3448, __pyx_L1_error)
78680  }
78681  __pyx_t_1 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ (__pyx_v_nodeStarOffsets.data + __pyx_t_18 * __pyx_v_nodeStarOffsets.strides[0]) )))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3448, __pyx_L1_error)
78682  __Pyx_GOTREF(__pyx_t_1);
78683 
78684  /* "mbd/CouplingFSI.pyx":3449
78685  * nearest_node0 = nearest_node
78686  * for nOffset in range(nodeStarOffsets[nearest_node0],
78687  * nodeStarOffsets[nearest_node0+1]): # <<<<<<<<<<<<<<
78688  * node = nodeStarArray[nOffset]
78689  * node_coords = nodeArray[node]
78690  */
78691  __pyx_t_18 = (__pyx_v_nearest_node0 + 1);
78692  __pyx_t_5 = -1;
78693  if (__pyx_t_18 < 0) {
78694  __pyx_t_18 += __pyx_v_nodeStarOffsets.shape[0];
78695  if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
78696  } else if (unlikely(__pyx_t_18 >= __pyx_v_nodeStarOffsets.shape[0])) __pyx_t_5 = 0;
78697  if (unlikely(__pyx_t_5 != -1)) {
78698  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78699  __PYX_ERR(0, 3449, __pyx_L1_error)
78700  }
78701  __pyx_t_2 = __Pyx_PyInt_From_int((*((int *) ( /* dim=0 */ (__pyx_v_nodeStarOffsets.data + __pyx_t_18 * __pyx_v_nodeStarOffsets.strides[0]) )))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3449, __pyx_L1_error)
78702  __Pyx_GOTREF(__pyx_t_2);
78703 
78704  /* "mbd/CouplingFSI.pyx":3448
78705  * while found_node is False:
78706  * nearest_node0 = nearest_node
78707  * for nOffset in range(nodeStarOffsets[nearest_node0], # <<<<<<<<<<<<<<
78708  * nodeStarOffsets[nearest_node0+1]):
78709  * node = nodeStarArray[nOffset]
78710  */
78711  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3448, __pyx_L1_error)
78712  __Pyx_GOTREF(__pyx_t_3);
78713  __Pyx_GIVEREF(__pyx_t_1);
78714  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
78715  __Pyx_GIVEREF(__pyx_t_2);
78716  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
78717  __pyx_t_1 = 0;
78718  __pyx_t_2 = 0;
78719  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3448, __pyx_L1_error)
78720  __Pyx_GOTREF(__pyx_t_2);
78721  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
78722  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
78723  __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_20 = 0;
78724  __pyx_t_21 = NULL;
78725  } else {
78726  __pyx_t_20 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3448, __pyx_L1_error)
78727  __Pyx_GOTREF(__pyx_t_3);
78728  __pyx_t_21 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 3448, __pyx_L1_error)
78729  }
78730  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
78731  for (;;) {
78732  if (likely(!__pyx_t_21)) {
78733  if (likely(PyList_CheckExact(__pyx_t_3))) {
78734  if (__pyx_t_20 >= PyList_GET_SIZE(__pyx_t_3)) break;
78735  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
78736  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_20); __Pyx_INCREF(__pyx_t_2); __pyx_t_20++; if (unlikely(0 < 0)) __PYX_ERR(0, 3448, __pyx_L1_error)
78737  #else
78738  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3448, __pyx_L1_error)
78739  __Pyx_GOTREF(__pyx_t_2);
78740  #endif
78741  } else {
78742  if (__pyx_t_20 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
78743  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
78744  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_20); __Pyx_INCREF(__pyx_t_2); __pyx_t_20++; if (unlikely(0 < 0)) __PYX_ERR(0, 3448, __pyx_L1_error)
78745  #else
78746  __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3448, __pyx_L1_error)
78747  __Pyx_GOTREF(__pyx_t_2);
78748  #endif
78749  }
78750  } else {
78751  __pyx_t_2 = __pyx_t_21(__pyx_t_3);
78752  if (unlikely(!__pyx_t_2)) {
78753  PyObject* exc_type = PyErr_Occurred();
78754  if (exc_type) {
78755  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
78756  else __PYX_ERR(0, 3448, __pyx_L1_error)
78757  }
78758  break;
78759  }
78760  __Pyx_GOTREF(__pyx_t_2);
78761  }
78762  __Pyx_XDECREF_SET(__pyx_v_nOffset, __pyx_t_2);
78763  __pyx_t_2 = 0;
78764 
78765  /* "mbd/CouplingFSI.pyx":3450
78766  * for nOffset in range(nodeStarOffsets[nearest_node0],
78767  * nodeStarOffsets[nearest_node0+1]):
78768  * node = nodeStarArray[nOffset] # <<<<<<<<<<<<<<
78769  * node_coords = nodeArray[node]
78770  * dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78771  */
78772  __pyx_t_22 = __Pyx_PyIndex_AsSsize_t(__pyx_v_nOffset); if (unlikely((__pyx_t_22 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3450, __pyx_L1_error)
78773  __pyx_t_18 = __pyx_t_22;
78774  __pyx_t_5 = -1;
78775  if (__pyx_t_18 < 0) {
78776  __pyx_t_18 += __pyx_v_nodeStarArray.shape[0];
78777  if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
78778  } else if (unlikely(__pyx_t_18 >= __pyx_v_nodeStarArray.shape[0])) __pyx_t_5 = 0;
78779  if (unlikely(__pyx_t_5 != -1)) {
78780  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78781  __PYX_ERR(0, 3450, __pyx_L1_error)
78782  }
78783  __pyx_v_node = (*((int *) ( /* dim=0 */ (__pyx_v_nodeStarArray.data + __pyx_t_18 * __pyx_v_nodeStarArray.strides[0]) )));
78784 
78785  /* "mbd/CouplingFSI.pyx":3451
78786  * nodeStarOffsets[nearest_node0+1]):
78787  * node = nodeStarArray[nOffset]
78788  * node_coords = nodeArray[node] # <<<<<<<<<<<<<<
78789  * dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78790  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78791  */
78792  __pyx_t_6.data = __pyx_v_nodeArray.data;
78793  __pyx_t_6.memview = __pyx_v_nodeArray.memview;
78794  __PYX_INC_MEMVIEW(&__pyx_t_6, 0);
78795  {
78796  Py_ssize_t __pyx_tmp_idx = __pyx_v_node;
78797  Py_ssize_t __pyx_tmp_shape = __pyx_v_nodeArray.shape[0];
78798  Py_ssize_t __pyx_tmp_stride = __pyx_v_nodeArray.strides[0];
78799  if (__pyx_tmp_idx < 0)
78800  __pyx_tmp_idx += __pyx_tmp_shape;
78801  if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) {
78802  PyErr_SetString(PyExc_IndexError,
78803  "Index out of bounds (axis 0)");
78804  __PYX_ERR(0, 3451, __pyx_L1_error)
78805  }
78806  __pyx_t_6.data += __pyx_tmp_idx * __pyx_tmp_stride;
78807 }
78808 
78809 __pyx_t_6.shape[0] = __pyx_v_nodeArray.shape[1];
78810 __pyx_t_6.strides[0] = __pyx_v_nodeArray.strides[1];
78811  __pyx_t_6.suboffsets[0] = -1;
78812 
78813 __PYX_XDEC_MEMVIEW(&__pyx_v_node_coords, 1);
78814  __pyx_v_node_coords = __pyx_t_6;
78815  __pyx_t_6.memview = NULL;
78816  __pyx_t_6.data = NULL;
78817 
78818  /* "mbd/CouplingFSI.pyx":3452
78819  * node = nodeStarArray[nOffset]
78820  * node_coords = nodeArray[node]
78821  * dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\ # <<<<<<<<<<<<<<
78822  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78823  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78824  */
78825  __pyx_t_18 = 0;
78826  __pyx_t_5 = -1;
78827  if (__pyx_t_18 < 0) {
78828  __pyx_t_18 += __pyx_v_node_coords.shape[0];
78829  if (unlikely(__pyx_t_18 < 0)) __pyx_t_5 = 0;
78830  } else if (unlikely(__pyx_t_18 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78831  if (unlikely(__pyx_t_5 != -1)) {
78832  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78833  __PYX_ERR(0, 3452, __pyx_L1_error)
78834  }
78835  __pyx_t_17 = 0;
78836  __pyx_t_5 = -1;
78837  if (__pyx_t_17 < 0) {
78838  __pyx_t_17 += __pyx_v_coords.shape[0];
78839  if (unlikely(__pyx_t_17 < 0)) __pyx_t_5 = 0;
78840  } else if (unlikely(__pyx_t_17 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78841  if (unlikely(__pyx_t_5 != -1)) {
78842  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78843  __PYX_ERR(0, 3452, __pyx_L1_error)
78844  }
78845  __pyx_t_16 = 0;
78846  __pyx_t_5 = -1;
78847  if (__pyx_t_16 < 0) {
78848  __pyx_t_16 += __pyx_v_node_coords.shape[0];
78849  if (unlikely(__pyx_t_16 < 0)) __pyx_t_5 = 0;
78850  } else if (unlikely(__pyx_t_16 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78851  if (unlikely(__pyx_t_5 != -1)) {
78852  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78853  __PYX_ERR(0, 3452, __pyx_L1_error)
78854  }
78855  __pyx_t_15 = 0;
78856  __pyx_t_5 = -1;
78857  if (__pyx_t_15 < 0) {
78858  __pyx_t_15 += __pyx_v_coords.shape[0];
78859  if (unlikely(__pyx_t_15 < 0)) __pyx_t_5 = 0;
78860  } else if (unlikely(__pyx_t_15 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78861  if (unlikely(__pyx_t_5 != -1)) {
78862  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78863  __PYX_ERR(0, 3452, __pyx_L1_error)
78864  }
78865 
78866  /* "mbd/CouplingFSI.pyx":3453
78867  * node_coords = nodeArray[node]
78868  * dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78869  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\ # <<<<<<<<<<<<<<
78870  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78871  * if dist < min_dist:
78872  */
78873  __pyx_t_14 = 1;
78874  __pyx_t_5 = -1;
78875  if (__pyx_t_14 < 0) {
78876  __pyx_t_14 += __pyx_v_node_coords.shape[0];
78877  if (unlikely(__pyx_t_14 < 0)) __pyx_t_5 = 0;
78878  } else if (unlikely(__pyx_t_14 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78879  if (unlikely(__pyx_t_5 != -1)) {
78880  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78881  __PYX_ERR(0, 3453, __pyx_L1_error)
78882  }
78883  __pyx_t_13 = 1;
78884  __pyx_t_5 = -1;
78885  if (__pyx_t_13 < 0) {
78886  __pyx_t_13 += __pyx_v_coords.shape[0];
78887  if (unlikely(__pyx_t_13 < 0)) __pyx_t_5 = 0;
78888  } else if (unlikely(__pyx_t_13 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78889  if (unlikely(__pyx_t_5 != -1)) {
78890  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78891  __PYX_ERR(0, 3453, __pyx_L1_error)
78892  }
78893  __pyx_t_12 = 1;
78894  __pyx_t_5 = -1;
78895  if (__pyx_t_12 < 0) {
78896  __pyx_t_12 += __pyx_v_node_coords.shape[0];
78897  if (unlikely(__pyx_t_12 < 0)) __pyx_t_5 = 0;
78898  } else if (unlikely(__pyx_t_12 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78899  if (unlikely(__pyx_t_5 != -1)) {
78900  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78901  __PYX_ERR(0, 3453, __pyx_L1_error)
78902  }
78903  __pyx_t_11 = 1;
78904  __pyx_t_5 = -1;
78905  if (__pyx_t_11 < 0) {
78906  __pyx_t_11 += __pyx_v_coords.shape[0];
78907  if (unlikely(__pyx_t_11 < 0)) __pyx_t_5 = 0;
78908  } else if (unlikely(__pyx_t_11 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78909  if (unlikely(__pyx_t_5 != -1)) {
78910  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78911  __PYX_ERR(0, 3453, __pyx_L1_error)
78912  }
78913 
78914  /* "mbd/CouplingFSI.pyx":3454
78915  * dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78916  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78917  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2]) # <<<<<<<<<<<<<<
78918  * if dist < min_dist:
78919  * min_dist = dist
78920  */
78921  __pyx_t_10 = 2;
78922  __pyx_t_5 = -1;
78923  if (__pyx_t_10 < 0) {
78924  __pyx_t_10 += __pyx_v_node_coords.shape[0];
78925  if (unlikely(__pyx_t_10 < 0)) __pyx_t_5 = 0;
78926  } else if (unlikely(__pyx_t_10 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78927  if (unlikely(__pyx_t_5 != -1)) {
78928  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78929  __PYX_ERR(0, 3454, __pyx_L1_error)
78930  }
78931  __pyx_t_9 = 2;
78932  __pyx_t_5 = -1;
78933  if (__pyx_t_9 < 0) {
78934  __pyx_t_9 += __pyx_v_coords.shape[0];
78935  if (unlikely(__pyx_t_9 < 0)) __pyx_t_5 = 0;
78936  } else if (unlikely(__pyx_t_9 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78937  if (unlikely(__pyx_t_5 != -1)) {
78938  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78939  __PYX_ERR(0, 3454, __pyx_L1_error)
78940  }
78941  __pyx_t_8 = 2;
78942  __pyx_t_5 = -1;
78943  if (__pyx_t_8 < 0) {
78944  __pyx_t_8 += __pyx_v_node_coords.shape[0];
78945  if (unlikely(__pyx_t_8 < 0)) __pyx_t_5 = 0;
78946  } else if (unlikely(__pyx_t_8 >= __pyx_v_node_coords.shape[0])) __pyx_t_5 = 0;
78947  if (unlikely(__pyx_t_5 != -1)) {
78948  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78949  __PYX_ERR(0, 3454, __pyx_L1_error)
78950  }
78951  __pyx_t_7 = 2;
78952  __pyx_t_5 = -1;
78953  if (__pyx_t_7 < 0) {
78954  __pyx_t_7 += __pyx_v_coords.shape[0];
78955  if (unlikely(__pyx_t_7 < 0)) __pyx_t_5 = 0;
78956  } else if (unlikely(__pyx_t_7 >= __pyx_v_coords.shape[0])) __pyx_t_5 = 0;
78957  if (unlikely(__pyx_t_5 != -1)) {
78958  __Pyx_RaiseBufferIndexError(__pyx_t_5);
78959  __PYX_ERR(0, 3454, __pyx_L1_error)
78960  }
78961 
78962  /* "mbd/CouplingFSI.pyx":3453
78963  * node_coords = nodeArray[node]
78964  * dist = (node_coords[0]-coords[0])*(node_coords[0]-coords[0])+\
78965  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\ # <<<<<<<<<<<<<<
78966  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78967  * if dist < min_dist:
78968  */
78969  __pyx_v_dist = (((((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_18 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_17 * __pyx_v_coords.strides[0]) )))) * ((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_16 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_15 * __pyx_v_coords.strides[0]) ))))) + (((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_14 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_13 * __pyx_v_coords.strides[0]) )))) * ((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_12 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_11 * __pyx_v_coords.strides[0]) )))))) + (((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_10 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_9 * __pyx_v_coords.strides[0]) )))) * ((*((double *) ( /* dim=0 */ (__pyx_v_node_coords.data + __pyx_t_8 * __pyx_v_node_coords.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_coords.data + __pyx_t_7 * __pyx_v_coords.strides[0]) ))))));
78970 
78971  /* "mbd/CouplingFSI.pyx":3455
78972  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
78973  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78974  * if dist < min_dist: # <<<<<<<<<<<<<<
78975  * min_dist = dist
78976  * nearest_node = node
78977  */
78978  __pyx_t_19 = ((__pyx_v_dist < __pyx_v_min_dist) != 0);
78979  if (__pyx_t_19) {
78980 
78981  /* "mbd/CouplingFSI.pyx":3456
78982  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
78983  * if dist < min_dist:
78984  * min_dist = dist # <<<<<<<<<<<<<<
78985  * nearest_node = node
78986  * if nearest_node0 == nearest_node:
78987  */
78988  __pyx_v_min_dist = __pyx_v_dist;
78989 
78990  /* "mbd/CouplingFSI.pyx":3457
78991  * if dist < min_dist:
78992  * min_dist = dist
78993  * nearest_node = node # <<<<<<<<<<<<<<
78994  * if nearest_node0 == nearest_node:
78995  * found_node = True
78996  */
78997  __pyx_v_nearest_node = __pyx_v_node;
78998 
78999  /* "mbd/CouplingFSI.pyx":3455
79000  * (node_coords[1]-coords[1])*(node_coords[1]-coords[1])+\
79001  * (node_coords[2]-coords[2])*(node_coords[2]-coords[2])
79002  * if dist < min_dist: # <<<<<<<<<<<<<<
79003  * min_dist = dist
79004  * nearest_node = node
79005  */
79006  }
79007 
79008  /* "mbd/CouplingFSI.pyx":3448
79009  * while found_node is False:
79010  * nearest_node0 = nearest_node
79011  * for nOffset in range(nodeStarOffsets[nearest_node0], # <<<<<<<<<<<<<<
79012  * nodeStarOffsets[nearest_node0+1]):
79013  * node = nodeStarArray[nOffset]
79014  */
79015  }
79016  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79017 
79018  /* "mbd/CouplingFSI.pyx":3458
79019  * min_dist = dist
79020  * nearest_node = node
79021  * if nearest_node0 == nearest_node: # <<<<<<<<<<<<<<
79022  * found_node = True
79023  * return nearest_node, dist
79024  */
79025  __pyx_t_19 = ((__pyx_v_nearest_node0 == __pyx_v_nearest_node) != 0);
79026  if (__pyx_t_19) {
79027 
79028  /* "mbd/CouplingFSI.pyx":3459
79029  * nearest_node = node
79030  * if nearest_node0 == nearest_node:
79031  * found_node = True # <<<<<<<<<<<<<<
79032  * return nearest_node, dist
79033  *
79034  */
79035  __pyx_v_found_node = 1;
79036 
79037  /* "mbd/CouplingFSI.pyx":3458
79038  * min_dist = dist
79039  * nearest_node = node
79040  * if nearest_node0 == nearest_node: # <<<<<<<<<<<<<<
79041  * found_node = True
79042  * return nearest_node, dist
79043  */
79044  }
79045  }
79046 
79047  /* "mbd/CouplingFSI.pyx":3460
79048  * if nearest_node0 == nearest_node:
79049  * found_node = True
79050  * return nearest_node, dist # <<<<<<<<<<<<<<
79051  *
79052  *
79053  */
79054  __Pyx_XDECREF(__pyx_r);
79055  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_nearest_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3460, __pyx_L1_error)
79056  __Pyx_GOTREF(__pyx_t_3);
79057  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_dist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3460, __pyx_L1_error)
79058  __Pyx_GOTREF(__pyx_t_2);
79059  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error)
79060  __Pyx_GOTREF(__pyx_t_1);
79061  __Pyx_GIVEREF(__pyx_t_3);
79062  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
79063  __Pyx_GIVEREF(__pyx_t_2);
79064  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
79065  __pyx_t_3 = 0;
79066  __pyx_t_2 = 0;
79067  __pyx_r = __pyx_t_1;
79068  __pyx_t_1 = 0;
79069  goto __pyx_L0;
79070 
79071  /* "mbd/CouplingFSI.pyx":3405
79072  * return node, distance
79073  *
79074  * cdef pyxGetLocalNearestNode(double[:] coords, # <<<<<<<<<<<<<<
79075  * double[:,:] nodeArray,
79076  * int[:] nodeStarOffsets,
79077  */
79078 
79079  /* function exit code */
79080  __pyx_L1_error:;
79081  __Pyx_XDECREF(__pyx_t_1);
79082  __Pyx_XDECREF(__pyx_t_2);
79083  __Pyx_XDECREF(__pyx_t_3);
79084  __Pyx_XDECREF(__pyx_t_4);
79085  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
79086  __Pyx_AddTraceback("mbd.CouplingFSI.pyxGetLocalNearestNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
79087  __pyx_r = 0;
79088  __pyx_L0:;
79089  __PYX_XDEC_MEMVIEW(&__pyx_v_node_coords, 1);
79090  __Pyx_XDECREF(__pyx_v_nOffset);
79091  __Pyx_XGIVEREF(__pyx_r);
79092  __Pyx_TraceReturn(__pyx_r, 0);
79093  __Pyx_RefNannyFinishContext();
79094  return __pyx_r;
79095 }
79096 
79097 /* "mbd/CouplingFSI.pyx":3463
79098  *
79099  *
79100  * def getLocalElement(femSpace, coords, node): # <<<<<<<<<<<<<<
79101  * """Given coordinates and its nearest node, determine if it is on a
79102  * local element.
79103  */
79104 
79105 /* Python wrapper */
79106 static PyObject *__pyx_pw_3mbd_11CouplingFSI_3getLocalElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
79107 static char __pyx_doc_3mbd_11CouplingFSI_2getLocalElement[] = "getLocalElement(femSpace, coords, node)\nGiven coordinates and its nearest node, determine if it is on a\n local element.\n\n Parameters\n ----------\n femSpace: object\n finite element space\n coords: array_like\n coordinates from which to element\n node: int\n nearest node index\n\n Returns\n -------\n eN: int or None\n local index of element (None if not found)\n ";
79108 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_3getLocalElement = {"getLocalElement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_3getLocalElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_2getLocalElement};
79109 static PyObject *__pyx_pw_3mbd_11CouplingFSI_3getLocalElement(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
79110  PyObject *__pyx_v_femSpace = 0;
79111  PyObject *__pyx_v_coords = 0;
79112  PyObject *__pyx_v_node = 0;
79113  int __pyx_lineno = 0;
79114  const char *__pyx_filename = NULL;
79115  int __pyx_clineno = 0;
79116  PyObject *__pyx_r = 0;
79117  __Pyx_RefNannyDeclarations
79118  __Pyx_RefNannySetupContext("getLocalElement (wrapper)", 0);
79119  {
79120  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_femSpace,&__pyx_n_s_coords,&__pyx_n_s_node,0};
79121  PyObject* values[3] = {0,0,0};
79122  if (unlikely(__pyx_kwds)) {
79123  Py_ssize_t kw_args;
79124  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
79125  switch (pos_args) {
79126  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
79127  CYTHON_FALLTHROUGH;
79128  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
79129  CYTHON_FALLTHROUGH;
79130  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
79131  CYTHON_FALLTHROUGH;
79132  case 0: break;
79133  default: goto __pyx_L5_argtuple_error;
79134  }
79135  kw_args = PyDict_Size(__pyx_kwds);
79136  switch (pos_args) {
79137  case 0:
79138  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_femSpace)) != 0)) kw_args--;
79139  else goto __pyx_L5_argtuple_error;
79140  CYTHON_FALLTHROUGH;
79141  case 1:
79142  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_coords)) != 0)) kw_args--;
79143  else {
79144  __Pyx_RaiseArgtupleInvalid("getLocalElement", 1, 3, 3, 1); __PYX_ERR(0, 3463, __pyx_L3_error)
79145  }
79146  CYTHON_FALLTHROUGH;
79147  case 2:
79148  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
79149  else {
79150  __Pyx_RaiseArgtupleInvalid("getLocalElement", 1, 3, 3, 2); __PYX_ERR(0, 3463, __pyx_L3_error)
79151  }
79152  }
79153  if (unlikely(kw_args > 0)) {
79154  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getLocalElement") < 0)) __PYX_ERR(0, 3463, __pyx_L3_error)
79155  }
79156  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
79157  goto __pyx_L5_argtuple_error;
79158  } else {
79159  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
79160  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
79161  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
79162  }
79163  __pyx_v_femSpace = values[0];
79164  __pyx_v_coords = values[1];
79165  __pyx_v_node = values[2];
79166  }
79167  goto __pyx_L4_argument_unpacking_done;
79168  __pyx_L5_argtuple_error:;
79169  __Pyx_RaiseArgtupleInvalid("getLocalElement", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3463, __pyx_L3_error)
79170  __pyx_L3_error:;
79171  __Pyx_AddTraceback("mbd.CouplingFSI.getLocalElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
79172  __Pyx_RefNannyFinishContext();
79173  return NULL;
79174  __pyx_L4_argument_unpacking_done:;
79175  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_2getLocalElement(__pyx_self, __pyx_v_femSpace, __pyx_v_coords, __pyx_v_node);
79176 
79177  /* function exit code */
79178  __Pyx_RefNannyFinishContext();
79179  return __pyx_r;
79180 }
79181 
79182 static PyObject *__pyx_pf_3mbd_11CouplingFSI_2getLocalElement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_femSpace, PyObject *__pyx_v_coords, PyObject *__pyx_v_node) {
79183  PyObject *__pyx_v_patchBoundaryNodes = NULL;
79184  PyObject *__pyx_v_checkedElements = NULL;
79185  PyObject *__pyx_v_eOffset = NULL;
79186  PyObject *__pyx_v_eN = NULL;
79187  PyObject *__pyx_v_xi = NULL;
79188  PyObject *__pyx_r = NULL;
79189  __Pyx_TraceDeclarations
79190  __Pyx_RefNannyDeclarations
79191  PyObject *__pyx_t_1 = NULL;
79192  PyObject *__pyx_t_2 = NULL;
79193  PyObject *__pyx_t_3 = NULL;
79194  Py_ssize_t __pyx_t_4;
79195  int __pyx_t_5;
79196  PyObject *__pyx_t_6 = NULL;
79197  PyObject *(*__pyx_t_7)(PyObject *);
79198  int __pyx_t_8;
79199  int __pyx_t_9;
79200  PyObject *__pyx_t_10 = NULL;
79201  Py_ssize_t __pyx_t_11;
79202  int __pyx_t_12;
79203  Py_ssize_t __pyx_t_13;
79204  int __pyx_t_14;
79205  PyObject *__pyx_t_15 = NULL;
79206  int __pyx_lineno = 0;
79207  const char *__pyx_filename = NULL;
79208  int __pyx_clineno = 0;
79209  __Pyx_TraceFrameInit(__pyx_codeobj__199)
79210  __Pyx_RefNannySetupContext("getLocalElement", 0);
79211  __Pyx_TraceCall("getLocalElement", __pyx_f[0], 3463, 0, __PYX_ERR(0, 3463, __pyx_L1_error));
79212  __Pyx_INCREF(__pyx_v_node);
79213 
79214  /* "mbd/CouplingFSI.pyx":3481
79215  * local index of element (None if not found)
79216  * """
79217  * patchBoundaryNodes=set() # <<<<<<<<<<<<<<
79218  * checkedElements=[]
79219  * # nodeElementOffsets give the indices to get the elements sharing the node
79220  */
79221  __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3481, __pyx_L1_error)
79222  __Pyx_GOTREF(__pyx_t_1);
79223  __pyx_v_patchBoundaryNodes = ((PyObject*)__pyx_t_1);
79224  __pyx_t_1 = 0;
79225 
79226  /* "mbd/CouplingFSI.pyx":3482
79227  * """
79228  * patchBoundaryNodes=set()
79229  * checkedElements=[] # <<<<<<<<<<<<<<
79230  * # nodeElementOffsets give the indices to get the elements sharing the node
79231  * #log Profiling.logEvent("Getting Local Element")
79232  */
79233  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3482, __pyx_L1_error)
79234  __Pyx_GOTREF(__pyx_t_1);
79235  __pyx_v_checkedElements = ((PyObject*)__pyx_t_1);
79236  __pyx_t_1 = 0;
79237 
79238  /* "mbd/CouplingFSI.pyx":3485
79239  * # nodeElementOffsets give the indices to get the elements sharing the node
79240  * #log Profiling.logEvent("Getting Local Element")
79241  * if node+1 < len(femSpace.mesh.nodeElementOffsets): # <<<<<<<<<<<<<<
79242  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
79243  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79244  */
79245  __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_node, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3485, __pyx_L1_error)
79246  __Pyx_GOTREF(__pyx_t_1);
79247  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3485, __pyx_L1_error)
79248  __Pyx_GOTREF(__pyx_t_2);
79249  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3485, __pyx_L1_error)
79250  __Pyx_GOTREF(__pyx_t_3);
79251  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79252  __pyx_t_4 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3485, __pyx_L1_error)
79253  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79254  __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3485, __pyx_L1_error)
79255  __Pyx_GOTREF(__pyx_t_3);
79256  __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3485, __pyx_L1_error)
79257  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79258  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79259  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3485, __pyx_L1_error)
79260  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79261  if (__pyx_t_5) {
79262 
79263  /* "mbd/CouplingFSI.pyx":3486
79264  * #log Profiling.logEvent("Getting Local Element")
79265  * if node+1 < len(femSpace.mesh.nodeElementOffsets):
79266  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]): # <<<<<<<<<<<<<<
79267  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79268  * checkedElements.append(eN)
79269  */
79270  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3486, __pyx_L1_error)
79271  __Pyx_GOTREF(__pyx_t_2);
79272  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
79273  __Pyx_GOTREF(__pyx_t_3);
79274  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79275  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3486, __pyx_L1_error)
79276  __Pyx_GOTREF(__pyx_t_2);
79277  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79278  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
79279  __Pyx_GOTREF(__pyx_t_3);
79280  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3486, __pyx_L1_error)
79281  __Pyx_GOTREF(__pyx_t_1);
79282  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79283  __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_node, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
79284  __Pyx_GOTREF(__pyx_t_3);
79285  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3486, __pyx_L1_error)
79286  __Pyx_GOTREF(__pyx_t_6);
79287  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79288  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79289  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
79290  __Pyx_GOTREF(__pyx_t_3);
79291  __Pyx_GIVEREF(__pyx_t_2);
79292  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
79293  __Pyx_GIVEREF(__pyx_t_6);
79294  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
79295  __pyx_t_2 = 0;
79296  __pyx_t_6 = 0;
79297  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3486, __pyx_L1_error)
79298  __Pyx_GOTREF(__pyx_t_6);
79299  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79300  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
79301  __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
79302  __pyx_t_7 = NULL;
79303  } else {
79304  __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3486, __pyx_L1_error)
79305  __Pyx_GOTREF(__pyx_t_3);
79306  __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3486, __pyx_L1_error)
79307  }
79308  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79309  for (;;) {
79310  if (likely(!__pyx_t_7)) {
79311  if (likely(PyList_CheckExact(__pyx_t_3))) {
79312  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
79313  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
79314  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3486, __pyx_L1_error)
79315  #else
79316  __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3486, __pyx_L1_error)
79317  __Pyx_GOTREF(__pyx_t_6);
79318  #endif
79319  } else {
79320  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
79321  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
79322  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3486, __pyx_L1_error)
79323  #else
79324  __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3486, __pyx_L1_error)
79325  __Pyx_GOTREF(__pyx_t_6);
79326  #endif
79327  }
79328  } else {
79329  __pyx_t_6 = __pyx_t_7(__pyx_t_3);
79330  if (unlikely(!__pyx_t_6)) {
79331  PyObject* exc_type = PyErr_Occurred();
79332  if (exc_type) {
79333  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
79334  else __PYX_ERR(0, 3486, __pyx_L1_error)
79335  }
79336  break;
79337  }
79338  __Pyx_GOTREF(__pyx_t_6);
79339  }
79340  __Pyx_XDECREF_SET(__pyx_v_eOffset, __pyx_t_6);
79341  __pyx_t_6 = 0;
79342 
79343  /* "mbd/CouplingFSI.pyx":3487
79344  * if node+1 < len(femSpace.mesh.nodeElementOffsets):
79345  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
79346  * eN = femSpace.mesh.nodeElementsArray[eOffset] # <<<<<<<<<<<<<<
79347  * checkedElements.append(eN)
79348  * # union of set
79349  */
79350  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3487, __pyx_L1_error)
79351  __Pyx_GOTREF(__pyx_t_6);
79352  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nodeElementsArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3487, __pyx_L1_error)
79353  __Pyx_GOTREF(__pyx_t_2);
79354  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79355  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_eOffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3487, __pyx_L1_error)
79356  __Pyx_GOTREF(__pyx_t_6);
79357  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79358  __Pyx_XDECREF_SET(__pyx_v_eN, __pyx_t_6);
79359  __pyx_t_6 = 0;
79360 
79361  /* "mbd/CouplingFSI.pyx":3488
79362  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
79363  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79364  * checkedElements.append(eN) # <<<<<<<<<<<<<<
79365  * # union of set
79366  * patchBoundaryNodes|=set(femSpace.mesh.elementNodesArray[eN])
79367  */
79368  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_checkedElements, __pyx_v_eN); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3488, __pyx_L1_error)
79369 
79370  /* "mbd/CouplingFSI.pyx":3490
79371  * checkedElements.append(eN)
79372  * # union of set
79373  * patchBoundaryNodes|=set(femSpace.mesh.elementNodesArray[eN]) # <<<<<<<<<<<<<<
79374  * # evaluate the inverse map for element eN (global to local)
79375  * xi = femSpace.elementMaps.getInverseValue(eN, coords)
79376  */
79377  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3490, __pyx_L1_error)
79378  __Pyx_GOTREF(__pyx_t_6);
79379  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3490, __pyx_L1_error)
79380  __Pyx_GOTREF(__pyx_t_2);
79381  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79382  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_eN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3490, __pyx_L1_error)
79383  __Pyx_GOTREF(__pyx_t_6);
79384  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79385  __pyx_t_2 = PySet_New(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3490, __pyx_L1_error)
79386  __Pyx_GOTREF(__pyx_t_2);
79387  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79388  __pyx_t_6 = PyNumber_InPlaceOr(__pyx_v_patchBoundaryNodes, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3490, __pyx_L1_error)
79389  __Pyx_GOTREF(__pyx_t_6);
79390  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79391  __Pyx_DECREF_SET(__pyx_v_patchBoundaryNodes, ((PyObject*)__pyx_t_6));
79392  __pyx_t_6 = 0;
79393 
79394  /* "mbd/CouplingFSI.pyx":3492
79395  * patchBoundaryNodes|=set(femSpace.mesh.elementNodesArray[eN])
79396  * # evaluate the inverse map for element eN (global to local)
79397  * xi = femSpace.elementMaps.getInverseValue(eN, coords) # <<<<<<<<<<<<<<
79398  * #J = femSpace.elementMaps.getJacobianValues(eN, )
79399  * # query whether xi lies within the reference element
79400  */
79401  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3492, __pyx_L1_error)
79402  __Pyx_GOTREF(__pyx_t_2);
79403  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getInverseValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3492, __pyx_L1_error)
79404  __Pyx_GOTREF(__pyx_t_1);
79405  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79406  __pyx_t_2 = NULL;
79407  __pyx_t_9 = 0;
79408  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
79409  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
79410  if (likely(__pyx_t_2)) {
79411  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
79412  __Pyx_INCREF(__pyx_t_2);
79413  __Pyx_INCREF(function);
79414  __Pyx_DECREF_SET(__pyx_t_1, function);
79415  __pyx_t_9 = 1;
79416  }
79417  }
79418  #if CYTHON_FAST_PYCALL
79419  if (PyFunction_Check(__pyx_t_1)) {
79420  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_eN, __pyx_v_coords};
79421  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3492, __pyx_L1_error)
79422  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
79423  __Pyx_GOTREF(__pyx_t_6);
79424  } else
79425  #endif
79426  #if CYTHON_FAST_PYCCALL
79427  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
79428  PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_eN, __pyx_v_coords};
79429  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3492, __pyx_L1_error)
79430  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
79431  __Pyx_GOTREF(__pyx_t_6);
79432  } else
79433  #endif
79434  {
79435  __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3492, __pyx_L1_error)
79436  __Pyx_GOTREF(__pyx_t_10);
79437  if (__pyx_t_2) {
79438  __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_2); __pyx_t_2 = NULL;
79439  }
79440  __Pyx_INCREF(__pyx_v_eN);
79441  __Pyx_GIVEREF(__pyx_v_eN);
79442  PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_eN);
79443  __Pyx_INCREF(__pyx_v_coords);
79444  __Pyx_GIVEREF(__pyx_v_coords);
79445  PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_coords);
79446  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3492, __pyx_L1_error)
79447  __Pyx_GOTREF(__pyx_t_6);
79448  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79449  }
79450  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79451  __Pyx_XDECREF_SET(__pyx_v_xi, __pyx_t_6);
79452  __pyx_t_6 = 0;
79453 
79454  /* "mbd/CouplingFSI.pyx":3495
79455  * #J = femSpace.elementMaps.getJacobianValues(eN, )
79456  * # query whether xi lies within the reference element
79457  * if femSpace.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
79458  * return eN
79459  * else:
79460  */
79461  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3495, __pyx_L1_error)
79462  __Pyx_GOTREF(__pyx_t_1);
79463  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_referenceElement); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3495, __pyx_L1_error)
79464  __Pyx_GOTREF(__pyx_t_10);
79465  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79466  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_onElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3495, __pyx_L1_error)
79467  __Pyx_GOTREF(__pyx_t_1);
79468  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79469  __pyx_t_10 = NULL;
79470  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
79471  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
79472  if (likely(__pyx_t_10)) {
79473  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
79474  __Pyx_INCREF(__pyx_t_10);
79475  __Pyx_INCREF(function);
79476  __Pyx_DECREF_SET(__pyx_t_1, function);
79477  }
79478  }
79479  __pyx_t_6 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_10, __pyx_v_xi) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_xi);
79480  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
79481  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3495, __pyx_L1_error)
79482  __Pyx_GOTREF(__pyx_t_6);
79483  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79484  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3495, __pyx_L1_error)
79485  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79486  if (__pyx_t_5) {
79487 
79488  /* "mbd/CouplingFSI.pyx":3496
79489  * # query whether xi lies within the reference element
79490  * if femSpace.elementMaps.referenceElement.onElement(xi):
79491  * return eN # <<<<<<<<<<<<<<
79492  * else:
79493  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node]):
79494  */
79495  __Pyx_XDECREF(__pyx_r);
79496  __Pyx_INCREF(__pyx_v_eN);
79497  __pyx_r = __pyx_v_eN;
79498  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79499  goto __pyx_L0;
79500 
79501  /* "mbd/CouplingFSI.pyx":3495
79502  * #J = femSpace.elementMaps.getJacobianValues(eN, )
79503  * # query whether xi lies within the reference element
79504  * if femSpace.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
79505  * return eN
79506  * else:
79507  */
79508  }
79509 
79510  /* "mbd/CouplingFSI.pyx":3486
79511  * #log Profiling.logEvent("Getting Local Element")
79512  * if node+1 < len(femSpace.mesh.nodeElementOffsets):
79513  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]): # <<<<<<<<<<<<<<
79514  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79515  * checkedElements.append(eN)
79516  */
79517  }
79518  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79519 
79520  /* "mbd/CouplingFSI.pyx":3485
79521  * # nodeElementOffsets give the indices to get the elements sharing the node
79522  * #log Profiling.logEvent("Getting Local Element")
79523  * if node+1 < len(femSpace.mesh.nodeElementOffsets): # <<<<<<<<<<<<<<
79524  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
79525  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79526  */
79527  goto __pyx_L3;
79528  }
79529 
79530  /* "mbd/CouplingFSI.pyx":3498
79531  * return eN
79532  * else:
79533  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node]): # <<<<<<<<<<<<<<
79534  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79535  * checkedElements.append(eN)
79536  */
79537  /*else*/ {
79538  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3498, __pyx_L1_error)
79539  __Pyx_GOTREF(__pyx_t_3);
79540  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3498, __pyx_L1_error)
79541  __Pyx_GOTREF(__pyx_t_6);
79542  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79543  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3498, __pyx_L1_error)
79544  __Pyx_GOTREF(__pyx_t_3);
79545  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79546  __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3498, __pyx_L1_error)
79547  __Pyx_GOTREF(__pyx_t_6);
79548  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79549  if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
79550  __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
79551  __pyx_t_7 = NULL;
79552  } else {
79553  __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3498, __pyx_L1_error)
79554  __Pyx_GOTREF(__pyx_t_3);
79555  __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3498, __pyx_L1_error)
79556  }
79557  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79558  for (;;) {
79559  if (likely(!__pyx_t_7)) {
79560  if (likely(PyList_CheckExact(__pyx_t_3))) {
79561  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
79562  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
79563  __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3498, __pyx_L1_error)
79564  #else
79565  __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3498, __pyx_L1_error)
79566  __Pyx_GOTREF(__pyx_t_6);
79567  #endif
79568  } else {
79569  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
79570  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
79571  __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 3498, __pyx_L1_error)
79572  #else
79573  __pyx_t_6 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3498, __pyx_L1_error)
79574  __Pyx_GOTREF(__pyx_t_6);
79575  #endif
79576  }
79577  } else {
79578  __pyx_t_6 = __pyx_t_7(__pyx_t_3);
79579  if (unlikely(!__pyx_t_6)) {
79580  PyObject* exc_type = PyErr_Occurred();
79581  if (exc_type) {
79582  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
79583  else __PYX_ERR(0, 3498, __pyx_L1_error)
79584  }
79585  break;
79586  }
79587  __Pyx_GOTREF(__pyx_t_6);
79588  }
79589  __Pyx_XDECREF_SET(__pyx_v_eOffset, __pyx_t_6);
79590  __pyx_t_6 = 0;
79591 
79592  /* "mbd/CouplingFSI.pyx":3499
79593  * else:
79594  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node]):
79595  * eN = femSpace.mesh.nodeElementsArray[eOffset] # <<<<<<<<<<<<<<
79596  * checkedElements.append(eN)
79597  * # union of set
79598  */
79599  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3499, __pyx_L1_error)
79600  __Pyx_GOTREF(__pyx_t_6);
79601  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nodeElementsArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3499, __pyx_L1_error)
79602  __Pyx_GOTREF(__pyx_t_1);
79603  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79604  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_eOffset); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3499, __pyx_L1_error)
79605  __Pyx_GOTREF(__pyx_t_6);
79606  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79607  __Pyx_XDECREF_SET(__pyx_v_eN, __pyx_t_6);
79608  __pyx_t_6 = 0;
79609 
79610  /* "mbd/CouplingFSI.pyx":3500
79611  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node]):
79612  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79613  * checkedElements.append(eN) # <<<<<<<<<<<<<<
79614  * # union of set
79615  * patchBoundaryNodes|=set(femSpace.mesh.elementNodesArray[eN])
79616  */
79617  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_checkedElements, __pyx_v_eN); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3500, __pyx_L1_error)
79618 
79619  /* "mbd/CouplingFSI.pyx":3502
79620  * checkedElements.append(eN)
79621  * # union of set
79622  * patchBoundaryNodes|=set(femSpace.mesh.elementNodesArray[eN]) # <<<<<<<<<<<<<<
79623  * # evaluate the inverse map for element eN (global to local)
79624  * xi = femSpace.elementMaps.getInverseValue(eN, coords)
79625  */
79626  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3502, __pyx_L1_error)
79627  __Pyx_GOTREF(__pyx_t_6);
79628  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3502, __pyx_L1_error)
79629  __Pyx_GOTREF(__pyx_t_1);
79630  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79631  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_eN); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3502, __pyx_L1_error)
79632  __Pyx_GOTREF(__pyx_t_6);
79633  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79634  __pyx_t_1 = PySet_New(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3502, __pyx_L1_error)
79635  __Pyx_GOTREF(__pyx_t_1);
79636  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79637  __pyx_t_6 = PyNumber_InPlaceOr(__pyx_v_patchBoundaryNodes, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3502, __pyx_L1_error)
79638  __Pyx_GOTREF(__pyx_t_6);
79639  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79640  __Pyx_DECREF_SET(__pyx_v_patchBoundaryNodes, ((PyObject*)__pyx_t_6));
79641  __pyx_t_6 = 0;
79642 
79643  /* "mbd/CouplingFSI.pyx":3504
79644  * patchBoundaryNodes|=set(femSpace.mesh.elementNodesArray[eN])
79645  * # evaluate the inverse map for element eN (global to local)
79646  * xi = femSpace.elementMaps.getInverseValue(eN, coords) # <<<<<<<<<<<<<<
79647  * #J = femSpace.elementMaps.getJacobianValues(eN, )
79648  * # query whether xi lies within the reference element
79649  */
79650  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3504, __pyx_L1_error)
79651  __Pyx_GOTREF(__pyx_t_1);
79652  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getInverseValue); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3504, __pyx_L1_error)
79653  __Pyx_GOTREF(__pyx_t_10);
79654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79655  __pyx_t_1 = NULL;
79656  __pyx_t_9 = 0;
79657  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
79658  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
79659  if (likely(__pyx_t_1)) {
79660  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
79661  __Pyx_INCREF(__pyx_t_1);
79662  __Pyx_INCREF(function);
79663  __Pyx_DECREF_SET(__pyx_t_10, function);
79664  __pyx_t_9 = 1;
79665  }
79666  }
79667  #if CYTHON_FAST_PYCALL
79668  if (PyFunction_Check(__pyx_t_10)) {
79669  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_eN, __pyx_v_coords};
79670  __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3504, __pyx_L1_error)
79671  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
79672  __Pyx_GOTREF(__pyx_t_6);
79673  } else
79674  #endif
79675  #if CYTHON_FAST_PYCCALL
79676  if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
79677  PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_eN, __pyx_v_coords};
79678  __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3504, __pyx_L1_error)
79679  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
79680  __Pyx_GOTREF(__pyx_t_6);
79681  } else
79682  #endif
79683  {
79684  __pyx_t_2 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3504, __pyx_L1_error)
79685  __Pyx_GOTREF(__pyx_t_2);
79686  if (__pyx_t_1) {
79687  __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
79688  }
79689  __Pyx_INCREF(__pyx_v_eN);
79690  __Pyx_GIVEREF(__pyx_v_eN);
79691  PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_9, __pyx_v_eN);
79692  __Pyx_INCREF(__pyx_v_coords);
79693  __Pyx_GIVEREF(__pyx_v_coords);
79694  PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_9, __pyx_v_coords);
79695  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3504, __pyx_L1_error)
79696  __Pyx_GOTREF(__pyx_t_6);
79697  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79698  }
79699  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79700  __Pyx_XDECREF_SET(__pyx_v_xi, __pyx_t_6);
79701  __pyx_t_6 = 0;
79702 
79703  /* "mbd/CouplingFSI.pyx":3507
79704  * #J = femSpace.elementMaps.getJacobianValues(eN, )
79705  * # query whether xi lies within the reference element
79706  * if femSpace.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
79707  * return eN
79708  * # extra loop if case coords is in neighbour element
79709  */
79710  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3507, __pyx_L1_error)
79711  __Pyx_GOTREF(__pyx_t_10);
79712  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_referenceElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3507, __pyx_L1_error)
79713  __Pyx_GOTREF(__pyx_t_2);
79714  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79715  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_onElement); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3507, __pyx_L1_error)
79716  __Pyx_GOTREF(__pyx_t_10);
79717  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79718  __pyx_t_2 = NULL;
79719  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
79720  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
79721  if (likely(__pyx_t_2)) {
79722  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
79723  __Pyx_INCREF(__pyx_t_2);
79724  __Pyx_INCREF(function);
79725  __Pyx_DECREF_SET(__pyx_t_10, function);
79726  }
79727  }
79728  __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_2, __pyx_v_xi) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_xi);
79729  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
79730  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3507, __pyx_L1_error)
79731  __Pyx_GOTREF(__pyx_t_6);
79732  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79733  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3507, __pyx_L1_error)
79734  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79735  if (__pyx_t_5) {
79736 
79737  /* "mbd/CouplingFSI.pyx":3508
79738  * # query whether xi lies within the reference element
79739  * if femSpace.elementMaps.referenceElement.onElement(xi):
79740  * return eN # <<<<<<<<<<<<<<
79741  * # extra loop if case coords is in neighbour element
79742  * for node in patchBoundaryNodes:
79743  */
79744  __Pyx_XDECREF(__pyx_r);
79745  __Pyx_INCREF(__pyx_v_eN);
79746  __pyx_r = __pyx_v_eN;
79747  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79748  goto __pyx_L0;
79749 
79750  /* "mbd/CouplingFSI.pyx":3507
79751  * #J = femSpace.elementMaps.getJacobianValues(eN, )
79752  * # query whether xi lies within the reference element
79753  * if femSpace.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
79754  * return eN
79755  * # extra loop if case coords is in neighbour element
79756  */
79757  }
79758 
79759  /* "mbd/CouplingFSI.pyx":3498
79760  * return eN
79761  * else:
79762  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node]): # <<<<<<<<<<<<<<
79763  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79764  * checkedElements.append(eN)
79765  */
79766  }
79767  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
79768  }
79769  __pyx_L3:;
79770 
79771  /* "mbd/CouplingFSI.pyx":3510
79772  * return eN
79773  * # extra loop if case coords is in neighbour element
79774  * for node in patchBoundaryNodes: # <<<<<<<<<<<<<<
79775  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
79776  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79777  */
79778  __pyx_t_4 = 0;
79779  __pyx_t_6 = __Pyx_set_iterator(__pyx_v_patchBoundaryNodes, 1, (&__pyx_t_11), (&__pyx_t_9)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3510, __pyx_L1_error)
79780  __Pyx_GOTREF(__pyx_t_6);
79781  __Pyx_XDECREF(__pyx_t_3);
79782  __pyx_t_3 = __pyx_t_6;
79783  __pyx_t_6 = 0;
79784  while (1) {
79785  __pyx_t_12 = __Pyx_set_iter_next(__pyx_t_3, __pyx_t_11, &__pyx_t_4, &__pyx_t_6, __pyx_t_9);
79786  if (unlikely(__pyx_t_12 == 0)) break;
79787  if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 3510, __pyx_L1_error)
79788  __Pyx_GOTREF(__pyx_t_6);
79789  __Pyx_DECREF_SET(__pyx_v_node, __pyx_t_6);
79790  __pyx_t_6 = 0;
79791 
79792  /* "mbd/CouplingFSI.pyx":3511
79793  * # extra loop if case coords is in neighbour element
79794  * for node in patchBoundaryNodes:
79795  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]): # <<<<<<<<<<<<<<
79796  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79797  * if eN not in checkedElements:
79798  */
79799  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3511, __pyx_L1_error)
79800  __Pyx_GOTREF(__pyx_t_6);
79801  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3511, __pyx_L1_error)
79802  __Pyx_GOTREF(__pyx_t_10);
79803  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79804  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3511, __pyx_L1_error)
79805  __Pyx_GOTREF(__pyx_t_6);
79806  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79807  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3511, __pyx_L1_error)
79808  __Pyx_GOTREF(__pyx_t_10);
79809  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3511, __pyx_L1_error)
79810  __Pyx_GOTREF(__pyx_t_2);
79811  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79812  __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_node, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3511, __pyx_L1_error)
79813  __Pyx_GOTREF(__pyx_t_10);
79814  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3511, __pyx_L1_error)
79815  __Pyx_GOTREF(__pyx_t_1);
79816  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79817  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79818  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3511, __pyx_L1_error)
79819  __Pyx_GOTREF(__pyx_t_10);
79820  __Pyx_GIVEREF(__pyx_t_6);
79821  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6);
79822  __Pyx_GIVEREF(__pyx_t_1);
79823  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1);
79824  __pyx_t_6 = 0;
79825  __pyx_t_1 = 0;
79826  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3511, __pyx_L1_error)
79827  __Pyx_GOTREF(__pyx_t_1);
79828  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
79829  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
79830  __pyx_t_10 = __pyx_t_1; __Pyx_INCREF(__pyx_t_10); __pyx_t_13 = 0;
79831  __pyx_t_7 = NULL;
79832  } else {
79833  __pyx_t_13 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3511, __pyx_L1_error)
79834  __Pyx_GOTREF(__pyx_t_10);
79835  __pyx_t_7 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3511, __pyx_L1_error)
79836  }
79837  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79838  for (;;) {
79839  if (likely(!__pyx_t_7)) {
79840  if (likely(PyList_CheckExact(__pyx_t_10))) {
79841  if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_10)) break;
79842  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
79843  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 3511, __pyx_L1_error)
79844  #else
79845  __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3511, __pyx_L1_error)
79846  __Pyx_GOTREF(__pyx_t_1);
79847  #endif
79848  } else {
79849  if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
79850  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
79851  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_1); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 3511, __pyx_L1_error)
79852  #else
79853  __pyx_t_1 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3511, __pyx_L1_error)
79854  __Pyx_GOTREF(__pyx_t_1);
79855  #endif
79856  }
79857  } else {
79858  __pyx_t_1 = __pyx_t_7(__pyx_t_10);
79859  if (unlikely(!__pyx_t_1)) {
79860  PyObject* exc_type = PyErr_Occurred();
79861  if (exc_type) {
79862  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
79863  else __PYX_ERR(0, 3511, __pyx_L1_error)
79864  }
79865  break;
79866  }
79867  __Pyx_GOTREF(__pyx_t_1);
79868  }
79869  __Pyx_XDECREF_SET(__pyx_v_eOffset, __pyx_t_1);
79870  __pyx_t_1 = 0;
79871 
79872  /* "mbd/CouplingFSI.pyx":3512
79873  * for node in patchBoundaryNodes:
79874  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
79875  * eN = femSpace.mesh.nodeElementsArray[eOffset] # <<<<<<<<<<<<<<
79876  * if eN not in checkedElements:
79877  * checkedElements.append(eN)
79878  */
79879  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3512, __pyx_L1_error)
79880  __Pyx_GOTREF(__pyx_t_1);
79881  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_nodeElementsArray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3512, __pyx_L1_error)
79882  __Pyx_GOTREF(__pyx_t_6);
79883  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
79884  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_eOffset); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3512, __pyx_L1_error)
79885  __Pyx_GOTREF(__pyx_t_1);
79886  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79887  __Pyx_XDECREF_SET(__pyx_v_eN, __pyx_t_1);
79888  __pyx_t_1 = 0;
79889 
79890  /* "mbd/CouplingFSI.pyx":3513
79891  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
79892  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79893  * if eN not in checkedElements: # <<<<<<<<<<<<<<
79894  * checkedElements.append(eN)
79895  * # evaluate the inverse map for element eN
79896  */
79897  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_eN, __pyx_v_checkedElements, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3513, __pyx_L1_error)
79898  __pyx_t_14 = (__pyx_t_5 != 0);
79899  if (__pyx_t_14) {
79900 
79901  /* "mbd/CouplingFSI.pyx":3514
79902  * eN = femSpace.mesh.nodeElementsArray[eOffset]
79903  * if eN not in checkedElements:
79904  * checkedElements.append(eN) # <<<<<<<<<<<<<<
79905  * # evaluate the inverse map for element eN
79906  * xi = femSpace.elementMaps.getInverseValue(eN, coords)
79907  */
79908  __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_checkedElements, __pyx_v_eN); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3514, __pyx_L1_error)
79909 
79910  /* "mbd/CouplingFSI.pyx":3516
79911  * checkedElements.append(eN)
79912  * # evaluate the inverse map for element eN
79913  * xi = femSpace.elementMaps.getInverseValue(eN, coords) # <<<<<<<<<<<<<<
79914  * # query whether xi lies within the reference element
79915  * if femSpace.elementMaps.referenceElement.onElement(xi):
79916  */
79917  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3516, __pyx_L1_error)
79918  __Pyx_GOTREF(__pyx_t_6);
79919  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getInverseValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3516, __pyx_L1_error)
79920  __Pyx_GOTREF(__pyx_t_2);
79921  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
79922  __pyx_t_6 = NULL;
79923  __pyx_t_12 = 0;
79924  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
79925  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
79926  if (likely(__pyx_t_6)) {
79927  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
79928  __Pyx_INCREF(__pyx_t_6);
79929  __Pyx_INCREF(function);
79930  __Pyx_DECREF_SET(__pyx_t_2, function);
79931  __pyx_t_12 = 1;
79932  }
79933  }
79934  #if CYTHON_FAST_PYCALL
79935  if (PyFunction_Check(__pyx_t_2)) {
79936  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_eN, __pyx_v_coords};
79937  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3516, __pyx_L1_error)
79938  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
79939  __Pyx_GOTREF(__pyx_t_1);
79940  } else
79941  #endif
79942  #if CYTHON_FAST_PYCCALL
79943  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
79944  PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_eN, __pyx_v_coords};
79945  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3516, __pyx_L1_error)
79946  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
79947  __Pyx_GOTREF(__pyx_t_1);
79948  } else
79949  #endif
79950  {
79951  __pyx_t_15 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3516, __pyx_L1_error)
79952  __Pyx_GOTREF(__pyx_t_15);
79953  if (__pyx_t_6) {
79954  __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_6); __pyx_t_6 = NULL;
79955  }
79956  __Pyx_INCREF(__pyx_v_eN);
79957  __Pyx_GIVEREF(__pyx_v_eN);
79958  PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_12, __pyx_v_eN);
79959  __Pyx_INCREF(__pyx_v_coords);
79960  __Pyx_GIVEREF(__pyx_v_coords);
79961  PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_12, __pyx_v_coords);
79962  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3516, __pyx_L1_error)
79963  __Pyx_GOTREF(__pyx_t_1);
79964  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
79965  }
79966  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79967  __Pyx_XDECREF_SET(__pyx_v_xi, __pyx_t_1);
79968  __pyx_t_1 = 0;
79969 
79970  /* "mbd/CouplingFSI.pyx":3518
79971  * xi = femSpace.elementMaps.getInverseValue(eN, coords)
79972  * # query whether xi lies within the reference element
79973  * if femSpace.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
79974  * return eN
79975  * # no elements found
79976  */
79977  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_femSpace, __pyx_n_s_elementMaps); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3518, __pyx_L1_error)
79978  __Pyx_GOTREF(__pyx_t_2);
79979  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_referenceElement); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3518, __pyx_L1_error)
79980  __Pyx_GOTREF(__pyx_t_15);
79981  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
79982  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_onElement); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3518, __pyx_L1_error)
79983  __Pyx_GOTREF(__pyx_t_2);
79984  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
79985  __pyx_t_15 = NULL;
79986  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
79987  __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_2);
79988  if (likely(__pyx_t_15)) {
79989  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
79990  __Pyx_INCREF(__pyx_t_15);
79991  __Pyx_INCREF(function);
79992  __Pyx_DECREF_SET(__pyx_t_2, function);
79993  }
79994  }
79995  __pyx_t_1 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_15, __pyx_v_xi) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_xi);
79996  __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
79997  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3518, __pyx_L1_error)
79998  __Pyx_GOTREF(__pyx_t_1);
79999  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
80000  __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 3518, __pyx_L1_error)
80001  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
80002  if (__pyx_t_14) {
80003 
80004  /* "mbd/CouplingFSI.pyx":3519
80005  * # query whether xi lies within the reference element
80006  * if femSpace.elementMaps.referenceElement.onElement(xi):
80007  * return eN # <<<<<<<<<<<<<<
80008  * # no elements found
80009  * return None
80010  */
80011  __Pyx_XDECREF(__pyx_r);
80012  __Pyx_INCREF(__pyx_v_eN);
80013  __pyx_r = __pyx_v_eN;
80014  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
80015  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
80016  goto __pyx_L0;
80017 
80018  /* "mbd/CouplingFSI.pyx":3518
80019  * xi = femSpace.elementMaps.getInverseValue(eN, coords)
80020  * # query whether xi lies within the reference element
80021  * if femSpace.elementMaps.referenceElement.onElement(xi): # <<<<<<<<<<<<<<
80022  * return eN
80023  * # no elements found
80024  */
80025  }
80026 
80027  /* "mbd/CouplingFSI.pyx":3513
80028  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]):
80029  * eN = femSpace.mesh.nodeElementsArray[eOffset]
80030  * if eN not in checkedElements: # <<<<<<<<<<<<<<
80031  * checkedElements.append(eN)
80032  * # evaluate the inverse map for element eN
80033  */
80034  }
80035 
80036  /* "mbd/CouplingFSI.pyx":3511
80037  * # extra loop if case coords is in neighbour element
80038  * for node in patchBoundaryNodes:
80039  * for eOffset in range(femSpace.mesh.nodeElementOffsets[node], femSpace.mesh.nodeElementOffsets[node + 1]): # <<<<<<<<<<<<<<
80040  * eN = femSpace.mesh.nodeElementsArray[eOffset]
80041  * if eN not in checkedElements:
80042  */
80043  }
80044  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
80045  }
80046  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
80047 
80048  /* "mbd/CouplingFSI.pyx":3521
80049  * return eN
80050  * # no elements found
80051  * return None # <<<<<<<<<<<<<<
80052  *
80053  *
80054  */
80055  __Pyx_XDECREF(__pyx_r);
80056  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
80057  goto __pyx_L0;
80058 
80059  /* "mbd/CouplingFSI.pyx":3463
80060  *
80061  *
80062  * def getLocalElement(femSpace, coords, node): # <<<<<<<<<<<<<<
80063  * """Given coordinates and its nearest node, determine if it is on a
80064  * local element.
80065  */
80066 
80067  /* function exit code */
80068  __pyx_L1_error:;
80069  __Pyx_XDECREF(__pyx_t_1);
80070  __Pyx_XDECREF(__pyx_t_2);
80071  __Pyx_XDECREF(__pyx_t_3);
80072  __Pyx_XDECREF(__pyx_t_6);
80073  __Pyx_XDECREF(__pyx_t_10);
80074  __Pyx_XDECREF(__pyx_t_15);
80075  __Pyx_AddTraceback("mbd.CouplingFSI.getLocalElement", __pyx_clineno, __pyx_lineno, __pyx_filename);
80076  __pyx_r = NULL;
80077  __pyx_L0:;
80078  __Pyx_XDECREF(__pyx_v_patchBoundaryNodes);
80079  __Pyx_XDECREF(__pyx_v_checkedElements);
80080  __Pyx_XDECREF(__pyx_v_eOffset);
80081  __Pyx_XDECREF(__pyx_v_eN);
80082  __Pyx_XDECREF(__pyx_v_xi);
80083  __Pyx_XDECREF(__pyx_v_node);
80084  __Pyx_XGIVEREF(__pyx_r);
80085  __Pyx_TraceReturn(__pyx_r, 0);
80086  __Pyx_RefNannyFinishContext();
80087  return __pyx_r;
80088 }
80089 
80090 /* "mbd/CouplingFSI.pyx":3531
80091  * """
80092  *
80093  * def __cinit__(self, # <<<<<<<<<<<<<<
80094  * system):
80095  * self.ProtChSystem = system
80096  */
80097 
80098 /* Python wrapper */
80099 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
80100 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
80101  PyObject *__pyx_v_system = 0;
80102  int __pyx_lineno = 0;
80103  const char *__pyx_filename = NULL;
80104  int __pyx_clineno = 0;
80105  int __pyx_r;
80106  __Pyx_RefNannyDeclarations
80107  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
80108  {
80109  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_system,0};
80110  PyObject* values[1] = {0};
80111  if (unlikely(__pyx_kwds)) {
80112  Py_ssize_t kw_args;
80113  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
80114  switch (pos_args) {
80115  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
80116  CYTHON_FALLTHROUGH;
80117  case 0: break;
80118  default: goto __pyx_L5_argtuple_error;
80119  }
80120  kw_args = PyDict_Size(__pyx_kwds);
80121  switch (pos_args) {
80122  case 0:
80123  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_system)) != 0)) kw_args--;
80124  else goto __pyx_L5_argtuple_error;
80125  }
80126  if (unlikely(kw_args > 0)) {
80127  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3531, __pyx_L3_error)
80128  }
80129  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
80130  goto __pyx_L5_argtuple_error;
80131  } else {
80132  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
80133  }
80134  __pyx_v_system = values[0];
80135  }
80136  goto __pyx_L4_argument_unpacking_done;
80137  __pyx_L5_argtuple_error:;
80138  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3531, __pyx_L3_error)
80139  __pyx_L3_error:;
80140  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80141  __Pyx_RefNannyFinishContext();
80142  return -1;
80143  __pyx_L4_argument_unpacking_done:;
80144  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass___cinit__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self), __pyx_v_system);
80145 
80146  /* function exit code */
80147  __Pyx_RefNannyFinishContext();
80148  return __pyx_r;
80149 }
80150 
80151 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_system) {
80152  int __pyx_r;
80153  __Pyx_TraceDeclarations
80154  __Pyx_RefNannyDeclarations
80155  PyObject *__pyx_t_1 = NULL;
80156  int __pyx_lineno = 0;
80157  const char *__pyx_filename = NULL;
80158  int __pyx_clineno = 0;
80159  __Pyx_RefNannySetupContext("__cinit__", 0);
80160  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3531, 0, __PYX_ERR(0, 3531, __pyx_L1_error));
80161 
80162  /* "mbd/CouplingFSI.pyx":3533
80163  * def __cinit__(self,
80164  * system):
80165  * self.ProtChSystem = system # <<<<<<<<<<<<<<
80166  *
80167  * def attachModel(self, model, ar):
80168  */
80169  if (!(likely(((__pyx_v_system) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_system, __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem))))) __PYX_ERR(0, 3533, __pyx_L1_error)
80170  __pyx_t_1 = __pyx_v_system;
80171  __Pyx_INCREF(__pyx_t_1);
80172  __Pyx_GIVEREF(__pyx_t_1);
80173  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
80174  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
80175  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_t_1);
80176  __pyx_t_1 = 0;
80177 
80178  /* "mbd/CouplingFSI.pyx":3531
80179  * """
80180  *
80181  * def __cinit__(self, # <<<<<<<<<<<<<<
80182  * system):
80183  * self.ProtChSystem = system
80184  */
80185 
80186  /* function exit code */
80187  __pyx_r = 0;
80188  goto __pyx_L0;
80189  __pyx_L1_error:;
80190  __Pyx_XDECREF(__pyx_t_1);
80191  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80192  __pyx_r = -1;
80193  __pyx_L0:;
80194  __Pyx_TraceReturn(Py_None, 0);
80195  __Pyx_RefNannyFinishContext();
80196  return __pyx_r;
80197 }
80198 
80199 /* "mbd/CouplingFSI.pyx":3535
80200  * self.ProtChSystem = system
80201  *
80202  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
80203  * """Attaches Proteus model to auxiliary variable
80204  * """
80205  */
80206 
80207 /* Python wrapper */
80208 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_3attachModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
80209 static char __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_2attachModel[] = "ProtChAddedMass.attachModel(self, model, ar)\nAttaches Proteus model to auxiliary variable\n ";
80210 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_3attachModel = {"attachModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_3attachModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_2attachModel};
80211 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_3attachModel(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
80212  PyObject *__pyx_v_model = 0;
80213  CYTHON_UNUSED PyObject *__pyx_v_ar = 0;
80214  int __pyx_lineno = 0;
80215  const char *__pyx_filename = NULL;
80216  int __pyx_clineno = 0;
80217  PyObject *__pyx_r = 0;
80218  __Pyx_RefNannyDeclarations
80219  __Pyx_RefNannySetupContext("attachModel (wrapper)", 0);
80220  {
80221  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_model,&__pyx_n_s_ar,0};
80222  PyObject* values[2] = {0,0};
80223  if (unlikely(__pyx_kwds)) {
80224  Py_ssize_t kw_args;
80225  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
80226  switch (pos_args) {
80227  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
80228  CYTHON_FALLTHROUGH;
80229  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
80230  CYTHON_FALLTHROUGH;
80231  case 0: break;
80232  default: goto __pyx_L5_argtuple_error;
80233  }
80234  kw_args = PyDict_Size(__pyx_kwds);
80235  switch (pos_args) {
80236  case 0:
80237  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_model)) != 0)) kw_args--;
80238  else goto __pyx_L5_argtuple_error;
80239  CYTHON_FALLTHROUGH;
80240  case 1:
80241  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ar)) != 0)) kw_args--;
80242  else {
80243  __Pyx_RaiseArgtupleInvalid("attachModel", 1, 2, 2, 1); __PYX_ERR(0, 3535, __pyx_L3_error)
80244  }
80245  }
80246  if (unlikely(kw_args > 0)) {
80247  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attachModel") < 0)) __PYX_ERR(0, 3535, __pyx_L3_error)
80248  }
80249  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
80250  goto __pyx_L5_argtuple_error;
80251  } else {
80252  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
80253  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
80254  }
80255  __pyx_v_model = values[0];
80256  __pyx_v_ar = values[1];
80257  }
80258  goto __pyx_L4_argument_unpacking_done;
80259  __pyx_L5_argtuple_error:;
80260  __Pyx_RaiseArgtupleInvalid("attachModel", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3535, __pyx_L3_error)
80261  __pyx_L3_error:;
80262  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.attachModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
80263  __Pyx_RefNannyFinishContext();
80264  return NULL;
80265  __pyx_L4_argument_unpacking_done:;
80266  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_2attachModel(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self), __pyx_v_model, __pyx_v_ar);
80267 
80268  /* function exit code */
80269  __Pyx_RefNannyFinishContext();
80270  return __pyx_r;
80271 }
80272 
80273 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_2attachModel(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_model, CYTHON_UNUSED PyObject *__pyx_v_ar) {
80274  PyObject *__pyx_r = NULL;
80275  __Pyx_TraceDeclarations
80276  __Pyx_RefNannyDeclarations
80277  int __pyx_lineno = 0;
80278  const char *__pyx_filename = NULL;
80279  int __pyx_clineno = 0;
80280  __Pyx_TraceFrameInit(__pyx_codeobj__200)
80281  __Pyx_RefNannySetupContext("attachModel", 0);
80282  __Pyx_TraceCall("attachModel", __pyx_f[0], 3535, 0, __PYX_ERR(0, 3535, __pyx_L1_error));
80283 
80284  /* "mbd/CouplingFSI.pyx":3538
80285  * """Attaches Proteus model to auxiliary variable
80286  * """
80287  * self.model = model # <<<<<<<<<<<<<<
80288  * # attaching model to ProtChSystem to access Aij
80289  * self.ProtChSystem.model_addedmass = model
80290  */
80291  __Pyx_INCREF(__pyx_v_model);
80292  __Pyx_GIVEREF(__pyx_v_model);
80293  __Pyx_GOTREF(__pyx_v_self->model);
80294  __Pyx_DECREF(__pyx_v_self->model);
80295  __pyx_v_self->model = __pyx_v_model;
80296 
80297  /* "mbd/CouplingFSI.pyx":3540
80298  * self.model = model
80299  * # attaching model to ProtChSystem to access Aij
80300  * self.ProtChSystem.model_addedmass = model # <<<<<<<<<<<<<<
80301  * return self
80302  *
80303  */
80304  __Pyx_INCREF(__pyx_v_model);
80305  __Pyx_GIVEREF(__pyx_v_model);
80306  __Pyx_GOTREF(__pyx_v_self->ProtChSystem->model_addedmass);
80307  __Pyx_DECREF(__pyx_v_self->ProtChSystem->model_addedmass);
80308  __pyx_v_self->ProtChSystem->model_addedmass = __pyx_v_model;
80309 
80310  /* "mbd/CouplingFSI.pyx":3541
80311  * # attaching model to ProtChSystem to access Aij
80312  * self.ProtChSystem.model_addedmass = model
80313  * return self # <<<<<<<<<<<<<<
80314  *
80315  * def attachAuxiliaryVariables(self,avDict):
80316  */
80317  __Pyx_XDECREF(__pyx_r);
80318  __Pyx_INCREF(((PyObject *)__pyx_v_self));
80319  __pyx_r = ((PyObject *)__pyx_v_self);
80320  goto __pyx_L0;
80321 
80322  /* "mbd/CouplingFSI.pyx":3535
80323  * self.ProtChSystem = system
80324  *
80325  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
80326  * """Attaches Proteus model to auxiliary variable
80327  * """
80328  */
80329 
80330  /* function exit code */
80331  __pyx_L1_error:;
80332  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.attachModel", __pyx_clineno, __pyx_lineno, __pyx_filename);
80333  __pyx_r = NULL;
80334  __pyx_L0:;
80335  __Pyx_XGIVEREF(__pyx_r);
80336  __Pyx_TraceReturn(__pyx_r, 0);
80337  __Pyx_RefNannyFinishContext();
80338  return __pyx_r;
80339 }
80340 
80341 /* "mbd/CouplingFSI.pyx":3543
80342  * return self
80343  *
80344  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
80345  * pass
80346  *
80347  */
80348 
80349 /* Python wrapper */
80350 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5attachAuxiliaryVariables(PyObject *__pyx_v_self, PyObject *__pyx_v_avDict); /*proto*/
80351 static char __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_4attachAuxiliaryVariables[] = "ProtChAddedMass.attachAuxiliaryVariables(self, avDict)";
80352 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_5attachAuxiliaryVariables = {"attachAuxiliaryVariables", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5attachAuxiliaryVariables, METH_O, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_4attachAuxiliaryVariables};
80353 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5attachAuxiliaryVariables(PyObject *__pyx_v_self, PyObject *__pyx_v_avDict) {
80354  PyObject *__pyx_r = 0;
80355  __Pyx_RefNannyDeclarations
80356  __Pyx_RefNannySetupContext("attachAuxiliaryVariables (wrapper)", 0);
80357  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_4attachAuxiliaryVariables(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self), ((PyObject *)__pyx_v_avDict));
80358 
80359  /* function exit code */
80360  __Pyx_RefNannyFinishContext();
80361  return __pyx_r;
80362 }
80363 
80364 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_4attachAuxiliaryVariables(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_avDict) {
80365  PyObject *__pyx_r = NULL;
80366  __Pyx_TraceDeclarations
80367  __Pyx_RefNannyDeclarations
80368  int __pyx_lineno = 0;
80369  const char *__pyx_filename = NULL;
80370  int __pyx_clineno = 0;
80371  __Pyx_TraceFrameInit(__pyx_codeobj__201)
80372  __Pyx_RefNannySetupContext("attachAuxiliaryVariables", 0);
80373  __Pyx_TraceCall("attachAuxiliaryVariables", __pyx_f[0], 3543, 0, __PYX_ERR(0, 3543, __pyx_L1_error));
80374 
80375  /* function exit code */
80376  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
80377  goto __pyx_L0;
80378  __pyx_L1_error:;
80379  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.attachAuxiliaryVariables", __pyx_clineno, __pyx_lineno, __pyx_filename);
80380  __pyx_r = NULL;
80381  __pyx_L0:;
80382  __Pyx_XGIVEREF(__pyx_r);
80383  __Pyx_TraceReturn(__pyx_r, 0);
80384  __Pyx_RefNannyFinishContext();
80385  return __pyx_r;
80386 }
80387 
80388 /* "mbd/CouplingFSI.pyx":3546
80389  * pass
80390  *
80391  * def calculate_init(self): # <<<<<<<<<<<<<<
80392  * pass
80393  *
80394  */
80395 
80396 /* Python wrapper */
80397 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_7calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
80398 static char __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_6calculate_init[] = "ProtChAddedMass.calculate_init(self)";
80399 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_7calculate_init = {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_7calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_6calculate_init};
80400 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_7calculate_init(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
80401  PyObject *__pyx_r = 0;
80402  __Pyx_RefNannyDeclarations
80403  __Pyx_RefNannySetupContext("calculate_init (wrapper)", 0);
80404  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_6calculate_init(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self));
80405 
80406  /* function exit code */
80407  __Pyx_RefNannyFinishContext();
80408  return __pyx_r;
80409 }
80410 
80411 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_6calculate_init(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self) {
80412  PyObject *__pyx_r = NULL;
80413  __Pyx_TraceDeclarations
80414  __Pyx_RefNannyDeclarations
80415  int __pyx_lineno = 0;
80416  const char *__pyx_filename = NULL;
80417  int __pyx_clineno = 0;
80418  __Pyx_TraceFrameInit(__pyx_codeobj__202)
80419  __Pyx_RefNannySetupContext("calculate_init", 0);
80420  __Pyx_TraceCall("calculate_init", __pyx_f[0], 3546, 0, __PYX_ERR(0, 3546, __pyx_L1_error));
80421 
80422  /* function exit code */
80423  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
80424  goto __pyx_L0;
80425  __pyx_L1_error:;
80426  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.calculate_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
80427  __pyx_r = NULL;
80428  __pyx_L0:;
80429  __Pyx_XGIVEREF(__pyx_r);
80430  __Pyx_TraceReturn(__pyx_r, 0);
80431  __Pyx_RefNannyFinishContext();
80432  return __pyx_r;
80433 }
80434 
80435 /* "mbd/CouplingFSI.pyx":3549
80436  * pass
80437  *
80438  * def calculate(self): # <<<<<<<<<<<<<<
80439  * pass
80440  *
80441  */
80442 
80443 /* Python wrapper */
80444 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_9calculate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
80445 static char __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_8calculate[] = "ProtChAddedMass.calculate(self)";
80446 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_9calculate = {"calculate", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_9calculate, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_8calculate};
80447 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_9calculate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
80448  PyObject *__pyx_r = 0;
80449  __Pyx_RefNannyDeclarations
80450  __Pyx_RefNannySetupContext("calculate (wrapper)", 0);
80451  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_8calculate(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self));
80452 
80453  /* function exit code */
80454  __Pyx_RefNannyFinishContext();
80455  return __pyx_r;
80456 }
80457 
80458 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_8calculate(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self) {
80459  PyObject *__pyx_r = NULL;
80460  __Pyx_TraceDeclarations
80461  __Pyx_RefNannyDeclarations
80462  int __pyx_lineno = 0;
80463  const char *__pyx_filename = NULL;
80464  int __pyx_clineno = 0;
80465  __Pyx_TraceFrameInit(__pyx_codeobj__203)
80466  __Pyx_RefNannySetupContext("calculate", 0);
80467  __Pyx_TraceCall("calculate", __pyx_f[0], 3549, 0, __PYX_ERR(0, 3549, __pyx_L1_error));
80468 
80469  /* function exit code */
80470  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
80471  goto __pyx_L0;
80472  __pyx_L1_error:;
80473  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.calculate", __pyx_clineno, __pyx_lineno, __pyx_filename);
80474  __pyx_r = NULL;
80475  __pyx_L0:;
80476  __Pyx_XGIVEREF(__pyx_r);
80477  __Pyx_TraceReturn(__pyx_r, 0);
80478  __Pyx_RefNannyFinishContext();
80479  return __pyx_r;
80480 }
80481 
80482 /* "mbd/CouplingFSI.pxd":357
80483  * cdef class ProtChAddedMass:
80484  * cdef public:
80485  * object model # <<<<<<<<<<<<<<
80486  * ProtChSystem ProtChSystem
80487  *
80488  */
80489 
80490 /* Python wrapper */
80491 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_1__get__(PyObject *__pyx_v_self); /*proto*/
80492 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_1__get__(PyObject *__pyx_v_self) {
80493  PyObject *__pyx_r = 0;
80494  __Pyx_RefNannyDeclarations
80495  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
80496  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self));
80497 
80498  /* function exit code */
80499  __Pyx_RefNannyFinishContext();
80500  return __pyx_r;
80501 }
80502 
80503 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self) {
80504  PyObject *__pyx_r = NULL;
80505  __Pyx_TraceDeclarations
80506  __Pyx_RefNannyDeclarations
80507  int __pyx_lineno = 0;
80508  const char *__pyx_filename = NULL;
80509  int __pyx_clineno = 0;
80510  __Pyx_RefNannySetupContext("__get__", 0);
80511  __Pyx_TraceCall("__get__", __pyx_f[2], 357, 0, __PYX_ERR(2, 357, __pyx_L1_error));
80512  __Pyx_XDECREF(__pyx_r);
80513  __Pyx_INCREF(__pyx_v_self->model);
80514  __pyx_r = __pyx_v_self->model;
80515  goto __pyx_L0;
80516 
80517  /* function exit code */
80518  __pyx_L1_error:;
80519  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.model.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80520  __pyx_r = NULL;
80521  __pyx_L0:;
80522  __Pyx_XGIVEREF(__pyx_r);
80523  __Pyx_TraceReturn(__pyx_r, 0);
80524  __Pyx_RefNannyFinishContext();
80525  return __pyx_r;
80526 }
80527 
80528 /* Python wrapper */
80529 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
80530 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
80531  int __pyx_r;
80532  __Pyx_RefNannyDeclarations
80533  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
80534  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self), ((PyObject *)__pyx_v_value));
80535 
80536  /* function exit code */
80537  __Pyx_RefNannyFinishContext();
80538  return __pyx_r;
80539 }
80540 
80541 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_value) {
80542  int __pyx_r;
80543  __Pyx_TraceDeclarations
80544  __Pyx_RefNannyDeclarations
80545  int __pyx_lineno = 0;
80546  const char *__pyx_filename = NULL;
80547  int __pyx_clineno = 0;
80548  __Pyx_RefNannySetupContext("__set__", 0);
80549  __Pyx_TraceCall("__set__", __pyx_f[2], 357, 0, __PYX_ERR(2, 357, __pyx_L1_error));
80550  __Pyx_INCREF(__pyx_v_value);
80551  __Pyx_GIVEREF(__pyx_v_value);
80552  __Pyx_GOTREF(__pyx_v_self->model);
80553  __Pyx_DECREF(__pyx_v_self->model);
80554  __pyx_v_self->model = __pyx_v_value;
80555 
80556  /* function exit code */
80557  __pyx_r = 0;
80558  goto __pyx_L0;
80559  __pyx_L1_error:;
80560  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.model.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80561  __pyx_r = -1;
80562  __pyx_L0:;
80563  __Pyx_TraceReturn(Py_None, 0);
80564  __Pyx_RefNannyFinishContext();
80565  return __pyx_r;
80566 }
80567 
80568 /* Python wrapper */
80569 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_5__del__(PyObject *__pyx_v_self); /*proto*/
80570 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_5__del__(PyObject *__pyx_v_self) {
80571  int __pyx_r;
80572  __Pyx_RefNannyDeclarations
80573  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
80574  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self));
80575 
80576  /* function exit code */
80577  __Pyx_RefNannyFinishContext();
80578  return __pyx_r;
80579 }
80580 
80581 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_5model_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self) {
80582  int __pyx_r;
80583  __Pyx_TraceDeclarations
80584  __Pyx_RefNannyDeclarations
80585  int __pyx_lineno = 0;
80586  const char *__pyx_filename = NULL;
80587  int __pyx_clineno = 0;
80588  __Pyx_RefNannySetupContext("__del__", 0);
80589  __Pyx_TraceCall("__del__", __pyx_f[2], 357, 0, __PYX_ERR(2, 357, __pyx_L1_error));
80590  __Pyx_INCREF(Py_None);
80591  __Pyx_GIVEREF(Py_None);
80592  __Pyx_GOTREF(__pyx_v_self->model);
80593  __Pyx_DECREF(__pyx_v_self->model);
80594  __pyx_v_self->model = Py_None;
80595 
80596  /* function exit code */
80597  __pyx_r = 0;
80598  goto __pyx_L0;
80599  __pyx_L1_error:;
80600  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.model.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80601  __pyx_r = -1;
80602  __pyx_L0:;
80603  __Pyx_TraceReturn(Py_None, 0);
80604  __Pyx_RefNannyFinishContext();
80605  return __pyx_r;
80606 }
80607 
80608 /* "mbd/CouplingFSI.pxd":358
80609  * cdef public:
80610  * object model
80611  * ProtChSystem ProtChSystem # <<<<<<<<<<<<<<
80612  *
80613  *
80614  */
80615 
80616 /* Python wrapper */
80617 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_1__get__(PyObject *__pyx_v_self); /*proto*/
80618 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_1__get__(PyObject *__pyx_v_self) {
80619  PyObject *__pyx_r = 0;
80620  __Pyx_RefNannyDeclarations
80621  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
80622  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self));
80623 
80624  /* function exit code */
80625  __Pyx_RefNannyFinishContext();
80626  return __pyx_r;
80627 }
80628 
80629 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem___get__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self) {
80630  PyObject *__pyx_r = NULL;
80631  __Pyx_TraceDeclarations
80632  __Pyx_RefNannyDeclarations
80633  int __pyx_lineno = 0;
80634  const char *__pyx_filename = NULL;
80635  int __pyx_clineno = 0;
80636  __Pyx_RefNannySetupContext("__get__", 0);
80637  __Pyx_TraceCall("__get__", __pyx_f[2], 358, 0, __PYX_ERR(2, 358, __pyx_L1_error));
80638  __Pyx_XDECREF(__pyx_r);
80639  __Pyx_INCREF(((PyObject *)__pyx_v_self->ProtChSystem));
80640  __pyx_r = ((PyObject *)__pyx_v_self->ProtChSystem);
80641  goto __pyx_L0;
80642 
80643  /* function exit code */
80644  __pyx_L1_error:;
80645  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.ProtChSystem.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80646  __pyx_r = NULL;
80647  __pyx_L0:;
80648  __Pyx_XGIVEREF(__pyx_r);
80649  __Pyx_TraceReturn(__pyx_r, 0);
80650  __Pyx_RefNannyFinishContext();
80651  return __pyx_r;
80652 }
80653 
80654 /* Python wrapper */
80655 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
80656 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
80657  int __pyx_r;
80658  __Pyx_RefNannyDeclarations
80659  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
80660  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self), ((PyObject *)__pyx_v_value));
80661 
80662  /* function exit code */
80663  __Pyx_RefNannyFinishContext();
80664  return __pyx_r;
80665 }
80666 
80667 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, PyObject *__pyx_v_value) {
80668  int __pyx_r;
80669  __Pyx_TraceDeclarations
80670  __Pyx_RefNannyDeclarations
80671  PyObject *__pyx_t_1 = NULL;
80672  int __pyx_lineno = 0;
80673  const char *__pyx_filename = NULL;
80674  int __pyx_clineno = 0;
80675  __Pyx_RefNannySetupContext("__set__", 0);
80676  __Pyx_TraceCall("__set__", __pyx_f[2], 358, 0, __PYX_ERR(2, 358, __pyx_L1_error));
80677  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem))))) __PYX_ERR(2, 358, __pyx_L1_error)
80678  __pyx_t_1 = __pyx_v_value;
80679  __Pyx_INCREF(__pyx_t_1);
80680  __Pyx_GIVEREF(__pyx_t_1);
80681  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
80682  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
80683  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)__pyx_t_1);
80684  __pyx_t_1 = 0;
80685 
80686  /* function exit code */
80687  __pyx_r = 0;
80688  goto __pyx_L0;
80689  __pyx_L1_error:;
80690  __Pyx_XDECREF(__pyx_t_1);
80691  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.ProtChSystem.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80692  __pyx_r = -1;
80693  __pyx_L0:;
80694  __Pyx_TraceReturn(Py_None, 0);
80695  __Pyx_RefNannyFinishContext();
80696  return __pyx_r;
80697 }
80698 
80699 /* Python wrapper */
80700 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_5__del__(PyObject *__pyx_v_self); /*proto*/
80701 static int __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_5__del__(PyObject *__pyx_v_self) {
80702  int __pyx_r;
80703  __Pyx_RefNannyDeclarations
80704  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
80705  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self));
80706 
80707  /* function exit code */
80708  __Pyx_RefNannyFinishContext();
80709  return __pyx_r;
80710 }
80711 
80712 static int __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self) {
80713  int __pyx_r;
80714  __Pyx_TraceDeclarations
80715  __Pyx_RefNannyDeclarations
80716  int __pyx_lineno = 0;
80717  const char *__pyx_filename = NULL;
80718  int __pyx_clineno = 0;
80719  __Pyx_RefNannySetupContext("__del__", 0);
80720  __Pyx_TraceCall("__del__", __pyx_f[2], 358, 0, __PYX_ERR(2, 358, __pyx_L1_error));
80721  __Pyx_INCREF(Py_None);
80722  __Pyx_GIVEREF(Py_None);
80723  __Pyx_GOTREF(__pyx_v_self->ProtChSystem);
80724  __Pyx_DECREF(((PyObject *)__pyx_v_self->ProtChSystem));
80725  __pyx_v_self->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None);
80726 
80727  /* function exit code */
80728  __pyx_r = 0;
80729  goto __pyx_L0;
80730  __pyx_L1_error:;
80731  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.ProtChSystem.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80732  __pyx_r = -1;
80733  __pyx_L0:;
80734  __Pyx_TraceReturn(Py_None, 0);
80735  __Pyx_RefNannyFinishContext();
80736  return __pyx_r;
80737 }
80738 
80739 /* "(tree fragment)":1
80740  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
80741  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80742  * def __setstate_cython__(self, __pyx_state):
80743  */
80744 
80745 /* Python wrapper */
80746 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
80747 static char __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_10__reduce_cython__[] = "ProtChAddedMass.__reduce_cython__(self)";
80748 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_11__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_11__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_10__reduce_cython__};
80749 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
80750  PyObject *__pyx_r = 0;
80751  __Pyx_RefNannyDeclarations
80752  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
80753  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_10__reduce_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self));
80754 
80755  /* function exit code */
80756  __Pyx_RefNannyFinishContext();
80757  return __pyx_r;
80758 }
80759 
80760 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self) {
80761  PyObject *__pyx_r = NULL;
80762  __Pyx_TraceDeclarations
80763  __Pyx_RefNannyDeclarations
80764  PyObject *__pyx_t_1 = NULL;
80765  int __pyx_lineno = 0;
80766  const char *__pyx_filename = NULL;
80767  int __pyx_clineno = 0;
80768  __Pyx_TraceFrameInit(__pyx_codeobj__204)
80769  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
80770  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
80771 
80772  /* "(tree fragment)":2
80773  * def __reduce_cython__(self):
80774  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
80775  * def __setstate_cython__(self, __pyx_state):
80776  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80777  */
80778  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__205, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
80779  __Pyx_GOTREF(__pyx_t_1);
80780  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
80781  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
80782  __PYX_ERR(1, 2, __pyx_L1_error)
80783 
80784  /* "(tree fragment)":1
80785  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
80786  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80787  * def __setstate_cython__(self, __pyx_state):
80788  */
80789 
80790  /* function exit code */
80791  __pyx_L1_error:;
80792  __Pyx_XDECREF(__pyx_t_1);
80793  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80794  __pyx_r = NULL;
80795  __Pyx_XGIVEREF(__pyx_r);
80796  __Pyx_TraceReturn(__pyx_r, 0);
80797  __Pyx_RefNannyFinishContext();
80798  return __pyx_r;
80799 }
80800 
80801 /* "(tree fragment)":3
80802  * def __reduce_cython__(self):
80803  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80804  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
80805  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80806  */
80807 
80808 /* Python wrapper */
80809 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
80810 static char __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_12__setstate_cython__[] = "ProtChAddedMass.__setstate_cython__(self, __pyx_state)";
80811 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_13__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_13__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_12__setstate_cython__};
80812 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
80813  PyObject *__pyx_r = 0;
80814  __Pyx_RefNannyDeclarations
80815  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
80816  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12__setstate_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
80817 
80818  /* function exit code */
80819  __Pyx_RefNannyFinishContext();
80820  return __pyx_r;
80821 }
80822 
80823 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ProtChAddedMass_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
80824  PyObject *__pyx_r = NULL;
80825  __Pyx_TraceDeclarations
80826  __Pyx_RefNannyDeclarations
80827  PyObject *__pyx_t_1 = NULL;
80828  int __pyx_lineno = 0;
80829  const char *__pyx_filename = NULL;
80830  int __pyx_clineno = 0;
80831  __Pyx_TraceFrameInit(__pyx_codeobj__206)
80832  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
80833  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
80834 
80835  /* "(tree fragment)":4
80836  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80837  * def __setstate_cython__(self, __pyx_state):
80838  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
80839  */
80840  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__207, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
80841  __Pyx_GOTREF(__pyx_t_1);
80842  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
80843  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
80844  __PYX_ERR(1, 4, __pyx_L1_error)
80845 
80846  /* "(tree fragment)":3
80847  * def __reduce_cython__(self):
80848  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80849  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
80850  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
80851  */
80852 
80853  /* function exit code */
80854  __pyx_L1_error:;
80855  __Pyx_XDECREF(__pyx_t_1);
80856  __Pyx_AddTraceback("mbd.CouplingFSI.ProtChAddedMass.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
80857  __pyx_r = NULL;
80858  __Pyx_XGIVEREF(__pyx_r);
80859  __Pyx_TraceReturn(__pyx_r, 0);
80860  __Pyx_RefNannyFinishContext();
80861  return __pyx_r;
80862 }
80863 
80864 /* "mbd/CouplingFSI.pyx":3553
80865  *
80866  *
80867  * cpdef void attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2): # <<<<<<<<<<<<<<
80868  * if cable1.beam_type == "CableANCF":
80869  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
80870  */
80871 
80872 static PyObject *__pyx_pw_3mbd_11CouplingFSI_5attachNodeToNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
80873 static void __pyx_f_3mbd_11CouplingFSI_attachNodeToNode(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable1, int __pyx_v_node1, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable2, int __pyx_v_node2, CYTHON_UNUSED int __pyx_skip_dispatch) {
80874  __Pyx_TraceDeclarations
80875  __Pyx_RefNannyDeclarations
80876  int __pyx_t_1;
80877  int __pyx_lineno = 0;
80878  const char *__pyx_filename = NULL;
80879  int __pyx_clineno = 0;
80880  __Pyx_TraceFrameInit(__pyx_codeobj__208)
80881  __Pyx_RefNannySetupContext("attachNodeToNode", 0);
80882  __Pyx_TraceCall("attachNodeToNode", __pyx_f[0], 3553, 0, __PYX_ERR(0, 3553, __pyx_L1_error));
80883 
80884  /* "mbd/CouplingFSI.pyx":3554
80885  *
80886  * cpdef void attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2):
80887  * if cable1.beam_type == "CableANCF": # <<<<<<<<<<<<<<
80888  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
80889  * elif cable1.beam_type == "BeamEuler":
80890  */
80891  __pyx_t_1 = ((__pyx_v_cable1->beam_type == ((char const *)"CableANCF")) != 0);
80892  if (__pyx_t_1) {
80893 
80894  /* "mbd/CouplingFSI.pyx":3555
80895  * cpdef void attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2):
80896  * if cable1.beam_type == "CableANCF":
80897  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2) # <<<<<<<<<<<<<<
80898  * elif cable1.beam_type == "BeamEuler":
80899  * cppAttachNodeToNodeFEAxyzrot(cable1.thisptr, node1, cable2.thisptr, node2)
80900  */
80901  cppAttachNodeToNodeFEAxyzD(__pyx_v_cable1->thisptr, __pyx_v_node1, __pyx_v_cable2->thisptr, __pyx_v_node2);
80902 
80903  /* "mbd/CouplingFSI.pyx":3554
80904  *
80905  * cpdef void attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2):
80906  * if cable1.beam_type == "CableANCF": # <<<<<<<<<<<<<<
80907  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
80908  * elif cable1.beam_type == "BeamEuler":
80909  */
80910  goto __pyx_L3;
80911  }
80912 
80913  /* "mbd/CouplingFSI.pyx":3556
80914  * if cable1.beam_type == "CableANCF":
80915  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
80916  * elif cable1.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
80917  * cppAttachNodeToNodeFEAxyzrot(cable1.thisptr, node1, cable2.thisptr, node2)
80918  *
80919  */
80920  __pyx_t_1 = ((__pyx_v_cable1->beam_type == ((char const *)"BeamEuler")) != 0);
80921  if (__pyx_t_1) {
80922 
80923  /* "mbd/CouplingFSI.pyx":3557
80924  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
80925  * elif cable1.beam_type == "BeamEuler":
80926  * cppAttachNodeToNodeFEAxyzrot(cable1.thisptr, node1, cable2.thisptr, node2) # <<<<<<<<<<<<<<
80927  *
80928  *
80929  */
80930  cppAttachNodeToNodeFEAxyzrot(__pyx_v_cable1->thisptr, __pyx_v_node1, __pyx_v_cable2->thisptr, __pyx_v_node2);
80931 
80932  /* "mbd/CouplingFSI.pyx":3556
80933  * if cable1.beam_type == "CableANCF":
80934  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
80935  * elif cable1.beam_type == "BeamEuler": # <<<<<<<<<<<<<<
80936  * cppAttachNodeToNodeFEAxyzrot(cable1.thisptr, node1, cable2.thisptr, node2)
80937  *
80938  */
80939  }
80940  __pyx_L3:;
80941 
80942  /* "mbd/CouplingFSI.pyx":3553
80943  *
80944  *
80945  * cpdef void attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2): # <<<<<<<<<<<<<<
80946  * if cable1.beam_type == "CableANCF":
80947  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
80948  */
80949 
80950  /* function exit code */
80951  goto __pyx_L0;
80952  __pyx_L1_error:;
80953  __Pyx_WriteUnraisable("mbd.CouplingFSI.attachNodeToNode", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
80954  __pyx_L0:;
80955  __Pyx_TraceReturn(Py_None, 0);
80956  __Pyx_RefNannyFinishContext();
80957 }
80958 
80959 /* Python wrapper */
80960 static PyObject *__pyx_pw_3mbd_11CouplingFSI_5attachNodeToNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
80961 static char __pyx_doc_3mbd_11CouplingFSI_4attachNodeToNode[] = "attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2) -> void";
80962 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_5attachNodeToNode = {"attachNodeToNode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_5attachNodeToNode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_4attachNodeToNode};
80963 static PyObject *__pyx_pw_3mbd_11CouplingFSI_5attachNodeToNode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
80964  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable1 = 0;
80965  int __pyx_v_node1;
80966  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable2 = 0;
80967  int __pyx_v_node2;
80968  int __pyx_lineno = 0;
80969  const char *__pyx_filename = NULL;
80970  int __pyx_clineno = 0;
80971  PyObject *__pyx_r = 0;
80972  __Pyx_RefNannyDeclarations
80973  __Pyx_RefNannySetupContext("attachNodeToNode (wrapper)", 0);
80974  {
80975  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cable1,&__pyx_n_s_node1,&__pyx_n_s_cable2,&__pyx_n_s_node2,0};
80976  PyObject* values[4] = {0,0,0,0};
80977  if (unlikely(__pyx_kwds)) {
80978  Py_ssize_t kw_args;
80979  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
80980  switch (pos_args) {
80981  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
80982  CYTHON_FALLTHROUGH;
80983  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
80984  CYTHON_FALLTHROUGH;
80985  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
80986  CYTHON_FALLTHROUGH;
80987  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
80988  CYTHON_FALLTHROUGH;
80989  case 0: break;
80990  default: goto __pyx_L5_argtuple_error;
80991  }
80992  kw_args = PyDict_Size(__pyx_kwds);
80993  switch (pos_args) {
80994  case 0:
80995  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cable1)) != 0)) kw_args--;
80996  else goto __pyx_L5_argtuple_error;
80997  CYTHON_FALLTHROUGH;
80998  case 1:
80999  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node1)) != 0)) kw_args--;
81000  else {
81001  __Pyx_RaiseArgtupleInvalid("attachNodeToNode", 1, 4, 4, 1); __PYX_ERR(0, 3553, __pyx_L3_error)
81002  }
81003  CYTHON_FALLTHROUGH;
81004  case 2:
81005  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cable2)) != 0)) kw_args--;
81006  else {
81007  __Pyx_RaiseArgtupleInvalid("attachNodeToNode", 1, 4, 4, 2); __PYX_ERR(0, 3553, __pyx_L3_error)
81008  }
81009  CYTHON_FALLTHROUGH;
81010  case 3:
81011  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_node2)) != 0)) kw_args--;
81012  else {
81013  __Pyx_RaiseArgtupleInvalid("attachNodeToNode", 1, 4, 4, 3); __PYX_ERR(0, 3553, __pyx_L3_error)
81014  }
81015  }
81016  if (unlikely(kw_args > 0)) {
81017  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "attachNodeToNode") < 0)) __PYX_ERR(0, 3553, __pyx_L3_error)
81018  }
81019  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
81020  goto __pyx_L5_argtuple_error;
81021  } else {
81022  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
81023  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
81024  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
81025  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
81026  }
81027  __pyx_v_cable1 = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)values[0]);
81028  __pyx_v_node1 = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_node1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3553, __pyx_L3_error)
81029  __pyx_v_cable2 = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)values[2]);
81030  __pyx_v_node2 = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_node2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3553, __pyx_L3_error)
81031  }
81032  goto __pyx_L4_argument_unpacking_done;
81033  __pyx_L5_argtuple_error:;
81034  __Pyx_RaiseArgtupleInvalid("attachNodeToNode", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3553, __pyx_L3_error)
81035  __pyx_L3_error:;
81036  __Pyx_AddTraceback("mbd.CouplingFSI.attachNodeToNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
81037  __Pyx_RefNannyFinishContext();
81038  return NULL;
81039  __pyx_L4_argument_unpacking_done:;
81040  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cable1), __pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings, 1, "cable1", 0))) __PYX_ERR(0, 3553, __pyx_L1_error)
81041  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cable2), __pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings, 1, "cable2", 0))) __PYX_ERR(0, 3553, __pyx_L1_error)
81042  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_4attachNodeToNode(__pyx_self, __pyx_v_cable1, __pyx_v_node1, __pyx_v_cable2, __pyx_v_node2);
81043 
81044  /* function exit code */
81045  goto __pyx_L0;
81046  __pyx_L1_error:;
81047  __pyx_r = NULL;
81048  __pyx_L0:;
81049  __Pyx_RefNannyFinishContext();
81050  return __pyx_r;
81051 }
81052 
81053 static PyObject *__pyx_pf_3mbd_11CouplingFSI_4attachNodeToNode(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable1, int __pyx_v_node1, struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *__pyx_v_cable2, int __pyx_v_node2) {
81054  PyObject *__pyx_r = NULL;
81055  __Pyx_TraceDeclarations
81056  __Pyx_RefNannyDeclarations
81057  PyObject *__pyx_t_1 = NULL;
81058  int __pyx_lineno = 0;
81059  const char *__pyx_filename = NULL;
81060  int __pyx_clineno = 0;
81061  __Pyx_TraceFrameInit(__pyx_codeobj__208)
81062  __Pyx_RefNannySetupContext("attachNodeToNode", 0);
81063  __Pyx_TraceCall("attachNodeToNode (wrapper)", __pyx_f[0], 3553, 0, __PYX_ERR(0, 3553, __pyx_L1_error));
81064  __Pyx_XDECREF(__pyx_r);
81065  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_3mbd_11CouplingFSI_attachNodeToNode(__pyx_v_cable1, __pyx_v_node1, __pyx_v_cable2, __pyx_v_node2, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3553, __pyx_L1_error)
81066  __Pyx_GOTREF(__pyx_t_1);
81067  __pyx_r = __pyx_t_1;
81068  __pyx_t_1 = 0;
81069  goto __pyx_L0;
81070 
81071  /* function exit code */
81072  __pyx_L1_error:;
81073  __Pyx_XDECREF(__pyx_t_1);
81074  __Pyx_AddTraceback("mbd.CouplingFSI.attachNodeToNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
81075  __pyx_r = NULL;
81076  __pyx_L0:;
81077  __Pyx_XGIVEREF(__pyx_r);
81078  __Pyx_TraceReturn(__pyx_r, 0);
81079  __Pyx_RefNannyFinishContext();
81080  return __pyx_r;
81081 }
81082 
81083 /* "mbd/CouplingFSI.pyx":3612
81084  * """
81085  *
81086  * def __cinit__(self): # <<<<<<<<<<<<<<
81087  * # make shared_ptr object (C++ syntax for Chrono)
81088  * self.sharedptr = make_shared[ch.ChBodyAddedMass]()
81089  */
81090 
81091 /* Python wrapper */
81092 static int __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
81093 static int __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
81094  int __pyx_r;
81095  __Pyx_RefNannyDeclarations
81096  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
81097  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
81098  __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
81099  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
81100  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass___cinit__(((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_v_self));
81101 
81102  /* function exit code */
81103  __Pyx_RefNannyFinishContext();
81104  return __pyx_r;
81105 }
81106 
81107 static int __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass___cinit__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self) {
81108  SwigPyObject *__pyx_v_swig_obj;
81109  int __pyx_r;
81110  __Pyx_TraceDeclarations
81111  __Pyx_RefNannyDeclarations
81112  std::shared_ptr<ChBodyAddedMass> __pyx_t_1;
81113  PyObject *__pyx_t_2 = NULL;
81114  PyObject *__pyx_t_3 = NULL;
81115  PyObject *__pyx_t_4 = NULL;
81116  int __pyx_lineno = 0;
81117  const char *__pyx_filename = NULL;
81118  int __pyx_clineno = 0;
81119  __Pyx_RefNannySetupContext("__cinit__", 0);
81120  __Pyx_TraceCall("__cinit__", __pyx_f[0], 3612, 0, __PYX_ERR(0, 3612, __pyx_L1_error));
81121 
81122  /* "mbd/CouplingFSI.pyx":3614
81123  * def __cinit__(self):
81124  * # make shared_ptr object (C++ syntax for Chrono)
81125  * self.sharedptr = make_shared[ch.ChBodyAddedMass]() # <<<<<<<<<<<<<<
81126  * self.sharedptr_chbody = <shared_ptr[ch.ChBody]> self.sharedptr
81127  * # get a raw ptr for SWIG
81128  */
81129  try {
81130  __pyx_t_1 = std::make_shared<ChBodyAddedMass>();
81131  } catch(...) {
81132  __Pyx_CppExn2PyErr();
81133  __PYX_ERR(0, 3614, __pyx_L1_error)
81134  }
81135  __pyx_v_self->sharedptr = __pyx_t_1;
81136 
81137  /* "mbd/CouplingFSI.pyx":3615
81138  * # make shared_ptr object (C++ syntax for Chrono)
81139  * self.sharedptr = make_shared[ch.ChBodyAddedMass]()
81140  * self.sharedptr_chbody = <shared_ptr[ch.ChBody]> self.sharedptr # <<<<<<<<<<<<<<
81141  * # get a raw ptr for SWIG
81142  * self.thisptr = self.sharedptr.get()
81143  */
81144  __pyx_v_self->sharedptr_chbody = ((std::shared_ptr<ChBody> )__pyx_v_self->sharedptr);
81145 
81146  /* "mbd/CouplingFSI.pyx":3617
81147  * self.sharedptr_chbody = <shared_ptr[ch.ChBody]> self.sharedptr
81148  * # get a raw ptr for SWIG
81149  * self.thisptr = self.sharedptr.get() # <<<<<<<<<<<<<<
81150  * self.bodyptr = self.sharedptr_chbody.get()
81151  * # create SWIG ChBody
81152  */
81153  __pyx_v_self->thisptr = __pyx_v_self->sharedptr.get();
81154 
81155  /* "mbd/CouplingFSI.pyx":3618
81156  * # get a raw ptr for SWIG
81157  * self.thisptr = self.sharedptr.get()
81158  * self.bodyptr = self.sharedptr_chbody.get() # <<<<<<<<<<<<<<
81159  * # create SWIG ChBody
81160  * self.ChBodySWIG = chrono.ChBody()
81161  */
81162  __pyx_v_self->bodyptr = __pyx_v_self->sharedptr_chbody.get();
81163 
81164  /* "mbd/CouplingFSI.pyx":3620
81165  * self.bodyptr = self.sharedptr_chbody.get()
81166  * # create SWIG ChBody
81167  * self.ChBodySWIG = chrono.ChBody() # <<<<<<<<<<<<<<
81168  * self.ChBodySWIG.this.disown()
81169  * # delete? object pointed to by SWIG
81170  */
81171  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_chrono); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3620, __pyx_L1_error)
81172  __Pyx_GOTREF(__pyx_t_3);
81173  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ChBody); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3620, __pyx_L1_error)
81174  __Pyx_GOTREF(__pyx_t_4);
81175  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
81176  __pyx_t_3 = NULL;
81177  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
81178  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
81179  if (likely(__pyx_t_3)) {
81180  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
81181  __Pyx_INCREF(__pyx_t_3);
81182  __Pyx_INCREF(function);
81183  __Pyx_DECREF_SET(__pyx_t_4, function);
81184  }
81185  }
81186  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
81187  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
81188  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3620, __pyx_L1_error)
81189  __Pyx_GOTREF(__pyx_t_2);
81190  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81191  __Pyx_GIVEREF(__pyx_t_2);
81192  __Pyx_GOTREF(__pyx_v_self->ChBodySWIG);
81193  __Pyx_DECREF(__pyx_v_self->ChBodySWIG);
81194  __pyx_v_self->ChBodySWIG = __pyx_t_2;
81195  __pyx_t_2 = 0;
81196 
81197  /* "mbd/CouplingFSI.pyx":3621
81198  * # create SWIG ChBody
81199  * self.ChBodySWIG = chrono.ChBody()
81200  * self.ChBodySWIG.this.disown() # <<<<<<<<<<<<<<
81201  * # delete? object pointed to by SWIG
81202  * # point to new object (base of ChBodyAddedMass: ChBody)
81203  */
81204  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBodySWIG, __pyx_n_s_this); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3621, __pyx_L1_error)
81205  __Pyx_GOTREF(__pyx_t_4);
81206  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_disown); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3621, __pyx_L1_error)
81207  __Pyx_GOTREF(__pyx_t_3);
81208  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81209  __pyx_t_4 = NULL;
81210  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
81211  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
81212  if (likely(__pyx_t_4)) {
81213  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
81214  __Pyx_INCREF(__pyx_t_4);
81215  __Pyx_INCREF(function);
81216  __Pyx_DECREF_SET(__pyx_t_3, function);
81217  }
81218  }
81219  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
81220  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
81221  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3621, __pyx_L1_error)
81222  __Pyx_GOTREF(__pyx_t_2);
81223  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
81224  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
81225 
81226  /* "mbd/CouplingFSI.pyx":3624
81227  * # delete? object pointed to by SWIG
81228  * # point to new object (base of ChBodyAddedMass: ChBody)
81229  * cdef SwigPyObject *swig_obj = <SwigPyObject*>self.ChBodySWIG.this # <<<<<<<<<<<<<<
81230  * swig_obj.ptr = <shared_ptr[ch.ChBody]*> &self.sharedptr_chbody
81231  * # cdef shared_ptr[ch.ChSystemSMC]* pt_to_shp = <shared_ptr[ch.ChSystemSMC]*> swig_obj.ptr;
81232  */
81233  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->ChBodySWIG, __pyx_n_s_this); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3624, __pyx_L1_error)
81234  __Pyx_GOTREF(__pyx_t_2);
81235  __pyx_v_swig_obj = ((SwigPyObject *)__pyx_t_2);
81236  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
81237 
81238  /* "mbd/CouplingFSI.pyx":3625
81239  * # point to new object (base of ChBodyAddedMass: ChBody)
81240  * cdef SwigPyObject *swig_obj = <SwigPyObject*>self.ChBodySWIG.this
81241  * swig_obj.ptr = <shared_ptr[ch.ChBody]*> &self.sharedptr_chbody # <<<<<<<<<<<<<<
81242  * # cdef shared_ptr[ch.ChSystemSMC]* pt_to_shp = <shared_ptr[ch.ChSystemSMC]*> swig_obj.ptr;
81243  * # self.thisptr.system = pt_to_shp[0]
81244  */
81245  __pyx_v_swig_obj->ptr = ((std::shared_ptr<ChBody> *)(&__pyx_v_self->sharedptr_chbody));
81246 
81247  /* "mbd/CouplingFSI.pyx":3612
81248  * """
81249  *
81250  * def __cinit__(self): # <<<<<<<<<<<<<<
81251  * # make shared_ptr object (C++ syntax for Chrono)
81252  * self.sharedptr = make_shared[ch.ChBodyAddedMass]()
81253  */
81254 
81255  /* function exit code */
81256  __pyx_r = 0;
81257  goto __pyx_L0;
81258  __pyx_L1_error:;
81259  __Pyx_XDECREF(__pyx_t_2);
81260  __Pyx_XDECREF(__pyx_t_3);
81261  __Pyx_XDECREF(__pyx_t_4);
81262  __Pyx_AddTraceback("mbd.CouplingFSI.ChBodyAddedMass.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
81263  __pyx_r = -1;
81264  __pyx_L0:;
81265  __Pyx_TraceReturn(Py_None, 0);
81266  __Pyx_RefNannyFinishContext();
81267  return __pyx_r;
81268 }
81269 
81270 /* "mbd/CouplingFSI.pyx":3631
81271  * # swig_obj.ptr = <ch.ChBody*?> &self.bodyptr
81272  *
81273  * cdef void SetMfullmass(self, ch.ChMatrixDynamic Mfullmass_in): # <<<<<<<<<<<<<<
81274  * self.thisptr.SetMfullmass(Mfullmass_in)
81275  *
81276  */
81277 
81278 static void __pyx_f_3mbd_11CouplingFSI_15ChBodyAddedMass_SetMfullmass(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self, ChMatrixDynamic<double> __pyx_v_Mfullmass_in) {
81279  __Pyx_TraceDeclarations
81280  __Pyx_RefNannyDeclarations
81281  int __pyx_lineno = 0;
81282  const char *__pyx_filename = NULL;
81283  int __pyx_clineno = 0;
81284  __Pyx_RefNannySetupContext("SetMfullmass", 0);
81285  __Pyx_TraceCall("SetMfullmass", __pyx_f[0], 3631, 0, __PYX_ERR(0, 3631, __pyx_L1_error));
81286 
81287  /* "mbd/CouplingFSI.pyx":3632
81288  *
81289  * cdef void SetMfullmass(self, ch.ChMatrixDynamic Mfullmass_in):
81290  * self.thisptr.SetMfullmass(Mfullmass_in) # <<<<<<<<<<<<<<
81291  *
81292  * # cdef void SetInvMfullmass(self, ch.ChMatrixDynamic inv_Mfullmass_in):
81293  */
81294  __pyx_v_self->thisptr->SetMfullmass(__pyx_v_Mfullmass_in);
81295 
81296  /* "mbd/CouplingFSI.pyx":3631
81297  * # swig_obj.ptr = <ch.ChBody*?> &self.bodyptr
81298  *
81299  * cdef void SetMfullmass(self, ch.ChMatrixDynamic Mfullmass_in): # <<<<<<<<<<<<<<
81300  * self.thisptr.SetMfullmass(Mfullmass_in)
81301  *
81302  */
81303 
81304  /* function exit code */
81305  goto __pyx_L0;
81306  __pyx_L1_error:;
81307  __Pyx_WriteUnraisable("mbd.CouplingFSI.ChBodyAddedMass.SetMfullmass", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
81308  __pyx_L0:;
81309  __Pyx_TraceReturn(Py_None, 0);
81310  __Pyx_RefNannyFinishContext();
81311 }
81312 
81313 /* "mbd/CouplingFSI.pxd":367
81314  * cdef ch.ChBody * bodyptr
81315  * cdef public:
81316  * object ChBodySWIG # <<<<<<<<<<<<<<
81317  * cdef void SetMfullmass(self, ch.ChMatrixDynamic Mfullmass_in)
81318  * # cdef void SetInvMfullmass(self, ch.ChMatrixDynamic inv_Mfullmass_in)
81319  */
81320 
81321 /* Python wrapper */
81322 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_1__get__(PyObject *__pyx_v_self); /*proto*/
81323 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_1__get__(PyObject *__pyx_v_self) {
81324  PyObject *__pyx_r = 0;
81325  __Pyx_RefNannyDeclarations
81326  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
81327  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG___get__(((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_v_self));
81328 
81329  /* function exit code */
81330  __Pyx_RefNannyFinishContext();
81331  return __pyx_r;
81332 }
81333 
81334 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG___get__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self) {
81335  PyObject *__pyx_r = NULL;
81336  __Pyx_TraceDeclarations
81337  __Pyx_RefNannyDeclarations
81338  int __pyx_lineno = 0;
81339  const char *__pyx_filename = NULL;
81340  int __pyx_clineno = 0;
81341  __Pyx_RefNannySetupContext("__get__", 0);
81342  __Pyx_TraceCall("__get__", __pyx_f[2], 367, 0, __PYX_ERR(2, 367, __pyx_L1_error));
81343  __Pyx_XDECREF(__pyx_r);
81344  __Pyx_INCREF(__pyx_v_self->ChBodySWIG);
81345  __pyx_r = __pyx_v_self->ChBodySWIG;
81346  goto __pyx_L0;
81347 
81348  /* function exit code */
81349  __pyx_L1_error:;
81350  __Pyx_AddTraceback("mbd.CouplingFSI.ChBodyAddedMass.ChBodySWIG.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
81351  __pyx_r = NULL;
81352  __pyx_L0:;
81353  __Pyx_XGIVEREF(__pyx_r);
81354  __Pyx_TraceReturn(__pyx_r, 0);
81355  __Pyx_RefNannyFinishContext();
81356  return __pyx_r;
81357 }
81358 
81359 /* Python wrapper */
81360 static int __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
81361 static int __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
81362  int __pyx_r;
81363  __Pyx_RefNannyDeclarations
81364  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
81365  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_2__set__(((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_v_self), ((PyObject *)__pyx_v_value));
81366 
81367  /* function exit code */
81368  __Pyx_RefNannyFinishContext();
81369  return __pyx_r;
81370 }
81371 
81372 static int __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_2__set__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self, PyObject *__pyx_v_value) {
81373  int __pyx_r;
81374  __Pyx_TraceDeclarations
81375  __Pyx_RefNannyDeclarations
81376  int __pyx_lineno = 0;
81377  const char *__pyx_filename = NULL;
81378  int __pyx_clineno = 0;
81379  __Pyx_RefNannySetupContext("__set__", 0);
81380  __Pyx_TraceCall("__set__", __pyx_f[2], 367, 0, __PYX_ERR(2, 367, __pyx_L1_error));
81381  __Pyx_INCREF(__pyx_v_value);
81382  __Pyx_GIVEREF(__pyx_v_value);
81383  __Pyx_GOTREF(__pyx_v_self->ChBodySWIG);
81384  __Pyx_DECREF(__pyx_v_self->ChBodySWIG);
81385  __pyx_v_self->ChBodySWIG = __pyx_v_value;
81386 
81387  /* function exit code */
81388  __pyx_r = 0;
81389  goto __pyx_L0;
81390  __pyx_L1_error:;
81391  __Pyx_AddTraceback("mbd.CouplingFSI.ChBodyAddedMass.ChBodySWIG.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
81392  __pyx_r = -1;
81393  __pyx_L0:;
81394  __Pyx_TraceReturn(Py_None, 0);
81395  __Pyx_RefNannyFinishContext();
81396  return __pyx_r;
81397 }
81398 
81399 /* Python wrapper */
81400 static int __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_5__del__(PyObject *__pyx_v_self); /*proto*/
81401 static int __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_5__del__(PyObject *__pyx_v_self) {
81402  int __pyx_r;
81403  __Pyx_RefNannyDeclarations
81404  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
81405  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_4__del__(((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_v_self));
81406 
81407  /* function exit code */
81408  __Pyx_RefNannyFinishContext();
81409  return __pyx_r;
81410 }
81411 
81412 static int __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_4__del__(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self) {
81413  int __pyx_r;
81414  __Pyx_TraceDeclarations
81415  __Pyx_RefNannyDeclarations
81416  int __pyx_lineno = 0;
81417  const char *__pyx_filename = NULL;
81418  int __pyx_clineno = 0;
81419  __Pyx_RefNannySetupContext("__del__", 0);
81420  __Pyx_TraceCall("__del__", __pyx_f[2], 367, 0, __PYX_ERR(2, 367, __pyx_L1_error));
81421  __Pyx_INCREF(Py_None);
81422  __Pyx_GIVEREF(Py_None);
81423  __Pyx_GOTREF(__pyx_v_self->ChBodySWIG);
81424  __Pyx_DECREF(__pyx_v_self->ChBodySWIG);
81425  __pyx_v_self->ChBodySWIG = Py_None;
81426 
81427  /* function exit code */
81428  __pyx_r = 0;
81429  goto __pyx_L0;
81430  __pyx_L1_error:;
81431  __Pyx_AddTraceback("mbd.CouplingFSI.ChBodyAddedMass.ChBodySWIG.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
81432  __pyx_r = -1;
81433  __pyx_L0:;
81434  __Pyx_TraceReturn(Py_None, 0);
81435  __Pyx_RefNannyFinishContext();
81436  return __pyx_r;
81437 }
81438 
81439 /* "(tree fragment)":1
81440  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
81441  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81442  * def __setstate_cython__(self, __pyx_state):
81443  */
81444 
81445 /* Python wrapper */
81446 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
81447 static char __pyx_doc_3mbd_11CouplingFSI_15ChBodyAddedMass_2__reduce_cython__[] = "ChBodyAddedMass.__reduce_cython__(self)";
81448 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ChBodyAddedMass_3__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_3__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ChBodyAddedMass_2__reduce_cython__};
81449 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
81450  PyObject *__pyx_r = 0;
81451  __Pyx_RefNannyDeclarations
81452  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
81453  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_2__reduce_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_v_self));
81454 
81455  /* function exit code */
81456  __Pyx_RefNannyFinishContext();
81457  return __pyx_r;
81458 }
81459 
81460 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self) {
81461  PyObject *__pyx_r = NULL;
81462  __Pyx_TraceDeclarations
81463  __Pyx_RefNannyDeclarations
81464  PyObject *__pyx_t_1 = NULL;
81465  int __pyx_lineno = 0;
81466  const char *__pyx_filename = NULL;
81467  int __pyx_clineno = 0;
81468  __Pyx_TraceFrameInit(__pyx_codeobj__209)
81469  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
81470  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
81471 
81472  /* "(tree fragment)":2
81473  * def __reduce_cython__(self):
81474  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
81475  * def __setstate_cython__(self, __pyx_state):
81476  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81477  */
81478  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__210, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
81479  __Pyx_GOTREF(__pyx_t_1);
81480  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
81481  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
81482  __PYX_ERR(1, 2, __pyx_L1_error)
81483 
81484  /* "(tree fragment)":1
81485  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
81486  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81487  * def __setstate_cython__(self, __pyx_state):
81488  */
81489 
81490  /* function exit code */
81491  __pyx_L1_error:;
81492  __Pyx_XDECREF(__pyx_t_1);
81493  __Pyx_AddTraceback("mbd.CouplingFSI.ChBodyAddedMass.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
81494  __pyx_r = NULL;
81495  __Pyx_XGIVEREF(__pyx_r);
81496  __Pyx_TraceReturn(__pyx_r, 0);
81497  __Pyx_RefNannyFinishContext();
81498  return __pyx_r;
81499 }
81500 
81501 /* "(tree fragment)":3
81502  * def __reduce_cython__(self):
81503  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81504  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
81505  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81506  */
81507 
81508 /* Python wrapper */
81509 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
81510 static char __pyx_doc_3mbd_11CouplingFSI_15ChBodyAddedMass_4__setstate_cython__[] = "ChBodyAddedMass.__setstate_cython__(self, __pyx_state)";
81511 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15ChBodyAddedMass_5__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_5__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_15ChBodyAddedMass_4__setstate_cython__};
81512 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
81513  PyObject *__pyx_r = 0;
81514  __Pyx_RefNannyDeclarations
81515  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
81516  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_4__setstate_cython__(((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
81517 
81518  /* function exit code */
81519  __Pyx_RefNannyFinishContext();
81520  return __pyx_r;
81521 }
81522 
81523 static PyObject *__pyx_pf_3mbd_11CouplingFSI_15ChBodyAddedMass_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
81524  PyObject *__pyx_r = NULL;
81525  __Pyx_TraceDeclarations
81526  __Pyx_RefNannyDeclarations
81527  PyObject *__pyx_t_1 = NULL;
81528  int __pyx_lineno = 0;
81529  const char *__pyx_filename = NULL;
81530  int __pyx_clineno = 0;
81531  __Pyx_TraceFrameInit(__pyx_codeobj__211)
81532  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
81533  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
81534 
81535  /* "(tree fragment)":4
81536  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81537  * def __setstate_cython__(self, __pyx_state):
81538  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
81539  */
81540  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__212, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
81541  __Pyx_GOTREF(__pyx_t_1);
81542  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
81543  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
81544  __PYX_ERR(1, 4, __pyx_L1_error)
81545 
81546  /* "(tree fragment)":3
81547  * def __reduce_cython__(self):
81548  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81549  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
81550  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
81551  */
81552 
81553  /* function exit code */
81554  __pyx_L1_error:;
81555  __Pyx_XDECREF(__pyx_t_1);
81556  __Pyx_AddTraceback("mbd.CouplingFSI.ChBodyAddedMass.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
81557  __pyx_r = NULL;
81558  __Pyx_XGIVEREF(__pyx_r);
81559  __Pyx_TraceReturn(__pyx_r, 0);
81560  __Pyx_RefNannyFinishContext();
81561  return __pyx_r;
81562 }
81563 
81564 /* "mbd/CouplingFSI.pyx":3641
81565  *
81566  *
81567  * def vec2array(vec): # <<<<<<<<<<<<<<
81568  * return np.array([vec.x(), vec.y(), vec.z()])
81569  *
81570  */
81571 
81572 /* Python wrapper */
81573 static PyObject *__pyx_pw_3mbd_11CouplingFSI_7vec2array(PyObject *__pyx_self, PyObject *__pyx_v_vec); /*proto*/
81574 static char __pyx_doc_3mbd_11CouplingFSI_6vec2array[] = "vec2array(vec)";
81575 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_7vec2array = {"vec2array", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_7vec2array, METH_O, __pyx_doc_3mbd_11CouplingFSI_6vec2array};
81576 static PyObject *__pyx_pw_3mbd_11CouplingFSI_7vec2array(PyObject *__pyx_self, PyObject *__pyx_v_vec) {
81577  PyObject *__pyx_r = 0;
81578  __Pyx_RefNannyDeclarations
81579  __Pyx_RefNannySetupContext("vec2array (wrapper)", 0);
81580  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_6vec2array(__pyx_self, ((PyObject *)__pyx_v_vec));
81581 
81582  /* function exit code */
81583  __Pyx_RefNannyFinishContext();
81584  return __pyx_r;
81585 }
81586 
81587 static PyObject *__pyx_pf_3mbd_11CouplingFSI_6vec2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec) {
81588  PyObject *__pyx_r = NULL;
81589  __Pyx_TraceDeclarations
81590  __Pyx_RefNannyDeclarations
81591  PyObject *__pyx_t_1 = NULL;
81592  PyObject *__pyx_t_2 = NULL;
81593  PyObject *__pyx_t_3 = NULL;
81594  PyObject *__pyx_t_4 = NULL;
81595  PyObject *__pyx_t_5 = NULL;
81596  PyObject *__pyx_t_6 = NULL;
81597  PyObject *__pyx_t_7 = NULL;
81598  int __pyx_lineno = 0;
81599  const char *__pyx_filename = NULL;
81600  int __pyx_clineno = 0;
81601  __Pyx_TraceFrameInit(__pyx_codeobj__213)
81602  __Pyx_RefNannySetupContext("vec2array", 0);
81603  __Pyx_TraceCall("vec2array", __pyx_f[0], 3641, 0, __PYX_ERR(0, 3641, __pyx_L1_error));
81604 
81605  /* "mbd/CouplingFSI.pyx":3642
81606  *
81607  * def vec2array(vec):
81608  * return np.array([vec.x(), vec.y(), vec.z()]) # <<<<<<<<<<<<<<
81609  *
81610  * def pyvec2array(vec):
81611  */
81612  __Pyx_XDECREF(__pyx_r);
81613  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3642, __pyx_L1_error)
81614  __Pyx_GOTREF(__pyx_t_2);
81615  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3642, __pyx_L1_error)
81616  __Pyx_GOTREF(__pyx_t_3);
81617  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
81618  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_vec, __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3642, __pyx_L1_error)
81619  __Pyx_GOTREF(__pyx_t_4);
81620  __pyx_t_5 = NULL;
81621  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
81622  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
81623  if (likely(__pyx_t_5)) {
81624  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
81625  __Pyx_INCREF(__pyx_t_5);
81626  __Pyx_INCREF(function);
81627  __Pyx_DECREF_SET(__pyx_t_4, function);
81628  }
81629  }
81630  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
81631  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
81632  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3642, __pyx_L1_error)
81633  __Pyx_GOTREF(__pyx_t_2);
81634  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81635  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_vec, __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3642, __pyx_L1_error)
81636  __Pyx_GOTREF(__pyx_t_5);
81637  __pyx_t_6 = NULL;
81638  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
81639  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
81640  if (likely(__pyx_t_6)) {
81641  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
81642  __Pyx_INCREF(__pyx_t_6);
81643  __Pyx_INCREF(function);
81644  __Pyx_DECREF_SET(__pyx_t_5, function);
81645  }
81646  }
81647  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
81648  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
81649  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3642, __pyx_L1_error)
81650  __Pyx_GOTREF(__pyx_t_4);
81651  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
81652  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_vec, __pyx_n_s_z); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3642, __pyx_L1_error)
81653  __Pyx_GOTREF(__pyx_t_6);
81654  __pyx_t_7 = NULL;
81655  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
81656  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
81657  if (likely(__pyx_t_7)) {
81658  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
81659  __Pyx_INCREF(__pyx_t_7);
81660  __Pyx_INCREF(function);
81661  __Pyx_DECREF_SET(__pyx_t_6, function);
81662  }
81663  }
81664  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
81665  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
81666  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3642, __pyx_L1_error)
81667  __Pyx_GOTREF(__pyx_t_5);
81668  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
81669  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3642, __pyx_L1_error)
81670  __Pyx_GOTREF(__pyx_t_6);
81671  __Pyx_GIVEREF(__pyx_t_2);
81672  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
81673  __Pyx_GIVEREF(__pyx_t_4);
81674  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
81675  __Pyx_GIVEREF(__pyx_t_5);
81676  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
81677  __pyx_t_2 = 0;
81678  __pyx_t_4 = 0;
81679  __pyx_t_5 = 0;
81680  __pyx_t_5 = NULL;
81681  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
81682  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
81683  if (likely(__pyx_t_5)) {
81684  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
81685  __Pyx_INCREF(__pyx_t_5);
81686  __Pyx_INCREF(function);
81687  __Pyx_DECREF_SET(__pyx_t_3, function);
81688  }
81689  }
81690  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
81691  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
81692  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
81693  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3642, __pyx_L1_error)
81694  __Pyx_GOTREF(__pyx_t_1);
81695  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
81696  __pyx_r = __pyx_t_1;
81697  __pyx_t_1 = 0;
81698  goto __pyx_L0;
81699 
81700  /* "mbd/CouplingFSI.pyx":3641
81701  *
81702  *
81703  * def vec2array(vec): # <<<<<<<<<<<<<<
81704  * return np.array([vec.x(), vec.y(), vec.z()])
81705  *
81706  */
81707 
81708  /* function exit code */
81709  __pyx_L1_error:;
81710  __Pyx_XDECREF(__pyx_t_1);
81711  __Pyx_XDECREF(__pyx_t_2);
81712  __Pyx_XDECREF(__pyx_t_3);
81713  __Pyx_XDECREF(__pyx_t_4);
81714  __Pyx_XDECREF(__pyx_t_5);
81715  __Pyx_XDECREF(__pyx_t_6);
81716  __Pyx_XDECREF(__pyx_t_7);
81717  __Pyx_AddTraceback("mbd.CouplingFSI.vec2array", __pyx_clineno, __pyx_lineno, __pyx_filename);
81718  __pyx_r = NULL;
81719  __pyx_L0:;
81720  __Pyx_XGIVEREF(__pyx_r);
81721  __Pyx_TraceReturn(__pyx_r, 0);
81722  __Pyx_RefNannyFinishContext();
81723  return __pyx_r;
81724 }
81725 
81726 /* "mbd/CouplingFSI.pyx":3644
81727  * return np.array([vec.x(), vec.y(), vec.z()])
81728  *
81729  * def pyvec2array(vec): # <<<<<<<<<<<<<<
81730  * return np.array([vec.x, vec.y, vec.z])
81731  *
81732  */
81733 
81734 /* Python wrapper */
81735 static PyObject *__pyx_pw_3mbd_11CouplingFSI_9pyvec2array(PyObject *__pyx_self, PyObject *__pyx_v_vec); /*proto*/
81736 static char __pyx_doc_3mbd_11CouplingFSI_8pyvec2array[] = "pyvec2array(vec)";
81737 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_9pyvec2array = {"pyvec2array", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_9pyvec2array, METH_O, __pyx_doc_3mbd_11CouplingFSI_8pyvec2array};
81738 static PyObject *__pyx_pw_3mbd_11CouplingFSI_9pyvec2array(PyObject *__pyx_self, PyObject *__pyx_v_vec) {
81739  PyObject *__pyx_r = 0;
81740  __Pyx_RefNannyDeclarations
81741  __Pyx_RefNannySetupContext("pyvec2array (wrapper)", 0);
81742  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_8pyvec2array(__pyx_self, ((PyObject *)__pyx_v_vec));
81743 
81744  /* function exit code */
81745  __Pyx_RefNannyFinishContext();
81746  return __pyx_r;
81747 }
81748 
81749 static PyObject *__pyx_pf_3mbd_11CouplingFSI_8pyvec2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vec) {
81750  PyObject *__pyx_r = NULL;
81751  __Pyx_TraceDeclarations
81752  __Pyx_RefNannyDeclarations
81753  PyObject *__pyx_t_1 = NULL;
81754  PyObject *__pyx_t_2 = NULL;
81755  PyObject *__pyx_t_3 = NULL;
81756  PyObject *__pyx_t_4 = NULL;
81757  PyObject *__pyx_t_5 = NULL;
81758  PyObject *__pyx_t_6 = NULL;
81759  int __pyx_lineno = 0;
81760  const char *__pyx_filename = NULL;
81761  int __pyx_clineno = 0;
81762  __Pyx_TraceFrameInit(__pyx_codeobj__214)
81763  __Pyx_RefNannySetupContext("pyvec2array", 0);
81764  __Pyx_TraceCall("pyvec2array", __pyx_f[0], 3644, 0, __PYX_ERR(0, 3644, __pyx_L1_error));
81765 
81766  /* "mbd/CouplingFSI.pyx":3645
81767  *
81768  * def pyvec2array(vec):
81769  * return np.array([vec.x, vec.y, vec.z]) # <<<<<<<<<<<<<<
81770  *
81771  * def mat332array(mat):
81772  */
81773  __Pyx_XDECREF(__pyx_r);
81774  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3645, __pyx_L1_error)
81775  __Pyx_GOTREF(__pyx_t_2);
81776  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3645, __pyx_L1_error)
81777  __Pyx_GOTREF(__pyx_t_3);
81778  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
81779  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_vec, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3645, __pyx_L1_error)
81780  __Pyx_GOTREF(__pyx_t_2);
81781  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_vec, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3645, __pyx_L1_error)
81782  __Pyx_GOTREF(__pyx_t_4);
81783  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_vec, __pyx_n_s_z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3645, __pyx_L1_error)
81784  __Pyx_GOTREF(__pyx_t_5);
81785  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3645, __pyx_L1_error)
81786  __Pyx_GOTREF(__pyx_t_6);
81787  __Pyx_GIVEREF(__pyx_t_2);
81788  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
81789  __Pyx_GIVEREF(__pyx_t_4);
81790  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
81791  __Pyx_GIVEREF(__pyx_t_5);
81792  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
81793  __pyx_t_2 = 0;
81794  __pyx_t_4 = 0;
81795  __pyx_t_5 = 0;
81796  __pyx_t_5 = NULL;
81797  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
81798  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
81799  if (likely(__pyx_t_5)) {
81800  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
81801  __Pyx_INCREF(__pyx_t_5);
81802  __Pyx_INCREF(function);
81803  __Pyx_DECREF_SET(__pyx_t_3, function);
81804  }
81805  }
81806  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6);
81807  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
81808  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
81809  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3645, __pyx_L1_error)
81810  __Pyx_GOTREF(__pyx_t_1);
81811  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
81812  __pyx_r = __pyx_t_1;
81813  __pyx_t_1 = 0;
81814  goto __pyx_L0;
81815 
81816  /* "mbd/CouplingFSI.pyx":3644
81817  * return np.array([vec.x(), vec.y(), vec.z()])
81818  *
81819  * def pyvec2array(vec): # <<<<<<<<<<<<<<
81820  * return np.array([vec.x, vec.y, vec.z])
81821  *
81822  */
81823 
81824  /* function exit code */
81825  __pyx_L1_error:;
81826  __Pyx_XDECREF(__pyx_t_1);
81827  __Pyx_XDECREF(__pyx_t_2);
81828  __Pyx_XDECREF(__pyx_t_3);
81829  __Pyx_XDECREF(__pyx_t_4);
81830  __Pyx_XDECREF(__pyx_t_5);
81831  __Pyx_XDECREF(__pyx_t_6);
81832  __Pyx_AddTraceback("mbd.CouplingFSI.pyvec2array", __pyx_clineno, __pyx_lineno, __pyx_filename);
81833  __pyx_r = NULL;
81834  __pyx_L0:;
81835  __Pyx_XGIVEREF(__pyx_r);
81836  __Pyx_TraceReturn(__pyx_r, 0);
81837  __Pyx_RefNannyFinishContext();
81838  return __pyx_r;
81839 }
81840 
81841 /* "mbd/CouplingFSI.pyx":3647
81842  * return np.array([vec.x, vec.y, vec.z])
81843  *
81844  * def mat332array(mat): # <<<<<<<<<<<<<<
81845  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()],
81846  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()],
81847  */
81848 
81849 /* Python wrapper */
81850 static PyObject *__pyx_pw_3mbd_11CouplingFSI_11mat332array(PyObject *__pyx_self, PyObject *__pyx_v_mat); /*proto*/
81851 static char __pyx_doc_3mbd_11CouplingFSI_10mat332array[] = "mat332array(mat)";
81852 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_11mat332array = {"mat332array", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_11mat332array, METH_O, __pyx_doc_3mbd_11CouplingFSI_10mat332array};
81853 static PyObject *__pyx_pw_3mbd_11CouplingFSI_11mat332array(PyObject *__pyx_self, PyObject *__pyx_v_mat) {
81854  PyObject *__pyx_r = 0;
81855  __Pyx_RefNannyDeclarations
81856  __Pyx_RefNannySetupContext("mat332array (wrapper)", 0);
81857  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_10mat332array(__pyx_self, ((PyObject *)__pyx_v_mat));
81858 
81859  /* function exit code */
81860  __Pyx_RefNannyFinishContext();
81861  return __pyx_r;
81862 }
81863 
81864 static PyObject *__pyx_pf_3mbd_11CouplingFSI_10mat332array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mat) {
81865  PyObject *__pyx_r = NULL;
81866  __Pyx_TraceDeclarations
81867  __Pyx_RefNannyDeclarations
81868  PyObject *__pyx_t_1 = NULL;
81869  PyObject *__pyx_t_2 = NULL;
81870  PyObject *__pyx_t_3 = NULL;
81871  PyObject *__pyx_t_4 = NULL;
81872  PyObject *__pyx_t_5 = NULL;
81873  PyObject *__pyx_t_6 = NULL;
81874  PyObject *__pyx_t_7 = NULL;
81875  PyObject *__pyx_t_8 = NULL;
81876  PyObject *__pyx_t_9 = NULL;
81877  PyObject *__pyx_t_10 = NULL;
81878  int __pyx_lineno = 0;
81879  const char *__pyx_filename = NULL;
81880  int __pyx_clineno = 0;
81881  __Pyx_TraceFrameInit(__pyx_codeobj__215)
81882  __Pyx_RefNannySetupContext("mat332array", 0);
81883  __Pyx_TraceCall("mat332array", __pyx_f[0], 3647, 0, __PYX_ERR(0, 3647, __pyx_L1_error));
81884 
81885  /* "mbd/CouplingFSI.pyx":3648
81886  *
81887  * def mat332array(mat):
81888  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()], # <<<<<<<<<<<<<<
81889  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()],
81890  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]])
81891  */
81892  __Pyx_XDECREF(__pyx_r);
81893  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3648, __pyx_L1_error)
81894  __Pyx_GOTREF(__pyx_t_2);
81895  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3648, __pyx_L1_error)
81896  __Pyx_GOTREF(__pyx_t_3);
81897  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
81898  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Xaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3648, __pyx_L1_error)
81899  __Pyx_GOTREF(__pyx_t_5);
81900  __pyx_t_6 = NULL;
81901  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
81902  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
81903  if (likely(__pyx_t_6)) {
81904  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
81905  __Pyx_INCREF(__pyx_t_6);
81906  __Pyx_INCREF(function);
81907  __Pyx_DECREF_SET(__pyx_t_5, function);
81908  }
81909  }
81910  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
81911  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
81912  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3648, __pyx_L1_error)
81913  __Pyx_GOTREF(__pyx_t_4);
81914  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
81915  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3648, __pyx_L1_error)
81916  __Pyx_GOTREF(__pyx_t_5);
81917  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81918  __pyx_t_4 = NULL;
81919  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
81920  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
81921  if (likely(__pyx_t_4)) {
81922  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
81923  __Pyx_INCREF(__pyx_t_4);
81924  __Pyx_INCREF(function);
81925  __Pyx_DECREF_SET(__pyx_t_5, function);
81926  }
81927  }
81928  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
81929  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
81930  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3648, __pyx_L1_error)
81931  __Pyx_GOTREF(__pyx_t_2);
81932  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
81933  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Xaxis); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3648, __pyx_L1_error)
81934  __Pyx_GOTREF(__pyx_t_6);
81935  __pyx_t_7 = NULL;
81936  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
81937  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
81938  if (likely(__pyx_t_7)) {
81939  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
81940  __Pyx_INCREF(__pyx_t_7);
81941  __Pyx_INCREF(function);
81942  __Pyx_DECREF_SET(__pyx_t_6, function);
81943  }
81944  }
81945  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
81946  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
81947  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3648, __pyx_L1_error)
81948  __Pyx_GOTREF(__pyx_t_4);
81949  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
81950  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_y); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3648, __pyx_L1_error)
81951  __Pyx_GOTREF(__pyx_t_6);
81952  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81953  __pyx_t_4 = NULL;
81954  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
81955  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
81956  if (likely(__pyx_t_4)) {
81957  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
81958  __Pyx_INCREF(__pyx_t_4);
81959  __Pyx_INCREF(function);
81960  __Pyx_DECREF_SET(__pyx_t_6, function);
81961  }
81962  }
81963  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
81964  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
81965  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3648, __pyx_L1_error)
81966  __Pyx_GOTREF(__pyx_t_5);
81967  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
81968  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Xaxis); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3648, __pyx_L1_error)
81969  __Pyx_GOTREF(__pyx_t_7);
81970  __pyx_t_8 = NULL;
81971  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
81972  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
81973  if (likely(__pyx_t_8)) {
81974  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
81975  __Pyx_INCREF(__pyx_t_8);
81976  __Pyx_INCREF(function);
81977  __Pyx_DECREF_SET(__pyx_t_7, function);
81978  }
81979  }
81980  __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
81981  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
81982  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3648, __pyx_L1_error)
81983  __Pyx_GOTREF(__pyx_t_4);
81984  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
81985  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_z); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3648, __pyx_L1_error)
81986  __Pyx_GOTREF(__pyx_t_7);
81987  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
81988  __pyx_t_4 = NULL;
81989  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
81990  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
81991  if (likely(__pyx_t_4)) {
81992  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
81993  __Pyx_INCREF(__pyx_t_4);
81994  __Pyx_INCREF(function);
81995  __Pyx_DECREF_SET(__pyx_t_7, function);
81996  }
81997  }
81998  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
81999  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
82000  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3648, __pyx_L1_error)
82001  __Pyx_GOTREF(__pyx_t_6);
82002  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82003  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3648, __pyx_L1_error)
82004  __Pyx_GOTREF(__pyx_t_7);
82005  __Pyx_GIVEREF(__pyx_t_2);
82006  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
82007  __Pyx_GIVEREF(__pyx_t_5);
82008  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
82009  __Pyx_GIVEREF(__pyx_t_6);
82010  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_6);
82011  __pyx_t_2 = 0;
82012  __pyx_t_5 = 0;
82013  __pyx_t_6 = 0;
82014 
82015  /* "mbd/CouplingFSI.pyx":3649
82016  * def mat332array(mat):
82017  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()],
82018  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()], # <<<<<<<<<<<<<<
82019  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]])
82020  *
82021  */
82022  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Yaxis); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3649, __pyx_L1_error)
82023  __Pyx_GOTREF(__pyx_t_2);
82024  __pyx_t_4 = NULL;
82025  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
82026  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
82027  if (likely(__pyx_t_4)) {
82028  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
82029  __Pyx_INCREF(__pyx_t_4);
82030  __Pyx_INCREF(function);
82031  __Pyx_DECREF_SET(__pyx_t_2, function);
82032  }
82033  }
82034  __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
82035  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
82036  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3649, __pyx_L1_error)
82037  __Pyx_GOTREF(__pyx_t_5);
82038  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82039  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3649, __pyx_L1_error)
82040  __Pyx_GOTREF(__pyx_t_2);
82041  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82042  __pyx_t_5 = NULL;
82043  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
82044  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
82045  if (likely(__pyx_t_5)) {
82046  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
82047  __Pyx_INCREF(__pyx_t_5);
82048  __Pyx_INCREF(function);
82049  __Pyx_DECREF_SET(__pyx_t_2, function);
82050  }
82051  }
82052  __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
82053  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82054  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3649, __pyx_L1_error)
82055  __Pyx_GOTREF(__pyx_t_6);
82056  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82057  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Yaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3649, __pyx_L1_error)
82058  __Pyx_GOTREF(__pyx_t_4);
82059  __pyx_t_8 = NULL;
82060  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
82061  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
82062  if (likely(__pyx_t_8)) {
82063  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82064  __Pyx_INCREF(__pyx_t_8);
82065  __Pyx_INCREF(function);
82066  __Pyx_DECREF_SET(__pyx_t_4, function);
82067  }
82068  }
82069  __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
82070  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
82071  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3649, __pyx_L1_error)
82072  __Pyx_GOTREF(__pyx_t_5);
82073  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82074  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3649, __pyx_L1_error)
82075  __Pyx_GOTREF(__pyx_t_4);
82076  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82077  __pyx_t_5 = NULL;
82078  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
82079  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
82080  if (likely(__pyx_t_5)) {
82081  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82082  __Pyx_INCREF(__pyx_t_5);
82083  __Pyx_INCREF(function);
82084  __Pyx_DECREF_SET(__pyx_t_4, function);
82085  }
82086  }
82087  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
82088  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82089  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3649, __pyx_L1_error)
82090  __Pyx_GOTREF(__pyx_t_2);
82091  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82092  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Yaxis); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3649, __pyx_L1_error)
82093  __Pyx_GOTREF(__pyx_t_8);
82094  __pyx_t_9 = NULL;
82095  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
82096  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
82097  if (likely(__pyx_t_9)) {
82098  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
82099  __Pyx_INCREF(__pyx_t_9);
82100  __Pyx_INCREF(function);
82101  __Pyx_DECREF_SET(__pyx_t_8, function);
82102  }
82103  }
82104  __pyx_t_5 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
82105  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
82106  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3649, __pyx_L1_error)
82107  __Pyx_GOTREF(__pyx_t_5);
82108  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
82109  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_z); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3649, __pyx_L1_error)
82110  __Pyx_GOTREF(__pyx_t_8);
82111  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82112  __pyx_t_5 = NULL;
82113  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
82114  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
82115  if (likely(__pyx_t_5)) {
82116  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
82117  __Pyx_INCREF(__pyx_t_5);
82118  __Pyx_INCREF(function);
82119  __Pyx_DECREF_SET(__pyx_t_8, function);
82120  }
82121  }
82122  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
82123  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82124  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3649, __pyx_L1_error)
82125  __Pyx_GOTREF(__pyx_t_4);
82126  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
82127  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3649, __pyx_L1_error)
82128  __Pyx_GOTREF(__pyx_t_8);
82129  __Pyx_GIVEREF(__pyx_t_6);
82130  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
82131  __Pyx_GIVEREF(__pyx_t_2);
82132  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
82133  __Pyx_GIVEREF(__pyx_t_4);
82134  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_4);
82135  __pyx_t_6 = 0;
82136  __pyx_t_2 = 0;
82137  __pyx_t_4 = 0;
82138 
82139  /* "mbd/CouplingFSI.pyx":3650
82140  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()],
82141  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()],
82142  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]]) # <<<<<<<<<<<<<<
82143  *
82144  * def pymat332array(mat):
82145  */
82146  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Zaxis); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3650, __pyx_L1_error)
82147  __Pyx_GOTREF(__pyx_t_6);
82148  __pyx_t_5 = NULL;
82149  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
82150  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
82151  if (likely(__pyx_t_5)) {
82152  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
82153  __Pyx_INCREF(__pyx_t_5);
82154  __Pyx_INCREF(function);
82155  __Pyx_DECREF_SET(__pyx_t_6, function);
82156  }
82157  }
82158  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
82159  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82160  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3650, __pyx_L1_error)
82161  __Pyx_GOTREF(__pyx_t_2);
82162  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
82163  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_x); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3650, __pyx_L1_error)
82164  __Pyx_GOTREF(__pyx_t_6);
82165  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82166  __pyx_t_2 = NULL;
82167  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
82168  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
82169  if (likely(__pyx_t_2)) {
82170  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
82171  __Pyx_INCREF(__pyx_t_2);
82172  __Pyx_INCREF(function);
82173  __Pyx_DECREF_SET(__pyx_t_6, function);
82174  }
82175  }
82176  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
82177  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
82178  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3650, __pyx_L1_error)
82179  __Pyx_GOTREF(__pyx_t_4);
82180  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
82181  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Zaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3650, __pyx_L1_error)
82182  __Pyx_GOTREF(__pyx_t_5);
82183  __pyx_t_9 = NULL;
82184  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
82185  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
82186  if (likely(__pyx_t_9)) {
82187  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82188  __Pyx_INCREF(__pyx_t_9);
82189  __Pyx_INCREF(function);
82190  __Pyx_DECREF_SET(__pyx_t_5, function);
82191  }
82192  }
82193  __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
82194  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
82195  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3650, __pyx_L1_error)
82196  __Pyx_GOTREF(__pyx_t_2);
82197  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82198  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3650, __pyx_L1_error)
82199  __Pyx_GOTREF(__pyx_t_5);
82200  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82201  __pyx_t_2 = NULL;
82202  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
82203  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
82204  if (likely(__pyx_t_2)) {
82205  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82206  __Pyx_INCREF(__pyx_t_2);
82207  __Pyx_INCREF(function);
82208  __Pyx_DECREF_SET(__pyx_t_5, function);
82209  }
82210  }
82211  __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
82212  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
82213  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3650, __pyx_L1_error)
82214  __Pyx_GOTREF(__pyx_t_6);
82215  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82216  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Zaxis); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3650, __pyx_L1_error)
82217  __Pyx_GOTREF(__pyx_t_9);
82218  __pyx_t_10 = NULL;
82219  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
82220  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
82221  if (likely(__pyx_t_10)) {
82222  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
82223  __Pyx_INCREF(__pyx_t_10);
82224  __Pyx_INCREF(function);
82225  __Pyx_DECREF_SET(__pyx_t_9, function);
82226  }
82227  }
82228  __pyx_t_2 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
82229  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
82230  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3650, __pyx_L1_error)
82231  __Pyx_GOTREF(__pyx_t_2);
82232  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
82233  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_z); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3650, __pyx_L1_error)
82234  __Pyx_GOTREF(__pyx_t_9);
82235  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82236  __pyx_t_2 = NULL;
82237  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
82238  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
82239  if (likely(__pyx_t_2)) {
82240  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
82241  __Pyx_INCREF(__pyx_t_2);
82242  __Pyx_INCREF(function);
82243  __Pyx_DECREF_SET(__pyx_t_9, function);
82244  }
82245  }
82246  __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_9);
82247  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
82248  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3650, __pyx_L1_error)
82249  __Pyx_GOTREF(__pyx_t_5);
82250  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
82251  __pyx_t_9 = PyList_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3650, __pyx_L1_error)
82252  __Pyx_GOTREF(__pyx_t_9);
82253  __Pyx_GIVEREF(__pyx_t_4);
82254  PyList_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
82255  __Pyx_GIVEREF(__pyx_t_6);
82256  PyList_SET_ITEM(__pyx_t_9, 1, __pyx_t_6);
82257  __Pyx_GIVEREF(__pyx_t_5);
82258  PyList_SET_ITEM(__pyx_t_9, 2, __pyx_t_5);
82259  __pyx_t_4 = 0;
82260  __pyx_t_6 = 0;
82261  __pyx_t_5 = 0;
82262 
82263  /* "mbd/CouplingFSI.pyx":3648
82264  *
82265  * def mat332array(mat):
82266  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()], # <<<<<<<<<<<<<<
82267  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()],
82268  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]])
82269  */
82270  __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3648, __pyx_L1_error)
82271  __Pyx_GOTREF(__pyx_t_5);
82272  __Pyx_GIVEREF(__pyx_t_7);
82273  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_7);
82274  __Pyx_GIVEREF(__pyx_t_8);
82275  PyList_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
82276  __Pyx_GIVEREF(__pyx_t_9);
82277  PyList_SET_ITEM(__pyx_t_5, 2, __pyx_t_9);
82278  __pyx_t_7 = 0;
82279  __pyx_t_8 = 0;
82280  __pyx_t_9 = 0;
82281  __pyx_t_9 = NULL;
82282  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
82283  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
82284  if (likely(__pyx_t_9)) {
82285  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
82286  __Pyx_INCREF(__pyx_t_9);
82287  __Pyx_INCREF(function);
82288  __Pyx_DECREF_SET(__pyx_t_3, function);
82289  }
82290  }
82291  __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_9, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5);
82292  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
82293  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82294  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3648, __pyx_L1_error)
82295  __Pyx_GOTREF(__pyx_t_1);
82296  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
82297  __pyx_r = __pyx_t_1;
82298  __pyx_t_1 = 0;
82299  goto __pyx_L0;
82300 
82301  /* "mbd/CouplingFSI.pyx":3647
82302  * return np.array([vec.x, vec.y, vec.z])
82303  *
82304  * def mat332array(mat): # <<<<<<<<<<<<<<
82305  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()],
82306  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()],
82307  */
82308 
82309  /* function exit code */
82310  __pyx_L1_error:;
82311  __Pyx_XDECREF(__pyx_t_1);
82312  __Pyx_XDECREF(__pyx_t_2);
82313  __Pyx_XDECREF(__pyx_t_3);
82314  __Pyx_XDECREF(__pyx_t_4);
82315  __Pyx_XDECREF(__pyx_t_5);
82316  __Pyx_XDECREF(__pyx_t_6);
82317  __Pyx_XDECREF(__pyx_t_7);
82318  __Pyx_XDECREF(__pyx_t_8);
82319  __Pyx_XDECREF(__pyx_t_9);
82320  __Pyx_XDECREF(__pyx_t_10);
82321  __Pyx_AddTraceback("mbd.CouplingFSI.mat332array", __pyx_clineno, __pyx_lineno, __pyx_filename);
82322  __pyx_r = NULL;
82323  __pyx_L0:;
82324  __Pyx_XGIVEREF(__pyx_r);
82325  __Pyx_TraceReturn(__pyx_r, 0);
82326  __Pyx_RefNannyFinishContext();
82327  return __pyx_r;
82328 }
82329 
82330 /* "mbd/CouplingFSI.pyx":3652
82331  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]])
82332  *
82333  * def pymat332array(mat): # <<<<<<<<<<<<<<
82334  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z],
82335  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z],
82336  */
82337 
82338 /* Python wrapper */
82339 static PyObject *__pyx_pw_3mbd_11CouplingFSI_13pymat332array(PyObject *__pyx_self, PyObject *__pyx_v_mat); /*proto*/
82340 static char __pyx_doc_3mbd_11CouplingFSI_12pymat332array[] = "pymat332array(mat)";
82341 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_13pymat332array = {"pymat332array", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_13pymat332array, METH_O, __pyx_doc_3mbd_11CouplingFSI_12pymat332array};
82342 static PyObject *__pyx_pw_3mbd_11CouplingFSI_13pymat332array(PyObject *__pyx_self, PyObject *__pyx_v_mat) {
82343  PyObject *__pyx_r = 0;
82344  __Pyx_RefNannyDeclarations
82345  __Pyx_RefNannySetupContext("pymat332array (wrapper)", 0);
82346  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_12pymat332array(__pyx_self, ((PyObject *)__pyx_v_mat));
82347 
82348  /* function exit code */
82349  __Pyx_RefNannyFinishContext();
82350  return __pyx_r;
82351 }
82352 
82353 static PyObject *__pyx_pf_3mbd_11CouplingFSI_12pymat332array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mat) {
82354  PyObject *__pyx_r = NULL;
82355  __Pyx_TraceDeclarations
82356  __Pyx_RefNannyDeclarations
82357  PyObject *__pyx_t_1 = NULL;
82358  PyObject *__pyx_t_2 = NULL;
82359  PyObject *__pyx_t_3 = NULL;
82360  PyObject *__pyx_t_4 = NULL;
82361  PyObject *__pyx_t_5 = NULL;
82362  PyObject *__pyx_t_6 = NULL;
82363  PyObject *__pyx_t_7 = NULL;
82364  PyObject *__pyx_t_8 = NULL;
82365  PyObject *__pyx_t_9 = NULL;
82366  int __pyx_lineno = 0;
82367  const char *__pyx_filename = NULL;
82368  int __pyx_clineno = 0;
82369  __Pyx_TraceFrameInit(__pyx_codeobj__216)
82370  __Pyx_RefNannySetupContext("pymat332array", 0);
82371  __Pyx_TraceCall("pymat332array", __pyx_f[0], 3652, 0, __PYX_ERR(0, 3652, __pyx_L1_error));
82372 
82373  /* "mbd/CouplingFSI.pyx":3653
82374  *
82375  * def pymat332array(mat):
82376  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z], # <<<<<<<<<<<<<<
82377  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z],
82378  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]])
82379  */
82380  __Pyx_XDECREF(__pyx_r);
82381  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3653, __pyx_L1_error)
82382  __Pyx_GOTREF(__pyx_t_2);
82383  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3653, __pyx_L1_error)
82384  __Pyx_GOTREF(__pyx_t_3);
82385  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82386  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Xaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3653, __pyx_L1_error)
82387  __Pyx_GOTREF(__pyx_t_4);
82388  __pyx_t_5 = NULL;
82389  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
82390  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
82391  if (likely(__pyx_t_5)) {
82392  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82393  __Pyx_INCREF(__pyx_t_5);
82394  __Pyx_INCREF(function);
82395  __Pyx_DECREF_SET(__pyx_t_4, function);
82396  }
82397  }
82398  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
82399  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82400  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3653, __pyx_L1_error)
82401  __Pyx_GOTREF(__pyx_t_2);
82402  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82403  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3653, __pyx_L1_error)
82404  __Pyx_GOTREF(__pyx_t_4);
82405  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82406  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Xaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3653, __pyx_L1_error)
82407  __Pyx_GOTREF(__pyx_t_5);
82408  __pyx_t_6 = NULL;
82409  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
82410  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
82411  if (likely(__pyx_t_6)) {
82412  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82413  __Pyx_INCREF(__pyx_t_6);
82414  __Pyx_INCREF(function);
82415  __Pyx_DECREF_SET(__pyx_t_5, function);
82416  }
82417  }
82418  __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
82419  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
82420  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3653, __pyx_L1_error)
82421  __Pyx_GOTREF(__pyx_t_2);
82422  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82423  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3653, __pyx_L1_error)
82424  __Pyx_GOTREF(__pyx_t_5);
82425  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82426  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Xaxis); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3653, __pyx_L1_error)
82427  __Pyx_GOTREF(__pyx_t_6);
82428  __pyx_t_7 = NULL;
82429  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
82430  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
82431  if (likely(__pyx_t_7)) {
82432  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
82433  __Pyx_INCREF(__pyx_t_7);
82434  __Pyx_INCREF(function);
82435  __Pyx_DECREF_SET(__pyx_t_6, function);
82436  }
82437  }
82438  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
82439  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
82440  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3653, __pyx_L1_error)
82441  __Pyx_GOTREF(__pyx_t_2);
82442  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
82443  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_z); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3653, __pyx_L1_error)
82444  __Pyx_GOTREF(__pyx_t_6);
82445  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82446  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3653, __pyx_L1_error)
82447  __Pyx_GOTREF(__pyx_t_2);
82448  __Pyx_GIVEREF(__pyx_t_4);
82449  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
82450  __Pyx_GIVEREF(__pyx_t_5);
82451  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
82452  __Pyx_GIVEREF(__pyx_t_6);
82453  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
82454  __pyx_t_4 = 0;
82455  __pyx_t_5 = 0;
82456  __pyx_t_6 = 0;
82457 
82458  /* "mbd/CouplingFSI.pyx":3654
82459  * def pymat332array(mat):
82460  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z],
82461  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z], # <<<<<<<<<<<<<<
82462  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]])
82463  *
82464  */
82465  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Yaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3654, __pyx_L1_error)
82466  __Pyx_GOTREF(__pyx_t_5);
82467  __pyx_t_4 = NULL;
82468  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
82469  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
82470  if (likely(__pyx_t_4)) {
82471  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82472  __Pyx_INCREF(__pyx_t_4);
82473  __Pyx_INCREF(function);
82474  __Pyx_DECREF_SET(__pyx_t_5, function);
82475  }
82476  }
82477  __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
82478  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
82479  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3654, __pyx_L1_error)
82480  __Pyx_GOTREF(__pyx_t_6);
82481  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82482  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3654, __pyx_L1_error)
82483  __Pyx_GOTREF(__pyx_t_5);
82484  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
82485  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Yaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3654, __pyx_L1_error)
82486  __Pyx_GOTREF(__pyx_t_4);
82487  __pyx_t_7 = NULL;
82488  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
82489  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
82490  if (likely(__pyx_t_7)) {
82491  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82492  __Pyx_INCREF(__pyx_t_7);
82493  __Pyx_INCREF(function);
82494  __Pyx_DECREF_SET(__pyx_t_4, function);
82495  }
82496  }
82497  __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
82498  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
82499  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3654, __pyx_L1_error)
82500  __Pyx_GOTREF(__pyx_t_6);
82501  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82502  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3654, __pyx_L1_error)
82503  __Pyx_GOTREF(__pyx_t_4);
82504  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
82505  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Yaxis); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3654, __pyx_L1_error)
82506  __Pyx_GOTREF(__pyx_t_7);
82507  __pyx_t_8 = NULL;
82508  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
82509  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
82510  if (likely(__pyx_t_8)) {
82511  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
82512  __Pyx_INCREF(__pyx_t_8);
82513  __Pyx_INCREF(function);
82514  __Pyx_DECREF_SET(__pyx_t_7, function);
82515  }
82516  }
82517  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
82518  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
82519  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3654, __pyx_L1_error)
82520  __Pyx_GOTREF(__pyx_t_6);
82521  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82522  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_z); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3654, __pyx_L1_error)
82523  __Pyx_GOTREF(__pyx_t_7);
82524  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
82525  __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3654, __pyx_L1_error)
82526  __Pyx_GOTREF(__pyx_t_6);
82527  __Pyx_GIVEREF(__pyx_t_5);
82528  PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
82529  __Pyx_GIVEREF(__pyx_t_4);
82530  PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
82531  __Pyx_GIVEREF(__pyx_t_7);
82532  PyList_SET_ITEM(__pyx_t_6, 2, __pyx_t_7);
82533  __pyx_t_5 = 0;
82534  __pyx_t_4 = 0;
82535  __pyx_t_7 = 0;
82536 
82537  /* "mbd/CouplingFSI.pyx":3655
82538  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z],
82539  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z],
82540  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]]) # <<<<<<<<<<<<<<
82541  *
82542  * def quat2array(quat):
82543  */
82544  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Zaxis); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __pyx_L1_error)
82545  __Pyx_GOTREF(__pyx_t_4);
82546  __pyx_t_5 = NULL;
82547  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
82548  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
82549  if (likely(__pyx_t_5)) {
82550  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82551  __Pyx_INCREF(__pyx_t_5);
82552  __Pyx_INCREF(function);
82553  __Pyx_DECREF_SET(__pyx_t_4, function);
82554  }
82555  }
82556  __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
82557  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82558  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3655, __pyx_L1_error)
82559  __Pyx_GOTREF(__pyx_t_7);
82560  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82561  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3655, __pyx_L1_error)
82562  __Pyx_GOTREF(__pyx_t_4);
82563  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82564  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Zaxis); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3655, __pyx_L1_error)
82565  __Pyx_GOTREF(__pyx_t_5);
82566  __pyx_t_8 = NULL;
82567  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
82568  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
82569  if (likely(__pyx_t_8)) {
82570  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82571  __Pyx_INCREF(__pyx_t_8);
82572  __Pyx_INCREF(function);
82573  __Pyx_DECREF_SET(__pyx_t_5, function);
82574  }
82575  }
82576  __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
82577  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
82578  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3655, __pyx_L1_error)
82579  __Pyx_GOTREF(__pyx_t_7);
82580  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82581  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3655, __pyx_L1_error)
82582  __Pyx_GOTREF(__pyx_t_5);
82583  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82584  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_mat, __pyx_n_s_Get_A_Zaxis); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3655, __pyx_L1_error)
82585  __Pyx_GOTREF(__pyx_t_8);
82586  __pyx_t_9 = NULL;
82587  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
82588  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
82589  if (likely(__pyx_t_9)) {
82590  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
82591  __Pyx_INCREF(__pyx_t_9);
82592  __Pyx_INCREF(function);
82593  __Pyx_DECREF_SET(__pyx_t_8, function);
82594  }
82595  }
82596  __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
82597  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
82598  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3655, __pyx_L1_error)
82599  __Pyx_GOTREF(__pyx_t_7);
82600  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
82601  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_z); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3655, __pyx_L1_error)
82602  __Pyx_GOTREF(__pyx_t_8);
82603  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82604  __pyx_t_7 = PyList_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3655, __pyx_L1_error)
82605  __Pyx_GOTREF(__pyx_t_7);
82606  __Pyx_GIVEREF(__pyx_t_4);
82607  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
82608  __Pyx_GIVEREF(__pyx_t_5);
82609  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
82610  __Pyx_GIVEREF(__pyx_t_8);
82611  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_8);
82612  __pyx_t_4 = 0;
82613  __pyx_t_5 = 0;
82614  __pyx_t_8 = 0;
82615 
82616  /* "mbd/CouplingFSI.pyx":3653
82617  *
82618  * def pymat332array(mat):
82619  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z], # <<<<<<<<<<<<<<
82620  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z],
82621  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]])
82622  */
82623  __pyx_t_8 = PyList_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3653, __pyx_L1_error)
82624  __Pyx_GOTREF(__pyx_t_8);
82625  __Pyx_GIVEREF(__pyx_t_2);
82626  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
82627  __Pyx_GIVEREF(__pyx_t_6);
82628  PyList_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
82629  __Pyx_GIVEREF(__pyx_t_7);
82630  PyList_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
82631  __pyx_t_2 = 0;
82632  __pyx_t_6 = 0;
82633  __pyx_t_7 = 0;
82634  __pyx_t_7 = NULL;
82635  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
82636  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
82637  if (likely(__pyx_t_7)) {
82638  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
82639  __Pyx_INCREF(__pyx_t_7);
82640  __Pyx_INCREF(function);
82641  __Pyx_DECREF_SET(__pyx_t_3, function);
82642  }
82643  }
82644  __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8);
82645  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
82646  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
82647  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3653, __pyx_L1_error)
82648  __Pyx_GOTREF(__pyx_t_1);
82649  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
82650  __pyx_r = __pyx_t_1;
82651  __pyx_t_1 = 0;
82652  goto __pyx_L0;
82653 
82654  /* "mbd/CouplingFSI.pyx":3652
82655  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]])
82656  *
82657  * def pymat332array(mat): # <<<<<<<<<<<<<<
82658  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z],
82659  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z],
82660  */
82661 
82662  /* function exit code */
82663  __pyx_L1_error:;
82664  __Pyx_XDECREF(__pyx_t_1);
82665  __Pyx_XDECREF(__pyx_t_2);
82666  __Pyx_XDECREF(__pyx_t_3);
82667  __Pyx_XDECREF(__pyx_t_4);
82668  __Pyx_XDECREF(__pyx_t_5);
82669  __Pyx_XDECREF(__pyx_t_6);
82670  __Pyx_XDECREF(__pyx_t_7);
82671  __Pyx_XDECREF(__pyx_t_8);
82672  __Pyx_XDECREF(__pyx_t_9);
82673  __Pyx_AddTraceback("mbd.CouplingFSI.pymat332array", __pyx_clineno, __pyx_lineno, __pyx_filename);
82674  __pyx_r = NULL;
82675  __pyx_L0:;
82676  __Pyx_XGIVEREF(__pyx_r);
82677  __Pyx_TraceReturn(__pyx_r, 0);
82678  __Pyx_RefNannyFinishContext();
82679  return __pyx_r;
82680 }
82681 
82682 /* "mbd/CouplingFSI.pyx":3657
82683  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]])
82684  *
82685  * def quat2array(quat): # <<<<<<<<<<<<<<
82686  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
82687  *
82688  */
82689 
82690 /* Python wrapper */
82691 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15quat2array(PyObject *__pyx_self, PyObject *__pyx_v_quat); /*proto*/
82692 static char __pyx_doc_3mbd_11CouplingFSI_14quat2array[] = "quat2array(quat)";
82693 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_15quat2array = {"quat2array", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15quat2array, METH_O, __pyx_doc_3mbd_11CouplingFSI_14quat2array};
82694 static PyObject *__pyx_pw_3mbd_11CouplingFSI_15quat2array(PyObject *__pyx_self, PyObject *__pyx_v_quat) {
82695  PyObject *__pyx_r = 0;
82696  __Pyx_RefNannyDeclarations
82697  __Pyx_RefNannySetupContext("quat2array (wrapper)", 0);
82698  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_14quat2array(__pyx_self, ((PyObject *)__pyx_v_quat));
82699 
82700  /* function exit code */
82701  __Pyx_RefNannyFinishContext();
82702  return __pyx_r;
82703 }
82704 
82705 static PyObject *__pyx_pf_3mbd_11CouplingFSI_14quat2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_quat) {
82706  PyObject *__pyx_r = NULL;
82707  __Pyx_TraceDeclarations
82708  __Pyx_RefNannyDeclarations
82709  PyObject *__pyx_t_1 = NULL;
82710  PyObject *__pyx_t_2 = NULL;
82711  PyObject *__pyx_t_3 = NULL;
82712  PyObject *__pyx_t_4 = NULL;
82713  PyObject *__pyx_t_5 = NULL;
82714  PyObject *__pyx_t_6 = NULL;
82715  PyObject *__pyx_t_7 = NULL;
82716  PyObject *__pyx_t_8 = NULL;
82717  int __pyx_lineno = 0;
82718  const char *__pyx_filename = NULL;
82719  int __pyx_clineno = 0;
82720  __Pyx_TraceFrameInit(__pyx_codeobj__217)
82721  __Pyx_RefNannySetupContext("quat2array", 0);
82722  __Pyx_TraceCall("quat2array", __pyx_f[0], 3657, 0, __PYX_ERR(0, 3657, __pyx_L1_error));
82723 
82724  /* "mbd/CouplingFSI.pyx":3658
82725  *
82726  * def quat2array(quat):
82727  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()]) # <<<<<<<<<<<<<<
82728  *
82729  * def pyquat2array(quat):
82730  */
82731  __Pyx_XDECREF(__pyx_r);
82732  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3658, __pyx_L1_error)
82733  __Pyx_GOTREF(__pyx_t_2);
82734  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3658, __pyx_L1_error)
82735  __Pyx_GOTREF(__pyx_t_3);
82736  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82737  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3658, __pyx_L1_error)
82738  __Pyx_GOTREF(__pyx_t_4);
82739  __pyx_t_5 = NULL;
82740  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
82741  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
82742  if (likely(__pyx_t_5)) {
82743  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
82744  __Pyx_INCREF(__pyx_t_5);
82745  __Pyx_INCREF(function);
82746  __Pyx_DECREF_SET(__pyx_t_4, function);
82747  }
82748  }
82749  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
82750  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
82751  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3658, __pyx_L1_error)
82752  __Pyx_GOTREF(__pyx_t_2);
82753  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
82754  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3658, __pyx_L1_error)
82755  __Pyx_GOTREF(__pyx_t_5);
82756  __pyx_t_6 = NULL;
82757  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
82758  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
82759  if (likely(__pyx_t_6)) {
82760  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
82761  __Pyx_INCREF(__pyx_t_6);
82762  __Pyx_INCREF(function);
82763  __Pyx_DECREF_SET(__pyx_t_5, function);
82764  }
82765  }
82766  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
82767  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
82768  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3658, __pyx_L1_error)
82769  __Pyx_GOTREF(__pyx_t_4);
82770  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
82771  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3658, __pyx_L1_error)
82772  __Pyx_GOTREF(__pyx_t_6);
82773  __pyx_t_7 = NULL;
82774  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
82775  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
82776  if (likely(__pyx_t_7)) {
82777  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
82778  __Pyx_INCREF(__pyx_t_7);
82779  __Pyx_INCREF(function);
82780  __Pyx_DECREF_SET(__pyx_t_6, function);
82781  }
82782  }
82783  __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6);
82784  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
82785  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3658, __pyx_L1_error)
82786  __Pyx_GOTREF(__pyx_t_5);
82787  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
82788  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3658, __pyx_L1_error)
82789  __Pyx_GOTREF(__pyx_t_7);
82790  __pyx_t_8 = NULL;
82791  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
82792  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
82793  if (likely(__pyx_t_8)) {
82794  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
82795  __Pyx_INCREF(__pyx_t_8);
82796  __Pyx_INCREF(function);
82797  __Pyx_DECREF_SET(__pyx_t_7, function);
82798  }
82799  }
82800  __pyx_t_6 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7);
82801  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
82802  if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3658, __pyx_L1_error)
82803  __Pyx_GOTREF(__pyx_t_6);
82804  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82805  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3658, __pyx_L1_error)
82806  __Pyx_GOTREF(__pyx_t_7);
82807  __Pyx_GIVEREF(__pyx_t_2);
82808  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
82809  __Pyx_GIVEREF(__pyx_t_4);
82810  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
82811  __Pyx_GIVEREF(__pyx_t_5);
82812  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
82813  __Pyx_GIVEREF(__pyx_t_6);
82814  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
82815  __pyx_t_2 = 0;
82816  __pyx_t_4 = 0;
82817  __pyx_t_5 = 0;
82818  __pyx_t_6 = 0;
82819  __pyx_t_6 = NULL;
82820  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
82821  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
82822  if (likely(__pyx_t_6)) {
82823  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
82824  __Pyx_INCREF(__pyx_t_6);
82825  __Pyx_INCREF(function);
82826  __Pyx_DECREF_SET(__pyx_t_3, function);
82827  }
82828  }
82829  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
82830  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
82831  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82832  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3658, __pyx_L1_error)
82833  __Pyx_GOTREF(__pyx_t_1);
82834  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
82835  __pyx_r = __pyx_t_1;
82836  __pyx_t_1 = 0;
82837  goto __pyx_L0;
82838 
82839  /* "mbd/CouplingFSI.pyx":3657
82840  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]])
82841  *
82842  * def quat2array(quat): # <<<<<<<<<<<<<<
82843  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
82844  *
82845  */
82846 
82847  /* function exit code */
82848  __pyx_L1_error:;
82849  __Pyx_XDECREF(__pyx_t_1);
82850  __Pyx_XDECREF(__pyx_t_2);
82851  __Pyx_XDECREF(__pyx_t_3);
82852  __Pyx_XDECREF(__pyx_t_4);
82853  __Pyx_XDECREF(__pyx_t_5);
82854  __Pyx_XDECREF(__pyx_t_6);
82855  __Pyx_XDECREF(__pyx_t_7);
82856  __Pyx_XDECREF(__pyx_t_8);
82857  __Pyx_AddTraceback("mbd.CouplingFSI.quat2array", __pyx_clineno, __pyx_lineno, __pyx_filename);
82858  __pyx_r = NULL;
82859  __pyx_L0:;
82860  __Pyx_XGIVEREF(__pyx_r);
82861  __Pyx_TraceReturn(__pyx_r, 0);
82862  __Pyx_RefNannyFinishContext();
82863  return __pyx_r;
82864 }
82865 
82866 /* "mbd/CouplingFSI.pyx":3660
82867  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
82868  *
82869  * def pyquat2array(quat): # <<<<<<<<<<<<<<
82870  * return np.array([quat.e0, quat.e1, quat.e2, quat.e3])
82871  */
82872 
82873 /* Python wrapper */
82874 static PyObject *__pyx_pw_3mbd_11CouplingFSI_17pyquat2array(PyObject *__pyx_self, PyObject *__pyx_v_quat); /*proto*/
82875 static char __pyx_doc_3mbd_11CouplingFSI_16pyquat2array[] = "pyquat2array(quat)";
82876 static PyMethodDef __pyx_mdef_3mbd_11CouplingFSI_17pyquat2array = {"pyquat2array", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_17pyquat2array, METH_O, __pyx_doc_3mbd_11CouplingFSI_16pyquat2array};
82877 static PyObject *__pyx_pw_3mbd_11CouplingFSI_17pyquat2array(PyObject *__pyx_self, PyObject *__pyx_v_quat) {
82878  PyObject *__pyx_r = 0;
82879  __Pyx_RefNannyDeclarations
82880  __Pyx_RefNannySetupContext("pyquat2array (wrapper)", 0);
82881  __pyx_r = __pyx_pf_3mbd_11CouplingFSI_16pyquat2array(__pyx_self, ((PyObject *)__pyx_v_quat));
82882 
82883  /* function exit code */
82884  __Pyx_RefNannyFinishContext();
82885  return __pyx_r;
82886 }
82887 
82888 static PyObject *__pyx_pf_3mbd_11CouplingFSI_16pyquat2array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_quat) {
82889  PyObject *__pyx_r = NULL;
82890  __Pyx_TraceDeclarations
82891  __Pyx_RefNannyDeclarations
82892  PyObject *__pyx_t_1 = NULL;
82893  PyObject *__pyx_t_2 = NULL;
82894  PyObject *__pyx_t_3 = NULL;
82895  PyObject *__pyx_t_4 = NULL;
82896  PyObject *__pyx_t_5 = NULL;
82897  PyObject *__pyx_t_6 = NULL;
82898  PyObject *__pyx_t_7 = NULL;
82899  int __pyx_lineno = 0;
82900  const char *__pyx_filename = NULL;
82901  int __pyx_clineno = 0;
82902  __Pyx_TraceFrameInit(__pyx_codeobj__218)
82903  __Pyx_RefNannySetupContext("pyquat2array", 0);
82904  __Pyx_TraceCall("pyquat2array", __pyx_f[0], 3660, 0, __PYX_ERR(0, 3660, __pyx_L1_error));
82905 
82906  /* "mbd/CouplingFSI.pyx":3661
82907  *
82908  * def pyquat2array(quat):
82909  * return np.array([quat.e0, quat.e1, quat.e2, quat.e3]) # <<<<<<<<<<<<<<
82910  */
82911  __Pyx_XDECREF(__pyx_r);
82912  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3661, __pyx_L1_error)
82913  __Pyx_GOTREF(__pyx_t_2);
82914  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3661, __pyx_L1_error)
82915  __Pyx_GOTREF(__pyx_t_3);
82916  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
82917  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3661, __pyx_L1_error)
82918  __Pyx_GOTREF(__pyx_t_2);
82919  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3661, __pyx_L1_error)
82920  __Pyx_GOTREF(__pyx_t_4);
82921  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3661, __pyx_L1_error)
82922  __Pyx_GOTREF(__pyx_t_5);
82923  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_quat, __pyx_n_s_e3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3661, __pyx_L1_error)
82924  __Pyx_GOTREF(__pyx_t_6);
82925  __pyx_t_7 = PyList_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3661, __pyx_L1_error)
82926  __Pyx_GOTREF(__pyx_t_7);
82927  __Pyx_GIVEREF(__pyx_t_2);
82928  PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
82929  __Pyx_GIVEREF(__pyx_t_4);
82930  PyList_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
82931  __Pyx_GIVEREF(__pyx_t_5);
82932  PyList_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
82933  __Pyx_GIVEREF(__pyx_t_6);
82934  PyList_SET_ITEM(__pyx_t_7, 3, __pyx_t_6);
82935  __pyx_t_2 = 0;
82936  __pyx_t_4 = 0;
82937  __pyx_t_5 = 0;
82938  __pyx_t_6 = 0;
82939  __pyx_t_6 = NULL;
82940  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
82941  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
82942  if (likely(__pyx_t_6)) {
82943  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
82944  __Pyx_INCREF(__pyx_t_6);
82945  __Pyx_INCREF(function);
82946  __Pyx_DECREF_SET(__pyx_t_3, function);
82947  }
82948  }
82949  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7);
82950  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
82951  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
82952  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3661, __pyx_L1_error)
82953  __Pyx_GOTREF(__pyx_t_1);
82954  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
82955  __pyx_r = __pyx_t_1;
82956  __pyx_t_1 = 0;
82957  goto __pyx_L0;
82958 
82959  /* "mbd/CouplingFSI.pyx":3660
82960  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
82961  *
82962  * def pyquat2array(quat): # <<<<<<<<<<<<<<
82963  * return np.array([quat.e0, quat.e1, quat.e2, quat.e3])
82964  */
82965 
82966  /* function exit code */
82967  __pyx_L1_error:;
82968  __Pyx_XDECREF(__pyx_t_1);
82969  __Pyx_XDECREF(__pyx_t_2);
82970  __Pyx_XDECREF(__pyx_t_3);
82971  __Pyx_XDECREF(__pyx_t_4);
82972  __Pyx_XDECREF(__pyx_t_5);
82973  __Pyx_XDECREF(__pyx_t_6);
82974  __Pyx_XDECREF(__pyx_t_7);
82975  __Pyx_AddTraceback("mbd.CouplingFSI.pyquat2array", __pyx_clineno, __pyx_lineno, __pyx_filename);
82976  __pyx_r = NULL;
82977  __pyx_L0:;
82978  __Pyx_XGIVEREF(__pyx_r);
82979  __Pyx_TraceReturn(__pyx_r, 0);
82980  __Pyx_RefNannyFinishContext();
82981  return __pyx_r;
82982 }
82983 
82984 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
82985  * ctypedef npy_cdouble complex_t
82986  *
82987  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
82988  * return PyArray_MultiIterNew(1, <void*>a)
82989  *
82990  */
82991 
82992 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
82993  PyObject *__pyx_r = NULL;
82994  __Pyx_TraceDeclarations
82995  __Pyx_RefNannyDeclarations
82996  PyObject *__pyx_t_1 = NULL;
82997  int __pyx_lineno = 0;
82998  const char *__pyx_filename = NULL;
82999  int __pyx_clineno = 0;
83000  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
83001  __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[3], 735, 0, __PYX_ERR(3, 735, __pyx_L1_error));
83002 
83003  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":736
83004  *
83005  * cdef inline object PyArray_MultiIterNew1(a):
83006  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
83007  *
83008  * cdef inline object PyArray_MultiIterNew2(a, b):
83009  */
83010  __Pyx_XDECREF(__pyx_r);
83011  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 736, __pyx_L1_error)
83012  __Pyx_GOTREF(__pyx_t_1);
83013  __pyx_r = __pyx_t_1;
83014  __pyx_t_1 = 0;
83015  goto __pyx_L0;
83016 
83017  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":735
83018  * ctypedef npy_cdouble complex_t
83019  *
83020  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
83021  * return PyArray_MultiIterNew(1, <void*>a)
83022  *
83023  */
83024 
83025  /* function exit code */
83026  __pyx_L1_error:;
83027  __Pyx_XDECREF(__pyx_t_1);
83028  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
83029  __pyx_r = 0;
83030  __pyx_L0:;
83031  __Pyx_XGIVEREF(__pyx_r);
83032  __Pyx_TraceReturn(__pyx_r, 0);
83033  __Pyx_RefNannyFinishContext();
83034  return __pyx_r;
83035 }
83036 
83037 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
83038  * return PyArray_MultiIterNew(1, <void*>a)
83039  *
83040  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
83041  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
83042  *
83043  */
83044 
83045 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
83046  PyObject *__pyx_r = NULL;
83047  __Pyx_TraceDeclarations
83048  __Pyx_RefNannyDeclarations
83049  PyObject *__pyx_t_1 = NULL;
83050  int __pyx_lineno = 0;
83051  const char *__pyx_filename = NULL;
83052  int __pyx_clineno = 0;
83053  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
83054  __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[3], 738, 0, __PYX_ERR(3, 738, __pyx_L1_error));
83055 
83056  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":739
83057  *
83058  * cdef inline object PyArray_MultiIterNew2(a, b):
83059  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
83060  *
83061  * cdef inline object PyArray_MultiIterNew3(a, b, c):
83062  */
83063  __Pyx_XDECREF(__pyx_r);
83064  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 739, __pyx_L1_error)
83065  __Pyx_GOTREF(__pyx_t_1);
83066  __pyx_r = __pyx_t_1;
83067  __pyx_t_1 = 0;
83068  goto __pyx_L0;
83069 
83070  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":738
83071  * return PyArray_MultiIterNew(1, <void*>a)
83072  *
83073  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
83074  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
83075  *
83076  */
83077 
83078  /* function exit code */
83079  __pyx_L1_error:;
83080  __Pyx_XDECREF(__pyx_t_1);
83081  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
83082  __pyx_r = 0;
83083  __pyx_L0:;
83084  __Pyx_XGIVEREF(__pyx_r);
83085  __Pyx_TraceReturn(__pyx_r, 0);
83086  __Pyx_RefNannyFinishContext();
83087  return __pyx_r;
83088 }
83089 
83090 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
83091  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
83092  *
83093  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
83094  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
83095  *
83096  */
83097 
83098 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
83099  PyObject *__pyx_r = NULL;
83100  __Pyx_TraceDeclarations
83101  __Pyx_RefNannyDeclarations
83102  PyObject *__pyx_t_1 = NULL;
83103  int __pyx_lineno = 0;
83104  const char *__pyx_filename = NULL;
83105  int __pyx_clineno = 0;
83106  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
83107  __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[3], 741, 0, __PYX_ERR(3, 741, __pyx_L1_error));
83108 
83109  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":742
83110  *
83111  * cdef inline object PyArray_MultiIterNew3(a, b, c):
83112  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
83113  *
83114  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
83115  */
83116  __Pyx_XDECREF(__pyx_r);
83117  __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, 742, __pyx_L1_error)
83118  __Pyx_GOTREF(__pyx_t_1);
83119  __pyx_r = __pyx_t_1;
83120  __pyx_t_1 = 0;
83121  goto __pyx_L0;
83122 
83123  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":741
83124  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
83125  *
83126  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
83127  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
83128  *
83129  */
83130 
83131  /* function exit code */
83132  __pyx_L1_error:;
83133  __Pyx_XDECREF(__pyx_t_1);
83134  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
83135  __pyx_r = 0;
83136  __pyx_L0:;
83137  __Pyx_XGIVEREF(__pyx_r);
83138  __Pyx_TraceReturn(__pyx_r, 0);
83139  __Pyx_RefNannyFinishContext();
83140  return __pyx_r;
83141 }
83142 
83143 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
83144  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
83145  *
83146  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
83147  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
83148  *
83149  */
83150 
83151 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) {
83152  PyObject *__pyx_r = NULL;
83153  __Pyx_TraceDeclarations
83154  __Pyx_RefNannyDeclarations
83155  PyObject *__pyx_t_1 = NULL;
83156  int __pyx_lineno = 0;
83157  const char *__pyx_filename = NULL;
83158  int __pyx_clineno = 0;
83159  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
83160  __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[3], 744, 0, __PYX_ERR(3, 744, __pyx_L1_error));
83161 
83162  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":745
83163  *
83164  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
83165  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
83166  *
83167  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
83168  */
83169  __Pyx_XDECREF(__pyx_r);
83170  __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, 745, __pyx_L1_error)
83171  __Pyx_GOTREF(__pyx_t_1);
83172  __pyx_r = __pyx_t_1;
83173  __pyx_t_1 = 0;
83174  goto __pyx_L0;
83175 
83176  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":744
83177  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
83178  *
83179  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
83180  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
83181  *
83182  */
83183 
83184  /* function exit code */
83185  __pyx_L1_error:;
83186  __Pyx_XDECREF(__pyx_t_1);
83187  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
83188  __pyx_r = 0;
83189  __pyx_L0:;
83190  __Pyx_XGIVEREF(__pyx_r);
83191  __Pyx_TraceReturn(__pyx_r, 0);
83192  __Pyx_RefNannyFinishContext();
83193  return __pyx_r;
83194 }
83195 
83196 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
83197  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
83198  *
83199  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
83200  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
83201  *
83202  */
83203 
83204 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) {
83205  PyObject *__pyx_r = NULL;
83206  __Pyx_TraceDeclarations
83207  __Pyx_RefNannyDeclarations
83208  PyObject *__pyx_t_1 = NULL;
83209  int __pyx_lineno = 0;
83210  const char *__pyx_filename = NULL;
83211  int __pyx_clineno = 0;
83212  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
83213  __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[3], 747, 0, __PYX_ERR(3, 747, __pyx_L1_error));
83214 
83215  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":748
83216  *
83217  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
83218  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
83219  *
83220  * cdef inline tuple PyDataType_SHAPE(dtype d):
83221  */
83222  __Pyx_XDECREF(__pyx_r);
83223  __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, 748, __pyx_L1_error)
83224  __Pyx_GOTREF(__pyx_t_1);
83225  __pyx_r = __pyx_t_1;
83226  __pyx_t_1 = 0;
83227  goto __pyx_L0;
83228 
83229  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":747
83230  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
83231  *
83232  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
83233  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
83234  *
83235  */
83236 
83237  /* function exit code */
83238  __pyx_L1_error:;
83239  __Pyx_XDECREF(__pyx_t_1);
83240  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
83241  __pyx_r = 0;
83242  __pyx_L0:;
83243  __Pyx_XGIVEREF(__pyx_r);
83244  __Pyx_TraceReturn(__pyx_r, 0);
83245  __Pyx_RefNannyFinishContext();
83246  return __pyx_r;
83247 }
83248 
83249 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
83250  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
83251  *
83252  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
83253  * if PyDataType_HASSUBARRAY(d):
83254  * return <tuple>d.subarray.shape
83255  */
83256 
83257 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
83258  PyObject *__pyx_r = NULL;
83259  __Pyx_TraceDeclarations
83260  __Pyx_RefNannyDeclarations
83261  int __pyx_t_1;
83262  int __pyx_lineno = 0;
83263  const char *__pyx_filename = NULL;
83264  int __pyx_clineno = 0;
83265  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
83266  __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[3], 750, 0, __PYX_ERR(3, 750, __pyx_L1_error));
83267 
83268  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
83269  *
83270  * cdef inline tuple PyDataType_SHAPE(dtype d):
83271  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
83272  * return <tuple>d.subarray.shape
83273  * else:
83274  */
83275  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
83276  if (__pyx_t_1) {
83277 
83278  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":752
83279  * cdef inline tuple PyDataType_SHAPE(dtype d):
83280  * if PyDataType_HASSUBARRAY(d):
83281  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
83282  * else:
83283  * return ()
83284  */
83285  __Pyx_XDECREF(__pyx_r);
83286  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
83287  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
83288  goto __pyx_L0;
83289 
83290  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":751
83291  *
83292  * cdef inline tuple PyDataType_SHAPE(dtype d):
83293  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
83294  * return <tuple>d.subarray.shape
83295  * else:
83296  */
83297  }
83298 
83299  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":754
83300  * return <tuple>d.subarray.shape
83301  * else:
83302  * return () # <<<<<<<<<<<<<<
83303  *
83304  *
83305  */
83306  /*else*/ {
83307  __Pyx_XDECREF(__pyx_r);
83308  __Pyx_INCREF(__pyx_empty_tuple);
83309  __pyx_r = __pyx_empty_tuple;
83310  goto __pyx_L0;
83311  }
83312 
83313  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":750
83314  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
83315  *
83316  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
83317  * if PyDataType_HASSUBARRAY(d):
83318  * return <tuple>d.subarray.shape
83319  */
83320 
83321  /* function exit code */
83322  __pyx_L1_error:;
83323  __Pyx_AddTraceback("numpy.PyDataType_SHAPE", __pyx_clineno, __pyx_lineno, __pyx_filename);
83324  __pyx_r = 0;
83325  __pyx_L0:;
83326  __Pyx_XGIVEREF(__pyx_r);
83327  __Pyx_TraceReturn(__pyx_r, 0);
83328  __Pyx_RefNannyFinishContext();
83329  return __pyx_r;
83330 }
83331 
83332 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
83333  * int _import_umath() except -1
83334  *
83335  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
83336  * Py_INCREF(base) # important to do this before stealing the reference below!
83337  * PyArray_SetBaseObject(arr, base)
83338  */
83339 
83340 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
83341  __Pyx_TraceDeclarations
83342  __Pyx_RefNannyDeclarations
83343  int __pyx_lineno = 0;
83344  const char *__pyx_filename = NULL;
83345  int __pyx_clineno = 0;
83346  __Pyx_RefNannySetupContext("set_array_base", 0);
83347  __Pyx_TraceCall("set_array_base", __pyx_f[3], 929, 0, __PYX_ERR(3, 929, __pyx_L1_error));
83348 
83349  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":930
83350  *
83351  * cdef inline void set_array_base(ndarray arr, object base):
83352  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
83353  * PyArray_SetBaseObject(arr, base)
83354  *
83355  */
83356  Py_INCREF(__pyx_v_base);
83357 
83358  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":931
83359  * cdef inline void set_array_base(ndarray arr, object base):
83360  * Py_INCREF(base) # important to do this before stealing the reference below!
83361  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
83362  *
83363  * cdef inline object get_array_base(ndarray arr):
83364  */
83365  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
83366 
83367  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":929
83368  * int _import_umath() except -1
83369  *
83370  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
83371  * Py_INCREF(base) # important to do this before stealing the reference below!
83372  * PyArray_SetBaseObject(arr, base)
83373  */
83374 
83375  /* function exit code */
83376  goto __pyx_L0;
83377  __pyx_L1_error:;
83378  __Pyx_WriteUnraisable("numpy.set_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
83379  __pyx_L0:;
83380  __Pyx_TraceReturn(Py_None, 0);
83381  __Pyx_RefNannyFinishContext();
83382 }
83383 
83384 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
83385  * PyArray_SetBaseObject(arr, base)
83386  *
83387  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
83388  * base = PyArray_BASE(arr)
83389  * if base is NULL:
83390  */
83391 
83392 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
83393  PyObject *__pyx_v_base;
83394  PyObject *__pyx_r = NULL;
83395  __Pyx_TraceDeclarations
83396  __Pyx_RefNannyDeclarations
83397  int __pyx_t_1;
83398  int __pyx_lineno = 0;
83399  const char *__pyx_filename = NULL;
83400  int __pyx_clineno = 0;
83401  __Pyx_RefNannySetupContext("get_array_base", 0);
83402  __Pyx_TraceCall("get_array_base", __pyx_f[3], 933, 0, __PYX_ERR(3, 933, __pyx_L1_error));
83403 
83404  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":934
83405  *
83406  * cdef inline object get_array_base(ndarray arr):
83407  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
83408  * if base is NULL:
83409  * return None
83410  */
83411  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
83412 
83413  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
83414  * cdef inline object get_array_base(ndarray arr):
83415  * base = PyArray_BASE(arr)
83416  * if base is NULL: # <<<<<<<<<<<<<<
83417  * return None
83418  * return <object>base
83419  */
83420  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
83421  if (__pyx_t_1) {
83422 
83423  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":936
83424  * base = PyArray_BASE(arr)
83425  * if base is NULL:
83426  * return None # <<<<<<<<<<<<<<
83427  * return <object>base
83428  *
83429  */
83430  __Pyx_XDECREF(__pyx_r);
83431  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
83432  goto __pyx_L0;
83433 
83434  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":935
83435  * cdef inline object get_array_base(ndarray arr):
83436  * base = PyArray_BASE(arr)
83437  * if base is NULL: # <<<<<<<<<<<<<<
83438  * return None
83439  * return <object>base
83440  */
83441  }
83442 
83443  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":937
83444  * if base is NULL:
83445  * return None
83446  * return <object>base # <<<<<<<<<<<<<<
83447  *
83448  * # Versions of the import_* functions which are more suitable for
83449  */
83450  __Pyx_XDECREF(__pyx_r);
83451  __Pyx_INCREF(((PyObject *)__pyx_v_base));
83452  __pyx_r = ((PyObject *)__pyx_v_base);
83453  goto __pyx_L0;
83454 
83455  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":933
83456  * PyArray_SetBaseObject(arr, base)
83457  *
83458  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
83459  * base = PyArray_BASE(arr)
83460  * if base is NULL:
83461  */
83462 
83463  /* function exit code */
83464  __pyx_L1_error:;
83465  __Pyx_AddTraceback("numpy.get_array_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
83466  __pyx_r = 0;
83467  __pyx_L0:;
83468  __Pyx_XGIVEREF(__pyx_r);
83469  __Pyx_TraceReturn(__pyx_r, 0);
83470  __Pyx_RefNannyFinishContext();
83471  return __pyx_r;
83472 }
83473 
83474 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
83475  * # Versions of the import_* functions which are more suitable for
83476  * # Cython code.
83477  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
83478  * try:
83479  * __pyx_import_array()
83480  */
83481 
83482 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
83483  int __pyx_r;
83484  __Pyx_TraceDeclarations
83485  __Pyx_RefNannyDeclarations
83486  PyObject *__pyx_t_1 = NULL;
83487  PyObject *__pyx_t_2 = NULL;
83488  PyObject *__pyx_t_3 = NULL;
83489  int __pyx_t_4;
83490  PyObject *__pyx_t_5 = NULL;
83491  PyObject *__pyx_t_6 = NULL;
83492  PyObject *__pyx_t_7 = NULL;
83493  PyObject *__pyx_t_8 = NULL;
83494  int __pyx_lineno = 0;
83495  const char *__pyx_filename = NULL;
83496  int __pyx_clineno = 0;
83497  __Pyx_RefNannySetupContext("import_array", 0);
83498  __Pyx_TraceCall("import_array", __pyx_f[3], 941, 0, __PYX_ERR(3, 941, __pyx_L1_error));
83499 
83500  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
83501  * # Cython code.
83502  * cdef inline int import_array() except -1:
83503  * try: # <<<<<<<<<<<<<<
83504  * __pyx_import_array()
83505  * except Exception:
83506  */
83507  {
83508  __Pyx_PyThreadState_declare
83509  __Pyx_PyThreadState_assign
83510  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
83511  __Pyx_XGOTREF(__pyx_t_1);
83512  __Pyx_XGOTREF(__pyx_t_2);
83513  __Pyx_XGOTREF(__pyx_t_3);
83514  /*try:*/ {
83515 
83516  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":943
83517  * cdef inline int import_array() except -1:
83518  * try:
83519  * __pyx_import_array() # <<<<<<<<<<<<<<
83520  * except Exception:
83521  * raise ImportError("numpy.core.multiarray failed to import")
83522  */
83523  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 943, __pyx_L3_error)
83524 
83525  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
83526  * # Cython code.
83527  * cdef inline int import_array() except -1:
83528  * try: # <<<<<<<<<<<<<<
83529  * __pyx_import_array()
83530  * except Exception:
83531  */
83532  }
83533  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
83534  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
83535  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
83536  goto __pyx_L8_try_end;
83537  __pyx_L3_error:;
83538 
83539  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":944
83540  * try:
83541  * __pyx_import_array()
83542  * except Exception: # <<<<<<<<<<<<<<
83543  * raise ImportError("numpy.core.multiarray failed to import")
83544  *
83545  */
83546  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
83547  if (__pyx_t_4) {
83548  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
83549  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 944, __pyx_L5_except_error)
83550  __Pyx_GOTREF(__pyx_t_5);
83551  __Pyx_GOTREF(__pyx_t_6);
83552  __Pyx_GOTREF(__pyx_t_7);
83553 
83554  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
83555  * __pyx_import_array()
83556  * except Exception:
83557  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
83558  *
83559  * cdef inline int import_umath() except -1:
83560  */
83561  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__219, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 945, __pyx_L5_except_error)
83562  __Pyx_GOTREF(__pyx_t_8);
83563  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
83564  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
83565  __PYX_ERR(3, 945, __pyx_L5_except_error)
83566  }
83567  goto __pyx_L5_except_error;
83568  __pyx_L5_except_error:;
83569 
83570  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":942
83571  * # Cython code.
83572  * cdef inline int import_array() except -1:
83573  * try: # <<<<<<<<<<<<<<
83574  * __pyx_import_array()
83575  * except Exception:
83576  */
83577  __Pyx_XGIVEREF(__pyx_t_1);
83578  __Pyx_XGIVEREF(__pyx_t_2);
83579  __Pyx_XGIVEREF(__pyx_t_3);
83580  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
83581  goto __pyx_L1_error;
83582  __pyx_L8_try_end:;
83583  }
83584 
83585  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":941
83586  * # Versions of the import_* functions which are more suitable for
83587  * # Cython code.
83588  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
83589  * try:
83590  * __pyx_import_array()
83591  */
83592 
83593  /* function exit code */
83594  __pyx_r = 0;
83595  goto __pyx_L0;
83596  __pyx_L1_error:;
83597  __Pyx_XDECREF(__pyx_t_5);
83598  __Pyx_XDECREF(__pyx_t_6);
83599  __Pyx_XDECREF(__pyx_t_7);
83600  __Pyx_XDECREF(__pyx_t_8);
83601  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
83602  __pyx_r = -1;
83603  __pyx_L0:;
83604  __Pyx_TraceReturn(Py_None, 0);
83605  __Pyx_RefNannyFinishContext();
83606  return __pyx_r;
83607 }
83608 
83609 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
83610  * raise ImportError("numpy.core.multiarray failed to import")
83611  *
83612  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
83613  * try:
83614  * _import_umath()
83615  */
83616 
83617 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
83618  int __pyx_r;
83619  __Pyx_TraceDeclarations
83620  __Pyx_RefNannyDeclarations
83621  PyObject *__pyx_t_1 = NULL;
83622  PyObject *__pyx_t_2 = NULL;
83623  PyObject *__pyx_t_3 = NULL;
83624  int __pyx_t_4;
83625  PyObject *__pyx_t_5 = NULL;
83626  PyObject *__pyx_t_6 = NULL;
83627  PyObject *__pyx_t_7 = NULL;
83628  PyObject *__pyx_t_8 = NULL;
83629  int __pyx_lineno = 0;
83630  const char *__pyx_filename = NULL;
83631  int __pyx_clineno = 0;
83632  __Pyx_RefNannySetupContext("import_umath", 0);
83633  __Pyx_TraceCall("import_umath", __pyx_f[3], 947, 0, __PYX_ERR(3, 947, __pyx_L1_error));
83634 
83635  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
83636  *
83637  * cdef inline int import_umath() except -1:
83638  * try: # <<<<<<<<<<<<<<
83639  * _import_umath()
83640  * except Exception:
83641  */
83642  {
83643  __Pyx_PyThreadState_declare
83644  __Pyx_PyThreadState_assign
83645  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
83646  __Pyx_XGOTREF(__pyx_t_1);
83647  __Pyx_XGOTREF(__pyx_t_2);
83648  __Pyx_XGOTREF(__pyx_t_3);
83649  /*try:*/ {
83650 
83651  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":949
83652  * cdef inline int import_umath() except -1:
83653  * try:
83654  * _import_umath() # <<<<<<<<<<<<<<
83655  * except Exception:
83656  * raise ImportError("numpy.core.umath failed to import")
83657  */
83658  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 949, __pyx_L3_error)
83659 
83660  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
83661  *
83662  * cdef inline int import_umath() except -1:
83663  * try: # <<<<<<<<<<<<<<
83664  * _import_umath()
83665  * except Exception:
83666  */
83667  }
83668  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
83669  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
83670  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
83671  goto __pyx_L8_try_end;
83672  __pyx_L3_error:;
83673 
83674  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":950
83675  * try:
83676  * _import_umath()
83677  * except Exception: # <<<<<<<<<<<<<<
83678  * raise ImportError("numpy.core.umath failed to import")
83679  *
83680  */
83681  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
83682  if (__pyx_t_4) {
83683  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
83684  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 950, __pyx_L5_except_error)
83685  __Pyx_GOTREF(__pyx_t_5);
83686  __Pyx_GOTREF(__pyx_t_6);
83687  __Pyx_GOTREF(__pyx_t_7);
83688 
83689  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
83690  * _import_umath()
83691  * except Exception:
83692  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
83693  *
83694  * cdef inline int import_ufunc() except -1:
83695  */
83696  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 951, __pyx_L5_except_error)
83697  __Pyx_GOTREF(__pyx_t_8);
83698  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
83699  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
83700  __PYX_ERR(3, 951, __pyx_L5_except_error)
83701  }
83702  goto __pyx_L5_except_error;
83703  __pyx_L5_except_error:;
83704 
83705  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":948
83706  *
83707  * cdef inline int import_umath() except -1:
83708  * try: # <<<<<<<<<<<<<<
83709  * _import_umath()
83710  * except Exception:
83711  */
83712  __Pyx_XGIVEREF(__pyx_t_1);
83713  __Pyx_XGIVEREF(__pyx_t_2);
83714  __Pyx_XGIVEREF(__pyx_t_3);
83715  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
83716  goto __pyx_L1_error;
83717  __pyx_L8_try_end:;
83718  }
83719 
83720  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":947
83721  * raise ImportError("numpy.core.multiarray failed to import")
83722  *
83723  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
83724  * try:
83725  * _import_umath()
83726  */
83727 
83728  /* function exit code */
83729  __pyx_r = 0;
83730  goto __pyx_L0;
83731  __pyx_L1_error:;
83732  __Pyx_XDECREF(__pyx_t_5);
83733  __Pyx_XDECREF(__pyx_t_6);
83734  __Pyx_XDECREF(__pyx_t_7);
83735  __Pyx_XDECREF(__pyx_t_8);
83736  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
83737  __pyx_r = -1;
83738  __pyx_L0:;
83739  __Pyx_TraceReturn(Py_None, 0);
83740  __Pyx_RefNannyFinishContext();
83741  return __pyx_r;
83742 }
83743 
83744 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
83745  * raise ImportError("numpy.core.umath failed to import")
83746  *
83747  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
83748  * try:
83749  * _import_umath()
83750  */
83751 
83752 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
83753  int __pyx_r;
83754  __Pyx_TraceDeclarations
83755  __Pyx_RefNannyDeclarations
83756  PyObject *__pyx_t_1 = NULL;
83757  PyObject *__pyx_t_2 = NULL;
83758  PyObject *__pyx_t_3 = NULL;
83759  int __pyx_t_4;
83760  PyObject *__pyx_t_5 = NULL;
83761  PyObject *__pyx_t_6 = NULL;
83762  PyObject *__pyx_t_7 = NULL;
83763  PyObject *__pyx_t_8 = NULL;
83764  int __pyx_lineno = 0;
83765  const char *__pyx_filename = NULL;
83766  int __pyx_clineno = 0;
83767  __Pyx_RefNannySetupContext("import_ufunc", 0);
83768  __Pyx_TraceCall("import_ufunc", __pyx_f[3], 953, 0, __PYX_ERR(3, 953, __pyx_L1_error));
83769 
83770  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
83771  *
83772  * cdef inline int import_ufunc() except -1:
83773  * try: # <<<<<<<<<<<<<<
83774  * _import_umath()
83775  * except Exception:
83776  */
83777  {
83778  __Pyx_PyThreadState_declare
83779  __Pyx_PyThreadState_assign
83780  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
83781  __Pyx_XGOTREF(__pyx_t_1);
83782  __Pyx_XGOTREF(__pyx_t_2);
83783  __Pyx_XGOTREF(__pyx_t_3);
83784  /*try:*/ {
83785 
83786  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":955
83787  * cdef inline int import_ufunc() except -1:
83788  * try:
83789  * _import_umath() # <<<<<<<<<<<<<<
83790  * except Exception:
83791  * raise ImportError("numpy.core.umath failed to import")
83792  */
83793  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 955, __pyx_L3_error)
83794 
83795  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
83796  *
83797  * cdef inline int import_ufunc() except -1:
83798  * try: # <<<<<<<<<<<<<<
83799  * _import_umath()
83800  * except Exception:
83801  */
83802  }
83803  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
83804  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
83805  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
83806  goto __pyx_L8_try_end;
83807  __pyx_L3_error:;
83808 
83809  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":956
83810  * try:
83811  * _import_umath()
83812  * except Exception: # <<<<<<<<<<<<<<
83813  * raise ImportError("numpy.core.umath failed to import")
83814  *
83815  */
83816  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
83817  if (__pyx_t_4) {
83818  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
83819  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 956, __pyx_L5_except_error)
83820  __Pyx_GOTREF(__pyx_t_5);
83821  __Pyx_GOTREF(__pyx_t_6);
83822  __Pyx_GOTREF(__pyx_t_7);
83823 
83824  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":957
83825  * _import_umath()
83826  * except Exception:
83827  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
83828  *
83829  * cdef extern from *:
83830  */
83831  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__220, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 957, __pyx_L5_except_error)
83832  __Pyx_GOTREF(__pyx_t_8);
83833  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
83834  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
83835  __PYX_ERR(3, 957, __pyx_L5_except_error)
83836  }
83837  goto __pyx_L5_except_error;
83838  __pyx_L5_except_error:;
83839 
83840  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":954
83841  *
83842  * cdef inline int import_ufunc() except -1:
83843  * try: # <<<<<<<<<<<<<<
83844  * _import_umath()
83845  * except Exception:
83846  */
83847  __Pyx_XGIVEREF(__pyx_t_1);
83848  __Pyx_XGIVEREF(__pyx_t_2);
83849  __Pyx_XGIVEREF(__pyx_t_3);
83850  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
83851  goto __pyx_L1_error;
83852  __pyx_L8_try_end:;
83853  }
83854 
83855  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":953
83856  * raise ImportError("numpy.core.umath failed to import")
83857  *
83858  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
83859  * try:
83860  * _import_umath()
83861  */
83862 
83863  /* function exit code */
83864  __pyx_r = 0;
83865  goto __pyx_L0;
83866  __pyx_L1_error:;
83867  __Pyx_XDECREF(__pyx_t_5);
83868  __Pyx_XDECREF(__pyx_t_6);
83869  __Pyx_XDECREF(__pyx_t_7);
83870  __Pyx_XDECREF(__pyx_t_8);
83871  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
83872  __pyx_r = -1;
83873  __pyx_L0:;
83874  __Pyx_TraceReturn(Py_None, 0);
83875  __Pyx_RefNannyFinishContext();
83876  return __pyx_r;
83877 }
83878 
83879 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
83880  *
83881  *
83882  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
83883  * """
83884  * Cython equivalent of `isinstance(obj, np.timedelta64)`
83885  */
83886 
83887 static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) {
83888  int __pyx_r;
83889  __Pyx_TraceDeclarations
83890  __Pyx_RefNannyDeclarations
83891  int __pyx_lineno = 0;
83892  const char *__pyx_filename = NULL;
83893  int __pyx_clineno = 0;
83894  __Pyx_RefNannySetupContext("is_timedelta64_object", 0);
83895  __Pyx_TraceCall("is_timedelta64_object", __pyx_f[3], 967, 0, __PYX_ERR(3, 967, __pyx_L1_error));
83896 
83897  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":979
83898  * bool
83899  * """
83900  * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<<
83901  *
83902  *
83903  */
83904  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type));
83905  goto __pyx_L0;
83906 
83907  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":967
83908  *
83909  *
83910  * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<<
83911  * """
83912  * Cython equivalent of `isinstance(obj, np.timedelta64)`
83913  */
83914 
83915  /* function exit code */
83916  __pyx_L1_error:;
83917  __Pyx_WriteUnraisable("numpy.is_timedelta64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
83918  __pyx_r = 0;
83919  __pyx_L0:;
83920  __Pyx_TraceReturn(Py_None, 0);
83921  __Pyx_RefNannyFinishContext();
83922  return __pyx_r;
83923 }
83924 
83925 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
83926  *
83927  *
83928  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
83929  * """
83930  * Cython equivalent of `isinstance(obj, np.datetime64)`
83931  */
83932 
83933 static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) {
83934  int __pyx_r;
83935  __Pyx_TraceDeclarations
83936  __Pyx_RefNannyDeclarations
83937  int __pyx_lineno = 0;
83938  const char *__pyx_filename = NULL;
83939  int __pyx_clineno = 0;
83940  __Pyx_RefNannySetupContext("is_datetime64_object", 0);
83941  __Pyx_TraceCall("is_datetime64_object", __pyx_f[3], 982, 0, __PYX_ERR(3, 982, __pyx_L1_error));
83942 
83943  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":994
83944  * bool
83945  * """
83946  * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<<
83947  *
83948  *
83949  */
83950  __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type));
83951  goto __pyx_L0;
83952 
83953  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":982
83954  *
83955  *
83956  * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<<
83957  * """
83958  * Cython equivalent of `isinstance(obj, np.datetime64)`
83959  */
83960 
83961  /* function exit code */
83962  __pyx_L1_error:;
83963  __Pyx_WriteUnraisable("numpy.is_datetime64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
83964  __pyx_r = 0;
83965  __pyx_L0:;
83966  __Pyx_TraceReturn(Py_None, 0);
83967  __Pyx_RefNannyFinishContext();
83968  return __pyx_r;
83969 }
83970 
83971 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
83972  *
83973  *
83974  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
83975  * """
83976  * returns the int64 value underlying scalar numpy datetime64 object
83977  */
83978 
83979 static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) {
83980  npy_datetime __pyx_r;
83981  __Pyx_TraceDeclarations
83982  int __pyx_lineno = 0;
83983  const char *__pyx_filename = NULL;
83984  int __pyx_clineno = 0;
83985  __Pyx_TraceCall("get_datetime64_value", __pyx_f[3], 997, 1, __PYX_ERR(3, 997, __pyx_L1_error));
83986 
83987  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1004
83988  * also needed. That can be found using `get_datetime64_unit`.
83989  * """
83990  * return (<PyDatetimeScalarObject*>obj).obval # <<<<<<<<<<<<<<
83991  *
83992  *
83993  */
83994  __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval;
83995  goto __pyx_L0;
83996 
83997  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":997
83998  *
83999  *
84000  * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<<
84001  * """
84002  * returns the int64 value underlying scalar numpy datetime64 object
84003  */
84004 
84005  /* function exit code */
84006  __pyx_L1_error:;
84007  __Pyx_WriteUnraisable("numpy.get_datetime64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
84008  __pyx_r = 0;
84009  __pyx_L0:;
84010  __Pyx_TraceReturn(Py_None, 1);
84011  return __pyx_r;
84012 }
84013 
84014 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
84015  *
84016  *
84017  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
84018  * """
84019  * returns the int64 value underlying scalar numpy timedelta64 object
84020  */
84021 
84022 static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) {
84023  npy_timedelta __pyx_r;
84024  __Pyx_TraceDeclarations
84025  int __pyx_lineno = 0;
84026  const char *__pyx_filename = NULL;
84027  int __pyx_clineno = 0;
84028  __Pyx_TraceCall("get_timedelta64_value", __pyx_f[3], 1007, 1, __PYX_ERR(3, 1007, __pyx_L1_error));
84029 
84030  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1011
84031  * returns the int64 value underlying scalar numpy timedelta64 object
84032  * """
84033  * return (<PyTimedeltaScalarObject*>obj).obval # <<<<<<<<<<<<<<
84034  *
84035  *
84036  */
84037  __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval;
84038  goto __pyx_L0;
84039 
84040  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1007
84041  *
84042  *
84043  * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<<
84044  * """
84045  * returns the int64 value underlying scalar numpy timedelta64 object
84046  */
84047 
84048  /* function exit code */
84049  __pyx_L1_error:;
84050  __Pyx_WriteUnraisable("numpy.get_timedelta64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
84051  __pyx_r = 0;
84052  __pyx_L0:;
84053  __Pyx_TraceReturn(Py_None, 1);
84054  return __pyx_r;
84055 }
84056 
84057 /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
84058  *
84059  *
84060  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
84061  * """
84062  * returns the unit part of the dtype for a numpy datetime64 object.
84063  */
84064 
84065 static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) {
84066  NPY_DATETIMEUNIT __pyx_r;
84067  __Pyx_TraceDeclarations
84068  int __pyx_lineno = 0;
84069  const char *__pyx_filename = NULL;
84070  int __pyx_clineno = 0;
84071  __Pyx_TraceCall("get_datetime64_unit", __pyx_f[3], 1014, 1, __PYX_ERR(3, 1014, __pyx_L1_error));
84072 
84073  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1018
84074  * returns the unit part of the dtype for a numpy datetime64 object.
84075  * """
84076  * return <NPY_DATETIMEUNIT>(<PyDatetimeScalarObject*>obj).obmeta.base # <<<<<<<<<<<<<<
84077  */
84078  __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base);
84079  goto __pyx_L0;
84080 
84081  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":1014
84082  *
84083  *
84084  * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<<
84085  * """
84086  * returns the unit part of the dtype for a numpy datetime64 object.
84087  */
84088 
84089  /* function exit code */
84090  __pyx_L1_error:;
84091  __Pyx_WriteUnraisable("numpy.get_datetime64_unit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
84092  __pyx_r = (NPY_DATETIMEUNIT) 0;
84093  __pyx_L0:;
84094  __Pyx_TraceReturn(Py_None, 1);
84095  return __pyx_r;
84096 }
84097 
84098 /* "string.from_py":13
84099  *
84100  * @cname("__pyx_convert_string_from_py_std__in_string")
84101  * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<<
84102  * cdef Py_ssize_t length = 0
84103  * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
84104  */
84105 
84106 static std::string __pyx_convert_string_from_py_std__in_string(PyObject *__pyx_v_o) {
84107  Py_ssize_t __pyx_v_length;
84108  char const *__pyx_v_data;
84109  std::string __pyx_r;
84110  __Pyx_TraceDeclarations
84111  __Pyx_RefNannyDeclarations
84112  char const *__pyx_t_1;
84113  int __pyx_lineno = 0;
84114  const char *__pyx_filename = NULL;
84115  int __pyx_clineno = 0;
84116  __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_std__in_string", 0);
84117  __Pyx_TraceCall("__pyx_convert_string_from_py_std__in_string", __pyx_f[1], 13, 0, __PYX_ERR(1, 13, __pyx_L1_error));
84118 
84119  /* "string.from_py":14
84120  * @cname("__pyx_convert_string_from_py_std__in_string")
84121  * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *:
84122  * cdef Py_ssize_t length = 0 # <<<<<<<<<<<<<<
84123  * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
84124  * return string(data, length)
84125  */
84126  __pyx_v_length = 0;
84127 
84128  /* "string.from_py":15
84129  * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *:
84130  * cdef Py_ssize_t length = 0
84131  * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) # <<<<<<<<<<<<<<
84132  * return string(data, length)
84133  *
84134  */
84135  __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == ((char const *)NULL))) __PYX_ERR(1, 15, __pyx_L1_error)
84136  __pyx_v_data = __pyx_t_1;
84137 
84138  /* "string.from_py":16
84139  * cdef Py_ssize_t length = 0
84140  * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
84141  * return string(data, length) # <<<<<<<<<<<<<<
84142  *
84143  *
84144  */
84145  __pyx_r = std::string(__pyx_v_data, __pyx_v_length);
84146  goto __pyx_L0;
84147 
84148  /* "string.from_py":13
84149  *
84150  * @cname("__pyx_convert_string_from_py_std__in_string")
84151  * cdef string __pyx_convert_string_from_py_std__in_string(object o) except *: # <<<<<<<<<<<<<<
84152  * cdef Py_ssize_t length = 0
84153  * cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length)
84154  */
84155 
84156  /* function exit code */
84157  __pyx_L1_error:;
84158  __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
84159  __Pyx_pretend_to_initialize(&__pyx_r);
84160  __pyx_L0:;
84161  __Pyx_TraceReturn(Py_None, 0);
84162  __Pyx_RefNannyFinishContext();
84163  return __pyx_r;
84164 }
84165 
84166 /* "string.to_py":31
84167  *
84168  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
84169  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84170  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
84171  * cdef extern from *:
84172  */
84173 
84174 static CYTHON_INLINE PyObject *__pyx_convert_PyObject_string_to_py_std__in_string(std::string const &__pyx_v_s) {
84175  PyObject *__pyx_r = NULL;
84176  __Pyx_TraceDeclarations
84177  __Pyx_RefNannyDeclarations
84178  PyObject *__pyx_t_1 = NULL;
84179  int __pyx_lineno = 0;
84180  const char *__pyx_filename = NULL;
84181  int __pyx_clineno = 0;
84182  __Pyx_RefNannySetupContext("__pyx_convert_PyObject_string_to_py_std__in_string", 0);
84183  __Pyx_TraceCall("__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_f[1], 31, 0, __PYX_ERR(1, 31, __pyx_L1_error));
84184 
84185  /* "string.to_py":32
84186  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
84187  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s):
84188  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
84189  * cdef extern from *:
84190  * cdef object __Pyx_PyUnicode_FromStringAndSize(const char*, size_t)
84191  */
84192  __Pyx_XDECREF(__pyx_r);
84193  __pyx_t_1 = __Pyx_PyObject_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 32, __pyx_L1_error)
84194  __Pyx_GOTREF(__pyx_t_1);
84195  __pyx_r = __pyx_t_1;
84196  __pyx_t_1 = 0;
84197  goto __pyx_L0;
84198 
84199  /* "string.to_py":31
84200  *
84201  * @cname("__pyx_convert_PyObject_string_to_py_std__in_string")
84202  * cdef inline object __pyx_convert_PyObject_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84203  * return __Pyx_PyObject_FromStringAndSize(s.data(), s.size())
84204  * cdef extern from *:
84205  */
84206 
84207  /* function exit code */
84208  __pyx_L1_error:;
84209  __Pyx_XDECREF(__pyx_t_1);
84210  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyObject_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
84211  __pyx_r = 0;
84212  __pyx_L0:;
84213  __Pyx_XGIVEREF(__pyx_r);
84214  __Pyx_TraceReturn(__pyx_r, 0);
84215  __Pyx_RefNannyFinishContext();
84216  return __pyx_r;
84217 }
84218 
84219 /* "string.to_py":37
84220  *
84221  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
84222  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84223  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
84224  * cdef extern from *:
84225  */
84226 
84227 static CYTHON_INLINE PyObject *__pyx_convert_PyUnicode_string_to_py_std__in_string(std::string const &__pyx_v_s) {
84228  PyObject *__pyx_r = NULL;
84229  __Pyx_TraceDeclarations
84230  __Pyx_RefNannyDeclarations
84231  PyObject *__pyx_t_1 = NULL;
84232  int __pyx_lineno = 0;
84233  const char *__pyx_filename = NULL;
84234  int __pyx_clineno = 0;
84235  __Pyx_RefNannySetupContext("__pyx_convert_PyUnicode_string_to_py_std__in_string", 0);
84236  __Pyx_TraceCall("__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_f[1], 37, 0, __PYX_ERR(1, 37, __pyx_L1_error));
84237 
84238  /* "string.to_py":38
84239  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
84240  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s):
84241  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
84242  * cdef extern from *:
84243  * cdef object __Pyx_PyStr_FromStringAndSize(const char*, size_t)
84244  */
84245  __Pyx_XDECREF(__pyx_r);
84246  __pyx_t_1 = __Pyx_PyUnicode_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error)
84247  __Pyx_GOTREF(__pyx_t_1);
84248  __pyx_r = __pyx_t_1;
84249  __pyx_t_1 = 0;
84250  goto __pyx_L0;
84251 
84252  /* "string.to_py":37
84253  *
84254  * @cname("__pyx_convert_PyUnicode_string_to_py_std__in_string")
84255  * cdef inline object __pyx_convert_PyUnicode_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84256  * return __Pyx_PyUnicode_FromStringAndSize(s.data(), s.size())
84257  * cdef extern from *:
84258  */
84259 
84260  /* function exit code */
84261  __pyx_L1_error:;
84262  __Pyx_XDECREF(__pyx_t_1);
84263  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyUnicode_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
84264  __pyx_r = 0;
84265  __pyx_L0:;
84266  __Pyx_XGIVEREF(__pyx_r);
84267  __Pyx_TraceReturn(__pyx_r, 0);
84268  __Pyx_RefNannyFinishContext();
84269  return __pyx_r;
84270 }
84271 
84272 /* "string.to_py":43
84273  *
84274  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
84275  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84276  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
84277  * cdef extern from *:
84278  */
84279 
84280 static CYTHON_INLINE PyObject *__pyx_convert_PyStr_string_to_py_std__in_string(std::string const &__pyx_v_s) {
84281  PyObject *__pyx_r = NULL;
84282  __Pyx_TraceDeclarations
84283  __Pyx_RefNannyDeclarations
84284  PyObject *__pyx_t_1 = NULL;
84285  int __pyx_lineno = 0;
84286  const char *__pyx_filename = NULL;
84287  int __pyx_clineno = 0;
84288  __Pyx_RefNannySetupContext("__pyx_convert_PyStr_string_to_py_std__in_string", 0);
84289  __Pyx_TraceCall("__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_f[1], 43, 0, __PYX_ERR(1, 43, __pyx_L1_error));
84290 
84291  /* "string.to_py":44
84292  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
84293  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s):
84294  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
84295  * cdef extern from *:
84296  * cdef object __Pyx_PyBytes_FromStringAndSize(const char*, size_t)
84297  */
84298  __Pyx_XDECREF(__pyx_r);
84299  __pyx_t_1 = __Pyx_PyStr_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 44, __pyx_L1_error)
84300  __Pyx_GOTREF(__pyx_t_1);
84301  __pyx_r = __pyx_t_1;
84302  __pyx_t_1 = 0;
84303  goto __pyx_L0;
84304 
84305  /* "string.to_py":43
84306  *
84307  * @cname("__pyx_convert_PyStr_string_to_py_std__in_string")
84308  * cdef inline object __pyx_convert_PyStr_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84309  * return __Pyx_PyStr_FromStringAndSize(s.data(), s.size())
84310  * cdef extern from *:
84311  */
84312 
84313  /* function exit code */
84314  __pyx_L1_error:;
84315  __Pyx_XDECREF(__pyx_t_1);
84316  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyStr_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
84317  __pyx_r = 0;
84318  __pyx_L0:;
84319  __Pyx_XGIVEREF(__pyx_r);
84320  __Pyx_TraceReturn(__pyx_r, 0);
84321  __Pyx_RefNannyFinishContext();
84322  return __pyx_r;
84323 }
84324 
84325 /* "string.to_py":49
84326  *
84327  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
84328  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84329  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
84330  * cdef extern from *:
84331  */
84332 
84333 static CYTHON_INLINE PyObject *__pyx_convert_PyBytes_string_to_py_std__in_string(std::string const &__pyx_v_s) {
84334  PyObject *__pyx_r = NULL;
84335  __Pyx_TraceDeclarations
84336  __Pyx_RefNannyDeclarations
84337  PyObject *__pyx_t_1 = NULL;
84338  int __pyx_lineno = 0;
84339  const char *__pyx_filename = NULL;
84340  int __pyx_clineno = 0;
84341  __Pyx_RefNannySetupContext("__pyx_convert_PyBytes_string_to_py_std__in_string", 0);
84342  __Pyx_TraceCall("__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_f[1], 49, 0, __PYX_ERR(1, 49, __pyx_L1_error));
84343 
84344  /* "string.to_py":50
84345  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
84346  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s):
84347  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
84348  * cdef extern from *:
84349  * cdef object __Pyx_PyByteArray_FromStringAndSize(const char*, size_t)
84350  */
84351  __Pyx_XDECREF(__pyx_r);
84352  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 50, __pyx_L1_error)
84353  __Pyx_GOTREF(__pyx_t_1);
84354  __pyx_r = __pyx_t_1;
84355  __pyx_t_1 = 0;
84356  goto __pyx_L0;
84357 
84358  /* "string.to_py":49
84359  *
84360  * @cname("__pyx_convert_PyBytes_string_to_py_std__in_string")
84361  * cdef inline object __pyx_convert_PyBytes_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84362  * return __Pyx_PyBytes_FromStringAndSize(s.data(), s.size())
84363  * cdef extern from *:
84364  */
84365 
84366  /* function exit code */
84367  __pyx_L1_error:;
84368  __Pyx_XDECREF(__pyx_t_1);
84369  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyBytes_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
84370  __pyx_r = 0;
84371  __pyx_L0:;
84372  __Pyx_XGIVEREF(__pyx_r);
84373  __Pyx_TraceReturn(__pyx_r, 0);
84374  __Pyx_RefNannyFinishContext();
84375  return __pyx_r;
84376 }
84377 
84378 /* "string.to_py":55
84379  *
84380  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
84381  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84382  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
84383  *
84384  */
84385 
84386 static CYTHON_INLINE PyObject *__pyx_convert_PyByteArray_string_to_py_std__in_string(std::string const &__pyx_v_s) {
84387  PyObject *__pyx_r = NULL;
84388  __Pyx_TraceDeclarations
84389  __Pyx_RefNannyDeclarations
84390  PyObject *__pyx_t_1 = NULL;
84391  int __pyx_lineno = 0;
84392  const char *__pyx_filename = NULL;
84393  int __pyx_clineno = 0;
84394  __Pyx_RefNannySetupContext("__pyx_convert_PyByteArray_string_to_py_std__in_string", 0);
84395  __Pyx_TraceCall("__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __pyx_L1_error));
84396 
84397  /* "string.to_py":56
84398  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
84399  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s):
84400  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size()) # <<<<<<<<<<<<<<
84401  *
84402  */
84403  __Pyx_XDECREF(__pyx_r);
84404  __pyx_t_1 = __Pyx_PyByteArray_FromStringAndSize(__pyx_v_s.data(), __pyx_v_s.size()); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 56, __pyx_L1_error)
84405  __Pyx_GOTREF(__pyx_t_1);
84406  __pyx_r = __pyx_t_1;
84407  __pyx_t_1 = 0;
84408  goto __pyx_L0;
84409 
84410  /* "string.to_py":55
84411  *
84412  * @cname("__pyx_convert_PyByteArray_string_to_py_std__in_string")
84413  * cdef inline object __pyx_convert_PyByteArray_string_to_py_std__in_string(const string& s): # <<<<<<<<<<<<<<
84414  * return __Pyx_PyByteArray_FromStringAndSize(s.data(), s.size())
84415  *
84416  */
84417 
84418  /* function exit code */
84419  __pyx_L1_error:;
84420  __Pyx_XDECREF(__pyx_t_1);
84421  __Pyx_AddTraceback("string.to_py.__pyx_convert_PyByteArray_string_to_py_std__in_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
84422  __pyx_r = 0;
84423  __pyx_L0:;
84424  __Pyx_XGIVEREF(__pyx_r);
84425  __Pyx_TraceReturn(__pyx_r, 0);
84426  __Pyx_RefNannyFinishContext();
84427  return __pyx_r;
84428 }
84429 
84430 /* "View.MemoryView":122
84431  * cdef bint dtype_is_object
84432  *
84433  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
84434  * mode="c", bint allocate_buffer=True):
84435  *
84436  */
84437 
84438 /* Python wrapper */
84439 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
84440 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
84441  PyObject *__pyx_v_shape = 0;
84442  Py_ssize_t __pyx_v_itemsize;
84443  PyObject *__pyx_v_format = 0;
84444  PyObject *__pyx_v_mode = 0;
84445  int __pyx_v_allocate_buffer;
84446  int __pyx_lineno = 0;
84447  const char *__pyx_filename = NULL;
84448  int __pyx_clineno = 0;
84449  int __pyx_r;
84450  __Pyx_RefNannyDeclarations
84451  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
84452  {
84453  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
84454  PyObject* values[5] = {0,0,0,0,0};
84455  values[3] = ((PyObject *)__pyx_n_s_c);
84456  if (unlikely(__pyx_kwds)) {
84457  Py_ssize_t kw_args;
84458  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
84459  switch (pos_args) {
84460  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
84461  CYTHON_FALLTHROUGH;
84462  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
84463  CYTHON_FALLTHROUGH;
84464  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
84465  CYTHON_FALLTHROUGH;
84466  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
84467  CYTHON_FALLTHROUGH;
84468  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
84469  CYTHON_FALLTHROUGH;
84470  case 0: break;
84471  default: goto __pyx_L5_argtuple_error;
84472  }
84473  kw_args = PyDict_Size(__pyx_kwds);
84474  switch (pos_args) {
84475  case 0:
84476  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
84477  else goto __pyx_L5_argtuple_error;
84478  CYTHON_FALLTHROUGH;
84479  case 1:
84480  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
84481  else {
84482  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(1, 122, __pyx_L3_error)
84483  }
84484  CYTHON_FALLTHROUGH;
84485  case 2:
84486  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
84487  else {
84488  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(1, 122, __pyx_L3_error)
84489  }
84490  CYTHON_FALLTHROUGH;
84491  case 3:
84492  if (kw_args > 0) {
84493  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
84494  if (value) { values[3] = value; kw_args--; }
84495  }
84496  CYTHON_FALLTHROUGH;
84497  case 4:
84498  if (kw_args > 0) {
84499  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
84500  if (value) { values[4] = value; kw_args--; }
84501  }
84502  }
84503  if (unlikely(kw_args > 0)) {
84504  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 122, __pyx_L3_error)
84505  }
84506  } else {
84507  switch (PyTuple_GET_SIZE(__pyx_args)) {
84508  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
84509  CYTHON_FALLTHROUGH;
84510  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
84511  CYTHON_FALLTHROUGH;
84512  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
84513  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
84514  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
84515  break;
84516  default: goto __pyx_L5_argtuple_error;
84517  }
84518  }
84519  __pyx_v_shape = ((PyObject*)values[0]);
84520  __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 122, __pyx_L3_error)
84521  __pyx_v_format = values[2];
84522  __pyx_v_mode = values[3];
84523  if (values[4]) {
84524  __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 123, __pyx_L3_error)
84525  } else {
84526 
84527  /* "View.MemoryView":123
84528  *
84529  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
84530  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
84531  *
84532  * cdef int idx
84533  */
84534  __pyx_v_allocate_buffer = ((int)1);
84535  }
84536  }
84537  goto __pyx_L4_argument_unpacking_done;
84538  __pyx_L5_argtuple_error:;
84539  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 122, __pyx_L3_error)
84540  __pyx_L3_error:;
84541  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
84542  __Pyx_RefNannyFinishContext();
84543  return -1;
84544  __pyx_L4_argument_unpacking_done:;
84545  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(1, 122, __pyx_L1_error)
84546  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
84547  PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(1, 122, __pyx_L1_error)
84548  }
84549  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
84550 
84551  /* "View.MemoryView":122
84552  * cdef bint dtype_is_object
84553  *
84554  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
84555  * mode="c", bint allocate_buffer=True):
84556  *
84557  */
84558 
84559  /* function exit code */
84560  goto __pyx_L0;
84561  __pyx_L1_error:;
84562  __pyx_r = -1;
84563  __pyx_L0:;
84564  __Pyx_RefNannyFinishContext();
84565  return __pyx_r;
84566 }
84567 
84568 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
84569  int __pyx_v_idx;
84570  Py_ssize_t __pyx_v_i;
84571  Py_ssize_t __pyx_v_dim;
84572  PyObject **__pyx_v_p;
84573  char __pyx_v_order;
84574  int __pyx_r;
84575  __Pyx_TraceDeclarations
84576  __Pyx_RefNannyDeclarations
84577  Py_ssize_t __pyx_t_1;
84578  int __pyx_t_2;
84579  PyObject *__pyx_t_3 = NULL;
84580  int __pyx_t_4;
84581  PyObject *__pyx_t_5 = NULL;
84582  PyObject *__pyx_t_6 = NULL;
84583  char *__pyx_t_7;
84584  int __pyx_t_8;
84585  Py_ssize_t __pyx_t_9;
84586  PyObject *__pyx_t_10 = NULL;
84587  Py_ssize_t __pyx_t_11;
84588  int __pyx_lineno = 0;
84589  const char *__pyx_filename = NULL;
84590  int __pyx_clineno = 0;
84591  __Pyx_RefNannySetupContext("__cinit__", 0);
84592  __Pyx_TraceCall("__cinit__", __pyx_f[1], 122, 0, __PYX_ERR(1, 122, __pyx_L1_error));
84593  __Pyx_INCREF(__pyx_v_format);
84594 
84595  /* "View.MemoryView":129
84596  * cdef PyObject **p
84597  *
84598  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
84599  * self.itemsize = itemsize
84600  *
84601  */
84602  if (unlikely(__pyx_v_shape == Py_None)) {
84603  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
84604  __PYX_ERR(1, 129, __pyx_L1_error)
84605  }
84606  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(1, 129, __pyx_L1_error)
84607  __pyx_v_self->ndim = ((int)__pyx_t_1);
84608 
84609  /* "View.MemoryView":130
84610  *
84611  * self.ndim = <int> len(shape)
84612  * self.itemsize = itemsize # <<<<<<<<<<<<<<
84613  *
84614  * if not self.ndim:
84615  */
84616  __pyx_v_self->itemsize = __pyx_v_itemsize;
84617 
84618  /* "View.MemoryView":132
84619  * self.itemsize = itemsize
84620  *
84621  * if not self.ndim: # <<<<<<<<<<<<<<
84622  * raise ValueError("Empty shape tuple for cython.array")
84623  *
84624  */
84625  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
84626  if (unlikely(__pyx_t_2)) {
84627 
84628  /* "View.MemoryView":133
84629  *
84630  * if not self.ndim:
84631  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
84632  *
84633  * if itemsize <= 0:
84634  */
84635  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__221, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 133, __pyx_L1_error)
84636  __Pyx_GOTREF(__pyx_t_3);
84637  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
84638  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
84639  __PYX_ERR(1, 133, __pyx_L1_error)
84640 
84641  /* "View.MemoryView":132
84642  * self.itemsize = itemsize
84643  *
84644  * if not self.ndim: # <<<<<<<<<<<<<<
84645  * raise ValueError("Empty shape tuple for cython.array")
84646  *
84647  */
84648  }
84649 
84650  /* "View.MemoryView":135
84651  * raise ValueError("Empty shape tuple for cython.array")
84652  *
84653  * if itemsize <= 0: # <<<<<<<<<<<<<<
84654  * raise ValueError("itemsize <= 0 for cython.array")
84655  *
84656  */
84657  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
84658  if (unlikely(__pyx_t_2)) {
84659 
84660  /* "View.MemoryView":136
84661  *
84662  * if itemsize <= 0:
84663  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
84664  *
84665  * if not isinstance(format, bytes):
84666  */
84667  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__222, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 136, __pyx_L1_error)
84668  __Pyx_GOTREF(__pyx_t_3);
84669  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
84670  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
84671  __PYX_ERR(1, 136, __pyx_L1_error)
84672 
84673  /* "View.MemoryView":135
84674  * raise ValueError("Empty shape tuple for cython.array")
84675  *
84676  * if itemsize <= 0: # <<<<<<<<<<<<<<
84677  * raise ValueError("itemsize <= 0 for cython.array")
84678  *
84679  */
84680  }
84681 
84682  /* "View.MemoryView":138
84683  * raise ValueError("itemsize <= 0 for cython.array")
84684  *
84685  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
84686  * format = format.encode('ASCII')
84687  * self._format = format # keep a reference to the byte string
84688  */
84689  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
84690  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
84691  if (__pyx_t_4) {
84692 
84693  /* "View.MemoryView":139
84694  *
84695  * if not isinstance(format, bytes):
84696  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
84697  * self._format = format # keep a reference to the byte string
84698  * self.format = self._format
84699  */
84700  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 139, __pyx_L1_error)
84701  __Pyx_GOTREF(__pyx_t_5);
84702  __pyx_t_6 = NULL;
84703  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
84704  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
84705  if (likely(__pyx_t_6)) {
84706  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
84707  __Pyx_INCREF(__pyx_t_6);
84708  __Pyx_INCREF(function);
84709  __Pyx_DECREF_SET(__pyx_t_5, function);
84710  }
84711  }
84712  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
84713  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
84714  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 139, __pyx_L1_error)
84715  __Pyx_GOTREF(__pyx_t_3);
84716  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
84717  __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
84718  __pyx_t_3 = 0;
84719 
84720  /* "View.MemoryView":138
84721  * raise ValueError("itemsize <= 0 for cython.array")
84722  *
84723  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
84724  * format = format.encode('ASCII')
84725  * self._format = format # keep a reference to the byte string
84726  */
84727  }
84728 
84729  /* "View.MemoryView":140
84730  * if not isinstance(format, bytes):
84731  * format = format.encode('ASCII')
84732  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
84733  * self.format = self._format
84734  *
84735  */
84736  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(1, 140, __pyx_L1_error)
84737  __pyx_t_3 = __pyx_v_format;
84738  __Pyx_INCREF(__pyx_t_3);
84739  __Pyx_GIVEREF(__pyx_t_3);
84740  __Pyx_GOTREF(__pyx_v_self->_format);
84741  __Pyx_DECREF(__pyx_v_self->_format);
84742  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
84743  __pyx_t_3 = 0;
84744 
84745  /* "View.MemoryView":141
84746  * format = format.encode('ASCII')
84747  * self._format = format # keep a reference to the byte string
84748  * self.format = self._format # <<<<<<<<<<<<<<
84749  *
84750  *
84751  */
84752  if (unlikely(__pyx_v_self->_format == Py_None)) {
84753  PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
84754  __PYX_ERR(1, 141, __pyx_L1_error)
84755  }
84756  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(1, 141, __pyx_L1_error)
84757  __pyx_v_self->format = __pyx_t_7;
84758 
84759  /* "View.MemoryView":144
84760  *
84761  *
84762  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
84763  * self._strides = self._shape + self.ndim
84764  *
84765  */
84766  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
84767 
84768  /* "View.MemoryView":145
84769  *
84770  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
84771  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
84772  *
84773  * if not self._shape:
84774  */
84775  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
84776 
84777  /* "View.MemoryView":147
84778  * self._strides = self._shape + self.ndim
84779  *
84780  * if not self._shape: # <<<<<<<<<<<<<<
84781  * raise MemoryError("unable to allocate shape and strides.")
84782  *
84783  */
84784  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
84785  if (unlikely(__pyx_t_4)) {
84786 
84787  /* "View.MemoryView":148
84788  *
84789  * if not self._shape:
84790  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
84791  *
84792  *
84793  */
84794  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__223, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 148, __pyx_L1_error)
84795  __Pyx_GOTREF(__pyx_t_3);
84796  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
84797  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
84798  __PYX_ERR(1, 148, __pyx_L1_error)
84799 
84800  /* "View.MemoryView":147
84801  * self._strides = self._shape + self.ndim
84802  *
84803  * if not self._shape: # <<<<<<<<<<<<<<
84804  * raise MemoryError("unable to allocate shape and strides.")
84805  *
84806  */
84807  }
84808 
84809  /* "View.MemoryView":151
84810  *
84811  *
84812  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
84813  * if dim <= 0:
84814  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
84815  */
84816  __pyx_t_8 = 0;
84817  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
84818  for (;;) {
84819  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
84820  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
84821  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(1, 151, __pyx_L1_error)
84822  #else
84823  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 151, __pyx_L1_error)
84824  __Pyx_GOTREF(__pyx_t_5);
84825  #endif
84826  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 151, __pyx_L1_error)
84827  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
84828  __pyx_v_dim = __pyx_t_9;
84829  __pyx_v_idx = __pyx_t_8;
84830  __pyx_t_8 = (__pyx_t_8 + 1);
84831 
84832  /* "View.MemoryView":152
84833  *
84834  * for idx, dim in enumerate(shape):
84835  * if dim <= 0: # <<<<<<<<<<<<<<
84836  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
84837  * self._shape[idx] = dim
84838  */
84839  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
84840  if (unlikely(__pyx_t_4)) {
84841 
84842  /* "View.MemoryView":153
84843  * for idx, dim in enumerate(shape):
84844  * if dim <= 0:
84845  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
84846  * self._shape[idx] = dim
84847  *
84848  */
84849  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 153, __pyx_L1_error)
84850  __Pyx_GOTREF(__pyx_t_5);
84851  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error)
84852  __Pyx_GOTREF(__pyx_t_6);
84853  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)
84854  __Pyx_GOTREF(__pyx_t_10);
84855  __Pyx_GIVEREF(__pyx_t_5);
84856  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
84857  __Pyx_GIVEREF(__pyx_t_6);
84858  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
84859  __pyx_t_5 = 0;
84860  __pyx_t_6 = 0;
84861  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 153, __pyx_L1_error)
84862  __Pyx_GOTREF(__pyx_t_6);
84863  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
84864  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 153, __pyx_L1_error)
84865  __Pyx_GOTREF(__pyx_t_10);
84866  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
84867  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
84868  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
84869  __PYX_ERR(1, 153, __pyx_L1_error)
84870 
84871  /* "View.MemoryView":152
84872  *
84873  * for idx, dim in enumerate(shape):
84874  * if dim <= 0: # <<<<<<<<<<<<<<
84875  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
84876  * self._shape[idx] = dim
84877  */
84878  }
84879 
84880  /* "View.MemoryView":154
84881  * if dim <= 0:
84882  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
84883  * self._shape[idx] = dim # <<<<<<<<<<<<<<
84884  *
84885  * cdef char order
84886  */
84887  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
84888 
84889  /* "View.MemoryView":151
84890  *
84891  *
84892  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
84893  * if dim <= 0:
84894  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
84895  */
84896  }
84897  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
84898 
84899  /* "View.MemoryView":157
84900  *
84901  * cdef char order
84902  * if mode == 'fortran': # <<<<<<<<<<<<<<
84903  * order = b'F'
84904  * self.mode = u'fortran'
84905  */
84906  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 157, __pyx_L1_error)
84907  if (__pyx_t_4) {
84908 
84909  /* "View.MemoryView":158
84910  * cdef char order
84911  * if mode == 'fortran':
84912  * order = b'F' # <<<<<<<<<<<<<<
84913  * self.mode = u'fortran'
84914  * elif mode == 'c':
84915  */
84916  __pyx_v_order = 'F';
84917 
84918  /* "View.MemoryView":159
84919  * if mode == 'fortran':
84920  * order = b'F'
84921  * self.mode = u'fortran' # <<<<<<<<<<<<<<
84922  * elif mode == 'c':
84923  * order = b'C'
84924  */
84925  __Pyx_INCREF(__pyx_n_u_fortran);
84926  __Pyx_GIVEREF(__pyx_n_u_fortran);
84927  __Pyx_GOTREF(__pyx_v_self->mode);
84928  __Pyx_DECREF(__pyx_v_self->mode);
84929  __pyx_v_self->mode = __pyx_n_u_fortran;
84930 
84931  /* "View.MemoryView":157
84932  *
84933  * cdef char order
84934  * if mode == 'fortran': # <<<<<<<<<<<<<<
84935  * order = b'F'
84936  * self.mode = u'fortran'
84937  */
84938  goto __pyx_L10;
84939  }
84940 
84941  /* "View.MemoryView":160
84942  * order = b'F'
84943  * self.mode = u'fortran'
84944  * elif mode == 'c': # <<<<<<<<<<<<<<
84945  * order = b'C'
84946  * self.mode = u'c'
84947  */
84948  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(1, 160, __pyx_L1_error)
84949  if (likely(__pyx_t_4)) {
84950 
84951  /* "View.MemoryView":161
84952  * self.mode = u'fortran'
84953  * elif mode == 'c':
84954  * order = b'C' # <<<<<<<<<<<<<<
84955  * self.mode = u'c'
84956  * else:
84957  */
84958  __pyx_v_order = 'C';
84959 
84960  /* "View.MemoryView":162
84961  * elif mode == 'c':
84962  * order = b'C'
84963  * self.mode = u'c' # <<<<<<<<<<<<<<
84964  * else:
84965  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
84966  */
84967  __Pyx_INCREF(__pyx_n_u_c);
84968  __Pyx_GIVEREF(__pyx_n_u_c);
84969  __Pyx_GOTREF(__pyx_v_self->mode);
84970  __Pyx_DECREF(__pyx_v_self->mode);
84971  __pyx_v_self->mode = __pyx_n_u_c;
84972 
84973  /* "View.MemoryView":160
84974  * order = b'F'
84975  * self.mode = u'fortran'
84976  * elif mode == 'c': # <<<<<<<<<<<<<<
84977  * order = b'C'
84978  * self.mode = u'c'
84979  */
84980  goto __pyx_L10;
84981  }
84982 
84983  /* "View.MemoryView":164
84984  * self.mode = u'c'
84985  * else:
84986  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
84987  *
84988  * self.len = fill_contig_strides_array(self._shape, self._strides,
84989  */
84990  /*else*/ {
84991  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 164, __pyx_L1_error)
84992  __Pyx_GOTREF(__pyx_t_3);
84993  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 164, __pyx_L1_error)
84994  __Pyx_GOTREF(__pyx_t_10);
84995  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
84996  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
84997  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
84998  __PYX_ERR(1, 164, __pyx_L1_error)
84999  }
85000  __pyx_L10:;
85001 
85002  /* "View.MemoryView":166
85003  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
85004  *
85005  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
85006  * itemsize, self.ndim, order)
85007  *
85008  */
85009  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
85010 
85011  /* "View.MemoryView":169
85012  * itemsize, self.ndim, order)
85013  *
85014  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
85015  * self.dtype_is_object = format == b'O'
85016  * if allocate_buffer:
85017  */
85018  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
85019 
85020  /* "View.MemoryView":170
85021  *
85022  * self.free_data = allocate_buffer
85023  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
85024  * if allocate_buffer:
85025  *
85026  */
85027  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 170, __pyx_L1_error)
85028  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 170, __pyx_L1_error)
85029  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
85030  __pyx_v_self->dtype_is_object = __pyx_t_4;
85031 
85032  /* "View.MemoryView":171
85033  * self.free_data = allocate_buffer
85034  * self.dtype_is_object = format == b'O'
85035  * if allocate_buffer: # <<<<<<<<<<<<<<
85036  *
85037  *
85038  */
85039  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
85040  if (__pyx_t_4) {
85041 
85042  /* "View.MemoryView":174
85043  *
85044  *
85045  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
85046  * if not self.data:
85047  * raise MemoryError("unable to allocate array data.")
85048  */
85049  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
85050 
85051  /* "View.MemoryView":175
85052  *
85053  * self.data = <char *>malloc(self.len)
85054  * if not self.data: # <<<<<<<<<<<<<<
85055  * raise MemoryError("unable to allocate array data.")
85056  *
85057  */
85058  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
85059  if (unlikely(__pyx_t_4)) {
85060 
85061  /* "View.MemoryView":176
85062  * self.data = <char *>malloc(self.len)
85063  * if not self.data:
85064  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
85065  *
85066  * if self.dtype_is_object:
85067  */
85068  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__224, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 176, __pyx_L1_error)
85069  __Pyx_GOTREF(__pyx_t_10);
85070  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
85071  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
85072  __PYX_ERR(1, 176, __pyx_L1_error)
85073 
85074  /* "View.MemoryView":175
85075  *
85076  * self.data = <char *>malloc(self.len)
85077  * if not self.data: # <<<<<<<<<<<<<<
85078  * raise MemoryError("unable to allocate array data.")
85079  *
85080  */
85081  }
85082 
85083  /* "View.MemoryView":178
85084  * raise MemoryError("unable to allocate array data.")
85085  *
85086  * if self.dtype_is_object: # <<<<<<<<<<<<<<
85087  * p = <PyObject **> self.data
85088  * for i in range(self.len / itemsize):
85089  */
85090  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
85091  if (__pyx_t_4) {
85092 
85093  /* "View.MemoryView":179
85094  *
85095  * if self.dtype_is_object:
85096  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
85097  * for i in range(self.len / itemsize):
85098  * p[i] = Py_None
85099  */
85100  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
85101 
85102  /* "View.MemoryView":180
85103  * if self.dtype_is_object:
85104  * p = <PyObject **> self.data
85105  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
85106  * p[i] = Py_None
85107  * Py_INCREF(Py_None)
85108  */
85109  if (unlikely(__pyx_v_itemsize == 0)) {
85110  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
85111  __PYX_ERR(1, 180, __pyx_L1_error)
85112  }
85113  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
85114  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
85115  __PYX_ERR(1, 180, __pyx_L1_error)
85116  }
85117  __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
85118  __pyx_t_9 = __pyx_t_1;
85119  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
85120  __pyx_v_i = __pyx_t_11;
85121 
85122  /* "View.MemoryView":181
85123  * p = <PyObject **> self.data
85124  * for i in range(self.len / itemsize):
85125  * p[i] = Py_None # <<<<<<<<<<<<<<
85126  * Py_INCREF(Py_None)
85127  *
85128  */
85129  (__pyx_v_p[__pyx_v_i]) = Py_None;
85130 
85131  /* "View.MemoryView":182
85132  * for i in range(self.len / itemsize):
85133  * p[i] = Py_None
85134  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
85135  *
85136  * @cname('getbuffer')
85137  */
85138  Py_INCREF(Py_None);
85139  }
85140 
85141  /* "View.MemoryView":178
85142  * raise MemoryError("unable to allocate array data.")
85143  *
85144  * if self.dtype_is_object: # <<<<<<<<<<<<<<
85145  * p = <PyObject **> self.data
85146  * for i in range(self.len / itemsize):
85147  */
85148  }
85149 
85150  /* "View.MemoryView":171
85151  * self.free_data = allocate_buffer
85152  * self.dtype_is_object = format == b'O'
85153  * if allocate_buffer: # <<<<<<<<<<<<<<
85154  *
85155  *
85156  */
85157  }
85158 
85159  /* "View.MemoryView":122
85160  * cdef bint dtype_is_object
85161  *
85162  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
85163  * mode="c", bint allocate_buffer=True):
85164  *
85165  */
85166 
85167  /* function exit code */
85168  __pyx_r = 0;
85169  goto __pyx_L0;
85170  __pyx_L1_error:;
85171  __Pyx_XDECREF(__pyx_t_3);
85172  __Pyx_XDECREF(__pyx_t_5);
85173  __Pyx_XDECREF(__pyx_t_6);
85174  __Pyx_XDECREF(__pyx_t_10);
85175  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
85176  __pyx_r = -1;
85177  __pyx_L0:;
85178  __Pyx_XDECREF(__pyx_v_format);
85179  __Pyx_TraceReturn(Py_None, 0);
85180  __Pyx_RefNannyFinishContext();
85181  return __pyx_r;
85182 }
85183 
85184 /* "View.MemoryView":185
85185  *
85186  * @cname('getbuffer')
85187  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
85188  * cdef int bufmode = -1
85189  * if self.mode == u"c":
85190  */
85191 
85192 /* Python wrapper */
85193 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
85194 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
85195  int __pyx_r;
85196  __Pyx_RefNannyDeclarations
85197  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
85198  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
85199 
85200  /* function exit code */
85201  __Pyx_RefNannyFinishContext();
85202  return __pyx_r;
85203 }
85204 
85205 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
85206  int __pyx_v_bufmode;
85207  int __pyx_r;
85208  __Pyx_TraceDeclarations
85209  __Pyx_RefNannyDeclarations
85210  int __pyx_t_1;
85211  int __pyx_t_2;
85212  PyObject *__pyx_t_3 = NULL;
85213  char *__pyx_t_4;
85214  Py_ssize_t __pyx_t_5;
85215  int __pyx_t_6;
85216  Py_ssize_t *__pyx_t_7;
85217  int __pyx_lineno = 0;
85218  const char *__pyx_filename = NULL;
85219  int __pyx_clineno = 0;
85220  if (__pyx_v_info == NULL) {
85221  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
85222  return -1;
85223  }
85224  __Pyx_RefNannySetupContext("__getbuffer__", 0);
85225  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
85226  __Pyx_GIVEREF(__pyx_v_info->obj);
85227  __Pyx_TraceCall("__getbuffer__", __pyx_f[1], 185, 0, __PYX_ERR(1, 185, __pyx_L1_error));
85228 
85229  /* "View.MemoryView":186
85230  * @cname('getbuffer')
85231  * def __getbuffer__(self, Py_buffer *info, int flags):
85232  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
85233  * if self.mode == u"c":
85234  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85235  */
85236  __pyx_v_bufmode = -1;
85237 
85238  /* "View.MemoryView":187
85239  * def __getbuffer__(self, Py_buffer *info, int flags):
85240  * cdef int bufmode = -1
85241  * if self.mode == u"c": # <<<<<<<<<<<<<<
85242  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85243  * elif self.mode == u"fortran":
85244  */
85245  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 187, __pyx_L1_error)
85246  __pyx_t_2 = (__pyx_t_1 != 0);
85247  if (__pyx_t_2) {
85248 
85249  /* "View.MemoryView":188
85250  * cdef int bufmode = -1
85251  * if self.mode == u"c":
85252  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
85253  * elif self.mode == u"fortran":
85254  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85255  */
85256  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
85257 
85258  /* "View.MemoryView":187
85259  * def __getbuffer__(self, Py_buffer *info, int flags):
85260  * cdef int bufmode = -1
85261  * if self.mode == u"c": # <<<<<<<<<<<<<<
85262  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85263  * elif self.mode == u"fortran":
85264  */
85265  goto __pyx_L3;
85266  }
85267 
85268  /* "View.MemoryView":189
85269  * if self.mode == u"c":
85270  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85271  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
85272  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85273  * if not (flags & bufmode):
85274  */
85275  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 189, __pyx_L1_error)
85276  __pyx_t_1 = (__pyx_t_2 != 0);
85277  if (__pyx_t_1) {
85278 
85279  /* "View.MemoryView":190
85280  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85281  * elif self.mode == u"fortran":
85282  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
85283  * if not (flags & bufmode):
85284  * raise ValueError("Can only create a buffer that is contiguous in memory.")
85285  */
85286  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
85287 
85288  /* "View.MemoryView":189
85289  * if self.mode == u"c":
85290  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85291  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
85292  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85293  * if not (flags & bufmode):
85294  */
85295  }
85296  __pyx_L3:;
85297 
85298  /* "View.MemoryView":191
85299  * elif self.mode == u"fortran":
85300  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85301  * if not (flags & bufmode): # <<<<<<<<<<<<<<
85302  * raise ValueError("Can only create a buffer that is contiguous in memory.")
85303  * info.buf = self.data
85304  */
85305  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
85306  if (unlikely(__pyx_t_1)) {
85307 
85308  /* "View.MemoryView":192
85309  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85310  * if not (flags & bufmode):
85311  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
85312  * info.buf = self.data
85313  * info.len = self.len
85314  */
85315  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__225, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 192, __pyx_L1_error)
85316  __Pyx_GOTREF(__pyx_t_3);
85317  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
85318  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
85319  __PYX_ERR(1, 192, __pyx_L1_error)
85320 
85321  /* "View.MemoryView":191
85322  * elif self.mode == u"fortran":
85323  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
85324  * if not (flags & bufmode): # <<<<<<<<<<<<<<
85325  * raise ValueError("Can only create a buffer that is contiguous in memory.")
85326  * info.buf = self.data
85327  */
85328  }
85329 
85330  /* "View.MemoryView":193
85331  * if not (flags & bufmode):
85332  * raise ValueError("Can only create a buffer that is contiguous in memory.")
85333  * info.buf = self.data # <<<<<<<<<<<<<<
85334  * info.len = self.len
85335  * info.ndim = self.ndim
85336  */
85337  __pyx_t_4 = __pyx_v_self->data;
85338  __pyx_v_info->buf = __pyx_t_4;
85339 
85340  /* "View.MemoryView":194
85341  * raise ValueError("Can only create a buffer that is contiguous in memory.")
85342  * info.buf = self.data
85343  * info.len = self.len # <<<<<<<<<<<<<<
85344  * info.ndim = self.ndim
85345  * info.shape = self._shape
85346  */
85347  __pyx_t_5 = __pyx_v_self->len;
85348  __pyx_v_info->len = __pyx_t_5;
85349 
85350  /* "View.MemoryView":195
85351  * info.buf = self.data
85352  * info.len = self.len
85353  * info.ndim = self.ndim # <<<<<<<<<<<<<<
85354  * info.shape = self._shape
85355  * info.strides = self._strides
85356  */
85357  __pyx_t_6 = __pyx_v_self->ndim;
85358  __pyx_v_info->ndim = __pyx_t_6;
85359 
85360  /* "View.MemoryView":196
85361  * info.len = self.len
85362  * info.ndim = self.ndim
85363  * info.shape = self._shape # <<<<<<<<<<<<<<
85364  * info.strides = self._strides
85365  * info.suboffsets = NULL
85366  */
85367  __pyx_t_7 = __pyx_v_self->_shape;
85368  __pyx_v_info->shape = __pyx_t_7;
85369 
85370  /* "View.MemoryView":197
85371  * info.ndim = self.ndim
85372  * info.shape = self._shape
85373  * info.strides = self._strides # <<<<<<<<<<<<<<
85374  * info.suboffsets = NULL
85375  * info.itemsize = self.itemsize
85376  */
85377  __pyx_t_7 = __pyx_v_self->_strides;
85378  __pyx_v_info->strides = __pyx_t_7;
85379 
85380  /* "View.MemoryView":198
85381  * info.shape = self._shape
85382  * info.strides = self._strides
85383  * info.suboffsets = NULL # <<<<<<<<<<<<<<
85384  * info.itemsize = self.itemsize
85385  * info.readonly = 0
85386  */
85387  __pyx_v_info->suboffsets = NULL;
85388 
85389  /* "View.MemoryView":199
85390  * info.strides = self._strides
85391  * info.suboffsets = NULL
85392  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
85393  * info.readonly = 0
85394  *
85395  */
85396  __pyx_t_5 = __pyx_v_self->itemsize;
85397  __pyx_v_info->itemsize = __pyx_t_5;
85398 
85399  /* "View.MemoryView":200
85400  * info.suboffsets = NULL
85401  * info.itemsize = self.itemsize
85402  * info.readonly = 0 # <<<<<<<<<<<<<<
85403  *
85404  * if flags & PyBUF_FORMAT:
85405  */
85406  __pyx_v_info->readonly = 0;
85407 
85408  /* "View.MemoryView":202
85409  * info.readonly = 0
85410  *
85411  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
85412  * info.format = self.format
85413  * else:
85414  */
85415  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
85416  if (__pyx_t_1) {
85417 
85418  /* "View.MemoryView":203
85419  *
85420  * if flags & PyBUF_FORMAT:
85421  * info.format = self.format # <<<<<<<<<<<<<<
85422  * else:
85423  * info.format = NULL
85424  */
85425  __pyx_t_4 = __pyx_v_self->format;
85426  __pyx_v_info->format = __pyx_t_4;
85427 
85428  /* "View.MemoryView":202
85429  * info.readonly = 0
85430  *
85431  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
85432  * info.format = self.format
85433  * else:
85434  */
85435  goto __pyx_L5;
85436  }
85437 
85438  /* "View.MemoryView":205
85439  * info.format = self.format
85440  * else:
85441  * info.format = NULL # <<<<<<<<<<<<<<
85442  *
85443  * info.obj = self
85444  */
85445  /*else*/ {
85446  __pyx_v_info->format = NULL;
85447  }
85448  __pyx_L5:;
85449 
85450  /* "View.MemoryView":207
85451  * info.format = NULL
85452  *
85453  * info.obj = self # <<<<<<<<<<<<<<
85454  *
85455  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
85456  */
85457  __Pyx_INCREF(((PyObject *)__pyx_v_self));
85458  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
85459  __Pyx_GOTREF(__pyx_v_info->obj);
85460  __Pyx_DECREF(__pyx_v_info->obj);
85461  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
85462 
85463  /* "View.MemoryView":185
85464  *
85465  * @cname('getbuffer')
85466  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
85467  * cdef int bufmode = -1
85468  * if self.mode == u"c":
85469  */
85470 
85471  /* function exit code */
85472  __pyx_r = 0;
85473  goto __pyx_L0;
85474  __pyx_L1_error:;
85475  __Pyx_XDECREF(__pyx_t_3);
85476  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
85477  __pyx_r = -1;
85478  if (__pyx_v_info->obj != NULL) {
85479  __Pyx_GOTREF(__pyx_v_info->obj);
85480  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
85481  }
85482  goto __pyx_L2;
85483  __pyx_L0:;
85484  if (__pyx_v_info->obj == Py_None) {
85485  __Pyx_GOTREF(__pyx_v_info->obj);
85486  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
85487  }
85488  __pyx_L2:;
85489  __Pyx_TraceReturn(Py_None, 0);
85490  __Pyx_RefNannyFinishContext();
85491  return __pyx_r;
85492 }
85493 
85494 /* "View.MemoryView":211
85495  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
85496  *
85497  * def __dealloc__(array self): # <<<<<<<<<<<<<<
85498  * if self.callback_free_data != NULL:
85499  * self.callback_free_data(self.data)
85500  */
85501 
85502 /* Python wrapper */
85503 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
85504 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
85505  __Pyx_RefNannyDeclarations
85506  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
85507  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
85508 
85509  /* function exit code */
85510  __Pyx_RefNannyFinishContext();
85511 }
85512 
85513 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
85514  __Pyx_TraceDeclarations
85515  __Pyx_RefNannyDeclarations
85516  int __pyx_t_1;
85517  int __pyx_lineno = 0;
85518  const char *__pyx_filename = NULL;
85519  int __pyx_clineno = 0;
85520  __Pyx_RefNannySetupContext("__dealloc__", 0);
85521  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 211, 0, __PYX_ERR(1, 211, __pyx_L1_error));
85522 
85523  /* "View.MemoryView":212
85524  *
85525  * def __dealloc__(array self):
85526  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
85527  * self.callback_free_data(self.data)
85528  * elif self.free_data:
85529  */
85530  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
85531  if (__pyx_t_1) {
85532 
85533  /* "View.MemoryView":213
85534  * def __dealloc__(array self):
85535  * if self.callback_free_data != NULL:
85536  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
85537  * elif self.free_data:
85538  * if self.dtype_is_object:
85539  */
85540  __pyx_v_self->callback_free_data(__pyx_v_self->data);
85541 
85542  /* "View.MemoryView":212
85543  *
85544  * def __dealloc__(array self):
85545  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
85546  * self.callback_free_data(self.data)
85547  * elif self.free_data:
85548  */
85549  goto __pyx_L3;
85550  }
85551 
85552  /* "View.MemoryView":214
85553  * if self.callback_free_data != NULL:
85554  * self.callback_free_data(self.data)
85555  * elif self.free_data: # <<<<<<<<<<<<<<
85556  * if self.dtype_is_object:
85557  * refcount_objects_in_slice(self.data, self._shape,
85558  */
85559  __pyx_t_1 = (__pyx_v_self->free_data != 0);
85560  if (__pyx_t_1) {
85561 
85562  /* "View.MemoryView":215
85563  * self.callback_free_data(self.data)
85564  * elif self.free_data:
85565  * if self.dtype_is_object: # <<<<<<<<<<<<<<
85566  * refcount_objects_in_slice(self.data, self._shape,
85567  * self._strides, self.ndim, False)
85568  */
85569  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
85570  if (__pyx_t_1) {
85571 
85572  /* "View.MemoryView":216
85573  * elif self.free_data:
85574  * if self.dtype_is_object:
85575  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
85576  * self._strides, self.ndim, False)
85577  * free(self.data)
85578  */
85579  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
85580 
85581  /* "View.MemoryView":215
85582  * self.callback_free_data(self.data)
85583  * elif self.free_data:
85584  * if self.dtype_is_object: # <<<<<<<<<<<<<<
85585  * refcount_objects_in_slice(self.data, self._shape,
85586  * self._strides, self.ndim, False)
85587  */
85588  }
85589 
85590  /* "View.MemoryView":218
85591  * refcount_objects_in_slice(self.data, self._shape,
85592  * self._strides, self.ndim, False)
85593  * free(self.data) # <<<<<<<<<<<<<<
85594  * PyObject_Free(self._shape)
85595  *
85596  */
85597  free(__pyx_v_self->data);
85598 
85599  /* "View.MemoryView":214
85600  * if self.callback_free_data != NULL:
85601  * self.callback_free_data(self.data)
85602  * elif self.free_data: # <<<<<<<<<<<<<<
85603  * if self.dtype_is_object:
85604  * refcount_objects_in_slice(self.data, self._shape,
85605  */
85606  }
85607  __pyx_L3:;
85608 
85609  /* "View.MemoryView":219
85610  * self._strides, self.ndim, False)
85611  * free(self.data)
85612  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
85613  *
85614  * @property
85615  */
85616  PyObject_Free(__pyx_v_self->_shape);
85617 
85618  /* "View.MemoryView":211
85619  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
85620  *
85621  * def __dealloc__(array self): # <<<<<<<<<<<<<<
85622  * if self.callback_free_data != NULL:
85623  * self.callback_free_data(self.data)
85624  */
85625 
85626  /* function exit code */
85627  goto __pyx_L0;
85628  __pyx_L1_error:;
85629  __Pyx_WriteUnraisable("View.MemoryView.array.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
85630  __pyx_L0:;
85631  __Pyx_TraceReturn(Py_None, 0);
85632  __Pyx_RefNannyFinishContext();
85633 }
85634 
85635 /* "View.MemoryView":222
85636  *
85637  * @property
85638  * def memview(self): # <<<<<<<<<<<<<<
85639  * return self.get_memview()
85640  *
85641  */
85642 
85643 /* Python wrapper */
85644 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
85645 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
85646  PyObject *__pyx_r = 0;
85647  __Pyx_RefNannyDeclarations
85648  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
85649  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
85650 
85651  /* function exit code */
85652  __Pyx_RefNannyFinishContext();
85653  return __pyx_r;
85654 }
85655 
85656 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
85657  PyObject *__pyx_r = NULL;
85658  __Pyx_TraceDeclarations
85659  __Pyx_RefNannyDeclarations
85660  PyObject *__pyx_t_1 = NULL;
85661  int __pyx_lineno = 0;
85662  const char *__pyx_filename = NULL;
85663  int __pyx_clineno = 0;
85664  __Pyx_RefNannySetupContext("__get__", 0);
85665  __Pyx_TraceCall("__get__", __pyx_f[1], 222, 0, __PYX_ERR(1, 222, __pyx_L1_error));
85666 
85667  /* "View.MemoryView":223
85668  * @property
85669  * def memview(self):
85670  * return self.get_memview() # <<<<<<<<<<<<<<
85671  *
85672  * @cname('get_memview')
85673  */
85674  __Pyx_XDECREF(__pyx_r);
85675  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 223, __pyx_L1_error)
85676  __Pyx_GOTREF(__pyx_t_1);
85677  __pyx_r = __pyx_t_1;
85678  __pyx_t_1 = 0;
85679  goto __pyx_L0;
85680 
85681  /* "View.MemoryView":222
85682  *
85683  * @property
85684  * def memview(self): # <<<<<<<<<<<<<<
85685  * return self.get_memview()
85686  *
85687  */
85688 
85689  /* function exit code */
85690  __pyx_L1_error:;
85691  __Pyx_XDECREF(__pyx_t_1);
85692  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
85693  __pyx_r = NULL;
85694  __pyx_L0:;
85695  __Pyx_XGIVEREF(__pyx_r);
85696  __Pyx_TraceReturn(__pyx_r, 0);
85697  __Pyx_RefNannyFinishContext();
85698  return __pyx_r;
85699 }
85700 
85701 /* "View.MemoryView":226
85702  *
85703  * @cname('get_memview')
85704  * cdef get_memview(self): # <<<<<<<<<<<<<<
85705  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
85706  * return memoryview(self, flags, self.dtype_is_object)
85707  */
85708 
85709 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
85710  int __pyx_v_flags;
85711  PyObject *__pyx_r = NULL;
85712  __Pyx_TraceDeclarations
85713  __Pyx_RefNannyDeclarations
85714  PyObject *__pyx_t_1 = NULL;
85715  PyObject *__pyx_t_2 = NULL;
85716  PyObject *__pyx_t_3 = NULL;
85717  int __pyx_lineno = 0;
85718  const char *__pyx_filename = NULL;
85719  int __pyx_clineno = 0;
85720  __Pyx_RefNannySetupContext("get_memview", 0);
85721  __Pyx_TraceCall("get_memview", __pyx_f[1], 226, 0, __PYX_ERR(1, 226, __pyx_L1_error));
85722 
85723  /* "View.MemoryView":227
85724  * @cname('get_memview')
85725  * cdef get_memview(self):
85726  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
85727  * return memoryview(self, flags, self.dtype_is_object)
85728  *
85729  */
85730  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
85731 
85732  /* "View.MemoryView":228
85733  * cdef get_memview(self):
85734  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
85735  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
85736  *
85737  * def __len__(self):
85738  */
85739  __Pyx_XDECREF(__pyx_r);
85740  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error)
85741  __Pyx_GOTREF(__pyx_t_1);
85742  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
85743  __Pyx_GOTREF(__pyx_t_2);
85744  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 228, __pyx_L1_error)
85745  __Pyx_GOTREF(__pyx_t_3);
85746  __Pyx_INCREF(((PyObject *)__pyx_v_self));
85747  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
85748  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
85749  __Pyx_GIVEREF(__pyx_t_1);
85750  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
85751  __Pyx_GIVEREF(__pyx_t_2);
85752  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
85753  __pyx_t_1 = 0;
85754  __pyx_t_2 = 0;
85755  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 228, __pyx_L1_error)
85756  __Pyx_GOTREF(__pyx_t_2);
85757  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
85758  __pyx_r = __pyx_t_2;
85759  __pyx_t_2 = 0;
85760  goto __pyx_L0;
85761 
85762  /* "View.MemoryView":226
85763  *
85764  * @cname('get_memview')
85765  * cdef get_memview(self): # <<<<<<<<<<<<<<
85766  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
85767  * return memoryview(self, flags, self.dtype_is_object)
85768  */
85769 
85770  /* function exit code */
85771  __pyx_L1_error:;
85772  __Pyx_XDECREF(__pyx_t_1);
85773  __Pyx_XDECREF(__pyx_t_2);
85774  __Pyx_XDECREF(__pyx_t_3);
85775  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
85776  __pyx_r = 0;
85777  __pyx_L0:;
85778  __Pyx_XGIVEREF(__pyx_r);
85779  __Pyx_TraceReturn(__pyx_r, 0);
85780  __Pyx_RefNannyFinishContext();
85781  return __pyx_r;
85782 }
85783 
85784 /* "View.MemoryView":230
85785  * return memoryview(self, flags, self.dtype_is_object)
85786  *
85787  * def __len__(self): # <<<<<<<<<<<<<<
85788  * return self._shape[0]
85789  *
85790  */
85791 
85792 /* Python wrapper */
85793 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
85794 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
85795  Py_ssize_t __pyx_r;
85796  __Pyx_RefNannyDeclarations
85797  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
85798  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
85799 
85800  /* function exit code */
85801  __Pyx_RefNannyFinishContext();
85802  return __pyx_r;
85803 }
85804 
85805 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
85806  Py_ssize_t __pyx_r;
85807  __Pyx_TraceDeclarations
85808  __Pyx_RefNannyDeclarations
85809  int __pyx_lineno = 0;
85810  const char *__pyx_filename = NULL;
85811  int __pyx_clineno = 0;
85812  __Pyx_RefNannySetupContext("__len__", 0);
85813  __Pyx_TraceCall("__len__", __pyx_f[1], 230, 0, __PYX_ERR(1, 230, __pyx_L1_error));
85814 
85815  /* "View.MemoryView":231
85816  *
85817  * def __len__(self):
85818  * return self._shape[0] # <<<<<<<<<<<<<<
85819  *
85820  * def __getattr__(self, attr):
85821  */
85822  __pyx_r = (__pyx_v_self->_shape[0]);
85823  goto __pyx_L0;
85824 
85825  /* "View.MemoryView":230
85826  * return memoryview(self, flags, self.dtype_is_object)
85827  *
85828  * def __len__(self): # <<<<<<<<<<<<<<
85829  * return self._shape[0]
85830  *
85831  */
85832 
85833  /* function exit code */
85834  __pyx_L1_error:;
85835  __Pyx_AddTraceback("View.MemoryView.array.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
85836  __pyx_r = -1;
85837  __pyx_L0:;
85838  __Pyx_TraceReturn(Py_None, 0);
85839  __Pyx_RefNannyFinishContext();
85840  return __pyx_r;
85841 }
85842 
85843 /* "View.MemoryView":233
85844  * return self._shape[0]
85845  *
85846  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
85847  * return getattr(self.memview, attr)
85848  *
85849  */
85850 
85851 /* Python wrapper */
85852 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
85853 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
85854  PyObject *__pyx_r = 0;
85855  __Pyx_RefNannyDeclarations
85856  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
85857  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
85858 
85859  /* function exit code */
85860  __Pyx_RefNannyFinishContext();
85861  return __pyx_r;
85862 }
85863 
85864 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
85865  PyObject *__pyx_r = NULL;
85866  __Pyx_TraceDeclarations
85867  __Pyx_RefNannyDeclarations
85868  PyObject *__pyx_t_1 = NULL;
85869  PyObject *__pyx_t_2 = NULL;
85870  int __pyx_lineno = 0;
85871  const char *__pyx_filename = NULL;
85872  int __pyx_clineno = 0;
85873  __Pyx_RefNannySetupContext("__getattr__", 0);
85874  __Pyx_TraceCall("__getattr__", __pyx_f[1], 233, 0, __PYX_ERR(1, 233, __pyx_L1_error));
85875 
85876  /* "View.MemoryView":234
85877  *
85878  * def __getattr__(self, attr):
85879  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
85880  *
85881  * def __getitem__(self, item):
85882  */
85883  __Pyx_XDECREF(__pyx_r);
85884  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 234, __pyx_L1_error)
85885  __Pyx_GOTREF(__pyx_t_1);
85886  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 234, __pyx_L1_error)
85887  __Pyx_GOTREF(__pyx_t_2);
85888  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85889  __pyx_r = __pyx_t_2;
85890  __pyx_t_2 = 0;
85891  goto __pyx_L0;
85892 
85893  /* "View.MemoryView":233
85894  * return self._shape[0]
85895  *
85896  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
85897  * return getattr(self.memview, attr)
85898  *
85899  */
85900 
85901  /* function exit code */
85902  __pyx_L1_error:;
85903  __Pyx_XDECREF(__pyx_t_1);
85904  __Pyx_XDECREF(__pyx_t_2);
85905  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
85906  __pyx_r = NULL;
85907  __pyx_L0:;
85908  __Pyx_XGIVEREF(__pyx_r);
85909  __Pyx_TraceReturn(__pyx_r, 0);
85910  __Pyx_RefNannyFinishContext();
85911  return __pyx_r;
85912 }
85913 
85914 /* "View.MemoryView":236
85915  * return getattr(self.memview, attr)
85916  *
85917  * def __getitem__(self, item): # <<<<<<<<<<<<<<
85918  * return self.memview[item]
85919  *
85920  */
85921 
85922 /* Python wrapper */
85923 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
85924 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
85925  PyObject *__pyx_r = 0;
85926  __Pyx_RefNannyDeclarations
85927  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
85928  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
85929 
85930  /* function exit code */
85931  __Pyx_RefNannyFinishContext();
85932  return __pyx_r;
85933 }
85934 
85935 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
85936  PyObject *__pyx_r = NULL;
85937  __Pyx_TraceDeclarations
85938  __Pyx_RefNannyDeclarations
85939  PyObject *__pyx_t_1 = NULL;
85940  PyObject *__pyx_t_2 = NULL;
85941  int __pyx_lineno = 0;
85942  const char *__pyx_filename = NULL;
85943  int __pyx_clineno = 0;
85944  __Pyx_RefNannySetupContext("__getitem__", 0);
85945  __Pyx_TraceCall("__getitem__", __pyx_f[1], 236, 0, __PYX_ERR(1, 236, __pyx_L1_error));
85946 
85947  /* "View.MemoryView":237
85948  *
85949  * def __getitem__(self, item):
85950  * return self.memview[item] # <<<<<<<<<<<<<<
85951  *
85952  * def __setitem__(self, item, value):
85953  */
85954  __Pyx_XDECREF(__pyx_r);
85955  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 237, __pyx_L1_error)
85956  __Pyx_GOTREF(__pyx_t_1);
85957  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 237, __pyx_L1_error)
85958  __Pyx_GOTREF(__pyx_t_2);
85959  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
85960  __pyx_r = __pyx_t_2;
85961  __pyx_t_2 = 0;
85962  goto __pyx_L0;
85963 
85964  /* "View.MemoryView":236
85965  * return getattr(self.memview, attr)
85966  *
85967  * def __getitem__(self, item): # <<<<<<<<<<<<<<
85968  * return self.memview[item]
85969  *
85970  */
85971 
85972  /* function exit code */
85973  __pyx_L1_error:;
85974  __Pyx_XDECREF(__pyx_t_1);
85975  __Pyx_XDECREF(__pyx_t_2);
85976  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
85977  __pyx_r = NULL;
85978  __pyx_L0:;
85979  __Pyx_XGIVEREF(__pyx_r);
85980  __Pyx_TraceReturn(__pyx_r, 0);
85981  __Pyx_RefNannyFinishContext();
85982  return __pyx_r;
85983 }
85984 
85985 /* "View.MemoryView":239
85986  * return self.memview[item]
85987  *
85988  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
85989  * self.memview[item] = value
85990  *
85991  */
85992 
85993 /* Python wrapper */
85994 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
85995 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
85996  int __pyx_r;
85997  __Pyx_RefNannyDeclarations
85998  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
85999  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
86000 
86001  /* function exit code */
86002  __Pyx_RefNannyFinishContext();
86003  return __pyx_r;
86004 }
86005 
86006 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
86007  int __pyx_r;
86008  __Pyx_TraceDeclarations
86009  __Pyx_RefNannyDeclarations
86010  PyObject *__pyx_t_1 = NULL;
86011  int __pyx_lineno = 0;
86012  const char *__pyx_filename = NULL;
86013  int __pyx_clineno = 0;
86014  __Pyx_RefNannySetupContext("__setitem__", 0);
86015  __Pyx_TraceCall("__setitem__", __pyx_f[1], 239, 0, __PYX_ERR(1, 239, __pyx_L1_error));
86016 
86017  /* "View.MemoryView":240
86018  *
86019  * def __setitem__(self, item, value):
86020  * self.memview[item] = value # <<<<<<<<<<<<<<
86021  *
86022  *
86023  */
86024  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 240, __pyx_L1_error)
86025  __Pyx_GOTREF(__pyx_t_1);
86026  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(1, 240, __pyx_L1_error)
86027  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86028 
86029  /* "View.MemoryView":239
86030  * return self.memview[item]
86031  *
86032  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
86033  * self.memview[item] = value
86034  *
86035  */
86036 
86037  /* function exit code */
86038  __pyx_r = 0;
86039  goto __pyx_L0;
86040  __pyx_L1_error:;
86041  __Pyx_XDECREF(__pyx_t_1);
86042  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86043  __pyx_r = -1;
86044  __pyx_L0:;
86045  __Pyx_TraceReturn(Py_None, 0);
86046  __Pyx_RefNannyFinishContext();
86047  return __pyx_r;
86048 }
86049 
86050 /* "(tree fragment)":1
86051  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
86052  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86053  * def __setstate_cython__(self, __pyx_state):
86054  */
86055 
86056 /* Python wrapper */
86057 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
86058 static PyMethodDef __pyx_mdef___pyx_array_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0};
86059 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
86060  PyObject *__pyx_r = 0;
86061  __Pyx_RefNannyDeclarations
86062  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
86063  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
86064 
86065  /* function exit code */
86066  __Pyx_RefNannyFinishContext();
86067  return __pyx_r;
86068 }
86069 
86070 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
86071  PyObject *__pyx_r = NULL;
86072  __Pyx_TraceDeclarations
86073  __Pyx_RefNannyDeclarations
86074  PyObject *__pyx_t_1 = NULL;
86075  int __pyx_lineno = 0;
86076  const char *__pyx_filename = NULL;
86077  int __pyx_clineno = 0;
86078  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
86079  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
86080 
86081  /* "(tree fragment)":2
86082  * def __reduce_cython__(self):
86083  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
86084  * def __setstate_cython__(self, __pyx_state):
86085  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86086  */
86087  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__226, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
86088  __Pyx_GOTREF(__pyx_t_1);
86089  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
86090  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86091  __PYX_ERR(1, 2, __pyx_L1_error)
86092 
86093  /* "(tree fragment)":1
86094  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
86095  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86096  * def __setstate_cython__(self, __pyx_state):
86097  */
86098 
86099  /* function exit code */
86100  __pyx_L1_error:;
86101  __Pyx_XDECREF(__pyx_t_1);
86102  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86103  __pyx_r = NULL;
86104  __Pyx_XGIVEREF(__pyx_r);
86105  __Pyx_TraceReturn(__pyx_r, 0);
86106  __Pyx_RefNannyFinishContext();
86107  return __pyx_r;
86108 }
86109 
86110 /* "(tree fragment)":3
86111  * def __reduce_cython__(self):
86112  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86113  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
86114  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86115  */
86116 
86117 /* Python wrapper */
86118 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
86119 static PyMethodDef __pyx_mdef___pyx_array_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0};
86120 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
86121  PyObject *__pyx_r = 0;
86122  __Pyx_RefNannyDeclarations
86123  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
86124  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
86125 
86126  /* function exit code */
86127  __Pyx_RefNannyFinishContext();
86128  return __pyx_r;
86129 }
86130 
86131 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
86132  PyObject *__pyx_r = NULL;
86133  __Pyx_TraceDeclarations
86134  __Pyx_RefNannyDeclarations
86135  PyObject *__pyx_t_1 = NULL;
86136  int __pyx_lineno = 0;
86137  const char *__pyx_filename = NULL;
86138  int __pyx_clineno = 0;
86139  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
86140  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
86141 
86142  /* "(tree fragment)":4
86143  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86144  * def __setstate_cython__(self, __pyx_state):
86145  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
86146  */
86147  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__227, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
86148  __Pyx_GOTREF(__pyx_t_1);
86149  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
86150  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86151  __PYX_ERR(1, 4, __pyx_L1_error)
86152 
86153  /* "(tree fragment)":3
86154  * def __reduce_cython__(self):
86155  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86156  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
86157  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
86158  */
86159 
86160  /* function exit code */
86161  __pyx_L1_error:;
86162  __Pyx_XDECREF(__pyx_t_1);
86163  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86164  __pyx_r = NULL;
86165  __Pyx_XGIVEREF(__pyx_r);
86166  __Pyx_TraceReturn(__pyx_r, 0);
86167  __Pyx_RefNannyFinishContext();
86168  return __pyx_r;
86169 }
86170 
86171 /* "View.MemoryView":244
86172  *
86173  * @cname("__pyx_array_new")
86174  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
86175  * char *mode, char *buf):
86176  * cdef array result
86177  */
86178 
86179 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
86180  struct __pyx_array_obj *__pyx_v_result = 0;
86181  struct __pyx_array_obj *__pyx_r = NULL;
86182  __Pyx_TraceDeclarations
86183  __Pyx_RefNannyDeclarations
86184  int __pyx_t_1;
86185  PyObject *__pyx_t_2 = NULL;
86186  PyObject *__pyx_t_3 = NULL;
86187  PyObject *__pyx_t_4 = NULL;
86188  PyObject *__pyx_t_5 = NULL;
86189  int __pyx_lineno = 0;
86190  const char *__pyx_filename = NULL;
86191  int __pyx_clineno = 0;
86192  __Pyx_RefNannySetupContext("array_cwrapper", 0);
86193  __Pyx_TraceCall("array_cwrapper", __pyx_f[1], 244, 0, __PYX_ERR(1, 244, __pyx_L1_error));
86194 
86195  /* "View.MemoryView":248
86196  * cdef array result
86197  *
86198  * if buf == NULL: # <<<<<<<<<<<<<<
86199  * result = array(shape, itemsize, format, mode.decode('ASCII'))
86200  * else:
86201  */
86202  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
86203  if (__pyx_t_1) {
86204 
86205  /* "View.MemoryView":249
86206  *
86207  * if buf == NULL:
86208  * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
86209  * else:
86210  * result = array(shape, itemsize, format, mode.decode('ASCII'),
86211  */
86212  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 249, __pyx_L1_error)
86213  __Pyx_GOTREF(__pyx_t_2);
86214  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error)
86215  __Pyx_GOTREF(__pyx_t_3);
86216  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)
86217  __Pyx_GOTREF(__pyx_t_4);
86218  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 249, __pyx_L1_error)
86219  __Pyx_GOTREF(__pyx_t_5);
86220  __Pyx_INCREF(__pyx_v_shape);
86221  __Pyx_GIVEREF(__pyx_v_shape);
86222  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
86223  __Pyx_GIVEREF(__pyx_t_2);
86224  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
86225  __Pyx_GIVEREF(__pyx_t_3);
86226  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
86227  __Pyx_GIVEREF(__pyx_t_4);
86228  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
86229  __pyx_t_2 = 0;
86230  __pyx_t_3 = 0;
86231  __pyx_t_4 = 0;
86232  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 249, __pyx_L1_error)
86233  __Pyx_GOTREF(__pyx_t_4);
86234  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
86235  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
86236  __pyx_t_4 = 0;
86237 
86238  /* "View.MemoryView":248
86239  * cdef array result
86240  *
86241  * if buf == NULL: # <<<<<<<<<<<<<<
86242  * result = array(shape, itemsize, format, mode.decode('ASCII'))
86243  * else:
86244  */
86245  goto __pyx_L3;
86246  }
86247 
86248  /* "View.MemoryView":251
86249  * result = array(shape, itemsize, format, mode.decode('ASCII'))
86250  * else:
86251  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
86252  * allocate_buffer=False)
86253  * result.data = buf
86254  */
86255  /*else*/ {
86256  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error)
86257  __Pyx_GOTREF(__pyx_t_4);
86258  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)
86259  __Pyx_GOTREF(__pyx_t_5);
86260  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error)
86261  __Pyx_GOTREF(__pyx_t_3);
86262  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 251, __pyx_L1_error)
86263  __Pyx_GOTREF(__pyx_t_2);
86264  __Pyx_INCREF(__pyx_v_shape);
86265  __Pyx_GIVEREF(__pyx_v_shape);
86266  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
86267  __Pyx_GIVEREF(__pyx_t_4);
86268  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
86269  __Pyx_GIVEREF(__pyx_t_5);
86270  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
86271  __Pyx_GIVEREF(__pyx_t_3);
86272  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
86273  __pyx_t_4 = 0;
86274  __pyx_t_5 = 0;
86275  __pyx_t_3 = 0;
86276 
86277  /* "View.MemoryView":252
86278  * else:
86279  * result = array(shape, itemsize, format, mode.decode('ASCII'),
86280  * allocate_buffer=False) # <<<<<<<<<<<<<<
86281  * result.data = buf
86282  *
86283  */
86284  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error)
86285  __Pyx_GOTREF(__pyx_t_3);
86286  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(1, 252, __pyx_L1_error)
86287 
86288  /* "View.MemoryView":251
86289  * result = array(shape, itemsize, format, mode.decode('ASCII'))
86290  * else:
86291  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
86292  * allocate_buffer=False)
86293  * result.data = buf
86294  */
86295  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error)
86296  __Pyx_GOTREF(__pyx_t_5);
86297  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
86298  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
86299  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
86300  __pyx_t_5 = 0;
86301 
86302  /* "View.MemoryView":253
86303  * result = array(shape, itemsize, format, mode.decode('ASCII'),
86304  * allocate_buffer=False)
86305  * result.data = buf # <<<<<<<<<<<<<<
86306  *
86307  * return result
86308  */
86309  __pyx_v_result->data = __pyx_v_buf;
86310  }
86311  __pyx_L3:;
86312 
86313  /* "View.MemoryView":255
86314  * result.data = buf
86315  *
86316  * return result # <<<<<<<<<<<<<<
86317  *
86318  *
86319  */
86320  __Pyx_XDECREF(((PyObject *)__pyx_r));
86321  __Pyx_INCREF(((PyObject *)__pyx_v_result));
86322  __pyx_r = __pyx_v_result;
86323  goto __pyx_L0;
86324 
86325  /* "View.MemoryView":244
86326  *
86327  * @cname("__pyx_array_new")
86328  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
86329  * char *mode, char *buf):
86330  * cdef array result
86331  */
86332 
86333  /* function exit code */
86334  __pyx_L1_error:;
86335  __Pyx_XDECREF(__pyx_t_2);
86336  __Pyx_XDECREF(__pyx_t_3);
86337  __Pyx_XDECREF(__pyx_t_4);
86338  __Pyx_XDECREF(__pyx_t_5);
86339  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
86340  __pyx_r = 0;
86341  __pyx_L0:;
86342  __Pyx_XDECREF((PyObject *)__pyx_v_result);
86343  __Pyx_XGIVEREF((PyObject *)__pyx_r);
86344  __Pyx_TraceReturn(__pyx_r, 0);
86345  __Pyx_RefNannyFinishContext();
86346  return __pyx_r;
86347 }
86348 
86349 /* "View.MemoryView":281
86350  * cdef class Enum(object):
86351  * cdef object name
86352  * def __init__(self, name): # <<<<<<<<<<<<<<
86353  * self.name = name
86354  * def __repr__(self):
86355  */
86356 
86357 /* Python wrapper */
86358 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
86359 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
86360  PyObject *__pyx_v_name = 0;
86361  int __pyx_lineno = 0;
86362  const char *__pyx_filename = NULL;
86363  int __pyx_clineno = 0;
86364  int __pyx_r;
86365  __Pyx_RefNannyDeclarations
86366  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
86367  {
86368  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
86369  PyObject* values[1] = {0};
86370  if (unlikely(__pyx_kwds)) {
86371  Py_ssize_t kw_args;
86372  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
86373  switch (pos_args) {
86374  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
86375  CYTHON_FALLTHROUGH;
86376  case 0: break;
86377  default: goto __pyx_L5_argtuple_error;
86378  }
86379  kw_args = PyDict_Size(__pyx_kwds);
86380  switch (pos_args) {
86381  case 0:
86382  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
86383  else goto __pyx_L5_argtuple_error;
86384  }
86385  if (unlikely(kw_args > 0)) {
86386  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 281, __pyx_L3_error)
86387  }
86388  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
86389  goto __pyx_L5_argtuple_error;
86390  } else {
86391  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
86392  }
86393  __pyx_v_name = values[0];
86394  }
86395  goto __pyx_L4_argument_unpacking_done;
86396  __pyx_L5_argtuple_error:;
86397  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 281, __pyx_L3_error)
86398  __pyx_L3_error:;
86399  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86400  __Pyx_RefNannyFinishContext();
86401  return -1;
86402  __pyx_L4_argument_unpacking_done:;
86403  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
86404 
86405  /* function exit code */
86406  __Pyx_RefNannyFinishContext();
86407  return __pyx_r;
86408 }
86409 
86410 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
86411  int __pyx_r;
86412  __Pyx_TraceDeclarations
86413  __Pyx_RefNannyDeclarations
86414  int __pyx_lineno = 0;
86415  const char *__pyx_filename = NULL;
86416  int __pyx_clineno = 0;
86417  __Pyx_RefNannySetupContext("__init__", 0);
86418  __Pyx_TraceCall("__init__", __pyx_f[1], 281, 0, __PYX_ERR(1, 281, __pyx_L1_error));
86419 
86420  /* "View.MemoryView":282
86421  * cdef object name
86422  * def __init__(self, name):
86423  * self.name = name # <<<<<<<<<<<<<<
86424  * def __repr__(self):
86425  * return self.name
86426  */
86427  __Pyx_INCREF(__pyx_v_name);
86428  __Pyx_GIVEREF(__pyx_v_name);
86429  __Pyx_GOTREF(__pyx_v_self->name);
86430  __Pyx_DECREF(__pyx_v_self->name);
86431  __pyx_v_self->name = __pyx_v_name;
86432 
86433  /* "View.MemoryView":281
86434  * cdef class Enum(object):
86435  * cdef object name
86436  * def __init__(self, name): # <<<<<<<<<<<<<<
86437  * self.name = name
86438  * def __repr__(self):
86439  */
86440 
86441  /* function exit code */
86442  __pyx_r = 0;
86443  goto __pyx_L0;
86444  __pyx_L1_error:;
86445  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86446  __pyx_r = -1;
86447  __pyx_L0:;
86448  __Pyx_TraceReturn(Py_None, 0);
86449  __Pyx_RefNannyFinishContext();
86450  return __pyx_r;
86451 }
86452 
86453 /* "View.MemoryView":283
86454  * def __init__(self, name):
86455  * self.name = name
86456  * def __repr__(self): # <<<<<<<<<<<<<<
86457  * return self.name
86458  *
86459  */
86460 
86461 /* Python wrapper */
86462 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
86463 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
86464  PyObject *__pyx_r = 0;
86465  __Pyx_RefNannyDeclarations
86466  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
86467  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
86468 
86469  /* function exit code */
86470  __Pyx_RefNannyFinishContext();
86471  return __pyx_r;
86472 }
86473 
86474 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
86475  PyObject *__pyx_r = NULL;
86476  __Pyx_TraceDeclarations
86477  __Pyx_RefNannyDeclarations
86478  int __pyx_lineno = 0;
86479  const char *__pyx_filename = NULL;
86480  int __pyx_clineno = 0;
86481  __Pyx_RefNannySetupContext("__repr__", 0);
86482  __Pyx_TraceCall("__repr__", __pyx_f[1], 283, 0, __PYX_ERR(1, 283, __pyx_L1_error));
86483 
86484  /* "View.MemoryView":284
86485  * self.name = name
86486  * def __repr__(self):
86487  * return self.name # <<<<<<<<<<<<<<
86488  *
86489  * cdef generic = Enum("<strided and direct or indirect>")
86490  */
86491  __Pyx_XDECREF(__pyx_r);
86492  __Pyx_INCREF(__pyx_v_self->name);
86493  __pyx_r = __pyx_v_self->name;
86494  goto __pyx_L0;
86495 
86496  /* "View.MemoryView":283
86497  * def __init__(self, name):
86498  * self.name = name
86499  * def __repr__(self): # <<<<<<<<<<<<<<
86500  * return self.name
86501  *
86502  */
86503 
86504  /* function exit code */
86505  __pyx_L1_error:;
86506  __Pyx_AddTraceback("View.MemoryView.Enum.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86507  __pyx_r = NULL;
86508  __pyx_L0:;
86509  __Pyx_XGIVEREF(__pyx_r);
86510  __Pyx_TraceReturn(__pyx_r, 0);
86511  __Pyx_RefNannyFinishContext();
86512  return __pyx_r;
86513 }
86514 
86515 /* "(tree fragment)":1
86516  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
86517  * cdef tuple state
86518  * cdef object _dict
86519  */
86520 
86521 /* Python wrapper */
86522 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
86523 static PyMethodDef __pyx_mdef___pyx_MemviewEnum_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0};
86524 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
86525  PyObject *__pyx_r = 0;
86526  __Pyx_RefNannyDeclarations
86527  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
86528  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
86529 
86530  /* function exit code */
86531  __Pyx_RefNannyFinishContext();
86532  return __pyx_r;
86533 }
86534 
86535 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
86536  PyObject *__pyx_v_state = 0;
86537  PyObject *__pyx_v__dict = 0;
86538  int __pyx_v_use_setstate;
86539  PyObject *__pyx_r = NULL;
86540  __Pyx_TraceDeclarations
86541  __Pyx_RefNannyDeclarations
86542  PyObject *__pyx_t_1 = NULL;
86543  int __pyx_t_2;
86544  int __pyx_t_3;
86545  PyObject *__pyx_t_4 = NULL;
86546  PyObject *__pyx_t_5 = NULL;
86547  int __pyx_lineno = 0;
86548  const char *__pyx_filename = NULL;
86549  int __pyx_clineno = 0;
86550  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
86551  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
86552 
86553  /* "(tree fragment)":5
86554  * cdef object _dict
86555  * cdef bint use_setstate
86556  * state = (self.name,) # <<<<<<<<<<<<<<
86557  * _dict = getattr(self, '__dict__', None)
86558  * if _dict is not None:
86559  */
86560  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
86561  __Pyx_GOTREF(__pyx_t_1);
86562  __Pyx_INCREF(__pyx_v_self->name);
86563  __Pyx_GIVEREF(__pyx_v_self->name);
86564  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
86565  __pyx_v_state = ((PyObject*)__pyx_t_1);
86566  __pyx_t_1 = 0;
86567 
86568  /* "(tree fragment)":6
86569  * cdef bint use_setstate
86570  * state = (self.name,)
86571  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
86572  * if _dict is not None:
86573  * state += (_dict,)
86574  */
86575  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
86576  __Pyx_GOTREF(__pyx_t_1);
86577  __pyx_v__dict = __pyx_t_1;
86578  __pyx_t_1 = 0;
86579 
86580  /* "(tree fragment)":7
86581  * state = (self.name,)
86582  * _dict = getattr(self, '__dict__', None)
86583  * if _dict is not None: # <<<<<<<<<<<<<<
86584  * state += (_dict,)
86585  * use_setstate = True
86586  */
86587  __pyx_t_2 = (__pyx_v__dict != Py_None);
86588  __pyx_t_3 = (__pyx_t_2 != 0);
86589  if (__pyx_t_3) {
86590 
86591  /* "(tree fragment)":8
86592  * _dict = getattr(self, '__dict__', None)
86593  * if _dict is not None:
86594  * state += (_dict,) # <<<<<<<<<<<<<<
86595  * use_setstate = True
86596  * else:
86597  */
86598  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
86599  __Pyx_GOTREF(__pyx_t_1);
86600  __Pyx_INCREF(__pyx_v__dict);
86601  __Pyx_GIVEREF(__pyx_v__dict);
86602  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
86603  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
86604  __Pyx_GOTREF(__pyx_t_4);
86605  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86606  __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
86607  __pyx_t_4 = 0;
86608 
86609  /* "(tree fragment)":9
86610  * if _dict is not None:
86611  * state += (_dict,)
86612  * use_setstate = True # <<<<<<<<<<<<<<
86613  * else:
86614  * use_setstate = self.name is not None
86615  */
86616  __pyx_v_use_setstate = 1;
86617 
86618  /* "(tree fragment)":7
86619  * state = (self.name,)
86620  * _dict = getattr(self, '__dict__', None)
86621  * if _dict is not None: # <<<<<<<<<<<<<<
86622  * state += (_dict,)
86623  * use_setstate = True
86624  */
86625  goto __pyx_L3;
86626  }
86627 
86628  /* "(tree fragment)":11
86629  * use_setstate = True
86630  * else:
86631  * use_setstate = self.name is not None # <<<<<<<<<<<<<<
86632  * if use_setstate:
86633  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
86634  */
86635  /*else*/ {
86636  __pyx_t_3 = (__pyx_v_self->name != Py_None);
86637  __pyx_v_use_setstate = __pyx_t_3;
86638  }
86639  __pyx_L3:;
86640 
86641  /* "(tree fragment)":12
86642  * else:
86643  * use_setstate = self.name is not None
86644  * if use_setstate: # <<<<<<<<<<<<<<
86645  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
86646  * else:
86647  */
86648  __pyx_t_3 = (__pyx_v_use_setstate != 0);
86649  if (__pyx_t_3) {
86650 
86651  /* "(tree fragment)":13
86652  * use_setstate = self.name is not None
86653  * if use_setstate:
86654  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
86655  * else:
86656  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
86657  */
86658  __Pyx_XDECREF(__pyx_r);
86659  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
86660  __Pyx_GOTREF(__pyx_t_4);
86661  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
86662  __Pyx_GOTREF(__pyx_t_1);
86663  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
86664  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
86665  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
86666  __Pyx_INCREF(__pyx_int_184977713);
86667  __Pyx_GIVEREF(__pyx_int_184977713);
86668  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
86669  __Pyx_INCREF(Py_None);
86670  __Pyx_GIVEREF(Py_None);
86671  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
86672  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
86673  __Pyx_GOTREF(__pyx_t_5);
86674  __Pyx_GIVEREF(__pyx_t_4);
86675  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
86676  __Pyx_GIVEREF(__pyx_t_1);
86677  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
86678  __Pyx_INCREF(__pyx_v_state);
86679  __Pyx_GIVEREF(__pyx_v_state);
86680  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
86681  __pyx_t_4 = 0;
86682  __pyx_t_1 = 0;
86683  __pyx_r = __pyx_t_5;
86684  __pyx_t_5 = 0;
86685  goto __pyx_L0;
86686 
86687  /* "(tree fragment)":12
86688  * else:
86689  * use_setstate = self.name is not None
86690  * if use_setstate: # <<<<<<<<<<<<<<
86691  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
86692  * else:
86693  */
86694  }
86695 
86696  /* "(tree fragment)":15
86697  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
86698  * else:
86699  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
86700  * def __setstate_cython__(self, __pyx_state):
86701  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
86702  */
86703  /*else*/ {
86704  __Pyx_XDECREF(__pyx_r);
86705  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
86706  __Pyx_GOTREF(__pyx_t_5);
86707  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
86708  __Pyx_GOTREF(__pyx_t_1);
86709  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
86710  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
86711  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
86712  __Pyx_INCREF(__pyx_int_184977713);
86713  __Pyx_GIVEREF(__pyx_int_184977713);
86714  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
86715  __Pyx_INCREF(__pyx_v_state);
86716  __Pyx_GIVEREF(__pyx_v_state);
86717  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
86718  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
86719  __Pyx_GOTREF(__pyx_t_4);
86720  __Pyx_GIVEREF(__pyx_t_5);
86721  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
86722  __Pyx_GIVEREF(__pyx_t_1);
86723  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
86724  __pyx_t_5 = 0;
86725  __pyx_t_1 = 0;
86726  __pyx_r = __pyx_t_4;
86727  __pyx_t_4 = 0;
86728  goto __pyx_L0;
86729  }
86730 
86731  /* "(tree fragment)":1
86732  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
86733  * cdef tuple state
86734  * cdef object _dict
86735  */
86736 
86737  /* function exit code */
86738  __pyx_L1_error:;
86739  __Pyx_XDECREF(__pyx_t_1);
86740  __Pyx_XDECREF(__pyx_t_4);
86741  __Pyx_XDECREF(__pyx_t_5);
86742  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86743  __pyx_r = NULL;
86744  __pyx_L0:;
86745  __Pyx_XDECREF(__pyx_v_state);
86746  __Pyx_XDECREF(__pyx_v__dict);
86747  __Pyx_XGIVEREF(__pyx_r);
86748  __Pyx_TraceReturn(__pyx_r, 0);
86749  __Pyx_RefNannyFinishContext();
86750  return __pyx_r;
86751 }
86752 
86753 /* "(tree fragment)":16
86754  * else:
86755  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
86756  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
86757  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
86758  */
86759 
86760 /* Python wrapper */
86761 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
86762 static PyMethodDef __pyx_mdef___pyx_MemviewEnum_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0};
86763 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
86764  PyObject *__pyx_r = 0;
86765  __Pyx_RefNannyDeclarations
86766  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
86767  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
86768 
86769  /* function exit code */
86770  __Pyx_RefNannyFinishContext();
86771  return __pyx_r;
86772 }
86773 
86774 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
86775  PyObject *__pyx_r = NULL;
86776  __Pyx_TraceDeclarations
86777  __Pyx_RefNannyDeclarations
86778  PyObject *__pyx_t_1 = NULL;
86779  int __pyx_lineno = 0;
86780  const char *__pyx_filename = NULL;
86781  int __pyx_clineno = 0;
86782  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
86783  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
86784 
86785  /* "(tree fragment)":17
86786  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
86787  * def __setstate_cython__(self, __pyx_state):
86788  * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
86789  */
86790  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(1, 17, __pyx_L1_error)
86791  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
86792  __Pyx_GOTREF(__pyx_t_1);
86793  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
86794 
86795  /* "(tree fragment)":16
86796  * else:
86797  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
86798  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
86799  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
86800  */
86801 
86802  /* function exit code */
86803  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
86804  goto __pyx_L0;
86805  __pyx_L1_error:;
86806  __Pyx_XDECREF(__pyx_t_1);
86807  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86808  __pyx_r = NULL;
86809  __pyx_L0:;
86810  __Pyx_XGIVEREF(__pyx_r);
86811  __Pyx_TraceReturn(__pyx_r, 0);
86812  __Pyx_RefNannyFinishContext();
86813  return __pyx_r;
86814 }
86815 
86816 /* "View.MemoryView":298
86817  *
86818  * @cname('__pyx_align_pointer')
86819  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
86820  * "Align pointer memory on a given boundary"
86821  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
86822  */
86823 
86824 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
86825  Py_intptr_t __pyx_v_aligned_p;
86826  size_t __pyx_v_offset;
86827  void *__pyx_r;
86828  __Pyx_TraceDeclarations
86829  int __pyx_t_1;
86830  int __pyx_lineno = 0;
86831  const char *__pyx_filename = NULL;
86832  int __pyx_clineno = 0;
86833  __Pyx_TraceCall("align_pointer", __pyx_f[1], 298, 1, __PYX_ERR(1, 298, __pyx_L1_error));
86834 
86835  /* "View.MemoryView":300
86836  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
86837  * "Align pointer memory on a given boundary"
86838  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
86839  * cdef size_t offset
86840  *
86841  */
86842  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
86843 
86844  /* "View.MemoryView":304
86845  *
86846  * with cython.cdivision(True):
86847  * offset = aligned_p % alignment # <<<<<<<<<<<<<<
86848  *
86849  * if offset > 0:
86850  */
86851  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
86852 
86853  /* "View.MemoryView":306
86854  * offset = aligned_p % alignment
86855  *
86856  * if offset > 0: # <<<<<<<<<<<<<<
86857  * aligned_p += alignment - offset
86858  *
86859  */
86860  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
86861  if (__pyx_t_1) {
86862 
86863  /* "View.MemoryView":307
86864  *
86865  * if offset > 0:
86866  * aligned_p += alignment - offset # <<<<<<<<<<<<<<
86867  *
86868  * return <void *> aligned_p
86869  */
86870  __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
86871 
86872  /* "View.MemoryView":306
86873  * offset = aligned_p % alignment
86874  *
86875  * if offset > 0: # <<<<<<<<<<<<<<
86876  * aligned_p += alignment - offset
86877  *
86878  */
86879  }
86880 
86881  /* "View.MemoryView":309
86882  * aligned_p += alignment - offset
86883  *
86884  * return <void *> aligned_p # <<<<<<<<<<<<<<
86885  *
86886  *
86887  */
86888  __pyx_r = ((void *)__pyx_v_aligned_p);
86889  goto __pyx_L0;
86890 
86891  /* "View.MemoryView":298
86892  *
86893  * @cname('__pyx_align_pointer')
86894  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
86895  * "Align pointer memory on a given boundary"
86896  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
86897  */
86898 
86899  /* function exit code */
86900  __pyx_L1_error:;
86901  __Pyx_WriteUnraisable("View.MemoryView.align_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
86902  __pyx_r = 0;
86903  __pyx_L0:;
86904  __Pyx_TraceReturn(Py_None, 1);
86905  return __pyx_r;
86906 }
86907 
86908 /* "View.MemoryView":345
86909  * cdef __Pyx_TypeInfo *typeinfo
86910  *
86911  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
86912  * self.obj = obj
86913  * self.flags = flags
86914  */
86915 
86916 /* Python wrapper */
86917 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
86918 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
86919  PyObject *__pyx_v_obj = 0;
86920  int __pyx_v_flags;
86921  int __pyx_v_dtype_is_object;
86922  int __pyx_lineno = 0;
86923  const char *__pyx_filename = NULL;
86924  int __pyx_clineno = 0;
86925  int __pyx_r;
86926  __Pyx_RefNannyDeclarations
86927  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
86928  {
86929  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
86930  PyObject* values[3] = {0,0,0};
86931  if (unlikely(__pyx_kwds)) {
86932  Py_ssize_t kw_args;
86933  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
86934  switch (pos_args) {
86935  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
86936  CYTHON_FALLTHROUGH;
86937  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
86938  CYTHON_FALLTHROUGH;
86939  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
86940  CYTHON_FALLTHROUGH;
86941  case 0: break;
86942  default: goto __pyx_L5_argtuple_error;
86943  }
86944  kw_args = PyDict_Size(__pyx_kwds);
86945  switch (pos_args) {
86946  case 0:
86947  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
86948  else goto __pyx_L5_argtuple_error;
86949  CYTHON_FALLTHROUGH;
86950  case 1:
86951  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
86952  else {
86953  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(1, 345, __pyx_L3_error)
86954  }
86955  CYTHON_FALLTHROUGH;
86956  case 2:
86957  if (kw_args > 0) {
86958  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
86959  if (value) { values[2] = value; kw_args--; }
86960  }
86961  }
86962  if (unlikely(kw_args > 0)) {
86963  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(1, 345, __pyx_L3_error)
86964  }
86965  } else {
86966  switch (PyTuple_GET_SIZE(__pyx_args)) {
86967  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
86968  CYTHON_FALLTHROUGH;
86969  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
86970  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
86971  break;
86972  default: goto __pyx_L5_argtuple_error;
86973  }
86974  }
86975  __pyx_v_obj = values[0];
86976  __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)
86977  if (values[2]) {
86978  __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 345, __pyx_L3_error)
86979  } else {
86980  __pyx_v_dtype_is_object = ((int)0);
86981  }
86982  }
86983  goto __pyx_L4_argument_unpacking_done;
86984  __pyx_L5_argtuple_error:;
86985  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 345, __pyx_L3_error)
86986  __pyx_L3_error:;
86987  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
86988  __Pyx_RefNannyFinishContext();
86989  return -1;
86990  __pyx_L4_argument_unpacking_done:;
86991  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
86992 
86993  /* function exit code */
86994  __Pyx_RefNannyFinishContext();
86995  return __pyx_r;
86996 }
86997 
86998 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
86999  int __pyx_r;
87000  __Pyx_TraceDeclarations
87001  __Pyx_RefNannyDeclarations
87002  int __pyx_t_1;
87003  int __pyx_t_2;
87004  int __pyx_t_3;
87005  int __pyx_t_4;
87006  int __pyx_lineno = 0;
87007  const char *__pyx_filename = NULL;
87008  int __pyx_clineno = 0;
87009  __Pyx_RefNannySetupContext("__cinit__", 0);
87010  __Pyx_TraceCall("__cinit__", __pyx_f[1], 345, 0, __PYX_ERR(1, 345, __pyx_L1_error));
87011 
87012  /* "View.MemoryView":346
87013  *
87014  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
87015  * self.obj = obj # <<<<<<<<<<<<<<
87016  * self.flags = flags
87017  * if type(self) is memoryview or obj is not None:
87018  */
87019  __Pyx_INCREF(__pyx_v_obj);
87020  __Pyx_GIVEREF(__pyx_v_obj);
87021  __Pyx_GOTREF(__pyx_v_self->obj);
87022  __Pyx_DECREF(__pyx_v_self->obj);
87023  __pyx_v_self->obj = __pyx_v_obj;
87024 
87025  /* "View.MemoryView":347
87026  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
87027  * self.obj = obj
87028  * self.flags = flags # <<<<<<<<<<<<<<
87029  * if type(self) is memoryview or obj is not None:
87030  * __Pyx_GetBuffer(obj, &self.view, flags)
87031  */
87032  __pyx_v_self->flags = __pyx_v_flags;
87033 
87034  /* "View.MemoryView":348
87035  * self.obj = obj
87036  * self.flags = flags
87037  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
87038  * __Pyx_GetBuffer(obj, &self.view, flags)
87039  * if <PyObject *> self.view.obj == NULL:
87040  */
87041  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
87042  __pyx_t_3 = (__pyx_t_2 != 0);
87043  if (!__pyx_t_3) {
87044  } else {
87045  __pyx_t_1 = __pyx_t_3;
87046  goto __pyx_L4_bool_binop_done;
87047  }
87048  __pyx_t_3 = (__pyx_v_obj != Py_None);
87049  __pyx_t_2 = (__pyx_t_3 != 0);
87050  __pyx_t_1 = __pyx_t_2;
87051  __pyx_L4_bool_binop_done:;
87052  if (__pyx_t_1) {
87053 
87054  /* "View.MemoryView":349
87055  * self.flags = flags
87056  * if type(self) is memoryview or obj is not None:
87057  * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
87058  * if <PyObject *> self.view.obj == NULL:
87059  * (<__pyx_buffer *> &self.view).obj = Py_None
87060  */
87061  __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 349, __pyx_L1_error)
87062 
87063  /* "View.MemoryView":350
87064  * if type(self) is memoryview or obj is not None:
87065  * __Pyx_GetBuffer(obj, &self.view, flags)
87066  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
87067  * (<__pyx_buffer *> &self.view).obj = Py_None
87068  * Py_INCREF(Py_None)
87069  */
87070  __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
87071  if (__pyx_t_1) {
87072 
87073  /* "View.MemoryView":351
87074  * __Pyx_GetBuffer(obj, &self.view, flags)
87075  * if <PyObject *> self.view.obj == NULL:
87076  * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
87077  * Py_INCREF(Py_None)
87078  *
87079  */
87080  ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
87081 
87082  /* "View.MemoryView":352
87083  * if <PyObject *> self.view.obj == NULL:
87084  * (<__pyx_buffer *> &self.view).obj = Py_None
87085  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
87086  *
87087  * global __pyx_memoryview_thread_locks_used
87088  */
87089  Py_INCREF(Py_None);
87090 
87091  /* "View.MemoryView":350
87092  * if type(self) is memoryview or obj is not None:
87093  * __Pyx_GetBuffer(obj, &self.view, flags)
87094  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
87095  * (<__pyx_buffer *> &self.view).obj = Py_None
87096  * Py_INCREF(Py_None)
87097  */
87098  }
87099 
87100  /* "View.MemoryView":348
87101  * self.obj = obj
87102  * self.flags = flags
87103  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
87104  * __Pyx_GetBuffer(obj, &self.view, flags)
87105  * if <PyObject *> self.view.obj == NULL:
87106  */
87107  }
87108 
87109  /* "View.MemoryView":355
87110  *
87111  * global __pyx_memoryview_thread_locks_used
87112  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
87113  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
87114  * __pyx_memoryview_thread_locks_used += 1
87115  */
87116  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
87117  if (__pyx_t_1) {
87118 
87119  /* "View.MemoryView":356
87120  * global __pyx_memoryview_thread_locks_used
87121  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
87122  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
87123  * __pyx_memoryview_thread_locks_used += 1
87124  * if self.lock is NULL:
87125  */
87126  __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
87127 
87128  /* "View.MemoryView":357
87129  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
87130  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
87131  * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
87132  * if self.lock is NULL:
87133  * self.lock = PyThread_allocate_lock()
87134  */
87135  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
87136 
87137  /* "View.MemoryView":355
87138  *
87139  * global __pyx_memoryview_thread_locks_used
87140  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
87141  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
87142  * __pyx_memoryview_thread_locks_used += 1
87143  */
87144  }
87145 
87146  /* "View.MemoryView":358
87147  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
87148  * __pyx_memoryview_thread_locks_used += 1
87149  * if self.lock is NULL: # <<<<<<<<<<<<<<
87150  * self.lock = PyThread_allocate_lock()
87151  * if self.lock is NULL:
87152  */
87153  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
87154  if (__pyx_t_1) {
87155 
87156  /* "View.MemoryView":359
87157  * __pyx_memoryview_thread_locks_used += 1
87158  * if self.lock is NULL:
87159  * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
87160  * if self.lock is NULL:
87161  * raise MemoryError
87162  */
87163  __pyx_v_self->lock = PyThread_allocate_lock();
87164 
87165  /* "View.MemoryView":360
87166  * if self.lock is NULL:
87167  * self.lock = PyThread_allocate_lock()
87168  * if self.lock is NULL: # <<<<<<<<<<<<<<
87169  * raise MemoryError
87170  *
87171  */
87172  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
87173  if (unlikely(__pyx_t_1)) {
87174 
87175  /* "View.MemoryView":361
87176  * self.lock = PyThread_allocate_lock()
87177  * if self.lock is NULL:
87178  * raise MemoryError # <<<<<<<<<<<<<<
87179  *
87180  * if flags & PyBUF_FORMAT:
87181  */
87182  PyErr_NoMemory(); __PYX_ERR(1, 361, __pyx_L1_error)
87183 
87184  /* "View.MemoryView":360
87185  * if self.lock is NULL:
87186  * self.lock = PyThread_allocate_lock()
87187  * if self.lock is NULL: # <<<<<<<<<<<<<<
87188  * raise MemoryError
87189  *
87190  */
87191  }
87192 
87193  /* "View.MemoryView":358
87194  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
87195  * __pyx_memoryview_thread_locks_used += 1
87196  * if self.lock is NULL: # <<<<<<<<<<<<<<
87197  * self.lock = PyThread_allocate_lock()
87198  * if self.lock is NULL:
87199  */
87200  }
87201 
87202  /* "View.MemoryView":363
87203  * raise MemoryError
87204  *
87205  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
87206  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
87207  * else:
87208  */
87209  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
87210  if (__pyx_t_1) {
87211 
87212  /* "View.MemoryView":364
87213  *
87214  * if flags & PyBUF_FORMAT:
87215  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
87216  * else:
87217  * self.dtype_is_object = dtype_is_object
87218  */
87219  __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
87220  if (__pyx_t_2) {
87221  } else {
87222  __pyx_t_1 = __pyx_t_2;
87223  goto __pyx_L11_bool_binop_done;
87224  }
87225  __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
87226  __pyx_t_1 = __pyx_t_2;
87227  __pyx_L11_bool_binop_done:;
87228  __pyx_v_self->dtype_is_object = __pyx_t_1;
87229 
87230  /* "View.MemoryView":363
87231  * raise MemoryError
87232  *
87233  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
87234  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
87235  * else:
87236  */
87237  goto __pyx_L10;
87238  }
87239 
87240  /* "View.MemoryView":366
87241  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
87242  * else:
87243  * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
87244  *
87245  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
87246  */
87247  /*else*/ {
87248  __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
87249  }
87250  __pyx_L10:;
87251 
87252  /* "View.MemoryView":368
87253  * self.dtype_is_object = dtype_is_object
87254  *
87255  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
87256  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
87257  * self.typeinfo = NULL
87258  */
87259  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
87260 
87261  /* "View.MemoryView":370
87262  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
87263  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
87264  * self.typeinfo = NULL # <<<<<<<<<<<<<<
87265  *
87266  * def __dealloc__(memoryview self):
87267  */
87268  __pyx_v_self->typeinfo = NULL;
87269 
87270  /* "View.MemoryView":345
87271  * cdef __Pyx_TypeInfo *typeinfo
87272  *
87273  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
87274  * self.obj = obj
87275  * self.flags = flags
87276  */
87277 
87278  /* function exit code */
87279  __pyx_r = 0;
87280  goto __pyx_L0;
87281  __pyx_L1_error:;
87282  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
87283  __pyx_r = -1;
87284  __pyx_L0:;
87285  __Pyx_TraceReturn(Py_None, 0);
87286  __Pyx_RefNannyFinishContext();
87287  return __pyx_r;
87288 }
87289 
87290 /* "View.MemoryView":372
87291  * self.typeinfo = NULL
87292  *
87293  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
87294  * if self.obj is not None:
87295  * __Pyx_ReleaseBuffer(&self.view)
87296  */
87297 
87298 /* Python wrapper */
87299 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
87300 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
87301  __Pyx_RefNannyDeclarations
87302  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
87303  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
87304 
87305  /* function exit code */
87306  __Pyx_RefNannyFinishContext();
87307 }
87308 
87309 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
87310  int __pyx_v_i;
87311  __Pyx_TraceDeclarations
87312  __Pyx_RefNannyDeclarations
87313  int __pyx_t_1;
87314  int __pyx_t_2;
87315  int __pyx_t_3;
87316  int __pyx_t_4;
87317  int __pyx_t_5;
87318  PyThread_type_lock __pyx_t_6;
87319  PyThread_type_lock __pyx_t_7;
87320  int __pyx_lineno = 0;
87321  const char *__pyx_filename = NULL;
87322  int __pyx_clineno = 0;
87323  __Pyx_RefNannySetupContext("__dealloc__", 0);
87324  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 372, 0, __PYX_ERR(1, 372, __pyx_L1_error));
87325 
87326  /* "View.MemoryView":373
87327  *
87328  * def __dealloc__(memoryview self):
87329  * if self.obj is not None: # <<<<<<<<<<<<<<
87330  * __Pyx_ReleaseBuffer(&self.view)
87331  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
87332  */
87333  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
87334  __pyx_t_2 = (__pyx_t_1 != 0);
87335  if (__pyx_t_2) {
87336 
87337  /* "View.MemoryView":374
87338  * def __dealloc__(memoryview self):
87339  * if self.obj is not None:
87340  * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
87341  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
87342  *
87343  */
87344  __Pyx_ReleaseBuffer((&__pyx_v_self->view));
87345 
87346  /* "View.MemoryView":373
87347  *
87348  * def __dealloc__(memoryview self):
87349  * if self.obj is not None: # <<<<<<<<<<<<<<
87350  * __Pyx_ReleaseBuffer(&self.view)
87351  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
87352  */
87353  goto __pyx_L3;
87354  }
87355 
87356  /* "View.MemoryView":375
87357  * if self.obj is not None:
87358  * __Pyx_ReleaseBuffer(&self.view)
87359  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
87360  *
87361  * (<__pyx_buffer *> &self.view).obj = NULL
87362  */
87363  __pyx_t_2 = ((((Py_buffer *)(&__pyx_v_self->view))->obj == Py_None) != 0);
87364  if (__pyx_t_2) {
87365 
87366  /* "View.MemoryView":377
87367  * elif (<__pyx_buffer *> &self.view).obj == Py_None:
87368  *
87369  * (<__pyx_buffer *> &self.view).obj = NULL # <<<<<<<<<<<<<<
87370  * Py_DECREF(Py_None)
87371  *
87372  */
87373  ((Py_buffer *)(&__pyx_v_self->view))->obj = NULL;
87374 
87375  /* "View.MemoryView":378
87376  *
87377  * (<__pyx_buffer *> &self.view).obj = NULL
87378  * Py_DECREF(Py_None) # <<<<<<<<<<<<<<
87379  *
87380  * cdef int i
87381  */
87382  Py_DECREF(Py_None);
87383 
87384  /* "View.MemoryView":375
87385  * if self.obj is not None:
87386  * __Pyx_ReleaseBuffer(&self.view)
87387  * elif (<__pyx_buffer *> &self.view).obj == Py_None: # <<<<<<<<<<<<<<
87388  *
87389  * (<__pyx_buffer *> &self.view).obj = NULL
87390  */
87391  }
87392  __pyx_L3:;
87393 
87394  /* "View.MemoryView":382
87395  * cdef int i
87396  * global __pyx_memoryview_thread_locks_used
87397  * if self.lock != NULL: # <<<<<<<<<<<<<<
87398  * for i in range(__pyx_memoryview_thread_locks_used):
87399  * if __pyx_memoryview_thread_locks[i] is self.lock:
87400  */
87401  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
87402  if (__pyx_t_2) {
87403 
87404  /* "View.MemoryView":383
87405  * global __pyx_memoryview_thread_locks_used
87406  * if self.lock != NULL:
87407  * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
87408  * if __pyx_memoryview_thread_locks[i] is self.lock:
87409  * __pyx_memoryview_thread_locks_used -= 1
87410  */
87411  __pyx_t_3 = __pyx_memoryview_thread_locks_used;
87412  __pyx_t_4 = __pyx_t_3;
87413  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
87414  __pyx_v_i = __pyx_t_5;
87415 
87416  /* "View.MemoryView":384
87417  * if self.lock != NULL:
87418  * for i in range(__pyx_memoryview_thread_locks_used):
87419  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
87420  * __pyx_memoryview_thread_locks_used -= 1
87421  * if i != __pyx_memoryview_thread_locks_used:
87422  */
87423  __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
87424  if (__pyx_t_2) {
87425 
87426  /* "View.MemoryView":385
87427  * for i in range(__pyx_memoryview_thread_locks_used):
87428  * if __pyx_memoryview_thread_locks[i] is self.lock:
87429  * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
87430  * if i != __pyx_memoryview_thread_locks_used:
87431  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
87432  */
87433  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
87434 
87435  /* "View.MemoryView":386
87436  * if __pyx_memoryview_thread_locks[i] is self.lock:
87437  * __pyx_memoryview_thread_locks_used -= 1
87438  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
87439  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
87440  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
87441  */
87442  __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
87443  if (__pyx_t_2) {
87444 
87445  /* "View.MemoryView":388
87446  * if i != __pyx_memoryview_thread_locks_used:
87447  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
87448  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
87449  * break
87450  * else:
87451  */
87452  __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
87453  __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
87454 
87455  /* "View.MemoryView":387
87456  * __pyx_memoryview_thread_locks_used -= 1
87457  * if i != __pyx_memoryview_thread_locks_used:
87458  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
87459  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
87460  * break
87461  */
87462  (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
87463  (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
87464 
87465  /* "View.MemoryView":386
87466  * if __pyx_memoryview_thread_locks[i] is self.lock:
87467  * __pyx_memoryview_thread_locks_used -= 1
87468  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
87469  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
87470  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
87471  */
87472  }
87473 
87474  /* "View.MemoryView":389
87475  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
87476  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
87477  * break # <<<<<<<<<<<<<<
87478  * else:
87479  * PyThread_free_lock(self.lock)
87480  */
87481  goto __pyx_L6_break;
87482 
87483  /* "View.MemoryView":384
87484  * if self.lock != NULL:
87485  * for i in range(__pyx_memoryview_thread_locks_used):
87486  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
87487  * __pyx_memoryview_thread_locks_used -= 1
87488  * if i != __pyx_memoryview_thread_locks_used:
87489  */
87490  }
87491  }
87492  /*else*/ {
87493 
87494  /* "View.MemoryView":391
87495  * break
87496  * else:
87497  * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
87498  *
87499  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
87500  */
87501  PyThread_free_lock(__pyx_v_self->lock);
87502  }
87503  __pyx_L6_break:;
87504 
87505  /* "View.MemoryView":382
87506  * cdef int i
87507  * global __pyx_memoryview_thread_locks_used
87508  * if self.lock != NULL: # <<<<<<<<<<<<<<
87509  * for i in range(__pyx_memoryview_thread_locks_used):
87510  * if __pyx_memoryview_thread_locks[i] is self.lock:
87511  */
87512  }
87513 
87514  /* "View.MemoryView":372
87515  * self.typeinfo = NULL
87516  *
87517  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
87518  * if self.obj is not None:
87519  * __Pyx_ReleaseBuffer(&self.view)
87520  */
87521 
87522  /* function exit code */
87523  goto __pyx_L0;
87524  __pyx_L1_error:;
87525  __Pyx_WriteUnraisable("View.MemoryView.memoryview.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
87526  __pyx_L0:;
87527  __Pyx_TraceReturn(Py_None, 0);
87528  __Pyx_RefNannyFinishContext();
87529 }
87530 
87531 /* "View.MemoryView":393
87532  * PyThread_free_lock(self.lock)
87533  *
87534  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
87535  * cdef Py_ssize_t dim
87536  * cdef char *itemp = <char *> self.view.buf
87537  */
87538 
87539 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
87540  Py_ssize_t __pyx_v_dim;
87541  char *__pyx_v_itemp;
87542  PyObject *__pyx_v_idx = NULL;
87543  char *__pyx_r;
87544  __Pyx_TraceDeclarations
87545  __Pyx_RefNannyDeclarations
87546  Py_ssize_t __pyx_t_1;
87547  PyObject *__pyx_t_2 = NULL;
87548  Py_ssize_t __pyx_t_3;
87549  PyObject *(*__pyx_t_4)(PyObject *);
87550  PyObject *__pyx_t_5 = NULL;
87551  Py_ssize_t __pyx_t_6;
87552  char *__pyx_t_7;
87553  int __pyx_lineno = 0;
87554  const char *__pyx_filename = NULL;
87555  int __pyx_clineno = 0;
87556  __Pyx_RefNannySetupContext("get_item_pointer", 0);
87557  __Pyx_TraceCall("get_item_pointer", __pyx_f[1], 393, 0, __PYX_ERR(1, 393, __pyx_L1_error));
87558 
87559  /* "View.MemoryView":395
87560  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
87561  * cdef Py_ssize_t dim
87562  * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
87563  *
87564  * for dim, idx in enumerate(index):
87565  */
87566  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
87567 
87568  /* "View.MemoryView":397
87569  * cdef char *itemp = <char *> self.view.buf
87570  *
87571  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
87572  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
87573  *
87574  */
87575  __pyx_t_1 = 0;
87576  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
87577  __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
87578  __pyx_t_4 = NULL;
87579  } else {
87580  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 397, __pyx_L1_error)
87581  __Pyx_GOTREF(__pyx_t_2);
87582  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 397, __pyx_L1_error)
87583  }
87584  for (;;) {
87585  if (likely(!__pyx_t_4)) {
87586  if (likely(PyList_CheckExact(__pyx_t_2))) {
87587  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
87588  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
87589  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 397, __pyx_L1_error)
87590  #else
87591  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 397, __pyx_L1_error)
87592  __Pyx_GOTREF(__pyx_t_5);
87593  #endif
87594  } else {
87595  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
87596  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
87597  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 397, __pyx_L1_error)
87598  #else
87599  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 397, __pyx_L1_error)
87600  __Pyx_GOTREF(__pyx_t_5);
87601  #endif
87602  }
87603  } else {
87604  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
87605  if (unlikely(!__pyx_t_5)) {
87606  PyObject* exc_type = PyErr_Occurred();
87607  if (exc_type) {
87608  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
87609  else __PYX_ERR(1, 397, __pyx_L1_error)
87610  }
87611  break;
87612  }
87613  __Pyx_GOTREF(__pyx_t_5);
87614  }
87615  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
87616  __pyx_t_5 = 0;
87617  __pyx_v_dim = __pyx_t_1;
87618  __pyx_t_1 = (__pyx_t_1 + 1);
87619 
87620  /* "View.MemoryView":398
87621  *
87622  * for dim, idx in enumerate(index):
87623  * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
87624  *
87625  * return itemp
87626  */
87627  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 398, __pyx_L1_error)
87628  __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(1, 398, __pyx_L1_error)
87629  __pyx_v_itemp = __pyx_t_7;
87630 
87631  /* "View.MemoryView":397
87632  * cdef char *itemp = <char *> self.view.buf
87633  *
87634  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
87635  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
87636  *
87637  */
87638  }
87639  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
87640 
87641  /* "View.MemoryView":400
87642  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
87643  *
87644  * return itemp # <<<<<<<<<<<<<<
87645  *
87646  *
87647  */
87648  __pyx_r = __pyx_v_itemp;
87649  goto __pyx_L0;
87650 
87651  /* "View.MemoryView":393
87652  * PyThread_free_lock(self.lock)
87653  *
87654  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
87655  * cdef Py_ssize_t dim
87656  * cdef char *itemp = <char *> self.view.buf
87657  */
87658 
87659  /* function exit code */
87660  __pyx_L1_error:;
87661  __Pyx_XDECREF(__pyx_t_2);
87662  __Pyx_XDECREF(__pyx_t_5);
87663  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
87664  __pyx_r = NULL;
87665  __pyx_L0:;
87666  __Pyx_XDECREF(__pyx_v_idx);
87667  __Pyx_TraceReturn(Py_None, 0);
87668  __Pyx_RefNannyFinishContext();
87669  return __pyx_r;
87670 }
87671 
87672 /* "View.MemoryView":403
87673  *
87674  *
87675  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
87676  * if index is Ellipsis:
87677  * return self
87678  */
87679 
87680 /* Python wrapper */
87681 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
87682 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
87683  PyObject *__pyx_r = 0;
87684  __Pyx_RefNannyDeclarations
87685  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
87686  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
87687 
87688  /* function exit code */
87689  __Pyx_RefNannyFinishContext();
87690  return __pyx_r;
87691 }
87692 
87693 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
87694  PyObject *__pyx_v_have_slices = NULL;
87695  PyObject *__pyx_v_indices = NULL;
87696  char *__pyx_v_itemp;
87697  PyObject *__pyx_r = NULL;
87698  __Pyx_TraceDeclarations
87699  __Pyx_RefNannyDeclarations
87700  int __pyx_t_1;
87701  int __pyx_t_2;
87702  PyObject *__pyx_t_3 = NULL;
87703  PyObject *__pyx_t_4 = NULL;
87704  PyObject *__pyx_t_5 = NULL;
87705  char *__pyx_t_6;
87706  int __pyx_lineno = 0;
87707  const char *__pyx_filename = NULL;
87708  int __pyx_clineno = 0;
87709  __Pyx_RefNannySetupContext("__getitem__", 0);
87710  __Pyx_TraceCall("__getitem__", __pyx_f[1], 403, 0, __PYX_ERR(1, 403, __pyx_L1_error));
87711 
87712  /* "View.MemoryView":404
87713  *
87714  * def __getitem__(memoryview self, object index):
87715  * if index is Ellipsis: # <<<<<<<<<<<<<<
87716  * return self
87717  *
87718  */
87719  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
87720  __pyx_t_2 = (__pyx_t_1 != 0);
87721  if (__pyx_t_2) {
87722 
87723  /* "View.MemoryView":405
87724  * def __getitem__(memoryview self, object index):
87725  * if index is Ellipsis:
87726  * return self # <<<<<<<<<<<<<<
87727  *
87728  * have_slices, indices = _unellipsify(index, self.view.ndim)
87729  */
87730  __Pyx_XDECREF(__pyx_r);
87731  __Pyx_INCREF(((PyObject *)__pyx_v_self));
87732  __pyx_r = ((PyObject *)__pyx_v_self);
87733  goto __pyx_L0;
87734 
87735  /* "View.MemoryView":404
87736  *
87737  * def __getitem__(memoryview self, object index):
87738  * if index is Ellipsis: # <<<<<<<<<<<<<<
87739  * return self
87740  *
87741  */
87742  }
87743 
87744  /* "View.MemoryView":407
87745  * return self
87746  *
87747  * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
87748  *
87749  * cdef char *itemp
87750  */
87751  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 407, __pyx_L1_error)
87752  __Pyx_GOTREF(__pyx_t_3);
87753  if (likely(__pyx_t_3 != Py_None)) {
87754  PyObject* sequence = __pyx_t_3;
87755  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
87756  if (unlikely(size != 2)) {
87757  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
87758  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
87759  __PYX_ERR(1, 407, __pyx_L1_error)
87760  }
87761  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
87762  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
87763  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
87764  __Pyx_INCREF(__pyx_t_4);
87765  __Pyx_INCREF(__pyx_t_5);
87766  #else
87767  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 407, __pyx_L1_error)
87768  __Pyx_GOTREF(__pyx_t_4);
87769  __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 407, __pyx_L1_error)
87770  __Pyx_GOTREF(__pyx_t_5);
87771  #endif
87772  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
87773  } else {
87774  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 407, __pyx_L1_error)
87775  }
87776  __pyx_v_have_slices = __pyx_t_4;
87777  __pyx_t_4 = 0;
87778  __pyx_v_indices = __pyx_t_5;
87779  __pyx_t_5 = 0;
87780 
87781  /* "View.MemoryView":410
87782  *
87783  * cdef char *itemp
87784  * if have_slices: # <<<<<<<<<<<<<<
87785  * return memview_slice(self, indices)
87786  * else:
87787  */
87788  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 410, __pyx_L1_error)
87789  if (__pyx_t_2) {
87790 
87791  /* "View.MemoryView":411
87792  * cdef char *itemp
87793  * if have_slices:
87794  * return memview_slice(self, indices) # <<<<<<<<<<<<<<
87795  * else:
87796  * itemp = self.get_item_pointer(indices)
87797  */
87798  __Pyx_XDECREF(__pyx_r);
87799  __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 411, __pyx_L1_error)
87800  __Pyx_GOTREF(__pyx_t_3);
87801  __pyx_r = __pyx_t_3;
87802  __pyx_t_3 = 0;
87803  goto __pyx_L0;
87804 
87805  /* "View.MemoryView":410
87806  *
87807  * cdef char *itemp
87808  * if have_slices: # <<<<<<<<<<<<<<
87809  * return memview_slice(self, indices)
87810  * else:
87811  */
87812  }
87813 
87814  /* "View.MemoryView":413
87815  * return memview_slice(self, indices)
87816  * else:
87817  * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
87818  * return self.convert_item_to_object(itemp)
87819  *
87820  */
87821  /*else*/ {
87822  __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(1, 413, __pyx_L1_error)
87823  __pyx_v_itemp = __pyx_t_6;
87824 
87825  /* "View.MemoryView":414
87826  * else:
87827  * itemp = self.get_item_pointer(indices)
87828  * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
87829  *
87830  * def __setitem__(memoryview self, object index, object value):
87831  */
87832  __Pyx_XDECREF(__pyx_r);
87833  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 414, __pyx_L1_error)
87834  __Pyx_GOTREF(__pyx_t_3);
87835  __pyx_r = __pyx_t_3;
87836  __pyx_t_3 = 0;
87837  goto __pyx_L0;
87838  }
87839 
87840  /* "View.MemoryView":403
87841  *
87842  *
87843  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
87844  * if index is Ellipsis:
87845  * return self
87846  */
87847 
87848  /* function exit code */
87849  __pyx_L1_error:;
87850  __Pyx_XDECREF(__pyx_t_3);
87851  __Pyx_XDECREF(__pyx_t_4);
87852  __Pyx_XDECREF(__pyx_t_5);
87853  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
87854  __pyx_r = NULL;
87855  __pyx_L0:;
87856  __Pyx_XDECREF(__pyx_v_have_slices);
87857  __Pyx_XDECREF(__pyx_v_indices);
87858  __Pyx_XGIVEREF(__pyx_r);
87859  __Pyx_TraceReturn(__pyx_r, 0);
87860  __Pyx_RefNannyFinishContext();
87861  return __pyx_r;
87862 }
87863 
87864 /* "View.MemoryView":416
87865  * return self.convert_item_to_object(itemp)
87866  *
87867  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
87868  * if self.view.readonly:
87869  * raise TypeError("Cannot assign to read-only memoryview")
87870  */
87871 
87872 /* Python wrapper */
87873 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
87874 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
87875  int __pyx_r;
87876  __Pyx_RefNannyDeclarations
87877  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
87878  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
87879 
87880  /* function exit code */
87881  __Pyx_RefNannyFinishContext();
87882  return __pyx_r;
87883 }
87884 
87885 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
87886  PyObject *__pyx_v_have_slices = NULL;
87887  PyObject *__pyx_v_obj = NULL;
87888  int __pyx_r;
87889  __Pyx_TraceDeclarations
87890  __Pyx_RefNannyDeclarations
87891  int __pyx_t_1;
87892  PyObject *__pyx_t_2 = NULL;
87893  PyObject *__pyx_t_3 = NULL;
87894  PyObject *__pyx_t_4 = NULL;
87895  int __pyx_lineno = 0;
87896  const char *__pyx_filename = NULL;
87897  int __pyx_clineno = 0;
87898  __Pyx_RefNannySetupContext("__setitem__", 0);
87899  __Pyx_TraceCall("__setitem__", __pyx_f[1], 416, 0, __PYX_ERR(1, 416, __pyx_L1_error));
87900  __Pyx_INCREF(__pyx_v_index);
87901 
87902  /* "View.MemoryView":417
87903  *
87904  * def __setitem__(memoryview self, object index, object value):
87905  * if self.view.readonly: # <<<<<<<<<<<<<<
87906  * raise TypeError("Cannot assign to read-only memoryview")
87907  *
87908  */
87909  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
87910  if (unlikely(__pyx_t_1)) {
87911 
87912  /* "View.MemoryView":418
87913  * def __setitem__(memoryview self, object index, object value):
87914  * if self.view.readonly:
87915  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
87916  *
87917  * have_slices, index = _unellipsify(index, self.view.ndim)
87918  */
87919  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__228, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 418, __pyx_L1_error)
87920  __Pyx_GOTREF(__pyx_t_2);
87921  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
87922  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
87923  __PYX_ERR(1, 418, __pyx_L1_error)
87924 
87925  /* "View.MemoryView":417
87926  *
87927  * def __setitem__(memoryview self, object index, object value):
87928  * if self.view.readonly: # <<<<<<<<<<<<<<
87929  * raise TypeError("Cannot assign to read-only memoryview")
87930  *
87931  */
87932  }
87933 
87934  /* "View.MemoryView":420
87935  * raise TypeError("Cannot assign to read-only memoryview")
87936  *
87937  * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
87938  *
87939  * if have_slices:
87940  */
87941  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 420, __pyx_L1_error)
87942  __Pyx_GOTREF(__pyx_t_2);
87943  if (likely(__pyx_t_2 != Py_None)) {
87944  PyObject* sequence = __pyx_t_2;
87945  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
87946  if (unlikely(size != 2)) {
87947  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
87948  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
87949  __PYX_ERR(1, 420, __pyx_L1_error)
87950  }
87951  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
87952  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
87953  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
87954  __Pyx_INCREF(__pyx_t_3);
87955  __Pyx_INCREF(__pyx_t_4);
87956  #else
87957  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 420, __pyx_L1_error)
87958  __Pyx_GOTREF(__pyx_t_3);
87959  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 420, __pyx_L1_error)
87960  __Pyx_GOTREF(__pyx_t_4);
87961  #endif
87962  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
87963  } else {
87964  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 420, __pyx_L1_error)
87965  }
87966  __pyx_v_have_slices = __pyx_t_3;
87967  __pyx_t_3 = 0;
87968  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
87969  __pyx_t_4 = 0;
87970 
87971  /* "View.MemoryView":422
87972  * have_slices, index = _unellipsify(index, self.view.ndim)
87973  *
87974  * if have_slices: # <<<<<<<<<<<<<<
87975  * obj = self.is_slice(value)
87976  * if obj:
87977  */
87978  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 422, __pyx_L1_error)
87979  if (__pyx_t_1) {
87980 
87981  /* "View.MemoryView":423
87982  *
87983  * if have_slices:
87984  * obj = self.is_slice(value) # <<<<<<<<<<<<<<
87985  * if obj:
87986  * self.setitem_slice_assignment(self[index], obj)
87987  */
87988  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 423, __pyx_L1_error)
87989  __Pyx_GOTREF(__pyx_t_2);
87990  __pyx_v_obj = __pyx_t_2;
87991  __pyx_t_2 = 0;
87992 
87993  /* "View.MemoryView":424
87994  * if have_slices:
87995  * obj = self.is_slice(value)
87996  * if obj: # <<<<<<<<<<<<<<
87997  * self.setitem_slice_assignment(self[index], obj)
87998  * else:
87999  */
88000  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 424, __pyx_L1_error)
88001  if (__pyx_t_1) {
88002 
88003  /* "View.MemoryView":425
88004  * obj = self.is_slice(value)
88005  * if obj:
88006  * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
88007  * else:
88008  * self.setitem_slice_assign_scalar(self[index], value)
88009  */
88010  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 425, __pyx_L1_error)
88011  __Pyx_GOTREF(__pyx_t_2);
88012  __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 425, __pyx_L1_error)
88013  __Pyx_GOTREF(__pyx_t_4);
88014  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
88015  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
88016 
88017  /* "View.MemoryView":424
88018  * if have_slices:
88019  * obj = self.is_slice(value)
88020  * if obj: # <<<<<<<<<<<<<<
88021  * self.setitem_slice_assignment(self[index], obj)
88022  * else:
88023  */
88024  goto __pyx_L5;
88025  }
88026 
88027  /* "View.MemoryView":427
88028  * self.setitem_slice_assignment(self[index], obj)
88029  * else:
88030  * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
88031  * else:
88032  * self.setitem_indexed(index, value)
88033  */
88034  /*else*/ {
88035  __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 427, __pyx_L1_error)
88036  __Pyx_GOTREF(__pyx_t_4);
88037  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(1, 427, __pyx_L1_error)
88038  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 427, __pyx_L1_error)
88039  __Pyx_GOTREF(__pyx_t_2);
88040  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
88041  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
88042  }
88043  __pyx_L5:;
88044 
88045  /* "View.MemoryView":422
88046  * have_slices, index = _unellipsify(index, self.view.ndim)
88047  *
88048  * if have_slices: # <<<<<<<<<<<<<<
88049  * obj = self.is_slice(value)
88050  * if obj:
88051  */
88052  goto __pyx_L4;
88053  }
88054 
88055  /* "View.MemoryView":429
88056  * self.setitem_slice_assign_scalar(self[index], value)
88057  * else:
88058  * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
88059  *
88060  * cdef is_slice(self, obj):
88061  */
88062  /*else*/ {
88063  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 429, __pyx_L1_error)
88064  __Pyx_GOTREF(__pyx_t_2);
88065  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
88066  }
88067  __pyx_L4:;
88068 
88069  /* "View.MemoryView":416
88070  * return self.convert_item_to_object(itemp)
88071  *
88072  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
88073  * if self.view.readonly:
88074  * raise TypeError("Cannot assign to read-only memoryview")
88075  */
88076 
88077  /* function exit code */
88078  __pyx_r = 0;
88079  goto __pyx_L0;
88080  __pyx_L1_error:;
88081  __Pyx_XDECREF(__pyx_t_2);
88082  __Pyx_XDECREF(__pyx_t_3);
88083  __Pyx_XDECREF(__pyx_t_4);
88084  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
88085  __pyx_r = -1;
88086  __pyx_L0:;
88087  __Pyx_XDECREF(__pyx_v_have_slices);
88088  __Pyx_XDECREF(__pyx_v_obj);
88089  __Pyx_XDECREF(__pyx_v_index);
88090  __Pyx_TraceReturn(Py_None, 0);
88091  __Pyx_RefNannyFinishContext();
88092  return __pyx_r;
88093 }
88094 
88095 /* "View.MemoryView":431
88096  * self.setitem_indexed(index, value)
88097  *
88098  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
88099  * if not isinstance(obj, memoryview):
88100  * try:
88101  */
88102 
88103 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
88104  PyObject *__pyx_r = NULL;
88105  __Pyx_TraceDeclarations
88106  __Pyx_RefNannyDeclarations
88107  int __pyx_t_1;
88108  int __pyx_t_2;
88109  PyObject *__pyx_t_3 = NULL;
88110  PyObject *__pyx_t_4 = NULL;
88111  PyObject *__pyx_t_5 = NULL;
88112  PyObject *__pyx_t_6 = NULL;
88113  PyObject *__pyx_t_7 = NULL;
88114  PyObject *__pyx_t_8 = NULL;
88115  int __pyx_t_9;
88116  int __pyx_lineno = 0;
88117  const char *__pyx_filename = NULL;
88118  int __pyx_clineno = 0;
88119  __Pyx_RefNannySetupContext("is_slice", 0);
88120  __Pyx_TraceCall("is_slice", __pyx_f[1], 431, 0, __PYX_ERR(1, 431, __pyx_L1_error));
88121  __Pyx_INCREF(__pyx_v_obj);
88122 
88123  /* "View.MemoryView":432
88124  *
88125  * cdef is_slice(self, obj):
88126  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
88127  * try:
88128  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
88129  */
88130  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
88131  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
88132  if (__pyx_t_2) {
88133 
88134  /* "View.MemoryView":433
88135  * cdef is_slice(self, obj):
88136  * if not isinstance(obj, memoryview):
88137  * try: # <<<<<<<<<<<<<<
88138  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
88139  * self.dtype_is_object)
88140  */
88141  {
88142  __Pyx_PyThreadState_declare
88143  __Pyx_PyThreadState_assign
88144  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
88145  __Pyx_XGOTREF(__pyx_t_3);
88146  __Pyx_XGOTREF(__pyx_t_4);
88147  __Pyx_XGOTREF(__pyx_t_5);
88148  /*try:*/ {
88149 
88150  /* "View.MemoryView":434
88151  * if not isinstance(obj, memoryview):
88152  * try:
88153  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
88154  * self.dtype_is_object)
88155  * except TypeError:
88156  */
88157  __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 434, __pyx_L4_error)
88158  __Pyx_GOTREF(__pyx_t_6);
88159 
88160  /* "View.MemoryView":435
88161  * try:
88162  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
88163  * self.dtype_is_object) # <<<<<<<<<<<<<<
88164  * except TypeError:
88165  * return None
88166  */
88167  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 435, __pyx_L4_error)
88168  __Pyx_GOTREF(__pyx_t_7);
88169 
88170  /* "View.MemoryView":434
88171  * if not isinstance(obj, memoryview):
88172  * try:
88173  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
88174  * self.dtype_is_object)
88175  * except TypeError:
88176  */
88177  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 434, __pyx_L4_error)
88178  __Pyx_GOTREF(__pyx_t_8);
88179  __Pyx_INCREF(__pyx_v_obj);
88180  __Pyx_GIVEREF(__pyx_v_obj);
88181  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
88182  __Pyx_GIVEREF(__pyx_t_6);
88183  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
88184  __Pyx_GIVEREF(__pyx_t_7);
88185  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
88186  __pyx_t_6 = 0;
88187  __pyx_t_7 = 0;
88188  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 434, __pyx_L4_error)
88189  __Pyx_GOTREF(__pyx_t_7);
88190  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
88191  __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
88192  __pyx_t_7 = 0;
88193 
88194  /* "View.MemoryView":433
88195  * cdef is_slice(self, obj):
88196  * if not isinstance(obj, memoryview):
88197  * try: # <<<<<<<<<<<<<<
88198  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
88199  * self.dtype_is_object)
88200  */
88201  }
88202  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
88203  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
88204  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
88205  goto __pyx_L9_try_end;
88206  __pyx_L4_error:;
88207  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
88208  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
88209  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
88210 
88211  /* "View.MemoryView":436
88212  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
88213  * self.dtype_is_object)
88214  * except TypeError: # <<<<<<<<<<<<<<
88215  * return None
88216  *
88217  */
88218  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
88219  if (__pyx_t_9) {
88220  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
88221  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(1, 436, __pyx_L6_except_error)
88222  __Pyx_GOTREF(__pyx_t_7);
88223  __Pyx_GOTREF(__pyx_t_8);
88224  __Pyx_GOTREF(__pyx_t_6);
88225 
88226  /* "View.MemoryView":437
88227  * self.dtype_is_object)
88228  * except TypeError:
88229  * return None # <<<<<<<<<<<<<<
88230  *
88231  * return obj
88232  */
88233  __Pyx_XDECREF(__pyx_r);
88234  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
88235  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88236  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
88237  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
88238  goto __pyx_L7_except_return;
88239  }
88240  goto __pyx_L6_except_error;
88241  __pyx_L6_except_error:;
88242 
88243  /* "View.MemoryView":433
88244  * cdef is_slice(self, obj):
88245  * if not isinstance(obj, memoryview):
88246  * try: # <<<<<<<<<<<<<<
88247  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
88248  * self.dtype_is_object)
88249  */
88250  __Pyx_XGIVEREF(__pyx_t_3);
88251  __Pyx_XGIVEREF(__pyx_t_4);
88252  __Pyx_XGIVEREF(__pyx_t_5);
88253  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
88254  goto __pyx_L1_error;
88255  __pyx_L7_except_return:;
88256  __Pyx_XGIVEREF(__pyx_t_3);
88257  __Pyx_XGIVEREF(__pyx_t_4);
88258  __Pyx_XGIVEREF(__pyx_t_5);
88259  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
88260  goto __pyx_L0;
88261  __pyx_L9_try_end:;
88262  }
88263 
88264  /* "View.MemoryView":432
88265  *
88266  * cdef is_slice(self, obj):
88267  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
88268  * try:
88269  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
88270  */
88271  }
88272 
88273  /* "View.MemoryView":439
88274  * return None
88275  *
88276  * return obj # <<<<<<<<<<<<<<
88277  *
88278  * cdef setitem_slice_assignment(self, dst, src):
88279  */
88280  __Pyx_XDECREF(__pyx_r);
88281  __Pyx_INCREF(__pyx_v_obj);
88282  __pyx_r = __pyx_v_obj;
88283  goto __pyx_L0;
88284 
88285  /* "View.MemoryView":431
88286  * self.setitem_indexed(index, value)
88287  *
88288  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
88289  * if not isinstance(obj, memoryview):
88290  * try:
88291  */
88292 
88293  /* function exit code */
88294  __pyx_L1_error:;
88295  __Pyx_XDECREF(__pyx_t_6);
88296  __Pyx_XDECREF(__pyx_t_7);
88297  __Pyx_XDECREF(__pyx_t_8);
88298  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
88299  __pyx_r = 0;
88300  __pyx_L0:;
88301  __Pyx_XDECREF(__pyx_v_obj);
88302  __Pyx_XGIVEREF(__pyx_r);
88303  __Pyx_TraceReturn(__pyx_r, 0);
88304  __Pyx_RefNannyFinishContext();
88305  return __pyx_r;
88306 }
88307 
88308 /* "View.MemoryView":441
88309  * return obj
88310  *
88311  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
88312  * cdef __Pyx_memviewslice dst_slice
88313  * cdef __Pyx_memviewslice src_slice
88314  */
88315 
88316 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
88317  __Pyx_memviewslice __pyx_v_dst_slice;
88318  __Pyx_memviewslice __pyx_v_src_slice;
88319  PyObject *__pyx_r = NULL;
88320  __Pyx_TraceDeclarations
88321  __Pyx_RefNannyDeclarations
88322  __Pyx_memviewslice *__pyx_t_1;
88323  __Pyx_memviewslice *__pyx_t_2;
88324  PyObject *__pyx_t_3 = NULL;
88325  int __pyx_t_4;
88326  int __pyx_t_5;
88327  int __pyx_t_6;
88328  int __pyx_lineno = 0;
88329  const char *__pyx_filename = NULL;
88330  int __pyx_clineno = 0;
88331  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
88332  __Pyx_TraceCall("setitem_slice_assignment", __pyx_f[1], 441, 0, __PYX_ERR(1, 441, __pyx_L1_error));
88333 
88334  /* "View.MemoryView":445
88335  * cdef __Pyx_memviewslice src_slice
88336  *
88337  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
88338  * get_slice_from_memview(dst, &dst_slice)[0],
88339  * src.ndim, dst.ndim, self.dtype_is_object)
88340  */
88341  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(1, 445, __pyx_L1_error)
88342  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 445, __pyx_L1_error)
88343 
88344  /* "View.MemoryView":446
88345  *
88346  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
88347  * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
88348  * src.ndim, dst.ndim, self.dtype_is_object)
88349  *
88350  */
88351  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(1, 446, __pyx_L1_error)
88352  __pyx_t_2 = __pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice)); if (unlikely(__pyx_t_2 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 446, __pyx_L1_error)
88353 
88354  /* "View.MemoryView":447
88355  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
88356  * get_slice_from_memview(dst, &dst_slice)[0],
88357  * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
88358  *
88359  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
88360  */
88361  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 447, __pyx_L1_error)
88362  __Pyx_GOTREF(__pyx_t_3);
88363  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 447, __pyx_L1_error)
88364  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88365  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 447, __pyx_L1_error)
88366  __Pyx_GOTREF(__pyx_t_3);
88367  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 447, __pyx_L1_error)
88368  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88369 
88370  /* "View.MemoryView":445
88371  * cdef __Pyx_memviewslice src_slice
88372  *
88373  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
88374  * get_slice_from_memview(dst, &dst_slice)[0],
88375  * src.ndim, dst.ndim, self.dtype_is_object)
88376  */
88377  __pyx_t_6 = __pyx_memoryview_copy_contents((__pyx_t_1[0]), (__pyx_t_2[0]), __pyx_t_4, __pyx_t_5, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 445, __pyx_L1_error)
88378 
88379  /* "View.MemoryView":441
88380  * return obj
88381  *
88382  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
88383  * cdef __Pyx_memviewslice dst_slice
88384  * cdef __Pyx_memviewslice src_slice
88385  */
88386 
88387  /* function exit code */
88388  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
88389  goto __pyx_L0;
88390  __pyx_L1_error:;
88391  __Pyx_XDECREF(__pyx_t_3);
88392  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
88393  __pyx_r = 0;
88394  __pyx_L0:;
88395  __Pyx_XGIVEREF(__pyx_r);
88396  __Pyx_TraceReturn(__pyx_r, 0);
88397  __Pyx_RefNannyFinishContext();
88398  return __pyx_r;
88399 }
88400 
88401 /* "View.MemoryView":449
88402  * src.ndim, dst.ndim, self.dtype_is_object)
88403  *
88404  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
88405  * cdef int array[128]
88406  * cdef void *tmp = NULL
88407  */
88408 
88409 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
88410  int __pyx_v_array[0x80];
88411  void *__pyx_v_tmp;
88412  void *__pyx_v_item;
88413  __Pyx_memviewslice *__pyx_v_dst_slice;
88414  __Pyx_memviewslice __pyx_v_tmp_slice;
88415  PyObject *__pyx_r = NULL;
88416  __Pyx_TraceDeclarations
88417  __Pyx_RefNannyDeclarations
88418  __Pyx_memviewslice *__pyx_t_1;
88419  int __pyx_t_2;
88420  PyObject *__pyx_t_3 = NULL;
88421  int __pyx_t_4;
88422  int __pyx_t_5;
88423  char const *__pyx_t_6;
88424  PyObject *__pyx_t_7 = NULL;
88425  PyObject *__pyx_t_8 = NULL;
88426  PyObject *__pyx_t_9 = NULL;
88427  PyObject *__pyx_t_10 = NULL;
88428  PyObject *__pyx_t_11 = NULL;
88429  PyObject *__pyx_t_12 = NULL;
88430  int __pyx_lineno = 0;
88431  const char *__pyx_filename = NULL;
88432  int __pyx_clineno = 0;
88433  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
88434  __Pyx_TraceCall("setitem_slice_assign_scalar", __pyx_f[1], 449, 0, __PYX_ERR(1, 449, __pyx_L1_error));
88435 
88436  /* "View.MemoryView":451
88437  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
88438  * cdef int array[128]
88439  * cdef void *tmp = NULL # <<<<<<<<<<<<<<
88440  * cdef void *item
88441  *
88442  */
88443  __pyx_v_tmp = NULL;
88444 
88445  /* "View.MemoryView":456
88446  * cdef __Pyx_memviewslice *dst_slice
88447  * cdef __Pyx_memviewslice tmp_slice
88448  * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
88449  *
88450  * if <size_t>self.view.itemsize > sizeof(array):
88451  */
88452  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 456, __pyx_L1_error)
88453  __pyx_v_dst_slice = __pyx_t_1;
88454 
88455  /* "View.MemoryView":458
88456  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
88457  *
88458  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
88459  * tmp = PyMem_Malloc(self.view.itemsize)
88460  * if tmp == NULL:
88461  */
88462  __pyx_t_2 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
88463  if (__pyx_t_2) {
88464 
88465  /* "View.MemoryView":459
88466  *
88467  * if <size_t>self.view.itemsize > sizeof(array):
88468  * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
88469  * if tmp == NULL:
88470  * raise MemoryError
88471  */
88472  __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
88473 
88474  /* "View.MemoryView":460
88475  * if <size_t>self.view.itemsize > sizeof(array):
88476  * tmp = PyMem_Malloc(self.view.itemsize)
88477  * if tmp == NULL: # <<<<<<<<<<<<<<
88478  * raise MemoryError
88479  * item = tmp
88480  */
88481  __pyx_t_2 = ((__pyx_v_tmp == NULL) != 0);
88482  if (unlikely(__pyx_t_2)) {
88483 
88484  /* "View.MemoryView":461
88485  * tmp = PyMem_Malloc(self.view.itemsize)
88486  * if tmp == NULL:
88487  * raise MemoryError # <<<<<<<<<<<<<<
88488  * item = tmp
88489  * else:
88490  */
88491  PyErr_NoMemory(); __PYX_ERR(1, 461, __pyx_L1_error)
88492 
88493  /* "View.MemoryView":460
88494  * if <size_t>self.view.itemsize > sizeof(array):
88495  * tmp = PyMem_Malloc(self.view.itemsize)
88496  * if tmp == NULL: # <<<<<<<<<<<<<<
88497  * raise MemoryError
88498  * item = tmp
88499  */
88500  }
88501 
88502  /* "View.MemoryView":462
88503  * if tmp == NULL:
88504  * raise MemoryError
88505  * item = tmp # <<<<<<<<<<<<<<
88506  * else:
88507  * item = <void *> array
88508  */
88509  __pyx_v_item = __pyx_v_tmp;
88510 
88511  /* "View.MemoryView":458
88512  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
88513  *
88514  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
88515  * tmp = PyMem_Malloc(self.view.itemsize)
88516  * if tmp == NULL:
88517  */
88518  goto __pyx_L3;
88519  }
88520 
88521  /* "View.MemoryView":464
88522  * item = tmp
88523  * else:
88524  * item = <void *> array # <<<<<<<<<<<<<<
88525  *
88526  * try:
88527  */
88528  /*else*/ {
88529  __pyx_v_item = ((void *)__pyx_v_array);
88530  }
88531  __pyx_L3:;
88532 
88533  /* "View.MemoryView":466
88534  * item = <void *> array
88535  *
88536  * try: # <<<<<<<<<<<<<<
88537  * if self.dtype_is_object:
88538  * (<PyObject **> item)[0] = <PyObject *> value
88539  */
88540  /*try:*/ {
88541 
88542  /* "View.MemoryView":467
88543  *
88544  * try:
88545  * if self.dtype_is_object: # <<<<<<<<<<<<<<
88546  * (<PyObject **> item)[0] = <PyObject *> value
88547  * else:
88548  */
88549  __pyx_t_2 = (__pyx_v_self->dtype_is_object != 0);
88550  if (__pyx_t_2) {
88551 
88552  /* "View.MemoryView":468
88553  * try:
88554  * if self.dtype_is_object:
88555  * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
88556  * else:
88557  * self.assign_item_from_object(<char *> item, value)
88558  */
88559  (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
88560 
88561  /* "View.MemoryView":467
88562  *
88563  * try:
88564  * if self.dtype_is_object: # <<<<<<<<<<<<<<
88565  * (<PyObject **> item)[0] = <PyObject *> value
88566  * else:
88567  */
88568  goto __pyx_L8;
88569  }
88570 
88571  /* "View.MemoryView":470
88572  * (<PyObject **> item)[0] = <PyObject *> value
88573  * else:
88574  * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
88575  *
88576  *
88577  */
88578  /*else*/ {
88579  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 470, __pyx_L6_error)
88580  __Pyx_GOTREF(__pyx_t_3);
88581  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88582  }
88583  __pyx_L8:;
88584 
88585  /* "View.MemoryView":474
88586  *
88587  *
88588  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
88589  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
88590  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
88591  */
88592  __pyx_t_2 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
88593  if (__pyx_t_2) {
88594 
88595  /* "View.MemoryView":475
88596  *
88597  * if self.view.suboffsets != NULL:
88598  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
88599  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
88600  * item, self.dtype_is_object)
88601  */
88602  __pyx_t_3 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 475, __pyx_L6_error)
88603  __Pyx_GOTREF(__pyx_t_3);
88604  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
88605 
88606  /* "View.MemoryView":474
88607  *
88608  *
88609  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
88610  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
88611  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
88612  */
88613  }
88614 
88615  /* "View.MemoryView":476
88616  * if self.view.suboffsets != NULL:
88617  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
88618  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
88619  * item, self.dtype_is_object)
88620  * finally:
88621  */
88622  __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
88623  }
88624 
88625  /* "View.MemoryView":479
88626  * item, self.dtype_is_object)
88627  * finally:
88628  * PyMem_Free(tmp) # <<<<<<<<<<<<<<
88629  *
88630  * cdef setitem_indexed(self, index, value):
88631  */
88632  /*finally:*/ {
88633  /*normal exit:*/{
88634  PyMem_Free(__pyx_v_tmp);
88635  goto __pyx_L7;
88636  }
88637  __pyx_L6_error:;
88638  /*exception exit:*/{
88639  __Pyx_PyThreadState_declare
88640  __Pyx_PyThreadState_assign
88641  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
88642  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
88643  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
88644  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9) < 0)) __Pyx_ErrFetch(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
88645  __Pyx_XGOTREF(__pyx_t_7);
88646  __Pyx_XGOTREF(__pyx_t_8);
88647  __Pyx_XGOTREF(__pyx_t_9);
88648  __Pyx_XGOTREF(__pyx_t_10);
88649  __Pyx_XGOTREF(__pyx_t_11);
88650  __Pyx_XGOTREF(__pyx_t_12);
88651  __pyx_t_4 = __pyx_lineno; __pyx_t_5 = __pyx_clineno; __pyx_t_6 = __pyx_filename;
88652  {
88653  PyMem_Free(__pyx_v_tmp);
88654  }
88655  if (PY_MAJOR_VERSION >= 3) {
88656  __Pyx_XGIVEREF(__pyx_t_10);
88657  __Pyx_XGIVEREF(__pyx_t_11);
88658  __Pyx_XGIVEREF(__pyx_t_12);
88659  __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
88660  }
88661  __Pyx_XGIVEREF(__pyx_t_7);
88662  __Pyx_XGIVEREF(__pyx_t_8);
88663  __Pyx_XGIVEREF(__pyx_t_9);
88664  __Pyx_ErrRestore(__pyx_t_7, __pyx_t_8, __pyx_t_9);
88665  __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0; __pyx_t_12 = 0;
88666  __pyx_lineno = __pyx_t_4; __pyx_clineno = __pyx_t_5; __pyx_filename = __pyx_t_6;
88667  goto __pyx_L1_error;
88668  }
88669  __pyx_L7:;
88670  }
88671 
88672  /* "View.MemoryView":449
88673  * src.ndim, dst.ndim, self.dtype_is_object)
88674  *
88675  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
88676  * cdef int array[128]
88677  * cdef void *tmp = NULL
88678  */
88679 
88680  /* function exit code */
88681  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
88682  goto __pyx_L0;
88683  __pyx_L1_error:;
88684  __Pyx_XDECREF(__pyx_t_3);
88685  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
88686  __pyx_r = 0;
88687  __pyx_L0:;
88688  __Pyx_XGIVEREF(__pyx_r);
88689  __Pyx_TraceReturn(__pyx_r, 0);
88690  __Pyx_RefNannyFinishContext();
88691  return __pyx_r;
88692 }
88693 
88694 /* "View.MemoryView":481
88695  * PyMem_Free(tmp)
88696  *
88697  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
88698  * cdef char *itemp = self.get_item_pointer(index)
88699  * self.assign_item_from_object(itemp, value)
88700  */
88701 
88702 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
88703  char *__pyx_v_itemp;
88704  PyObject *__pyx_r = NULL;
88705  __Pyx_TraceDeclarations
88706  __Pyx_RefNannyDeclarations
88707  char *__pyx_t_1;
88708  PyObject *__pyx_t_2 = NULL;
88709  int __pyx_lineno = 0;
88710  const char *__pyx_filename = NULL;
88711  int __pyx_clineno = 0;
88712  __Pyx_RefNannySetupContext("setitem_indexed", 0);
88713  __Pyx_TraceCall("setitem_indexed", __pyx_f[1], 481, 0, __PYX_ERR(1, 481, __pyx_L1_error));
88714 
88715  /* "View.MemoryView":482
88716  *
88717  * cdef setitem_indexed(self, index, value):
88718  * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
88719  * self.assign_item_from_object(itemp, value)
88720  *
88721  */
88722  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(1, 482, __pyx_L1_error)
88723  __pyx_v_itemp = __pyx_t_1;
88724 
88725  /* "View.MemoryView":483
88726  * cdef setitem_indexed(self, index, value):
88727  * cdef char *itemp = self.get_item_pointer(index)
88728  * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
88729  *
88730  * cdef convert_item_to_object(self, char *itemp):
88731  */
88732  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __pyx_L1_error)
88733  __Pyx_GOTREF(__pyx_t_2);
88734  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
88735 
88736  /* "View.MemoryView":481
88737  * PyMem_Free(tmp)
88738  *
88739  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
88740  * cdef char *itemp = self.get_item_pointer(index)
88741  * self.assign_item_from_object(itemp, value)
88742  */
88743 
88744  /* function exit code */
88745  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
88746  goto __pyx_L0;
88747  __pyx_L1_error:;
88748  __Pyx_XDECREF(__pyx_t_2);
88749  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
88750  __pyx_r = 0;
88751  __pyx_L0:;
88752  __Pyx_XGIVEREF(__pyx_r);
88753  __Pyx_TraceReturn(__pyx_r, 0);
88754  __Pyx_RefNannyFinishContext();
88755  return __pyx_r;
88756 }
88757 
88758 /* "View.MemoryView":485
88759  * self.assign_item_from_object(itemp, value)
88760  *
88761  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
88762  * """Only used if instantiated manually by the user, or if Cython doesn't
88763  * know how to convert the type"""
88764  */
88765 
88766 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
88767  PyObject *__pyx_v_struct = NULL;
88768  PyObject *__pyx_v_bytesitem = 0;
88769  PyObject *__pyx_v_result = NULL;
88770  PyObject *__pyx_r = NULL;
88771  __Pyx_TraceDeclarations
88772  __Pyx_RefNannyDeclarations
88773  PyObject *__pyx_t_1 = NULL;
88774  PyObject *__pyx_t_2 = NULL;
88775  PyObject *__pyx_t_3 = NULL;
88776  PyObject *__pyx_t_4 = NULL;
88777  PyObject *__pyx_t_5 = NULL;
88778  PyObject *__pyx_t_6 = NULL;
88779  PyObject *__pyx_t_7 = NULL;
88780  int __pyx_t_8;
88781  PyObject *__pyx_t_9 = NULL;
88782  size_t __pyx_t_10;
88783  int __pyx_t_11;
88784  int __pyx_lineno = 0;
88785  const char *__pyx_filename = NULL;
88786  int __pyx_clineno = 0;
88787  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
88788  __Pyx_TraceCall("convert_item_to_object", __pyx_f[1], 485, 0, __PYX_ERR(1, 485, __pyx_L1_error));
88789 
88790  /* "View.MemoryView":488
88791  * """Only used if instantiated manually by the user, or if Cython doesn't
88792  * know how to convert the type"""
88793  * import struct # <<<<<<<<<<<<<<
88794  * cdef bytes bytesitem
88795  *
88796  */
88797  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error)
88798  __Pyx_GOTREF(__pyx_t_1);
88799  __pyx_v_struct = __pyx_t_1;
88800  __pyx_t_1 = 0;
88801 
88802  /* "View.MemoryView":491
88803  * cdef bytes bytesitem
88804  *
88805  * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
88806  * try:
88807  * result = struct.unpack(self.view.format, bytesitem)
88808  */
88809  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error)
88810  __Pyx_GOTREF(__pyx_t_1);
88811  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
88812  __pyx_t_1 = 0;
88813 
88814  /* "View.MemoryView":492
88815  *
88816  * bytesitem = itemp[:self.view.itemsize]
88817  * try: # <<<<<<<<<<<<<<
88818  * result = struct.unpack(self.view.format, bytesitem)
88819  * except struct.error:
88820  */
88821  {
88822  __Pyx_PyThreadState_declare
88823  __Pyx_PyThreadState_assign
88824  __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
88825  __Pyx_XGOTREF(__pyx_t_2);
88826  __Pyx_XGOTREF(__pyx_t_3);
88827  __Pyx_XGOTREF(__pyx_t_4);
88828  /*try:*/ {
88829 
88830  /* "View.MemoryView":493
88831  * bytesitem = itemp[:self.view.itemsize]
88832  * try:
88833  * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
88834  * except struct.error:
88835  * raise ValueError("Unable to convert item to object")
88836  */
88837  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 493, __pyx_L3_error)
88838  __Pyx_GOTREF(__pyx_t_5);
88839  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 493, __pyx_L3_error)
88840  __Pyx_GOTREF(__pyx_t_6);
88841  __pyx_t_7 = NULL;
88842  __pyx_t_8 = 0;
88843  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
88844  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
88845  if (likely(__pyx_t_7)) {
88846  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
88847  __Pyx_INCREF(__pyx_t_7);
88848  __Pyx_INCREF(function);
88849  __Pyx_DECREF_SET(__pyx_t_5, function);
88850  __pyx_t_8 = 1;
88851  }
88852  }
88853  #if CYTHON_FAST_PYCALL
88854  if (PyFunction_Check(__pyx_t_5)) {
88855  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
88856  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L3_error)
88857  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
88858  __Pyx_GOTREF(__pyx_t_1);
88859  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88860  } else
88861  #endif
88862  #if CYTHON_FAST_PYCCALL
88863  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
88864  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
88865  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L3_error)
88866  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
88867  __Pyx_GOTREF(__pyx_t_1);
88868  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88869  } else
88870  #endif
88871  {
88872  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 493, __pyx_L3_error)
88873  __Pyx_GOTREF(__pyx_t_9);
88874  if (__pyx_t_7) {
88875  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
88876  }
88877  __Pyx_GIVEREF(__pyx_t_6);
88878  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
88879  __Pyx_INCREF(__pyx_v_bytesitem);
88880  __Pyx_GIVEREF(__pyx_v_bytesitem);
88881  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
88882  __pyx_t_6 = 0;
88883  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L3_error)
88884  __Pyx_GOTREF(__pyx_t_1);
88885  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
88886  }
88887  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
88888  __pyx_v_result = __pyx_t_1;
88889  __pyx_t_1 = 0;
88890 
88891  /* "View.MemoryView":492
88892  *
88893  * bytesitem = itemp[:self.view.itemsize]
88894  * try: # <<<<<<<<<<<<<<
88895  * result = struct.unpack(self.view.format, bytesitem)
88896  * except struct.error:
88897  */
88898  }
88899 
88900  /* "View.MemoryView":497
88901  * raise ValueError("Unable to convert item to object")
88902  * else:
88903  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
88904  * return result[0]
88905  * return result
88906  */
88907  /*else:*/ {
88908  __pyx_t_10 = strlen(__pyx_v_self->view.format);
88909  __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
88910  if (__pyx_t_11) {
88911 
88912  /* "View.MemoryView":498
88913  * else:
88914  * if len(self.view.format) == 1:
88915  * return result[0] # <<<<<<<<<<<<<<
88916  * return result
88917  *
88918  */
88919  __Pyx_XDECREF(__pyx_r);
88920  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 498, __pyx_L5_except_error)
88921  __Pyx_GOTREF(__pyx_t_1);
88922  __pyx_r = __pyx_t_1;
88923  __pyx_t_1 = 0;
88924  goto __pyx_L6_except_return;
88925 
88926  /* "View.MemoryView":497
88927  * raise ValueError("Unable to convert item to object")
88928  * else:
88929  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
88930  * return result[0]
88931  * return result
88932  */
88933  }
88934 
88935  /* "View.MemoryView":499
88936  * if len(self.view.format) == 1:
88937  * return result[0]
88938  * return result # <<<<<<<<<<<<<<
88939  *
88940  * cdef assign_item_from_object(self, char *itemp, object value):
88941  */
88942  __Pyx_XDECREF(__pyx_r);
88943  __Pyx_INCREF(__pyx_v_result);
88944  __pyx_r = __pyx_v_result;
88945  goto __pyx_L6_except_return;
88946  }
88947  __pyx_L3_error:;
88948  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
88949  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
88950  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
88951  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
88952  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
88953 
88954  /* "View.MemoryView":494
88955  * try:
88956  * result = struct.unpack(self.view.format, bytesitem)
88957  * except struct.error: # <<<<<<<<<<<<<<
88958  * raise ValueError("Unable to convert item to object")
88959  * else:
88960  */
88961  __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
88962  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 494, __pyx_L5_except_error)
88963  __Pyx_GOTREF(__pyx_t_6);
88964  __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
88965  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88966  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
88967  __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
88968  if (__pyx_t_8) {
88969  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
88970  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(1, 494, __pyx_L5_except_error)
88971  __Pyx_GOTREF(__pyx_t_9);
88972  __Pyx_GOTREF(__pyx_t_5);
88973  __Pyx_GOTREF(__pyx_t_1);
88974 
88975  /* "View.MemoryView":495
88976  * result = struct.unpack(self.view.format, bytesitem)
88977  * except struct.error:
88978  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
88979  * else:
88980  * if len(self.view.format) == 1:
88981  */
88982  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__229, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 495, __pyx_L5_except_error)
88983  __Pyx_GOTREF(__pyx_t_6);
88984  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
88985  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
88986  __PYX_ERR(1, 495, __pyx_L5_except_error)
88987  }
88988  goto __pyx_L5_except_error;
88989  __pyx_L5_except_error:;
88990 
88991  /* "View.MemoryView":492
88992  *
88993  * bytesitem = itemp[:self.view.itemsize]
88994  * try: # <<<<<<<<<<<<<<
88995  * result = struct.unpack(self.view.format, bytesitem)
88996  * except struct.error:
88997  */
88998  __Pyx_XGIVEREF(__pyx_t_2);
88999  __Pyx_XGIVEREF(__pyx_t_3);
89000  __Pyx_XGIVEREF(__pyx_t_4);
89001  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
89002  goto __pyx_L1_error;
89003  __pyx_L6_except_return:;
89004  __Pyx_XGIVEREF(__pyx_t_2);
89005  __Pyx_XGIVEREF(__pyx_t_3);
89006  __Pyx_XGIVEREF(__pyx_t_4);
89007  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
89008  goto __pyx_L0;
89009  }
89010 
89011  /* "View.MemoryView":485
89012  * self.assign_item_from_object(itemp, value)
89013  *
89014  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
89015  * """Only used if instantiated manually by the user, or if Cython doesn't
89016  * know how to convert the type"""
89017  */
89018 
89019  /* function exit code */
89020  __pyx_L1_error:;
89021  __Pyx_XDECREF(__pyx_t_1);
89022  __Pyx_XDECREF(__pyx_t_5);
89023  __Pyx_XDECREF(__pyx_t_6);
89024  __Pyx_XDECREF(__pyx_t_7);
89025  __Pyx_XDECREF(__pyx_t_9);
89026  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
89027  __pyx_r = 0;
89028  __pyx_L0:;
89029  __Pyx_XDECREF(__pyx_v_struct);
89030  __Pyx_XDECREF(__pyx_v_bytesitem);
89031  __Pyx_XDECREF(__pyx_v_result);
89032  __Pyx_XGIVEREF(__pyx_r);
89033  __Pyx_TraceReturn(__pyx_r, 0);
89034  __Pyx_RefNannyFinishContext();
89035  return __pyx_r;
89036 }
89037 
89038 /* "View.MemoryView":501
89039  * return result
89040  *
89041  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
89042  * """Only used if instantiated manually by the user, or if Cython doesn't
89043  * know how to convert the type"""
89044  */
89045 
89046 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
89047  PyObject *__pyx_v_struct = NULL;
89048  char __pyx_v_c;
89049  PyObject *__pyx_v_bytesvalue = 0;
89050  Py_ssize_t __pyx_v_i;
89051  PyObject *__pyx_r = NULL;
89052  __Pyx_TraceDeclarations
89053  __Pyx_RefNannyDeclarations
89054  PyObject *__pyx_t_1 = NULL;
89055  int __pyx_t_2;
89056  int __pyx_t_3;
89057  PyObject *__pyx_t_4 = NULL;
89058  PyObject *__pyx_t_5 = NULL;
89059  PyObject *__pyx_t_6 = NULL;
89060  int __pyx_t_7;
89061  PyObject *__pyx_t_8 = NULL;
89062  Py_ssize_t __pyx_t_9;
89063  PyObject *__pyx_t_10 = NULL;
89064  char *__pyx_t_11;
89065  char *__pyx_t_12;
89066  char *__pyx_t_13;
89067  char *__pyx_t_14;
89068  int __pyx_lineno = 0;
89069  const char *__pyx_filename = NULL;
89070  int __pyx_clineno = 0;
89071  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
89072  __Pyx_TraceCall("assign_item_from_object", __pyx_f[1], 501, 0, __PYX_ERR(1, 501, __pyx_L1_error));
89073 
89074  /* "View.MemoryView":504
89075  * """Only used if instantiated manually by the user, or if Cython doesn't
89076  * know how to convert the type"""
89077  * import struct # <<<<<<<<<<<<<<
89078  * cdef char c
89079  * cdef bytes bytesvalue
89080  */
89081  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 504, __pyx_L1_error)
89082  __Pyx_GOTREF(__pyx_t_1);
89083  __pyx_v_struct = __pyx_t_1;
89084  __pyx_t_1 = 0;
89085 
89086  /* "View.MemoryView":509
89087  * cdef Py_ssize_t i
89088  *
89089  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
89090  * bytesvalue = struct.pack(self.view.format, *value)
89091  * else:
89092  */
89093  __pyx_t_2 = PyTuple_Check(__pyx_v_value);
89094  __pyx_t_3 = (__pyx_t_2 != 0);
89095  if (__pyx_t_3) {
89096 
89097  /* "View.MemoryView":510
89098  *
89099  * if isinstance(value, tuple):
89100  * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
89101  * else:
89102  * bytesvalue = struct.pack(self.view.format, value)
89103  */
89104  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 510, __pyx_L1_error)
89105  __Pyx_GOTREF(__pyx_t_1);
89106  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)
89107  __Pyx_GOTREF(__pyx_t_4);
89108  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 510, __pyx_L1_error)
89109  __Pyx_GOTREF(__pyx_t_5);
89110  __Pyx_GIVEREF(__pyx_t_4);
89111  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
89112  __pyx_t_4 = 0;
89113  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)
89114  __Pyx_GOTREF(__pyx_t_4);
89115  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 510, __pyx_L1_error)
89116  __Pyx_GOTREF(__pyx_t_6);
89117  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
89118  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
89119  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 510, __pyx_L1_error)
89120  __Pyx_GOTREF(__pyx_t_4);
89121  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89122  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
89123  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(1, 510, __pyx_L1_error)
89124  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
89125  __pyx_t_4 = 0;
89126 
89127  /* "View.MemoryView":509
89128  * cdef Py_ssize_t i
89129  *
89130  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
89131  * bytesvalue = struct.pack(self.view.format, *value)
89132  * else:
89133  */
89134  goto __pyx_L3;
89135  }
89136 
89137  /* "View.MemoryView":512
89138  * bytesvalue = struct.pack(self.view.format, *value)
89139  * else:
89140  * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
89141  *
89142  * for i, c in enumerate(bytesvalue):
89143  */
89144  /*else*/ {
89145  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 512, __pyx_L1_error)
89146  __Pyx_GOTREF(__pyx_t_6);
89147  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 512, __pyx_L1_error)
89148  __Pyx_GOTREF(__pyx_t_1);
89149  __pyx_t_5 = NULL;
89150  __pyx_t_7 = 0;
89151  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
89152  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
89153  if (likely(__pyx_t_5)) {
89154  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
89155  __Pyx_INCREF(__pyx_t_5);
89156  __Pyx_INCREF(function);
89157  __Pyx_DECREF_SET(__pyx_t_6, function);
89158  __pyx_t_7 = 1;
89159  }
89160  }
89161  #if CYTHON_FAST_PYCALL
89162  if (PyFunction_Check(__pyx_t_6)) {
89163  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
89164  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
89165  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
89166  __Pyx_GOTREF(__pyx_t_4);
89167  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89168  } else
89169  #endif
89170  #if CYTHON_FAST_PYCCALL
89171  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
89172  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
89173  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
89174  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
89175  __Pyx_GOTREF(__pyx_t_4);
89176  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89177  } else
89178  #endif
89179  {
89180  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 512, __pyx_L1_error)
89181  __Pyx_GOTREF(__pyx_t_8);
89182  if (__pyx_t_5) {
89183  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
89184  }
89185  __Pyx_GIVEREF(__pyx_t_1);
89186  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
89187  __Pyx_INCREF(__pyx_v_value);
89188  __Pyx_GIVEREF(__pyx_v_value);
89189  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
89190  __pyx_t_1 = 0;
89191  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 512, __pyx_L1_error)
89192  __Pyx_GOTREF(__pyx_t_4);
89193  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
89194  }
89195  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
89196  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(1, 512, __pyx_L1_error)
89197  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
89198  __pyx_t_4 = 0;
89199  }
89200  __pyx_L3:;
89201 
89202  /* "View.MemoryView":514
89203  * bytesvalue = struct.pack(self.view.format, value)
89204  *
89205  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
89206  * itemp[i] = c
89207  *
89208  */
89209  __pyx_t_9 = 0;
89210  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
89211  PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
89212  __PYX_ERR(1, 514, __pyx_L1_error)
89213  }
89214  __Pyx_INCREF(__pyx_v_bytesvalue);
89215  __pyx_t_10 = __pyx_v_bytesvalue;
89216  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
89217  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
89218  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
89219  __pyx_t_11 = __pyx_t_14;
89220  __pyx_v_c = (__pyx_t_11[0]);
89221 
89222  /* "View.MemoryView":515
89223  *
89224  * for i, c in enumerate(bytesvalue):
89225  * itemp[i] = c # <<<<<<<<<<<<<<
89226  *
89227  * @cname('getbuffer')
89228  */
89229  __pyx_v_i = __pyx_t_9;
89230 
89231  /* "View.MemoryView":514
89232  * bytesvalue = struct.pack(self.view.format, value)
89233  *
89234  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
89235  * itemp[i] = c
89236  *
89237  */
89238  __pyx_t_9 = (__pyx_t_9 + 1);
89239 
89240  /* "View.MemoryView":515
89241  *
89242  * for i, c in enumerate(bytesvalue):
89243  * itemp[i] = c # <<<<<<<<<<<<<<
89244  *
89245  * @cname('getbuffer')
89246  */
89247  (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
89248  }
89249  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
89250 
89251  /* "View.MemoryView":501
89252  * return result
89253  *
89254  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
89255  * """Only used if instantiated manually by the user, or if Cython doesn't
89256  * know how to convert the type"""
89257  */
89258 
89259  /* function exit code */
89260  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
89261  goto __pyx_L0;
89262  __pyx_L1_error:;
89263  __Pyx_XDECREF(__pyx_t_1);
89264  __Pyx_XDECREF(__pyx_t_4);
89265  __Pyx_XDECREF(__pyx_t_5);
89266  __Pyx_XDECREF(__pyx_t_6);
89267  __Pyx_XDECREF(__pyx_t_8);
89268  __Pyx_XDECREF(__pyx_t_10);
89269  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
89270  __pyx_r = 0;
89271  __pyx_L0:;
89272  __Pyx_XDECREF(__pyx_v_struct);
89273  __Pyx_XDECREF(__pyx_v_bytesvalue);
89274  __Pyx_XGIVEREF(__pyx_r);
89275  __Pyx_TraceReturn(__pyx_r, 0);
89276  __Pyx_RefNannyFinishContext();
89277  return __pyx_r;
89278 }
89279 
89280 /* "View.MemoryView":518
89281  *
89282  * @cname('getbuffer')
89283  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
89284  * if flags & PyBUF_WRITABLE and self.view.readonly:
89285  * raise ValueError("Cannot create writable memory view from read-only memoryview")
89286  */
89287 
89288 /* Python wrapper */
89289 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
89290 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
89291  int __pyx_r;
89292  __Pyx_RefNannyDeclarations
89293  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
89294  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
89295 
89296  /* function exit code */
89297  __Pyx_RefNannyFinishContext();
89298  return __pyx_r;
89299 }
89300 
89301 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
89302  int __pyx_r;
89303  __Pyx_TraceDeclarations
89304  __Pyx_RefNannyDeclarations
89305  int __pyx_t_1;
89306  int __pyx_t_2;
89307  PyObject *__pyx_t_3 = NULL;
89308  Py_ssize_t *__pyx_t_4;
89309  char *__pyx_t_5;
89310  void *__pyx_t_6;
89311  int __pyx_t_7;
89312  Py_ssize_t __pyx_t_8;
89313  int __pyx_lineno = 0;
89314  const char *__pyx_filename = NULL;
89315  int __pyx_clineno = 0;
89316  if (__pyx_v_info == NULL) {
89317  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
89318  return -1;
89319  }
89320  __Pyx_RefNannySetupContext("__getbuffer__", 0);
89321  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
89322  __Pyx_GIVEREF(__pyx_v_info->obj);
89323  __Pyx_TraceCall("__getbuffer__", __pyx_f[1], 518, 0, __PYX_ERR(1, 518, __pyx_L1_error));
89324 
89325  /* "View.MemoryView":519
89326  * @cname('getbuffer')
89327  * def __getbuffer__(self, Py_buffer *info, int flags):
89328  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
89329  * raise ValueError("Cannot create writable memory view from read-only memoryview")
89330  *
89331  */
89332  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
89333  if (__pyx_t_2) {
89334  } else {
89335  __pyx_t_1 = __pyx_t_2;
89336  goto __pyx_L4_bool_binop_done;
89337  }
89338  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
89339  __pyx_t_1 = __pyx_t_2;
89340  __pyx_L4_bool_binop_done:;
89341  if (unlikely(__pyx_t_1)) {
89342 
89343  /* "View.MemoryView":520
89344  * def __getbuffer__(self, Py_buffer *info, int flags):
89345  * if flags & PyBUF_WRITABLE and self.view.readonly:
89346  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
89347  *
89348  * if flags & PyBUF_ND:
89349  */
89350  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__230, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 520, __pyx_L1_error)
89351  __Pyx_GOTREF(__pyx_t_3);
89352  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
89353  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
89354  __PYX_ERR(1, 520, __pyx_L1_error)
89355 
89356  /* "View.MemoryView":519
89357  * @cname('getbuffer')
89358  * def __getbuffer__(self, Py_buffer *info, int flags):
89359  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
89360  * raise ValueError("Cannot create writable memory view from read-only memoryview")
89361  *
89362  */
89363  }
89364 
89365  /* "View.MemoryView":522
89366  * raise ValueError("Cannot create writable memory view from read-only memoryview")
89367  *
89368  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
89369  * info.shape = self.view.shape
89370  * else:
89371  */
89372  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
89373  if (__pyx_t_1) {
89374 
89375  /* "View.MemoryView":523
89376  *
89377  * if flags & PyBUF_ND:
89378  * info.shape = self.view.shape # <<<<<<<<<<<<<<
89379  * else:
89380  * info.shape = NULL
89381  */
89382  __pyx_t_4 = __pyx_v_self->view.shape;
89383  __pyx_v_info->shape = __pyx_t_4;
89384 
89385  /* "View.MemoryView":522
89386  * raise ValueError("Cannot create writable memory view from read-only memoryview")
89387  *
89388  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
89389  * info.shape = self.view.shape
89390  * else:
89391  */
89392  goto __pyx_L6;
89393  }
89394 
89395  /* "View.MemoryView":525
89396  * info.shape = self.view.shape
89397  * else:
89398  * info.shape = NULL # <<<<<<<<<<<<<<
89399  *
89400  * if flags & PyBUF_STRIDES:
89401  */
89402  /*else*/ {
89403  __pyx_v_info->shape = NULL;
89404  }
89405  __pyx_L6:;
89406 
89407  /* "View.MemoryView":527
89408  * info.shape = NULL
89409  *
89410  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
89411  * info.strides = self.view.strides
89412  * else:
89413  */
89414  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
89415  if (__pyx_t_1) {
89416 
89417  /* "View.MemoryView":528
89418  *
89419  * if flags & PyBUF_STRIDES:
89420  * info.strides = self.view.strides # <<<<<<<<<<<<<<
89421  * else:
89422  * info.strides = NULL
89423  */
89424  __pyx_t_4 = __pyx_v_self->view.strides;
89425  __pyx_v_info->strides = __pyx_t_4;
89426 
89427  /* "View.MemoryView":527
89428  * info.shape = NULL
89429  *
89430  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
89431  * info.strides = self.view.strides
89432  * else:
89433  */
89434  goto __pyx_L7;
89435  }
89436 
89437  /* "View.MemoryView":530
89438  * info.strides = self.view.strides
89439  * else:
89440  * info.strides = NULL # <<<<<<<<<<<<<<
89441  *
89442  * if flags & PyBUF_INDIRECT:
89443  */
89444  /*else*/ {
89445  __pyx_v_info->strides = NULL;
89446  }
89447  __pyx_L7:;
89448 
89449  /* "View.MemoryView":532
89450  * info.strides = NULL
89451  *
89452  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
89453  * info.suboffsets = self.view.suboffsets
89454  * else:
89455  */
89456  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
89457  if (__pyx_t_1) {
89458 
89459  /* "View.MemoryView":533
89460  *
89461  * if flags & PyBUF_INDIRECT:
89462  * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
89463  * else:
89464  * info.suboffsets = NULL
89465  */
89466  __pyx_t_4 = __pyx_v_self->view.suboffsets;
89467  __pyx_v_info->suboffsets = __pyx_t_4;
89468 
89469  /* "View.MemoryView":532
89470  * info.strides = NULL
89471  *
89472  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
89473  * info.suboffsets = self.view.suboffsets
89474  * else:
89475  */
89476  goto __pyx_L8;
89477  }
89478 
89479  /* "View.MemoryView":535
89480  * info.suboffsets = self.view.suboffsets
89481  * else:
89482  * info.suboffsets = NULL # <<<<<<<<<<<<<<
89483  *
89484  * if flags & PyBUF_FORMAT:
89485  */
89486  /*else*/ {
89487  __pyx_v_info->suboffsets = NULL;
89488  }
89489  __pyx_L8:;
89490 
89491  /* "View.MemoryView":537
89492  * info.suboffsets = NULL
89493  *
89494  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
89495  * info.format = self.view.format
89496  * else:
89497  */
89498  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
89499  if (__pyx_t_1) {
89500 
89501  /* "View.MemoryView":538
89502  *
89503  * if flags & PyBUF_FORMAT:
89504  * info.format = self.view.format # <<<<<<<<<<<<<<
89505  * else:
89506  * info.format = NULL
89507  */
89508  __pyx_t_5 = __pyx_v_self->view.format;
89509  __pyx_v_info->format = __pyx_t_5;
89510 
89511  /* "View.MemoryView":537
89512  * info.suboffsets = NULL
89513  *
89514  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
89515  * info.format = self.view.format
89516  * else:
89517  */
89518  goto __pyx_L9;
89519  }
89520 
89521  /* "View.MemoryView":540
89522  * info.format = self.view.format
89523  * else:
89524  * info.format = NULL # <<<<<<<<<<<<<<
89525  *
89526  * info.buf = self.view.buf
89527  */
89528  /*else*/ {
89529  __pyx_v_info->format = NULL;
89530  }
89531  __pyx_L9:;
89532 
89533  /* "View.MemoryView":542
89534  * info.format = NULL
89535  *
89536  * info.buf = self.view.buf # <<<<<<<<<<<<<<
89537  * info.ndim = self.view.ndim
89538  * info.itemsize = self.view.itemsize
89539  */
89540  __pyx_t_6 = __pyx_v_self->view.buf;
89541  __pyx_v_info->buf = __pyx_t_6;
89542 
89543  /* "View.MemoryView":543
89544  *
89545  * info.buf = self.view.buf
89546  * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
89547  * info.itemsize = self.view.itemsize
89548  * info.len = self.view.len
89549  */
89550  __pyx_t_7 = __pyx_v_self->view.ndim;
89551  __pyx_v_info->ndim = __pyx_t_7;
89552 
89553  /* "View.MemoryView":544
89554  * info.buf = self.view.buf
89555  * info.ndim = self.view.ndim
89556  * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
89557  * info.len = self.view.len
89558  * info.readonly = self.view.readonly
89559  */
89560  __pyx_t_8 = __pyx_v_self->view.itemsize;
89561  __pyx_v_info->itemsize = __pyx_t_8;
89562 
89563  /* "View.MemoryView":545
89564  * info.ndim = self.view.ndim
89565  * info.itemsize = self.view.itemsize
89566  * info.len = self.view.len # <<<<<<<<<<<<<<
89567  * info.readonly = self.view.readonly
89568  * info.obj = self
89569  */
89570  __pyx_t_8 = __pyx_v_self->view.len;
89571  __pyx_v_info->len = __pyx_t_8;
89572 
89573  /* "View.MemoryView":546
89574  * info.itemsize = self.view.itemsize
89575  * info.len = self.view.len
89576  * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
89577  * info.obj = self
89578  *
89579  */
89580  __pyx_t_1 = __pyx_v_self->view.readonly;
89581  __pyx_v_info->readonly = __pyx_t_1;
89582 
89583  /* "View.MemoryView":547
89584  * info.len = self.view.len
89585  * info.readonly = self.view.readonly
89586  * info.obj = self # <<<<<<<<<<<<<<
89587  *
89588  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
89589  */
89590  __Pyx_INCREF(((PyObject *)__pyx_v_self));
89591  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
89592  __Pyx_GOTREF(__pyx_v_info->obj);
89593  __Pyx_DECREF(__pyx_v_info->obj);
89594  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
89595 
89596  /* "View.MemoryView":518
89597  *
89598  * @cname('getbuffer')
89599  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
89600  * if flags & PyBUF_WRITABLE and self.view.readonly:
89601  * raise ValueError("Cannot create writable memory view from read-only memoryview")
89602  */
89603 
89604  /* function exit code */
89605  __pyx_r = 0;
89606  goto __pyx_L0;
89607  __pyx_L1_error:;
89608  __Pyx_XDECREF(__pyx_t_3);
89609  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
89610  __pyx_r = -1;
89611  if (__pyx_v_info->obj != NULL) {
89612  __Pyx_GOTREF(__pyx_v_info->obj);
89613  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
89614  }
89615  goto __pyx_L2;
89616  __pyx_L0:;
89617  if (__pyx_v_info->obj == Py_None) {
89618  __Pyx_GOTREF(__pyx_v_info->obj);
89619  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
89620  }
89621  __pyx_L2:;
89622  __Pyx_TraceReturn(Py_None, 0);
89623  __Pyx_RefNannyFinishContext();
89624  return __pyx_r;
89625 }
89626 
89627 /* "View.MemoryView":553
89628  *
89629  * @property
89630  * def T(self): # <<<<<<<<<<<<<<
89631  * cdef _memoryviewslice result = memoryview_copy(self)
89632  * transpose_memslice(&result.from_slice)
89633  */
89634 
89635 /* Python wrapper */
89636 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
89637 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
89638  PyObject *__pyx_r = 0;
89639  __Pyx_RefNannyDeclarations
89640  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
89641  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
89642 
89643  /* function exit code */
89644  __Pyx_RefNannyFinishContext();
89645  return __pyx_r;
89646 }
89647 
89648 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
89649  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
89650  PyObject *__pyx_r = NULL;
89651  __Pyx_TraceDeclarations
89652  __Pyx_RefNannyDeclarations
89653  PyObject *__pyx_t_1 = NULL;
89654  int __pyx_t_2;
89655  int __pyx_lineno = 0;
89656  const char *__pyx_filename = NULL;
89657  int __pyx_clineno = 0;
89658  __Pyx_RefNannySetupContext("__get__", 0);
89659  __Pyx_TraceCall("__get__", __pyx_f[1], 553, 0, __PYX_ERR(1, 553, __pyx_L1_error));
89660 
89661  /* "View.MemoryView":554
89662  * @property
89663  * def T(self):
89664  * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
89665  * transpose_memslice(&result.from_slice)
89666  * return result
89667  */
89668  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 554, __pyx_L1_error)
89669  __Pyx_GOTREF(__pyx_t_1);
89670  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(1, 554, __pyx_L1_error)
89671  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
89672  __pyx_t_1 = 0;
89673 
89674  /* "View.MemoryView":555
89675  * def T(self):
89676  * cdef _memoryviewslice result = memoryview_copy(self)
89677  * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
89678  * return result
89679  *
89680  */
89681  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 555, __pyx_L1_error)
89682 
89683  /* "View.MemoryView":556
89684  * cdef _memoryviewslice result = memoryview_copy(self)
89685  * transpose_memslice(&result.from_slice)
89686  * return result # <<<<<<<<<<<<<<
89687  *
89688  * @property
89689  */
89690  __Pyx_XDECREF(__pyx_r);
89691  __Pyx_INCREF(((PyObject *)__pyx_v_result));
89692  __pyx_r = ((PyObject *)__pyx_v_result);
89693  goto __pyx_L0;
89694 
89695  /* "View.MemoryView":553
89696  *
89697  * @property
89698  * def T(self): # <<<<<<<<<<<<<<
89699  * cdef _memoryviewslice result = memoryview_copy(self)
89700  * transpose_memslice(&result.from_slice)
89701  */
89702 
89703  /* function exit code */
89704  __pyx_L1_error:;
89705  __Pyx_XDECREF(__pyx_t_1);
89706  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
89707  __pyx_r = NULL;
89708  __pyx_L0:;
89709  __Pyx_XDECREF((PyObject *)__pyx_v_result);
89710  __Pyx_XGIVEREF(__pyx_r);
89711  __Pyx_TraceReturn(__pyx_r, 0);
89712  __Pyx_RefNannyFinishContext();
89713  return __pyx_r;
89714 }
89715 
89716 /* "View.MemoryView":559
89717  *
89718  * @property
89719  * def base(self): # <<<<<<<<<<<<<<
89720  * return self.obj
89721  *
89722  */
89723 
89724 /* Python wrapper */
89725 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
89726 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
89727  PyObject *__pyx_r = 0;
89728  __Pyx_RefNannyDeclarations
89729  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
89730  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
89731 
89732  /* function exit code */
89733  __Pyx_RefNannyFinishContext();
89734  return __pyx_r;
89735 }
89736 
89737 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
89738  PyObject *__pyx_r = NULL;
89739  __Pyx_TraceDeclarations
89740  __Pyx_RefNannyDeclarations
89741  int __pyx_lineno = 0;
89742  const char *__pyx_filename = NULL;
89743  int __pyx_clineno = 0;
89744  __Pyx_RefNannySetupContext("__get__", 0);
89745  __Pyx_TraceCall("__get__", __pyx_f[1], 559, 0, __PYX_ERR(1, 559, __pyx_L1_error));
89746 
89747  /* "View.MemoryView":560
89748  * @property
89749  * def base(self):
89750  * return self.obj # <<<<<<<<<<<<<<
89751  *
89752  * @property
89753  */
89754  __Pyx_XDECREF(__pyx_r);
89755  __Pyx_INCREF(__pyx_v_self->obj);
89756  __pyx_r = __pyx_v_self->obj;
89757  goto __pyx_L0;
89758 
89759  /* "View.MemoryView":559
89760  *
89761  * @property
89762  * def base(self): # <<<<<<<<<<<<<<
89763  * return self.obj
89764  *
89765  */
89766 
89767  /* function exit code */
89768  __pyx_L1_error:;
89769  __Pyx_AddTraceback("View.MemoryView.memoryview.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
89770  __pyx_r = NULL;
89771  __pyx_L0:;
89772  __Pyx_XGIVEREF(__pyx_r);
89773  __Pyx_TraceReturn(__pyx_r, 0);
89774  __Pyx_RefNannyFinishContext();
89775  return __pyx_r;
89776 }
89777 
89778 /* "View.MemoryView":563
89779  *
89780  * @property
89781  * def shape(self): # <<<<<<<<<<<<<<
89782  * return tuple([length for length in self.view.shape[:self.view.ndim]])
89783  *
89784  */
89785 
89786 /* Python wrapper */
89787 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
89788 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
89789  PyObject *__pyx_r = 0;
89790  __Pyx_RefNannyDeclarations
89791  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
89792  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
89793 
89794  /* function exit code */
89795  __Pyx_RefNannyFinishContext();
89796  return __pyx_r;
89797 }
89798 
89799 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
89800  Py_ssize_t __pyx_v_length;
89801  PyObject *__pyx_r = NULL;
89802  __Pyx_TraceDeclarations
89803  __Pyx_RefNannyDeclarations
89804  PyObject *__pyx_t_1 = NULL;
89805  Py_ssize_t *__pyx_t_2;
89806  Py_ssize_t *__pyx_t_3;
89807  Py_ssize_t *__pyx_t_4;
89808  PyObject *__pyx_t_5 = NULL;
89809  int __pyx_lineno = 0;
89810  const char *__pyx_filename = NULL;
89811  int __pyx_clineno = 0;
89812  __Pyx_RefNannySetupContext("__get__", 0);
89813  __Pyx_TraceCall("__get__", __pyx_f[1], 563, 0, __PYX_ERR(1, 563, __pyx_L1_error));
89814 
89815  /* "View.MemoryView":564
89816  * @property
89817  * def shape(self):
89818  * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
89819  *
89820  * @property
89821  */
89822  __Pyx_XDECREF(__pyx_r);
89823  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 564, __pyx_L1_error)
89824  __Pyx_GOTREF(__pyx_t_1);
89825  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
89826  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
89827  __pyx_t_2 = __pyx_t_4;
89828  __pyx_v_length = (__pyx_t_2[0]);
89829  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 564, __pyx_L1_error)
89830  __Pyx_GOTREF(__pyx_t_5);
89831  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 564, __pyx_L1_error)
89832  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
89833  }
89834  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 564, __pyx_L1_error)
89835  __Pyx_GOTREF(__pyx_t_5);
89836  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
89837  __pyx_r = __pyx_t_5;
89838  __pyx_t_5 = 0;
89839  goto __pyx_L0;
89840 
89841  /* "View.MemoryView":563
89842  *
89843  * @property
89844  * def shape(self): # <<<<<<<<<<<<<<
89845  * return tuple([length for length in self.view.shape[:self.view.ndim]])
89846  *
89847  */
89848 
89849  /* function exit code */
89850  __pyx_L1_error:;
89851  __Pyx_XDECREF(__pyx_t_1);
89852  __Pyx_XDECREF(__pyx_t_5);
89853  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
89854  __pyx_r = NULL;
89855  __pyx_L0:;
89856  __Pyx_XGIVEREF(__pyx_r);
89857  __Pyx_TraceReturn(__pyx_r, 0);
89858  __Pyx_RefNannyFinishContext();
89859  return __pyx_r;
89860 }
89861 
89862 /* "View.MemoryView":567
89863  *
89864  * @property
89865  * def strides(self): # <<<<<<<<<<<<<<
89866  * if self.view.strides == NULL:
89867  *
89868  */
89869 
89870 /* Python wrapper */
89871 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
89872 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
89873  PyObject *__pyx_r = 0;
89874  __Pyx_RefNannyDeclarations
89875  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
89876  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
89877 
89878  /* function exit code */
89879  __Pyx_RefNannyFinishContext();
89880  return __pyx_r;
89881 }
89882 
89883 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
89884  Py_ssize_t __pyx_v_stride;
89885  PyObject *__pyx_r = NULL;
89886  __Pyx_TraceDeclarations
89887  __Pyx_RefNannyDeclarations
89888  int __pyx_t_1;
89889  PyObject *__pyx_t_2 = NULL;
89890  Py_ssize_t *__pyx_t_3;
89891  Py_ssize_t *__pyx_t_4;
89892  Py_ssize_t *__pyx_t_5;
89893  PyObject *__pyx_t_6 = NULL;
89894  int __pyx_lineno = 0;
89895  const char *__pyx_filename = NULL;
89896  int __pyx_clineno = 0;
89897  __Pyx_RefNannySetupContext("__get__", 0);
89898  __Pyx_TraceCall("__get__", __pyx_f[1], 567, 0, __PYX_ERR(1, 567, __pyx_L1_error));
89899 
89900  /* "View.MemoryView":568
89901  * @property
89902  * def strides(self):
89903  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
89904  *
89905  * raise ValueError("Buffer view does not expose strides")
89906  */
89907  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
89908  if (unlikely(__pyx_t_1)) {
89909 
89910  /* "View.MemoryView":570
89911  * if self.view.strides == NULL:
89912  *
89913  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
89914  *
89915  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
89916  */
89917  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__231, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 570, __pyx_L1_error)
89918  __Pyx_GOTREF(__pyx_t_2);
89919  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
89920  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
89921  __PYX_ERR(1, 570, __pyx_L1_error)
89922 
89923  /* "View.MemoryView":568
89924  * @property
89925  * def strides(self):
89926  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
89927  *
89928  * raise ValueError("Buffer view does not expose strides")
89929  */
89930  }
89931 
89932  /* "View.MemoryView":572
89933  * raise ValueError("Buffer view does not expose strides")
89934  *
89935  * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
89936  *
89937  * @property
89938  */
89939  __Pyx_XDECREF(__pyx_r);
89940  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 572, __pyx_L1_error)
89941  __Pyx_GOTREF(__pyx_t_2);
89942  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
89943  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
89944  __pyx_t_3 = __pyx_t_5;
89945  __pyx_v_stride = (__pyx_t_3[0]);
89946  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 572, __pyx_L1_error)
89947  __Pyx_GOTREF(__pyx_t_6);
89948  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(1, 572, __pyx_L1_error)
89949  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
89950  }
89951  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 572, __pyx_L1_error)
89952  __Pyx_GOTREF(__pyx_t_6);
89953  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
89954  __pyx_r = __pyx_t_6;
89955  __pyx_t_6 = 0;
89956  goto __pyx_L0;
89957 
89958  /* "View.MemoryView":567
89959  *
89960  * @property
89961  * def strides(self): # <<<<<<<<<<<<<<
89962  * if self.view.strides == NULL:
89963  *
89964  */
89965 
89966  /* function exit code */
89967  __pyx_L1_error:;
89968  __Pyx_XDECREF(__pyx_t_2);
89969  __Pyx_XDECREF(__pyx_t_6);
89970  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
89971  __pyx_r = NULL;
89972  __pyx_L0:;
89973  __Pyx_XGIVEREF(__pyx_r);
89974  __Pyx_TraceReturn(__pyx_r, 0);
89975  __Pyx_RefNannyFinishContext();
89976  return __pyx_r;
89977 }
89978 
89979 /* "View.MemoryView":575
89980  *
89981  * @property
89982  * def suboffsets(self): # <<<<<<<<<<<<<<
89983  * if self.view.suboffsets == NULL:
89984  * return (-1,) * self.view.ndim
89985  */
89986 
89987 /* Python wrapper */
89988 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
89989 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
89990  PyObject *__pyx_r = 0;
89991  __Pyx_RefNannyDeclarations
89992  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
89993  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
89994 
89995  /* function exit code */
89996  __Pyx_RefNannyFinishContext();
89997  return __pyx_r;
89998 }
89999 
90000 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
90001  Py_ssize_t __pyx_v_suboffset;
90002  PyObject *__pyx_r = NULL;
90003  __Pyx_TraceDeclarations
90004  __Pyx_RefNannyDeclarations
90005  int __pyx_t_1;
90006  PyObject *__pyx_t_2 = NULL;
90007  PyObject *__pyx_t_3 = NULL;
90008  Py_ssize_t *__pyx_t_4;
90009  Py_ssize_t *__pyx_t_5;
90010  Py_ssize_t *__pyx_t_6;
90011  int __pyx_lineno = 0;
90012  const char *__pyx_filename = NULL;
90013  int __pyx_clineno = 0;
90014  __Pyx_RefNannySetupContext("__get__", 0);
90015  __Pyx_TraceCall("__get__", __pyx_f[1], 575, 0, __PYX_ERR(1, 575, __pyx_L1_error));
90016 
90017  /* "View.MemoryView":576
90018  * @property
90019  * def suboffsets(self):
90020  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
90021  * return (-1,) * self.view.ndim
90022  *
90023  */
90024  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
90025  if (__pyx_t_1) {
90026 
90027  /* "View.MemoryView":577
90028  * def suboffsets(self):
90029  * if self.view.suboffsets == NULL:
90030  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
90031  *
90032  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
90033  */
90034  __Pyx_XDECREF(__pyx_r);
90035  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error)
90036  __Pyx_GOTREF(__pyx_t_2);
90037  __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__232, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 577, __pyx_L1_error)
90038  __Pyx_GOTREF(__pyx_t_3);
90039  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
90040  __pyx_r = __pyx_t_3;
90041  __pyx_t_3 = 0;
90042  goto __pyx_L0;
90043 
90044  /* "View.MemoryView":576
90045  * @property
90046  * def suboffsets(self):
90047  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
90048  * return (-1,) * self.view.ndim
90049  *
90050  */
90051  }
90052 
90053  /* "View.MemoryView":579
90054  * return (-1,) * self.view.ndim
90055  *
90056  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
90057  *
90058  * @property
90059  */
90060  __Pyx_XDECREF(__pyx_r);
90061  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 579, __pyx_L1_error)
90062  __Pyx_GOTREF(__pyx_t_3);
90063  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
90064  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
90065  __pyx_t_4 = __pyx_t_6;
90066  __pyx_v_suboffset = (__pyx_t_4[0]);
90067  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)
90068  __Pyx_GOTREF(__pyx_t_2);
90069  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(1, 579, __pyx_L1_error)
90070  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
90071  }
90072  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 579, __pyx_L1_error)
90073  __Pyx_GOTREF(__pyx_t_2);
90074  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90075  __pyx_r = __pyx_t_2;
90076  __pyx_t_2 = 0;
90077  goto __pyx_L0;
90078 
90079  /* "View.MemoryView":575
90080  *
90081  * @property
90082  * def suboffsets(self): # <<<<<<<<<<<<<<
90083  * if self.view.suboffsets == NULL:
90084  * return (-1,) * self.view.ndim
90085  */
90086 
90087  /* function exit code */
90088  __pyx_L1_error:;
90089  __Pyx_XDECREF(__pyx_t_2);
90090  __Pyx_XDECREF(__pyx_t_3);
90091  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90092  __pyx_r = NULL;
90093  __pyx_L0:;
90094  __Pyx_XGIVEREF(__pyx_r);
90095  __Pyx_TraceReturn(__pyx_r, 0);
90096  __Pyx_RefNannyFinishContext();
90097  return __pyx_r;
90098 }
90099 
90100 /* "View.MemoryView":582
90101  *
90102  * @property
90103  * def ndim(self): # <<<<<<<<<<<<<<
90104  * return self.view.ndim
90105  *
90106  */
90107 
90108 /* Python wrapper */
90109 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
90110 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
90111  PyObject *__pyx_r = 0;
90112  __Pyx_RefNannyDeclarations
90113  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
90114  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
90115 
90116  /* function exit code */
90117  __Pyx_RefNannyFinishContext();
90118  return __pyx_r;
90119 }
90120 
90121 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
90122  PyObject *__pyx_r = NULL;
90123  __Pyx_TraceDeclarations
90124  __Pyx_RefNannyDeclarations
90125  PyObject *__pyx_t_1 = NULL;
90126  int __pyx_lineno = 0;
90127  const char *__pyx_filename = NULL;
90128  int __pyx_clineno = 0;
90129  __Pyx_RefNannySetupContext("__get__", 0);
90130  __Pyx_TraceCall("__get__", __pyx_f[1], 582, 0, __PYX_ERR(1, 582, __pyx_L1_error));
90131 
90132  /* "View.MemoryView":583
90133  * @property
90134  * def ndim(self):
90135  * return self.view.ndim # <<<<<<<<<<<<<<
90136  *
90137  * @property
90138  */
90139  __Pyx_XDECREF(__pyx_r);
90140  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 583, __pyx_L1_error)
90141  __Pyx_GOTREF(__pyx_t_1);
90142  __pyx_r = __pyx_t_1;
90143  __pyx_t_1 = 0;
90144  goto __pyx_L0;
90145 
90146  /* "View.MemoryView":582
90147  *
90148  * @property
90149  * def ndim(self): # <<<<<<<<<<<<<<
90150  * return self.view.ndim
90151  *
90152  */
90153 
90154  /* function exit code */
90155  __pyx_L1_error:;
90156  __Pyx_XDECREF(__pyx_t_1);
90157  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90158  __pyx_r = NULL;
90159  __pyx_L0:;
90160  __Pyx_XGIVEREF(__pyx_r);
90161  __Pyx_TraceReturn(__pyx_r, 0);
90162  __Pyx_RefNannyFinishContext();
90163  return __pyx_r;
90164 }
90165 
90166 /* "View.MemoryView":586
90167  *
90168  * @property
90169  * def itemsize(self): # <<<<<<<<<<<<<<
90170  * return self.view.itemsize
90171  *
90172  */
90173 
90174 /* Python wrapper */
90175 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
90176 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
90177  PyObject *__pyx_r = 0;
90178  __Pyx_RefNannyDeclarations
90179  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
90180  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
90181 
90182  /* function exit code */
90183  __Pyx_RefNannyFinishContext();
90184  return __pyx_r;
90185 }
90186 
90187 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
90188  PyObject *__pyx_r = NULL;
90189  __Pyx_TraceDeclarations
90190  __Pyx_RefNannyDeclarations
90191  PyObject *__pyx_t_1 = NULL;
90192  int __pyx_lineno = 0;
90193  const char *__pyx_filename = NULL;
90194  int __pyx_clineno = 0;
90195  __Pyx_RefNannySetupContext("__get__", 0);
90196  __Pyx_TraceCall("__get__", __pyx_f[1], 586, 0, __PYX_ERR(1, 586, __pyx_L1_error));
90197 
90198  /* "View.MemoryView":587
90199  * @property
90200  * def itemsize(self):
90201  * return self.view.itemsize # <<<<<<<<<<<<<<
90202  *
90203  * @property
90204  */
90205  __Pyx_XDECREF(__pyx_r);
90206  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 587, __pyx_L1_error)
90207  __Pyx_GOTREF(__pyx_t_1);
90208  __pyx_r = __pyx_t_1;
90209  __pyx_t_1 = 0;
90210  goto __pyx_L0;
90211 
90212  /* "View.MemoryView":586
90213  *
90214  * @property
90215  * def itemsize(self): # <<<<<<<<<<<<<<
90216  * return self.view.itemsize
90217  *
90218  */
90219 
90220  /* function exit code */
90221  __pyx_L1_error:;
90222  __Pyx_XDECREF(__pyx_t_1);
90223  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90224  __pyx_r = NULL;
90225  __pyx_L0:;
90226  __Pyx_XGIVEREF(__pyx_r);
90227  __Pyx_TraceReturn(__pyx_r, 0);
90228  __Pyx_RefNannyFinishContext();
90229  return __pyx_r;
90230 }
90231 
90232 /* "View.MemoryView":590
90233  *
90234  * @property
90235  * def nbytes(self): # <<<<<<<<<<<<<<
90236  * return self.size * self.view.itemsize
90237  *
90238  */
90239 
90240 /* Python wrapper */
90241 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
90242 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
90243  PyObject *__pyx_r = 0;
90244  __Pyx_RefNannyDeclarations
90245  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
90246  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
90247 
90248  /* function exit code */
90249  __Pyx_RefNannyFinishContext();
90250  return __pyx_r;
90251 }
90252 
90253 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
90254  PyObject *__pyx_r = NULL;
90255  __Pyx_TraceDeclarations
90256  __Pyx_RefNannyDeclarations
90257  PyObject *__pyx_t_1 = NULL;
90258  PyObject *__pyx_t_2 = NULL;
90259  PyObject *__pyx_t_3 = NULL;
90260  int __pyx_lineno = 0;
90261  const char *__pyx_filename = NULL;
90262  int __pyx_clineno = 0;
90263  __Pyx_RefNannySetupContext("__get__", 0);
90264  __Pyx_TraceCall("__get__", __pyx_f[1], 590, 0, __PYX_ERR(1, 590, __pyx_L1_error));
90265 
90266  /* "View.MemoryView":591
90267  * @property
90268  * def nbytes(self):
90269  * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
90270  *
90271  * @property
90272  */
90273  __Pyx_XDECREF(__pyx_r);
90274  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 591, __pyx_L1_error)
90275  __Pyx_GOTREF(__pyx_t_1);
90276  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 591, __pyx_L1_error)
90277  __Pyx_GOTREF(__pyx_t_2);
90278  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 591, __pyx_L1_error)
90279  __Pyx_GOTREF(__pyx_t_3);
90280  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90281  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
90282  __pyx_r = __pyx_t_3;
90283  __pyx_t_3 = 0;
90284  goto __pyx_L0;
90285 
90286  /* "View.MemoryView":590
90287  *
90288  * @property
90289  * def nbytes(self): # <<<<<<<<<<<<<<
90290  * return self.size * self.view.itemsize
90291  *
90292  */
90293 
90294  /* function exit code */
90295  __pyx_L1_error:;
90296  __Pyx_XDECREF(__pyx_t_1);
90297  __Pyx_XDECREF(__pyx_t_2);
90298  __Pyx_XDECREF(__pyx_t_3);
90299  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90300  __pyx_r = NULL;
90301  __pyx_L0:;
90302  __Pyx_XGIVEREF(__pyx_r);
90303  __Pyx_TraceReturn(__pyx_r, 0);
90304  __Pyx_RefNannyFinishContext();
90305  return __pyx_r;
90306 }
90307 
90308 /* "View.MemoryView":594
90309  *
90310  * @property
90311  * def size(self): # <<<<<<<<<<<<<<
90312  * if self._size is None:
90313  * result = 1
90314  */
90315 
90316 /* Python wrapper */
90317 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
90318 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
90319  PyObject *__pyx_r = 0;
90320  __Pyx_RefNannyDeclarations
90321  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
90322  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
90323 
90324  /* function exit code */
90325  __Pyx_RefNannyFinishContext();
90326  return __pyx_r;
90327 }
90328 
90329 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
90330  PyObject *__pyx_v_result = NULL;
90331  PyObject *__pyx_v_length = NULL;
90332  PyObject *__pyx_r = NULL;
90333  __Pyx_TraceDeclarations
90334  __Pyx_RefNannyDeclarations
90335  int __pyx_t_1;
90336  int __pyx_t_2;
90337  Py_ssize_t *__pyx_t_3;
90338  Py_ssize_t *__pyx_t_4;
90339  Py_ssize_t *__pyx_t_5;
90340  PyObject *__pyx_t_6 = NULL;
90341  int __pyx_lineno = 0;
90342  const char *__pyx_filename = NULL;
90343  int __pyx_clineno = 0;
90344  __Pyx_RefNannySetupContext("__get__", 0);
90345  __Pyx_TraceCall("__get__", __pyx_f[1], 594, 0, __PYX_ERR(1, 594, __pyx_L1_error));
90346 
90347  /* "View.MemoryView":595
90348  * @property
90349  * def size(self):
90350  * if self._size is None: # <<<<<<<<<<<<<<
90351  * result = 1
90352  *
90353  */
90354  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
90355  __pyx_t_2 = (__pyx_t_1 != 0);
90356  if (__pyx_t_2) {
90357 
90358  /* "View.MemoryView":596
90359  * def size(self):
90360  * if self._size is None:
90361  * result = 1 # <<<<<<<<<<<<<<
90362  *
90363  * for length in self.view.shape[:self.view.ndim]:
90364  */
90365  __Pyx_INCREF(__pyx_int_1);
90366  __pyx_v_result = __pyx_int_1;
90367 
90368  /* "View.MemoryView":598
90369  * result = 1
90370  *
90371  * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
90372  * result *= length
90373  *
90374  */
90375  __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
90376  for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
90377  __pyx_t_3 = __pyx_t_5;
90378  __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 598, __pyx_L1_error)
90379  __Pyx_GOTREF(__pyx_t_6);
90380  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
90381  __pyx_t_6 = 0;
90382 
90383  /* "View.MemoryView":599
90384  *
90385  * for length in self.view.shape[:self.view.ndim]:
90386  * result *= length # <<<<<<<<<<<<<<
90387  *
90388  * self._size = result
90389  */
90390  __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 599, __pyx_L1_error)
90391  __Pyx_GOTREF(__pyx_t_6);
90392  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
90393  __pyx_t_6 = 0;
90394  }
90395 
90396  /* "View.MemoryView":601
90397  * result *= length
90398  *
90399  * self._size = result # <<<<<<<<<<<<<<
90400  *
90401  * return self._size
90402  */
90403  __Pyx_INCREF(__pyx_v_result);
90404  __Pyx_GIVEREF(__pyx_v_result);
90405  __Pyx_GOTREF(__pyx_v_self->_size);
90406  __Pyx_DECREF(__pyx_v_self->_size);
90407  __pyx_v_self->_size = __pyx_v_result;
90408 
90409  /* "View.MemoryView":595
90410  * @property
90411  * def size(self):
90412  * if self._size is None: # <<<<<<<<<<<<<<
90413  * result = 1
90414  *
90415  */
90416  }
90417 
90418  /* "View.MemoryView":603
90419  * self._size = result
90420  *
90421  * return self._size # <<<<<<<<<<<<<<
90422  *
90423  * def __len__(self):
90424  */
90425  __Pyx_XDECREF(__pyx_r);
90426  __Pyx_INCREF(__pyx_v_self->_size);
90427  __pyx_r = __pyx_v_self->_size;
90428  goto __pyx_L0;
90429 
90430  /* "View.MemoryView":594
90431  *
90432  * @property
90433  * def size(self): # <<<<<<<<<<<<<<
90434  * if self._size is None:
90435  * result = 1
90436  */
90437 
90438  /* function exit code */
90439  __pyx_L1_error:;
90440  __Pyx_XDECREF(__pyx_t_6);
90441  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90442  __pyx_r = NULL;
90443  __pyx_L0:;
90444  __Pyx_XDECREF(__pyx_v_result);
90445  __Pyx_XDECREF(__pyx_v_length);
90446  __Pyx_XGIVEREF(__pyx_r);
90447  __Pyx_TraceReturn(__pyx_r, 0);
90448  __Pyx_RefNannyFinishContext();
90449  return __pyx_r;
90450 }
90451 
90452 /* "View.MemoryView":605
90453  * return self._size
90454  *
90455  * def __len__(self): # <<<<<<<<<<<<<<
90456  * if self.view.ndim >= 1:
90457  * return self.view.shape[0]
90458  */
90459 
90460 /* Python wrapper */
90461 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
90462 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
90463  Py_ssize_t __pyx_r;
90464  __Pyx_RefNannyDeclarations
90465  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
90466  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
90467 
90468  /* function exit code */
90469  __Pyx_RefNannyFinishContext();
90470  return __pyx_r;
90471 }
90472 
90473 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
90474  Py_ssize_t __pyx_r;
90475  __Pyx_TraceDeclarations
90476  __Pyx_RefNannyDeclarations
90477  int __pyx_t_1;
90478  int __pyx_lineno = 0;
90479  const char *__pyx_filename = NULL;
90480  int __pyx_clineno = 0;
90481  __Pyx_RefNannySetupContext("__len__", 0);
90482  __Pyx_TraceCall("__len__", __pyx_f[1], 605, 0, __PYX_ERR(1, 605, __pyx_L1_error));
90483 
90484  /* "View.MemoryView":606
90485  *
90486  * def __len__(self):
90487  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
90488  * return self.view.shape[0]
90489  *
90490  */
90491  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
90492  if (__pyx_t_1) {
90493 
90494  /* "View.MemoryView":607
90495  * def __len__(self):
90496  * if self.view.ndim >= 1:
90497  * return self.view.shape[0] # <<<<<<<<<<<<<<
90498  *
90499  * return 0
90500  */
90501  __pyx_r = (__pyx_v_self->view.shape[0]);
90502  goto __pyx_L0;
90503 
90504  /* "View.MemoryView":606
90505  *
90506  * def __len__(self):
90507  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
90508  * return self.view.shape[0]
90509  *
90510  */
90511  }
90512 
90513  /* "View.MemoryView":609
90514  * return self.view.shape[0]
90515  *
90516  * return 0 # <<<<<<<<<<<<<<
90517  *
90518  * def __repr__(self):
90519  */
90520  __pyx_r = 0;
90521  goto __pyx_L0;
90522 
90523  /* "View.MemoryView":605
90524  * return self._size
90525  *
90526  * def __len__(self): # <<<<<<<<<<<<<<
90527  * if self.view.ndim >= 1:
90528  * return self.view.shape[0]
90529  */
90530 
90531  /* function exit code */
90532  __pyx_L1_error:;
90533  __Pyx_AddTraceback("View.MemoryView.memoryview.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90534  __pyx_r = -1;
90535  __pyx_L0:;
90536  __Pyx_TraceReturn(Py_None, 0);
90537  __Pyx_RefNannyFinishContext();
90538  return __pyx_r;
90539 }
90540 
90541 /* "View.MemoryView":611
90542  * return 0
90543  *
90544  * def __repr__(self): # <<<<<<<<<<<<<<
90545  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
90546  * id(self))
90547  */
90548 
90549 /* Python wrapper */
90550 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
90551 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
90552  PyObject *__pyx_r = 0;
90553  __Pyx_RefNannyDeclarations
90554  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
90555  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
90556 
90557  /* function exit code */
90558  __Pyx_RefNannyFinishContext();
90559  return __pyx_r;
90560 }
90561 
90562 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
90563  PyObject *__pyx_r = NULL;
90564  __Pyx_TraceDeclarations
90565  __Pyx_RefNannyDeclarations
90566  PyObject *__pyx_t_1 = NULL;
90567  PyObject *__pyx_t_2 = NULL;
90568  PyObject *__pyx_t_3 = NULL;
90569  int __pyx_lineno = 0;
90570  const char *__pyx_filename = NULL;
90571  int __pyx_clineno = 0;
90572  __Pyx_RefNannySetupContext("__repr__", 0);
90573  __Pyx_TraceCall("__repr__", __pyx_f[1], 611, 0, __PYX_ERR(1, 611, __pyx_L1_error));
90574 
90575  /* "View.MemoryView":612
90576  *
90577  * def __repr__(self):
90578  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
90579  * id(self))
90580  *
90581  */
90582  __Pyx_XDECREF(__pyx_r);
90583  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
90584  __Pyx_GOTREF(__pyx_t_1);
90585  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
90586  __Pyx_GOTREF(__pyx_t_2);
90587  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90588  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 612, __pyx_L1_error)
90589  __Pyx_GOTREF(__pyx_t_1);
90590  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
90591 
90592  /* "View.MemoryView":613
90593  * def __repr__(self):
90594  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
90595  * id(self)) # <<<<<<<<<<<<<<
90596  *
90597  * def __str__(self):
90598  */
90599  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 613, __pyx_L1_error)
90600  __Pyx_GOTREF(__pyx_t_2);
90601 
90602  /* "View.MemoryView":612
90603  *
90604  * def __repr__(self):
90605  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
90606  * id(self))
90607  *
90608  */
90609  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 612, __pyx_L1_error)
90610  __Pyx_GOTREF(__pyx_t_3);
90611  __Pyx_GIVEREF(__pyx_t_1);
90612  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
90613  __Pyx_GIVEREF(__pyx_t_2);
90614  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
90615  __pyx_t_1 = 0;
90616  __pyx_t_2 = 0;
90617  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 612, __pyx_L1_error)
90618  __Pyx_GOTREF(__pyx_t_2);
90619  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
90620  __pyx_r = __pyx_t_2;
90621  __pyx_t_2 = 0;
90622  goto __pyx_L0;
90623 
90624  /* "View.MemoryView":611
90625  * return 0
90626  *
90627  * def __repr__(self): # <<<<<<<<<<<<<<
90628  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
90629  * id(self))
90630  */
90631 
90632  /* function exit code */
90633  __pyx_L1_error:;
90634  __Pyx_XDECREF(__pyx_t_1);
90635  __Pyx_XDECREF(__pyx_t_2);
90636  __Pyx_XDECREF(__pyx_t_3);
90637  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90638  __pyx_r = NULL;
90639  __pyx_L0:;
90640  __Pyx_XGIVEREF(__pyx_r);
90641  __Pyx_TraceReturn(__pyx_r, 0);
90642  __Pyx_RefNannyFinishContext();
90643  return __pyx_r;
90644 }
90645 
90646 /* "View.MemoryView":615
90647  * id(self))
90648  *
90649  * def __str__(self): # <<<<<<<<<<<<<<
90650  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
90651  *
90652  */
90653 
90654 /* Python wrapper */
90655 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
90656 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
90657  PyObject *__pyx_r = 0;
90658  __Pyx_RefNannyDeclarations
90659  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
90660  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
90661 
90662  /* function exit code */
90663  __Pyx_RefNannyFinishContext();
90664  return __pyx_r;
90665 }
90666 
90667 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
90668  PyObject *__pyx_r = NULL;
90669  __Pyx_TraceDeclarations
90670  __Pyx_RefNannyDeclarations
90671  PyObject *__pyx_t_1 = NULL;
90672  PyObject *__pyx_t_2 = NULL;
90673  int __pyx_lineno = 0;
90674  const char *__pyx_filename = NULL;
90675  int __pyx_clineno = 0;
90676  __Pyx_RefNannySetupContext("__str__", 0);
90677  __Pyx_TraceCall("__str__", __pyx_f[1], 615, 0, __PYX_ERR(1, 615, __pyx_L1_error));
90678 
90679  /* "View.MemoryView":616
90680  *
90681  * def __str__(self):
90682  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
90683  *
90684  *
90685  */
90686  __Pyx_XDECREF(__pyx_r);
90687  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 616, __pyx_L1_error)
90688  __Pyx_GOTREF(__pyx_t_1);
90689  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 616, __pyx_L1_error)
90690  __Pyx_GOTREF(__pyx_t_2);
90691  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
90692  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 616, __pyx_L1_error)
90693  __Pyx_GOTREF(__pyx_t_1);
90694  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
90695  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 616, __pyx_L1_error)
90696  __Pyx_GOTREF(__pyx_t_2);
90697  __Pyx_GIVEREF(__pyx_t_1);
90698  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
90699  __pyx_t_1 = 0;
90700  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 616, __pyx_L1_error)
90701  __Pyx_GOTREF(__pyx_t_1);
90702  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
90703  __pyx_r = __pyx_t_1;
90704  __pyx_t_1 = 0;
90705  goto __pyx_L0;
90706 
90707  /* "View.MemoryView":615
90708  * id(self))
90709  *
90710  * def __str__(self): # <<<<<<<<<<<<<<
90711  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
90712  *
90713  */
90714 
90715  /* function exit code */
90716  __pyx_L1_error:;
90717  __Pyx_XDECREF(__pyx_t_1);
90718  __Pyx_XDECREF(__pyx_t_2);
90719  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
90720  __pyx_r = NULL;
90721  __pyx_L0:;
90722  __Pyx_XGIVEREF(__pyx_r);
90723  __Pyx_TraceReturn(__pyx_r, 0);
90724  __Pyx_RefNannyFinishContext();
90725  return __pyx_r;
90726 }
90727 
90728 /* "View.MemoryView":619
90729  *
90730  *
90731  * def is_c_contig(self): # <<<<<<<<<<<<<<
90732  * cdef __Pyx_memviewslice *mslice
90733  * cdef __Pyx_memviewslice tmp
90734  */
90735 
90736 /* Python wrapper */
90737 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
90738 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_17is_c_contig = {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0};
90739 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
90740  PyObject *__pyx_r = 0;
90741  __Pyx_RefNannyDeclarations
90742  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
90743  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
90744 
90745  /* function exit code */
90746  __Pyx_RefNannyFinishContext();
90747  return __pyx_r;
90748 }
90749 
90750 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
90751  __Pyx_memviewslice *__pyx_v_mslice;
90752  __Pyx_memviewslice __pyx_v_tmp;
90753  PyObject *__pyx_r = NULL;
90754  __Pyx_TraceDeclarations
90755  __Pyx_RefNannyDeclarations
90756  __Pyx_memviewslice *__pyx_t_1;
90757  PyObject *__pyx_t_2 = NULL;
90758  int __pyx_lineno = 0;
90759  const char *__pyx_filename = NULL;
90760  int __pyx_clineno = 0;
90761  __Pyx_RefNannySetupContext("is_c_contig", 0);
90762  __Pyx_TraceCall("is_c_contig", __pyx_f[1], 619, 0, __PYX_ERR(1, 619, __pyx_L1_error));
90763 
90764  /* "View.MemoryView":622
90765  * cdef __Pyx_memviewslice *mslice
90766  * cdef __Pyx_memviewslice tmp
90767  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
90768  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
90769  *
90770  */
90771  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 622, __pyx_L1_error)
90772  __pyx_v_mslice = __pyx_t_1;
90773 
90774  /* "View.MemoryView":623
90775  * cdef __Pyx_memviewslice tmp
90776  * mslice = get_slice_from_memview(self, &tmp)
90777  * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
90778  *
90779  * def is_f_contig(self):
90780  */
90781  __Pyx_XDECREF(__pyx_r);
90782  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 623, __pyx_L1_error)
90783  __Pyx_GOTREF(__pyx_t_2);
90784  __pyx_r = __pyx_t_2;
90785  __pyx_t_2 = 0;
90786  goto __pyx_L0;
90787 
90788  /* "View.MemoryView":619
90789  *
90790  *
90791  * def is_c_contig(self): # <<<<<<<<<<<<<<
90792  * cdef __Pyx_memviewslice *mslice
90793  * cdef __Pyx_memviewslice tmp
90794  */
90795 
90796  /* function exit code */
90797  __pyx_L1_error:;
90798  __Pyx_XDECREF(__pyx_t_2);
90799  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
90800  __pyx_r = NULL;
90801  __pyx_L0:;
90802  __Pyx_XGIVEREF(__pyx_r);
90803  __Pyx_TraceReturn(__pyx_r, 0);
90804  __Pyx_RefNannyFinishContext();
90805  return __pyx_r;
90806 }
90807 
90808 /* "View.MemoryView":625
90809  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
90810  *
90811  * def is_f_contig(self): # <<<<<<<<<<<<<<
90812  * cdef __Pyx_memviewslice *mslice
90813  * cdef __Pyx_memviewslice tmp
90814  */
90815 
90816 /* Python wrapper */
90817 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
90818 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_19is_f_contig = {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0};
90819 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
90820  PyObject *__pyx_r = 0;
90821  __Pyx_RefNannyDeclarations
90822  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
90823  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
90824 
90825  /* function exit code */
90826  __Pyx_RefNannyFinishContext();
90827  return __pyx_r;
90828 }
90829 
90830 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
90831  __Pyx_memviewslice *__pyx_v_mslice;
90832  __Pyx_memviewslice __pyx_v_tmp;
90833  PyObject *__pyx_r = NULL;
90834  __Pyx_TraceDeclarations
90835  __Pyx_RefNannyDeclarations
90836  __Pyx_memviewslice *__pyx_t_1;
90837  PyObject *__pyx_t_2 = NULL;
90838  int __pyx_lineno = 0;
90839  const char *__pyx_filename = NULL;
90840  int __pyx_clineno = 0;
90841  __Pyx_RefNannySetupContext("is_f_contig", 0);
90842  __Pyx_TraceCall("is_f_contig", __pyx_f[1], 625, 0, __PYX_ERR(1, 625, __pyx_L1_error));
90843 
90844  /* "View.MemoryView":628
90845  * cdef __Pyx_memviewslice *mslice
90846  * cdef __Pyx_memviewslice tmp
90847  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
90848  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
90849  *
90850  */
90851  __pyx_t_1 = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp)); if (unlikely(__pyx_t_1 == ((__Pyx_memviewslice *)NULL))) __PYX_ERR(1, 628, __pyx_L1_error)
90852  __pyx_v_mslice = __pyx_t_1;
90853 
90854  /* "View.MemoryView":629
90855  * cdef __Pyx_memviewslice tmp
90856  * mslice = get_slice_from_memview(self, &tmp)
90857  * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
90858  *
90859  * def copy(self):
90860  */
90861  __Pyx_XDECREF(__pyx_r);
90862  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 629, __pyx_L1_error)
90863  __Pyx_GOTREF(__pyx_t_2);
90864  __pyx_r = __pyx_t_2;
90865  __pyx_t_2 = 0;
90866  goto __pyx_L0;
90867 
90868  /* "View.MemoryView":625
90869  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
90870  *
90871  * def is_f_contig(self): # <<<<<<<<<<<<<<
90872  * cdef __Pyx_memviewslice *mslice
90873  * cdef __Pyx_memviewslice tmp
90874  */
90875 
90876  /* function exit code */
90877  __pyx_L1_error:;
90878  __Pyx_XDECREF(__pyx_t_2);
90879  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
90880  __pyx_r = NULL;
90881  __pyx_L0:;
90882  __Pyx_XGIVEREF(__pyx_r);
90883  __Pyx_TraceReturn(__pyx_r, 0);
90884  __Pyx_RefNannyFinishContext();
90885  return __pyx_r;
90886 }
90887 
90888 /* "View.MemoryView":631
90889  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
90890  *
90891  * def copy(self): # <<<<<<<<<<<<<<
90892  * cdef __Pyx_memviewslice mslice
90893  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
90894  */
90895 
90896 /* Python wrapper */
90897 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
90898 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_21copy = {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0};
90899 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
90900  PyObject *__pyx_r = 0;
90901  __Pyx_RefNannyDeclarations
90902  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
90903  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
90904 
90905  /* function exit code */
90906  __Pyx_RefNannyFinishContext();
90907  return __pyx_r;
90908 }
90909 
90910 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
90911  __Pyx_memviewslice __pyx_v_mslice;
90912  int __pyx_v_flags;
90913  PyObject *__pyx_r = NULL;
90914  __Pyx_TraceDeclarations
90915  __Pyx_RefNannyDeclarations
90916  __Pyx_memviewslice __pyx_t_1;
90917  PyObject *__pyx_t_2 = NULL;
90918  int __pyx_lineno = 0;
90919  const char *__pyx_filename = NULL;
90920  int __pyx_clineno = 0;
90921  __Pyx_RefNannySetupContext("copy", 0);
90922  __Pyx_TraceCall("copy", __pyx_f[1], 631, 0, __PYX_ERR(1, 631, __pyx_L1_error));
90923 
90924  /* "View.MemoryView":633
90925  * def copy(self):
90926  * cdef __Pyx_memviewslice mslice
90927  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
90928  *
90929  * slice_copy(self, &mslice)
90930  */
90931  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
90932 
90933  /* "View.MemoryView":635
90934  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
90935  *
90936  * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
90937  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
90938  * self.view.itemsize,
90939  */
90940  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
90941 
90942  /* "View.MemoryView":636
90943  *
90944  * slice_copy(self, &mslice)
90945  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
90946  * self.view.itemsize,
90947  * flags|PyBUF_C_CONTIGUOUS,
90948  */
90949  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 636, __pyx_L1_error)
90950  __pyx_v_mslice = __pyx_t_1;
90951 
90952  /* "View.MemoryView":641
90953  * self.dtype_is_object)
90954  *
90955  * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
90956  *
90957  * def copy_fortran(self):
90958  */
90959  __Pyx_XDECREF(__pyx_r);
90960  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 641, __pyx_L1_error)
90961  __Pyx_GOTREF(__pyx_t_2);
90962  __pyx_r = __pyx_t_2;
90963  __pyx_t_2 = 0;
90964  goto __pyx_L0;
90965 
90966  /* "View.MemoryView":631
90967  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
90968  *
90969  * def copy(self): # <<<<<<<<<<<<<<
90970  * cdef __Pyx_memviewslice mslice
90971  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
90972  */
90973 
90974  /* function exit code */
90975  __pyx_L1_error:;
90976  __Pyx_XDECREF(__pyx_t_2);
90977  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
90978  __pyx_r = NULL;
90979  __pyx_L0:;
90980  __Pyx_XGIVEREF(__pyx_r);
90981  __Pyx_TraceReturn(__pyx_r, 0);
90982  __Pyx_RefNannyFinishContext();
90983  return __pyx_r;
90984 }
90985 
90986 /* "View.MemoryView":643
90987  * return memoryview_copy_from_slice(self, &mslice)
90988  *
90989  * def copy_fortran(self): # <<<<<<<<<<<<<<
90990  * cdef __Pyx_memviewslice src, dst
90991  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
90992  */
90993 
90994 /* Python wrapper */
90995 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
90996 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_10memoryview_23copy_fortran = {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0};
90997 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
90998  PyObject *__pyx_r = 0;
90999  __Pyx_RefNannyDeclarations
91000  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
91001  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
91002 
91003  /* function exit code */
91004  __Pyx_RefNannyFinishContext();
91005  return __pyx_r;
91006 }
91007 
91008 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
91009  __Pyx_memviewslice __pyx_v_src;
91010  __Pyx_memviewslice __pyx_v_dst;
91011  int __pyx_v_flags;
91012  PyObject *__pyx_r = NULL;
91013  __Pyx_TraceDeclarations
91014  __Pyx_RefNannyDeclarations
91015  __Pyx_memviewslice __pyx_t_1;
91016  PyObject *__pyx_t_2 = NULL;
91017  int __pyx_lineno = 0;
91018  const char *__pyx_filename = NULL;
91019  int __pyx_clineno = 0;
91020  __Pyx_RefNannySetupContext("copy_fortran", 0);
91021  __Pyx_TraceCall("copy_fortran", __pyx_f[1], 643, 0, __PYX_ERR(1, 643, __pyx_L1_error));
91022 
91023  /* "View.MemoryView":645
91024  * def copy_fortran(self):
91025  * cdef __Pyx_memviewslice src, dst
91026  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
91027  *
91028  * slice_copy(self, &src)
91029  */
91030  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
91031 
91032  /* "View.MemoryView":647
91033  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
91034  *
91035  * slice_copy(self, &src) # <<<<<<<<<<<<<<
91036  * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
91037  * self.view.itemsize,
91038  */
91039  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
91040 
91041  /* "View.MemoryView":648
91042  *
91043  * slice_copy(self, &src)
91044  * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
91045  * self.view.itemsize,
91046  * flags|PyBUF_F_CONTIGUOUS,
91047  */
91048  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 648, __pyx_L1_error)
91049  __pyx_v_dst = __pyx_t_1;
91050 
91051  /* "View.MemoryView":653
91052  * self.dtype_is_object)
91053  *
91054  * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
91055  *
91056  *
91057  */
91058  __Pyx_XDECREF(__pyx_r);
91059  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 653, __pyx_L1_error)
91060  __Pyx_GOTREF(__pyx_t_2);
91061  __pyx_r = __pyx_t_2;
91062  __pyx_t_2 = 0;
91063  goto __pyx_L0;
91064 
91065  /* "View.MemoryView":643
91066  * return memoryview_copy_from_slice(self, &mslice)
91067  *
91068  * def copy_fortran(self): # <<<<<<<<<<<<<<
91069  * cdef __Pyx_memviewslice src, dst
91070  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
91071  */
91072 
91073  /* function exit code */
91074  __pyx_L1_error:;
91075  __Pyx_XDECREF(__pyx_t_2);
91076  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
91077  __pyx_r = NULL;
91078  __pyx_L0:;
91079  __Pyx_XGIVEREF(__pyx_r);
91080  __Pyx_TraceReturn(__pyx_r, 0);
91081  __Pyx_RefNannyFinishContext();
91082  return __pyx_r;
91083 }
91084 
91085 /* "(tree fragment)":1
91086  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
91087  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91088  * def __setstate_cython__(self, __pyx_state):
91089  */
91090 
91091 /* Python wrapper */
91092 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
91093 static PyMethodDef __pyx_mdef___pyx_memoryview_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0};
91094 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
91095  PyObject *__pyx_r = 0;
91096  __Pyx_RefNannyDeclarations
91097  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
91098  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
91099 
91100  /* function exit code */
91101  __Pyx_RefNannyFinishContext();
91102  return __pyx_r;
91103 }
91104 
91105 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
91106  PyObject *__pyx_r = NULL;
91107  __Pyx_TraceDeclarations
91108  __Pyx_RefNannyDeclarations
91109  PyObject *__pyx_t_1 = NULL;
91110  int __pyx_lineno = 0;
91111  const char *__pyx_filename = NULL;
91112  int __pyx_clineno = 0;
91113  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
91114  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
91115 
91116  /* "(tree fragment)":2
91117  * def __reduce_cython__(self):
91118  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
91119  * def __setstate_cython__(self, __pyx_state):
91120  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91121  */
91122  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__233, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
91123  __Pyx_GOTREF(__pyx_t_1);
91124  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
91125  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91126  __PYX_ERR(1, 2, __pyx_L1_error)
91127 
91128  /* "(tree fragment)":1
91129  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
91130  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91131  * def __setstate_cython__(self, __pyx_state):
91132  */
91133 
91134  /* function exit code */
91135  __pyx_L1_error:;
91136  __Pyx_XDECREF(__pyx_t_1);
91137  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
91138  __pyx_r = NULL;
91139  __Pyx_XGIVEREF(__pyx_r);
91140  __Pyx_TraceReturn(__pyx_r, 0);
91141  __Pyx_RefNannyFinishContext();
91142  return __pyx_r;
91143 }
91144 
91145 /* "(tree fragment)":3
91146  * def __reduce_cython__(self):
91147  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91148  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
91149  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91150  */
91151 
91152 /* Python wrapper */
91153 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
91154 static PyMethodDef __pyx_mdef___pyx_memoryview_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0};
91155 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
91156  PyObject *__pyx_r = 0;
91157  __Pyx_RefNannyDeclarations
91158  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
91159  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
91160 
91161  /* function exit code */
91162  __Pyx_RefNannyFinishContext();
91163  return __pyx_r;
91164 }
91165 
91166 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
91167  PyObject *__pyx_r = NULL;
91168  __Pyx_TraceDeclarations
91169  __Pyx_RefNannyDeclarations
91170  PyObject *__pyx_t_1 = NULL;
91171  int __pyx_lineno = 0;
91172  const char *__pyx_filename = NULL;
91173  int __pyx_clineno = 0;
91174  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
91175  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
91176 
91177  /* "(tree fragment)":4
91178  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91179  * def __setstate_cython__(self, __pyx_state):
91180  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
91181  */
91182  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__234, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
91183  __Pyx_GOTREF(__pyx_t_1);
91184  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
91185  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
91186  __PYX_ERR(1, 4, __pyx_L1_error)
91187 
91188  /* "(tree fragment)":3
91189  * def __reduce_cython__(self):
91190  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91191  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
91192  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
91193  */
91194 
91195  /* function exit code */
91196  __pyx_L1_error:;
91197  __Pyx_XDECREF(__pyx_t_1);
91198  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
91199  __pyx_r = NULL;
91200  __Pyx_XGIVEREF(__pyx_r);
91201  __Pyx_TraceReturn(__pyx_r, 0);
91202  __Pyx_RefNannyFinishContext();
91203  return __pyx_r;
91204 }
91205 
91206 /* "View.MemoryView":657
91207  *
91208  * @cname('__pyx_memoryview_new')
91209  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
91210  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
91211  * result.typeinfo = typeinfo
91212  */
91213 
91214 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
91215  struct __pyx_memoryview_obj *__pyx_v_result = 0;
91216  PyObject *__pyx_r = NULL;
91217  __Pyx_TraceDeclarations
91218  __Pyx_RefNannyDeclarations
91219  PyObject *__pyx_t_1 = NULL;
91220  PyObject *__pyx_t_2 = NULL;
91221  PyObject *__pyx_t_3 = NULL;
91222  int __pyx_lineno = 0;
91223  const char *__pyx_filename = NULL;
91224  int __pyx_clineno = 0;
91225  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
91226  __Pyx_TraceCall("memoryview_cwrapper", __pyx_f[1], 657, 0, __PYX_ERR(1, 657, __pyx_L1_error));
91227 
91228  /* "View.MemoryView":658
91229  * @cname('__pyx_memoryview_new')
91230  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
91231  * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
91232  * result.typeinfo = typeinfo
91233  * return result
91234  */
91235  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 658, __pyx_L1_error)
91236  __Pyx_GOTREF(__pyx_t_1);
91237  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
91238  __Pyx_GOTREF(__pyx_t_2);
91239  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 658, __pyx_L1_error)
91240  __Pyx_GOTREF(__pyx_t_3);
91241  __Pyx_INCREF(__pyx_v_o);
91242  __Pyx_GIVEREF(__pyx_v_o);
91243  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
91244  __Pyx_GIVEREF(__pyx_t_1);
91245  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
91246  __Pyx_GIVEREF(__pyx_t_2);
91247  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
91248  __pyx_t_1 = 0;
91249  __pyx_t_2 = 0;
91250  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 658, __pyx_L1_error)
91251  __Pyx_GOTREF(__pyx_t_2);
91252  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91253  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
91254  __pyx_t_2 = 0;
91255 
91256  /* "View.MemoryView":659
91257  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
91258  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
91259  * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
91260  * return result
91261  *
91262  */
91263  __pyx_v_result->typeinfo = __pyx_v_typeinfo;
91264 
91265  /* "View.MemoryView":660
91266  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
91267  * result.typeinfo = typeinfo
91268  * return result # <<<<<<<<<<<<<<
91269  *
91270  * @cname('__pyx_memoryview_check')
91271  */
91272  __Pyx_XDECREF(__pyx_r);
91273  __Pyx_INCREF(((PyObject *)__pyx_v_result));
91274  __pyx_r = ((PyObject *)__pyx_v_result);
91275  goto __pyx_L0;
91276 
91277  /* "View.MemoryView":657
91278  *
91279  * @cname('__pyx_memoryview_new')
91280  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
91281  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
91282  * result.typeinfo = typeinfo
91283  */
91284 
91285  /* function exit code */
91286  __pyx_L1_error:;
91287  __Pyx_XDECREF(__pyx_t_1);
91288  __Pyx_XDECREF(__pyx_t_2);
91289  __Pyx_XDECREF(__pyx_t_3);
91290  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
91291  __pyx_r = 0;
91292  __pyx_L0:;
91293  __Pyx_XDECREF((PyObject *)__pyx_v_result);
91294  __Pyx_XGIVEREF(__pyx_r);
91295  __Pyx_TraceReturn(__pyx_r, 0);
91296  __Pyx_RefNannyFinishContext();
91297  return __pyx_r;
91298 }
91299 
91300 /* "View.MemoryView":663
91301  *
91302  * @cname('__pyx_memoryview_check')
91303  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
91304  * return isinstance(o, memoryview)
91305  *
91306  */
91307 
91308 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
91309  int __pyx_r;
91310  __Pyx_TraceDeclarations
91311  __Pyx_RefNannyDeclarations
91312  int __pyx_t_1;
91313  int __pyx_lineno = 0;
91314  const char *__pyx_filename = NULL;
91315  int __pyx_clineno = 0;
91316  __Pyx_RefNannySetupContext("memoryview_check", 0);
91317  __Pyx_TraceCall("memoryview_check", __pyx_f[1], 663, 0, __PYX_ERR(1, 663, __pyx_L1_error));
91318 
91319  /* "View.MemoryView":664
91320  * @cname('__pyx_memoryview_check')
91321  * cdef inline bint memoryview_check(object o):
91322  * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
91323  *
91324  * cdef tuple _unellipsify(object index, int ndim):
91325  */
91326  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
91327  __pyx_r = __pyx_t_1;
91328  goto __pyx_L0;
91329 
91330  /* "View.MemoryView":663
91331  *
91332  * @cname('__pyx_memoryview_check')
91333  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
91334  * return isinstance(o, memoryview)
91335  *
91336  */
91337 
91338  /* function exit code */
91339  __pyx_L1_error:;
91340  __Pyx_WriteUnraisable("View.MemoryView.memoryview_check", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
91341  __pyx_r = 0;
91342  __pyx_L0:;
91343  __Pyx_TraceReturn(Py_None, 0);
91344  __Pyx_RefNannyFinishContext();
91345  return __pyx_r;
91346 }
91347 
91348 /* "View.MemoryView":666
91349  * return isinstance(o, memoryview)
91350  *
91351  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
91352  * """
91353  * Replace all ellipses with full slices and fill incomplete indices with
91354  */
91355 
91356 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
91357  PyObject *__pyx_v_tup = NULL;
91358  PyObject *__pyx_v_result = NULL;
91359  int __pyx_v_have_slices;
91360  int __pyx_v_seen_ellipsis;
91361  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
91362  PyObject *__pyx_v_item = NULL;
91363  Py_ssize_t __pyx_v_nslices;
91364  PyObject *__pyx_r = NULL;
91365  __Pyx_TraceDeclarations
91366  __Pyx_RefNannyDeclarations
91367  int __pyx_t_1;
91368  int __pyx_t_2;
91369  PyObject *__pyx_t_3 = NULL;
91370  PyObject *__pyx_t_4 = NULL;
91371  Py_ssize_t __pyx_t_5;
91372  PyObject *(*__pyx_t_6)(PyObject *);
91373  PyObject *__pyx_t_7 = NULL;
91374  Py_ssize_t __pyx_t_8;
91375  int __pyx_t_9;
91376  int __pyx_t_10;
91377  PyObject *__pyx_t_11 = NULL;
91378  int __pyx_lineno = 0;
91379  const char *__pyx_filename = NULL;
91380  int __pyx_clineno = 0;
91381  __Pyx_RefNannySetupContext("_unellipsify", 0);
91382  __Pyx_TraceCall("_unellipsify", __pyx_f[1], 666, 0, __PYX_ERR(1, 666, __pyx_L1_error));
91383 
91384  /* "View.MemoryView":671
91385  * full slices.
91386  * """
91387  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
91388  * tup = (index,)
91389  * else:
91390  */
91391  __pyx_t_1 = PyTuple_Check(__pyx_v_index);
91392  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
91393  if (__pyx_t_2) {
91394 
91395  /* "View.MemoryView":672
91396  * """
91397  * if not isinstance(index, tuple):
91398  * tup = (index,) # <<<<<<<<<<<<<<
91399  * else:
91400  * tup = index
91401  */
91402  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 672, __pyx_L1_error)
91403  __Pyx_GOTREF(__pyx_t_3);
91404  __Pyx_INCREF(__pyx_v_index);
91405  __Pyx_GIVEREF(__pyx_v_index);
91406  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
91407  __pyx_v_tup = __pyx_t_3;
91408  __pyx_t_3 = 0;
91409 
91410  /* "View.MemoryView":671
91411  * full slices.
91412  * """
91413  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
91414  * tup = (index,)
91415  * else:
91416  */
91417  goto __pyx_L3;
91418  }
91419 
91420  /* "View.MemoryView":674
91421  * tup = (index,)
91422  * else:
91423  * tup = index # <<<<<<<<<<<<<<
91424  *
91425  * result = []
91426  */
91427  /*else*/ {
91428  __Pyx_INCREF(__pyx_v_index);
91429  __pyx_v_tup = __pyx_v_index;
91430  }
91431  __pyx_L3:;
91432 
91433  /* "View.MemoryView":676
91434  * tup = index
91435  *
91436  * result = [] # <<<<<<<<<<<<<<
91437  * have_slices = False
91438  * seen_ellipsis = False
91439  */
91440  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 676, __pyx_L1_error)
91441  __Pyx_GOTREF(__pyx_t_3);
91442  __pyx_v_result = ((PyObject*)__pyx_t_3);
91443  __pyx_t_3 = 0;
91444 
91445  /* "View.MemoryView":677
91446  *
91447  * result = []
91448  * have_slices = False # <<<<<<<<<<<<<<
91449  * seen_ellipsis = False
91450  * for idx, item in enumerate(tup):
91451  */
91452  __pyx_v_have_slices = 0;
91453 
91454  /* "View.MemoryView":678
91455  * result = []
91456  * have_slices = False
91457  * seen_ellipsis = False # <<<<<<<<<<<<<<
91458  * for idx, item in enumerate(tup):
91459  * if item is Ellipsis:
91460  */
91461  __pyx_v_seen_ellipsis = 0;
91462 
91463  /* "View.MemoryView":679
91464  * have_slices = False
91465  * seen_ellipsis = False
91466  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
91467  * if item is Ellipsis:
91468  * if not seen_ellipsis:
91469  */
91470  __Pyx_INCREF(__pyx_int_0);
91471  __pyx_t_3 = __pyx_int_0;
91472  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
91473  __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
91474  __pyx_t_6 = NULL;
91475  } else {
91476  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 679, __pyx_L1_error)
91477  __Pyx_GOTREF(__pyx_t_4);
91478  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 679, __pyx_L1_error)
91479  }
91480  for (;;) {
91481  if (likely(!__pyx_t_6)) {
91482  if (likely(PyList_CheckExact(__pyx_t_4))) {
91483  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
91484  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
91485  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 679, __pyx_L1_error)
91486  #else
91487  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 679, __pyx_L1_error)
91488  __Pyx_GOTREF(__pyx_t_7);
91489  #endif
91490  } else {
91491  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
91492  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
91493  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(1, 679, __pyx_L1_error)
91494  #else
91495  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 679, __pyx_L1_error)
91496  __Pyx_GOTREF(__pyx_t_7);
91497  #endif
91498  }
91499  } else {
91500  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
91501  if (unlikely(!__pyx_t_7)) {
91502  PyObject* exc_type = PyErr_Occurred();
91503  if (exc_type) {
91504  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
91505  else __PYX_ERR(1, 679, __pyx_L1_error)
91506  }
91507  break;
91508  }
91509  __Pyx_GOTREF(__pyx_t_7);
91510  }
91511  __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
91512  __pyx_t_7 = 0;
91513  __Pyx_INCREF(__pyx_t_3);
91514  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
91515  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 679, __pyx_L1_error)
91516  __Pyx_GOTREF(__pyx_t_7);
91517  __Pyx_DECREF(__pyx_t_3);
91518  __pyx_t_3 = __pyx_t_7;
91519  __pyx_t_7 = 0;
91520 
91521  /* "View.MemoryView":680
91522  * seen_ellipsis = False
91523  * for idx, item in enumerate(tup):
91524  * if item is Ellipsis: # <<<<<<<<<<<<<<
91525  * if not seen_ellipsis:
91526  * result.extend([slice(None)] * (ndim - len(tup) + 1))
91527  */
91528  __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
91529  __pyx_t_1 = (__pyx_t_2 != 0);
91530  if (__pyx_t_1) {
91531 
91532  /* "View.MemoryView":681
91533  * for idx, item in enumerate(tup):
91534  * if item is Ellipsis:
91535  * if not seen_ellipsis: # <<<<<<<<<<<<<<
91536  * result.extend([slice(None)] * (ndim - len(tup) + 1))
91537  * seen_ellipsis = True
91538  */
91539  __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
91540  if (__pyx_t_1) {
91541 
91542  /* "View.MemoryView":682
91543  * if item is Ellipsis:
91544  * if not seen_ellipsis:
91545  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
91546  * seen_ellipsis = True
91547  * else:
91548  */
91549  __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(1, 682, __pyx_L1_error)
91550  __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 682, __pyx_L1_error)
91551  __Pyx_GOTREF(__pyx_t_7);
91552  { Py_ssize_t __pyx_temp;
91553  for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
91554  __Pyx_INCREF(__pyx_slice__30);
91555  __Pyx_GIVEREF(__pyx_slice__30);
91556  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__30);
91557  }
91558  }
91559  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 682, __pyx_L1_error)
91560  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
91561 
91562  /* "View.MemoryView":683
91563  * if not seen_ellipsis:
91564  * result.extend([slice(None)] * (ndim - len(tup) + 1))
91565  * seen_ellipsis = True # <<<<<<<<<<<<<<
91566  * else:
91567  * result.append(slice(None))
91568  */
91569  __pyx_v_seen_ellipsis = 1;
91570 
91571  /* "View.MemoryView":681
91572  * for idx, item in enumerate(tup):
91573  * if item is Ellipsis:
91574  * if not seen_ellipsis: # <<<<<<<<<<<<<<
91575  * result.extend([slice(None)] * (ndim - len(tup) + 1))
91576  * seen_ellipsis = True
91577  */
91578  goto __pyx_L7;
91579  }
91580 
91581  /* "View.MemoryView":685
91582  * seen_ellipsis = True
91583  * else:
91584  * result.append(slice(None)) # <<<<<<<<<<<<<<
91585  * have_slices = True
91586  * else:
91587  */
91588  /*else*/ {
91589  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__30); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 685, __pyx_L1_error)
91590  }
91591  __pyx_L7:;
91592 
91593  /* "View.MemoryView":686
91594  * else:
91595  * result.append(slice(None))
91596  * have_slices = True # <<<<<<<<<<<<<<
91597  * else:
91598  * if not isinstance(item, slice) and not PyIndex_Check(item):
91599  */
91600  __pyx_v_have_slices = 1;
91601 
91602  /* "View.MemoryView":680
91603  * seen_ellipsis = False
91604  * for idx, item in enumerate(tup):
91605  * if item is Ellipsis: # <<<<<<<<<<<<<<
91606  * if not seen_ellipsis:
91607  * result.extend([slice(None)] * (ndim - len(tup) + 1))
91608  */
91609  goto __pyx_L6;
91610  }
91611 
91612  /* "View.MemoryView":688
91613  * have_slices = True
91614  * else:
91615  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
91616  * raise TypeError("Cannot index with type '%s'" % type(item))
91617  *
91618  */
91619  /*else*/ {
91620  __pyx_t_2 = PySlice_Check(__pyx_v_item);
91621  __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
91622  if (__pyx_t_10) {
91623  } else {
91624  __pyx_t_1 = __pyx_t_10;
91625  goto __pyx_L9_bool_binop_done;
91626  }
91627  __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
91628  __pyx_t_1 = __pyx_t_10;
91629  __pyx_L9_bool_binop_done:;
91630  if (unlikely(__pyx_t_1)) {
91631 
91632  /* "View.MemoryView":689
91633  * else:
91634  * if not isinstance(item, slice) and not PyIndex_Check(item):
91635  * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
91636  *
91637  * have_slices = have_slices or isinstance(item, slice)
91638  */
91639  __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 689, __pyx_L1_error)
91640  __Pyx_GOTREF(__pyx_t_7);
91641  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 689, __pyx_L1_error)
91642  __Pyx_GOTREF(__pyx_t_11);
91643  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
91644  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
91645  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
91646  __PYX_ERR(1, 689, __pyx_L1_error)
91647 
91648  /* "View.MemoryView":688
91649  * have_slices = True
91650  * else:
91651  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
91652  * raise TypeError("Cannot index with type '%s'" % type(item))
91653  *
91654  */
91655  }
91656 
91657  /* "View.MemoryView":691
91658  * raise TypeError("Cannot index with type '%s'" % type(item))
91659  *
91660  * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
91661  * result.append(item)
91662  *
91663  */
91664  __pyx_t_10 = (__pyx_v_have_slices != 0);
91665  if (!__pyx_t_10) {
91666  } else {
91667  __pyx_t_1 = __pyx_t_10;
91668  goto __pyx_L11_bool_binop_done;
91669  }
91670  __pyx_t_10 = PySlice_Check(__pyx_v_item);
91671  __pyx_t_2 = (__pyx_t_10 != 0);
91672  __pyx_t_1 = __pyx_t_2;
91673  __pyx_L11_bool_binop_done:;
91674  __pyx_v_have_slices = __pyx_t_1;
91675 
91676  /* "View.MemoryView":692
91677  *
91678  * have_slices = have_slices or isinstance(item, slice)
91679  * result.append(item) # <<<<<<<<<<<<<<
91680  *
91681  * nslices = ndim - len(result)
91682  */
91683  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 692, __pyx_L1_error)
91684  }
91685  __pyx_L6:;
91686 
91687  /* "View.MemoryView":679
91688  * have_slices = False
91689  * seen_ellipsis = False
91690  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
91691  * if item is Ellipsis:
91692  * if not seen_ellipsis:
91693  */
91694  }
91695  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
91696  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91697 
91698  /* "View.MemoryView":694
91699  * result.append(item)
91700  *
91701  * nslices = ndim - len(result) # <<<<<<<<<<<<<<
91702  * if nslices:
91703  * result.extend([slice(None)] * nslices)
91704  */
91705  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(1, 694, __pyx_L1_error)
91706  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
91707 
91708  /* "View.MemoryView":695
91709  *
91710  * nslices = ndim - len(result)
91711  * if nslices: # <<<<<<<<<<<<<<
91712  * result.extend([slice(None)] * nslices)
91713  *
91714  */
91715  __pyx_t_1 = (__pyx_v_nslices != 0);
91716  if (__pyx_t_1) {
91717 
91718  /* "View.MemoryView":696
91719  * nslices = ndim - len(result)
91720  * if nslices:
91721  * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
91722  *
91723  * return have_slices or nslices, tuple(result)
91724  */
91725  __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 696, __pyx_L1_error)
91726  __Pyx_GOTREF(__pyx_t_3);
91727  { Py_ssize_t __pyx_temp;
91728  for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
91729  __Pyx_INCREF(__pyx_slice__30);
91730  __Pyx_GIVEREF(__pyx_slice__30);
91731  PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__30);
91732  }
91733  }
91734  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 696, __pyx_L1_error)
91735  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
91736 
91737  /* "View.MemoryView":695
91738  *
91739  * nslices = ndim - len(result)
91740  * if nslices: # <<<<<<<<<<<<<<
91741  * result.extend([slice(None)] * nslices)
91742  *
91743  */
91744  }
91745 
91746  /* "View.MemoryView":698
91747  * result.extend([slice(None)] * nslices)
91748  *
91749  * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
91750  *
91751  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
91752  */
91753  __Pyx_XDECREF(__pyx_r);
91754  if (!__pyx_v_have_slices) {
91755  } else {
91756  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __pyx_L1_error)
91757  __Pyx_GOTREF(__pyx_t_4);
91758  __pyx_t_3 = __pyx_t_4;
91759  __pyx_t_4 = 0;
91760  goto __pyx_L14_bool_binop_done;
91761  }
91762  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __pyx_L1_error)
91763  __Pyx_GOTREF(__pyx_t_4);
91764  __pyx_t_3 = __pyx_t_4;
91765  __pyx_t_4 = 0;
91766  __pyx_L14_bool_binop_done:;
91767  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 698, __pyx_L1_error)
91768  __Pyx_GOTREF(__pyx_t_4);
91769  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 698, __pyx_L1_error)
91770  __Pyx_GOTREF(__pyx_t_11);
91771  __Pyx_GIVEREF(__pyx_t_3);
91772  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
91773  __Pyx_GIVEREF(__pyx_t_4);
91774  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
91775  __pyx_t_3 = 0;
91776  __pyx_t_4 = 0;
91777  __pyx_r = ((PyObject*)__pyx_t_11);
91778  __pyx_t_11 = 0;
91779  goto __pyx_L0;
91780 
91781  /* "View.MemoryView":666
91782  * return isinstance(o, memoryview)
91783  *
91784  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
91785  * """
91786  * Replace all ellipses with full slices and fill incomplete indices with
91787  */
91788 
91789  /* function exit code */
91790  __pyx_L1_error:;
91791  __Pyx_XDECREF(__pyx_t_3);
91792  __Pyx_XDECREF(__pyx_t_4);
91793  __Pyx_XDECREF(__pyx_t_7);
91794  __Pyx_XDECREF(__pyx_t_11);
91795  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
91796  __pyx_r = 0;
91797  __pyx_L0:;
91798  __Pyx_XDECREF(__pyx_v_tup);
91799  __Pyx_XDECREF(__pyx_v_result);
91800  __Pyx_XDECREF(__pyx_v_idx);
91801  __Pyx_XDECREF(__pyx_v_item);
91802  __Pyx_XGIVEREF(__pyx_r);
91803  __Pyx_TraceReturn(__pyx_r, 0);
91804  __Pyx_RefNannyFinishContext();
91805  return __pyx_r;
91806 }
91807 
91808 /* "View.MemoryView":700
91809  * return have_slices or nslices, tuple(result)
91810  *
91811  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
91812  * for suboffset in suboffsets[:ndim]:
91813  * if suboffset >= 0:
91814  */
91815 
91816 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
91817  Py_ssize_t __pyx_v_suboffset;
91818  PyObject *__pyx_r = NULL;
91819  __Pyx_TraceDeclarations
91820  __Pyx_RefNannyDeclarations
91821  Py_ssize_t *__pyx_t_1;
91822  Py_ssize_t *__pyx_t_2;
91823  Py_ssize_t *__pyx_t_3;
91824  int __pyx_t_4;
91825  PyObject *__pyx_t_5 = NULL;
91826  int __pyx_lineno = 0;
91827  const char *__pyx_filename = NULL;
91828  int __pyx_clineno = 0;
91829  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
91830  __Pyx_TraceCall("assert_direct_dimensions", __pyx_f[1], 700, 0, __PYX_ERR(1, 700, __pyx_L1_error));
91831 
91832  /* "View.MemoryView":701
91833  *
91834  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
91835  * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
91836  * if suboffset >= 0:
91837  * raise ValueError("Indirect dimensions not supported")
91838  */
91839  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
91840  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
91841  __pyx_t_1 = __pyx_t_3;
91842  __pyx_v_suboffset = (__pyx_t_1[0]);
91843 
91844  /* "View.MemoryView":702
91845  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
91846  * for suboffset in suboffsets[:ndim]:
91847  * if suboffset >= 0: # <<<<<<<<<<<<<<
91848  * raise ValueError("Indirect dimensions not supported")
91849  *
91850  */
91851  __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
91852  if (unlikely(__pyx_t_4)) {
91853 
91854  /* "View.MemoryView":703
91855  * for suboffset in suboffsets[:ndim]:
91856  * if suboffset >= 0:
91857  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
91858  *
91859  *
91860  */
91861  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__235, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 703, __pyx_L1_error)
91862  __Pyx_GOTREF(__pyx_t_5);
91863  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
91864  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
91865  __PYX_ERR(1, 703, __pyx_L1_error)
91866 
91867  /* "View.MemoryView":702
91868  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
91869  * for suboffset in suboffsets[:ndim]:
91870  * if suboffset >= 0: # <<<<<<<<<<<<<<
91871  * raise ValueError("Indirect dimensions not supported")
91872  *
91873  */
91874  }
91875  }
91876 
91877  /* "View.MemoryView":700
91878  * return have_slices or nslices, tuple(result)
91879  *
91880  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
91881  * for suboffset in suboffsets[:ndim]:
91882  * if suboffset >= 0:
91883  */
91884 
91885  /* function exit code */
91886  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
91887  goto __pyx_L0;
91888  __pyx_L1_error:;
91889  __Pyx_XDECREF(__pyx_t_5);
91890  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
91891  __pyx_r = 0;
91892  __pyx_L0:;
91893  __Pyx_XGIVEREF(__pyx_r);
91894  __Pyx_TraceReturn(__pyx_r, 0);
91895  __Pyx_RefNannyFinishContext();
91896  return __pyx_r;
91897 }
91898 
91899 /* "View.MemoryView":710
91900  *
91901  * @cname('__pyx_memview_slice')
91902  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
91903  * cdef int new_ndim = 0, suboffset_dim = -1, dim
91904  * cdef bint negative_step
91905  */
91906 
91907 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
91908  int __pyx_v_new_ndim;
91909  int __pyx_v_suboffset_dim;
91910  int __pyx_v_dim;
91911  __Pyx_memviewslice __pyx_v_src;
91912  __Pyx_memviewslice __pyx_v_dst;
91913  __Pyx_memviewslice *__pyx_v_p_src;
91914  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
91915  __Pyx_memviewslice *__pyx_v_p_dst;
91916  int *__pyx_v_p_suboffset_dim;
91917  Py_ssize_t __pyx_v_start;
91918  Py_ssize_t __pyx_v_stop;
91919  Py_ssize_t __pyx_v_step;
91920  int __pyx_v_have_start;
91921  int __pyx_v_have_stop;
91922  int __pyx_v_have_step;
91923  PyObject *__pyx_v_index = NULL;
91924  struct __pyx_memoryview_obj *__pyx_r = NULL;
91925  __Pyx_TraceDeclarations
91926  __Pyx_RefNannyDeclarations
91927  int __pyx_t_1;
91928  int __pyx_t_2;
91929  PyObject *__pyx_t_3 = NULL;
91930  struct __pyx_memoryview_obj *__pyx_t_4;
91931  char *__pyx_t_5;
91932  int __pyx_t_6;
91933  Py_ssize_t __pyx_t_7;
91934  PyObject *(*__pyx_t_8)(PyObject *);
91935  PyObject *__pyx_t_9 = NULL;
91936  Py_ssize_t __pyx_t_10;
91937  int __pyx_t_11;
91938  Py_ssize_t __pyx_t_12;
91939  int __pyx_lineno = 0;
91940  const char *__pyx_filename = NULL;
91941  int __pyx_clineno = 0;
91942  __Pyx_RefNannySetupContext("memview_slice", 0);
91943  __Pyx_TraceCall("memview_slice", __pyx_f[1], 710, 0, __PYX_ERR(1, 710, __pyx_L1_error));
91944 
91945  /* "View.MemoryView":711
91946  * @cname('__pyx_memview_slice')
91947  * cdef memoryview memview_slice(memoryview memview, object indices):
91948  * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
91949  * cdef bint negative_step
91950  * cdef __Pyx_memviewslice src, dst
91951  */
91952  __pyx_v_new_ndim = 0;
91953  __pyx_v_suboffset_dim = -1;
91954 
91955  /* "View.MemoryView":718
91956  *
91957  *
91958  * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
91959  *
91960  * cdef _memoryviewslice memviewsliceobj
91961  */
91962  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
91963 
91964  /* "View.MemoryView":722
91965  * cdef _memoryviewslice memviewsliceobj
91966  *
91967  * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
91968  *
91969  * if isinstance(memview, _memoryviewslice):
91970  */
91971  #ifndef CYTHON_WITHOUT_ASSERTIONS
91972  if (unlikely(!Py_OptimizeFlag)) {
91973  if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
91974  PyErr_SetNone(PyExc_AssertionError);
91975  __PYX_ERR(1, 722, __pyx_L1_error)
91976  }
91977  }
91978  #endif
91979 
91980  /* "View.MemoryView":724
91981  * assert memview.view.ndim > 0
91982  *
91983  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
91984  * memviewsliceobj = memview
91985  * p_src = &memviewsliceobj.from_slice
91986  */
91987  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
91988  __pyx_t_2 = (__pyx_t_1 != 0);
91989  if (__pyx_t_2) {
91990 
91991  /* "View.MemoryView":725
91992  *
91993  * if isinstance(memview, _memoryviewslice):
91994  * memviewsliceobj = memview # <<<<<<<<<<<<<<
91995  * p_src = &memviewsliceobj.from_slice
91996  * else:
91997  */
91998  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 725, __pyx_L1_error)
91999  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
92000  __Pyx_INCREF(__pyx_t_3);
92001  __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
92002  __pyx_t_3 = 0;
92003 
92004  /* "View.MemoryView":726
92005  * if isinstance(memview, _memoryviewslice):
92006  * memviewsliceobj = memview
92007  * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
92008  * else:
92009  * slice_copy(memview, &src)
92010  */
92011  __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
92012 
92013  /* "View.MemoryView":724
92014  * assert memview.view.ndim > 0
92015  *
92016  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
92017  * memviewsliceobj = memview
92018  * p_src = &memviewsliceobj.from_slice
92019  */
92020  goto __pyx_L3;
92021  }
92022 
92023  /* "View.MemoryView":728
92024  * p_src = &memviewsliceobj.from_slice
92025  * else:
92026  * slice_copy(memview, &src) # <<<<<<<<<<<<<<
92027  * p_src = &src
92028  *
92029  */
92030  /*else*/ {
92031  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
92032 
92033  /* "View.MemoryView":729
92034  * else:
92035  * slice_copy(memview, &src)
92036  * p_src = &src # <<<<<<<<<<<<<<
92037  *
92038  *
92039  */
92040  __pyx_v_p_src = (&__pyx_v_src);
92041  }
92042  __pyx_L3:;
92043 
92044  /* "View.MemoryView":735
92045  *
92046  *
92047  * dst.memview = p_src.memview # <<<<<<<<<<<<<<
92048  * dst.data = p_src.data
92049  *
92050  */
92051  __pyx_t_4 = __pyx_v_p_src->memview;
92052  __pyx_v_dst.memview = __pyx_t_4;
92053 
92054  /* "View.MemoryView":736
92055  *
92056  * dst.memview = p_src.memview
92057  * dst.data = p_src.data # <<<<<<<<<<<<<<
92058  *
92059  *
92060  */
92061  __pyx_t_5 = __pyx_v_p_src->data;
92062  __pyx_v_dst.data = __pyx_t_5;
92063 
92064  /* "View.MemoryView":741
92065  *
92066  *
92067  * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
92068  * cdef int *p_suboffset_dim = &suboffset_dim
92069  * cdef Py_ssize_t start, stop, step
92070  */
92071  __pyx_v_p_dst = (&__pyx_v_dst);
92072 
92073  /* "View.MemoryView":742
92074  *
92075  * cdef __Pyx_memviewslice *p_dst = &dst
92076  * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
92077  * cdef Py_ssize_t start, stop, step
92078  * cdef bint have_start, have_stop, have_step
92079  */
92080  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
92081 
92082  /* "View.MemoryView":746
92083  * cdef bint have_start, have_stop, have_step
92084  *
92085  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
92086  * if PyIndex_Check(index):
92087  * slice_memviewslice(
92088  */
92089  __pyx_t_6 = 0;
92090  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
92091  __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
92092  __pyx_t_8 = NULL;
92093  } else {
92094  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 746, __pyx_L1_error)
92095  __Pyx_GOTREF(__pyx_t_3);
92096  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 746, __pyx_L1_error)
92097  }
92098  for (;;) {
92099  if (likely(!__pyx_t_8)) {
92100  if (likely(PyList_CheckExact(__pyx_t_3))) {
92101  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
92102  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
92103  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 746, __pyx_L1_error)
92104  #else
92105  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 746, __pyx_L1_error)
92106  __Pyx_GOTREF(__pyx_t_9);
92107  #endif
92108  } else {
92109  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
92110  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
92111  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 746, __pyx_L1_error)
92112  #else
92113  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 746, __pyx_L1_error)
92114  __Pyx_GOTREF(__pyx_t_9);
92115  #endif
92116  }
92117  } else {
92118  __pyx_t_9 = __pyx_t_8(__pyx_t_3);
92119  if (unlikely(!__pyx_t_9)) {
92120  PyObject* exc_type = PyErr_Occurred();
92121  if (exc_type) {
92122  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
92123  else __PYX_ERR(1, 746, __pyx_L1_error)
92124  }
92125  break;
92126  }
92127  __Pyx_GOTREF(__pyx_t_9);
92128  }
92129  __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
92130  __pyx_t_9 = 0;
92131  __pyx_v_dim = __pyx_t_6;
92132  __pyx_t_6 = (__pyx_t_6 + 1);
92133 
92134  /* "View.MemoryView":747
92135  *
92136  * for dim, index in enumerate(indices):
92137  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
92138  * slice_memviewslice(
92139  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
92140  */
92141  __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
92142  if (__pyx_t_2) {
92143 
92144  /* "View.MemoryView":751
92145  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
92146  * dim, new_ndim, p_suboffset_dim,
92147  * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
92148  * 0, 0, 0, # have_{start,stop,step}
92149  * False)
92150  */
92151  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 751, __pyx_L1_error)
92152 
92153  /* "View.MemoryView":748
92154  * for dim, index in enumerate(indices):
92155  * if PyIndex_Check(index):
92156  * slice_memviewslice( # <<<<<<<<<<<<<<
92157  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
92158  * dim, new_ndim, p_suboffset_dim,
92159  */
92160  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 748, __pyx_L1_error)
92161 
92162  /* "View.MemoryView":747
92163  *
92164  * for dim, index in enumerate(indices):
92165  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
92166  * slice_memviewslice(
92167  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
92168  */
92169  goto __pyx_L6;
92170  }
92171 
92172  /* "View.MemoryView":754
92173  * 0, 0, 0, # have_{start,stop,step}
92174  * False)
92175  * elif index is None: # <<<<<<<<<<<<<<
92176  * p_dst.shape[new_ndim] = 1
92177  * p_dst.strides[new_ndim] = 0
92178  */
92179  __pyx_t_2 = (__pyx_v_index == Py_None);
92180  __pyx_t_1 = (__pyx_t_2 != 0);
92181  if (__pyx_t_1) {
92182 
92183  /* "View.MemoryView":755
92184  * False)
92185  * elif index is None:
92186  * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
92187  * p_dst.strides[new_ndim] = 0
92188  * p_dst.suboffsets[new_ndim] = -1
92189  */
92190  (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
92191 
92192  /* "View.MemoryView":756
92193  * elif index is None:
92194  * p_dst.shape[new_ndim] = 1
92195  * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
92196  * p_dst.suboffsets[new_ndim] = -1
92197  * new_ndim += 1
92198  */
92199  (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
92200 
92201  /* "View.MemoryView":757
92202  * p_dst.shape[new_ndim] = 1
92203  * p_dst.strides[new_ndim] = 0
92204  * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
92205  * new_ndim += 1
92206  * else:
92207  */
92208  (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
92209 
92210  /* "View.MemoryView":758
92211  * p_dst.strides[new_ndim] = 0
92212  * p_dst.suboffsets[new_ndim] = -1
92213  * new_ndim += 1 # <<<<<<<<<<<<<<
92214  * else:
92215  * start = index.start or 0
92216  */
92217  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
92218 
92219  /* "View.MemoryView":754
92220  * 0, 0, 0, # have_{start,stop,step}
92221  * False)
92222  * elif index is None: # <<<<<<<<<<<<<<
92223  * p_dst.shape[new_ndim] = 1
92224  * p_dst.strides[new_ndim] = 0
92225  */
92226  goto __pyx_L6;
92227  }
92228 
92229  /* "View.MemoryView":760
92230  * new_ndim += 1
92231  * else:
92232  * start = index.start or 0 # <<<<<<<<<<<<<<
92233  * stop = index.stop or 0
92234  * step = index.step or 0
92235  */
92236  /*else*/ {
92237  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 760, __pyx_L1_error)
92238  __Pyx_GOTREF(__pyx_t_9);
92239  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 760, __pyx_L1_error)
92240  if (!__pyx_t_1) {
92241  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92242  } else {
92243  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 760, __pyx_L1_error)
92244  __pyx_t_10 = __pyx_t_12;
92245  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92246  goto __pyx_L7_bool_binop_done;
92247  }
92248  __pyx_t_10 = 0;
92249  __pyx_L7_bool_binop_done:;
92250  __pyx_v_start = __pyx_t_10;
92251 
92252  /* "View.MemoryView":761
92253  * else:
92254  * start = index.start or 0
92255  * stop = index.stop or 0 # <<<<<<<<<<<<<<
92256  * step = index.step or 0
92257  *
92258  */
92259  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 761, __pyx_L1_error)
92260  __Pyx_GOTREF(__pyx_t_9);
92261  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 761, __pyx_L1_error)
92262  if (!__pyx_t_1) {
92263  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92264  } else {
92265  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 761, __pyx_L1_error)
92266  __pyx_t_10 = __pyx_t_12;
92267  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92268  goto __pyx_L9_bool_binop_done;
92269  }
92270  __pyx_t_10 = 0;
92271  __pyx_L9_bool_binop_done:;
92272  __pyx_v_stop = __pyx_t_10;
92273 
92274  /* "View.MemoryView":762
92275  * start = index.start or 0
92276  * stop = index.stop or 0
92277  * step = index.step or 0 # <<<<<<<<<<<<<<
92278  *
92279  * have_start = index.start is not None
92280  */
92281  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 762, __pyx_L1_error)
92282  __Pyx_GOTREF(__pyx_t_9);
92283  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 762, __pyx_L1_error)
92284  if (!__pyx_t_1) {
92285  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92286  } else {
92287  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 762, __pyx_L1_error)
92288  __pyx_t_10 = __pyx_t_12;
92289  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92290  goto __pyx_L11_bool_binop_done;
92291  }
92292  __pyx_t_10 = 0;
92293  __pyx_L11_bool_binop_done:;
92294  __pyx_v_step = __pyx_t_10;
92295 
92296  /* "View.MemoryView":764
92297  * step = index.step or 0
92298  *
92299  * have_start = index.start is not None # <<<<<<<<<<<<<<
92300  * have_stop = index.stop is not None
92301  * have_step = index.step is not None
92302  */
92303  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 764, __pyx_L1_error)
92304  __Pyx_GOTREF(__pyx_t_9);
92305  __pyx_t_1 = (__pyx_t_9 != Py_None);
92306  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92307  __pyx_v_have_start = __pyx_t_1;
92308 
92309  /* "View.MemoryView":765
92310  *
92311  * have_start = index.start is not None
92312  * have_stop = index.stop is not None # <<<<<<<<<<<<<<
92313  * have_step = index.step is not None
92314  *
92315  */
92316  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 765, __pyx_L1_error)
92317  __Pyx_GOTREF(__pyx_t_9);
92318  __pyx_t_1 = (__pyx_t_9 != Py_None);
92319  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92320  __pyx_v_have_stop = __pyx_t_1;
92321 
92322  /* "View.MemoryView":766
92323  * have_start = index.start is not None
92324  * have_stop = index.stop is not None
92325  * have_step = index.step is not None # <<<<<<<<<<<<<<
92326  *
92327  * slice_memviewslice(
92328  */
92329  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 766, __pyx_L1_error)
92330  __Pyx_GOTREF(__pyx_t_9);
92331  __pyx_t_1 = (__pyx_t_9 != Py_None);
92332  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
92333  __pyx_v_have_step = __pyx_t_1;
92334 
92335  /* "View.MemoryView":768
92336  * have_step = index.step is not None
92337  *
92338  * slice_memviewslice( # <<<<<<<<<<<<<<
92339  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
92340  * dim, new_ndim, p_suboffset_dim,
92341  */
92342  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(1, 768, __pyx_L1_error)
92343 
92344  /* "View.MemoryView":774
92345  * have_start, have_stop, have_step,
92346  * True)
92347  * new_ndim += 1 # <<<<<<<<<<<<<<
92348  *
92349  * if isinstance(memview, _memoryviewslice):
92350  */
92351  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
92352  }
92353  __pyx_L6:;
92354 
92355  /* "View.MemoryView":746
92356  * cdef bint have_start, have_stop, have_step
92357  *
92358  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
92359  * if PyIndex_Check(index):
92360  * slice_memviewslice(
92361  */
92362  }
92363  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
92364 
92365  /* "View.MemoryView":776
92366  * new_ndim += 1
92367  *
92368  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
92369  * return memoryview_fromslice(dst, new_ndim,
92370  * memviewsliceobj.to_object_func,
92371  */
92372  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
92373  __pyx_t_2 = (__pyx_t_1 != 0);
92374  if (__pyx_t_2) {
92375 
92376  /* "View.MemoryView":777
92377  *
92378  * if isinstance(memview, _memoryviewslice):
92379  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
92380  * memviewsliceobj.to_object_func,
92381  * memviewsliceobj.to_dtype_func,
92382  */
92383  __Pyx_XDECREF(((PyObject *)__pyx_r));
92384 
92385  /* "View.MemoryView":778
92386  * if isinstance(memview, _memoryviewslice):
92387  * return memoryview_fromslice(dst, new_ndim,
92388  * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
92389  * memviewsliceobj.to_dtype_func,
92390  * memview.dtype_is_object)
92391  */
92392  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 778, __pyx_L1_error) }
92393 
92394  /* "View.MemoryView":779
92395  * return memoryview_fromslice(dst, new_ndim,
92396  * memviewsliceobj.to_object_func,
92397  * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
92398  * memview.dtype_is_object)
92399  * else:
92400  */
92401  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(1, 779, __pyx_L1_error) }
92402 
92403  /* "View.MemoryView":777
92404  *
92405  * if isinstance(memview, _memoryviewslice):
92406  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
92407  * memviewsliceobj.to_object_func,
92408  * memviewsliceobj.to_dtype_func,
92409  */
92410  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 777, __pyx_L1_error)
92411  __Pyx_GOTREF(__pyx_t_3);
92412  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 777, __pyx_L1_error)
92413  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
92414  __pyx_t_3 = 0;
92415  goto __pyx_L0;
92416 
92417  /* "View.MemoryView":776
92418  * new_ndim += 1
92419  *
92420  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
92421  * return memoryview_fromslice(dst, new_ndim,
92422  * memviewsliceobj.to_object_func,
92423  */
92424  }
92425 
92426  /* "View.MemoryView":782
92427  * memview.dtype_is_object)
92428  * else:
92429  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
92430  * memview.dtype_is_object)
92431  *
92432  */
92433  /*else*/ {
92434  __Pyx_XDECREF(((PyObject *)__pyx_r));
92435 
92436  /* "View.MemoryView":783
92437  * else:
92438  * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
92439  * memview.dtype_is_object) # <<<<<<<<<<<<<<
92440  *
92441  *
92442  */
92443  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 782, __pyx_L1_error)
92444  __Pyx_GOTREF(__pyx_t_3);
92445 
92446  /* "View.MemoryView":782
92447  * memview.dtype_is_object)
92448  * else:
92449  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
92450  * memview.dtype_is_object)
92451  *
92452  */
92453  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(1, 782, __pyx_L1_error)
92454  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
92455  __pyx_t_3 = 0;
92456  goto __pyx_L0;
92457  }
92458 
92459  /* "View.MemoryView":710
92460  *
92461  * @cname('__pyx_memview_slice')
92462  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
92463  * cdef int new_ndim = 0, suboffset_dim = -1, dim
92464  * cdef bint negative_step
92465  */
92466 
92467  /* function exit code */
92468  __pyx_L1_error:;
92469  __Pyx_XDECREF(__pyx_t_3);
92470  __Pyx_XDECREF(__pyx_t_9);
92471  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
92472  __pyx_r = 0;
92473  __pyx_L0:;
92474  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
92475  __Pyx_XDECREF(__pyx_v_index);
92476  __Pyx_XGIVEREF((PyObject *)__pyx_r);
92477  __Pyx_TraceReturn(__pyx_r, 0);
92478  __Pyx_RefNannyFinishContext();
92479  return __pyx_r;
92480 }
92481 
92482 /* "View.MemoryView":807
92483  *
92484  * @cname('__pyx_memoryview_slice_memviewslice')
92485  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
92486  * __Pyx_memviewslice *dst,
92487  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
92488  */
92489 
92490 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
92491  Py_ssize_t __pyx_v_new_shape;
92492  int __pyx_v_negative_step;
92493  int __pyx_r;
92494  __Pyx_TraceDeclarations
92495  int __pyx_t_1;
92496  int __pyx_t_2;
92497  int __pyx_t_3;
92498  int __pyx_lineno = 0;
92499  const char *__pyx_filename = NULL;
92500  int __pyx_clineno = 0;
92501  __Pyx_TraceCall("slice_memviewslice", __pyx_f[1], 807, 1, __PYX_ERR(1, 807, __pyx_L1_error));
92502 
92503  /* "View.MemoryView":827
92504  * cdef bint negative_step
92505  *
92506  * if not is_slice: # <<<<<<<<<<<<<<
92507  *
92508  * if start < 0:
92509  */
92510  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
92511  if (__pyx_t_1) {
92512 
92513  /* "View.MemoryView":829
92514  * if not is_slice:
92515  *
92516  * if start < 0: # <<<<<<<<<<<<<<
92517  * start += shape
92518  * if not 0 <= start < shape:
92519  */
92520  __pyx_t_1 = ((__pyx_v_start < 0) != 0);
92521  if (__pyx_t_1) {
92522 
92523  /* "View.MemoryView":830
92524  *
92525  * if start < 0:
92526  * start += shape # <<<<<<<<<<<<<<
92527  * if not 0 <= start < shape:
92528  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
92529  */
92530  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
92531 
92532  /* "View.MemoryView":829
92533  * if not is_slice:
92534  *
92535  * if start < 0: # <<<<<<<<<<<<<<
92536  * start += shape
92537  * if not 0 <= start < shape:
92538  */
92539  }
92540 
92541  /* "View.MemoryView":831
92542  * if start < 0:
92543  * start += shape
92544  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
92545  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
92546  * else:
92547  */
92548  __pyx_t_1 = (0 <= __pyx_v_start);
92549  if (__pyx_t_1) {
92550  __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
92551  }
92552  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
92553  if (__pyx_t_2) {
92554 
92555  /* "View.MemoryView":832
92556  * start += shape
92557  * if not 0 <= start < shape:
92558  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
92559  * else:
92560  *
92561  */
92562  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 832, __pyx_L1_error)
92563 
92564  /* "View.MemoryView":831
92565  * if start < 0:
92566  * start += shape
92567  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
92568  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
92569  * else:
92570  */
92571  }
92572 
92573  /* "View.MemoryView":827
92574  * cdef bint negative_step
92575  *
92576  * if not is_slice: # <<<<<<<<<<<<<<
92577  *
92578  * if start < 0:
92579  */
92580  goto __pyx_L3;
92581  }
92582 
92583  /* "View.MemoryView":835
92584  * else:
92585  *
92586  * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
92587  *
92588  * if have_step and step == 0:
92589  */
92590  /*else*/ {
92591  __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
92592  if (__pyx_t_1) {
92593  } else {
92594  __pyx_t_2 = __pyx_t_1;
92595  goto __pyx_L6_bool_binop_done;
92596  }
92597  __pyx_t_1 = ((__pyx_v_step < 0) != 0);
92598  __pyx_t_2 = __pyx_t_1;
92599  __pyx_L6_bool_binop_done:;
92600  __pyx_v_negative_step = __pyx_t_2;
92601 
92602  /* "View.MemoryView":837
92603  * negative_step = have_step != 0 and step < 0
92604  *
92605  * if have_step and step == 0: # <<<<<<<<<<<<<<
92606  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
92607  *
92608  */
92609  __pyx_t_1 = (__pyx_v_have_step != 0);
92610  if (__pyx_t_1) {
92611  } else {
92612  __pyx_t_2 = __pyx_t_1;
92613  goto __pyx_L9_bool_binop_done;
92614  }
92615  __pyx_t_1 = ((__pyx_v_step == 0) != 0);
92616  __pyx_t_2 = __pyx_t_1;
92617  __pyx_L9_bool_binop_done:;
92618  if (__pyx_t_2) {
92619 
92620  /* "View.MemoryView":838
92621  *
92622  * if have_step and step == 0:
92623  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
92624  *
92625  *
92626  */
92627  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 838, __pyx_L1_error)
92628 
92629  /* "View.MemoryView":837
92630  * negative_step = have_step != 0 and step < 0
92631  *
92632  * if have_step and step == 0: # <<<<<<<<<<<<<<
92633  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
92634  *
92635  */
92636  }
92637 
92638  /* "View.MemoryView":841
92639  *
92640  *
92641  * if have_start: # <<<<<<<<<<<<<<
92642  * if start < 0:
92643  * start += shape
92644  */
92645  __pyx_t_2 = (__pyx_v_have_start != 0);
92646  if (__pyx_t_2) {
92647 
92648  /* "View.MemoryView":842
92649  *
92650  * if have_start:
92651  * if start < 0: # <<<<<<<<<<<<<<
92652  * start += shape
92653  * if start < 0:
92654  */
92655  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
92656  if (__pyx_t_2) {
92657 
92658  /* "View.MemoryView":843
92659  * if have_start:
92660  * if start < 0:
92661  * start += shape # <<<<<<<<<<<<<<
92662  * if start < 0:
92663  * start = 0
92664  */
92665  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
92666 
92667  /* "View.MemoryView":844
92668  * if start < 0:
92669  * start += shape
92670  * if start < 0: # <<<<<<<<<<<<<<
92671  * start = 0
92672  * elif start >= shape:
92673  */
92674  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
92675  if (__pyx_t_2) {
92676 
92677  /* "View.MemoryView":845
92678  * start += shape
92679  * if start < 0:
92680  * start = 0 # <<<<<<<<<<<<<<
92681  * elif start >= shape:
92682  * if negative_step:
92683  */
92684  __pyx_v_start = 0;
92685 
92686  /* "View.MemoryView":844
92687  * if start < 0:
92688  * start += shape
92689  * if start < 0: # <<<<<<<<<<<<<<
92690  * start = 0
92691  * elif start >= shape:
92692  */
92693  }
92694 
92695  /* "View.MemoryView":842
92696  *
92697  * if have_start:
92698  * if start < 0: # <<<<<<<<<<<<<<
92699  * start += shape
92700  * if start < 0:
92701  */
92702  goto __pyx_L12;
92703  }
92704 
92705  /* "View.MemoryView":846
92706  * if start < 0:
92707  * start = 0
92708  * elif start >= shape: # <<<<<<<<<<<<<<
92709  * if negative_step:
92710  * start = shape - 1
92711  */
92712  __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
92713  if (__pyx_t_2) {
92714 
92715  /* "View.MemoryView":847
92716  * start = 0
92717  * elif start >= shape:
92718  * if negative_step: # <<<<<<<<<<<<<<
92719  * start = shape - 1
92720  * else:
92721  */
92722  __pyx_t_2 = (__pyx_v_negative_step != 0);
92723  if (__pyx_t_2) {
92724 
92725  /* "View.MemoryView":848
92726  * elif start >= shape:
92727  * if negative_step:
92728  * start = shape - 1 # <<<<<<<<<<<<<<
92729  * else:
92730  * start = shape
92731  */
92732  __pyx_v_start = (__pyx_v_shape - 1);
92733 
92734  /* "View.MemoryView":847
92735  * start = 0
92736  * elif start >= shape:
92737  * if negative_step: # <<<<<<<<<<<<<<
92738  * start = shape - 1
92739  * else:
92740  */
92741  goto __pyx_L14;
92742  }
92743 
92744  /* "View.MemoryView":850
92745  * start = shape - 1
92746  * else:
92747  * start = shape # <<<<<<<<<<<<<<
92748  * else:
92749  * if negative_step:
92750  */
92751  /*else*/ {
92752  __pyx_v_start = __pyx_v_shape;
92753  }
92754  __pyx_L14:;
92755 
92756  /* "View.MemoryView":846
92757  * if start < 0:
92758  * start = 0
92759  * elif start >= shape: # <<<<<<<<<<<<<<
92760  * if negative_step:
92761  * start = shape - 1
92762  */
92763  }
92764  __pyx_L12:;
92765 
92766  /* "View.MemoryView":841
92767  *
92768  *
92769  * if have_start: # <<<<<<<<<<<<<<
92770  * if start < 0:
92771  * start += shape
92772  */
92773  goto __pyx_L11;
92774  }
92775 
92776  /* "View.MemoryView":852
92777  * start = shape
92778  * else:
92779  * if negative_step: # <<<<<<<<<<<<<<
92780  * start = shape - 1
92781  * else:
92782  */
92783  /*else*/ {
92784  __pyx_t_2 = (__pyx_v_negative_step != 0);
92785  if (__pyx_t_2) {
92786 
92787  /* "View.MemoryView":853
92788  * else:
92789  * if negative_step:
92790  * start = shape - 1 # <<<<<<<<<<<<<<
92791  * else:
92792  * start = 0
92793  */
92794  __pyx_v_start = (__pyx_v_shape - 1);
92795 
92796  /* "View.MemoryView":852
92797  * start = shape
92798  * else:
92799  * if negative_step: # <<<<<<<<<<<<<<
92800  * start = shape - 1
92801  * else:
92802  */
92803  goto __pyx_L15;
92804  }
92805 
92806  /* "View.MemoryView":855
92807  * start = shape - 1
92808  * else:
92809  * start = 0 # <<<<<<<<<<<<<<
92810  *
92811  * if have_stop:
92812  */
92813  /*else*/ {
92814  __pyx_v_start = 0;
92815  }
92816  __pyx_L15:;
92817  }
92818  __pyx_L11:;
92819 
92820  /* "View.MemoryView":857
92821  * start = 0
92822  *
92823  * if have_stop: # <<<<<<<<<<<<<<
92824  * if stop < 0:
92825  * stop += shape
92826  */
92827  __pyx_t_2 = (__pyx_v_have_stop != 0);
92828  if (__pyx_t_2) {
92829 
92830  /* "View.MemoryView":858
92831  *
92832  * if have_stop:
92833  * if stop < 0: # <<<<<<<<<<<<<<
92834  * stop += shape
92835  * if stop < 0:
92836  */
92837  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
92838  if (__pyx_t_2) {
92839 
92840  /* "View.MemoryView":859
92841  * if have_stop:
92842  * if stop < 0:
92843  * stop += shape # <<<<<<<<<<<<<<
92844  * if stop < 0:
92845  * stop = 0
92846  */
92847  __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
92848 
92849  /* "View.MemoryView":860
92850  * if stop < 0:
92851  * stop += shape
92852  * if stop < 0: # <<<<<<<<<<<<<<
92853  * stop = 0
92854  * elif stop > shape:
92855  */
92856  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
92857  if (__pyx_t_2) {
92858 
92859  /* "View.MemoryView":861
92860  * stop += shape
92861  * if stop < 0:
92862  * stop = 0 # <<<<<<<<<<<<<<
92863  * elif stop > shape:
92864  * stop = shape
92865  */
92866  __pyx_v_stop = 0;
92867 
92868  /* "View.MemoryView":860
92869  * if stop < 0:
92870  * stop += shape
92871  * if stop < 0: # <<<<<<<<<<<<<<
92872  * stop = 0
92873  * elif stop > shape:
92874  */
92875  }
92876 
92877  /* "View.MemoryView":858
92878  *
92879  * if have_stop:
92880  * if stop < 0: # <<<<<<<<<<<<<<
92881  * stop += shape
92882  * if stop < 0:
92883  */
92884  goto __pyx_L17;
92885  }
92886 
92887  /* "View.MemoryView":862
92888  * if stop < 0:
92889  * stop = 0
92890  * elif stop > shape: # <<<<<<<<<<<<<<
92891  * stop = shape
92892  * else:
92893  */
92894  __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
92895  if (__pyx_t_2) {
92896 
92897  /* "View.MemoryView":863
92898  * stop = 0
92899  * elif stop > shape:
92900  * stop = shape # <<<<<<<<<<<<<<
92901  * else:
92902  * if negative_step:
92903  */
92904  __pyx_v_stop = __pyx_v_shape;
92905 
92906  /* "View.MemoryView":862
92907  * if stop < 0:
92908  * stop = 0
92909  * elif stop > shape: # <<<<<<<<<<<<<<
92910  * stop = shape
92911  * else:
92912  */
92913  }
92914  __pyx_L17:;
92915 
92916  /* "View.MemoryView":857
92917  * start = 0
92918  *
92919  * if have_stop: # <<<<<<<<<<<<<<
92920  * if stop < 0:
92921  * stop += shape
92922  */
92923  goto __pyx_L16;
92924  }
92925 
92926  /* "View.MemoryView":865
92927  * stop = shape
92928  * else:
92929  * if negative_step: # <<<<<<<<<<<<<<
92930  * stop = -1
92931  * else:
92932  */
92933  /*else*/ {
92934  __pyx_t_2 = (__pyx_v_negative_step != 0);
92935  if (__pyx_t_2) {
92936 
92937  /* "View.MemoryView":866
92938  * else:
92939  * if negative_step:
92940  * stop = -1 # <<<<<<<<<<<<<<
92941  * else:
92942  * stop = shape
92943  */
92944  __pyx_v_stop = -1L;
92945 
92946  /* "View.MemoryView":865
92947  * stop = shape
92948  * else:
92949  * if negative_step: # <<<<<<<<<<<<<<
92950  * stop = -1
92951  * else:
92952  */
92953  goto __pyx_L19;
92954  }
92955 
92956  /* "View.MemoryView":868
92957  * stop = -1
92958  * else:
92959  * stop = shape # <<<<<<<<<<<<<<
92960  *
92961  * if not have_step:
92962  */
92963  /*else*/ {
92964  __pyx_v_stop = __pyx_v_shape;
92965  }
92966  __pyx_L19:;
92967  }
92968  __pyx_L16:;
92969 
92970  /* "View.MemoryView":870
92971  * stop = shape
92972  *
92973  * if not have_step: # <<<<<<<<<<<<<<
92974  * step = 1
92975  *
92976  */
92977  __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
92978  if (__pyx_t_2) {
92979 
92980  /* "View.MemoryView":871
92981  *
92982  * if not have_step:
92983  * step = 1 # <<<<<<<<<<<<<<
92984  *
92985  *
92986  */
92987  __pyx_v_step = 1;
92988 
92989  /* "View.MemoryView":870
92990  * stop = shape
92991  *
92992  * if not have_step: # <<<<<<<<<<<<<<
92993  * step = 1
92994  *
92995  */
92996  }
92997 
92998  /* "View.MemoryView":875
92999  *
93000  * with cython.cdivision(True):
93001  * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
93002  *
93003  * if (stop - start) - step * new_shape:
93004  */
93005  __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
93006 
93007  /* "View.MemoryView":877
93008  * new_shape = (stop - start) // step
93009  *
93010  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
93011  * new_shape += 1
93012  *
93013  */
93014  __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
93015  if (__pyx_t_2) {
93016 
93017  /* "View.MemoryView":878
93018  *
93019  * if (stop - start) - step * new_shape:
93020  * new_shape += 1 # <<<<<<<<<<<<<<
93021  *
93022  * if new_shape < 0:
93023  */
93024  __pyx_v_new_shape = (__pyx_v_new_shape + 1);
93025 
93026  /* "View.MemoryView":877
93027  * new_shape = (stop - start) // step
93028  *
93029  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
93030  * new_shape += 1
93031  *
93032  */
93033  }
93034 
93035  /* "View.MemoryView":880
93036  * new_shape += 1
93037  *
93038  * if new_shape < 0: # <<<<<<<<<<<<<<
93039  * new_shape = 0
93040  *
93041  */
93042  __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
93043  if (__pyx_t_2) {
93044 
93045  /* "View.MemoryView":881
93046  *
93047  * if new_shape < 0:
93048  * new_shape = 0 # <<<<<<<<<<<<<<
93049  *
93050  *
93051  */
93052  __pyx_v_new_shape = 0;
93053 
93054  /* "View.MemoryView":880
93055  * new_shape += 1
93056  *
93057  * if new_shape < 0: # <<<<<<<<<<<<<<
93058  * new_shape = 0
93059  *
93060  */
93061  }
93062 
93063  /* "View.MemoryView":884
93064  *
93065  *
93066  * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
93067  * dst.shape[new_ndim] = new_shape
93068  * dst.suboffsets[new_ndim] = suboffset
93069  */
93070  (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
93071 
93072  /* "View.MemoryView":885
93073  *
93074  * dst.strides[new_ndim] = stride * step
93075  * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
93076  * dst.suboffsets[new_ndim] = suboffset
93077  *
93078  */
93079  (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
93080 
93081  /* "View.MemoryView":886
93082  * dst.strides[new_ndim] = stride * step
93083  * dst.shape[new_ndim] = new_shape
93084  * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
93085  *
93086  *
93087  */
93088  (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
93089  }
93090  __pyx_L3:;
93091 
93092  /* "View.MemoryView":889
93093  *
93094  *
93095  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
93096  * dst.data += start * stride
93097  * else:
93098  */
93099  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
93100  if (__pyx_t_2) {
93101 
93102  /* "View.MemoryView":890
93103  *
93104  * if suboffset_dim[0] < 0:
93105  * dst.data += start * stride # <<<<<<<<<<<<<<
93106  * else:
93107  * dst.suboffsets[suboffset_dim[0]] += start * stride
93108  */
93109  __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
93110 
93111  /* "View.MemoryView":889
93112  *
93113  *
93114  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
93115  * dst.data += start * stride
93116  * else:
93117  */
93118  goto __pyx_L23;
93119  }
93120 
93121  /* "View.MemoryView":892
93122  * dst.data += start * stride
93123  * else:
93124  * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
93125  *
93126  * if suboffset >= 0:
93127  */
93128  /*else*/ {
93129  __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
93130  (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
93131  }
93132  __pyx_L23:;
93133 
93134  /* "View.MemoryView":894
93135  * dst.suboffsets[suboffset_dim[0]] += start * stride
93136  *
93137  * if suboffset >= 0: # <<<<<<<<<<<<<<
93138  * if not is_slice:
93139  * if new_ndim == 0:
93140  */
93141  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
93142  if (__pyx_t_2) {
93143 
93144  /* "View.MemoryView":895
93145  *
93146  * if suboffset >= 0:
93147  * if not is_slice: # <<<<<<<<<<<<<<
93148  * if new_ndim == 0:
93149  * dst.data = (<char **> dst.data)[0] + suboffset
93150  */
93151  __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
93152  if (__pyx_t_2) {
93153 
93154  /* "View.MemoryView":896
93155  * if suboffset >= 0:
93156  * if not is_slice:
93157  * if new_ndim == 0: # <<<<<<<<<<<<<<
93158  * dst.data = (<char **> dst.data)[0] + suboffset
93159  * else:
93160  */
93161  __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
93162  if (__pyx_t_2) {
93163 
93164  /* "View.MemoryView":897
93165  * if not is_slice:
93166  * if new_ndim == 0:
93167  * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
93168  * else:
93169  * _err_dim(IndexError, "All dimensions preceding dimension %d "
93170  */
93171  __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
93172 
93173  /* "View.MemoryView":896
93174  * if suboffset >= 0:
93175  * if not is_slice:
93176  * if new_ndim == 0: # <<<<<<<<<<<<<<
93177  * dst.data = (<char **> dst.data)[0] + suboffset
93178  * else:
93179  */
93180  goto __pyx_L26;
93181  }
93182 
93183  /* "View.MemoryView":899
93184  * dst.data = (<char **> dst.data)[0] + suboffset
93185  * else:
93186  * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
93187  * "must be indexed and not sliced", dim)
93188  * else:
93189  */
93190  /*else*/ {
93191 
93192  /* "View.MemoryView":900
93193  * else:
93194  * _err_dim(IndexError, "All dimensions preceding dimension %d "
93195  * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
93196  * else:
93197  * suboffset_dim[0] = new_ndim
93198  */
93199  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 899, __pyx_L1_error)
93200  }
93201  __pyx_L26:;
93202 
93203  /* "View.MemoryView":895
93204  *
93205  * if suboffset >= 0:
93206  * if not is_slice: # <<<<<<<<<<<<<<
93207  * if new_ndim == 0:
93208  * dst.data = (<char **> dst.data)[0] + suboffset
93209  */
93210  goto __pyx_L25;
93211  }
93212 
93213  /* "View.MemoryView":902
93214  * "must be indexed and not sliced", dim)
93215  * else:
93216  * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
93217  *
93218  * return 0
93219  */
93220  /*else*/ {
93221  (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
93222  }
93223  __pyx_L25:;
93224 
93225  /* "View.MemoryView":894
93226  * dst.suboffsets[suboffset_dim[0]] += start * stride
93227  *
93228  * if suboffset >= 0: # <<<<<<<<<<<<<<
93229  * if not is_slice:
93230  * if new_ndim == 0:
93231  */
93232  }
93233 
93234  /* "View.MemoryView":904
93235  * suboffset_dim[0] = new_ndim
93236  *
93237  * return 0 # <<<<<<<<<<<<<<
93238  *
93239  *
93240  */
93241  __pyx_r = 0;
93242  goto __pyx_L0;
93243 
93244  /* "View.MemoryView":807
93245  *
93246  * @cname('__pyx_memoryview_slice_memviewslice')
93247  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
93248  * __Pyx_memviewslice *dst,
93249  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
93250  */
93251 
93252  /* function exit code */
93253  __pyx_L1_error:;
93254  {
93255  #ifdef WITH_THREAD
93256  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
93257  #endif
93258  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
93259  #ifdef WITH_THREAD
93260  __Pyx_PyGILState_Release(__pyx_gilstate_save);
93261  #endif
93262  }
93263  __pyx_r = -1;
93264  __pyx_L0:;
93265  __Pyx_TraceReturn(Py_None, 1);
93266  return __pyx_r;
93267 }
93268 
93269 /* "View.MemoryView":910
93270  *
93271  * @cname('__pyx_pybuffer_index')
93272  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
93273  * Py_ssize_t dim) except NULL:
93274  * cdef Py_ssize_t shape, stride, suboffset = -1
93275  */
93276 
93277 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
93278  Py_ssize_t __pyx_v_shape;
93279  Py_ssize_t __pyx_v_stride;
93280  Py_ssize_t __pyx_v_suboffset;
93281  Py_ssize_t __pyx_v_itemsize;
93282  char *__pyx_v_resultp;
93283  char *__pyx_r;
93284  __Pyx_TraceDeclarations
93285  __Pyx_RefNannyDeclarations
93286  Py_ssize_t __pyx_t_1;
93287  int __pyx_t_2;
93288  PyObject *__pyx_t_3 = NULL;
93289  PyObject *__pyx_t_4 = NULL;
93290  int __pyx_lineno = 0;
93291  const char *__pyx_filename = NULL;
93292  int __pyx_clineno = 0;
93293  __Pyx_RefNannySetupContext("pybuffer_index", 0);
93294  __Pyx_TraceCall("pybuffer_index", __pyx_f[1], 910, 0, __PYX_ERR(1, 910, __pyx_L1_error));
93295 
93296  /* "View.MemoryView":912
93297  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
93298  * Py_ssize_t dim) except NULL:
93299  * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
93300  * cdef Py_ssize_t itemsize = view.itemsize
93301  * cdef char *resultp
93302  */
93303  __pyx_v_suboffset = -1L;
93304 
93305  /* "View.MemoryView":913
93306  * Py_ssize_t dim) except NULL:
93307  * cdef Py_ssize_t shape, stride, suboffset = -1
93308  * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
93309  * cdef char *resultp
93310  *
93311  */
93312  __pyx_t_1 = __pyx_v_view->itemsize;
93313  __pyx_v_itemsize = __pyx_t_1;
93314 
93315  /* "View.MemoryView":916
93316  * cdef char *resultp
93317  *
93318  * if view.ndim == 0: # <<<<<<<<<<<<<<
93319  * shape = view.len / itemsize
93320  * stride = itemsize
93321  */
93322  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
93323  if (__pyx_t_2) {
93324 
93325  /* "View.MemoryView":917
93326  *
93327  * if view.ndim == 0:
93328  * shape = view.len / itemsize # <<<<<<<<<<<<<<
93329  * stride = itemsize
93330  * else:
93331  */
93332  if (unlikely(__pyx_v_itemsize == 0)) {
93333  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
93334  __PYX_ERR(1, 917, __pyx_L1_error)
93335  }
93336  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
93337  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
93338  __PYX_ERR(1, 917, __pyx_L1_error)
93339  }
93340  __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
93341 
93342  /* "View.MemoryView":918
93343  * if view.ndim == 0:
93344  * shape = view.len / itemsize
93345  * stride = itemsize # <<<<<<<<<<<<<<
93346  * else:
93347  * shape = view.shape[dim]
93348  */
93349  __pyx_v_stride = __pyx_v_itemsize;
93350 
93351  /* "View.MemoryView":916
93352  * cdef char *resultp
93353  *
93354  * if view.ndim == 0: # <<<<<<<<<<<<<<
93355  * shape = view.len / itemsize
93356  * stride = itemsize
93357  */
93358  goto __pyx_L3;
93359  }
93360 
93361  /* "View.MemoryView":920
93362  * stride = itemsize
93363  * else:
93364  * shape = view.shape[dim] # <<<<<<<<<<<<<<
93365  * stride = view.strides[dim]
93366  * if view.suboffsets != NULL:
93367  */
93368  /*else*/ {
93369  __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
93370 
93371  /* "View.MemoryView":921
93372  * else:
93373  * shape = view.shape[dim]
93374  * stride = view.strides[dim] # <<<<<<<<<<<<<<
93375  * if view.suboffsets != NULL:
93376  * suboffset = view.suboffsets[dim]
93377  */
93378  __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
93379 
93380  /* "View.MemoryView":922
93381  * shape = view.shape[dim]
93382  * stride = view.strides[dim]
93383  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
93384  * suboffset = view.suboffsets[dim]
93385  *
93386  */
93387  __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
93388  if (__pyx_t_2) {
93389 
93390  /* "View.MemoryView":923
93391  * stride = view.strides[dim]
93392  * if view.suboffsets != NULL:
93393  * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
93394  *
93395  * if index < 0:
93396  */
93397  __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
93398 
93399  /* "View.MemoryView":922
93400  * shape = view.shape[dim]
93401  * stride = view.strides[dim]
93402  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
93403  * suboffset = view.suboffsets[dim]
93404  *
93405  */
93406  }
93407  }
93408  __pyx_L3:;
93409 
93410  /* "View.MemoryView":925
93411  * suboffset = view.suboffsets[dim]
93412  *
93413  * if index < 0: # <<<<<<<<<<<<<<
93414  * index += view.shape[dim]
93415  * if index < 0:
93416  */
93417  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
93418  if (__pyx_t_2) {
93419 
93420  /* "View.MemoryView":926
93421  *
93422  * if index < 0:
93423  * index += view.shape[dim] # <<<<<<<<<<<<<<
93424  * if index < 0:
93425  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93426  */
93427  __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
93428 
93429  /* "View.MemoryView":927
93430  * if index < 0:
93431  * index += view.shape[dim]
93432  * if index < 0: # <<<<<<<<<<<<<<
93433  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93434  *
93435  */
93436  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
93437  if (unlikely(__pyx_t_2)) {
93438 
93439  /* "View.MemoryView":928
93440  * index += view.shape[dim]
93441  * if index < 0:
93442  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
93443  *
93444  * if index >= shape:
93445  */
93446  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 928, __pyx_L1_error)
93447  __Pyx_GOTREF(__pyx_t_3);
93448  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 928, __pyx_L1_error)
93449  __Pyx_GOTREF(__pyx_t_4);
93450  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
93451  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 928, __pyx_L1_error)
93452  __Pyx_GOTREF(__pyx_t_3);
93453  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
93454  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
93455  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
93456  __PYX_ERR(1, 928, __pyx_L1_error)
93457 
93458  /* "View.MemoryView":927
93459  * if index < 0:
93460  * index += view.shape[dim]
93461  * if index < 0: # <<<<<<<<<<<<<<
93462  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93463  *
93464  */
93465  }
93466 
93467  /* "View.MemoryView":925
93468  * suboffset = view.suboffsets[dim]
93469  *
93470  * if index < 0: # <<<<<<<<<<<<<<
93471  * index += view.shape[dim]
93472  * if index < 0:
93473  */
93474  }
93475 
93476  /* "View.MemoryView":930
93477  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93478  *
93479  * if index >= shape: # <<<<<<<<<<<<<<
93480  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93481  *
93482  */
93483  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
93484  if (unlikely(__pyx_t_2)) {
93485 
93486  /* "View.MemoryView":931
93487  *
93488  * if index >= shape:
93489  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
93490  *
93491  * resultp = bufp + index * stride
93492  */
93493  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 931, __pyx_L1_error)
93494  __Pyx_GOTREF(__pyx_t_3);
93495  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 931, __pyx_L1_error)
93496  __Pyx_GOTREF(__pyx_t_4);
93497  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
93498  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 931, __pyx_L1_error)
93499  __Pyx_GOTREF(__pyx_t_3);
93500  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
93501  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
93502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
93503  __PYX_ERR(1, 931, __pyx_L1_error)
93504 
93505  /* "View.MemoryView":930
93506  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93507  *
93508  * if index >= shape: # <<<<<<<<<<<<<<
93509  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93510  *
93511  */
93512  }
93513 
93514  /* "View.MemoryView":933
93515  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
93516  *
93517  * resultp = bufp + index * stride # <<<<<<<<<<<<<<
93518  * if suboffset >= 0:
93519  * resultp = (<char **> resultp)[0] + suboffset
93520  */
93521  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
93522 
93523  /* "View.MemoryView":934
93524  *
93525  * resultp = bufp + index * stride
93526  * if suboffset >= 0: # <<<<<<<<<<<<<<
93527  * resultp = (<char **> resultp)[0] + suboffset
93528  *
93529  */
93530  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
93531  if (__pyx_t_2) {
93532 
93533  /* "View.MemoryView":935
93534  * resultp = bufp + index * stride
93535  * if suboffset >= 0:
93536  * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
93537  *
93538  * return resultp
93539  */
93540  __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
93541 
93542  /* "View.MemoryView":934
93543  *
93544  * resultp = bufp + index * stride
93545  * if suboffset >= 0: # <<<<<<<<<<<<<<
93546  * resultp = (<char **> resultp)[0] + suboffset
93547  *
93548  */
93549  }
93550 
93551  /* "View.MemoryView":937
93552  * resultp = (<char **> resultp)[0] + suboffset
93553  *
93554  * return resultp # <<<<<<<<<<<<<<
93555  *
93556  *
93557  */
93558  __pyx_r = __pyx_v_resultp;
93559  goto __pyx_L0;
93560 
93561  /* "View.MemoryView":910
93562  *
93563  * @cname('__pyx_pybuffer_index')
93564  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
93565  * Py_ssize_t dim) except NULL:
93566  * cdef Py_ssize_t shape, stride, suboffset = -1
93567  */
93568 
93569  /* function exit code */
93570  __pyx_L1_error:;
93571  __Pyx_XDECREF(__pyx_t_3);
93572  __Pyx_XDECREF(__pyx_t_4);
93573  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
93574  __pyx_r = NULL;
93575  __pyx_L0:;
93576  __Pyx_TraceReturn(Py_None, 0);
93577  __Pyx_RefNannyFinishContext();
93578  return __pyx_r;
93579 }
93580 
93581 /* "View.MemoryView":943
93582  *
93583  * @cname('__pyx_memslice_transpose')
93584  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
93585  * cdef int ndim = memslice.memview.view.ndim
93586  *
93587  */
93588 
93589 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
93590  int __pyx_v_ndim;
93591  Py_ssize_t *__pyx_v_shape;
93592  Py_ssize_t *__pyx_v_strides;
93593  int __pyx_v_i;
93594  int __pyx_v_j;
93595  int __pyx_r;
93596  __Pyx_TraceDeclarations
93597  int __pyx_t_1;
93598  Py_ssize_t *__pyx_t_2;
93599  long __pyx_t_3;
93600  long __pyx_t_4;
93601  Py_ssize_t __pyx_t_5;
93602  Py_ssize_t __pyx_t_6;
93603  int __pyx_t_7;
93604  int __pyx_t_8;
93605  int __pyx_t_9;
93606  int __pyx_lineno = 0;
93607  const char *__pyx_filename = NULL;
93608  int __pyx_clineno = 0;
93609  __Pyx_TraceCall("transpose_memslice", __pyx_f[1], 943, 1, __PYX_ERR(1, 943, __pyx_L1_error));
93610 
93611  /* "View.MemoryView":944
93612  * @cname('__pyx_memslice_transpose')
93613  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
93614  * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
93615  *
93616  * cdef Py_ssize_t *shape = memslice.shape
93617  */
93618  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
93619  __pyx_v_ndim = __pyx_t_1;
93620 
93621  /* "View.MemoryView":946
93622  * cdef int ndim = memslice.memview.view.ndim
93623  *
93624  * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
93625  * cdef Py_ssize_t *strides = memslice.strides
93626  *
93627  */
93628  __pyx_t_2 = __pyx_v_memslice->shape;
93629  __pyx_v_shape = __pyx_t_2;
93630 
93631  /* "View.MemoryView":947
93632  *
93633  * cdef Py_ssize_t *shape = memslice.shape
93634  * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
93635  *
93636  *
93637  */
93638  __pyx_t_2 = __pyx_v_memslice->strides;
93639  __pyx_v_strides = __pyx_t_2;
93640 
93641  /* "View.MemoryView":951
93642  *
93643  * cdef int i, j
93644  * for i in range(ndim / 2): # <<<<<<<<<<<<<<
93645  * j = ndim - 1 - i
93646  * strides[i], strides[j] = strides[j], strides[i]
93647  */
93648  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
93649  __pyx_t_4 = __pyx_t_3;
93650  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
93651  __pyx_v_i = __pyx_t_1;
93652 
93653  /* "View.MemoryView":952
93654  * cdef int i, j
93655  * for i in range(ndim / 2):
93656  * j = ndim - 1 - i # <<<<<<<<<<<<<<
93657  * strides[i], strides[j] = strides[j], strides[i]
93658  * shape[i], shape[j] = shape[j], shape[i]
93659  */
93660  __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
93661 
93662  /* "View.MemoryView":953
93663  * for i in range(ndim / 2):
93664  * j = ndim - 1 - i
93665  * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
93666  * shape[i], shape[j] = shape[j], shape[i]
93667  *
93668  */
93669  __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
93670  __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
93671  (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
93672  (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
93673 
93674  /* "View.MemoryView":954
93675  * j = ndim - 1 - i
93676  * strides[i], strides[j] = strides[j], strides[i]
93677  * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
93678  *
93679  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
93680  */
93681  __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
93682  __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
93683  (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
93684  (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
93685 
93686  /* "View.MemoryView":956
93687  * shape[i], shape[j] = shape[j], shape[i]
93688  *
93689  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
93690  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
93691  *
93692  */
93693  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
93694  if (!__pyx_t_8) {
93695  } else {
93696  __pyx_t_7 = __pyx_t_8;
93697  goto __pyx_L6_bool_binop_done;
93698  }
93699  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
93700  __pyx_t_7 = __pyx_t_8;
93701  __pyx_L6_bool_binop_done:;
93702  if (__pyx_t_7) {
93703 
93704  /* "View.MemoryView":957
93705  *
93706  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
93707  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
93708  *
93709  * return 1
93710  */
93711  __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(1, 957, __pyx_L1_error)
93712 
93713  /* "View.MemoryView":956
93714  * shape[i], shape[j] = shape[j], shape[i]
93715  *
93716  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
93717  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
93718  *
93719  */
93720  }
93721  }
93722 
93723  /* "View.MemoryView":959
93724  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
93725  *
93726  * return 1 # <<<<<<<<<<<<<<
93727  *
93728  *
93729  */
93730  __pyx_r = 1;
93731  goto __pyx_L0;
93732 
93733  /* "View.MemoryView":943
93734  *
93735  * @cname('__pyx_memslice_transpose')
93736  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
93737  * cdef int ndim = memslice.memview.view.ndim
93738  *
93739  */
93740 
93741  /* function exit code */
93742  __pyx_L1_error:;
93743  {
93744  #ifdef WITH_THREAD
93745  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
93746  #endif
93747  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
93748  #ifdef WITH_THREAD
93749  __Pyx_PyGILState_Release(__pyx_gilstate_save);
93750  #endif
93751  }
93752  __pyx_r = 0;
93753  __pyx_L0:;
93754  __Pyx_TraceReturn(Py_None, 1);
93755  return __pyx_r;
93756 }
93757 
93758 /* "View.MemoryView":976
93759  * cdef int (*to_dtype_func)(char *, object) except 0
93760  *
93761  * def __dealloc__(self): # <<<<<<<<<<<<<<
93762  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
93763  *
93764  */
93765 
93766 /* Python wrapper */
93767 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
93768 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
93769  __Pyx_RefNannyDeclarations
93770  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
93771  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
93772 
93773  /* function exit code */
93774  __Pyx_RefNannyFinishContext();
93775 }
93776 
93777 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
93778  __Pyx_TraceDeclarations
93779  __Pyx_RefNannyDeclarations
93780  int __pyx_lineno = 0;
93781  const char *__pyx_filename = NULL;
93782  int __pyx_clineno = 0;
93783  __Pyx_RefNannySetupContext("__dealloc__", 0);
93784  __Pyx_TraceCall("__dealloc__", __pyx_f[1], 976, 0, __PYX_ERR(1, 976, __pyx_L1_error));
93785 
93786  /* "View.MemoryView":977
93787  *
93788  * def __dealloc__(self):
93789  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
93790  *
93791  * cdef convert_item_to_object(self, char *itemp):
93792  */
93793  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
93794 
93795  /* "View.MemoryView":976
93796  * cdef int (*to_dtype_func)(char *, object) except 0
93797  *
93798  * def __dealloc__(self): # <<<<<<<<<<<<<<
93799  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
93800  *
93801  */
93802 
93803  /* function exit code */
93804  goto __pyx_L0;
93805  __pyx_L1_error:;
93806  __Pyx_WriteUnraisable("View.MemoryView._memoryviewslice.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
93807  __pyx_L0:;
93808  __Pyx_TraceReturn(Py_None, 0);
93809  __Pyx_RefNannyFinishContext();
93810 }
93811 
93812 /* "View.MemoryView":979
93813  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
93814  *
93815  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
93816  * if self.to_object_func != NULL:
93817  * return self.to_object_func(itemp)
93818  */
93819 
93820 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
93821  PyObject *__pyx_r = NULL;
93822  __Pyx_TraceDeclarations
93823  __Pyx_RefNannyDeclarations
93824  int __pyx_t_1;
93825  PyObject *__pyx_t_2 = NULL;
93826  int __pyx_lineno = 0;
93827  const char *__pyx_filename = NULL;
93828  int __pyx_clineno = 0;
93829  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
93830  __Pyx_TraceCall("convert_item_to_object", __pyx_f[1], 979, 0, __PYX_ERR(1, 979, __pyx_L1_error));
93831 
93832  /* "View.MemoryView":980
93833  *
93834  * cdef convert_item_to_object(self, char *itemp):
93835  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
93836  * return self.to_object_func(itemp)
93837  * else:
93838  */
93839  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
93840  if (__pyx_t_1) {
93841 
93842  /* "View.MemoryView":981
93843  * cdef convert_item_to_object(self, char *itemp):
93844  * if self.to_object_func != NULL:
93845  * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
93846  * else:
93847  * return memoryview.convert_item_to_object(self, itemp)
93848  */
93849  __Pyx_XDECREF(__pyx_r);
93850  __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 981, __pyx_L1_error)
93851  __Pyx_GOTREF(__pyx_t_2);
93852  __pyx_r = __pyx_t_2;
93853  __pyx_t_2 = 0;
93854  goto __pyx_L0;
93855 
93856  /* "View.MemoryView":980
93857  *
93858  * cdef convert_item_to_object(self, char *itemp):
93859  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
93860  * return self.to_object_func(itemp)
93861  * else:
93862  */
93863  }
93864 
93865  /* "View.MemoryView":983
93866  * return self.to_object_func(itemp)
93867  * else:
93868  * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
93869  *
93870  * cdef assign_item_from_object(self, char *itemp, object value):
93871  */
93872  /*else*/ {
93873  __Pyx_XDECREF(__pyx_r);
93874  __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 983, __pyx_L1_error)
93875  __Pyx_GOTREF(__pyx_t_2);
93876  __pyx_r = __pyx_t_2;
93877  __pyx_t_2 = 0;
93878  goto __pyx_L0;
93879  }
93880 
93881  /* "View.MemoryView":979
93882  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
93883  *
93884  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
93885  * if self.to_object_func != NULL:
93886  * return self.to_object_func(itemp)
93887  */
93888 
93889  /* function exit code */
93890  __pyx_L1_error:;
93891  __Pyx_XDECREF(__pyx_t_2);
93892  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
93893  __pyx_r = 0;
93894  __pyx_L0:;
93895  __Pyx_XGIVEREF(__pyx_r);
93896  __Pyx_TraceReturn(__pyx_r, 0);
93897  __Pyx_RefNannyFinishContext();
93898  return __pyx_r;
93899 }
93900 
93901 /* "View.MemoryView":985
93902  * return memoryview.convert_item_to_object(self, itemp)
93903  *
93904  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
93905  * if self.to_dtype_func != NULL:
93906  * self.to_dtype_func(itemp, value)
93907  */
93908 
93909 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
93910  PyObject *__pyx_r = NULL;
93911  __Pyx_TraceDeclarations
93912  __Pyx_RefNannyDeclarations
93913  int __pyx_t_1;
93914  int __pyx_t_2;
93915  PyObject *__pyx_t_3 = NULL;
93916  int __pyx_lineno = 0;
93917  const char *__pyx_filename = NULL;
93918  int __pyx_clineno = 0;
93919  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
93920  __Pyx_TraceCall("assign_item_from_object", __pyx_f[1], 985, 0, __PYX_ERR(1, 985, __pyx_L1_error));
93921 
93922  /* "View.MemoryView":986
93923  *
93924  * cdef assign_item_from_object(self, char *itemp, object value):
93925  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
93926  * self.to_dtype_func(itemp, value)
93927  * else:
93928  */
93929  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
93930  if (__pyx_t_1) {
93931 
93932  /* "View.MemoryView":987
93933  * cdef assign_item_from_object(self, char *itemp, object value):
93934  * if self.to_dtype_func != NULL:
93935  * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
93936  * else:
93937  * memoryview.assign_item_from_object(self, itemp, value)
93938  */
93939  __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(1, 987, __pyx_L1_error)
93940 
93941  /* "View.MemoryView":986
93942  *
93943  * cdef assign_item_from_object(self, char *itemp, object value):
93944  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
93945  * self.to_dtype_func(itemp, value)
93946  * else:
93947  */
93948  goto __pyx_L3;
93949  }
93950 
93951  /* "View.MemoryView":989
93952  * self.to_dtype_func(itemp, value)
93953  * else:
93954  * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
93955  *
93956  * @property
93957  */
93958  /*else*/ {
93959  __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 989, __pyx_L1_error)
93960  __Pyx_GOTREF(__pyx_t_3);
93961  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
93962  }
93963  __pyx_L3:;
93964 
93965  /* "View.MemoryView":985
93966  * return memoryview.convert_item_to_object(self, itemp)
93967  *
93968  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
93969  * if self.to_dtype_func != NULL:
93970  * self.to_dtype_func(itemp, value)
93971  */
93972 
93973  /* function exit code */
93974  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
93975  goto __pyx_L0;
93976  __pyx_L1_error:;
93977  __Pyx_XDECREF(__pyx_t_3);
93978  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
93979  __pyx_r = 0;
93980  __pyx_L0:;
93981  __Pyx_XGIVEREF(__pyx_r);
93982  __Pyx_TraceReturn(__pyx_r, 0);
93983  __Pyx_RefNannyFinishContext();
93984  return __pyx_r;
93985 }
93986 
93987 /* "View.MemoryView":992
93988  *
93989  * @property
93990  * def base(self): # <<<<<<<<<<<<<<
93991  * return self.from_object
93992  *
93993  */
93994 
93995 /* Python wrapper */
93996 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
93997 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
93998  PyObject *__pyx_r = 0;
93999  __Pyx_RefNannyDeclarations
94000  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
94001  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
94002 
94003  /* function exit code */
94004  __Pyx_RefNannyFinishContext();
94005  return __pyx_r;
94006 }
94007 
94008 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
94009  PyObject *__pyx_r = NULL;
94010  __Pyx_TraceDeclarations
94011  __Pyx_RefNannyDeclarations
94012  int __pyx_lineno = 0;
94013  const char *__pyx_filename = NULL;
94014  int __pyx_clineno = 0;
94015  __Pyx_RefNannySetupContext("__get__", 0);
94016  __Pyx_TraceCall("__get__", __pyx_f[1], 992, 0, __PYX_ERR(1, 992, __pyx_L1_error));
94017 
94018  /* "View.MemoryView":993
94019  * @property
94020  * def base(self):
94021  * return self.from_object # <<<<<<<<<<<<<<
94022  *
94023  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
94024  */
94025  __Pyx_XDECREF(__pyx_r);
94026  __Pyx_INCREF(__pyx_v_self->from_object);
94027  __pyx_r = __pyx_v_self->from_object;
94028  goto __pyx_L0;
94029 
94030  /* "View.MemoryView":992
94031  *
94032  * @property
94033  * def base(self): # <<<<<<<<<<<<<<
94034  * return self.from_object
94035  *
94036  */
94037 
94038  /* function exit code */
94039  __pyx_L1_error:;
94040  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.base.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
94041  __pyx_r = NULL;
94042  __pyx_L0:;
94043  __Pyx_XGIVEREF(__pyx_r);
94044  __Pyx_TraceReturn(__pyx_r, 0);
94045  __Pyx_RefNannyFinishContext();
94046  return __pyx_r;
94047 }
94048 
94049 /* "(tree fragment)":1
94050  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
94051  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94052  * def __setstate_cython__(self, __pyx_state):
94053  */
94054 
94055 /* Python wrapper */
94056 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
94057 static PyMethodDef __pyx_mdef___pyx_memoryviewslice_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0};
94058 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
94059  PyObject *__pyx_r = 0;
94060  __Pyx_RefNannyDeclarations
94061  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
94062  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
94063 
94064  /* function exit code */
94065  __Pyx_RefNannyFinishContext();
94066  return __pyx_r;
94067 }
94068 
94069 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
94070  PyObject *__pyx_r = NULL;
94071  __Pyx_TraceDeclarations
94072  __Pyx_RefNannyDeclarations
94073  PyObject *__pyx_t_1 = NULL;
94074  int __pyx_lineno = 0;
94075  const char *__pyx_filename = NULL;
94076  int __pyx_clineno = 0;
94077  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
94078  __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
94079 
94080  /* "(tree fragment)":2
94081  * def __reduce_cython__(self):
94082  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
94083  * def __setstate_cython__(self, __pyx_state):
94084  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94085  */
94086  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__236, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
94087  __Pyx_GOTREF(__pyx_t_1);
94088  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
94089  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
94090  __PYX_ERR(1, 2, __pyx_L1_error)
94091 
94092  /* "(tree fragment)":1
94093  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
94094  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94095  * def __setstate_cython__(self, __pyx_state):
94096  */
94097 
94098  /* function exit code */
94099  __pyx_L1_error:;
94100  __Pyx_XDECREF(__pyx_t_1);
94101  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
94102  __pyx_r = NULL;
94103  __Pyx_XGIVEREF(__pyx_r);
94104  __Pyx_TraceReturn(__pyx_r, 0);
94105  __Pyx_RefNannyFinishContext();
94106  return __pyx_r;
94107 }
94108 
94109 /* "(tree fragment)":3
94110  * def __reduce_cython__(self):
94111  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94112  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
94113  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94114  */
94115 
94116 /* Python wrapper */
94117 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
94118 static PyMethodDef __pyx_mdef___pyx_memoryviewslice_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0};
94119 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
94120  PyObject *__pyx_r = 0;
94121  __Pyx_RefNannyDeclarations
94122  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
94123  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
94124 
94125  /* function exit code */
94126  __Pyx_RefNannyFinishContext();
94127  return __pyx_r;
94128 }
94129 
94130 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
94131  PyObject *__pyx_r = NULL;
94132  __Pyx_TraceDeclarations
94133  __Pyx_RefNannyDeclarations
94134  PyObject *__pyx_t_1 = NULL;
94135  int __pyx_lineno = 0;
94136  const char *__pyx_filename = NULL;
94137  int __pyx_clineno = 0;
94138  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
94139  __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
94140 
94141  /* "(tree fragment)":4
94142  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94143  * def __setstate_cython__(self, __pyx_state):
94144  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
94145  */
94146  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__237, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
94147  __Pyx_GOTREF(__pyx_t_1);
94148  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
94149  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
94150  __PYX_ERR(1, 4, __pyx_L1_error)
94151 
94152  /* "(tree fragment)":3
94153  * def __reduce_cython__(self):
94154  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94155  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
94156  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
94157  */
94158 
94159  /* function exit code */
94160  __pyx_L1_error:;
94161  __Pyx_XDECREF(__pyx_t_1);
94162  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
94163  __pyx_r = NULL;
94164  __Pyx_XGIVEREF(__pyx_r);
94165  __Pyx_TraceReturn(__pyx_r, 0);
94166  __Pyx_RefNannyFinishContext();
94167  return __pyx_r;
94168 }
94169 
94170 /* "View.MemoryView":999
94171  *
94172  * @cname('__pyx_memoryview_fromslice')
94173  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
94174  * int ndim,
94175  * object (*to_object_func)(char *),
94176  */
94177 
94178 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
94179  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
94180  Py_ssize_t __pyx_v_suboffset;
94181  PyObject *__pyx_v_length = NULL;
94182  PyObject *__pyx_r = NULL;
94183  __Pyx_TraceDeclarations
94184  __Pyx_RefNannyDeclarations
94185  int __pyx_t_1;
94186  PyObject *__pyx_t_2 = NULL;
94187  PyObject *__pyx_t_3 = NULL;
94188  __Pyx_TypeInfo *__pyx_t_4;
94189  Py_buffer __pyx_t_5;
94190  Py_ssize_t *__pyx_t_6;
94191  Py_ssize_t *__pyx_t_7;
94192  Py_ssize_t *__pyx_t_8;
94193  Py_ssize_t __pyx_t_9;
94194  int __pyx_lineno = 0;
94195  const char *__pyx_filename = NULL;
94196  int __pyx_clineno = 0;
94197  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
94198  __Pyx_TraceCall("memoryview_fromslice", __pyx_f[1], 999, 0, __PYX_ERR(1, 999, __pyx_L1_error));
94199 
94200  /* "View.MemoryView":1007
94201  * cdef _memoryviewslice result
94202  *
94203  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
94204  * return None
94205  *
94206  */
94207  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
94208  if (__pyx_t_1) {
94209 
94210  /* "View.MemoryView":1008
94211  *
94212  * if <PyObject *> memviewslice.memview == Py_None:
94213  * return None # <<<<<<<<<<<<<<
94214  *
94215  *
94216  */
94217  __Pyx_XDECREF(__pyx_r);
94218  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
94219  goto __pyx_L0;
94220 
94221  /* "View.MemoryView":1007
94222  * cdef _memoryviewslice result
94223  *
94224  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
94225  * return None
94226  *
94227  */
94228  }
94229 
94230  /* "View.MemoryView":1013
94231  *
94232  *
94233  * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
94234  *
94235  * result.from_slice = memviewslice
94236  */
94237  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
94238  __Pyx_GOTREF(__pyx_t_2);
94239  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1013, __pyx_L1_error)
94240  __Pyx_GOTREF(__pyx_t_3);
94241  __Pyx_INCREF(Py_None);
94242  __Pyx_GIVEREF(Py_None);
94243  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
94244  __Pyx_INCREF(__pyx_int_0);
94245  __Pyx_GIVEREF(__pyx_int_0);
94246  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
94247  __Pyx_GIVEREF(__pyx_t_2);
94248  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
94249  __pyx_t_2 = 0;
94250  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1013, __pyx_L1_error)
94251  __Pyx_GOTREF(__pyx_t_2);
94252  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
94253  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
94254  __pyx_t_2 = 0;
94255 
94256  /* "View.MemoryView":1015
94257  * result = _memoryviewslice(None, 0, dtype_is_object)
94258  *
94259  * result.from_slice = memviewslice # <<<<<<<<<<<<<<
94260  * __PYX_INC_MEMVIEW(&memviewslice, 1)
94261  *
94262  */
94263  __pyx_v_result->from_slice = __pyx_v_memviewslice;
94264 
94265  /* "View.MemoryView":1016
94266  *
94267  * result.from_slice = memviewslice
94268  * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
94269  *
94270  * result.from_object = (<memoryview> memviewslice.memview).base
94271  */
94272  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
94273 
94274  /* "View.MemoryView":1018
94275  * __PYX_INC_MEMVIEW(&memviewslice, 1)
94276  *
94277  * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
94278  * result.typeinfo = memviewslice.memview.typeinfo
94279  *
94280  */
94281  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1018, __pyx_L1_error)
94282  __Pyx_GOTREF(__pyx_t_2);
94283  __Pyx_GIVEREF(__pyx_t_2);
94284  __Pyx_GOTREF(__pyx_v_result->from_object);
94285  __Pyx_DECREF(__pyx_v_result->from_object);
94286  __pyx_v_result->from_object = __pyx_t_2;
94287  __pyx_t_2 = 0;
94288 
94289  /* "View.MemoryView":1019
94290  *
94291  * result.from_object = (<memoryview> memviewslice.memview).base
94292  * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
94293  *
94294  * result.view = memviewslice.memview.view
94295  */
94296  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
94297  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
94298 
94299  /* "View.MemoryView":1021
94300  * result.typeinfo = memviewslice.memview.typeinfo
94301  *
94302  * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
94303  * result.view.buf = <void *> memviewslice.data
94304  * result.view.ndim = ndim
94305  */
94306  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
94307  __pyx_v_result->__pyx_base.view = __pyx_t_5;
94308 
94309  /* "View.MemoryView":1022
94310  *
94311  * result.view = memviewslice.memview.view
94312  * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
94313  * result.view.ndim = ndim
94314  * (<__pyx_buffer *> &result.view).obj = Py_None
94315  */
94316  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
94317 
94318  /* "View.MemoryView":1023
94319  * result.view = memviewslice.memview.view
94320  * result.view.buf = <void *> memviewslice.data
94321  * result.view.ndim = ndim # <<<<<<<<<<<<<<
94322  * (<__pyx_buffer *> &result.view).obj = Py_None
94323  * Py_INCREF(Py_None)
94324  */
94325  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
94326 
94327  /* "View.MemoryView":1024
94328  * result.view.buf = <void *> memviewslice.data
94329  * result.view.ndim = ndim
94330  * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
94331  * Py_INCREF(Py_None)
94332  *
94333  */
94334  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
94335 
94336  /* "View.MemoryView":1025
94337  * result.view.ndim = ndim
94338  * (<__pyx_buffer *> &result.view).obj = Py_None
94339  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
94340  *
94341  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
94342  */
94343  Py_INCREF(Py_None);
94344 
94345  /* "View.MemoryView":1027
94346  * Py_INCREF(Py_None)
94347  *
94348  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
94349  * result.flags = PyBUF_RECORDS
94350  * else:
94351  */
94352  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
94353  if (__pyx_t_1) {
94354 
94355  /* "View.MemoryView":1028
94356  *
94357  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
94358  * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
94359  * else:
94360  * result.flags = PyBUF_RECORDS_RO
94361  */
94362  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
94363 
94364  /* "View.MemoryView":1027
94365  * Py_INCREF(Py_None)
94366  *
94367  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
94368  * result.flags = PyBUF_RECORDS
94369  * else:
94370  */
94371  goto __pyx_L4;
94372  }
94373 
94374  /* "View.MemoryView":1030
94375  * result.flags = PyBUF_RECORDS
94376  * else:
94377  * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
94378  *
94379  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
94380  */
94381  /*else*/ {
94382  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
94383  }
94384  __pyx_L4:;
94385 
94386  /* "View.MemoryView":1032
94387  * result.flags = PyBUF_RECORDS_RO
94388  *
94389  * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
94390  * result.view.strides = <Py_ssize_t *> result.from_slice.strides
94391  *
94392  */
94393  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
94394 
94395  /* "View.MemoryView":1033
94396  *
94397  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
94398  * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
94399  *
94400  *
94401  */
94402  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
94403 
94404  /* "View.MemoryView":1036
94405  *
94406  *
94407  * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
94408  * for suboffset in result.from_slice.suboffsets[:ndim]:
94409  * if suboffset >= 0:
94410  */
94411  __pyx_v_result->__pyx_base.view.suboffsets = NULL;
94412 
94413  /* "View.MemoryView":1037
94414  *
94415  * result.view.suboffsets = NULL
94416  * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
94417  * if suboffset >= 0:
94418  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
94419  */
94420  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
94421  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
94422  __pyx_t_6 = __pyx_t_8;
94423  __pyx_v_suboffset = (__pyx_t_6[0]);
94424 
94425  /* "View.MemoryView":1038
94426  * result.view.suboffsets = NULL
94427  * for suboffset in result.from_slice.suboffsets[:ndim]:
94428  * if suboffset >= 0: # <<<<<<<<<<<<<<
94429  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
94430  * break
94431  */
94432  __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
94433  if (__pyx_t_1) {
94434 
94435  /* "View.MemoryView":1039
94436  * for suboffset in result.from_slice.suboffsets[:ndim]:
94437  * if suboffset >= 0:
94438  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
94439  * break
94440  *
94441  */
94442  __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
94443 
94444  /* "View.MemoryView":1040
94445  * if suboffset >= 0:
94446  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
94447  * break # <<<<<<<<<<<<<<
94448  *
94449  * result.view.len = result.view.itemsize
94450  */
94451  goto __pyx_L6_break;
94452 
94453  /* "View.MemoryView":1038
94454  * result.view.suboffsets = NULL
94455  * for suboffset in result.from_slice.suboffsets[:ndim]:
94456  * if suboffset >= 0: # <<<<<<<<<<<<<<
94457  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
94458  * break
94459  */
94460  }
94461  }
94462  __pyx_L6_break:;
94463 
94464  /* "View.MemoryView":1042
94465  * break
94466  *
94467  * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
94468  * for length in result.view.shape[:ndim]:
94469  * result.view.len *= length
94470  */
94471  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
94472  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
94473 
94474  /* "View.MemoryView":1043
94475  *
94476  * result.view.len = result.view.itemsize
94477  * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
94478  * result.view.len *= length
94479  *
94480  */
94481  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
94482  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
94483  __pyx_t_6 = __pyx_t_8;
94484  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1043, __pyx_L1_error)
94485  __Pyx_GOTREF(__pyx_t_2);
94486  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
94487  __pyx_t_2 = 0;
94488 
94489  /* "View.MemoryView":1044
94490  * result.view.len = result.view.itemsize
94491  * for length in result.view.shape[:ndim]:
94492  * result.view.len *= length # <<<<<<<<<<<<<<
94493  *
94494  * result.to_object_func = to_object_func
94495  */
94496  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1044, __pyx_L1_error)
94497  __Pyx_GOTREF(__pyx_t_2);
94498  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1044, __pyx_L1_error)
94499  __Pyx_GOTREF(__pyx_t_3);
94500  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
94501  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 1044, __pyx_L1_error)
94502  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
94503  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
94504  }
94505 
94506  /* "View.MemoryView":1046
94507  * result.view.len *= length
94508  *
94509  * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
94510  * result.to_dtype_func = to_dtype_func
94511  *
94512  */
94513  __pyx_v_result->to_object_func = __pyx_v_to_object_func;
94514 
94515  /* "View.MemoryView":1047
94516  *
94517  * result.to_object_func = to_object_func
94518  * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
94519  *
94520  * return result
94521  */
94522  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
94523 
94524  /* "View.MemoryView":1049
94525  * result.to_dtype_func = to_dtype_func
94526  *
94527  * return result # <<<<<<<<<<<<<<
94528  *
94529  * @cname('__pyx_memoryview_get_slice_from_memoryview')
94530  */
94531  __Pyx_XDECREF(__pyx_r);
94532  __Pyx_INCREF(((PyObject *)__pyx_v_result));
94533  __pyx_r = ((PyObject *)__pyx_v_result);
94534  goto __pyx_L0;
94535 
94536  /* "View.MemoryView":999
94537  *
94538  * @cname('__pyx_memoryview_fromslice')
94539  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
94540  * int ndim,
94541  * object (*to_object_func)(char *),
94542  */
94543 
94544  /* function exit code */
94545  __pyx_L1_error:;
94546  __Pyx_XDECREF(__pyx_t_2);
94547  __Pyx_XDECREF(__pyx_t_3);
94548  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
94549  __pyx_r = 0;
94550  __pyx_L0:;
94551  __Pyx_XDECREF((PyObject *)__pyx_v_result);
94552  __Pyx_XDECREF(__pyx_v_length);
94553  __Pyx_XGIVEREF(__pyx_r);
94554  __Pyx_TraceReturn(__pyx_r, 0);
94555  __Pyx_RefNannyFinishContext();
94556  return __pyx_r;
94557 }
94558 
94559 /* "View.MemoryView":1052
94560  *
94561  * @cname('__pyx_memoryview_get_slice_from_memoryview')
94562  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
94563  * __Pyx_memviewslice *mslice) except NULL:
94564  * cdef _memoryviewslice obj
94565  */
94566 
94567 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
94568  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
94569  __Pyx_memviewslice *__pyx_r;
94570  __Pyx_TraceDeclarations
94571  __Pyx_RefNannyDeclarations
94572  int __pyx_t_1;
94573  int __pyx_t_2;
94574  PyObject *__pyx_t_3 = NULL;
94575  int __pyx_lineno = 0;
94576  const char *__pyx_filename = NULL;
94577  int __pyx_clineno = 0;
94578  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
94579  __Pyx_TraceCall("get_slice_from_memview", __pyx_f[1], 1052, 0, __PYX_ERR(1, 1052, __pyx_L1_error));
94580 
94581  /* "View.MemoryView":1055
94582  * __Pyx_memviewslice *mslice) except NULL:
94583  * cdef _memoryviewslice obj
94584  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
94585  * obj = memview
94586  * return &obj.from_slice
94587  */
94588  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
94589  __pyx_t_2 = (__pyx_t_1 != 0);
94590  if (__pyx_t_2) {
94591 
94592  /* "View.MemoryView":1056
94593  * cdef _memoryviewslice obj
94594  * if isinstance(memview, _memoryviewslice):
94595  * obj = memview # <<<<<<<<<<<<<<
94596  * return &obj.from_slice
94597  * else:
94598  */
94599  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(1, 1056, __pyx_L1_error)
94600  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
94601  __Pyx_INCREF(__pyx_t_3);
94602  __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
94603  __pyx_t_3 = 0;
94604 
94605  /* "View.MemoryView":1057
94606  * if isinstance(memview, _memoryviewslice):
94607  * obj = memview
94608  * return &obj.from_slice # <<<<<<<<<<<<<<
94609  * else:
94610  * slice_copy(memview, mslice)
94611  */
94612  __pyx_r = (&__pyx_v_obj->from_slice);
94613  goto __pyx_L0;
94614 
94615  /* "View.MemoryView":1055
94616  * __Pyx_memviewslice *mslice) except NULL:
94617  * cdef _memoryviewslice obj
94618  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
94619  * obj = memview
94620  * return &obj.from_slice
94621  */
94622  }
94623 
94624  /* "View.MemoryView":1059
94625  * return &obj.from_slice
94626  * else:
94627  * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
94628  * return mslice
94629  *
94630  */
94631  /*else*/ {
94632  __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
94633 
94634  /* "View.MemoryView":1060
94635  * else:
94636  * slice_copy(memview, mslice)
94637  * return mslice # <<<<<<<<<<<<<<
94638  *
94639  * @cname('__pyx_memoryview_slice_copy')
94640  */
94641  __pyx_r = __pyx_v_mslice;
94642  goto __pyx_L0;
94643  }
94644 
94645  /* "View.MemoryView":1052
94646  *
94647  * @cname('__pyx_memoryview_get_slice_from_memoryview')
94648  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
94649  * __Pyx_memviewslice *mslice) except NULL:
94650  * cdef _memoryviewslice obj
94651  */
94652 
94653  /* function exit code */
94654  __pyx_L1_error:;
94655  __Pyx_XDECREF(__pyx_t_3);
94656  __Pyx_AddTraceback("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
94657  __pyx_r = NULL;
94658  __pyx_L0:;
94659  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
94660  __Pyx_TraceReturn(Py_None, 0);
94661  __Pyx_RefNannyFinishContext();
94662  return __pyx_r;
94663 }
94664 
94665 /* "View.MemoryView":1063
94666  *
94667  * @cname('__pyx_memoryview_slice_copy')
94668  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
94669  * cdef int dim
94670  * cdef (Py_ssize_t*) shape, strides, suboffsets
94671  */
94672 
94673 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
94674  int __pyx_v_dim;
94675  Py_ssize_t *__pyx_v_shape;
94676  Py_ssize_t *__pyx_v_strides;
94677  Py_ssize_t *__pyx_v_suboffsets;
94678  __Pyx_TraceDeclarations
94679  __Pyx_RefNannyDeclarations
94680  Py_ssize_t *__pyx_t_1;
94681  int __pyx_t_2;
94682  int __pyx_t_3;
94683  int __pyx_t_4;
94684  Py_ssize_t __pyx_t_5;
94685  int __pyx_lineno = 0;
94686  const char *__pyx_filename = NULL;
94687  int __pyx_clineno = 0;
94688  __Pyx_RefNannySetupContext("slice_copy", 0);
94689  __Pyx_TraceCall("slice_copy", __pyx_f[1], 1063, 0, __PYX_ERR(1, 1063, __pyx_L1_error));
94690 
94691  /* "View.MemoryView":1067
94692  * cdef (Py_ssize_t*) shape, strides, suboffsets
94693  *
94694  * shape = memview.view.shape # <<<<<<<<<<<<<<
94695  * strides = memview.view.strides
94696  * suboffsets = memview.view.suboffsets
94697  */
94698  __pyx_t_1 = __pyx_v_memview->view.shape;
94699  __pyx_v_shape = __pyx_t_1;
94700 
94701  /* "View.MemoryView":1068
94702  *
94703  * shape = memview.view.shape
94704  * strides = memview.view.strides # <<<<<<<<<<<<<<
94705  * suboffsets = memview.view.suboffsets
94706  *
94707  */
94708  __pyx_t_1 = __pyx_v_memview->view.strides;
94709  __pyx_v_strides = __pyx_t_1;
94710 
94711  /* "View.MemoryView":1069
94712  * shape = memview.view.shape
94713  * strides = memview.view.strides
94714  * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
94715  *
94716  * dst.memview = <__pyx_memoryview *> memview
94717  */
94718  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
94719  __pyx_v_suboffsets = __pyx_t_1;
94720 
94721  /* "View.MemoryView":1071
94722  * suboffsets = memview.view.suboffsets
94723  *
94724  * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
94725  * dst.data = <char *> memview.view.buf
94726  *
94727  */
94728  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
94729 
94730  /* "View.MemoryView":1072
94731  *
94732  * dst.memview = <__pyx_memoryview *> memview
94733  * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
94734  *
94735  * for dim in range(memview.view.ndim):
94736  */
94737  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
94738 
94739  /* "View.MemoryView":1074
94740  * dst.data = <char *> memview.view.buf
94741  *
94742  * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
94743  * dst.shape[dim] = shape[dim]
94744  * dst.strides[dim] = strides[dim]
94745  */
94746  __pyx_t_2 = __pyx_v_memview->view.ndim;
94747  __pyx_t_3 = __pyx_t_2;
94748  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
94749  __pyx_v_dim = __pyx_t_4;
94750 
94751  /* "View.MemoryView":1075
94752  *
94753  * for dim in range(memview.view.ndim):
94754  * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
94755  * dst.strides[dim] = strides[dim]
94756  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
94757  */
94758  (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
94759 
94760  /* "View.MemoryView":1076
94761  * for dim in range(memview.view.ndim):
94762  * dst.shape[dim] = shape[dim]
94763  * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
94764  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
94765  *
94766  */
94767  (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
94768 
94769  /* "View.MemoryView":1077
94770  * dst.shape[dim] = shape[dim]
94771  * dst.strides[dim] = strides[dim]
94772  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
94773  *
94774  * @cname('__pyx_memoryview_copy_object')
94775  */
94776  if ((__pyx_v_suboffsets != 0)) {
94777  __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
94778  } else {
94779  __pyx_t_5 = -1L;
94780  }
94781  (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
94782  }
94783 
94784  /* "View.MemoryView":1063
94785  *
94786  * @cname('__pyx_memoryview_slice_copy')
94787  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
94788  * cdef int dim
94789  * cdef (Py_ssize_t*) shape, strides, suboffsets
94790  */
94791 
94792  /* function exit code */
94793  goto __pyx_L0;
94794  __pyx_L1_error:;
94795  __Pyx_WriteUnraisable("View.MemoryView.slice_copy", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
94796  __pyx_L0:;
94797  __Pyx_TraceReturn(Py_None, 0);
94798  __Pyx_RefNannyFinishContext();
94799 }
94800 
94801 /* "View.MemoryView":1080
94802  *
94803  * @cname('__pyx_memoryview_copy_object')
94804  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
94805  * "Create a new memoryview object"
94806  * cdef __Pyx_memviewslice memviewslice
94807  */
94808 
94809 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
94810  __Pyx_memviewslice __pyx_v_memviewslice;
94811  PyObject *__pyx_r = NULL;
94812  __Pyx_TraceDeclarations
94813  __Pyx_RefNannyDeclarations
94814  PyObject *__pyx_t_1 = NULL;
94815  int __pyx_lineno = 0;
94816  const char *__pyx_filename = NULL;
94817  int __pyx_clineno = 0;
94818  __Pyx_RefNannySetupContext("memoryview_copy", 0);
94819  __Pyx_TraceCall("memoryview_copy", __pyx_f[1], 1080, 0, __PYX_ERR(1, 1080, __pyx_L1_error));
94820 
94821  /* "View.MemoryView":1083
94822  * "Create a new memoryview object"
94823  * cdef __Pyx_memviewslice memviewslice
94824  * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
94825  * return memoryview_copy_from_slice(memview, &memviewslice)
94826  *
94827  */
94828  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
94829 
94830  /* "View.MemoryView":1084
94831  * cdef __Pyx_memviewslice memviewslice
94832  * slice_copy(memview, &memviewslice)
94833  * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
94834  *
94835  * @cname('__pyx_memoryview_copy_object_from_slice')
94836  */
94837  __Pyx_XDECREF(__pyx_r);
94838  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1084, __pyx_L1_error)
94839  __Pyx_GOTREF(__pyx_t_1);
94840  __pyx_r = __pyx_t_1;
94841  __pyx_t_1 = 0;
94842  goto __pyx_L0;
94843 
94844  /* "View.MemoryView":1080
94845  *
94846  * @cname('__pyx_memoryview_copy_object')
94847  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
94848  * "Create a new memoryview object"
94849  * cdef __Pyx_memviewslice memviewslice
94850  */
94851 
94852  /* function exit code */
94853  __pyx_L1_error:;
94854  __Pyx_XDECREF(__pyx_t_1);
94855  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
94856  __pyx_r = 0;
94857  __pyx_L0:;
94858  __Pyx_XGIVEREF(__pyx_r);
94859  __Pyx_TraceReturn(__pyx_r, 0);
94860  __Pyx_RefNannyFinishContext();
94861  return __pyx_r;
94862 }
94863 
94864 /* "View.MemoryView":1087
94865  *
94866  * @cname('__pyx_memoryview_copy_object_from_slice')
94867  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
94868  * """
94869  * Create a new memoryview object from a given memoryview object and slice.
94870  */
94871 
94872 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
94873  PyObject *(*__pyx_v_to_object_func)(char *);
94874  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
94875  PyObject *__pyx_r = NULL;
94876  __Pyx_TraceDeclarations
94877  __Pyx_RefNannyDeclarations
94878  int __pyx_t_1;
94879  int __pyx_t_2;
94880  PyObject *(*__pyx_t_3)(char *);
94881  int (*__pyx_t_4)(char *, PyObject *);
94882  PyObject *__pyx_t_5 = NULL;
94883  int __pyx_lineno = 0;
94884  const char *__pyx_filename = NULL;
94885  int __pyx_clineno = 0;
94886  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
94887  __Pyx_TraceCall("memoryview_copy_from_slice", __pyx_f[1], 1087, 0, __PYX_ERR(1, 1087, __pyx_L1_error));
94888 
94889  /* "View.MemoryView":1094
94890  * cdef int (*to_dtype_func)(char *, object) except 0
94891  *
94892  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
94893  * to_object_func = (<_memoryviewslice> memview).to_object_func
94894  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
94895  */
94896  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
94897  __pyx_t_2 = (__pyx_t_1 != 0);
94898  if (__pyx_t_2) {
94899 
94900  /* "View.MemoryView":1095
94901  *
94902  * if isinstance(memview, _memoryviewslice):
94903  * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
94904  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
94905  * else:
94906  */
94907  __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
94908  __pyx_v_to_object_func = __pyx_t_3;
94909 
94910  /* "View.MemoryView":1096
94911  * if isinstance(memview, _memoryviewslice):
94912  * to_object_func = (<_memoryviewslice> memview).to_object_func
94913  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
94914  * else:
94915  * to_object_func = NULL
94916  */
94917  __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
94918  __pyx_v_to_dtype_func = __pyx_t_4;
94919 
94920  /* "View.MemoryView":1094
94921  * cdef int (*to_dtype_func)(char *, object) except 0
94922  *
94923  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
94924  * to_object_func = (<_memoryviewslice> memview).to_object_func
94925  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
94926  */
94927  goto __pyx_L3;
94928  }
94929 
94930  /* "View.MemoryView":1098
94931  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
94932  * else:
94933  * to_object_func = NULL # <<<<<<<<<<<<<<
94934  * to_dtype_func = NULL
94935  *
94936  */
94937  /*else*/ {
94938  __pyx_v_to_object_func = NULL;
94939 
94940  /* "View.MemoryView":1099
94941  * else:
94942  * to_object_func = NULL
94943  * to_dtype_func = NULL # <<<<<<<<<<<<<<
94944  *
94945  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
94946  */
94947  __pyx_v_to_dtype_func = NULL;
94948  }
94949  __pyx_L3:;
94950 
94951  /* "View.MemoryView":1101
94952  * to_dtype_func = NULL
94953  *
94954  * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
94955  * to_object_func, to_dtype_func,
94956  * memview.dtype_is_object)
94957  */
94958  __Pyx_XDECREF(__pyx_r);
94959 
94960  /* "View.MemoryView":1103
94961  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
94962  * to_object_func, to_dtype_func,
94963  * memview.dtype_is_object) # <<<<<<<<<<<<<<
94964  *
94965  *
94966  */
94967  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 1101, __pyx_L1_error)
94968  __Pyx_GOTREF(__pyx_t_5);
94969  __pyx_r = __pyx_t_5;
94970  __pyx_t_5 = 0;
94971  goto __pyx_L0;
94972 
94973  /* "View.MemoryView":1087
94974  *
94975  * @cname('__pyx_memoryview_copy_object_from_slice')
94976  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
94977  * """
94978  * Create a new memoryview object from a given memoryview object and slice.
94979  */
94980 
94981  /* function exit code */
94982  __pyx_L1_error:;
94983  __Pyx_XDECREF(__pyx_t_5);
94984  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
94985  __pyx_r = 0;
94986  __pyx_L0:;
94987  __Pyx_XGIVEREF(__pyx_r);
94988  __Pyx_TraceReturn(__pyx_r, 0);
94989  __Pyx_RefNannyFinishContext();
94990  return __pyx_r;
94991 }
94992 
94993 /* "View.MemoryView":1109
94994  *
94995  *
94996  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
94997  * if arg < 0:
94998  * return -arg
94999  */
95000 
95001 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
95002  Py_ssize_t __pyx_r;
95003  __Pyx_TraceDeclarations
95004  int __pyx_t_1;
95005  int __pyx_lineno = 0;
95006  const char *__pyx_filename = NULL;
95007  int __pyx_clineno = 0;
95008  __Pyx_TraceCall("abs_py_ssize_t", __pyx_f[1], 1109, 1, __PYX_ERR(1, 1109, __pyx_L1_error));
95009 
95010  /* "View.MemoryView":1110
95011  *
95012  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
95013  * if arg < 0: # <<<<<<<<<<<<<<
95014  * return -arg
95015  * else:
95016  */
95017  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
95018  if (__pyx_t_1) {
95019 
95020  /* "View.MemoryView":1111
95021  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
95022  * if arg < 0:
95023  * return -arg # <<<<<<<<<<<<<<
95024  * else:
95025  * return arg
95026  */
95027  __pyx_r = (-__pyx_v_arg);
95028  goto __pyx_L0;
95029 
95030  /* "View.MemoryView":1110
95031  *
95032  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
95033  * if arg < 0: # <<<<<<<<<<<<<<
95034  * return -arg
95035  * else:
95036  */
95037  }
95038 
95039  /* "View.MemoryView":1113
95040  * return -arg
95041  * else:
95042  * return arg # <<<<<<<<<<<<<<
95043  *
95044  * @cname('__pyx_get_best_slice_order')
95045  */
95046  /*else*/ {
95047  __pyx_r = __pyx_v_arg;
95048  goto __pyx_L0;
95049  }
95050 
95051  /* "View.MemoryView":1109
95052  *
95053  *
95054  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
95055  * if arg < 0:
95056  * return -arg
95057  */
95058 
95059  /* function exit code */
95060  __pyx_L1_error:;
95061  __Pyx_WriteUnraisable("View.MemoryView.abs_py_ssize_t", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
95062  __pyx_r = 0;
95063  __pyx_L0:;
95064  __Pyx_TraceReturn(Py_None, 1);
95065  return __pyx_r;
95066 }
95067 
95068 /* "View.MemoryView":1116
95069  *
95070  * @cname('__pyx_get_best_slice_order')
95071  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
95072  * """
95073  * Figure out the best memory access order for a given slice.
95074  */
95075 
95076 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
95077  int __pyx_v_i;
95078  Py_ssize_t __pyx_v_c_stride;
95079  Py_ssize_t __pyx_v_f_stride;
95080  char __pyx_r;
95081  __Pyx_TraceDeclarations
95082  int __pyx_t_1;
95083  int __pyx_t_2;
95084  int __pyx_t_3;
95085  int __pyx_t_4;
95086  int __pyx_lineno = 0;
95087  const char *__pyx_filename = NULL;
95088  int __pyx_clineno = 0;
95089  __Pyx_TraceCall("get_best_order", __pyx_f[1], 1116, 1, __PYX_ERR(1, 1116, __pyx_L1_error));
95090 
95091  /* "View.MemoryView":1121
95092  * """
95093  * cdef int i
95094  * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
95095  * cdef Py_ssize_t f_stride = 0
95096  *
95097  */
95098  __pyx_v_c_stride = 0;
95099 
95100  /* "View.MemoryView":1122
95101  * cdef int i
95102  * cdef Py_ssize_t c_stride = 0
95103  * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
95104  *
95105  * for i in range(ndim - 1, -1, -1):
95106  */
95107  __pyx_v_f_stride = 0;
95108 
95109  /* "View.MemoryView":1124
95110  * cdef Py_ssize_t f_stride = 0
95111  *
95112  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
95113  * if mslice.shape[i] > 1:
95114  * c_stride = mslice.strides[i]
95115  */
95116  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
95117  __pyx_v_i = __pyx_t_1;
95118 
95119  /* "View.MemoryView":1125
95120  *
95121  * for i in range(ndim - 1, -1, -1):
95122  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
95123  * c_stride = mslice.strides[i]
95124  * break
95125  */
95126  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
95127  if (__pyx_t_2) {
95128 
95129  /* "View.MemoryView":1126
95130  * for i in range(ndim - 1, -1, -1):
95131  * if mslice.shape[i] > 1:
95132  * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
95133  * break
95134  *
95135  */
95136  __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
95137 
95138  /* "View.MemoryView":1127
95139  * if mslice.shape[i] > 1:
95140  * c_stride = mslice.strides[i]
95141  * break # <<<<<<<<<<<<<<
95142  *
95143  * for i in range(ndim):
95144  */
95145  goto __pyx_L4_break;
95146 
95147  /* "View.MemoryView":1125
95148  *
95149  * for i in range(ndim - 1, -1, -1):
95150  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
95151  * c_stride = mslice.strides[i]
95152  * break
95153  */
95154  }
95155  }
95156  __pyx_L4_break:;
95157 
95158  /* "View.MemoryView":1129
95159  * break
95160  *
95161  * for i in range(ndim): # <<<<<<<<<<<<<<
95162  * if mslice.shape[i] > 1:
95163  * f_stride = mslice.strides[i]
95164  */
95165  __pyx_t_1 = __pyx_v_ndim;
95166  __pyx_t_3 = __pyx_t_1;
95167  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
95168  __pyx_v_i = __pyx_t_4;
95169 
95170  /* "View.MemoryView":1130
95171  *
95172  * for i in range(ndim):
95173  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
95174  * f_stride = mslice.strides[i]
95175  * break
95176  */
95177  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
95178  if (__pyx_t_2) {
95179 
95180  /* "View.MemoryView":1131
95181  * for i in range(ndim):
95182  * if mslice.shape[i] > 1:
95183  * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
95184  * break
95185  *
95186  */
95187  __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
95188 
95189  /* "View.MemoryView":1132
95190  * if mslice.shape[i] > 1:
95191  * f_stride = mslice.strides[i]
95192  * break # <<<<<<<<<<<<<<
95193  *
95194  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
95195  */
95196  goto __pyx_L7_break;
95197 
95198  /* "View.MemoryView":1130
95199  *
95200  * for i in range(ndim):
95201  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
95202  * f_stride = mslice.strides[i]
95203  * break
95204  */
95205  }
95206  }
95207  __pyx_L7_break:;
95208 
95209  /* "View.MemoryView":1134
95210  * break
95211  *
95212  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
95213  * return 'C'
95214  * else:
95215  */
95216  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
95217  if (__pyx_t_2) {
95218 
95219  /* "View.MemoryView":1135
95220  *
95221  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
95222  * return 'C' # <<<<<<<<<<<<<<
95223  * else:
95224  * return 'F'
95225  */
95226  __pyx_r = 'C';
95227  goto __pyx_L0;
95228 
95229  /* "View.MemoryView":1134
95230  * break
95231  *
95232  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
95233  * return 'C'
95234  * else:
95235  */
95236  }
95237 
95238  /* "View.MemoryView":1137
95239  * return 'C'
95240  * else:
95241  * return 'F' # <<<<<<<<<<<<<<
95242  *
95243  * @cython.cdivision(True)
95244  */
95245  /*else*/ {
95246  __pyx_r = 'F';
95247  goto __pyx_L0;
95248  }
95249 
95250  /* "View.MemoryView":1116
95251  *
95252  * @cname('__pyx_get_best_slice_order')
95253  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
95254  * """
95255  * Figure out the best memory access order for a given slice.
95256  */
95257 
95258  /* function exit code */
95259  __pyx_L1_error:;
95260  __Pyx_WriteUnraisable("View.MemoryView.get_best_order", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
95261  __pyx_r = 0;
95262  __pyx_L0:;
95263  __Pyx_TraceReturn(Py_None, 1);
95264  return __pyx_r;
95265 }
95266 
95267 /* "View.MemoryView":1140
95268  *
95269  * @cython.cdivision(True)
95270  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
95271  * char *dst_data, Py_ssize_t *dst_strides,
95272  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
95273  */
95274 
95275 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
95276  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
95277  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
95278  Py_ssize_t __pyx_v_dst_extent;
95279  Py_ssize_t __pyx_v_src_stride;
95280  Py_ssize_t __pyx_v_dst_stride;
95281  int __pyx_t_1;
95282  int __pyx_t_2;
95283  int __pyx_t_3;
95284  Py_ssize_t __pyx_t_4;
95285  Py_ssize_t __pyx_t_5;
95286  Py_ssize_t __pyx_t_6;
95287 
95288  /* "View.MemoryView":1147
95289  *
95290  * cdef Py_ssize_t i
95291  * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
95292  * cdef Py_ssize_t dst_extent = dst_shape[0]
95293  * cdef Py_ssize_t src_stride = src_strides[0]
95294  */
95295  __pyx_v_src_extent = (__pyx_v_src_shape[0]);
95296 
95297  /* "View.MemoryView":1148
95298  * cdef Py_ssize_t i
95299  * cdef Py_ssize_t src_extent = src_shape[0]
95300  * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
95301  * cdef Py_ssize_t src_stride = src_strides[0]
95302  * cdef Py_ssize_t dst_stride = dst_strides[0]
95303  */
95304  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
95305 
95306  /* "View.MemoryView":1149
95307  * cdef Py_ssize_t src_extent = src_shape[0]
95308  * cdef Py_ssize_t dst_extent = dst_shape[0]
95309  * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
95310  * cdef Py_ssize_t dst_stride = dst_strides[0]
95311  *
95312  */
95313  __pyx_v_src_stride = (__pyx_v_src_strides[0]);
95314 
95315  /* "View.MemoryView":1150
95316  * cdef Py_ssize_t dst_extent = dst_shape[0]
95317  * cdef Py_ssize_t src_stride = src_strides[0]
95318  * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
95319  *
95320  * if ndim == 1:
95321  */
95322  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
95323 
95324  /* "View.MemoryView":1152
95325  * cdef Py_ssize_t dst_stride = dst_strides[0]
95326  *
95327  * if ndim == 1: # <<<<<<<<<<<<<<
95328  * if (src_stride > 0 and dst_stride > 0 and
95329  * <size_t> src_stride == itemsize == <size_t> dst_stride):
95330  */
95331  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
95332  if (__pyx_t_1) {
95333 
95334  /* "View.MemoryView":1153
95335  *
95336  * if ndim == 1:
95337  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
95338  * <size_t> src_stride == itemsize == <size_t> dst_stride):
95339  * memcpy(dst_data, src_data, itemsize * dst_extent)
95340  */
95341  __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
95342  if (__pyx_t_2) {
95343  } else {
95344  __pyx_t_1 = __pyx_t_2;
95345  goto __pyx_L5_bool_binop_done;
95346  }
95347  __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
95348  if (__pyx_t_2) {
95349  } else {
95350  __pyx_t_1 = __pyx_t_2;
95351  goto __pyx_L5_bool_binop_done;
95352  }
95353 
95354  /* "View.MemoryView":1154
95355  * if ndim == 1:
95356  * if (src_stride > 0 and dst_stride > 0 and
95357  * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
95358  * memcpy(dst_data, src_data, itemsize * dst_extent)
95359  * else:
95360  */
95361  __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
95362  if (__pyx_t_2) {
95363  __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
95364  }
95365  __pyx_t_3 = (__pyx_t_2 != 0);
95366  __pyx_t_1 = __pyx_t_3;
95367  __pyx_L5_bool_binop_done:;
95368 
95369  /* "View.MemoryView":1153
95370  *
95371  * if ndim == 1:
95372  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
95373  * <size_t> src_stride == itemsize == <size_t> dst_stride):
95374  * memcpy(dst_data, src_data, itemsize * dst_extent)
95375  */
95376  if (__pyx_t_1) {
95377 
95378  /* "View.MemoryView":1155
95379  * if (src_stride > 0 and dst_stride > 0 and
95380  * <size_t> src_stride == itemsize == <size_t> dst_stride):
95381  * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
95382  * else:
95383  * for i in range(dst_extent):
95384  */
95385  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
95386 
95387  /* "View.MemoryView":1153
95388  *
95389  * if ndim == 1:
95390  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
95391  * <size_t> src_stride == itemsize == <size_t> dst_stride):
95392  * memcpy(dst_data, src_data, itemsize * dst_extent)
95393  */
95394  goto __pyx_L4;
95395  }
95396 
95397  /* "View.MemoryView":1157
95398  * memcpy(dst_data, src_data, itemsize * dst_extent)
95399  * else:
95400  * for i in range(dst_extent): # <<<<<<<<<<<<<<
95401  * memcpy(dst_data, src_data, itemsize)
95402  * src_data += src_stride
95403  */
95404  /*else*/ {
95405  __pyx_t_4 = __pyx_v_dst_extent;
95406  __pyx_t_5 = __pyx_t_4;
95407  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
95408  __pyx_v_i = __pyx_t_6;
95409 
95410  /* "View.MemoryView":1158
95411  * else:
95412  * for i in range(dst_extent):
95413  * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
95414  * src_data += src_stride
95415  * dst_data += dst_stride
95416  */
95417  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
95418 
95419  /* "View.MemoryView":1159
95420  * for i in range(dst_extent):
95421  * memcpy(dst_data, src_data, itemsize)
95422  * src_data += src_stride # <<<<<<<<<<<<<<
95423  * dst_data += dst_stride
95424  * else:
95425  */
95426  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
95427 
95428  /* "View.MemoryView":1160
95429  * memcpy(dst_data, src_data, itemsize)
95430  * src_data += src_stride
95431  * dst_data += dst_stride # <<<<<<<<<<<<<<
95432  * else:
95433  * for i in range(dst_extent):
95434  */
95435  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
95436  }
95437  }
95438  __pyx_L4:;
95439 
95440  /* "View.MemoryView":1152
95441  * cdef Py_ssize_t dst_stride = dst_strides[0]
95442  *
95443  * if ndim == 1: # <<<<<<<<<<<<<<
95444  * if (src_stride > 0 and dst_stride > 0 and
95445  * <size_t> src_stride == itemsize == <size_t> dst_stride):
95446  */
95447  goto __pyx_L3;
95448  }
95449 
95450  /* "View.MemoryView":1162
95451  * dst_data += dst_stride
95452  * else:
95453  * for i in range(dst_extent): # <<<<<<<<<<<<<<
95454  * _copy_strided_to_strided(src_data, src_strides + 1,
95455  * dst_data, dst_strides + 1,
95456  */
95457  /*else*/ {
95458  __pyx_t_4 = __pyx_v_dst_extent;
95459  __pyx_t_5 = __pyx_t_4;
95460  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
95461  __pyx_v_i = __pyx_t_6;
95462 
95463  /* "View.MemoryView":1163
95464  * else:
95465  * for i in range(dst_extent):
95466  * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
95467  * dst_data, dst_strides + 1,
95468  * src_shape + 1, dst_shape + 1,
95469  */
95470  _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
95471 
95472  /* "View.MemoryView":1167
95473  * src_shape + 1, dst_shape + 1,
95474  * ndim - 1, itemsize)
95475  * src_data += src_stride # <<<<<<<<<<<<<<
95476  * dst_data += dst_stride
95477  *
95478  */
95479  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
95480 
95481  /* "View.MemoryView":1168
95482  * ndim - 1, itemsize)
95483  * src_data += src_stride
95484  * dst_data += dst_stride # <<<<<<<<<<<<<<
95485  *
95486  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
95487  */
95488  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
95489  }
95490  }
95491  __pyx_L3:;
95492 
95493  /* "View.MemoryView":1140
95494  *
95495  * @cython.cdivision(True)
95496  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
95497  * char *dst_data, Py_ssize_t *dst_strides,
95498  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
95499  */
95500 
95501  /* function exit code */
95502 }
95503 
95504 /* "View.MemoryView":1170
95505  * dst_data += dst_stride
95506  *
95507  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
95508  * __Pyx_memviewslice *dst,
95509  * int ndim, size_t itemsize) nogil:
95510  */
95511 
95512 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
95513  __Pyx_TraceDeclarations
95514  int __pyx_lineno = 0;
95515  const char *__pyx_filename = NULL;
95516  int __pyx_clineno = 0;
95517  __Pyx_TraceCall("copy_strided_to_strided", __pyx_f[1], 1170, 1, __PYX_ERR(1, 1170, __pyx_L1_error));
95518 
95519  /* "View.MemoryView":1173
95520  * __Pyx_memviewslice *dst,
95521  * int ndim, size_t itemsize) nogil:
95522  * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
95523  * src.shape, dst.shape, ndim, itemsize)
95524  *
95525  */
95526  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
95527 
95528  /* "View.MemoryView":1170
95529  * dst_data += dst_stride
95530  *
95531  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
95532  * __Pyx_memviewslice *dst,
95533  * int ndim, size_t itemsize) nogil:
95534  */
95535 
95536  /* function exit code */
95537  goto __pyx_L0;
95538  __pyx_L1_error:;
95539  __Pyx_WriteUnraisable("View.MemoryView.copy_strided_to_strided", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
95540  __pyx_L0:;
95541  __Pyx_TraceReturn(Py_None, 1);
95542 }
95543 
95544 /* "View.MemoryView":1177
95545  *
95546  * @cname('__pyx_memoryview_slice_get_size')
95547  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
95548  * "Return the size of the memory occupied by the slice in number of bytes"
95549  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
95550  */
95551 
95552 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
95553  Py_ssize_t __pyx_v_shape;
95554  Py_ssize_t __pyx_v_size;
95555  Py_ssize_t __pyx_r;
95556  __Pyx_TraceDeclarations
95557  Py_ssize_t __pyx_t_1;
95558  Py_ssize_t *__pyx_t_2;
95559  Py_ssize_t *__pyx_t_3;
95560  Py_ssize_t *__pyx_t_4;
95561  int __pyx_lineno = 0;
95562  const char *__pyx_filename = NULL;
95563  int __pyx_clineno = 0;
95564  __Pyx_TraceCall("slice_get_size", __pyx_f[1], 1177, 1, __PYX_ERR(1, 1177, __pyx_L1_error));
95565 
95566  /* "View.MemoryView":1179
95567  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil:
95568  * "Return the size of the memory occupied by the slice in number of bytes"
95569  * cdef Py_ssize_t shape, size = src.memview.view.itemsize # <<<<<<<<<<<<<<
95570  *
95571  * for shape in src.shape[:ndim]:
95572  */
95573  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
95574  __pyx_v_size = __pyx_t_1;
95575 
95576  /* "View.MemoryView":1181
95577  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
95578  *
95579  * for shape in src.shape[:ndim]: # <<<<<<<<<<<<<<
95580  * size *= shape
95581  *
95582  */
95583  __pyx_t_3 = (__pyx_v_src->shape + __pyx_v_ndim);
95584  for (__pyx_t_4 = __pyx_v_src->shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
95585  __pyx_t_2 = __pyx_t_4;
95586  __pyx_v_shape = (__pyx_t_2[0]);
95587 
95588  /* "View.MemoryView":1182
95589  *
95590  * for shape in src.shape[:ndim]:
95591  * size *= shape # <<<<<<<<<<<<<<
95592  *
95593  * return size
95594  */
95595  __pyx_v_size = (__pyx_v_size * __pyx_v_shape);
95596  }
95597 
95598  /* "View.MemoryView":1184
95599  * size *= shape
95600  *
95601  * return size # <<<<<<<<<<<<<<
95602  *
95603  * @cname('__pyx_fill_contig_strides_array')
95604  */
95605  __pyx_r = __pyx_v_size;
95606  goto __pyx_L0;
95607 
95608  /* "View.MemoryView":1177
95609  *
95610  * @cname('__pyx_memoryview_slice_get_size')
95611  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
95612  * "Return the size of the memory occupied by the slice in number of bytes"
95613  * cdef Py_ssize_t shape, size = src.memview.view.itemsize
95614  */
95615 
95616  /* function exit code */
95617  __pyx_L1_error:;
95618  __Pyx_WriteUnraisable("View.MemoryView.slice_get_size", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
95619  __pyx_r = 0;
95620  __pyx_L0:;
95621  __Pyx_TraceReturn(Py_None, 1);
95622  return __pyx_r;
95623 }
95624 
95625 /* "View.MemoryView":1187
95626  *
95627  * @cname('__pyx_fill_contig_strides_array')
95628  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
95629  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
95630  * int ndim, char order) nogil:
95631  */
95632 
95633 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
95634  int __pyx_v_idx;
95635  Py_ssize_t __pyx_r;
95636  __Pyx_TraceDeclarations
95637  int __pyx_t_1;
95638  int __pyx_t_2;
95639  int __pyx_t_3;
95640  int __pyx_t_4;
95641  int __pyx_lineno = 0;
95642  const char *__pyx_filename = NULL;
95643  int __pyx_clineno = 0;
95644  __Pyx_TraceCall("fill_contig_strides_array", __pyx_f[1], 1187, 1, __PYX_ERR(1, 1187, __pyx_L1_error));
95645 
95646  /* "View.MemoryView":1196
95647  * cdef int idx
95648  *
95649  * if order == 'F': # <<<<<<<<<<<<<<
95650  * for idx in range(ndim):
95651  * strides[idx] = stride
95652  */
95653  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
95654  if (__pyx_t_1) {
95655 
95656  /* "View.MemoryView":1197
95657  *
95658  * if order == 'F':
95659  * for idx in range(ndim): # <<<<<<<<<<<<<<
95660  * strides[idx] = stride
95661  * stride *= shape[idx]
95662  */
95663  __pyx_t_2 = __pyx_v_ndim;
95664  __pyx_t_3 = __pyx_t_2;
95665  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
95666  __pyx_v_idx = __pyx_t_4;
95667 
95668  /* "View.MemoryView":1198
95669  * if order == 'F':
95670  * for idx in range(ndim):
95671  * strides[idx] = stride # <<<<<<<<<<<<<<
95672  * stride *= shape[idx]
95673  * else:
95674  */
95675  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
95676 
95677  /* "View.MemoryView":1199
95678  * for idx in range(ndim):
95679  * strides[idx] = stride
95680  * stride *= shape[idx] # <<<<<<<<<<<<<<
95681  * else:
95682  * for idx in range(ndim - 1, -1, -1):
95683  */
95684  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
95685  }
95686 
95687  /* "View.MemoryView":1196
95688  * cdef int idx
95689  *
95690  * if order == 'F': # <<<<<<<<<<<<<<
95691  * for idx in range(ndim):
95692  * strides[idx] = stride
95693  */
95694  goto __pyx_L3;
95695  }
95696 
95697  /* "View.MemoryView":1201
95698  * stride *= shape[idx]
95699  * else:
95700  * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
95701  * strides[idx] = stride
95702  * stride *= shape[idx]
95703  */
95704  /*else*/ {
95705  for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
95706  __pyx_v_idx = __pyx_t_2;
95707 
95708  /* "View.MemoryView":1202
95709  * else:
95710  * for idx in range(ndim - 1, -1, -1):
95711  * strides[idx] = stride # <<<<<<<<<<<<<<
95712  * stride *= shape[idx]
95713  *
95714  */
95715  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
95716 
95717  /* "View.MemoryView":1203
95718  * for idx in range(ndim - 1, -1, -1):
95719  * strides[idx] = stride
95720  * stride *= shape[idx] # <<<<<<<<<<<<<<
95721  *
95722  * return stride
95723  */
95724  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
95725  }
95726  }
95727  __pyx_L3:;
95728 
95729  /* "View.MemoryView":1205
95730  * stride *= shape[idx]
95731  *
95732  * return stride # <<<<<<<<<<<<<<
95733  *
95734  * @cname('__pyx_memoryview_copy_data_to_temp')
95735  */
95736  __pyx_r = __pyx_v_stride;
95737  goto __pyx_L0;
95738 
95739  /* "View.MemoryView":1187
95740  *
95741  * @cname('__pyx_fill_contig_strides_array')
95742  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
95743  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
95744  * int ndim, char order) nogil:
95745  */
95746 
95747  /* function exit code */
95748  __pyx_L1_error:;
95749  __Pyx_WriteUnraisable("View.MemoryView.fill_contig_strides_array", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
95750  __pyx_r = 0;
95751  __pyx_L0:;
95752  __Pyx_TraceReturn(Py_None, 1);
95753  return __pyx_r;
95754 }
95755 
95756 /* "View.MemoryView":1208
95757  *
95758  * @cname('__pyx_memoryview_copy_data_to_temp')
95759  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
95760  * __Pyx_memviewslice *tmpslice,
95761  * char order,
95762  */
95763 
95764 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
95765  int __pyx_v_i;
95766  void *__pyx_v_result;
95767  size_t __pyx_v_itemsize;
95768  size_t __pyx_v_size;
95769  void *__pyx_r;
95770  __Pyx_TraceDeclarations
95771  Py_ssize_t __pyx_t_1;
95772  int __pyx_t_2;
95773  int __pyx_t_3;
95774  struct __pyx_memoryview_obj *__pyx_t_4;
95775  int __pyx_t_5;
95776  int __pyx_t_6;
95777  int __pyx_lineno = 0;
95778  const char *__pyx_filename = NULL;
95779  int __pyx_clineno = 0;
95780  __Pyx_TraceCall("copy_data_to_temp", __pyx_f[1], 1208, 1, __PYX_ERR(1, 1208, __pyx_L1_error));
95781 
95782  /* "View.MemoryView":1219
95783  * cdef void *result
95784  *
95785  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
95786  * cdef size_t size = slice_get_size(src, ndim)
95787  *
95788  */
95789  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
95790  __pyx_v_itemsize = __pyx_t_1;
95791 
95792  /* "View.MemoryView":1220
95793  *
95794  * cdef size_t itemsize = src.memview.view.itemsize
95795  * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
95796  *
95797  * result = malloc(size)
95798  */
95799  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
95800 
95801  /* "View.MemoryView":1222
95802  * cdef size_t size = slice_get_size(src, ndim)
95803  *
95804  * result = malloc(size) # <<<<<<<<<<<<<<
95805  * if not result:
95806  * _err(MemoryError, NULL)
95807  */
95808  __pyx_v_result = malloc(__pyx_v_size);
95809 
95810  /* "View.MemoryView":1223
95811  *
95812  * result = malloc(size)
95813  * if not result: # <<<<<<<<<<<<<<
95814  * _err(MemoryError, NULL)
95815  *
95816  */
95817  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
95818  if (__pyx_t_2) {
95819 
95820  /* "View.MemoryView":1224
95821  * result = malloc(size)
95822  * if not result:
95823  * _err(MemoryError, NULL) # <<<<<<<<<<<<<<
95824  *
95825  *
95826  */
95827  __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 1224, __pyx_L1_error)
95828 
95829  /* "View.MemoryView":1223
95830  *
95831  * result = malloc(size)
95832  * if not result: # <<<<<<<<<<<<<<
95833  * _err(MemoryError, NULL)
95834  *
95835  */
95836  }
95837 
95838  /* "View.MemoryView":1227
95839  *
95840  *
95841  * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
95842  * tmpslice.memview = src.memview
95843  * for i in range(ndim):
95844  */
95845  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
95846 
95847  /* "View.MemoryView":1228
95848  *
95849  * tmpslice.data = <char *> result
95850  * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
95851  * for i in range(ndim):
95852  * tmpslice.shape[i] = src.shape[i]
95853  */
95854  __pyx_t_4 = __pyx_v_src->memview;
95855  __pyx_v_tmpslice->memview = __pyx_t_4;
95856 
95857  /* "View.MemoryView":1229
95858  * tmpslice.data = <char *> result
95859  * tmpslice.memview = src.memview
95860  * for i in range(ndim): # <<<<<<<<<<<<<<
95861  * tmpslice.shape[i] = src.shape[i]
95862  * tmpslice.suboffsets[i] = -1
95863  */
95864  __pyx_t_3 = __pyx_v_ndim;
95865  __pyx_t_5 = __pyx_t_3;
95866  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
95867  __pyx_v_i = __pyx_t_6;
95868 
95869  /* "View.MemoryView":1230
95870  * tmpslice.memview = src.memview
95871  * for i in range(ndim):
95872  * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
95873  * tmpslice.suboffsets[i] = -1
95874  *
95875  */
95876  (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
95877 
95878  /* "View.MemoryView":1231
95879  * for i in range(ndim):
95880  * tmpslice.shape[i] = src.shape[i]
95881  * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
95882  *
95883  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
95884  */
95885  (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
95886  }
95887 
95888  /* "View.MemoryView":1233
95889  * tmpslice.suboffsets[i] = -1
95890  *
95891  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
95892  * ndim, order)
95893  *
95894  */
95895  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
95896 
95897  /* "View.MemoryView":1237
95898  *
95899  *
95900  * for i in range(ndim): # <<<<<<<<<<<<<<
95901  * if tmpslice.shape[i] == 1:
95902  * tmpslice.strides[i] = 0
95903  */
95904  __pyx_t_3 = __pyx_v_ndim;
95905  __pyx_t_5 = __pyx_t_3;
95906  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
95907  __pyx_v_i = __pyx_t_6;
95908 
95909  /* "View.MemoryView":1238
95910  *
95911  * for i in range(ndim):
95912  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
95913  * tmpslice.strides[i] = 0
95914  *
95915  */
95916  __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
95917  if (__pyx_t_2) {
95918 
95919  /* "View.MemoryView":1239
95920  * for i in range(ndim):
95921  * if tmpslice.shape[i] == 1:
95922  * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
95923  *
95924  * if slice_is_contig(src[0], order, ndim):
95925  */
95926  (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
95927 
95928  /* "View.MemoryView":1238
95929  *
95930  * for i in range(ndim):
95931  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
95932  * tmpslice.strides[i] = 0
95933  *
95934  */
95935  }
95936  }
95937 
95938  /* "View.MemoryView":1241
95939  * tmpslice.strides[i] = 0
95940  *
95941  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
95942  * memcpy(result, src.data, size)
95943  * else:
95944  */
95945  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
95946  if (__pyx_t_2) {
95947 
95948  /* "View.MemoryView":1242
95949  *
95950  * if slice_is_contig(src[0], order, ndim):
95951  * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
95952  * else:
95953  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
95954  */
95955  (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
95956 
95957  /* "View.MemoryView":1241
95958  * tmpslice.strides[i] = 0
95959  *
95960  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
95961  * memcpy(result, src.data, size)
95962  * else:
95963  */
95964  goto __pyx_L9;
95965  }
95966 
95967  /* "View.MemoryView":1244
95968  * memcpy(result, src.data, size)
95969  * else:
95970  * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
95971  *
95972  * return result
95973  */
95974  /*else*/ {
95975  copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
95976  }
95977  __pyx_L9:;
95978 
95979  /* "View.MemoryView":1246
95980  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
95981  *
95982  * return result # <<<<<<<<<<<<<<
95983  *
95984  *
95985  */
95986  __pyx_r = __pyx_v_result;
95987  goto __pyx_L0;
95988 
95989  /* "View.MemoryView":1208
95990  *
95991  * @cname('__pyx_memoryview_copy_data_to_temp')
95992  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
95993  * __Pyx_memviewslice *tmpslice,
95994  * char order,
95995  */
95996 
95997  /* function exit code */
95998  __pyx_L1_error:;
95999  {
96000  #ifdef WITH_THREAD
96001  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
96002  #endif
96003  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
96004  #ifdef WITH_THREAD
96005  __Pyx_PyGILState_Release(__pyx_gilstate_save);
96006  #endif
96007  }
96008  __pyx_r = NULL;
96009  __pyx_L0:;
96010  __Pyx_TraceReturn(Py_None, 1);
96011  return __pyx_r;
96012 }
96013 
96014 /* "View.MemoryView":1251
96015  *
96016  * @cname('__pyx_memoryview_err_extents')
96017  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
96018  * Py_ssize_t extent2) except -1 with gil:
96019  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
96020  */
96021 
96022 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
96023  int __pyx_r;
96024  __Pyx_TraceDeclarations
96025  __Pyx_RefNannyDeclarations
96026  PyObject *__pyx_t_1 = NULL;
96027  PyObject *__pyx_t_2 = NULL;
96028  PyObject *__pyx_t_3 = NULL;
96029  PyObject *__pyx_t_4 = NULL;
96030  int __pyx_lineno = 0;
96031  const char *__pyx_filename = NULL;
96032  int __pyx_clineno = 0;
96033  #ifdef WITH_THREAD
96034  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
96035  #endif
96036  __Pyx_RefNannySetupContext("_err_extents", 0);
96037  __Pyx_TraceCall("_err_extents", __pyx_f[1], 1251, 0, __PYX_ERR(1, 1251, __pyx_L1_error));
96038 
96039  /* "View.MemoryView":1254
96040  * Py_ssize_t extent2) except -1 with gil:
96041  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
96042  * (i, extent1, extent2)) # <<<<<<<<<<<<<<
96043  *
96044  * @cname('__pyx_memoryview_err_dim')
96045  */
96046  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1254, __pyx_L1_error)
96047  __Pyx_GOTREF(__pyx_t_1);
96048  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1254, __pyx_L1_error)
96049  __Pyx_GOTREF(__pyx_t_2);
96050  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1254, __pyx_L1_error)
96051  __Pyx_GOTREF(__pyx_t_3);
96052  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1254, __pyx_L1_error)
96053  __Pyx_GOTREF(__pyx_t_4);
96054  __Pyx_GIVEREF(__pyx_t_1);
96055  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
96056  __Pyx_GIVEREF(__pyx_t_2);
96057  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
96058  __Pyx_GIVEREF(__pyx_t_3);
96059  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
96060  __pyx_t_1 = 0;
96061  __pyx_t_2 = 0;
96062  __pyx_t_3 = 0;
96063 
96064  /* "View.MemoryView":1253
96065  * cdef int _err_extents(int i, Py_ssize_t extent1,
96066  * Py_ssize_t extent2) except -1 with gil:
96067  * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
96068  * (i, extent1, extent2))
96069  *
96070  */
96071  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1253, __pyx_L1_error)
96072  __Pyx_GOTREF(__pyx_t_3);
96073  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
96074  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1253, __pyx_L1_error)
96075  __Pyx_GOTREF(__pyx_t_4);
96076  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
96077  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
96078  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
96079  __PYX_ERR(1, 1253, __pyx_L1_error)
96080 
96081  /* "View.MemoryView":1251
96082  *
96083  * @cname('__pyx_memoryview_err_extents')
96084  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
96085  * Py_ssize_t extent2) except -1 with gil:
96086  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
96087  */
96088 
96089  /* function exit code */
96090  __pyx_L1_error:;
96091  __Pyx_XDECREF(__pyx_t_1);
96092  __Pyx_XDECREF(__pyx_t_2);
96093  __Pyx_XDECREF(__pyx_t_3);
96094  __Pyx_XDECREF(__pyx_t_4);
96095  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
96096  __pyx_r = -1;
96097  __Pyx_TraceReturn(Py_None, 0);
96098  __Pyx_RefNannyFinishContext();
96099  #ifdef WITH_THREAD
96100  __Pyx_PyGILState_Release(__pyx_gilstate_save);
96101  #endif
96102  return __pyx_r;
96103 }
96104 
96105 /* "View.MemoryView":1257
96106  *
96107  * @cname('__pyx_memoryview_err_dim')
96108  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
96109  * raise error(msg.decode('ascii') % dim)
96110  *
96111  */
96112 
96113 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
96114  int __pyx_r;
96115  __Pyx_TraceDeclarations
96116  __Pyx_RefNannyDeclarations
96117  PyObject *__pyx_t_1 = NULL;
96118  PyObject *__pyx_t_2 = NULL;
96119  PyObject *__pyx_t_3 = NULL;
96120  PyObject *__pyx_t_4 = NULL;
96121  int __pyx_lineno = 0;
96122  const char *__pyx_filename = NULL;
96123  int __pyx_clineno = 0;
96124  #ifdef WITH_THREAD
96125  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
96126  #endif
96127  __Pyx_RefNannySetupContext("_err_dim", 0);
96128  __Pyx_TraceCall("_err_dim", __pyx_f[1], 1257, 0, __PYX_ERR(1, 1257, __pyx_L1_error));
96129  __Pyx_INCREF(__pyx_v_error);
96130 
96131  /* "View.MemoryView":1258
96132  * @cname('__pyx_memoryview_err_dim')
96133  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
96134  * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
96135  *
96136  * @cname('__pyx_memoryview_err')
96137  */
96138  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1258, __pyx_L1_error)
96139  __Pyx_GOTREF(__pyx_t_2);
96140  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1258, __pyx_L1_error)
96141  __Pyx_GOTREF(__pyx_t_3);
96142  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 1258, __pyx_L1_error)
96143  __Pyx_GOTREF(__pyx_t_4);
96144  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
96145  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
96146  __Pyx_INCREF(__pyx_v_error);
96147  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
96148  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
96149  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
96150  if (likely(__pyx_t_2)) {
96151  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
96152  __Pyx_INCREF(__pyx_t_2);
96153  __Pyx_INCREF(function);
96154  __Pyx_DECREF_SET(__pyx_t_3, function);
96155  }
96156  }
96157  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
96158  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
96159  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
96160  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1258, __pyx_L1_error)
96161  __Pyx_GOTREF(__pyx_t_1);
96162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
96163  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
96164  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
96165  __PYX_ERR(1, 1258, __pyx_L1_error)
96166 
96167  /* "View.MemoryView":1257
96168  *
96169  * @cname('__pyx_memoryview_err_dim')
96170  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
96171  * raise error(msg.decode('ascii') % dim)
96172  *
96173  */
96174 
96175  /* function exit code */
96176  __pyx_L1_error:;
96177  __Pyx_XDECREF(__pyx_t_1);
96178  __Pyx_XDECREF(__pyx_t_2);
96179  __Pyx_XDECREF(__pyx_t_3);
96180  __Pyx_XDECREF(__pyx_t_4);
96181  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
96182  __pyx_r = -1;
96183  __Pyx_XDECREF(__pyx_v_error);
96184  __Pyx_TraceReturn(Py_None, 0);
96185  __Pyx_RefNannyFinishContext();
96186  #ifdef WITH_THREAD
96187  __Pyx_PyGILState_Release(__pyx_gilstate_save);
96188  #endif
96189  return __pyx_r;
96190 }
96191 
96192 /* "View.MemoryView":1261
96193  *
96194  * @cname('__pyx_memoryview_err')
96195  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
96196  * if msg != NULL:
96197  * raise error(msg.decode('ascii'))
96198  */
96199 
96200 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
96201  int __pyx_r;
96202  __Pyx_TraceDeclarations
96203  __Pyx_RefNannyDeclarations
96204  int __pyx_t_1;
96205  PyObject *__pyx_t_2 = NULL;
96206  PyObject *__pyx_t_3 = NULL;
96207  PyObject *__pyx_t_4 = NULL;
96208  PyObject *__pyx_t_5 = NULL;
96209  int __pyx_lineno = 0;
96210  const char *__pyx_filename = NULL;
96211  int __pyx_clineno = 0;
96212  #ifdef WITH_THREAD
96213  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
96214  #endif
96215  __Pyx_RefNannySetupContext("_err", 0);
96216  __Pyx_TraceCall("_err", __pyx_f[1], 1261, 0, __PYX_ERR(1, 1261, __pyx_L1_error));
96217  __Pyx_INCREF(__pyx_v_error);
96218 
96219  /* "View.MemoryView":1262
96220  * @cname('__pyx_memoryview_err')
96221  * cdef int _err(object error, char *msg) except -1 with gil:
96222  * if msg != NULL: # <<<<<<<<<<<<<<
96223  * raise error(msg.decode('ascii'))
96224  * else:
96225  */
96226  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
96227  if (unlikely(__pyx_t_1)) {
96228 
96229  /* "View.MemoryView":1263
96230  * cdef int _err(object error, char *msg) except -1 with gil:
96231  * if msg != NULL:
96232  * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
96233  * else:
96234  * raise error
96235  */
96236  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1263, __pyx_L1_error)
96237  __Pyx_GOTREF(__pyx_t_3);
96238  __Pyx_INCREF(__pyx_v_error);
96239  __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
96240  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
96241  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
96242  if (likely(__pyx_t_5)) {
96243  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
96244  __Pyx_INCREF(__pyx_t_5);
96245  __Pyx_INCREF(function);
96246  __Pyx_DECREF_SET(__pyx_t_4, function);
96247  }
96248  }
96249  __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);
96250  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
96251  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
96252  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1263, __pyx_L1_error)
96253  __Pyx_GOTREF(__pyx_t_2);
96254  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
96255  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
96256  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
96257  __PYX_ERR(1, 1263, __pyx_L1_error)
96258 
96259  /* "View.MemoryView":1262
96260  * @cname('__pyx_memoryview_err')
96261  * cdef int _err(object error, char *msg) except -1 with gil:
96262  * if msg != NULL: # <<<<<<<<<<<<<<
96263  * raise error(msg.decode('ascii'))
96264  * else:
96265  */
96266  }
96267 
96268  /* "View.MemoryView":1265
96269  * raise error(msg.decode('ascii'))
96270  * else:
96271  * raise error # <<<<<<<<<<<<<<
96272  *
96273  * @cname('__pyx_memoryview_copy_contents')
96274  */
96275  /*else*/ {
96276  __Pyx_Raise(__pyx_v_error, 0, 0, 0);
96277  __PYX_ERR(1, 1265, __pyx_L1_error)
96278  }
96279 
96280  /* "View.MemoryView":1261
96281  *
96282  * @cname('__pyx_memoryview_err')
96283  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
96284  * if msg != NULL:
96285  * raise error(msg.decode('ascii'))
96286  */
96287 
96288  /* function exit code */
96289  __pyx_L1_error:;
96290  __Pyx_XDECREF(__pyx_t_2);
96291  __Pyx_XDECREF(__pyx_t_3);
96292  __Pyx_XDECREF(__pyx_t_4);
96293  __Pyx_XDECREF(__pyx_t_5);
96294  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
96295  __pyx_r = -1;
96296  __Pyx_XDECREF(__pyx_v_error);
96297  __Pyx_TraceReturn(Py_None, 0);
96298  __Pyx_RefNannyFinishContext();
96299  #ifdef WITH_THREAD
96300  __Pyx_PyGILState_Release(__pyx_gilstate_save);
96301  #endif
96302  return __pyx_r;
96303 }
96304 
96305 /* "View.MemoryView":1268
96306  *
96307  * @cname('__pyx_memoryview_copy_contents')
96308  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
96309  * __Pyx_memviewslice dst,
96310  * int src_ndim, int dst_ndim,
96311  */
96312 
96313 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
96314  void *__pyx_v_tmpdata;
96315  size_t __pyx_v_itemsize;
96316  int __pyx_v_i;
96317  char __pyx_v_order;
96318  int __pyx_v_broadcasting;
96319  int __pyx_v_direct_copy;
96320  __Pyx_memviewslice __pyx_v_tmp;
96321  int __pyx_v_ndim;
96322  int __pyx_r;
96323  __Pyx_TraceDeclarations
96324  Py_ssize_t __pyx_t_1;
96325  int __pyx_t_2;
96326  int __pyx_t_3;
96327  int __pyx_t_4;
96328  int __pyx_t_5;
96329  int __pyx_t_6;
96330  void *__pyx_t_7;
96331  int __pyx_t_8;
96332  int __pyx_lineno = 0;
96333  const char *__pyx_filename = NULL;
96334  int __pyx_clineno = 0;
96335  __Pyx_TraceCall("memoryview_copy_contents", __pyx_f[1], 1268, 1, __PYX_ERR(1, 1268, __pyx_L1_error));
96336 
96337  /* "View.MemoryView":1276
96338  * Check for overlapping memory and verify the shapes.
96339  * """
96340  * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
96341  * cdef size_t itemsize = src.memview.view.itemsize
96342  * cdef int i
96343  */
96344  __pyx_v_tmpdata = NULL;
96345 
96346  /* "View.MemoryView":1277
96347  * """
96348  * cdef void *tmpdata = NULL
96349  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
96350  * cdef int i
96351  * cdef char order = get_best_order(&src, src_ndim)
96352  */
96353  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
96354  __pyx_v_itemsize = __pyx_t_1;
96355 
96356  /* "View.MemoryView":1279
96357  * cdef size_t itemsize = src.memview.view.itemsize
96358  * cdef int i
96359  * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
96360  * cdef bint broadcasting = False
96361  * cdef bint direct_copy = False
96362  */
96363  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
96364 
96365  /* "View.MemoryView":1280
96366  * cdef int i
96367  * cdef char order = get_best_order(&src, src_ndim)
96368  * cdef bint broadcasting = False # <<<<<<<<<<<<<<
96369  * cdef bint direct_copy = False
96370  * cdef __Pyx_memviewslice tmp
96371  */
96372  __pyx_v_broadcasting = 0;
96373 
96374  /* "View.MemoryView":1281
96375  * cdef char order = get_best_order(&src, src_ndim)
96376  * cdef bint broadcasting = False
96377  * cdef bint direct_copy = False # <<<<<<<<<<<<<<
96378  * cdef __Pyx_memviewslice tmp
96379  *
96380  */
96381  __pyx_v_direct_copy = 0;
96382 
96383  /* "View.MemoryView":1284
96384  * cdef __Pyx_memviewslice tmp
96385  *
96386  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
96387  * broadcast_leading(&src, src_ndim, dst_ndim)
96388  * elif dst_ndim < src_ndim:
96389  */
96390  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
96391  if (__pyx_t_2) {
96392 
96393  /* "View.MemoryView":1285
96394  *
96395  * if src_ndim < dst_ndim:
96396  * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
96397  * elif dst_ndim < src_ndim:
96398  * broadcast_leading(&dst, dst_ndim, src_ndim)
96399  */
96400  __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
96401 
96402  /* "View.MemoryView":1284
96403  * cdef __Pyx_memviewslice tmp
96404  *
96405  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
96406  * broadcast_leading(&src, src_ndim, dst_ndim)
96407  * elif dst_ndim < src_ndim:
96408  */
96409  goto __pyx_L3;
96410  }
96411 
96412  /* "View.MemoryView":1286
96413  * if src_ndim < dst_ndim:
96414  * broadcast_leading(&src, src_ndim, dst_ndim)
96415  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
96416  * broadcast_leading(&dst, dst_ndim, src_ndim)
96417  *
96418  */
96419  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
96420  if (__pyx_t_2) {
96421 
96422  /* "View.MemoryView":1287
96423  * broadcast_leading(&src, src_ndim, dst_ndim)
96424  * elif dst_ndim < src_ndim:
96425  * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
96426  *
96427  * cdef int ndim = max(src_ndim, dst_ndim)
96428  */
96429  __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
96430 
96431  /* "View.MemoryView":1286
96432  * if src_ndim < dst_ndim:
96433  * broadcast_leading(&src, src_ndim, dst_ndim)
96434  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
96435  * broadcast_leading(&dst, dst_ndim, src_ndim)
96436  *
96437  */
96438  }
96439  __pyx_L3:;
96440 
96441  /* "View.MemoryView":1289
96442  * broadcast_leading(&dst, dst_ndim, src_ndim)
96443  *
96444  * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
96445  *
96446  * for i in range(ndim):
96447  */
96448  __pyx_t_3 = __pyx_v_dst_ndim;
96449  __pyx_t_4 = __pyx_v_src_ndim;
96450  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
96451  __pyx_t_5 = __pyx_t_3;
96452  } else {
96453  __pyx_t_5 = __pyx_t_4;
96454  }
96455  __pyx_v_ndim = __pyx_t_5;
96456 
96457  /* "View.MemoryView":1291
96458  * cdef int ndim = max(src_ndim, dst_ndim)
96459  *
96460  * for i in range(ndim): # <<<<<<<<<<<<<<
96461  * if src.shape[i] != dst.shape[i]:
96462  * if src.shape[i] == 1:
96463  */
96464  __pyx_t_5 = __pyx_v_ndim;
96465  __pyx_t_3 = __pyx_t_5;
96466  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
96467  __pyx_v_i = __pyx_t_4;
96468 
96469  /* "View.MemoryView":1292
96470  *
96471  * for i in range(ndim):
96472  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
96473  * if src.shape[i] == 1:
96474  * broadcasting = True
96475  */
96476  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
96477  if (__pyx_t_2) {
96478 
96479  /* "View.MemoryView":1293
96480  * for i in range(ndim):
96481  * if src.shape[i] != dst.shape[i]:
96482  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
96483  * broadcasting = True
96484  * src.strides[i] = 0
96485  */
96486  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
96487  if (__pyx_t_2) {
96488 
96489  /* "View.MemoryView":1294
96490  * if src.shape[i] != dst.shape[i]:
96491  * if src.shape[i] == 1:
96492  * broadcasting = True # <<<<<<<<<<<<<<
96493  * src.strides[i] = 0
96494  * else:
96495  */
96496  __pyx_v_broadcasting = 1;
96497 
96498  /* "View.MemoryView":1295
96499  * if src.shape[i] == 1:
96500  * broadcasting = True
96501  * src.strides[i] = 0 # <<<<<<<<<<<<<<
96502  * else:
96503  * _err_extents(i, dst.shape[i], src.shape[i])
96504  */
96505  (__pyx_v_src.strides[__pyx_v_i]) = 0;
96506 
96507  /* "View.MemoryView":1293
96508  * for i in range(ndim):
96509  * if src.shape[i] != dst.shape[i]:
96510  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
96511  * broadcasting = True
96512  * src.strides[i] = 0
96513  */
96514  goto __pyx_L7;
96515  }
96516 
96517  /* "View.MemoryView":1297
96518  * src.strides[i] = 0
96519  * else:
96520  * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
96521  *
96522  * if src.suboffsets[i] >= 0:
96523  */
96524  /*else*/ {
96525  __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1297, __pyx_L1_error)
96526  }
96527  __pyx_L7:;
96528 
96529  /* "View.MemoryView":1292
96530  *
96531  * for i in range(ndim):
96532  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
96533  * if src.shape[i] == 1:
96534  * broadcasting = True
96535  */
96536  }
96537 
96538  /* "View.MemoryView":1299
96539  * _err_extents(i, dst.shape[i], src.shape[i])
96540  *
96541  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
96542  * _err_dim(ValueError, "Dimension %d is not direct", i)
96543  *
96544  */
96545  __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
96546  if (__pyx_t_2) {
96547 
96548  /* "View.MemoryView":1300
96549  *
96550  * if src.suboffsets[i] >= 0:
96551  * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
96552  *
96553  * if slices_overlap(&src, &dst, ndim, itemsize):
96554  */
96555  __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(1, 1300, __pyx_L1_error)
96556 
96557  /* "View.MemoryView":1299
96558  * _err_extents(i, dst.shape[i], src.shape[i])
96559  *
96560  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
96561  * _err_dim(ValueError, "Dimension %d is not direct", i)
96562  *
96563  */
96564  }
96565  }
96566 
96567  /* "View.MemoryView":1302
96568  * _err_dim(ValueError, "Dimension %d is not direct", i)
96569  *
96570  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
96571  *
96572  * if not slice_is_contig(src, order, ndim):
96573  */
96574  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
96575  if (__pyx_t_2) {
96576 
96577  /* "View.MemoryView":1304
96578  * if slices_overlap(&src, &dst, ndim, itemsize):
96579  *
96580  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
96581  * order = get_best_order(&dst, ndim)
96582  *
96583  */
96584  __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
96585  if (__pyx_t_2) {
96586 
96587  /* "View.MemoryView":1305
96588  *
96589  * if not slice_is_contig(src, order, ndim):
96590  * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
96591  *
96592  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
96593  */
96594  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
96595 
96596  /* "View.MemoryView":1304
96597  * if slices_overlap(&src, &dst, ndim, itemsize):
96598  *
96599  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
96600  * order = get_best_order(&dst, ndim)
96601  *
96602  */
96603  }
96604 
96605  /* "View.MemoryView":1307
96606  * order = get_best_order(&dst, ndim)
96607  *
96608  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
96609  * src = tmp
96610  *
96611  */
96612  __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(1, 1307, __pyx_L1_error)
96613  __pyx_v_tmpdata = __pyx_t_7;
96614 
96615  /* "View.MemoryView":1308
96616  *
96617  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
96618  * src = tmp # <<<<<<<<<<<<<<
96619  *
96620  * if not broadcasting:
96621  */
96622  __pyx_v_src = __pyx_v_tmp;
96623 
96624  /* "View.MemoryView":1302
96625  * _err_dim(ValueError, "Dimension %d is not direct", i)
96626  *
96627  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
96628  *
96629  * if not slice_is_contig(src, order, ndim):
96630  */
96631  }
96632 
96633  /* "View.MemoryView":1310
96634  * src = tmp
96635  *
96636  * if not broadcasting: # <<<<<<<<<<<<<<
96637  *
96638  *
96639  */
96640  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
96641  if (__pyx_t_2) {
96642 
96643  /* "View.MemoryView":1313
96644  *
96645  *
96646  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
96647  * direct_copy = slice_is_contig(dst, 'C', ndim)
96648  * elif slice_is_contig(src, 'F', ndim):
96649  */
96650  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
96651  if (__pyx_t_2) {
96652 
96653  /* "View.MemoryView":1314
96654  *
96655  * if slice_is_contig(src, 'C', ndim):
96656  * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
96657  * elif slice_is_contig(src, 'F', ndim):
96658  * direct_copy = slice_is_contig(dst, 'F', ndim)
96659  */
96660  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
96661 
96662  /* "View.MemoryView":1313
96663  *
96664  *
96665  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
96666  * direct_copy = slice_is_contig(dst, 'C', ndim)
96667  * elif slice_is_contig(src, 'F', ndim):
96668  */
96669  goto __pyx_L12;
96670  }
96671 
96672  /* "View.MemoryView":1315
96673  * if slice_is_contig(src, 'C', ndim):
96674  * direct_copy = slice_is_contig(dst, 'C', ndim)
96675  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
96676  * direct_copy = slice_is_contig(dst, 'F', ndim)
96677  *
96678  */
96679  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
96680  if (__pyx_t_2) {
96681 
96682  /* "View.MemoryView":1316
96683  * direct_copy = slice_is_contig(dst, 'C', ndim)
96684  * elif slice_is_contig(src, 'F', ndim):
96685  * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
96686  *
96687  * if direct_copy:
96688  */
96689  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
96690 
96691  /* "View.MemoryView":1315
96692  * if slice_is_contig(src, 'C', ndim):
96693  * direct_copy = slice_is_contig(dst, 'C', ndim)
96694  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
96695  * direct_copy = slice_is_contig(dst, 'F', ndim)
96696  *
96697  */
96698  }
96699  __pyx_L12:;
96700 
96701  /* "View.MemoryView":1318
96702  * direct_copy = slice_is_contig(dst, 'F', ndim)
96703  *
96704  * if direct_copy: # <<<<<<<<<<<<<<
96705  *
96706  * refcount_copying(&dst, dtype_is_object, ndim, False)
96707  */
96708  __pyx_t_2 = (__pyx_v_direct_copy != 0);
96709  if (__pyx_t_2) {
96710 
96711  /* "View.MemoryView":1320
96712  * if direct_copy:
96713  *
96714  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
96715  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
96716  * refcount_copying(&dst, dtype_is_object, ndim, True)
96717  */
96718  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
96719 
96720  /* "View.MemoryView":1321
96721  *
96722  * refcount_copying(&dst, dtype_is_object, ndim, False)
96723  * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
96724  * refcount_copying(&dst, dtype_is_object, ndim, True)
96725  * free(tmpdata)
96726  */
96727  (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
96728 
96729  /* "View.MemoryView":1322
96730  * refcount_copying(&dst, dtype_is_object, ndim, False)
96731  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
96732  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
96733  * free(tmpdata)
96734  * return 0
96735  */
96736  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
96737 
96738  /* "View.MemoryView":1323
96739  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
96740  * refcount_copying(&dst, dtype_is_object, ndim, True)
96741  * free(tmpdata) # <<<<<<<<<<<<<<
96742  * return 0
96743  *
96744  */
96745  free(__pyx_v_tmpdata);
96746 
96747  /* "View.MemoryView":1324
96748  * refcount_copying(&dst, dtype_is_object, ndim, True)
96749  * free(tmpdata)
96750  * return 0 # <<<<<<<<<<<<<<
96751  *
96752  * if order == 'F' == get_best_order(&dst, ndim):
96753  */
96754  __pyx_r = 0;
96755  goto __pyx_L0;
96756 
96757  /* "View.MemoryView":1318
96758  * direct_copy = slice_is_contig(dst, 'F', ndim)
96759  *
96760  * if direct_copy: # <<<<<<<<<<<<<<
96761  *
96762  * refcount_copying(&dst, dtype_is_object, ndim, False)
96763  */
96764  }
96765 
96766  /* "View.MemoryView":1310
96767  * src = tmp
96768  *
96769  * if not broadcasting: # <<<<<<<<<<<<<<
96770  *
96771  *
96772  */
96773  }
96774 
96775  /* "View.MemoryView":1326
96776  * return 0
96777  *
96778  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
96779  *
96780  *
96781  */
96782  __pyx_t_2 = (__pyx_v_order == 'F');
96783  if (__pyx_t_2) {
96784  __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
96785  }
96786  __pyx_t_8 = (__pyx_t_2 != 0);
96787  if (__pyx_t_8) {
96788 
96789  /* "View.MemoryView":1329
96790  *
96791  *
96792  * transpose_memslice(&src) # <<<<<<<<<<<<<<
96793  * transpose_memslice(&dst)
96794  *
96795  */
96796  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1329, __pyx_L1_error)
96797 
96798  /* "View.MemoryView":1330
96799  *
96800  * transpose_memslice(&src)
96801  * transpose_memslice(&dst) # <<<<<<<<<<<<<<
96802  *
96803  * refcount_copying(&dst, dtype_is_object, ndim, False)
96804  */
96805  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(1, 1330, __pyx_L1_error)
96806 
96807  /* "View.MemoryView":1326
96808  * return 0
96809  *
96810  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
96811  *
96812  *
96813  */
96814  }
96815 
96816  /* "View.MemoryView":1332
96817  * transpose_memslice(&dst)
96818  *
96819  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
96820  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
96821  * refcount_copying(&dst, dtype_is_object, ndim, True)
96822  */
96823  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
96824 
96825  /* "View.MemoryView":1333
96826  *
96827  * refcount_copying(&dst, dtype_is_object, ndim, False)
96828  * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
96829  * refcount_copying(&dst, dtype_is_object, ndim, True)
96830  *
96831  */
96832  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
96833 
96834  /* "View.MemoryView":1334
96835  * refcount_copying(&dst, dtype_is_object, ndim, False)
96836  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
96837  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
96838  *
96839  * free(tmpdata)
96840  */
96841  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
96842 
96843  /* "View.MemoryView":1336
96844  * refcount_copying(&dst, dtype_is_object, ndim, True)
96845  *
96846  * free(tmpdata) # <<<<<<<<<<<<<<
96847  * return 0
96848  *
96849  */
96850  free(__pyx_v_tmpdata);
96851 
96852  /* "View.MemoryView":1337
96853  *
96854  * free(tmpdata)
96855  * return 0 # <<<<<<<<<<<<<<
96856  *
96857  * @cname('__pyx_memoryview_broadcast_leading')
96858  */
96859  __pyx_r = 0;
96860  goto __pyx_L0;
96861 
96862  /* "View.MemoryView":1268
96863  *
96864  * @cname('__pyx_memoryview_copy_contents')
96865  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
96866  * __Pyx_memviewslice dst,
96867  * int src_ndim, int dst_ndim,
96868  */
96869 
96870  /* function exit code */
96871  __pyx_L1_error:;
96872  {
96873  #ifdef WITH_THREAD
96874  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
96875  #endif
96876  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
96877  #ifdef WITH_THREAD
96878  __Pyx_PyGILState_Release(__pyx_gilstate_save);
96879  #endif
96880  }
96881  __pyx_r = -1;
96882  __pyx_L0:;
96883  __Pyx_TraceReturn(Py_None, 1);
96884  return __pyx_r;
96885 }
96886 
96887 /* "View.MemoryView":1340
96888  *
96889  * @cname('__pyx_memoryview_broadcast_leading')
96890  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
96891  * int ndim,
96892  * int ndim_other) nogil:
96893  */
96894 
96895 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
96896  int __pyx_v_i;
96897  int __pyx_v_offset;
96898  __Pyx_TraceDeclarations
96899  int __pyx_t_1;
96900  int __pyx_t_2;
96901  int __pyx_t_3;
96902  int __pyx_lineno = 0;
96903  const char *__pyx_filename = NULL;
96904  int __pyx_clineno = 0;
96905  __Pyx_TraceCall("broadcast_leading", __pyx_f[1], 1340, 1, __PYX_ERR(1, 1340, __pyx_L1_error));
96906 
96907  /* "View.MemoryView":1344
96908  * int ndim_other) nogil:
96909  * cdef int i
96910  * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
96911  *
96912  * for i in range(ndim - 1, -1, -1):
96913  */
96914  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
96915 
96916  /* "View.MemoryView":1346
96917  * cdef int offset = ndim_other - ndim
96918  *
96919  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
96920  * mslice.shape[i + offset] = mslice.shape[i]
96921  * mslice.strides[i + offset] = mslice.strides[i]
96922  */
96923  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
96924  __pyx_v_i = __pyx_t_1;
96925 
96926  /* "View.MemoryView":1347
96927  *
96928  * for i in range(ndim - 1, -1, -1):
96929  * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
96930  * mslice.strides[i + offset] = mslice.strides[i]
96931  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
96932  */
96933  (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
96934 
96935  /* "View.MemoryView":1348
96936  * for i in range(ndim - 1, -1, -1):
96937  * mslice.shape[i + offset] = mslice.shape[i]
96938  * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
96939  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
96940  *
96941  */
96942  (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
96943 
96944  /* "View.MemoryView":1349
96945  * mslice.shape[i + offset] = mslice.shape[i]
96946  * mslice.strides[i + offset] = mslice.strides[i]
96947  * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
96948  *
96949  * for i in range(offset):
96950  */
96951  (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
96952  }
96953 
96954  /* "View.MemoryView":1351
96955  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
96956  *
96957  * for i in range(offset): # <<<<<<<<<<<<<<
96958  * mslice.shape[i] = 1
96959  * mslice.strides[i] = mslice.strides[0]
96960  */
96961  __pyx_t_1 = __pyx_v_offset;
96962  __pyx_t_2 = __pyx_t_1;
96963  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
96964  __pyx_v_i = __pyx_t_3;
96965 
96966  /* "View.MemoryView":1352
96967  *
96968  * for i in range(offset):
96969  * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
96970  * mslice.strides[i] = mslice.strides[0]
96971  * mslice.suboffsets[i] = -1
96972  */
96973  (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
96974 
96975  /* "View.MemoryView":1353
96976  * for i in range(offset):
96977  * mslice.shape[i] = 1
96978  * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
96979  * mslice.suboffsets[i] = -1
96980  *
96981  */
96982  (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
96983 
96984  /* "View.MemoryView":1354
96985  * mslice.shape[i] = 1
96986  * mslice.strides[i] = mslice.strides[0]
96987  * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
96988  *
96989  *
96990  */
96991  (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
96992  }
96993 
96994  /* "View.MemoryView":1340
96995  *
96996  * @cname('__pyx_memoryview_broadcast_leading')
96997  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
96998  * int ndim,
96999  * int ndim_other) nogil:
97000  */
97001 
97002  /* function exit code */
97003  goto __pyx_L0;
97004  __pyx_L1_error:;
97005  __Pyx_WriteUnraisable("View.MemoryView.broadcast_leading", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
97006  __pyx_L0:;
97007  __Pyx_TraceReturn(Py_None, 1);
97008 }
97009 
97010 /* "View.MemoryView":1362
97011  *
97012  * @cname('__pyx_memoryview_refcount_copying')
97013  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
97014  * int ndim, bint inc) nogil:
97015  *
97016  */
97017 
97018 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
97019  __Pyx_TraceDeclarations
97020  int __pyx_t_1;
97021  int __pyx_lineno = 0;
97022  const char *__pyx_filename = NULL;
97023  int __pyx_clineno = 0;
97024  __Pyx_TraceCall("refcount_copying", __pyx_f[1], 1362, 1, __PYX_ERR(1, 1362, __pyx_L1_error));
97025 
97026  /* "View.MemoryView":1366
97027  *
97028  *
97029  * if dtype_is_object: # <<<<<<<<<<<<<<
97030  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
97031  * dst.strides, ndim, inc)
97032  */
97033  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
97034  if (__pyx_t_1) {
97035 
97036  /* "View.MemoryView":1367
97037  *
97038  * if dtype_is_object:
97039  * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
97040  * dst.strides, ndim, inc)
97041  *
97042  */
97043  __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
97044 
97045  /* "View.MemoryView":1366
97046  *
97047  *
97048  * if dtype_is_object: # <<<<<<<<<<<<<<
97049  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
97050  * dst.strides, ndim, inc)
97051  */
97052  }
97053 
97054  /* "View.MemoryView":1362
97055  *
97056  * @cname('__pyx_memoryview_refcount_copying')
97057  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
97058  * int ndim, bint inc) nogil:
97059  *
97060  */
97061 
97062  /* function exit code */
97063  goto __pyx_L0;
97064  __pyx_L1_error:;
97065  __Pyx_WriteUnraisable("View.MemoryView.refcount_copying", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
97066  __pyx_L0:;
97067  __Pyx_TraceReturn(Py_None, 1);
97068 }
97069 
97070 /* "View.MemoryView":1371
97071  *
97072  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
97073  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
97074  * Py_ssize_t *strides, int ndim,
97075  * bint inc) with gil:
97076  */
97077 
97078 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
97079  __Pyx_TraceDeclarations
97080  __Pyx_RefNannyDeclarations
97081  int __pyx_lineno = 0;
97082  const char *__pyx_filename = NULL;
97083  int __pyx_clineno = 0;
97084  #ifdef WITH_THREAD
97085  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
97086  #endif
97087  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
97088  __Pyx_TraceCall("refcount_objects_in_slice_with_gil", __pyx_f[1], 1371, 0, __PYX_ERR(1, 1371, __pyx_L1_error));
97089 
97090  /* "View.MemoryView":1374
97091  * Py_ssize_t *strides, int ndim,
97092  * bint inc) with gil:
97093  * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
97094  *
97095  * @cname('__pyx_memoryview_refcount_objects_in_slice')
97096  */
97097  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
97098 
97099  /* "View.MemoryView":1371
97100  *
97101  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
97102  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
97103  * Py_ssize_t *strides, int ndim,
97104  * bint inc) with gil:
97105  */
97106 
97107  /* function exit code */
97108  goto __pyx_L0;
97109  __pyx_L1_error:;
97110  __Pyx_WriteUnraisable("View.MemoryView.refcount_objects_in_slice_with_gil", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
97111  __pyx_L0:;
97112  __Pyx_TraceReturn(Py_None, 0);
97113  __Pyx_RefNannyFinishContext();
97114  #ifdef WITH_THREAD
97115  __Pyx_PyGILState_Release(__pyx_gilstate_save);
97116  #endif
97117 }
97118 
97119 /* "View.MemoryView":1377
97120  *
97121  * @cname('__pyx_memoryview_refcount_objects_in_slice')
97122  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
97123  * Py_ssize_t *strides, int ndim, bint inc):
97124  * cdef Py_ssize_t i
97125  */
97126 
97127 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
97128  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
97129  __Pyx_TraceDeclarations
97130  __Pyx_RefNannyDeclarations
97131  Py_ssize_t __pyx_t_1;
97132  Py_ssize_t __pyx_t_2;
97133  Py_ssize_t __pyx_t_3;
97134  int __pyx_t_4;
97135  int __pyx_lineno = 0;
97136  const char *__pyx_filename = NULL;
97137  int __pyx_clineno = 0;
97138  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
97139  __Pyx_TraceCall("refcount_objects_in_slice", __pyx_f[1], 1377, 0, __PYX_ERR(1, 1377, __pyx_L1_error));
97140 
97141  /* "View.MemoryView":1381
97142  * cdef Py_ssize_t i
97143  *
97144  * for i in range(shape[0]): # <<<<<<<<<<<<<<
97145  * if ndim == 1:
97146  * if inc:
97147  */
97148  __pyx_t_1 = (__pyx_v_shape[0]);
97149  __pyx_t_2 = __pyx_t_1;
97150  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
97151  __pyx_v_i = __pyx_t_3;
97152 
97153  /* "View.MemoryView":1382
97154  *
97155  * for i in range(shape[0]):
97156  * if ndim == 1: # <<<<<<<<<<<<<<
97157  * if inc:
97158  * Py_INCREF((<PyObject **> data)[0])
97159  */
97160  __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
97161  if (__pyx_t_4) {
97162 
97163  /* "View.MemoryView":1383
97164  * for i in range(shape[0]):
97165  * if ndim == 1:
97166  * if inc: # <<<<<<<<<<<<<<
97167  * Py_INCREF((<PyObject **> data)[0])
97168  * else:
97169  */
97170  __pyx_t_4 = (__pyx_v_inc != 0);
97171  if (__pyx_t_4) {
97172 
97173  /* "View.MemoryView":1384
97174  * if ndim == 1:
97175  * if inc:
97176  * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
97177  * else:
97178  * Py_DECREF((<PyObject **> data)[0])
97179  */
97180  Py_INCREF((((PyObject **)__pyx_v_data)[0]));
97181 
97182  /* "View.MemoryView":1383
97183  * for i in range(shape[0]):
97184  * if ndim == 1:
97185  * if inc: # <<<<<<<<<<<<<<
97186  * Py_INCREF((<PyObject **> data)[0])
97187  * else:
97188  */
97189  goto __pyx_L6;
97190  }
97191 
97192  /* "View.MemoryView":1386
97193  * Py_INCREF((<PyObject **> data)[0])
97194  * else:
97195  * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
97196  * else:
97197  * refcount_objects_in_slice(data, shape + 1, strides + 1,
97198  */
97199  /*else*/ {
97200  Py_DECREF((((PyObject **)__pyx_v_data)[0]));
97201  }
97202  __pyx_L6:;
97203 
97204  /* "View.MemoryView":1382
97205  *
97206  * for i in range(shape[0]):
97207  * if ndim == 1: # <<<<<<<<<<<<<<
97208  * if inc:
97209  * Py_INCREF((<PyObject **> data)[0])
97210  */
97211  goto __pyx_L5;
97212  }
97213 
97214  /* "View.MemoryView":1388
97215  * Py_DECREF((<PyObject **> data)[0])
97216  * else:
97217  * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
97218  * ndim - 1, inc)
97219  *
97220  */
97221  /*else*/ {
97222 
97223  /* "View.MemoryView":1389
97224  * else:
97225  * refcount_objects_in_slice(data, shape + 1, strides + 1,
97226  * ndim - 1, inc) # <<<<<<<<<<<<<<
97227  *
97228  * data += strides[0]
97229  */
97230  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
97231  }
97232  __pyx_L5:;
97233 
97234  /* "View.MemoryView":1391
97235  * ndim - 1, inc)
97236  *
97237  * data += strides[0] # <<<<<<<<<<<<<<
97238  *
97239  *
97240  */
97241  __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
97242  }
97243 
97244  /* "View.MemoryView":1377
97245  *
97246  * @cname('__pyx_memoryview_refcount_objects_in_slice')
97247  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
97248  * Py_ssize_t *strides, int ndim, bint inc):
97249  * cdef Py_ssize_t i
97250  */
97251 
97252  /* function exit code */
97253  goto __pyx_L0;
97254  __pyx_L1_error:;
97255  __Pyx_WriteUnraisable("View.MemoryView.refcount_objects_in_slice", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
97256  __pyx_L0:;
97257  __Pyx_TraceReturn(Py_None, 0);
97258  __Pyx_RefNannyFinishContext();
97259 }
97260 
97261 /* "View.MemoryView":1397
97262  *
97263  * @cname('__pyx_memoryview_slice_assign_scalar')
97264  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
97265  * size_t itemsize, void *item,
97266  * bint dtype_is_object) nogil:
97267  */
97268 
97269 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
97270  __Pyx_TraceDeclarations
97271  int __pyx_lineno = 0;
97272  const char *__pyx_filename = NULL;
97273  int __pyx_clineno = 0;
97274  __Pyx_TraceCall("slice_assign_scalar", __pyx_f[1], 1397, 1, __PYX_ERR(1, 1397, __pyx_L1_error));
97275 
97276  /* "View.MemoryView":1400
97277  * size_t itemsize, void *item,
97278  * bint dtype_is_object) nogil:
97279  * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
97280  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
97281  * itemsize, item)
97282  */
97283  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
97284 
97285  /* "View.MemoryView":1401
97286  * bint dtype_is_object) nogil:
97287  * refcount_copying(dst, dtype_is_object, ndim, False)
97288  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
97289  * itemsize, item)
97290  * refcount_copying(dst, dtype_is_object, ndim, True)
97291  */
97292  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
97293 
97294  /* "View.MemoryView":1403
97295  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
97296  * itemsize, item)
97297  * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
97298  *
97299  *
97300  */
97301  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
97302 
97303  /* "View.MemoryView":1397
97304  *
97305  * @cname('__pyx_memoryview_slice_assign_scalar')
97306  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
97307  * size_t itemsize, void *item,
97308  * bint dtype_is_object) nogil:
97309  */
97310 
97311  /* function exit code */
97312  goto __pyx_L0;
97313  __pyx_L1_error:;
97314  __Pyx_WriteUnraisable("View.MemoryView.slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
97315  __pyx_L0:;
97316  __Pyx_TraceReturn(Py_None, 1);
97317 }
97318 
97319 /* "View.MemoryView":1407
97320  *
97321  * @cname('__pyx_memoryview__slice_assign_scalar')
97322  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
97323  * Py_ssize_t *strides, int ndim,
97324  * size_t itemsize, void *item) nogil:
97325  */
97326 
97327 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
97328  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
97329  Py_ssize_t __pyx_v_stride;
97330  Py_ssize_t __pyx_v_extent;
97331  __Pyx_TraceDeclarations
97332  int __pyx_t_1;
97333  Py_ssize_t __pyx_t_2;
97334  Py_ssize_t __pyx_t_3;
97335  Py_ssize_t __pyx_t_4;
97336  int __pyx_lineno = 0;
97337  const char *__pyx_filename = NULL;
97338  int __pyx_clineno = 0;
97339  __Pyx_TraceCall("_slice_assign_scalar", __pyx_f[1], 1407, 1, __PYX_ERR(1, 1407, __pyx_L1_error));
97340 
97341  /* "View.MemoryView":1411
97342  * size_t itemsize, void *item) nogil:
97343  * cdef Py_ssize_t i
97344  * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
97345  * cdef Py_ssize_t extent = shape[0]
97346  *
97347  */
97348  __pyx_v_stride = (__pyx_v_strides[0]);
97349 
97350  /* "View.MemoryView":1412
97351  * cdef Py_ssize_t i
97352  * cdef Py_ssize_t stride = strides[0]
97353  * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
97354  *
97355  * if ndim == 1:
97356  */
97357  __pyx_v_extent = (__pyx_v_shape[0]);
97358 
97359  /* "View.MemoryView":1414
97360  * cdef Py_ssize_t extent = shape[0]
97361  *
97362  * if ndim == 1: # <<<<<<<<<<<<<<
97363  * for i in range(extent):
97364  * memcpy(data, item, itemsize)
97365  */
97366  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
97367  if (__pyx_t_1) {
97368 
97369  /* "View.MemoryView":1415
97370  *
97371  * if ndim == 1:
97372  * for i in range(extent): # <<<<<<<<<<<<<<
97373  * memcpy(data, item, itemsize)
97374  * data += stride
97375  */
97376  __pyx_t_2 = __pyx_v_extent;
97377  __pyx_t_3 = __pyx_t_2;
97378  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
97379  __pyx_v_i = __pyx_t_4;
97380 
97381  /* "View.MemoryView":1416
97382  * if ndim == 1:
97383  * for i in range(extent):
97384  * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
97385  * data += stride
97386  * else:
97387  */
97388  (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
97389 
97390  /* "View.MemoryView":1417
97391  * for i in range(extent):
97392  * memcpy(data, item, itemsize)
97393  * data += stride # <<<<<<<<<<<<<<
97394  * else:
97395  * for i in range(extent):
97396  */
97397  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
97398  }
97399 
97400  /* "View.MemoryView":1414
97401  * cdef Py_ssize_t extent = shape[0]
97402  *
97403  * if ndim == 1: # <<<<<<<<<<<<<<
97404  * for i in range(extent):
97405  * memcpy(data, item, itemsize)
97406  */
97407  goto __pyx_L3;
97408  }
97409 
97410  /* "View.MemoryView":1419
97411  * data += stride
97412  * else:
97413  * for i in range(extent): # <<<<<<<<<<<<<<
97414  * _slice_assign_scalar(data, shape + 1, strides + 1,
97415  * ndim - 1, itemsize, item)
97416  */
97417  /*else*/ {
97418  __pyx_t_2 = __pyx_v_extent;
97419  __pyx_t_3 = __pyx_t_2;
97420  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
97421  __pyx_v_i = __pyx_t_4;
97422 
97423  /* "View.MemoryView":1420
97424  * else:
97425  * for i in range(extent):
97426  * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
97427  * ndim - 1, itemsize, item)
97428  * data += stride
97429  */
97430  __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
97431 
97432  /* "View.MemoryView":1422
97433  * _slice_assign_scalar(data, shape + 1, strides + 1,
97434  * ndim - 1, itemsize, item)
97435  * data += stride # <<<<<<<<<<<<<<
97436  *
97437  *
97438  */
97439  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
97440  }
97441  }
97442  __pyx_L3:;
97443 
97444  /* "View.MemoryView":1407
97445  *
97446  * @cname('__pyx_memoryview__slice_assign_scalar')
97447  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
97448  * Py_ssize_t *strides, int ndim,
97449  * size_t itemsize, void *item) nogil:
97450  */
97451 
97452  /* function exit code */
97453  goto __pyx_L0;
97454  __pyx_L1_error:;
97455  __Pyx_WriteUnraisable("View.MemoryView._slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1);
97456  __pyx_L0:;
97457  __Pyx_TraceReturn(Py_None, 1);
97458 }
97459 
97460 /* "(tree fragment)":1
97461  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
97462  * cdef object __pyx_PickleError
97463  * cdef object __pyx_result
97464  */
97465 
97466 /* Python wrapper */
97467 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
97468 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
97469 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
97470  PyObject *__pyx_v___pyx_type = 0;
97471  long __pyx_v___pyx_checksum;
97472  PyObject *__pyx_v___pyx_state = 0;
97473  int __pyx_lineno = 0;
97474  const char *__pyx_filename = NULL;
97475  int __pyx_clineno = 0;
97476  PyObject *__pyx_r = 0;
97477  __Pyx_RefNannyDeclarations
97478  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
97479  {
97480  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
97481  PyObject* values[3] = {0,0,0};
97482  if (unlikely(__pyx_kwds)) {
97483  Py_ssize_t kw_args;
97484  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
97485  switch (pos_args) {
97486  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
97487  CYTHON_FALLTHROUGH;
97488  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
97489  CYTHON_FALLTHROUGH;
97490  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
97491  CYTHON_FALLTHROUGH;
97492  case 0: break;
97493  default: goto __pyx_L5_argtuple_error;
97494  }
97495  kw_args = PyDict_Size(__pyx_kwds);
97496  switch (pos_args) {
97497  case 0:
97498  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
97499  else goto __pyx_L5_argtuple_error;
97500  CYTHON_FALLTHROUGH;
97501  case 1:
97502  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
97503  else {
97504  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
97505  }
97506  CYTHON_FALLTHROUGH;
97507  case 2:
97508  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
97509  else {
97510  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
97511  }
97512  }
97513  if (unlikely(kw_args > 0)) {
97514  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
97515  }
97516  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
97517  goto __pyx_L5_argtuple_error;
97518  } else {
97519  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
97520  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
97521  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
97522  }
97523  __pyx_v___pyx_type = values[0];
97524  __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
97525  __pyx_v___pyx_state = values[2];
97526  }
97527  goto __pyx_L4_argument_unpacking_done;
97528  __pyx_L5_argtuple_error:;
97529  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
97530  __pyx_L3_error:;
97531  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
97532  __Pyx_RefNannyFinishContext();
97533  return NULL;
97534  __pyx_L4_argument_unpacking_done:;
97535  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
97536 
97537  /* function exit code */
97538  __Pyx_RefNannyFinishContext();
97539  return __pyx_r;
97540 }
97541 
97542 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
97543  PyObject *__pyx_v___pyx_PickleError = 0;
97544  PyObject *__pyx_v___pyx_result = 0;
97545  PyObject *__pyx_r = NULL;
97546  __Pyx_TraceDeclarations
97547  __Pyx_RefNannyDeclarations
97548  PyObject *__pyx_t_1 = NULL;
97549  int __pyx_t_2;
97550  int __pyx_t_3;
97551  PyObject *__pyx_t_4 = NULL;
97552  PyObject *__pyx_t_5 = NULL;
97553  PyObject *__pyx_t_6 = NULL;
97554  int __pyx_lineno = 0;
97555  const char *__pyx_filename = NULL;
97556  int __pyx_clineno = 0;
97557  __Pyx_TraceFrameInit(__pyx_codeobj__238)
97558  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
97559  __Pyx_TraceCall("__pyx_unpickle_Enum", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
97560 
97561  /* "(tree fragment)":4
97562  * cdef object __pyx_PickleError
97563  * cdef object __pyx_result
97564  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
97565  * from pickle import PickleError as __pyx_PickleError
97566  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
97567  */
97568  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
97569  __Pyx_GOTREF(__pyx_t_1);
97570  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__239, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
97571  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
97572  __pyx_t_3 = (__pyx_t_2 != 0);
97573  if (__pyx_t_3) {
97574 
97575  /* "(tree fragment)":5
97576  * cdef object __pyx_result
97577  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
97578  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
97579  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
97580  * __pyx_result = Enum.__new__(__pyx_type)
97581  */
97582  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
97583  __Pyx_GOTREF(__pyx_t_1);
97584  __Pyx_INCREF(__pyx_n_s_PickleError);
97585  __Pyx_GIVEREF(__pyx_n_s_PickleError);
97586  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
97587  __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
97588  __Pyx_GOTREF(__pyx_t_4);
97589  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
97590  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
97591  __Pyx_GOTREF(__pyx_t_1);
97592  __Pyx_INCREF(__pyx_t_1);
97593  __pyx_v___pyx_PickleError = __pyx_t_1;
97594  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
97595  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
97596 
97597  /* "(tree fragment)":6
97598  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995):
97599  * from pickle import PickleError as __pyx_PickleError
97600  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
97601  * __pyx_result = Enum.__new__(__pyx_type)
97602  * if __pyx_state is not None:
97603  */
97604  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
97605  __Pyx_GOTREF(__pyx_t_1);
97606  __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
97607  __Pyx_GOTREF(__pyx_t_5);
97608  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
97609  __Pyx_INCREF(__pyx_v___pyx_PickleError);
97610  __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
97611  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
97612  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
97613  if (likely(__pyx_t_6)) {
97614  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
97615  __Pyx_INCREF(__pyx_t_6);
97616  __Pyx_INCREF(function);
97617  __Pyx_DECREF_SET(__pyx_t_1, function);
97618  }
97619  }
97620  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
97621  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
97622  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
97623  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
97624  __Pyx_GOTREF(__pyx_t_4);
97625  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
97626  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
97627  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
97628  __PYX_ERR(1, 6, __pyx_L1_error)
97629 
97630  /* "(tree fragment)":4
97631  * cdef object __pyx_PickleError
97632  * cdef object __pyx_result
97633  * if __pyx_checksum not in (0xb068931, 0x82a3537, 0x6ae9995): # <<<<<<<<<<<<<<
97634  * from pickle import PickleError as __pyx_PickleError
97635  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
97636  */
97637  }
97638 
97639  /* "(tree fragment)":7
97640  * from pickle import PickleError as __pyx_PickleError
97641  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
97642  * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
97643  * if __pyx_state is not None:
97644  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
97645  */
97646  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
97647  __Pyx_GOTREF(__pyx_t_1);
97648  __pyx_t_5 = NULL;
97649  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
97650  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
97651  if (likely(__pyx_t_5)) {
97652  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
97653  __Pyx_INCREF(__pyx_t_5);
97654  __Pyx_INCREF(function);
97655  __Pyx_DECREF_SET(__pyx_t_1, function);
97656  }
97657  }
97658  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
97659  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
97660  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
97661  __Pyx_GOTREF(__pyx_t_4);
97662  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
97663  __pyx_v___pyx_result = __pyx_t_4;
97664  __pyx_t_4 = 0;
97665 
97666  /* "(tree fragment)":8
97667  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
97668  * __pyx_result = Enum.__new__(__pyx_type)
97669  * if __pyx_state is not None: # <<<<<<<<<<<<<<
97670  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
97671  * return __pyx_result
97672  */
97673  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
97674  __pyx_t_2 = (__pyx_t_3 != 0);
97675  if (__pyx_t_2) {
97676 
97677  /* "(tree fragment)":9
97678  * __pyx_result = Enum.__new__(__pyx_type)
97679  * if __pyx_state is not None:
97680  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
97681  * return __pyx_result
97682  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
97683  */
97684  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(1, 9, __pyx_L1_error)
97685  __pyx_t_4 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
97686  __Pyx_GOTREF(__pyx_t_4);
97687  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
97688 
97689  /* "(tree fragment)":8
97690  * raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xb068931, 0x82a3537, 0x6ae9995) = (name))" % __pyx_checksum)
97691  * __pyx_result = Enum.__new__(__pyx_type)
97692  * if __pyx_state is not None: # <<<<<<<<<<<<<<
97693  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
97694  * return __pyx_result
97695  */
97696  }
97697 
97698  /* "(tree fragment)":10
97699  * if __pyx_state is not None:
97700  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
97701  * return __pyx_result # <<<<<<<<<<<<<<
97702  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
97703  * __pyx_result.name = __pyx_state[0]
97704  */
97705  __Pyx_XDECREF(__pyx_r);
97706  __Pyx_INCREF(__pyx_v___pyx_result);
97707  __pyx_r = __pyx_v___pyx_result;
97708  goto __pyx_L0;
97709 
97710  /* "(tree fragment)":1
97711  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
97712  * cdef object __pyx_PickleError
97713  * cdef object __pyx_result
97714  */
97715 
97716  /* function exit code */
97717  __pyx_L1_error:;
97718  __Pyx_XDECREF(__pyx_t_1);
97719  __Pyx_XDECREF(__pyx_t_4);
97720  __Pyx_XDECREF(__pyx_t_5);
97721  __Pyx_XDECREF(__pyx_t_6);
97722  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
97723  __pyx_r = NULL;
97724  __pyx_L0:;
97725  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
97726  __Pyx_XDECREF(__pyx_v___pyx_result);
97727  __Pyx_XGIVEREF(__pyx_r);
97728  __Pyx_TraceReturn(__pyx_r, 0);
97729  __Pyx_RefNannyFinishContext();
97730  return __pyx_r;
97731 }
97732 
97733 /* "(tree fragment)":11
97734  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
97735  * return __pyx_result
97736  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
97737  * __pyx_result.name = __pyx_state[0]
97738  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
97739  */
97740 
97741 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
97742  PyObject *__pyx_r = NULL;
97743  __Pyx_TraceDeclarations
97744  __Pyx_RefNannyDeclarations
97745  PyObject *__pyx_t_1 = NULL;
97746  int __pyx_t_2;
97747  Py_ssize_t __pyx_t_3;
97748  int __pyx_t_4;
97749  int __pyx_t_5;
97750  PyObject *__pyx_t_6 = NULL;
97751  PyObject *__pyx_t_7 = NULL;
97752  PyObject *__pyx_t_8 = NULL;
97753  int __pyx_lineno = 0;
97754  const char *__pyx_filename = NULL;
97755  int __pyx_clineno = 0;
97756  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
97757  __Pyx_TraceCall("__pyx_unpickle_Enum__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
97758 
97759  /* "(tree fragment)":12
97760  * return __pyx_result
97761  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
97762  * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
97763  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
97764  * __pyx_result.__dict__.update(__pyx_state[1])
97765  */
97766  if (unlikely(__pyx_v___pyx_state == Py_None)) {
97767  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
97768  __PYX_ERR(1, 12, __pyx_L1_error)
97769  }
97770  __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(1, 12, __pyx_L1_error)
97771  __Pyx_GOTREF(__pyx_t_1);
97772  __Pyx_GIVEREF(__pyx_t_1);
97773  __Pyx_GOTREF(__pyx_v___pyx_result->name);
97774  __Pyx_DECREF(__pyx_v___pyx_result->name);
97775  __pyx_v___pyx_result->name = __pyx_t_1;
97776  __pyx_t_1 = 0;
97777 
97778  /* "(tree fragment)":13
97779  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
97780  * __pyx_result.name = __pyx_state[0]
97781  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
97782  * __pyx_result.__dict__.update(__pyx_state[1])
97783  */
97784  if (unlikely(__pyx_v___pyx_state == Py_None)) {
97785  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
97786  __PYX_ERR(1, 13, __pyx_L1_error)
97787  }
97788  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
97789  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
97790  if (__pyx_t_4) {
97791  } else {
97792  __pyx_t_2 = __pyx_t_4;
97793  goto __pyx_L4_bool_binop_done;
97794  }
97795  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
97796  __pyx_t_5 = (__pyx_t_4 != 0);
97797  __pyx_t_2 = __pyx_t_5;
97798  __pyx_L4_bool_binop_done:;
97799  if (__pyx_t_2) {
97800 
97801  /* "(tree fragment)":14
97802  * __pyx_result.name = __pyx_state[0]
97803  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
97804  * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
97805  */
97806  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
97807  __Pyx_GOTREF(__pyx_t_6);
97808  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 14, __pyx_L1_error)
97809  __Pyx_GOTREF(__pyx_t_7);
97810  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
97811  if (unlikely(__pyx_v___pyx_state == Py_None)) {
97812  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
97813  __PYX_ERR(1, 14, __pyx_L1_error)
97814  }
97815  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
97816  __Pyx_GOTREF(__pyx_t_6);
97817  __pyx_t_8 = NULL;
97818  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
97819  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
97820  if (likely(__pyx_t_8)) {
97821  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
97822  __Pyx_INCREF(__pyx_t_8);
97823  __Pyx_INCREF(function);
97824  __Pyx_DECREF_SET(__pyx_t_7, function);
97825  }
97826  }
97827  __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);
97828  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
97829  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
97830  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
97831  __Pyx_GOTREF(__pyx_t_1);
97832  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
97833  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
97834 
97835  /* "(tree fragment)":13
97836  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
97837  * __pyx_result.name = __pyx_state[0]
97838  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
97839  * __pyx_result.__dict__.update(__pyx_state[1])
97840  */
97841  }
97842 
97843  /* "(tree fragment)":11
97844  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
97845  * return __pyx_result
97846  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
97847  * __pyx_result.name = __pyx_state[0]
97848  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
97849  */
97850 
97851  /* function exit code */
97852  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
97853  goto __pyx_L0;
97854  __pyx_L1_error:;
97855  __Pyx_XDECREF(__pyx_t_1);
97856  __Pyx_XDECREF(__pyx_t_6);
97857  __Pyx_XDECREF(__pyx_t_7);
97858  __Pyx_XDECREF(__pyx_t_8);
97859  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
97860  __pyx_r = 0;
97861  __pyx_L0:;
97862  __Pyx_XGIVEREF(__pyx_r);
97863  __Pyx_TraceReturn(__pyx_r, 0);
97864  __Pyx_RefNannyFinishContext();
97865  return __pyx_r;
97866 }
97867 static struct __pyx_vtabstruct_3mbd_11CouplingFSI_ProtChBody __pyx_vtable_3mbd_11CouplingFSI_ProtChBody;
97868 
97869 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChBody(PyTypeObject *t, PyObject *a, PyObject *k) {
97870  struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *p;
97871  PyObject *o;
97872  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
97873  o = (*t->tp_alloc)(t, 0);
97874  } else {
97875  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
97876  }
97877  if (unlikely(!o)) return 0;
97878  p = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)o);
97879  p->__pyx_vtab = __pyx_vtabptr_3mbd_11CouplingFSI_ProtChBody;
97880  new((void*)&(p->rotation)) ChQuaternion<double> ();
97881  new((void*)&(p->rotation_last)) ChQuaternion<double> ();
97882  new((void*)&(p->trimesh_nodes)) std::vector<ChVector<double> > ();
97883  new((void*)&(p->trimesh_triangles)) std::vector<ChTriangle> ();
97884  new((void*)&(p->name)) std::string();
97885  new((void*)&(p->hdfFileName)) std::string();
97886  p->record_file = ((PyObject*)Py_None); Py_INCREF(Py_None);
97887  p->model = Py_None; Py_INCREF(Py_None);
97888  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
97889  p->Shape = Py_None; Py_INCREF(Py_None);
97890  p->record_dict = Py_None; Py_INCREF(Py_None);
97891  p->prescribed_motion_function = Py_None; Py_INCREF(Py_None);
97892  p->ChBody = Py_None; Py_INCREF(Py_None);
97893  p->ChBodyAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)Py_None); Py_INCREF(Py_None);
97894  p->position = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97895  p->position_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97896  p->F = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97897  p->M = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97898  p->F_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97899  p->M_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97900  p->F_prot = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97901  p->M_prot = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97902  p->F_prot_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97903  p->M_prot_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97904  p->F_applied = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97905  p->M_applied = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97906  p->F_applied_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97907  p->M_applied_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97908  p->F_Aij = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97909  p->M_Aij = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97910  p->F_Aij_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97911  p->M_Aij_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97912  p->acceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97913  p->acceleration_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97914  p->velocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97915  p->velocity_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97916  p->ang_acceleration_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97917  p->ang_acceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97918  p->ang_velocity_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97919  p->ang_velocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97920  p->barycenter0 = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97921  p->rotation_init = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97922  p->rotm = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97923  p->rotm_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97924  p->rotq = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97925  p->rotq_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97926  p->adams_vel = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97927  p->h_predict = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97928  p->h_ang_vel_predict = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97929  p->h_predict_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97930  p->h_ang_vel_predict_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97931  p->Aij = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97932  p->sdfIBM = Py_None; Py_INCREF(Py_None);
97933  p->boundaryFlags = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
97934  if (unlikely(__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1__cinit__(o, a, k) < 0)) goto bad;
97935  return o;
97936  bad:
97937  Py_DECREF(o); o = 0;
97938  return NULL;
97939 }
97940 
97941 static void __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChBody(PyObject *o) {
97942  struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)o;
97943  #if CYTHON_USE_TP_FINALIZE
97944  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
97945  if (PyObject_CallFinalizerFromDealloc(o)) return;
97946  }
97947  #endif
97948  PyObject_GC_UnTrack(o);
97949  __Pyx_call_destructor(p->rotation);
97950  __Pyx_call_destructor(p->rotation_last);
97951  __Pyx_call_destructor(p->trimesh_nodes);
97952  __Pyx_call_destructor(p->trimesh_triangles);
97953  __Pyx_call_destructor(p->name);
97954  __Pyx_call_destructor(p->hdfFileName);
97955  Py_CLEAR(p->record_file);
97956  Py_CLEAR(p->model);
97957  Py_CLEAR(p->ProtChSystem);
97958  Py_CLEAR(p->Shape);
97959  Py_CLEAR(p->record_dict);
97960  Py_CLEAR(p->prescribed_motion_function);
97961  Py_CLEAR(p->ChBody);
97962  Py_CLEAR(p->ChBodyAddedMass);
97963  Py_CLEAR(p->position);
97964  Py_CLEAR(p->position_last);
97965  Py_CLEAR(p->F);
97966  Py_CLEAR(p->M);
97967  Py_CLEAR(p->F_last);
97968  Py_CLEAR(p->M_last);
97969  Py_CLEAR(p->F_prot);
97970  Py_CLEAR(p->M_prot);
97971  Py_CLEAR(p->F_prot_last);
97972  Py_CLEAR(p->M_prot_last);
97973  Py_CLEAR(p->F_applied);
97974  Py_CLEAR(p->M_applied);
97975  Py_CLEAR(p->F_applied_last);
97976  Py_CLEAR(p->M_applied_last);
97977  Py_CLEAR(p->F_Aij);
97978  Py_CLEAR(p->M_Aij);
97979  Py_CLEAR(p->F_Aij_last);
97980  Py_CLEAR(p->M_Aij_last);
97981  Py_CLEAR(p->acceleration);
97982  Py_CLEAR(p->acceleration_last);
97983  Py_CLEAR(p->velocity);
97984  Py_CLEAR(p->velocity_last);
97985  Py_CLEAR(p->ang_acceleration_last);
97986  Py_CLEAR(p->ang_acceleration);
97987  Py_CLEAR(p->ang_velocity_last);
97988  Py_CLEAR(p->ang_velocity);
97989  Py_CLEAR(p->barycenter0);
97990  Py_CLEAR(p->rotation_init);
97991  Py_CLEAR(p->rotm);
97992  Py_CLEAR(p->rotm_last);
97993  Py_CLEAR(p->rotq);
97994  Py_CLEAR(p->rotq_last);
97995  Py_CLEAR(p->adams_vel);
97996  Py_CLEAR(p->h_predict);
97997  Py_CLEAR(p->h_ang_vel_predict);
97998  Py_CLEAR(p->h_predict_last);
97999  Py_CLEAR(p->h_ang_vel_predict_last);
98000  Py_CLEAR(p->Aij);
98001  Py_CLEAR(p->sdfIBM);
98002  Py_CLEAR(p->boundaryFlags);
98003  (*Py_TYPE(o)->tp_free)(o);
98004 }
98005 
98006 static int __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChBody(PyObject *o, visitproc v, void *a) {
98007  int e;
98008  struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)o;
98009  if (p->model) {
98010  e = (*v)(p->model, a); if (e) return e;
98011  }
98012  if (p->ProtChSystem) {
98013  e = (*v)(((PyObject *)p->ProtChSystem), a); if (e) return e;
98014  }
98015  if (p->Shape) {
98016  e = (*v)(p->Shape, a); if (e) return e;
98017  }
98018  if (p->record_dict) {
98019  e = (*v)(p->record_dict, a); if (e) return e;
98020  }
98021  if (p->prescribed_motion_function) {
98022  e = (*v)(p->prescribed_motion_function, a); if (e) return e;
98023  }
98024  if (p->ChBody) {
98025  e = (*v)(p->ChBody, a); if (e) return e;
98026  }
98027  if (p->ChBodyAddedMass) {
98028  e = (*v)(((PyObject *)p->ChBodyAddedMass), a); if (e) return e;
98029  }
98030  if (p->position) {
98031  e = (*v)(((PyObject *)p->position), a); if (e) return e;
98032  }
98033  if (p->position_last) {
98034  e = (*v)(((PyObject *)p->position_last), a); if (e) return e;
98035  }
98036  if (p->F) {
98037  e = (*v)(((PyObject *)p->F), a); if (e) return e;
98038  }
98039  if (p->M) {
98040  e = (*v)(((PyObject *)p->M), a); if (e) return e;
98041  }
98042  if (p->F_last) {
98043  e = (*v)(((PyObject *)p->F_last), a); if (e) return e;
98044  }
98045  if (p->M_last) {
98046  e = (*v)(((PyObject *)p->M_last), a); if (e) return e;
98047  }
98048  if (p->F_prot) {
98049  e = (*v)(((PyObject *)p->F_prot), a); if (e) return e;
98050  }
98051  if (p->M_prot) {
98052  e = (*v)(((PyObject *)p->M_prot), a); if (e) return e;
98053  }
98054  if (p->F_prot_last) {
98055  e = (*v)(((PyObject *)p->F_prot_last), a); if (e) return e;
98056  }
98057  if (p->M_prot_last) {
98058  e = (*v)(((PyObject *)p->M_prot_last), a); if (e) return e;
98059  }
98060  if (p->F_applied) {
98061  e = (*v)(((PyObject *)p->F_applied), a); if (e) return e;
98062  }
98063  if (p->M_applied) {
98064  e = (*v)(((PyObject *)p->M_applied), a); if (e) return e;
98065  }
98066  if (p->F_applied_last) {
98067  e = (*v)(((PyObject *)p->F_applied_last), a); if (e) return e;
98068  }
98069  if (p->M_applied_last) {
98070  e = (*v)(((PyObject *)p->M_applied_last), a); if (e) return e;
98071  }
98072  if (p->F_Aij) {
98073  e = (*v)(((PyObject *)p->F_Aij), a); if (e) return e;
98074  }
98075  if (p->M_Aij) {
98076  e = (*v)(((PyObject *)p->M_Aij), a); if (e) return e;
98077  }
98078  if (p->F_Aij_last) {
98079  e = (*v)(((PyObject *)p->F_Aij_last), a); if (e) return e;
98080  }
98081  if (p->M_Aij_last) {
98082  e = (*v)(((PyObject *)p->M_Aij_last), a); if (e) return e;
98083  }
98084  if (p->acceleration) {
98085  e = (*v)(((PyObject *)p->acceleration), a); if (e) return e;
98086  }
98087  if (p->acceleration_last) {
98088  e = (*v)(((PyObject *)p->acceleration_last), a); if (e) return e;
98089  }
98090  if (p->velocity) {
98091  e = (*v)(((PyObject *)p->velocity), a); if (e) return e;
98092  }
98093  if (p->velocity_last) {
98094  e = (*v)(((PyObject *)p->velocity_last), a); if (e) return e;
98095  }
98096  if (p->ang_acceleration_last) {
98097  e = (*v)(((PyObject *)p->ang_acceleration_last), a); if (e) return e;
98098  }
98099  if (p->ang_acceleration) {
98100  e = (*v)(((PyObject *)p->ang_acceleration), a); if (e) return e;
98101  }
98102  if (p->ang_velocity_last) {
98103  e = (*v)(((PyObject *)p->ang_velocity_last), a); if (e) return e;
98104  }
98105  if (p->ang_velocity) {
98106  e = (*v)(((PyObject *)p->ang_velocity), a); if (e) return e;
98107  }
98108  if (p->barycenter0) {
98109  e = (*v)(((PyObject *)p->barycenter0), a); if (e) return e;
98110  }
98111  if (p->rotation_init) {
98112  e = (*v)(((PyObject *)p->rotation_init), a); if (e) return e;
98113  }
98114  if (p->rotm) {
98115  e = (*v)(((PyObject *)p->rotm), a); if (e) return e;
98116  }
98117  if (p->rotm_last) {
98118  e = (*v)(((PyObject *)p->rotm_last), a); if (e) return e;
98119  }
98120  if (p->rotq) {
98121  e = (*v)(((PyObject *)p->rotq), a); if (e) return e;
98122  }
98123  if (p->rotq_last) {
98124  e = (*v)(((PyObject *)p->rotq_last), a); if (e) return e;
98125  }
98126  if (p->adams_vel) {
98127  e = (*v)(((PyObject *)p->adams_vel), a); if (e) return e;
98128  }
98129  if (p->h_predict) {
98130  e = (*v)(((PyObject *)p->h_predict), a); if (e) return e;
98131  }
98132  if (p->h_ang_vel_predict) {
98133  e = (*v)(((PyObject *)p->h_ang_vel_predict), a); if (e) return e;
98134  }
98135  if (p->h_predict_last) {
98136  e = (*v)(((PyObject *)p->h_predict_last), a); if (e) return e;
98137  }
98138  if (p->h_ang_vel_predict_last) {
98139  e = (*v)(((PyObject *)p->h_ang_vel_predict_last), a); if (e) return e;
98140  }
98141  if (p->Aij) {
98142  e = (*v)(((PyObject *)p->Aij), a); if (e) return e;
98143  }
98144  if (p->sdfIBM) {
98145  e = (*v)(p->sdfIBM, a); if (e) return e;
98146  }
98147  if (p->boundaryFlags) {
98148  e = (*v)(((PyObject *)p->boundaryFlags), a); if (e) return e;
98149  }
98150  return 0;
98151 }
98152 
98153 static int __pyx_tp_clear_3mbd_11CouplingFSI_ProtChBody(PyObject *o) {
98154  PyObject* tmp;
98155  struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)o;
98156  tmp = ((PyObject*)p->model);
98157  p->model = Py_None; Py_INCREF(Py_None);
98158  Py_XDECREF(tmp);
98159  tmp = ((PyObject*)p->ProtChSystem);
98160  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
98161  Py_XDECREF(tmp);
98162  tmp = ((PyObject*)p->Shape);
98163  p->Shape = Py_None; Py_INCREF(Py_None);
98164  Py_XDECREF(tmp);
98165  tmp = ((PyObject*)p->record_dict);
98166  p->record_dict = Py_None; Py_INCREF(Py_None);
98167  Py_XDECREF(tmp);
98168  tmp = ((PyObject*)p->prescribed_motion_function);
98169  p->prescribed_motion_function = Py_None; Py_INCREF(Py_None);
98170  Py_XDECREF(tmp);
98171  tmp = ((PyObject*)p->ChBody);
98172  p->ChBody = Py_None; Py_INCREF(Py_None);
98173  Py_XDECREF(tmp);
98174  tmp = ((PyObject*)p->ChBodyAddedMass);
98175  p->ChBodyAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)Py_None); Py_INCREF(Py_None);
98176  Py_XDECREF(tmp);
98177  tmp = ((PyObject*)p->position);
98178  p->position = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98179  Py_XDECREF(tmp);
98180  tmp = ((PyObject*)p->position_last);
98181  p->position_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98182  Py_XDECREF(tmp);
98183  tmp = ((PyObject*)p->F);
98184  p->F = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98185  Py_XDECREF(tmp);
98186  tmp = ((PyObject*)p->M);
98187  p->M = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98188  Py_XDECREF(tmp);
98189  tmp = ((PyObject*)p->F_last);
98190  p->F_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98191  Py_XDECREF(tmp);
98192  tmp = ((PyObject*)p->M_last);
98193  p->M_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98194  Py_XDECREF(tmp);
98195  tmp = ((PyObject*)p->F_prot);
98196  p->F_prot = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98197  Py_XDECREF(tmp);
98198  tmp = ((PyObject*)p->M_prot);
98199  p->M_prot = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98200  Py_XDECREF(tmp);
98201  tmp = ((PyObject*)p->F_prot_last);
98202  p->F_prot_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98203  Py_XDECREF(tmp);
98204  tmp = ((PyObject*)p->M_prot_last);
98205  p->M_prot_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98206  Py_XDECREF(tmp);
98207  tmp = ((PyObject*)p->F_applied);
98208  p->F_applied = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98209  Py_XDECREF(tmp);
98210  tmp = ((PyObject*)p->M_applied);
98211  p->M_applied = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98212  Py_XDECREF(tmp);
98213  tmp = ((PyObject*)p->F_applied_last);
98214  p->F_applied_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98215  Py_XDECREF(tmp);
98216  tmp = ((PyObject*)p->M_applied_last);
98217  p->M_applied_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98218  Py_XDECREF(tmp);
98219  tmp = ((PyObject*)p->F_Aij);
98220  p->F_Aij = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98221  Py_XDECREF(tmp);
98222  tmp = ((PyObject*)p->M_Aij);
98223  p->M_Aij = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98224  Py_XDECREF(tmp);
98225  tmp = ((PyObject*)p->F_Aij_last);
98226  p->F_Aij_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98227  Py_XDECREF(tmp);
98228  tmp = ((PyObject*)p->M_Aij_last);
98229  p->M_Aij_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98230  Py_XDECREF(tmp);
98231  tmp = ((PyObject*)p->acceleration);
98232  p->acceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98233  Py_XDECREF(tmp);
98234  tmp = ((PyObject*)p->acceleration_last);
98235  p->acceleration_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98236  Py_XDECREF(tmp);
98237  tmp = ((PyObject*)p->velocity);
98238  p->velocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98239  Py_XDECREF(tmp);
98240  tmp = ((PyObject*)p->velocity_last);
98241  p->velocity_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98242  Py_XDECREF(tmp);
98243  tmp = ((PyObject*)p->ang_acceleration_last);
98244  p->ang_acceleration_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98245  Py_XDECREF(tmp);
98246  tmp = ((PyObject*)p->ang_acceleration);
98247  p->ang_acceleration = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98248  Py_XDECREF(tmp);
98249  tmp = ((PyObject*)p->ang_velocity_last);
98250  p->ang_velocity_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98251  Py_XDECREF(tmp);
98252  tmp = ((PyObject*)p->ang_velocity);
98253  p->ang_velocity = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98254  Py_XDECREF(tmp);
98255  tmp = ((PyObject*)p->barycenter0);
98256  p->barycenter0 = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98257  Py_XDECREF(tmp);
98258  tmp = ((PyObject*)p->rotation_init);
98259  p->rotation_init = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98260  Py_XDECREF(tmp);
98261  tmp = ((PyObject*)p->rotm);
98262  p->rotm = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98263  Py_XDECREF(tmp);
98264  tmp = ((PyObject*)p->rotm_last);
98265  p->rotm_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98266  Py_XDECREF(tmp);
98267  tmp = ((PyObject*)p->rotq);
98268  p->rotq = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98269  Py_XDECREF(tmp);
98270  tmp = ((PyObject*)p->rotq_last);
98271  p->rotq_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98272  Py_XDECREF(tmp);
98273  tmp = ((PyObject*)p->adams_vel);
98274  p->adams_vel = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98275  Py_XDECREF(tmp);
98276  tmp = ((PyObject*)p->h_predict);
98277  p->h_predict = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98278  Py_XDECREF(tmp);
98279  tmp = ((PyObject*)p->h_ang_vel_predict);
98280  p->h_ang_vel_predict = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98281  Py_XDECREF(tmp);
98282  tmp = ((PyObject*)p->h_predict_last);
98283  p->h_predict_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98284  Py_XDECREF(tmp);
98285  tmp = ((PyObject*)p->h_ang_vel_predict_last);
98286  p->h_ang_vel_predict_last = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98287  Py_XDECREF(tmp);
98288  tmp = ((PyObject*)p->Aij);
98289  p->Aij = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98290  Py_XDECREF(tmp);
98291  tmp = ((PyObject*)p->sdfIBM);
98292  p->sdfIBM = Py_None; Py_INCREF(Py_None);
98293  Py_XDECREF(tmp);
98294  tmp = ((PyObject*)p->boundaryFlags);
98295  p->boundaryFlags = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
98296  Py_XDECREF(tmp);
98297  return 0;
98298 }
98299 
98300 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_record_file(PyObject *o, CYTHON_UNUSED void *x) {
98301  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_1__get__(o);
98302 }
98303 
98304 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_record_file(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98305  if (v) {
98306  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_3__set__(o, v);
98307  }
98308  else {
98309  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_file_5__del__(o);
98310  }
98311 }
98312 
98313 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_model(PyObject *o, CYTHON_UNUSED void *x) {
98314  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_1__get__(o);
98315 }
98316 
98317 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98318  if (v) {
98319  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_3__set__(o, v);
98320  }
98321  else {
98322  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5model_5__del__(o);
98323  }
98324 }
98325 
98326 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ProtChSystem(PyObject *o, CYTHON_UNUSED void *x) {
98327  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_1__get__(o);
98328 }
98329 
98330 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ProtChSystem(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98331  if (v) {
98332  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_3__set__(o, v);
98333  }
98334  else {
98335  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ProtChSystem_5__del__(o);
98336  }
98337 }
98338 
98339 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Shape(PyObject *o, CYTHON_UNUSED void *x) {
98340  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_1__get__(o);
98341 }
98342 
98343 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Shape(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98344  if (v) {
98345  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_3__set__(o, v);
98346  }
98347  else {
98348  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5Shape_5__del__(o);
98349  }
98350 }
98351 
98352 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_nd(PyObject *o, CYTHON_UNUSED void *x) {
98353  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2nd_1__get__(o);
98354 }
98355 
98356 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_nd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98357  if (v) {
98358  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2nd_3__set__(o, v);
98359  }
98360  else {
98361  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98362  return -1;
98363  }
98364 }
98365 
98366 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_dt(PyObject *o, CYTHON_UNUSED void *x) {
98367  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2dt_1__get__(o);
98368 }
98369 
98370 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_dt(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98371  if (v) {
98372  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_2dt_3__set__(o, v);
98373  }
98374  else {
98375  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98376  return -1;
98377  }
98378 }
98379 
98380 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_width_2D(PyObject *o, CYTHON_UNUSED void *x) {
98381  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8width_2D_1__get__(o);
98382 }
98383 
98384 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_width_2D(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98385  if (v) {
98386  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8width_2D_3__set__(o, v);
98387  }
98388  else {
98389  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98390  return -1;
98391  }
98392 }
98393 
98394 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_record_dict(PyObject *o, CYTHON_UNUSED void *x) {
98395  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_1__get__(o);
98396 }
98397 
98398 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_record_dict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98399  if (v) {
98400  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_3__set__(o, v);
98401  }
98402  else {
98403  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11record_dict_5__del__(o);
98404  }
98405 }
98406 
98407 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_prescribed_motion_function(PyObject *o, CYTHON_UNUSED void *x) {
98408  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_1__get__(o);
98409 }
98410 
98411 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_prescribed_motion_function(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98412  if (v) {
98413  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_3__set__(o, v);
98414  }
98415  else {
98416  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_26prescribed_motion_function_5__del__(o);
98417  }
98418 }
98419 
98420 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ChBody(PyObject *o, CYTHON_UNUSED void *x) {
98421  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_1__get__(o);
98422 }
98423 
98424 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ChBody(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98425  if (v) {
98426  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_3__set__(o, v);
98427  }
98428  else {
98429  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6ChBody_5__del__(o);
98430  }
98431 }
98432 
98433 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ChBodyAddedMass(PyObject *o, CYTHON_UNUSED void *x) {
98434  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_1__get__(o);
98435 }
98436 
98437 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ChBodyAddedMass(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98438  if (v) {
98439  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_3__set__(o, v);
98440  }
98441  else {
98442  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15ChBodyAddedMass_5__del__(o);
98443  }
98444 }
98445 
98446 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_position(PyObject *o, CYTHON_UNUSED void *x) {
98447  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_1__get__(o);
98448 }
98449 
98450 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_position(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98451  if (v) {
98452  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_3__set__(o, v);
98453  }
98454  else {
98455  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8position_5__del__(o);
98456  }
98457 }
98458 
98459 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_position_last(PyObject *o, CYTHON_UNUSED void *x) {
98460  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_1__get__(o);
98461 }
98462 
98463 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_position_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98464  if (v) {
98465  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_3__set__(o, v);
98466  }
98467  else {
98468  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13position_last_5__del__(o);
98469  }
98470 }
98471 
98472 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F(PyObject *o, CYTHON_UNUSED void *x) {
98473  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_1__get__(o);
98474 }
98475 
98476 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98477  if (v) {
98478  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_3__set__(o, v);
98479  }
98480  else {
98481  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1F_5__del__(o);
98482  }
98483 }
98484 
98485 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M(PyObject *o, CYTHON_UNUSED void *x) {
98486  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_1__get__(o);
98487 }
98488 
98489 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98490  if (v) {
98491  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_3__set__(o, v);
98492  }
98493  else {
98494  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_1M_5__del__(o);
98495  }
98496 }
98497 
98498 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_last(PyObject *o, CYTHON_UNUSED void *x) {
98499  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_1__get__(o);
98500 }
98501 
98502 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98503  if (v) {
98504  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_3__set__(o, v);
98505  }
98506  else {
98507  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_last_5__del__(o);
98508  }
98509 }
98510 
98511 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_last(PyObject *o, CYTHON_UNUSED void *x) {
98512  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_1__get__(o);
98513 }
98514 
98515 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98516  if (v) {
98517  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_3__set__(o, v);
98518  }
98519  else {
98520  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_last_5__del__(o);
98521  }
98522 }
98523 
98524 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_prot(PyObject *o, CYTHON_UNUSED void *x) {
98525  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_1__get__(o);
98526 }
98527 
98528 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_prot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98529  if (v) {
98530  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_3__set__(o, v);
98531  }
98532  else {
98533  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6F_prot_5__del__(o);
98534  }
98535 }
98536 
98537 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_prot(PyObject *o, CYTHON_UNUSED void *x) {
98538  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_1__get__(o);
98539 }
98540 
98541 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_prot(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98542  if (v) {
98543  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_3__set__(o, v);
98544  }
98545  else {
98546  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6M_prot_5__del__(o);
98547  }
98548 }
98549 
98550 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_prot_last(PyObject *o, CYTHON_UNUSED void *x) {
98551  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_1__get__(o);
98552 }
98553 
98554 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_prot_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98555  if (v) {
98556  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_3__set__(o, v);
98557  }
98558  else {
98559  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11F_prot_last_5__del__(o);
98560  }
98561 }
98562 
98563 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_prot_last(PyObject *o, CYTHON_UNUSED void *x) {
98564  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_1__get__(o);
98565 }
98566 
98567 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_prot_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98568  if (v) {
98569  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_3__set__(o, v);
98570  }
98571  else {
98572  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11M_prot_last_5__del__(o);
98573  }
98574 }
98575 
98576 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_applied(PyObject *o, CYTHON_UNUSED void *x) {
98577  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_1__get__(o);
98578 }
98579 
98580 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_applied(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98581  if (v) {
98582  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_3__set__(o, v);
98583  }
98584  else {
98585  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9F_applied_5__del__(o);
98586  }
98587 }
98588 
98589 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_applied(PyObject *o, CYTHON_UNUSED void *x) {
98590  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_1__get__(o);
98591 }
98592 
98593 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_applied(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98594  if (v) {
98595  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_3__set__(o, v);
98596  }
98597  else {
98598  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9M_applied_5__del__(o);
98599  }
98600 }
98601 
98602 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_applied_last(PyObject *o, CYTHON_UNUSED void *x) {
98603  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_1__get__(o);
98604 }
98605 
98606 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_applied_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98607  if (v) {
98608  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_3__set__(o, v);
98609  }
98610  else {
98611  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14F_applied_last_5__del__(o);
98612  }
98613 }
98614 
98615 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_applied_last(PyObject *o, CYTHON_UNUSED void *x) {
98616  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_1__get__(o);
98617 }
98618 
98619 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_applied_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98620  if (v) {
98621  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_3__set__(o, v);
98622  }
98623  else {
98624  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14M_applied_last_5__del__(o);
98625  }
98626 }
98627 
98628 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij(PyObject *o, CYTHON_UNUSED void *x) {
98629  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_1__get__(o);
98630 }
98631 
98632 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98633  if (v) {
98634  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_3__set__(o, v);
98635  }
98636  else {
98637  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5F_Aij_5__del__(o);
98638  }
98639 }
98640 
98641 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij(PyObject *o, CYTHON_UNUSED void *x) {
98642  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_1__get__(o);
98643 }
98644 
98645 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98646  if (v) {
98647  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_3__set__(o, v);
98648  }
98649  else {
98650  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5M_Aij_5__del__(o);
98651  }
98652 }
98653 
98654 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij_last(PyObject *o, CYTHON_UNUSED void *x) {
98655  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_1__get__(o);
98656 }
98657 
98658 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98659  if (v) {
98660  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_3__set__(o, v);
98661  }
98662  else {
98663  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10F_Aij_last_5__del__(o);
98664  }
98665 }
98666 
98667 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij_last(PyObject *o, CYTHON_UNUSED void *x) {
98668  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_1__get__(o);
98669 }
98670 
98671 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98672  if (v) {
98673  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_3__set__(o, v);
98674  }
98675  else {
98676  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10M_Aij_last_5__del__(o);
98677  }
98678 }
98679 
98680 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_acceleration(PyObject *o, CYTHON_UNUSED void *x) {
98681  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_1__get__(o);
98682 }
98683 
98684 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_acceleration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98685  if (v) {
98686  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_3__set__(o, v);
98687  }
98688  else {
98689  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12acceleration_5__del__(o);
98690  }
98691 }
98692 
98693 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_acceleration_last(PyObject *o, CYTHON_UNUSED void *x) {
98694  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_1__get__(o);
98695 }
98696 
98697 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_acceleration_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98698  if (v) {
98699  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_3__set__(o, v);
98700  }
98701  else {
98702  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17acceleration_last_5__del__(o);
98703  }
98704 }
98705 
98706 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_velocity(PyObject *o, CYTHON_UNUSED void *x) {
98707  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_1__get__(o);
98708 }
98709 
98710 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_velocity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98711  if (v) {
98712  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_3__set__(o, v);
98713  }
98714  else {
98715  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_8velocity_5__del__(o);
98716  }
98717 }
98718 
98719 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_velocity_last(PyObject *o, CYTHON_UNUSED void *x) {
98720  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_1__get__(o);
98721 }
98722 
98723 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_velocity_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98724  if (v) {
98725  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_3__set__(o, v);
98726  }
98727  else {
98728  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13velocity_last_5__del__(o);
98729  }
98730 }
98731 
98732 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration_last(PyObject *o, CYTHON_UNUSED void *x) {
98733  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_1__get__(o);
98734 }
98735 
98736 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98737  if (v) {
98738  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_3__set__(o, v);
98739  }
98740  else {
98741  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21ang_acceleration_last_5__del__(o);
98742  }
98743 }
98744 
98745 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration(PyObject *o, CYTHON_UNUSED void *x) {
98746  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_1__get__(o);
98747 }
98748 
98749 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98750  if (v) {
98751  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_3__set__(o, v);
98752  }
98753  else {
98754  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_16ang_acceleration_5__del__(o);
98755  }
98756 }
98757 
98758 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity_last(PyObject *o, CYTHON_UNUSED void *x) {
98759  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_1__get__(o);
98760 }
98761 
98762 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98763  if (v) {
98764  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_3__set__(o, v);
98765  }
98766  else {
98767  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_velocity_last_5__del__(o);
98768  }
98769 }
98770 
98771 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity(PyObject *o, CYTHON_UNUSED void *x) {
98772  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_1__get__(o);
98773 }
98774 
98775 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98776  if (v) {
98777  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_3__set__(o, v);
98778  }
98779  else {
98780  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_velocity_5__del__(o);
98781  }
98782 }
98783 
98784 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm(PyObject *o, CYTHON_UNUSED void *x) {
98785  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_1__get__(o);
98786 }
98787 
98788 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98789  if (v) {
98790  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_12ang_vel_norm_3__set__(o, v);
98791  }
98792  else {
98793  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98794  return -1;
98795  }
98796 }
98797 
98798 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm_last(PyObject *o, CYTHON_UNUSED void *x) {
98799  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_1__get__(o);
98800 }
98801 
98802 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98803  if (v) {
98804  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17ang_vel_norm_last_3__set__(o, v);
98805  }
98806  else {
98807  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98808  return -1;
98809  }
98810 }
98811 
98812 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_barycenter0(PyObject *o, CYTHON_UNUSED void *x) {
98813  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_1__get__(o);
98814 }
98815 
98816 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_barycenter0(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98817  if (v) {
98818  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_3__set__(o, v);
98819  }
98820  else {
98821  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11barycenter0_5__del__(o);
98822  }
98823 }
98824 
98825 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotation_init(PyObject *o, CYTHON_UNUSED void *x) {
98826  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_1__get__(o);
98827 }
98828 
98829 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotation_init(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98830  if (v) {
98831  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_3__set__(o, v);
98832  }
98833  else {
98834  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13rotation_init_5__del__(o);
98835  }
98836 }
98837 
98838 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotm(PyObject *o, CYTHON_UNUSED void *x) {
98839  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_1__get__(o);
98840 }
98841 
98842 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotm(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98843  if (v) {
98844  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_3__set__(o, v);
98845  }
98846  else {
98847  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotm_5__del__(o);
98848  }
98849 }
98850 
98851 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotm_last(PyObject *o, CYTHON_UNUSED void *x) {
98852  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_1__get__(o);
98853 }
98854 
98855 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotm_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98856  if (v) {
98857  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_3__set__(o, v);
98858  }
98859  else {
98860  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotm_last_5__del__(o);
98861  }
98862 }
98863 
98864 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotq(PyObject *o, CYTHON_UNUSED void *x) {
98865  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_1__get__(o);
98866 }
98867 
98868 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotq(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98869  if (v) {
98870  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_3__set__(o, v);
98871  }
98872  else {
98873  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4rotq_5__del__(o);
98874  }
98875 }
98876 
98877 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotq_last(PyObject *o, CYTHON_UNUSED void *x) {
98878  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_1__get__(o);
98879 }
98880 
98881 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotq_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98882  if (v) {
98883  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_3__set__(o, v);
98884  }
98885  else {
98886  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9rotq_last_5__del__(o);
98887  }
98888 }
98889 
98890 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_adams_vel(PyObject *o, CYTHON_UNUSED void *x) {
98891  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_1__get__(o);
98892 }
98893 
98894 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_adams_vel(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98895  if (v) {
98896  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_3__set__(o, v);
98897  }
98898  else {
98899  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9adams_vel_5__del__(o);
98900  }
98901 }
98902 
98903 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_name(PyObject *o, CYTHON_UNUSED void *x) {
98904  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4name_1__get__(o);
98905 }
98906 
98907 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98908  if (v) {
98909  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_4name_3__set__(o, v);
98910  }
98911  else {
98912  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98913  return -1;
98914  }
98915 }
98916 
98917 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_predicted(PyObject *o, CYTHON_UNUSED void *x) {
98918  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9predicted_1__get__(o);
98919 }
98920 
98921 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_predicted(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98922  if (v) {
98923  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9predicted_3__set__(o, v);
98924  }
98925  else {
98926  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98927  return -1;
98928  }
98929 }
98930 
98931 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_dt_predict(PyObject *o, CYTHON_UNUSED void *x) {
98932  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_1__get__(o);
98933 }
98934 
98935 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_dt_predict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98936  if (v) {
98937  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10dt_predict_3__set__(o, v);
98938  }
98939  else {
98940  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98941  return -1;
98942  }
98943 }
98944 
98945 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_predict(PyObject *o, CYTHON_UNUSED void *x) {
98946  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_1__get__(o);
98947 }
98948 
98949 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_predict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98950  if (v) {
98951  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_3__set__(o, v);
98952  }
98953  else {
98954  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9h_predict_5__del__(o);
98955  }
98956 }
98957 
98958 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict(PyObject *o, CYTHON_UNUSED void *x) {
98959  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_1__get__(o);
98960 }
98961 
98962 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98963  if (v) {
98964  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13h_ang_predict_3__set__(o, v);
98965  }
98966  else {
98967  PyErr_SetString(PyExc_NotImplementedError, "__del__");
98968  return -1;
98969  }
98970 }
98971 
98972 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict(PyObject *o, CYTHON_UNUSED void *x) {
98973  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_1__get__(o);
98974 }
98975 
98976 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98977  if (v) {
98978  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_3__set__(o, v);
98979  }
98980  else {
98981  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17h_ang_vel_predict_5__del__(o);
98982  }
98983 }
98984 
98985 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_predict_last(PyObject *o, CYTHON_UNUSED void *x) {
98986  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_1__get__(o);
98987 }
98988 
98989 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_predict_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
98990  if (v) {
98991  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_3__set__(o, v);
98992  }
98993  else {
98994  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14h_predict_last_5__del__(o);
98995  }
98996 }
98997 
98998 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict_last(PyObject *o, CYTHON_UNUSED void *x) {
98999  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_1__get__(o);
99000 }
99001 
99002 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99003  if (v) {
99004  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18h_ang_predict_last_3__set__(o, v);
99005  }
99006  else {
99007  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99008  return -1;
99009  }
99010 }
99011 
99012 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict_last(PyObject *o, CYTHON_UNUSED void *x) {
99013  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_1__get__(o);
99014 }
99015 
99016 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99017  if (v) {
99018  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_3__set__(o, v);
99019  }
99020  else {
99021  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_22h_ang_vel_predict_last_5__del__(o);
99022  }
99023 }
99024 
99025 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij(PyObject *o, CYTHON_UNUSED void *x) {
99026  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_1__get__(o);
99027 }
99028 
99029 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99030  if (v) {
99031  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_3__set__(o, v);
99032  }
99033  else {
99034  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3Aij_5__del__(o);
99035  }
99036 }
99037 
99038 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_applyAddedMass(PyObject *o, CYTHON_UNUSED void *x) {
99039  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_1__get__(o);
99040 }
99041 
99042 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_applyAddedMass(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99043  if (v) {
99044  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_14applyAddedMass_3__set__(o, v);
99045  }
99046  else {
99047  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99048  return -1;
99049  }
99050 }
99051 
99052 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij_updated_global(PyObject *o, CYTHON_UNUSED void *x) {
99053  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_1__get__(o);
99054 }
99055 
99056 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij_updated_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99057  if (v) {
99058  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_18Aij_updated_global_3__set__(o, v);
99059  }
99060  else {
99061  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99062  return -1;
99063  }
99064 }
99065 
99066 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij_transform_local(PyObject *o, CYTHON_UNUSED void *x) {
99067  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_1__get__(o);
99068 }
99069 
99070 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij_transform_local(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99071  if (v) {
99072  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19Aij_transform_local_3__set__(o, v);
99073  }
99074  else {
99075  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99076  return -1;
99077  }
99078 }
99079 
99080 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_useIBM(PyObject *o, CYTHON_UNUSED void *x) {
99081  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6useIBM_1__get__(o);
99082 }
99083 
99084 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_useIBM(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99085  if (v) {
99086  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6useIBM_3__set__(o, v);
99087  }
99088  else {
99089  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99090  return -1;
99091  }
99092 }
99093 
99094 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_radiusIBM(PyObject *o, CYTHON_UNUSED void *x) {
99095  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_1__get__(o);
99096 }
99097 
99098 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_radiusIBM(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99099  if (v) {
99100  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9radiusIBM_3__set__(o, v);
99101  }
99102  else {
99103  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99104  return -1;
99105  }
99106 }
99107 
99108 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_sdfIBM(PyObject *o, CYTHON_UNUSED void *x) {
99109  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_1__get__(o);
99110 }
99111 
99112 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_sdfIBM(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99113  if (v) {
99114  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_3__set__(o, v);
99115  }
99116  else {
99117  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_6sdfIBM_5__del__(o);
99118  }
99119 }
99120 
99121 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_hdfFileName(PyObject *o, CYTHON_UNUSED void *x) {
99122  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_1__get__(o);
99123 }
99124 
99125 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_hdfFileName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99126  if (v) {
99127  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11hdfFileName_3__set__(o, v);
99128  }
99129  else {
99130  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99131  return -1;
99132  }
99133 }
99134 
99135 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij_factor(PyObject *o, CYTHON_UNUSED void *x) {
99136  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_1__get__(o);
99137 }
99138 
99139 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij_factor(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99140  if (v) {
99141  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_10Aij_factor_3__set__(o, v);
99142  }
99143  else {
99144  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99145  return -1;
99146  }
99147 }
99148 
99149 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_boundaryFlags(PyObject *o, CYTHON_UNUSED void *x) {
99150  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_1__get__(o);
99151 }
99152 
99153 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_boundaryFlags(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99154  if (v) {
99155  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_3__set__(o, v);
99156  }
99157  else {
99158  return __pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13boundaryFlags_5__del__(o);
99159  }
99160 }
99161 
99162 static PyMethodDef __pyx_methods_3mbd_11CouplingFSI_ProtChBody[] = {
99163  {"getChronoObject", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_3getChronoObject, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_2getChronoObject},
99164  {"attachShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_5attachShape, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_4attachShape},
99165  {"addTriangleMeshFromShape", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_7addTriangleMeshFromShape, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_6addTriangleMeshFromShape},
99166  {"getTriangleMeshInfo", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_9getTriangleMeshInfo, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_8getTriangleMeshInfo},
99167  {"setCollisionOptions", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_11setCollisionOptions, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_10setCollisionOptions},
99168  {"setBoundaryFlags", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_13setBoundaryFlags, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_12setBoundaryFlags},
99169  {"setIBM", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_15setIBM, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_14setIBM},
99170  {"setWidth2D", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_17setWidth2D, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_16setWidth2D},
99171  {"attachAuxiliaryVariables", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_19attachAuxiliaryVariables, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_18attachAuxiliaryVariables},
99172  {"setInitialRot", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_21setInitialRot, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_20setInitialRot},
99173  {"hxyz", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_23hxyz, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_22hxyz},
99174  {"hx", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_25hx, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_24hx},
99175  {"hy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_27hy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_26hy},
99176  {"hz", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_29hz, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_28hz},
99177  {"hx_translation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_31hx_translation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_30hx_translation},
99178  {"hy_translation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_33hy_translation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_32hy_translation},
99179  {"hz_translation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_35hz_translation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_34hz_translation},
99180  {"hx_rotation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_37hx_rotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_36hx_rotation},
99181  {"hy_rotation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_39hy_rotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_38hy_rotation},
99182  {"hz_rotation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_41hz_rotation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_40hz_rotation},
99183  {"addSpring", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_43addSpring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_42addSpring},
99184  {"setConstraints", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_45setConstraints, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_44setConstraints},
99185  {"setAddedMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_47setAddedMass, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_46setAddedMass},
99186  {"getPressureForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_49getPressureForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_48getPressureForces},
99187  {"getShearForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_51getShearForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_50getShearForces},
99188  {"getMoments", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_53getMoments, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_52getMoments},
99189  {"getRotationMatrix", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_55getRotationMatrix, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_54getRotationMatrix},
99190  {"prestep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_57prestep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_56prestep},
99191  {"setExternalForces", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_59setExternalForces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_58setExternalForces},
99192  {"poststep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_61poststep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_60poststep},
99193  {"updateIBM", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_63updateIBM, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_62updateIBM},
99194  {"getDynamicSDF", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_65getDynamicSDF, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_64getDynamicSDF},
99195  {"setPosition", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_67setPosition, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_66setPosition},
99196  {"getPosition", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_69getPosition, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_68getPosition},
99197  {"setMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_71setMass, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_70setMass},
99198  {"getMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_73getMass, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_72getMass},
99199  {"setInertiaXX", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_75setInertiaXX, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_74setInertiaXX},
99200  {"setInertiaXY", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_77setInertiaXY, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_76setInertiaXY},
99201  {"getInertia", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_79getInertia, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_78getInertia},
99202  {"getVelocity", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_81getVelocity, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_80getVelocity},
99203  {"setVelocity", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_83setVelocity, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_82setVelocity},
99204  {"prediction", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_85prediction, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_84prediction},
99205  {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_87calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_86calculate_init},
99206  {"calculate", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_89calculate, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_88calculate},
99207  {"setPrescribedMotionCustom", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_91setPrescribedMotionCustom, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_90setPrescribedMotionCustom},
99208  {"setPrescribedMotionSine", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_93setPrescribedMotionSine, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_92setPrescribedMotionSine},
99209  {"setPrescribedMotionPoly", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_95setPrescribedMotionPoly, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_94setPrescribedMotionPoly},
99210  {"setPrescribedMotion", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_97setPrescribedMotion, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_96setPrescribedMotion},
99211  {"storeValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_99storeValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_98storeValues},
99212  {"getValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_101getValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_100getValues},
99213  {"setRecordValues", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_103setRecordValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_102setRecordValues},
99214  {"_recordValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_105_recordValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_104_recordValues},
99215  {"_recordH5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_107_recordH5, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_106_recordH5},
99216  {"_recordXML", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_109_recordXML, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_108_recordXML},
99217  {"addPrismaticLinksWithSpring", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_111addPrismaticLinksWithSpring, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_110addPrismaticLinksWithSpring},
99218  {"addPrismaticLinkX", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_113addPrismaticLinkX, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_112addPrismaticLinkX},
99219  {"setName", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_115setName, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_114setName},
99220  {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_117__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_116__reduce_cython__},
99221  {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChBody_119__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChBody_118__setstate_cython__},
99222  {0, 0, 0, 0}
99223 };
99224 
99225 static struct PyGetSetDef __pyx_getsets_3mbd_11CouplingFSI_ProtChBody[] = {
99226  {(char *)"record_file", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_record_file, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_record_file, (char *)"record_file: str", 0},
99227  {(char *)"model", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_model, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_model, (char *)"model: object", 0},
99228  {(char *)"ProtChSystem", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ProtChSystem, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ProtChSystem, (char *)"ProtChSystem: mbd.CouplingFSI.ProtChSystem", 0},
99229  {(char *)"Shape", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Shape, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Shape, (char *)"Shape: object", 0},
99230  {(char *)"nd", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_nd, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_nd, (char *)"nd: 'int'", 0},
99231  {(char *)"dt", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_dt, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_dt, (char *)"dt: 'double'", 0},
99232  {(char *)"width_2D", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_width_2D, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_width_2D, (char *)"width_2D: 'double'", 0},
99233  {(char *)"record_dict", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_record_dict, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_record_dict, (char *)"record_dict: object", 0},
99234  {(char *)"prescribed_motion_function", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_prescribed_motion_function, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_prescribed_motion_function, (char *)"prescribed_motion_function: object", 0},
99235  {(char *)"ChBody", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ChBody, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ChBody, (char *)"ChBody: object", 0},
99236  {(char *)"ChBodyAddedMass", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ChBodyAddedMass, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ChBodyAddedMass, (char *)"ChBodyAddedMass: mbd.CouplingFSI.ChBodyAddedMass", 0},
99237  {(char *)"position", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_position, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_position, (char *)"position: numpy.ndarray", 0},
99238  {(char *)"position_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_position_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_position_last, (char *)"position_last: numpy.ndarray", 0},
99239  {(char *)"F", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F, (char *)"F: numpy.ndarray", 0},
99240  {(char *)"M", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M, (char *)"M: numpy.ndarray", 0},
99241  {(char *)"F_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_last, (char *)"F_last: numpy.ndarray", 0},
99242  {(char *)"M_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_last, (char *)"M_last: numpy.ndarray", 0},
99243  {(char *)"F_prot", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_prot, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_prot, (char *)"F_prot: numpy.ndarray", 0},
99244  {(char *)"M_prot", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_prot, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_prot, (char *)"M_prot: numpy.ndarray", 0},
99245  {(char *)"F_prot_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_prot_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_prot_last, (char *)"F_prot_last: numpy.ndarray", 0},
99246  {(char *)"M_prot_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_prot_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_prot_last, (char *)"M_prot_last: numpy.ndarray", 0},
99247  {(char *)"F_applied", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_applied, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_applied, (char *)"F_applied: numpy.ndarray", 0},
99248  {(char *)"M_applied", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_applied, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_applied, (char *)"M_applied: numpy.ndarray", 0},
99249  {(char *)"F_applied_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_applied_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_applied_last, (char *)"F_applied_last: numpy.ndarray", 0},
99250  {(char *)"M_applied_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_applied_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_applied_last, (char *)"M_applied_last: numpy.ndarray", 0},
99251  {(char *)"F_Aij", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij, (char *)"F_Aij: numpy.ndarray", 0},
99252  {(char *)"M_Aij", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij, (char *)"M_Aij: numpy.ndarray", 0},
99253  {(char *)"F_Aij_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_F_Aij_last, (char *)"F_Aij_last: numpy.ndarray", 0},
99254  {(char *)"M_Aij_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_M_Aij_last, (char *)"M_Aij_last: numpy.ndarray", 0},
99255  {(char *)"acceleration", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_acceleration, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_acceleration, (char *)"acceleration: numpy.ndarray", 0},
99256  {(char *)"acceleration_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_acceleration_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_acceleration_last, (char *)"acceleration_last: numpy.ndarray", 0},
99257  {(char *)"velocity", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_velocity, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_velocity, (char *)"velocity: numpy.ndarray", 0},
99258  {(char *)"velocity_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_velocity_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_velocity_last, (char *)"velocity_last: numpy.ndarray", 0},
99259  {(char *)"ang_acceleration_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration_last, (char *)"ang_acceleration_last: numpy.ndarray", 0},
99260  {(char *)"ang_acceleration", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_acceleration, (char *)"ang_acceleration: numpy.ndarray", 0},
99261  {(char *)"ang_velocity_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity_last, (char *)"ang_velocity_last: numpy.ndarray", 0},
99262  {(char *)"ang_velocity", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_velocity, (char *)"ang_velocity: numpy.ndarray", 0},
99263  {(char *)"ang_vel_norm", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm, (char *)"ang_vel_norm: 'double'", 0},
99264  {(char *)"ang_vel_norm_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_ang_vel_norm_last, (char *)"ang_vel_norm_last: 'double'", 0},
99265  {(char *)"barycenter0", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_barycenter0, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_barycenter0, (char *)"barycenter0: numpy.ndarray", 0},
99266  {(char *)"rotation_init", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotation_init, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotation_init, (char *)"rotation_init: numpy.ndarray", 0},
99267  {(char *)"rotm", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotm, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotm, (char *)"rotm: numpy.ndarray", 0},
99268  {(char *)"rotm_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotm_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotm_last, (char *)"rotm_last: numpy.ndarray", 0},
99269  {(char *)"rotq", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotq, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotq, (char *)"rotq: numpy.ndarray", 0},
99270  {(char *)"rotq_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_rotq_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_rotq_last, (char *)"rotq_last: numpy.ndarray", 0},
99271  {(char *)"adams_vel", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_adams_vel, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_adams_vel, (char *)"adams_vel: numpy.ndarray", 0},
99272  {(char *)"name", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_name, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_name, (char *)"name: 'string'", 0},
99273  {(char *)"predicted", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_predicted, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_predicted, (char *)"predicted: 'bool'", 0},
99274  {(char *)"dt_predict", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_dt_predict, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_dt_predict, (char *)"dt_predict: 'double'", 0},
99275  {(char *)"h_predict", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_predict, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_predict, (char *)"h_predict: numpy.ndarray", 0},
99276  {(char *)"h_ang_predict", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict, (char *)"h_ang_predict: 'double'", 0},
99277  {(char *)"h_ang_vel_predict", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict, (char *)"h_ang_vel_predict: numpy.ndarray", 0},
99278  {(char *)"h_predict_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_predict_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_predict_last, (char *)"h_predict_last: numpy.ndarray", 0},
99279  {(char *)"h_ang_predict_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_predict_last, (char *)"h_ang_predict_last: 'double'", 0},
99280  {(char *)"h_ang_vel_predict_last", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict_last, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_h_ang_vel_predict_last, (char *)"h_ang_vel_predict_last: numpy.ndarray", 0},
99281  {(char *)"Aij", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij, (char *)"Aij: numpy.ndarray", 0},
99282  {(char *)"applyAddedMass", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_applyAddedMass, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_applyAddedMass, (char *)"applyAddedMass: 'bool'", 0},
99283  {(char *)"Aij_updated_global", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij_updated_global, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij_updated_global, (char *)"Aij_updated_global: 'bool'", 0},
99284  {(char *)"Aij_transform_local", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij_transform_local, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij_transform_local, (char *)"Aij_transform_local: 'bool'", 0},
99285  {(char *)"useIBM", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_useIBM, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_useIBM, (char *)"useIBM: 'bool'", 0},
99286  {(char *)"radiusIBM", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_radiusIBM, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_radiusIBM, (char *)"radiusIBM: 'double'", 0},
99287  {(char *)"sdfIBM", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_sdfIBM, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_sdfIBM, (char *)"sdfIBM: object", 0},
99288  {(char *)"hdfFileName", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_hdfFileName, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_hdfFileName, (char *)"hdfFileName: 'string'", 0},
99289  {(char *)"Aij_factor", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_Aij_factor, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_Aij_factor, (char *)"Aij_factor: 'double'", 0},
99290  {(char *)"boundaryFlags", __pyx_getprop_3mbd_11CouplingFSI_10ProtChBody_boundaryFlags, __pyx_setprop_3mbd_11CouplingFSI_10ProtChBody_boundaryFlags, (char *)"boundaryFlags: numpy.ndarray", 0},
99291  {0, 0, 0, 0, 0}
99292 };
99293 
99294 static PyTypeObject __pyx_type_3mbd_11CouplingFSI_ProtChBody = {
99295  PyVarObject_HEAD_INIT(0, 0)
99296  "mbd.CouplingFSI.ProtChBody", /*tp_name*/
99297  sizeof(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody), /*tp_basicsize*/
99298  0, /*tp_itemsize*/
99299  __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChBody, /*tp_dealloc*/
99300  #if PY_VERSION_HEX < 0x030800b4
99301  0, /*tp_print*/
99302  #endif
99303  #if PY_VERSION_HEX >= 0x030800b4
99304  0, /*tp_vectorcall_offset*/
99305  #endif
99306  0, /*tp_getattr*/
99307  0, /*tp_setattr*/
99308  #if PY_MAJOR_VERSION < 3
99309  0, /*tp_compare*/
99310  #endif
99311  #if PY_MAJOR_VERSION >= 3
99312  0, /*tp_as_async*/
99313  #endif
99314  0, /*tp_repr*/
99315  0, /*tp_as_number*/
99316  0, /*tp_as_sequence*/
99317  0, /*tp_as_mapping*/
99318  0, /*tp_hash*/
99319  0, /*tp_call*/
99320  0, /*tp_str*/
99321  0, /*tp_getattro*/
99322  0, /*tp_setattro*/
99323  0, /*tp_as_buffer*/
99324  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
99325  0, /*tp_doc*/
99326  __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChBody, /*tp_traverse*/
99327  __pyx_tp_clear_3mbd_11CouplingFSI_ProtChBody, /*tp_clear*/
99328  0, /*tp_richcompare*/
99329  0, /*tp_weaklistoffset*/
99330  0, /*tp_iter*/
99331  0, /*tp_iternext*/
99332  __pyx_methods_3mbd_11CouplingFSI_ProtChBody, /*tp_methods*/
99333  0, /*tp_members*/
99334  __pyx_getsets_3mbd_11CouplingFSI_ProtChBody, /*tp_getset*/
99335  0, /*tp_base*/
99336  0, /*tp_dict*/
99337  0, /*tp_descr_get*/
99338  0, /*tp_descr_set*/
99339  0, /*tp_dictoffset*/
99340  0, /*tp_init*/
99341  0, /*tp_alloc*/
99342  __pyx_tp_new_3mbd_11CouplingFSI_ProtChBody, /*tp_new*/
99343  0, /*tp_free*/
99344  0, /*tp_is_gc*/
99345  0, /*tp_bases*/
99346  0, /*tp_mro*/
99347  0, /*tp_cache*/
99348  0, /*tp_subclasses*/
99349  0, /*tp_weaklist*/
99350  0, /*tp_del*/
99351  0, /*tp_version_tag*/
99352  #if PY_VERSION_HEX >= 0x030400a1
99353  0, /*tp_finalize*/
99354  #endif
99355  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
99356  0, /*tp_vectorcall*/
99357  #endif
99358  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
99359  0, /*tp_print*/
99360  #endif
99361  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
99362  0, /*tp_pypy_flags*/
99363  #endif
99364 };
99365 
99366 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChSystem(PyTypeObject *t, PyObject *a, PyObject *k) {
99367  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *p;
99368  PyObject *o;
99369  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
99370  o = (*t->tp_alloc)(t, 0);
99371  } else {
99372  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
99373  }
99374  if (unlikely(!o)) return 0;
99375  p = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)o);
99376  new((void*)&(p->directory)) std::string();
99377  new((void*)&(p->myphysicsitem)) std::vector<std::shared_ptr<ChPhysicsItem> > ();
99378  new((void*)&(p->mybodies)) std::vector<std::shared_ptr<ChBody> > ();
99379  new((void*)&(p->scheme)) std::string();
99380  new((void*)&(p->prediction)) std::string();
99381  new((void*)&(p->log_chrono_format)) std::string();
99382  p->u = Py_None; Py_INCREF(Py_None);
99383  p->femSpace_velocity = Py_None; Py_INCREF(Py_None);
99384  p->femSpace_pressure = Py_None; Py_INCREF(Py_None);
99385  p->nodes_kdtree = Py_None; Py_INCREF(Py_None);
99386  p->ChSystemSMC = Py_None; Py_INCREF(Py_None);
99387  p->ChSystem = Py_None; Py_INCREF(Py_None);
99388  p->model = Py_None; Py_INCREF(Py_None);
99389  p->model_module = Py_None; Py_INCREF(Py_None);
99390  p->subcomponents = Py_None; Py_INCREF(Py_None);
99391  p->model_mesh = Py_None; Py_INCREF(Py_None);
99392  p->model_addedmass = Py_None; Py_INCREF(Py_None);
99393  p->ProtChAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)Py_None); Py_INCREF(Py_None);
99394  p->log_chrono_bodies = Py_None; Py_INCREF(Py_None);
99395  p->log_chrono_springs = Py_None; Py_INCREF(Py_None);
99396  p->log_chrono_residuals = Py_None; Py_INCREF(Py_None);
99397  if (unlikely(__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_1__cinit__(o, a, k) < 0)) goto bad;
99398  return o;
99399  bad:
99400  Py_DECREF(o); o = 0;
99401  return NULL;
99402 }
99403 
99404 static void __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChSystem(PyObject *o) {
99405  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)o;
99406  #if CYTHON_USE_TP_FINALIZE
99407  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
99408  if (PyObject_CallFinalizerFromDealloc(o)) return;
99409  }
99410  #endif
99411  PyObject_GC_UnTrack(o);
99412  __Pyx_call_destructor(p->directory);
99413  __Pyx_call_destructor(p->myphysicsitem);
99414  __Pyx_call_destructor(p->mybodies);
99415  __Pyx_call_destructor(p->scheme);
99416  __Pyx_call_destructor(p->prediction);
99417  __Pyx_call_destructor(p->log_chrono_format);
99418  Py_CLEAR(p->u);
99419  Py_CLEAR(p->femSpace_velocity);
99420  Py_CLEAR(p->femSpace_pressure);
99421  Py_CLEAR(p->nodes_kdtree);
99422  Py_CLEAR(p->ChSystemSMC);
99423  Py_CLEAR(p->ChSystem);
99424  Py_CLEAR(p->model);
99425  Py_CLEAR(p->model_module);
99426  Py_CLEAR(p->subcomponents);
99427  Py_CLEAR(p->model_mesh);
99428  Py_CLEAR(p->model_addedmass);
99429  Py_CLEAR(p->ProtChAddedMass);
99430  Py_CLEAR(p->log_chrono_bodies);
99431  Py_CLEAR(p->log_chrono_springs);
99432  Py_CLEAR(p->log_chrono_residuals);
99433  (*Py_TYPE(o)->tp_free)(o);
99434 }
99435 
99436 static int __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChSystem(PyObject *o, visitproc v, void *a) {
99437  int e;
99438  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)o;
99439  if (p->u) {
99440  e = (*v)(p->u, a); if (e) return e;
99441  }
99442  if (p->femSpace_velocity) {
99443  e = (*v)(p->femSpace_velocity, a); if (e) return e;
99444  }
99445  if (p->femSpace_pressure) {
99446  e = (*v)(p->femSpace_pressure, a); if (e) return e;
99447  }
99448  if (p->nodes_kdtree) {
99449  e = (*v)(p->nodes_kdtree, a); if (e) return e;
99450  }
99451  if (p->ChSystemSMC) {
99452  e = (*v)(p->ChSystemSMC, a); if (e) return e;
99453  }
99454  if (p->ChSystem) {
99455  e = (*v)(p->ChSystem, a); if (e) return e;
99456  }
99457  if (p->model) {
99458  e = (*v)(p->model, a); if (e) return e;
99459  }
99460  if (p->model_module) {
99461  e = (*v)(p->model_module, a); if (e) return e;
99462  }
99463  if (p->subcomponents) {
99464  e = (*v)(p->subcomponents, a); if (e) return e;
99465  }
99466  if (p->model_mesh) {
99467  e = (*v)(p->model_mesh, a); if (e) return e;
99468  }
99469  if (p->model_addedmass) {
99470  e = (*v)(p->model_addedmass, a); if (e) return e;
99471  }
99472  if (p->ProtChAddedMass) {
99473  e = (*v)(((PyObject *)p->ProtChAddedMass), a); if (e) return e;
99474  }
99475  if (p->log_chrono_bodies) {
99476  e = (*v)(p->log_chrono_bodies, a); if (e) return e;
99477  }
99478  if (p->log_chrono_springs) {
99479  e = (*v)(p->log_chrono_springs, a); if (e) return e;
99480  }
99481  if (p->log_chrono_residuals) {
99482  e = (*v)(p->log_chrono_residuals, a); if (e) return e;
99483  }
99484  return 0;
99485 }
99486 
99487 static int __pyx_tp_clear_3mbd_11CouplingFSI_ProtChSystem(PyObject *o) {
99488  PyObject* tmp;
99489  struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)o;
99490  tmp = ((PyObject*)p->u);
99491  p->u = Py_None; Py_INCREF(Py_None);
99492  Py_XDECREF(tmp);
99493  tmp = ((PyObject*)p->femSpace_velocity);
99494  p->femSpace_velocity = Py_None; Py_INCREF(Py_None);
99495  Py_XDECREF(tmp);
99496  tmp = ((PyObject*)p->femSpace_pressure);
99497  p->femSpace_pressure = Py_None; Py_INCREF(Py_None);
99498  Py_XDECREF(tmp);
99499  tmp = ((PyObject*)p->nodes_kdtree);
99500  p->nodes_kdtree = Py_None; Py_INCREF(Py_None);
99501  Py_XDECREF(tmp);
99502  tmp = ((PyObject*)p->ChSystemSMC);
99503  p->ChSystemSMC = Py_None; Py_INCREF(Py_None);
99504  Py_XDECREF(tmp);
99505  tmp = ((PyObject*)p->ChSystem);
99506  p->ChSystem = Py_None; Py_INCREF(Py_None);
99507  Py_XDECREF(tmp);
99508  tmp = ((PyObject*)p->model);
99509  p->model = Py_None; Py_INCREF(Py_None);
99510  Py_XDECREF(tmp);
99511  tmp = ((PyObject*)p->model_module);
99512  p->model_module = Py_None; Py_INCREF(Py_None);
99513  Py_XDECREF(tmp);
99514  tmp = ((PyObject*)p->subcomponents);
99515  p->subcomponents = Py_None; Py_INCREF(Py_None);
99516  Py_XDECREF(tmp);
99517  tmp = ((PyObject*)p->model_mesh);
99518  p->model_mesh = Py_None; Py_INCREF(Py_None);
99519  Py_XDECREF(tmp);
99520  tmp = ((PyObject*)p->model_addedmass);
99521  p->model_addedmass = Py_None; Py_INCREF(Py_None);
99522  Py_XDECREF(tmp);
99523  tmp = ((PyObject*)p->ProtChAddedMass);
99524  p->ProtChAddedMass = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)Py_None); Py_INCREF(Py_None);
99525  Py_XDECREF(tmp);
99526  tmp = ((PyObject*)p->log_chrono_bodies);
99527  p->log_chrono_bodies = Py_None; Py_INCREF(Py_None);
99528  Py_XDECREF(tmp);
99529  tmp = ((PyObject*)p->log_chrono_springs);
99530  p->log_chrono_springs = Py_None; Py_INCREF(Py_None);
99531  Py_XDECREF(tmp);
99532  tmp = ((PyObject*)p->log_chrono_residuals);
99533  p->log_chrono_residuals = Py_None; Py_INCREF(Py_None);
99534  Py_XDECREF(tmp);
99535  return 0;
99536 }
99537 
99538 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystemSMC(PyObject *o, CYTHON_UNUSED void *x) {
99539  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_1__get__(o);
99540 }
99541 
99542 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystemSMC(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99543  if (v) {
99544  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_3__set__(o, v);
99545  }
99546  else {
99547  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11ChSystemSMC_5__del__(o);
99548  }
99549 }
99550 
99551 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystem(PyObject *o, CYTHON_UNUSED void *x) {
99552  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_1__get__(o);
99553 }
99554 
99555 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystem(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99556  if (v) {
99557  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_3__set__(o, v);
99558  }
99559  else {
99560  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8ChSystem_5__del__(o);
99561  }
99562 }
99563 
99564 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model(PyObject *o, CYTHON_UNUSED void *x) {
99565  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_1__get__(o);
99566 }
99567 
99568 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99569  if (v) {
99570  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_3__set__(o, v);
99571  }
99572  else {
99573  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5model_5__del__(o);
99574  }
99575 }
99576 
99577 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model_module(PyObject *o, CYTHON_UNUSED void *x) {
99578  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_1__get__(o);
99579 }
99580 
99581 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model_module(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99582  if (v) {
99583  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_3__set__(o, v);
99584  }
99585  else {
99586  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12model_module_5__del__(o);
99587  }
99588 }
99589 
99590 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dt_init(PyObject *o, CYTHON_UNUSED void *x) {
99591  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_1__get__(o);
99592 }
99593 
99594 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dt_init(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99595  if (v) {
99596  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7dt_init_3__set__(o, v);
99597  }
99598  else {
99599  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99600  return -1;
99601  }
99602 }
99603 
99604 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid(PyObject *o, CYTHON_UNUSED void *x) {
99605  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_1__get__(o);
99606 }
99607 
99608 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99609  if (v) {
99610  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_8dt_fluid_3__set__(o, v);
99611  }
99612  else {
99613  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99614  return -1;
99615  }
99616 }
99617 
99618 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid_last(PyObject *o, CYTHON_UNUSED void *x) {
99619  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_1__get__(o);
99620 }
99621 
99622 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid_last(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99623  if (v) {
99624  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13dt_fluid_last_3__set__(o, v);
99625  }
99626  else {
99627  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99628  return -1;
99629  }
99630 }
99631 
99632 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_subcomponents(PyObject *o, CYTHON_UNUSED void *x) {
99633  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_1__get__(o);
99634 }
99635 
99636 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_subcomponents(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99637  if (v) {
99638  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_3__set__(o, v);
99639  }
99640  else {
99641  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13subcomponents_5__del__(o);
99642  }
99643 }
99644 
99645 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_chrono_dt(PyObject *o, CYTHON_UNUSED void *x) {
99646  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_1__get__(o);
99647 }
99648 
99649 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_chrono_dt(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99650  if (v) {
99651  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9chrono_dt_3__set__(o, v);
99652  }
99653  else {
99654  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99655  return -1;
99656  }
99657 }
99658 
99659 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_build_kdtree(PyObject *o, CYTHON_UNUSED void *x) {
99660  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_1__get__(o);
99661 }
99662 
99663 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_build_kdtree(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99664  if (v) {
99665  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_12build_kdtree_3__set__(o, v);
99666  }
99667  else {
99668  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99669  return -1;
99670  }
99671 }
99672 
99673 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dist_search(PyObject *o, CYTHON_UNUSED void *x) {
99674  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_1__get__(o);
99675 }
99676 
99677 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dist_search(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99678  if (v) {
99679  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11dist_search_3__set__(o, v);
99680  }
99681  else {
99682  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99683  return -1;
99684  }
99685 }
99686 
99687 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_first_step(PyObject *o, CYTHON_UNUSED void *x) {
99688  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10first_step_1__get__(o);
99689 }
99690 
99691 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_first_step(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99692  if (v) {
99693  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10first_step_3__set__(o, v);
99694  }
99695  else {
99696  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99697  return -1;
99698  }
99699 }
99700 
99701 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_scheme(PyObject *o, CYTHON_UNUSED void *x) {
99702  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6scheme_1__get__(o);
99703 }
99704 
99705 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_scheme(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99706  if (v) {
99707  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6scheme_3__set__(o, v);
99708  }
99709  else {
99710  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99711  return -1;
99712  }
99713 }
99714 
99715 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_prediction(PyObject *o, CYTHON_UNUSED void *x) {
99716  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10prediction_1__get__(o);
99717 }
99718 
99719 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_prediction(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99720  if (v) {
99721  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10prediction_3__set__(o, v);
99722  }
99723  else {
99724  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99725  return -1;
99726  }
99727 }
99728 
99729 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_step_nb(PyObject *o, CYTHON_UNUSED void *x) {
99730  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_1__get__(o);
99731 }
99732 
99733 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_step_nb(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99734  if (v) {
99735  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7step_nb_3__set__(o, v);
99736  }
99737  else {
99738  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99739  return -1;
99740  }
99741 }
99742 
99743 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_step_start(PyObject *o, CYTHON_UNUSED void *x) {
99744  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10step_start_1__get__(o);
99745 }
99746 
99747 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_step_start(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99748  if (v) {
99749  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10step_start_3__set__(o, v);
99750  }
99751  else {
99752  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99753  return -1;
99754  }
99755 }
99756 
99757 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_sampleRate(PyObject *o, CYTHON_UNUSED void *x) {
99758  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_1__get__(o);
99759 }
99760 
99761 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_sampleRate(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99762  if (v) {
99763  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10sampleRate_3__set__(o, v);
99764  }
99765  else {
99766  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99767  return -1;
99768  }
99769 }
99770 
99771 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_next_sample(PyObject *o, CYTHON_UNUSED void *x) {
99772  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_1__get__(o);
99773 }
99774 
99775 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_next_sample(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99776  if (v) {
99777  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11next_sample_3__set__(o, v);
99778  }
99779  else {
99780  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99781  return -1;
99782  }
99783 }
99784 
99785 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_record_values(PyObject *o, CYTHON_UNUSED void *x) {
99786  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13record_values_1__get__(o);
99787 }
99788 
99789 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_record_values(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99790  if (v) {
99791  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13record_values_3__set__(o, v);
99792  }
99793  else {
99794  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99795  return -1;
99796  }
99797 }
99798 
99799 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model_mesh(PyObject *o, CYTHON_UNUSED void *x) {
99800  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_1__get__(o);
99801 }
99802 
99803 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model_mesh(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99804  if (v) {
99805  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_3__set__(o, v);
99806  }
99807  else {
99808  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10model_mesh_5__del__(o);
99809  }
99810 }
99811 
99812 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model_addedmass(PyObject *o, CYTHON_UNUSED void *x) {
99813  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_1__get__(o);
99814 }
99815 
99816 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model_addedmass(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99817  if (v) {
99818  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_3__set__(o, v);
99819  }
99820  else {
99821  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15model_addedmass_5__del__(o);
99822  }
99823 }
99824 
99825 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_ProtChAddedMass(PyObject *o, CYTHON_UNUSED void *x) {
99826  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_1__get__(o);
99827 }
99828 
99829 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_ProtChAddedMass(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99830  if (v) {
99831  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_3__set__(o, v);
99832  }
99833  else {
99834  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15ProtChAddedMass_5__del__(o);
99835  }
99836 }
99837 
99838 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_tCount(PyObject *o, CYTHON_UNUSED void *x) {
99839  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6tCount_1__get__(o);
99840 }
99841 
99842 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_tCount(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99843  if (v) {
99844  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_6tCount_3__set__(o, v);
99845  }
99846  else {
99847  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99848  return -1;
99849  }
99850 }
99851 
99852 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_initialized(PyObject *o, CYTHON_UNUSED void *x) {
99853  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11initialized_1__get__(o);
99854 }
99855 
99856 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_initialized(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99857  if (v) {
99858  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11initialized_3__set__(o, v);
99859  }
99860  else {
99861  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99862  return -1;
99863  }
99864 }
99865 
99866 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_update_substeps(PyObject *o, CYTHON_UNUSED void *x) {
99867  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_1__get__(o);
99868 }
99869 
99870 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_update_substeps(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99871  if (v) {
99872  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15update_substeps_3__set__(o, v);
99873  }
99874  else {
99875  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99876  return -1;
99877  }
99878 }
99879 
99880 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_nBodiesIBM(PyObject *o, CYTHON_UNUSED void *x) {
99881  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_1__get__(o);
99882 }
99883 
99884 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_nBodiesIBM(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99885  if (v) {
99886  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_10nBodiesIBM_3__set__(o, v);
99887  }
99888  else {
99889  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99890  return -1;
99891  }
99892 }
99893 
99894 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_bodies(PyObject *o, CYTHON_UNUSED void *x) {
99895  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_1__get__(o);
99896 }
99897 
99898 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_bodies(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99899  if (v) {
99900  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_3__set__(o, v);
99901  }
99902  else {
99903  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_bodies_5__del__(o);
99904  }
99905 }
99906 
99907 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_springs(PyObject *o, CYTHON_UNUSED void *x) {
99908  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_1__get__(o);
99909 }
99910 
99911 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_springs(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99912  if (v) {
99913  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_3__set__(o, v);
99914  }
99915  else {
99916  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_18log_chrono_springs_5__del__(o);
99917  }
99918 }
99919 
99920 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_residuals(PyObject *o, CYTHON_UNUSED void *x) {
99921  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_1__get__(o);
99922 }
99923 
99924 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_residuals(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99925  if (v) {
99926  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_3__set__(o, v);
99927  }
99928  else {
99929  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_20log_chrono_residuals_5__del__(o);
99930  }
99931 }
99932 
99933 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_format(PyObject *o, CYTHON_UNUSED void *x) {
99934  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_1__get__(o);
99935 }
99936 
99937 static int __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_format(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
99938  if (v) {
99939  return __pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17log_chrono_format_3__set__(o, v);
99940  }
99941  else {
99942  PyErr_SetString(PyExc_NotImplementedError, "__del__");
99943  return -1;
99944  }
99945 }
99946 
99947 static PyMethodDef __pyx_methods_3mbd_11CouplingFSI_ProtChSystem[] = {
99948  {"getChronoObject", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_3getChronoObject, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_2getChronoObject},
99949  {"setTimeStep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_5setTimeStep, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_4setTimeStep},
99950  {"setSampleRate", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_7setSampleRate, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_6setSampleRate},
99951  {"addProtChBody", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_9addProtChBody, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_8addProtChBody},
99952  {"addProtChMesh", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_11addProtChMesh, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_10addProtChMesh},
99953  {"setGravitationalAcceleration", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_13setGravitationalAcceleration, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_12setGravitationalAcceleration},
99954  {"getGravitationalAcceleration", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_15getGravitationalAcceleration, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_14getGravitationalAcceleration},
99955  {"setCouplingScheme", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_17setCouplingScheme, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_16setCouplingScheme},
99956  {"attachModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_19attachModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_18attachModel},
99957  {"attachAuxiliaryVariables", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_21attachAuxiliaryVariables, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_20attachAuxiliaryVariables},
99958  {"setMinimumSubsteps", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_23setMinimumSubsteps, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_22setMinimumSubsteps},
99959  {"step", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_25step, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_24step},
99960  {"calculate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_27calculate, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_26calculate},
99961  {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_29calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_28calculate_init},
99962  {"setTimestepperType", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_31setTimestepperType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_30setTimestepperType},
99963  {"addSubcomponent", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_33addSubcomponent, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_32addSubcomponent},
99964  {"findElementContainingCoordsKD", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_35findElementContainingCoordsKD, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_34findElementContainingCoordsKD},
99965  {"findElementContainingCoordsDist", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_37findElementContainingCoordsDist, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_36findElementContainingCoordsDist},
99966  {"getFluidVelocityLocalCoords", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_39getFluidVelocityLocalCoords, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_38getFluidVelocityLocalCoords},
99967  {"getFluidVelocityGradientLocalCoords", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_41getFluidVelocityGradientLocalCoords, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_40getFluidVelocityGradientLocalCoords},
99968  {"setCollisionEnvelopeMargin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_43setCollisionEnvelopeMargin, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_42setCollisionEnvelopeMargin},
99969  {"log_bodies_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_45log_bodies_text, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_44log_bodies_text},
99970  {"log_bodies_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_47log_bodies_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_46log_bodies_h5},
99971  {"log_springs_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_49log_springs_text, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_48log_springs_text},
99972  {"log_springs_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_51log_springs_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_50log_springs_h5},
99973  {"log_residuals_text", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_53log_residuals_text, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_52log_residuals_text},
99974  {"log_residuals_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_55log_residuals_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_54log_residuals_h5},
99975  {"log_times_h5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_57log_times_h5, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_56log_times_h5},
99976  {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_59__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_58__reduce_cython__},
99977  {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_12ProtChSystem_61__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_12ProtChSystem_60__setstate_cython__},
99978  {0, 0, 0, 0}
99979 };
99980 
99981 static struct PyGetSetDef __pyx_getsets_3mbd_11CouplingFSI_ProtChSystem[] = {
99982  {(char *)"ChSystemSMC", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystemSMC, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystemSMC, (char *)"ChSystemSMC: object", 0},
99983  {(char *)"ChSystem", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystem, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_ChSystem, (char *)"ChSystem: object", 0},
99984  {(char *)"model", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model, (char *)"model: object", 0},
99985  {(char *)"model_module", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model_module, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model_module, (char *)"model_module: object", 0},
99986  {(char *)"dt_init", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dt_init, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dt_init, (char *)"dt_init: 'double'", 0},
99987  {(char *)"dt_fluid", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid, (char *)"dt_fluid: 'double'", 0},
99988  {(char *)"dt_fluid_last", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid_last, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dt_fluid_last, (char *)"dt_fluid_last: 'double'", 0},
99989  {(char *)"subcomponents", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_subcomponents, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_subcomponents, (char *)"subcomponents: object", 0},
99990  {(char *)"chrono_dt", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_chrono_dt, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_chrono_dt, (char *)"chrono_dt: 'double'", 0},
99991  {(char *)"build_kdtree", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_build_kdtree, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_build_kdtree, (char *)"build_kdtree: 'bool'", 0},
99992  {(char *)"dist_search", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_dist_search, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_dist_search, (char *)"dist_search: 'bool'", 0},
99993  {(char *)"first_step", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_first_step, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_first_step, (char *)"first_step: 'bool'", 0},
99994  {(char *)"scheme", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_scheme, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_scheme, (char *)"scheme: 'string'", 0},
99995  {(char *)"prediction", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_prediction, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_prediction, (char *)"prediction: 'string'", 0},
99996  {(char *)"step_nb", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_step_nb, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_step_nb, (char *)"step_nb: 'int'", 0},
99997  {(char *)"step_start", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_step_start, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_step_start, (char *)"step_start: 'int'", 0},
99998  {(char *)"sampleRate", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_sampleRate, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_sampleRate, (char *)"sampleRate: 'double'", 0},
99999  {(char *)"next_sample", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_next_sample, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_next_sample, (char *)"next_sample: 'double'", 0},
100000  {(char *)"record_values", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_record_values, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_record_values, (char *)"record_values: 'bool'", 0},
100001  {(char *)"model_mesh", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model_mesh, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model_mesh, (char *)"model_mesh: object", 0},
100002  {(char *)"model_addedmass", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_model_addedmass, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_model_addedmass, (char *)"model_addedmass: object", 0},
100003  {(char *)"ProtChAddedMass", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_ProtChAddedMass, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_ProtChAddedMass, (char *)"ProtChAddedMass: mbd.CouplingFSI.ProtChAddedMass", 0},
100004  {(char *)"tCount", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_tCount, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_tCount, (char *)"tCount: 'int'", 0},
100005  {(char *)"initialized", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_initialized, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_initialized, (char *)"initialized: 'bool'", 0},
100006  {(char *)"update_substeps", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_update_substeps, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_update_substeps, (char *)"update_substeps: 'bool'", 0},
100007  {(char *)"nBodiesIBM", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_nBodiesIBM, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_nBodiesIBM, (char *)"nBodiesIBM: 'int'", 0},
100008  {(char *)"log_chrono_bodies", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_bodies, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_bodies, (char *)"log_chrono_bodies: object", 0},
100009  {(char *)"log_chrono_springs", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_springs, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_springs, (char *)"log_chrono_springs: object", 0},
100010  {(char *)"log_chrono_residuals", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_residuals, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_residuals, (char *)"log_chrono_residuals: object", 0},
100011  {(char *)"log_chrono_format", __pyx_getprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_format, __pyx_setprop_3mbd_11CouplingFSI_12ProtChSystem_log_chrono_format, (char *)"log_chrono_format: 'string'", 0},
100012  {0, 0, 0, 0, 0}
100013 };
100014 
100015 static PyTypeObject __pyx_type_3mbd_11CouplingFSI_ProtChSystem = {
100016  PyVarObject_HEAD_INIT(0, 0)
100017  "mbd.CouplingFSI.ProtChSystem", /*tp_name*/
100018  sizeof(struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem), /*tp_basicsize*/
100019  0, /*tp_itemsize*/
100020  __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChSystem, /*tp_dealloc*/
100021  #if PY_VERSION_HEX < 0x030800b4
100022  0, /*tp_print*/
100023  #endif
100024  #if PY_VERSION_HEX >= 0x030800b4
100025  0, /*tp_vectorcall_offset*/
100026  #endif
100027  0, /*tp_getattr*/
100028  0, /*tp_setattr*/
100029  #if PY_MAJOR_VERSION < 3
100030  0, /*tp_compare*/
100031  #endif
100032  #if PY_MAJOR_VERSION >= 3
100033  0, /*tp_as_async*/
100034  #endif
100035  0, /*tp_repr*/
100036  0, /*tp_as_number*/
100037  0, /*tp_as_sequence*/
100038  0, /*tp_as_mapping*/
100039  0, /*tp_hash*/
100040  0, /*tp_call*/
100041  0, /*tp_str*/
100042  0, /*tp_getattro*/
100043  0, /*tp_setattro*/
100044  0, /*tp_as_buffer*/
100045  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
100046  0, /*tp_doc*/
100047  __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChSystem, /*tp_traverse*/
100048  __pyx_tp_clear_3mbd_11CouplingFSI_ProtChSystem, /*tp_clear*/
100049  0, /*tp_richcompare*/
100050  0, /*tp_weaklistoffset*/
100051  0, /*tp_iter*/
100052  0, /*tp_iternext*/
100053  __pyx_methods_3mbd_11CouplingFSI_ProtChSystem, /*tp_methods*/
100054  0, /*tp_members*/
100055  __pyx_getsets_3mbd_11CouplingFSI_ProtChSystem, /*tp_getset*/
100056  0, /*tp_base*/
100057  0, /*tp_dict*/
100058  0, /*tp_descr_get*/
100059  0, /*tp_descr_set*/
100060  0, /*tp_dictoffset*/
100061  0, /*tp_init*/
100062  0, /*tp_alloc*/
100063  __pyx_tp_new_3mbd_11CouplingFSI_ProtChSystem, /*tp_new*/
100064  0, /*tp_free*/
100065  0, /*tp_is_gc*/
100066  0, /*tp_bases*/
100067  0, /*tp_mro*/
100068  0, /*tp_cache*/
100069  0, /*tp_subclasses*/
100070  0, /*tp_weaklist*/
100071  0, /*tp_del*/
100072  0, /*tp_version_tag*/
100073  #if PY_VERSION_HEX >= 0x030400a1
100074  0, /*tp_finalize*/
100075  #endif
100076  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100077  0, /*tp_vectorcall*/
100078  #endif
100079  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
100080  0, /*tp_print*/
100081  #endif
100082  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
100083  0, /*tp_pypy_flags*/
100084  #endif
100085 };
100086 
100087 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChMesh(PyTypeObject *t, PyObject *a, PyObject *k) {
100088  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *p;
100089  PyObject *o;
100090  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
100091  o = (*t->tp_alloc)(t, 0);
100092  } else {
100093  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
100094  }
100095  if (unlikely(!o)) return 0;
100096  p = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)o);
100097  new((void*)&(p->mesh)) std::shared_ptr<ChMesh> ();
100098  p->ChMeshh = Py_None; Py_INCREF(Py_None);
100099  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
100100  if (unlikely(__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_1__cinit__(o, a, k) < 0)) goto bad;
100101  return o;
100102  bad:
100103  Py_DECREF(o); o = 0;
100104  return NULL;
100105 }
100106 
100107 static void __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChMesh(PyObject *o) {
100108  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)o;
100109  #if CYTHON_USE_TP_FINALIZE
100110  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
100111  if (PyObject_CallFinalizerFromDealloc(o)) return;
100112  }
100113  #endif
100114  PyObject_GC_UnTrack(o);
100115  __Pyx_call_destructor(p->mesh);
100116  Py_CLEAR(p->ChMeshh);
100117  Py_CLEAR(p->ProtChSystem);
100118  (*Py_TYPE(o)->tp_free)(o);
100119 }
100120 
100121 static int __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChMesh(PyObject *o, visitproc v, void *a) {
100122  int e;
100123  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)o;
100124  if (p->ChMeshh) {
100125  e = (*v)(p->ChMeshh, a); if (e) return e;
100126  }
100127  if (p->ProtChSystem) {
100128  e = (*v)(((PyObject *)p->ProtChSystem), a); if (e) return e;
100129  }
100130  return 0;
100131 }
100132 
100133 static int __pyx_tp_clear_3mbd_11CouplingFSI_ProtChMesh(PyObject *o) {
100134  PyObject* tmp;
100135  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh *)o;
100136  tmp = ((PyObject*)p->ChMeshh);
100137  p->ChMeshh = Py_None; Py_INCREF(Py_None);
100138  Py_XDECREF(tmp);
100139  tmp = ((PyObject*)p->ProtChSystem);
100140  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
100141  Py_XDECREF(tmp);
100142  return 0;
100143 }
100144 
100145 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChMesh_ChMeshh(PyObject *o, CYTHON_UNUSED void *x) {
100146  return __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_1__get__(o);
100147 }
100148 
100149 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChMesh_ChMeshh(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100150  if (v) {
100151  return __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_3__set__(o, v);
100152  }
100153  else {
100154  return __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7ChMeshh_5__del__(o);
100155  }
100156 }
100157 
100158 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_10ProtChMesh_ProtChSystem(PyObject *o, CYTHON_UNUSED void *x) {
100159  return __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_1__get__(o);
100160 }
100161 
100162 static int __pyx_setprop_3mbd_11CouplingFSI_10ProtChMesh_ProtChSystem(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100163  if (v) {
100164  return __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_3__set__(o, v);
100165  }
100166  else {
100167  return __pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_12ProtChSystem_5__del__(o);
100168  }
100169 }
100170 
100171 static PyMethodDef __pyx_methods_3mbd_11CouplingFSI_ProtChMesh[] = {
100172  {"getChronoObject", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_3getChronoObject, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_2getChronoObject},
100173  {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_5__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_4__reduce_cython__},
100174  {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_10ProtChMesh_7__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_10ProtChMesh_6__setstate_cython__},
100175  {0, 0, 0, 0}
100176 };
100177 
100178 static struct PyGetSetDef __pyx_getsets_3mbd_11CouplingFSI_ProtChMesh[] = {
100179  {(char *)"ChMeshh", __pyx_getprop_3mbd_11CouplingFSI_10ProtChMesh_ChMeshh, __pyx_setprop_3mbd_11CouplingFSI_10ProtChMesh_ChMeshh, (char *)"ChMeshh: object", 0},
100180  {(char *)"ProtChSystem", __pyx_getprop_3mbd_11CouplingFSI_10ProtChMesh_ProtChSystem, __pyx_setprop_3mbd_11CouplingFSI_10ProtChMesh_ProtChSystem, (char *)"ProtChSystem: mbd.CouplingFSI.ProtChSystem", 0},
100181  {0, 0, 0, 0, 0}
100182 };
100183 
100184 static PyTypeObject __pyx_type_3mbd_11CouplingFSI_ProtChMesh = {
100185  PyVarObject_HEAD_INIT(0, 0)
100186  "mbd.CouplingFSI.ProtChMesh", /*tp_name*/
100187  sizeof(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMesh), /*tp_basicsize*/
100188  0, /*tp_itemsize*/
100189  __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChMesh, /*tp_dealloc*/
100190  #if PY_VERSION_HEX < 0x030800b4
100191  0, /*tp_print*/
100192  #endif
100193  #if PY_VERSION_HEX >= 0x030800b4
100194  0, /*tp_vectorcall_offset*/
100195  #endif
100196  0, /*tp_getattr*/
100197  0, /*tp_setattr*/
100198  #if PY_MAJOR_VERSION < 3
100199  0, /*tp_compare*/
100200  #endif
100201  #if PY_MAJOR_VERSION >= 3
100202  0, /*tp_as_async*/
100203  #endif
100204  0, /*tp_repr*/
100205  0, /*tp_as_number*/
100206  0, /*tp_as_sequence*/
100207  0, /*tp_as_mapping*/
100208  0, /*tp_hash*/
100209  0, /*tp_call*/
100210  0, /*tp_str*/
100211  0, /*tp_getattro*/
100212  0, /*tp_setattro*/
100213  0, /*tp_as_buffer*/
100214  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
100215  0, /*tp_doc*/
100216  __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChMesh, /*tp_traverse*/
100217  __pyx_tp_clear_3mbd_11CouplingFSI_ProtChMesh, /*tp_clear*/
100218  0, /*tp_richcompare*/
100219  0, /*tp_weaklistoffset*/
100220  0, /*tp_iter*/
100221  0, /*tp_iternext*/
100222  __pyx_methods_3mbd_11CouplingFSI_ProtChMesh, /*tp_methods*/
100223  0, /*tp_members*/
100224  __pyx_getsets_3mbd_11CouplingFSI_ProtChMesh, /*tp_getset*/
100225  0, /*tp_base*/
100226  0, /*tp_dict*/
100227  0, /*tp_descr_get*/
100228  0, /*tp_descr_set*/
100229  0, /*tp_dictoffset*/
100230  0, /*tp_init*/
100231  0, /*tp_alloc*/
100232  __pyx_tp_new_3mbd_11CouplingFSI_ProtChMesh, /*tp_new*/
100233  0, /*tp_free*/
100234  0, /*tp_is_gc*/
100235  0, /*tp_bases*/
100236  0, /*tp_mro*/
100237  0, /*tp_cache*/
100238  0, /*tp_subclasses*/
100239  0, /*tp_weaklist*/
100240  0, /*tp_del*/
100241  0, /*tp_version_tag*/
100242  #if PY_VERSION_HEX >= 0x030400a1
100243  0, /*tp_finalize*/
100244  #endif
100245  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
100246  0, /*tp_vectorcall*/
100247  #endif
100248  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
100249  0, /*tp_print*/
100250  #endif
100251  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
100252  0, /*tp_pypy_flags*/
100253  #endif
100254 };
100255 
100256 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChMoorings(PyTypeObject *t, PyObject *a, PyObject *k) {
100257  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *p;
100258  PyObject *o;
100259  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
100260  o = (*t->tp_alloc)(t, 0);
100261  } else {
100262  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
100263  }
100264  if (unlikely(!o)) return 0;
100265  p = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)o);
100266  new((void*)&(p->name)) std::string();
100267  new((void*)&(p->beam_type)) std::string();
100268  new((void*)&(p->hdfFileName)) std::string();
100269  p->record_file = ((PyObject*)Py_None); Py_INCREF(Py_None);
100270  p->model = Py_None; Py_INCREF(Py_None);
100271  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
100272  p->Mesh = Py_None; Py_INCREF(Py_None);
100273  p->nodes_function = Py_None; Py_INCREF(Py_None);
100274  p->nodes_function_tangent = Py_None; Py_INCREF(Py_None);
100275  p->fluid_velocity_function = Py_None; Py_INCREF(Py_None);
100276  p->body_front = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)Py_None); Py_INCREF(Py_None);
100277  p->body_back = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)Py_None); Py_INCREF(Py_None);
100278  p->fluid_density_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100279  p->fluid_velocity_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100280  p->fluid_velocity_array_previous = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100281  p->fluid_acceleration_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100282  p->nb_elems = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100283  p->_record_names = Py_None; Py_INCREF(Py_None);
100284  p->_record_etas_names = Py_None; Py_INCREF(Py_None);
100285  p->nodes = Py_None; Py_INCREF(Py_None);
100286  p->elements = Py_None; Py_INCREF(Py_None);
100287  p->_record_etas.data = NULL;
100288  p->_record_etas.memview = NULL;
100289  p->nearest_node_array.data = NULL;
100290  p->nearest_node_array.memview = NULL;
100291  p->containing_element_array.data = NULL;
100292  p->containing_element_array.memview = NULL;
100293  p->owning_rank.data = NULL;
100294  p->owning_rank.memview = NULL;
100295  p->tCount_value.data = NULL;
100296  p->tCount_value.memview = NULL;
100297  if (unlikely(__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_1__cinit__(o, a, k) < 0)) goto bad;
100298  return o;
100299  bad:
100300  Py_DECREF(o); o = 0;
100301  return NULL;
100302 }
100303 
100304 static void __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChMoorings(PyObject *o) {
100305  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)o;
100306  #if CYTHON_USE_TP_FINALIZE
100307  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
100308  if (PyObject_CallFinalizerFromDealloc(o)) return;
100309  }
100310  #endif
100311  PyObject_GC_UnTrack(o);
100312  __Pyx_call_destructor(p->name);
100313  __Pyx_call_destructor(p->beam_type);
100314  __Pyx_call_destructor(p->hdfFileName);
100315  Py_CLEAR(p->record_file);
100316  Py_CLEAR(p->model);
100317  Py_CLEAR(p->ProtChSystem);
100318  Py_CLEAR(p->Mesh);
100319  Py_CLEAR(p->nodes_function);
100320  Py_CLEAR(p->nodes_function_tangent);
100321  Py_CLEAR(p->fluid_velocity_function);
100322  Py_CLEAR(p->body_front);
100323  Py_CLEAR(p->body_back);
100324  Py_CLEAR(p->fluid_density_array);
100325  Py_CLEAR(p->fluid_velocity_array);
100326  Py_CLEAR(p->fluid_velocity_array_previous);
100327  Py_CLEAR(p->fluid_acceleration_array);
100328  Py_CLEAR(p->nb_elems);
100329  Py_CLEAR(p->_record_names);
100330  Py_CLEAR(p->_record_etas_names);
100331  Py_CLEAR(p->nodes);
100332  Py_CLEAR(p->elements);
100333  __PYX_XDEC_MEMVIEW(&p->_record_etas, 1);
100334  __PYX_XDEC_MEMVIEW(&p->nearest_node_array, 1);
100335  __PYX_XDEC_MEMVIEW(&p->containing_element_array, 1);
100336  __PYX_XDEC_MEMVIEW(&p->owning_rank, 1);
100337  __PYX_XDEC_MEMVIEW(&p->tCount_value, 1);
100338  (*Py_TYPE(o)->tp_free)(o);
100339 }
100340 
100341 static int __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChMoorings(PyObject *o, visitproc v, void *a) {
100342  int e;
100343  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)o;
100344  if (p->model) {
100345  e = (*v)(p->model, a); if (e) return e;
100346  }
100347  if (p->ProtChSystem) {
100348  e = (*v)(((PyObject *)p->ProtChSystem), a); if (e) return e;
100349  }
100350  if (p->Mesh) {
100351  e = (*v)(p->Mesh, a); if (e) return e;
100352  }
100353  if (p->nodes_function) {
100354  e = (*v)(p->nodes_function, a); if (e) return e;
100355  }
100356  if (p->nodes_function_tangent) {
100357  e = (*v)(p->nodes_function_tangent, a); if (e) return e;
100358  }
100359  if (p->fluid_velocity_function) {
100360  e = (*v)(p->fluid_velocity_function, a); if (e) return e;
100361  }
100362  if (p->body_front) {
100363  e = (*v)(((PyObject *)p->body_front), a); if (e) return e;
100364  }
100365  if (p->body_back) {
100366  e = (*v)(((PyObject *)p->body_back), a); if (e) return e;
100367  }
100368  if (p->fluid_density_array) {
100369  e = (*v)(((PyObject *)p->fluid_density_array), a); if (e) return e;
100370  }
100371  if (p->fluid_velocity_array) {
100372  e = (*v)(((PyObject *)p->fluid_velocity_array), a); if (e) return e;
100373  }
100374  if (p->fluid_velocity_array_previous) {
100375  e = (*v)(((PyObject *)p->fluid_velocity_array_previous), a); if (e) return e;
100376  }
100377  if (p->fluid_acceleration_array) {
100378  e = (*v)(((PyObject *)p->fluid_acceleration_array), a); if (e) return e;
100379  }
100380  if (p->nb_elems) {
100381  e = (*v)(((PyObject *)p->nb_elems), a); if (e) return e;
100382  }
100383  if (p->_record_names) {
100384  e = (*v)(p->_record_names, a); if (e) return e;
100385  }
100386  if (p->_record_etas_names) {
100387  e = (*v)(p->_record_etas_names, a); if (e) return e;
100388  }
100389  if (p->nodes) {
100390  e = (*v)(p->nodes, a); if (e) return e;
100391  }
100392  if (p->elements) {
100393  e = (*v)(p->elements, a); if (e) return e;
100394  }
100395  return 0;
100396 }
100397 
100398 static int __pyx_tp_clear_3mbd_11CouplingFSI_ProtChMoorings(PyObject *o) {
100399  PyObject* tmp;
100400  struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings *)o;
100401  tmp = ((PyObject*)p->model);
100402  p->model = Py_None; Py_INCREF(Py_None);
100403  Py_XDECREF(tmp);
100404  tmp = ((PyObject*)p->ProtChSystem);
100405  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
100406  Py_XDECREF(tmp);
100407  tmp = ((PyObject*)p->Mesh);
100408  p->Mesh = Py_None; Py_INCREF(Py_None);
100409  Py_XDECREF(tmp);
100410  tmp = ((PyObject*)p->nodes_function);
100411  p->nodes_function = Py_None; Py_INCREF(Py_None);
100412  Py_XDECREF(tmp);
100413  tmp = ((PyObject*)p->nodes_function_tangent);
100414  p->nodes_function_tangent = Py_None; Py_INCREF(Py_None);
100415  Py_XDECREF(tmp);
100416  tmp = ((PyObject*)p->fluid_velocity_function);
100417  p->fluid_velocity_function = Py_None; Py_INCREF(Py_None);
100418  Py_XDECREF(tmp);
100419  tmp = ((PyObject*)p->body_front);
100420  p->body_front = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)Py_None); Py_INCREF(Py_None);
100421  Py_XDECREF(tmp);
100422  tmp = ((PyObject*)p->body_back);
100423  p->body_back = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)Py_None); Py_INCREF(Py_None);
100424  Py_XDECREF(tmp);
100425  tmp = ((PyObject*)p->fluid_density_array);
100426  p->fluid_density_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100427  Py_XDECREF(tmp);
100428  tmp = ((PyObject*)p->fluid_velocity_array);
100429  p->fluid_velocity_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100430  Py_XDECREF(tmp);
100431  tmp = ((PyObject*)p->fluid_velocity_array_previous);
100432  p->fluid_velocity_array_previous = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100433  Py_XDECREF(tmp);
100434  tmp = ((PyObject*)p->fluid_acceleration_array);
100435  p->fluid_acceleration_array = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100436  Py_XDECREF(tmp);
100437  tmp = ((PyObject*)p->nb_elems);
100438  p->nb_elems = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
100439  Py_XDECREF(tmp);
100440  tmp = ((PyObject*)p->_record_names);
100441  p->_record_names = Py_None; Py_INCREF(Py_None);
100442  Py_XDECREF(tmp);
100443  tmp = ((PyObject*)p->_record_etas_names);
100444  p->_record_etas_names = Py_None; Py_INCREF(Py_None);
100445  Py_XDECREF(tmp);
100446  tmp = ((PyObject*)p->nodes);
100447  p->nodes = Py_None; Py_INCREF(Py_None);
100448  Py_XDECREF(tmp);
100449  tmp = ((PyObject*)p->elements);
100450  p->elements = Py_None; Py_INCREF(Py_None);
100451  Py_XDECREF(tmp);
100452  return 0;
100453 }
100454 
100455 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_record_file(PyObject *o, CYTHON_UNUSED void *x) {
100456  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_1__get__(o);
100457 }
100458 
100459 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_record_file(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100460  if (v) {
100461  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_3__set__(o, v);
100462  }
100463  else {
100464  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11record_file_5__del__(o);
100465  }
100466 }
100467 
100468 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_model(PyObject *o, CYTHON_UNUSED void *x) {
100469  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_1__get__(o);
100470 }
100471 
100472 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100473  if (v) {
100474  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_3__set__(o, v);
100475  }
100476  else {
100477  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5model_5__del__(o);
100478  }
100479 }
100480 
100481 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_ProtChSystem(PyObject *o, CYTHON_UNUSED void *x) {
100482  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_1__get__(o);
100483 }
100484 
100485 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_ProtChSystem(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100486  if (v) {
100487  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_3__set__(o, v);
100488  }
100489  else {
100490  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12ProtChSystem_5__del__(o);
100491  }
100492 }
100493 
100494 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_Mesh(PyObject *o, CYTHON_UNUSED void *x) {
100495  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_1__get__(o);
100496 }
100497 
100498 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_Mesh(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100499  if (v) {
100500  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_3__set__(o, v);
100501  }
100502  else {
100503  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4Mesh_5__del__(o);
100504  }
100505 }
100506 
100507 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nd(PyObject *o, CYTHON_UNUSED void *x) {
100508  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_2nd_1__get__(o);
100509 }
100510 
100511 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nd(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100512  if (v) {
100513  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_2nd_3__set__(o, v);
100514  }
100515  else {
100516  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100517  return -1;
100518  }
100519 }
100520 
100521 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function(PyObject *o, CYTHON_UNUSED void *x) {
100522  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_1__get__(o);
100523 }
100524 
100525 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100526  if (v) {
100527  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_3__set__(o, v);
100528  }
100529  else {
100530  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_14nodes_function_5__del__(o);
100531  }
100532 }
100533 
100534 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function_tangent(PyObject *o, CYTHON_UNUSED void *x) {
100535  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_1__get__(o);
100536 }
100537 
100538 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function_tangent(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100539  if (v) {
100540  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_3__set__(o, v);
100541  }
100542  else {
100543  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22nodes_function_tangent_5__del__(o);
100544  }
100545 }
100546 
100547 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_function(PyObject *o, CYTHON_UNUSED void *x) {
100548  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_1__get__(o);
100549 }
100550 
100551 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_function(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100552  if (v) {
100553  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_3__set__(o, v);
100554  }
100555  else {
100556  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23fluid_velocity_function_5__del__(o);
100557  }
100558 }
100559 
100560 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_body_front(PyObject *o, CYTHON_UNUSED void *x) {
100561  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_1__get__(o);
100562 }
100563 
100564 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_body_front(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100565  if (v) {
100566  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_3__set__(o, v);
100567  }
100568  else {
100569  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10body_front_5__del__(o);
100570  }
100571 }
100572 
100573 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_body_back(PyObject *o, CYTHON_UNUSED void *x) {
100574  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_1__get__(o);
100575 }
100576 
100577 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_body_back(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100578  if (v) {
100579  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_3__set__(o, v);
100580  }
100581  else {
100582  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9body_back_5__del__(o);
100583  }
100584 }
100585 
100586 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_front_body(PyObject *o, CYTHON_UNUSED void *x) {
100587  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_1__get__(o);
100588 }
100589 
100590 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_front_body(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100591  if (v) {
100592  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_10front_body_3__set__(o, v);
100593  }
100594  else {
100595  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100596  return -1;
100597  }
100598 }
100599 
100600 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_back_body(PyObject *o, CYTHON_UNUSED void *x) {
100601  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_1__get__(o);
100602 }
100603 
100604 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_back_body(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100605  if (v) {
100606  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9back_body_3__set__(o, v);
100607  }
100608  else {
100609  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100610  return -1;
100611  }
100612 }
100613 
100614 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_built(PyObject *o, CYTHON_UNUSED void *x) {
100615  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_1__get__(o);
100616 }
100617 
100618 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_built(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100619  if (v) {
100620  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11nodes_built_3__set__(o, v);
100621  }
100622  else {
100623  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100624  return -1;
100625  }
100626 }
100627 
100628 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_from_ns(PyObject *o, CYTHON_UNUSED void *x) {
100629  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_1__get__(o);
100630 }
100631 
100632 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_from_ns(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100633  if (v) {
100634  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23external_forces_from_ns_3__set__(o, v);
100635  }
100636  else {
100637  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100638  return -1;
100639  }
100640 }
100641 
100642 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_manual(PyObject *o, CYTHON_UNUSED void *x) {
100643  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_1__get__(o);
100644 }
100645 
100646 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_manual(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100647  if (v) {
100648  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_22external_forces_manual_3__set__(o, v);
100649  }
100650  else {
100651  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100652  return -1;
100653  }
100654 }
100655 
100656 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_density_array(PyObject *o, CYTHON_UNUSED void *x) {
100657  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_1__get__(o);
100658 }
100659 
100660 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_density_array(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100661  if (v) {
100662  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_3__set__(o, v);
100663  }
100664  else {
100665  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19fluid_density_array_5__del__(o);
100666  }
100667 }
100668 
100669 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array(PyObject *o, CYTHON_UNUSED void *x) {
100670  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_1__get__(o);
100671 }
100672 
100673 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100674  if (v) {
100675  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_3__set__(o, v);
100676  }
100677  else {
100678  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_20fluid_velocity_array_5__del__(o);
100679  }
100680 }
100681 
100682 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array_previous(PyObject *o, CYTHON_UNUSED void *x) {
100683  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_1__get__(o);
100684 }
100685 
100686 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array_previous(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100687  if (v) {
100688  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_3__set__(o, v);
100689  }
100690  else {
100691  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29fluid_velocity_array_previous_5__del__(o);
100692  }
100693 }
100694 
100695 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_acceleration_array(PyObject *o, CYTHON_UNUSED void *x) {
100696  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_1__get__(o);
100697 }
100698 
100699 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_acceleration_array(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100700  if (v) {
100701  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_3__set__(o, v);
100702  }
100703  else {
100704  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24fluid_acceleration_array_5__del__(o);
100705  }
100706 }
100707 
100708 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_name(PyObject *o, CYTHON_UNUSED void *x) {
100709  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4name_1__get__(o);
100710 }
100711 
100712 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100713  if (v) {
100714  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_4name_3__set__(o, v);
100715  }
100716  else {
100717  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100718  return -1;
100719  }
100720 }
100721 
100722 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_beam_type(PyObject *o, CYTHON_UNUSED void *x) {
100723  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_1__get__(o);
100724 }
100725 
100726 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_beam_type(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100727  if (v) {
100728  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9beam_type_3__set__(o, v);
100729  }
100730  else {
100731  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100732  return -1;
100733  }
100734 }
100735 
100736 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_nb(PyObject *o, CYTHON_UNUSED void *x) {
100737  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_1__get__(o);
100738 }
100739 
100740 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_nb(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100741  if (v) {
100742  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nodes_nb_3__set__(o, v);
100743  }
100744  else {
100745  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100746  return -1;
100747  }
100748 }
100749 
100750 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nb_elems(PyObject *o, CYTHON_UNUSED void *x) {
100751  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_1__get__(o);
100752 }
100753 
100754 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nb_elems(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100755  if (v) {
100756  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_3__set__(o, v);
100757  }
100758  else {
100759  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8nb_elems_5__del__(o);
100760  }
100761 }
100762 
100763 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas(PyObject *o, CYTHON_UNUSED void *x) {
100764  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_1__get__(o);
100765 }
100766 
100767 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100768  if (v) {
100769  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12_record_etas_3__set__(o, v);
100770  }
100771  else {
100772  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100773  return -1;
100774  }
100775 }
100776 
100777 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings__record_names(PyObject *o, CYTHON_UNUSED void *x) {
100778  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_1__get__(o);
100779 }
100780 
100781 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings__record_names(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100782  if (v) {
100783  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_3__set__(o, v);
100784  }
100785  else {
100786  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13_record_names_5__del__(o);
100787  }
100788 }
100789 
100790 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas_names(PyObject *o, CYTHON_UNUSED void *x) {
100791  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_1__get__(o);
100792 }
100793 
100794 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas_names(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100795  if (v) {
100796  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_3__set__(o, v);
100797  }
100798  else {
100799  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18_record_etas_names_5__del__(o);
100800  }
100801 }
100802 
100803 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_initialized(PyObject *o, CYTHON_UNUSED void *x) {
100804  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_1__get__(o);
100805 }
100806 
100807 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_initialized(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100808  if (v) {
100809  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11initialized_3__set__(o, v);
100810  }
100811  else {
100812  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100813  return -1;
100814  }
100815 }
100816 
100817 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nearest_node_array(PyObject *o, CYTHON_UNUSED void *x) {
100818  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_1__get__(o);
100819 }
100820 
100821 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nearest_node_array(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100822  if (v) {
100823  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_18nearest_node_array_3__set__(o, v);
100824  }
100825  else {
100826  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100827  return -1;
100828  }
100829 }
100830 
100831 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_containing_element_array(PyObject *o, CYTHON_UNUSED void *x) {
100832  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_1__get__(o);
100833 }
100834 
100835 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_containing_element_array(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100836  if (v) {
100837  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_24containing_element_array_3__set__(o, v);
100838  }
100839  else {
100840  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100841  return -1;
100842  }
100843 }
100844 
100845 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_owning_rank(PyObject *o, CYTHON_UNUSED void *x) {
100846  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_1__get__(o);
100847 }
100848 
100849 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_owning_rank(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100850  if (v) {
100851  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11owning_rank_3__set__(o, v);
100852  }
100853  else {
100854  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100855  return -1;
100856  }
100857 }
100858 
100859 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_hdfFileName(PyObject *o, CYTHON_UNUSED void *x) {
100860  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_1__get__(o);
100861 }
100862 
100863 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_hdfFileName(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100864  if (v) {
100865  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11hdfFileName_3__set__(o, v);
100866  }
100867  else {
100868  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100869  return -1;
100870  }
100871 }
100872 
100873 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount_value(PyObject *o, CYTHON_UNUSED void *x) {
100874  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_1__get__(o);
100875 }
100876 
100877 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount_value(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100878  if (v) {
100879  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_12tCount_value_3__set__(o, v);
100880  }
100881  else {
100882  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100883  return -1;
100884  }
100885 }
100886 
100887 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount(PyObject *o, CYTHON_UNUSED void *x) {
100888  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_1__get__(o);
100889 }
100890 
100891 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100892  if (v) {
100893  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_6tCount_3__set__(o, v);
100894  }
100895  else {
100896  PyErr_SetString(PyExc_NotImplementedError, "__del__");
100897  return -1;
100898  }
100899 }
100900 
100901 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes(PyObject *o, CYTHON_UNUSED void *x) {
100902  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_1__get__(o);
100903 }
100904 
100905 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100906  if (v) {
100907  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_3__set__(o, v);
100908  }
100909  else {
100910  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5nodes_5__del__(o);
100911  }
100912 }
100913 
100914 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_elements(PyObject *o, CYTHON_UNUSED void *x) {
100915  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_1__get__(o);
100916 }
100917 
100918 static int __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_elements(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
100919  if (v) {
100920  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_3__set__(o, v);
100921  }
100922  else {
100923  return __pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_8elements_5__del__(o);
100924  }
100925 }
100926 
100927 static PyMethodDef __pyx_methods_3mbd_11CouplingFSI_ProtChMoorings[] = {
100928  {"setName", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_3setName, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_2setName},
100929  {"recordStrainEta", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_5recordStrainEta, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_4recordStrainEta},
100930  {"_recordH5", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_7_recordH5, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_6_recordH5},
100931  {"_recordXML", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_9_recordXML, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_8_recordXML},
100932  {"_recordValues", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_11_recordValues, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_10_recordValues},
100933  {"getTensionBack", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_13getTensionBack, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_12getTensionBack},
100934  {"getTensionFront", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_15getTensionFront, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_14getTensionFront},
100935  {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_17calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_16calculate_init},
100936  {"prestep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_19prestep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_18prestep},
100937  {"poststep", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_21poststep, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_20poststep},
100938  {"setApplyDrag", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_23setApplyDrag, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_22setApplyDrag},
100939  {"setApplyAddedMass", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_25setApplyAddedMass, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_24setApplyAddedMass},
100940  {"setApplyBuoyancy", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_27setApplyBuoyancy, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_26setApplyBuoyancy},
100941  {"setNodesPositionFunction", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_29setNodesPositionFunction, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_28setNodesPositionFunction},
100942  {"setFluidVelocityFunction", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_31setFluidVelocityFunction, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_30setFluidVelocityFunction},
100943  {"fixFrontNode", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_33fixFrontNode, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_32fixFrontNode},
100944  {"fixBackNode", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_35fixBackNode, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_34fixBackNode},
100945  {"attachBackNodeToBody", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_37attachBackNodeToBody, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_36attachBackNodeToBody},
100946  {"attachFrontNodeToBody", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_39attachFrontNodeToBody, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_38attachFrontNodeToBody},
100947  {"getTensionElement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_41getTensionElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_40getTensionElement},
100948  {"getNodesTension", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_43getNodesTension, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_42getNodesTension},
100949  {"setDragCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_45setDragCoefficients, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_44setDragCoefficients},
100950  {"setAddedMassCoefficients", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_47setAddedMassCoefficients, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_46setAddedMassCoefficients},
100951  {"setRestLengthPerElement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_49setRestLengthPerElement, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_48setRestLengthPerElement},
100952  {"setNodesPosition", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_51setNodesPosition, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_50setNodesPosition},
100953  {"buildNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_53buildNodes, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_52buildNodes},
100954  {"getNodesPosition", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_55getNodesPosition, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_54getNodesPosition},
100955  {"getNodesVelocity", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_57getNodesVelocity, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_56getNodesVelocity},
100956  {"getNodesAcceleration", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_59getNodesAcceleration, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_58getNodesAcceleration},
100957  {"getDragForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_61getDragForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_60getDragForces},
100958  {"getAddedMassForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_63getAddedMassForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_62getAddedMassForces},
100959  {"setIyy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_65setIyy, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_64setIyy},
100960  {"getNodesD", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_67getNodesD, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_66getNodesD},
100961  {"setContactMaterial", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_69setContactMaterial, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_68setContactMaterial},
100962  {"setExternalForces", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_71setExternalForces, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_70setExternalForces},
100963  {"updateForces", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_73updateForces, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_72updateForces},
100964  {"setFluidDensityAtNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_75setFluidDensityAtNodes, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_74setFluidDensityAtNodes},
100965  {"setFluidVelocityAtNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_77setFluidVelocityAtNodes, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_76setFluidVelocityAtNodes},
100966  {"setFluidAccelerationAtNodes", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_79setFluidAccelerationAtNodes, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_78setFluidAccelerationAtNodes},
100967  {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_81__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_80__reduce_cython__},
100968  {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_14ProtChMoorings_83__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_14ProtChMoorings_82__setstate_cython__},
100969  {0, 0, 0, 0}
100970 };
100971 
100972 static struct PyGetSetDef __pyx_getsets_3mbd_11CouplingFSI_ProtChMoorings[] = {
100973  {(char *)"record_file", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_record_file, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_record_file, (char *)"record_file: str", 0},
100974  {(char *)"model", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_model, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_model, (char *)"model: object", 0},
100975  {(char *)"ProtChSystem", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_ProtChSystem, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_ProtChSystem, (char *)"ProtChSystem: mbd.CouplingFSI.ProtChSystem", 0},
100976  {(char *)"Mesh", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_Mesh, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_Mesh, (char *)"Mesh: object", 0},
100977  {(char *)"nd", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nd, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nd, (char *)"nd: 'int'", 0},
100978  {(char *)"nodes_function", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function, (char *)"nodes_function: object", 0},
100979  {(char *)"nodes_function_tangent", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function_tangent, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_function_tangent, (char *)"nodes_function_tangent: object", 0},
100980  {(char *)"fluid_velocity_function", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_function, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_function, (char *)"fluid_velocity_function: object", 0},
100981  {(char *)"body_front", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_body_front, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_body_front, (char *)"body_front: mbd.CouplingFSI.ProtChBody", 0},
100982  {(char *)"body_back", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_body_back, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_body_back, (char *)"body_back: mbd.CouplingFSI.ProtChBody", 0},
100983  {(char *)"front_body", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_front_body, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_front_body, (char *)"front_body: 'bool'", 0},
100984  {(char *)"back_body", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_back_body, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_back_body, (char *)"back_body: 'bool'", 0},
100985  {(char *)"nodes_built", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_built, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_built, (char *)"nodes_built: 'bool'", 0},
100986  {(char *)"external_forces_from_ns", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_from_ns, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_from_ns, (char *)"external_forces_from_ns: 'bool'", 0},
100987  {(char *)"external_forces_manual", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_manual, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_external_forces_manual, (char *)"external_forces_manual: 'bool'", 0},
100988  {(char *)"fluid_density_array", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_density_array, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_density_array, (char *)"fluid_density_array: numpy.ndarray", 0},
100989  {(char *)"fluid_velocity_array", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array, (char *)"fluid_velocity_array: numpy.ndarray", 0},
100990  {(char *)"fluid_velocity_array_previous", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array_previous, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_velocity_array_previous, (char *)"fluid_velocity_array_previous: numpy.ndarray", 0},
100991  {(char *)"fluid_acceleration_array", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_acceleration_array, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_fluid_acceleration_array, (char *)"fluid_acceleration_array: numpy.ndarray", 0},
100992  {(char *)"name", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_name, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_name, (char *)"name: 'string'", 0},
100993  {(char *)"beam_type", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_beam_type, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_beam_type, (char *)"beam_type: 'string'", 0},
100994  {(char *)"nodes_nb", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_nb, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes_nb, (char *)"nodes_nb: 'int'", 0},
100995  {(char *)"nb_elems", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nb_elems, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nb_elems, (char *)"nb_elems: numpy.ndarray", 0},
100996  {(char *)"_record_etas", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas, (char *)"_record_etas: 'double[:]'", 0},
100997  {(char *)"_record_names", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings__record_names, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings__record_names, (char *)"_record_names: object", 0},
100998  {(char *)"_record_etas_names", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas_names, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings__record_etas_names, (char *)"_record_etas_names: object", 0},
100999  {(char *)"initialized", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_initialized, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_initialized, (char *)"initialized: 'bool'", 0},
101000  {(char *)"nearest_node_array", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nearest_node_array, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nearest_node_array, (char *)"nearest_node_array: 'int[:]'", 0},
101001  {(char *)"containing_element_array", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_containing_element_array, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_containing_element_array, (char *)"containing_element_array: 'int[:]'", 0},
101002  {(char *)"owning_rank", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_owning_rank, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_owning_rank, (char *)"owning_rank: 'int[:]'", 0},
101003  {(char *)"hdfFileName", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_hdfFileName, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_hdfFileName, (char *)"hdfFileName: 'string'", 0},
101004  {(char *)"tCount_value", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount_value, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount_value, (char *)"tCount_value: 'double[:]'", 0},
101005  {(char *)"tCount", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_tCount, (char *)"tCount: 'int'", 0},
101006  {(char *)"nodes", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_nodes, (char *)"nodes: object", 0},
101007  {(char *)"elements", __pyx_getprop_3mbd_11CouplingFSI_14ProtChMoorings_elements, __pyx_setprop_3mbd_11CouplingFSI_14ProtChMoorings_elements, (char *)"elements: object", 0},
101008  {0, 0, 0, 0, 0}
101009 };
101010 
101011 static PyTypeObject __pyx_type_3mbd_11CouplingFSI_ProtChMoorings = {
101012  PyVarObject_HEAD_INIT(0, 0)
101013  "mbd.CouplingFSI.ProtChMoorings", /*tp_name*/
101014  sizeof(struct __pyx_obj_3mbd_11CouplingFSI_ProtChMoorings), /*tp_basicsize*/
101015  0, /*tp_itemsize*/
101016  __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChMoorings, /*tp_dealloc*/
101017  #if PY_VERSION_HEX < 0x030800b4
101018  0, /*tp_print*/
101019  #endif
101020  #if PY_VERSION_HEX >= 0x030800b4
101021  0, /*tp_vectorcall_offset*/
101022  #endif
101023  0, /*tp_getattr*/
101024  0, /*tp_setattr*/
101025  #if PY_MAJOR_VERSION < 3
101026  0, /*tp_compare*/
101027  #endif
101028  #if PY_MAJOR_VERSION >= 3
101029  0, /*tp_as_async*/
101030  #endif
101031  0, /*tp_repr*/
101032  0, /*tp_as_number*/
101033  0, /*tp_as_sequence*/
101034  0, /*tp_as_mapping*/
101035  0, /*tp_hash*/
101036  0, /*tp_call*/
101037  0, /*tp_str*/
101038  0, /*tp_getattro*/
101039  0, /*tp_setattro*/
101040  0, /*tp_as_buffer*/
101041  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
101042  "Class for building mooring cables\n\n Parameters\n ----------\n system: System\n Class instance of the system.\n mesh: Mesh\n Class instance of the mesh.\n length: np.ndarray\n Length of cable segments. Must be an array, if the cable only\n has one type of segment (e.g. only one type of chain), an\n array of length 1 can be passed.\n nb_elems: np.ndarray\n Number of elements per segments.\n d: np.ndarray\n Diameter of segments.\n rho: np.ndarray\n Density of segments.\n E: np.ndarray\n Young's modulus of segments.\n beam_type: str\n Type of elements (default: \"CableANCF\").\n ", /*tp_doc*/
101043  __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChMoorings, /*tp_traverse*/
101044  __pyx_tp_clear_3mbd_11CouplingFSI_ProtChMoorings, /*tp_clear*/
101045  0, /*tp_richcompare*/
101046  0, /*tp_weaklistoffset*/
101047  0, /*tp_iter*/
101048  0, /*tp_iternext*/
101049  __pyx_methods_3mbd_11CouplingFSI_ProtChMoorings, /*tp_methods*/
101050  0, /*tp_members*/
101051  __pyx_getsets_3mbd_11CouplingFSI_ProtChMoorings, /*tp_getset*/
101052  0, /*tp_base*/
101053  0, /*tp_dict*/
101054  0, /*tp_descr_get*/
101055  0, /*tp_descr_set*/
101056  0, /*tp_dictoffset*/
101057  0, /*tp_init*/
101058  0, /*tp_alloc*/
101059  __pyx_tp_new_3mbd_11CouplingFSI_ProtChMoorings, /*tp_new*/
101060  0, /*tp_free*/
101061  0, /*tp_is_gc*/
101062  0, /*tp_bases*/
101063  0, /*tp_mro*/
101064  0, /*tp_cache*/
101065  0, /*tp_subclasses*/
101066  0, /*tp_weaklist*/
101067  0, /*tp_del*/
101068  0, /*tp_version_tag*/
101069  #if PY_VERSION_HEX >= 0x030400a1
101070  0, /*tp_finalize*/
101071  #endif
101072  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101073  0, /*tp_vectorcall*/
101074  #endif
101075  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
101076  0, /*tp_print*/
101077  #endif
101078  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
101079  0, /*tp_pypy_flags*/
101080  #endif
101081 };
101082 
101083 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ProtChAddedMass(PyTypeObject *t, PyObject *a, PyObject *k) {
101084  struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *p;
101085  PyObject *o;
101086  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
101087  o = (*t->tp_alloc)(t, 0);
101088  } else {
101089  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
101090  }
101091  if (unlikely(!o)) return 0;
101092  p = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)o);
101093  p->model = Py_None; Py_INCREF(Py_None);
101094  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
101095  if (unlikely(__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_1__cinit__(o, a, k) < 0)) goto bad;
101096  return o;
101097  bad:
101098  Py_DECREF(o); o = 0;
101099  return NULL;
101100 }
101101 
101102 static void __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChAddedMass(PyObject *o) {
101103  struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)o;
101104  #if CYTHON_USE_TP_FINALIZE
101105  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
101106  if (PyObject_CallFinalizerFromDealloc(o)) return;
101107  }
101108  #endif
101109  PyObject_GC_UnTrack(o);
101110  Py_CLEAR(p->model);
101111  Py_CLEAR(p->ProtChSystem);
101112  (*Py_TYPE(o)->tp_free)(o);
101113 }
101114 
101115 static int __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChAddedMass(PyObject *o, visitproc v, void *a) {
101116  int e;
101117  struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)o;
101118  if (p->model) {
101119  e = (*v)(p->model, a); if (e) return e;
101120  }
101121  if (p->ProtChSystem) {
101122  e = (*v)(((PyObject *)p->ProtChSystem), a); if (e) return e;
101123  }
101124  return 0;
101125 }
101126 
101127 static int __pyx_tp_clear_3mbd_11CouplingFSI_ProtChAddedMass(PyObject *o) {
101128  PyObject* tmp;
101129  struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *p = (struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass *)o;
101130  tmp = ((PyObject*)p->model);
101131  p->model = Py_None; Py_INCREF(Py_None);
101132  Py_XDECREF(tmp);
101133  tmp = ((PyObject*)p->ProtChSystem);
101134  p->ProtChSystem = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChSystem *)Py_None); Py_INCREF(Py_None);
101135  Py_XDECREF(tmp);
101136  return 0;
101137 }
101138 
101139 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_15ProtChAddedMass_model(PyObject *o, CYTHON_UNUSED void *x) {
101140  return __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_1__get__(o);
101141 }
101142 
101143 static int __pyx_setprop_3mbd_11CouplingFSI_15ProtChAddedMass_model(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
101144  if (v) {
101145  return __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_3__set__(o, v);
101146  }
101147  else {
101148  return __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5model_5__del__(o);
101149  }
101150 }
101151 
101152 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_15ProtChAddedMass_ProtChSystem(PyObject *o, CYTHON_UNUSED void *x) {
101153  return __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_1__get__(o);
101154 }
101155 
101156 static int __pyx_setprop_3mbd_11CouplingFSI_15ProtChAddedMass_ProtChSystem(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
101157  if (v) {
101158  return __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_3__set__(o, v);
101159  }
101160  else {
101161  return __pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_12ProtChSystem_5__del__(o);
101162  }
101163 }
101164 
101165 static PyMethodDef __pyx_methods_3mbd_11CouplingFSI_ProtChAddedMass[] = {
101166  {"attachModel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_3attachModel, METH_VARARGS|METH_KEYWORDS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_2attachModel},
101167  {"attachAuxiliaryVariables", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_5attachAuxiliaryVariables, METH_O, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_4attachAuxiliaryVariables},
101168  {"calculate_init", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_7calculate_init, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_6calculate_init},
101169  {"calculate", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_9calculate, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_8calculate},
101170  {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_11__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_10__reduce_cython__},
101171  {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ProtChAddedMass_13__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_15ProtChAddedMass_12__setstate_cython__},
101172  {0, 0, 0, 0}
101173 };
101174 
101175 static struct PyGetSetDef __pyx_getsets_3mbd_11CouplingFSI_ProtChAddedMass[] = {
101176  {(char *)"model", __pyx_getprop_3mbd_11CouplingFSI_15ProtChAddedMass_model, __pyx_setprop_3mbd_11CouplingFSI_15ProtChAddedMass_model, (char *)"model: object", 0},
101177  {(char *)"ProtChSystem", __pyx_getprop_3mbd_11CouplingFSI_15ProtChAddedMass_ProtChSystem, __pyx_setprop_3mbd_11CouplingFSI_15ProtChAddedMass_ProtChSystem, (char *)"ProtChSystem: mbd.CouplingFSI.ProtChSystem", 0},
101178  {0, 0, 0, 0, 0}
101179 };
101180 
101181 static PyTypeObject __pyx_type_3mbd_11CouplingFSI_ProtChAddedMass = {
101182  PyVarObject_HEAD_INIT(0, 0)
101183  "mbd.CouplingFSI.ProtChAddedMass", /*tp_name*/
101184  sizeof(struct __pyx_obj_3mbd_11CouplingFSI_ProtChAddedMass), /*tp_basicsize*/
101185  0, /*tp_itemsize*/
101186  __pyx_tp_dealloc_3mbd_11CouplingFSI_ProtChAddedMass, /*tp_dealloc*/
101187  #if PY_VERSION_HEX < 0x030800b4
101188  0, /*tp_print*/
101189  #endif
101190  #if PY_VERSION_HEX >= 0x030800b4
101191  0, /*tp_vectorcall_offset*/
101192  #endif
101193  0, /*tp_getattr*/
101194  0, /*tp_setattr*/
101195  #if PY_MAJOR_VERSION < 3
101196  0, /*tp_compare*/
101197  #endif
101198  #if PY_MAJOR_VERSION >= 3
101199  0, /*tp_as_async*/
101200  #endif
101201  0, /*tp_repr*/
101202  0, /*tp_as_number*/
101203  0, /*tp_as_sequence*/
101204  0, /*tp_as_mapping*/
101205  0, /*tp_hash*/
101206  0, /*tp_call*/
101207  0, /*tp_str*/
101208  0, /*tp_getattro*/
101209  0, /*tp_setattro*/
101210  0, /*tp_as_buffer*/
101211  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
101212  "\n Class (hack) to attach added mass model to ProtChSystem\n This auxiliary variable is ONLY used to attach the AddedMass\n model to a ProtChSystem\n ", /*tp_doc*/
101213  __pyx_tp_traverse_3mbd_11CouplingFSI_ProtChAddedMass, /*tp_traverse*/
101214  __pyx_tp_clear_3mbd_11CouplingFSI_ProtChAddedMass, /*tp_clear*/
101215  0, /*tp_richcompare*/
101216  0, /*tp_weaklistoffset*/
101217  0, /*tp_iter*/
101218  0, /*tp_iternext*/
101219  __pyx_methods_3mbd_11CouplingFSI_ProtChAddedMass, /*tp_methods*/
101220  0, /*tp_members*/
101221  __pyx_getsets_3mbd_11CouplingFSI_ProtChAddedMass, /*tp_getset*/
101222  0, /*tp_base*/
101223  0, /*tp_dict*/
101224  0, /*tp_descr_get*/
101225  0, /*tp_descr_set*/
101226  0, /*tp_dictoffset*/
101227  0, /*tp_init*/
101228  0, /*tp_alloc*/
101229  __pyx_tp_new_3mbd_11CouplingFSI_ProtChAddedMass, /*tp_new*/
101230  0, /*tp_free*/
101231  0, /*tp_is_gc*/
101232  0, /*tp_bases*/
101233  0, /*tp_mro*/
101234  0, /*tp_cache*/
101235  0, /*tp_subclasses*/
101236  0, /*tp_weaklist*/
101237  0, /*tp_del*/
101238  0, /*tp_version_tag*/
101239  #if PY_VERSION_HEX >= 0x030400a1
101240  0, /*tp_finalize*/
101241  #endif
101242  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101243  0, /*tp_vectorcall*/
101244  #endif
101245  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
101246  0, /*tp_print*/
101247  #endif
101248  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
101249  0, /*tp_pypy_flags*/
101250  #endif
101251 };
101252 static struct __pyx_vtabstruct_3mbd_11CouplingFSI_ChBodyAddedMass __pyx_vtable_3mbd_11CouplingFSI_ChBodyAddedMass;
101253 
101254 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI_ChBodyAddedMass(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101255  struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *p;
101256  PyObject *o;
101257  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
101258  o = (*t->tp_alloc)(t, 0);
101259  } else {
101260  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
101261  }
101262  if (unlikely(!o)) return 0;
101263  p = ((struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)o);
101264  p->__pyx_vtab = __pyx_vtabptr_3mbd_11CouplingFSI_ChBodyAddedMass;
101265  new((void*)&(p->sharedptr)) std::shared_ptr<ChBodyAddedMass> ();
101266  new((void*)&(p->sharedptr_chbody)) std::shared_ptr<ChBody> ();
101267  p->ChBodySWIG = Py_None; Py_INCREF(Py_None);
101268  if (unlikely(__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
101269  return o;
101270  bad:
101271  Py_DECREF(o); o = 0;
101272  return NULL;
101273 }
101274 
101275 static void __pyx_tp_dealloc_3mbd_11CouplingFSI_ChBodyAddedMass(PyObject *o) {
101276  struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *p = (struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)o;
101277  #if CYTHON_USE_TP_FINALIZE
101278  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
101279  if (PyObject_CallFinalizerFromDealloc(o)) return;
101280  }
101281  #endif
101282  PyObject_GC_UnTrack(o);
101283  __Pyx_call_destructor(p->sharedptr);
101284  __Pyx_call_destructor(p->sharedptr_chbody);
101285  Py_CLEAR(p->ChBodySWIG);
101286  (*Py_TYPE(o)->tp_free)(o);
101287 }
101288 
101289 static int __pyx_tp_traverse_3mbd_11CouplingFSI_ChBodyAddedMass(PyObject *o, visitproc v, void *a) {
101290  int e;
101291  struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *p = (struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)o;
101292  if (p->ChBodySWIG) {
101293  e = (*v)(p->ChBodySWIG, a); if (e) return e;
101294  }
101295  return 0;
101296 }
101297 
101298 static int __pyx_tp_clear_3mbd_11CouplingFSI_ChBodyAddedMass(PyObject *o) {
101299  PyObject* tmp;
101300  struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *p = (struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *)o;
101301  tmp = ((PyObject*)p->ChBodySWIG);
101302  p->ChBodySWIG = Py_None; Py_INCREF(Py_None);
101303  Py_XDECREF(tmp);
101304  return 0;
101305 }
101306 
101307 static PyObject *__pyx_getprop_3mbd_11CouplingFSI_15ChBodyAddedMass_ChBodySWIG(PyObject *o, CYTHON_UNUSED void *x) {
101308  return __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_1__get__(o);
101309 }
101310 
101311 static int __pyx_setprop_3mbd_11CouplingFSI_15ChBodyAddedMass_ChBodySWIG(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
101312  if (v) {
101313  return __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_3__set__(o, v);
101314  }
101315  else {
101316  return __pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_10ChBodySWIG_5__del__(o);
101317  }
101318 }
101319 
101320 static PyMethodDef __pyx_methods_3mbd_11CouplingFSI_ChBodyAddedMass[] = {
101321  {"__reduce_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_3__reduce_cython__, METH_NOARGS, __pyx_doc_3mbd_11CouplingFSI_15ChBodyAddedMass_2__reduce_cython__},
101322  {"__setstate_cython__", (PyCFunction)__pyx_pw_3mbd_11CouplingFSI_15ChBodyAddedMass_5__setstate_cython__, METH_O, __pyx_doc_3mbd_11CouplingFSI_15ChBodyAddedMass_4__setstate_cython__},
101323  {0, 0, 0, 0}
101324 };
101325 
101326 static struct PyGetSetDef __pyx_getsets_3mbd_11CouplingFSI_ChBodyAddedMass[] = {
101327  {(char *)"ChBodySWIG", __pyx_getprop_3mbd_11CouplingFSI_15ChBodyAddedMass_ChBodySWIG, __pyx_setprop_3mbd_11CouplingFSI_15ChBodyAddedMass_ChBodySWIG, (char *)"ChBodySWIG: object", 0},
101328  {0, 0, 0, 0, 0}
101329 };
101330 
101331 static PyTypeObject __pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass = {
101332  PyVarObject_HEAD_INIT(0, 0)
101333  "mbd.CouplingFSI.ChBodyAddedMass", /*tp_name*/
101334  sizeof(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass), /*tp_basicsize*/
101335  0, /*tp_itemsize*/
101336  __pyx_tp_dealloc_3mbd_11CouplingFSI_ChBodyAddedMass, /*tp_dealloc*/
101337  #if PY_VERSION_HEX < 0x030800b4
101338  0, /*tp_print*/
101339  #endif
101340  #if PY_VERSION_HEX >= 0x030800b4
101341  0, /*tp_vectorcall_offset*/
101342  #endif
101343  0, /*tp_getattr*/
101344  0, /*tp_setattr*/
101345  #if PY_MAJOR_VERSION < 3
101346  0, /*tp_compare*/
101347  #endif
101348  #if PY_MAJOR_VERSION >= 3
101349  0, /*tp_as_async*/
101350  #endif
101351  0, /*tp_repr*/
101352  0, /*tp_as_number*/
101353  0, /*tp_as_sequence*/
101354  0, /*tp_as_mapping*/
101355  0, /*tp_hash*/
101356  0, /*tp_call*/
101357  0, /*tp_str*/
101358  0, /*tp_getattro*/
101359  0, /*tp_setattro*/
101360  0, /*tp_as_buffer*/
101361  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
101362  "Cython class for ChBodyAddedMass\n (!) Uses shared_ptr\n ", /*tp_doc*/
101363  __pyx_tp_traverse_3mbd_11CouplingFSI_ChBodyAddedMass, /*tp_traverse*/
101364  __pyx_tp_clear_3mbd_11CouplingFSI_ChBodyAddedMass, /*tp_clear*/
101365  0, /*tp_richcompare*/
101366  0, /*tp_weaklistoffset*/
101367  0, /*tp_iter*/
101368  0, /*tp_iternext*/
101369  __pyx_methods_3mbd_11CouplingFSI_ChBodyAddedMass, /*tp_methods*/
101370  0, /*tp_members*/
101371  __pyx_getsets_3mbd_11CouplingFSI_ChBodyAddedMass, /*tp_getset*/
101372  0, /*tp_base*/
101373  0, /*tp_dict*/
101374  0, /*tp_descr_get*/
101375  0, /*tp_descr_set*/
101376  0, /*tp_dictoffset*/
101377  0, /*tp_init*/
101378  0, /*tp_alloc*/
101379  __pyx_tp_new_3mbd_11CouplingFSI_ChBodyAddedMass, /*tp_new*/
101380  0, /*tp_free*/
101381  0, /*tp_is_gc*/
101382  0, /*tp_bases*/
101383  0, /*tp_mro*/
101384  0, /*tp_cache*/
101385  0, /*tp_subclasses*/
101386  0, /*tp_weaklist*/
101387  0, /*tp_del*/
101388  0, /*tp_version_tag*/
101389  #if PY_VERSION_HEX >= 0x030400a1
101390  0, /*tp_finalize*/
101391  #endif
101392  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101393  0, /*tp_vectorcall*/
101394  #endif
101395  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
101396  0, /*tp_print*/
101397  #endif
101398  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
101399  0, /*tp_pypy_flags*/
101400  #endif
101401 };
101402 
101403 static struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *__pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM[8];
101404 static int __pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM = 0;
101405 
101406 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101407  PyObject *o;
101408  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM)))) {
101409  o = (PyObject*)__pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM[--__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM];
101410  memset(o, 0, sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM));
101411  (void) PyObject_INIT(o, t);
101412  PyObject_GC_Track(o);
101413  } else {
101414  o = (*t->tp_alloc)(t, 0);
101415  if (unlikely(!o)) return 0;
101416  }
101417  return o;
101418 }
101419 
101420 static void __pyx_tp_dealloc_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM(PyObject *o) {
101421  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *)o;
101422  PyObject_GC_UnTrack(o);
101423  Py_CLEAR(p->__pyx_v_self);
101424  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM)))) {
101425  __pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM[__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM++] = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *)o);
101426  } else {
101427  (*Py_TYPE(o)->tp_free)(o);
101428  }
101429 }
101430 
101431 static int __pyx_tp_traverse_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM(PyObject *o, visitproc v, void *a) {
101432  int e;
101433  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *)o;
101434  if (p->__pyx_v_self) {
101435  e = (*v)(((PyObject *)p->__pyx_v_self), a); if (e) return e;
101436  }
101437  return 0;
101438 }
101439 
101440 static int __pyx_tp_clear_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM(PyObject *o) {
101441  PyObject* tmp;
101442  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM *)o;
101443  tmp = ((PyObject*)p->__pyx_v_self);
101444  p->__pyx_v_self = ((struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *)Py_None); Py_INCREF(Py_None);
101445  Py_XDECREF(tmp);
101446  return 0;
101447 }
101448 
101449 static PyTypeObject __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM = {
101450  PyVarObject_HEAD_INIT(0, 0)
101451  "mbd.CouplingFSI.__pyx_scope_struct__updateIBM", /*tp_name*/
101452  sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM), /*tp_basicsize*/
101453  0, /*tp_itemsize*/
101454  __pyx_tp_dealloc_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM, /*tp_dealloc*/
101455  #if PY_VERSION_HEX < 0x030800b4
101456  0, /*tp_print*/
101457  #endif
101458  #if PY_VERSION_HEX >= 0x030800b4
101459  0, /*tp_vectorcall_offset*/
101460  #endif
101461  0, /*tp_getattr*/
101462  0, /*tp_setattr*/
101463  #if PY_MAJOR_VERSION < 3
101464  0, /*tp_compare*/
101465  #endif
101466  #if PY_MAJOR_VERSION >= 3
101467  0, /*tp_as_async*/
101468  #endif
101469  0, /*tp_repr*/
101470  0, /*tp_as_number*/
101471  0, /*tp_as_sequence*/
101472  0, /*tp_as_mapping*/
101473  0, /*tp_hash*/
101474  0, /*tp_call*/
101475  0, /*tp_str*/
101476  0, /*tp_getattro*/
101477  0, /*tp_setattro*/
101478  0, /*tp_as_buffer*/
101479  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
101480  0, /*tp_doc*/
101481  __pyx_tp_traverse_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM, /*tp_traverse*/
101482  __pyx_tp_clear_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM, /*tp_clear*/
101483  0, /*tp_richcompare*/
101484  0, /*tp_weaklistoffset*/
101485  0, /*tp_iter*/
101486  0, /*tp_iternext*/
101487  0, /*tp_methods*/
101488  0, /*tp_members*/
101489  0, /*tp_getset*/
101490  0, /*tp_base*/
101491  0, /*tp_dict*/
101492  0, /*tp_descr_get*/
101493  0, /*tp_descr_set*/
101494  0, /*tp_dictoffset*/
101495  0, /*tp_init*/
101496  0, /*tp_alloc*/
101497  __pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM, /*tp_new*/
101498  0, /*tp_free*/
101499  0, /*tp_is_gc*/
101500  0, /*tp_bases*/
101501  0, /*tp_mro*/
101502  0, /*tp_cache*/
101503  0, /*tp_subclasses*/
101504  0, /*tp_weaklist*/
101505  0, /*tp_del*/
101506  0, /*tp_version_tag*/
101507  #if PY_VERSION_HEX >= 0x030400a1
101508  0, /*tp_finalize*/
101509  #endif
101510  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101511  0, /*tp_vectorcall*/
101512  #endif
101513  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
101514  0, /*tp_print*/
101515  #endif
101516  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
101517  0, /*tp_pypy_flags*/
101518  #endif
101519 };
101520 
101521 static struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *__pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__[8];
101522 static int __pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ = 0;
101523 
101524 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101525  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *p;
101526  PyObject *o;
101527  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__)))) {
101528  o = (PyObject*)__pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__[--__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__];
101529  memset(o, 0, sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__));
101530  (void) PyObject_INIT(o, t);
101531  PyObject_GC_Track(o);
101532  } else {
101533  o = (*t->tp_alloc)(t, 0);
101534  if (unlikely(!o)) return 0;
101535  }
101536  p = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *)o);
101537  p->__pyx_v_length.data = NULL;
101538  p->__pyx_v_length.memview = NULL;
101539  return o;
101540 }
101541 
101542 static void __pyx_tp_dealloc_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__(PyObject *o) {
101543  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *)o;
101544  PyObject_GC_UnTrack(o);
101545  Py_CLEAR(p->__pyx_v_check_arrays);
101546  __PYX_XDEC_MEMVIEW(&p->__pyx_v_length, 1);
101547  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__)))) {
101548  __pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__[__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__++] = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *)o);
101549  } else {
101550  (*Py_TYPE(o)->tp_free)(o);
101551  }
101552 }
101553 
101554 static int __pyx_tp_traverse_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__(PyObject *o, visitproc v, void *a) {
101555  int e;
101556  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *)o;
101557  if (p->__pyx_v_check_arrays) {
101558  e = (*v)(p->__pyx_v_check_arrays, a); if (e) return e;
101559  }
101560  return 0;
101561 }
101562 
101563 static int __pyx_tp_clear_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__(PyObject *o) {
101564  PyObject* tmp;
101565  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ *)o;
101566  tmp = ((PyObject*)p->__pyx_v_check_arrays);
101567  p->__pyx_v_check_arrays = ((PyObject*)Py_None); Py_INCREF(Py_None);
101568  Py_XDECREF(tmp);
101569  return 0;
101570 }
101571 
101572 static PyTypeObject __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ = {
101573  PyVarObject_HEAD_INIT(0, 0)
101574  "mbd.CouplingFSI.__pyx_scope_struct_1___cinit__", /*tp_name*/
101575  sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__), /*tp_basicsize*/
101576  0, /*tp_itemsize*/
101577  __pyx_tp_dealloc_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__, /*tp_dealloc*/
101578  #if PY_VERSION_HEX < 0x030800b4
101579  0, /*tp_print*/
101580  #endif
101581  #if PY_VERSION_HEX >= 0x030800b4
101582  0, /*tp_vectorcall_offset*/
101583  #endif
101584  0, /*tp_getattr*/
101585  0, /*tp_setattr*/
101586  #if PY_MAJOR_VERSION < 3
101587  0, /*tp_compare*/
101588  #endif
101589  #if PY_MAJOR_VERSION >= 3
101590  0, /*tp_as_async*/
101591  #endif
101592  0, /*tp_repr*/
101593  0, /*tp_as_number*/
101594  0, /*tp_as_sequence*/
101595  0, /*tp_as_mapping*/
101596  0, /*tp_hash*/
101597  0, /*tp_call*/
101598  0, /*tp_str*/
101599  0, /*tp_getattro*/
101600  0, /*tp_setattro*/
101601  0, /*tp_as_buffer*/
101602  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
101603  0, /*tp_doc*/
101604  __pyx_tp_traverse_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__, /*tp_traverse*/
101605  __pyx_tp_clear_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__, /*tp_clear*/
101606  0, /*tp_richcompare*/
101607  0, /*tp_weaklistoffset*/
101608  0, /*tp_iter*/
101609  0, /*tp_iternext*/
101610  0, /*tp_methods*/
101611  0, /*tp_members*/
101612  0, /*tp_getset*/
101613  0, /*tp_base*/
101614  0, /*tp_dict*/
101615  0, /*tp_descr_get*/
101616  0, /*tp_descr_set*/
101617  0, /*tp_dictoffset*/
101618  0, /*tp_init*/
101619  0, /*tp_alloc*/
101620  __pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__, /*tp_new*/
101621  0, /*tp_free*/
101622  0, /*tp_is_gc*/
101623  0, /*tp_bases*/
101624  0, /*tp_mro*/
101625  0, /*tp_cache*/
101626  0, /*tp_subclasses*/
101627  0, /*tp_weaklist*/
101628  0, /*tp_del*/
101629  0, /*tp_version_tag*/
101630  #if PY_VERSION_HEX >= 0x030400a1
101631  0, /*tp_finalize*/
101632  #endif
101633  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101634  0, /*tp_vectorcall*/
101635  #endif
101636  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
101637  0, /*tp_print*/
101638  #endif
101639  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
101640  0, /*tp_pypy_flags*/
101641  #endif
101642 };
101643 
101644 static struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *__pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr[8];
101645 static int __pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr = 0;
101646 
101647 static PyObject *__pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101648  PyObject *o;
101649  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr)))) {
101650  o = (PyObject*)__pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr[--__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr];
101651  memset(o, 0, sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr));
101652  (void) PyObject_INIT(o, t);
101653  PyObject_GC_Track(o);
101654  } else {
101655  o = (*t->tp_alloc)(t, 0);
101656  if (unlikely(!o)) return 0;
101657  }
101658  return o;
101659 }
101660 
101661 static void __pyx_tp_dealloc_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr(PyObject *o) {
101662  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *)o;
101663  PyObject_GC_UnTrack(o);
101664  Py_CLEAR(p->__pyx_outer_scope);
101665  Py_CLEAR(p->__pyx_v_v);
101666  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr)))) {
101667  __pyx_freelist_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr[__pyx_freecount_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *)o);
101668  } else {
101669  (*Py_TYPE(o)->tp_free)(o);
101670  }
101671 }
101672 
101673 static int __pyx_tp_traverse_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
101674  int e;
101675  struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr *)o;
101676  if (p->__pyx_outer_scope) {
101677  e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
101678  }
101679  if (p->__pyx_v_v) {
101680  e = (*v)(p->__pyx_v_v, a); if (e) return e;
101681  }
101682  return 0;
101683 }
101684 
101685 static PyTypeObject __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr = {
101686  PyVarObject_HEAD_INIT(0, 0)
101687  "mbd.CouplingFSI.__pyx_scope_struct_2_genexpr", /*tp_name*/
101688  sizeof(struct __pyx_obj_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
101689  0, /*tp_itemsize*/
101690  __pyx_tp_dealloc_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
101691  #if PY_VERSION_HEX < 0x030800b4
101692  0, /*tp_print*/
101693  #endif
101694  #if PY_VERSION_HEX >= 0x030800b4
101695  0, /*tp_vectorcall_offset*/
101696  #endif
101697  0, /*tp_getattr*/
101698  0, /*tp_setattr*/
101699  #if PY_MAJOR_VERSION < 3
101700  0, /*tp_compare*/
101701  #endif
101702  #if PY_MAJOR_VERSION >= 3
101703  0, /*tp_as_async*/
101704  #endif
101705  0, /*tp_repr*/
101706  0, /*tp_as_number*/
101707  0, /*tp_as_sequence*/
101708  0, /*tp_as_mapping*/
101709  0, /*tp_hash*/
101710  0, /*tp_call*/
101711  0, /*tp_str*/
101712  0, /*tp_getattro*/
101713  0, /*tp_setattro*/
101714  0, /*tp_as_buffer*/
101715  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
101716  0, /*tp_doc*/
101717  __pyx_tp_traverse_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr, /*tp_traverse*/
101718  0, /*tp_clear*/
101719  0, /*tp_richcompare*/
101720  0, /*tp_weaklistoffset*/
101721  0, /*tp_iter*/
101722  0, /*tp_iternext*/
101723  0, /*tp_methods*/
101724  0, /*tp_members*/
101725  0, /*tp_getset*/
101726  0, /*tp_base*/
101727  0, /*tp_dict*/
101728  0, /*tp_descr_get*/
101729  0, /*tp_descr_set*/
101730  0, /*tp_dictoffset*/
101731  0, /*tp_init*/
101732  0, /*tp_alloc*/
101733  __pyx_tp_new_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr, /*tp_new*/
101734  0, /*tp_free*/
101735  0, /*tp_is_gc*/
101736  0, /*tp_bases*/
101737  0, /*tp_mro*/
101738  0, /*tp_cache*/
101739  0, /*tp_subclasses*/
101740  0, /*tp_weaklist*/
101741  0, /*tp_del*/
101742  0, /*tp_version_tag*/
101743  #if PY_VERSION_HEX >= 0x030400a1
101744  0, /*tp_finalize*/
101745  #endif
101746  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101747  0, /*tp_vectorcall*/
101748  #endif
101749  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
101750  0, /*tp_print*/
101751  #endif
101752  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
101753  0, /*tp_pypy_flags*/
101754  #endif
101755 };
101756 static struct __pyx_vtabstruct_array __pyx_vtable_array;
101757 
101758 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
101759  struct __pyx_array_obj *p;
101760  PyObject *o;
101761  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
101762  o = (*t->tp_alloc)(t, 0);
101763  } else {
101764  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
101765  }
101766  if (unlikely(!o)) return 0;
101767  p = ((struct __pyx_array_obj *)o);
101768  p->__pyx_vtab = __pyx_vtabptr_array;
101769  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
101770  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
101771  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
101772  return o;
101773  bad:
101774  Py_DECREF(o); o = 0;
101775  return NULL;
101776 }
101777 
101778 static void __pyx_tp_dealloc_array(PyObject *o) {
101779  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
101780  #if CYTHON_USE_TP_FINALIZE
101781  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))) {
101782  if (PyObject_CallFinalizerFromDealloc(o)) return;
101783  }
101784  #endif
101785  {
101786  PyObject *etype, *eval, *etb;
101787  PyErr_Fetch(&etype, &eval, &etb);
101788  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
101789  __pyx_array___dealloc__(o);
101790  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
101791  PyErr_Restore(etype, eval, etb);
101792  }
101793  Py_CLEAR(p->mode);
101794  Py_CLEAR(p->_format);
101795  (*Py_TYPE(o)->tp_free)(o);
101796 }
101797 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
101798  PyObject *r;
101799  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
101800  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
101801  Py_DECREF(x);
101802  return r;
101803 }
101804 
101805 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
101806  if (v) {
101807  return __pyx_array___setitem__(o, i, v);
101808  }
101809  else {
101810  PyErr_Format(PyExc_NotImplementedError,
101811  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
101812  return -1;
101813  }
101814 }
101815 
101816 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
101817  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
101818  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
101819  PyErr_Clear();
101820  v = __pyx_array___getattr__(o, n);
101821  }
101822  return v;
101823 }
101824 
101825 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
101826  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
101827 }
101828 
101829 static PyMethodDef __pyx_methods_array[] = {
101830  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
101831  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
101832  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
101833  {0, 0, 0, 0}
101834 };
101835 
101836 static struct PyGetSetDef __pyx_getsets_array[] = {
101837  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
101838  {0, 0, 0, 0, 0}
101839 };
101840 
101841 static PySequenceMethods __pyx_tp_as_sequence_array = {
101842  __pyx_array___len__, /*sq_length*/
101843  0, /*sq_concat*/
101844  0, /*sq_repeat*/
101845  __pyx_sq_item_array, /*sq_item*/
101846  0, /*sq_slice*/
101847  0, /*sq_ass_item*/
101848  0, /*sq_ass_slice*/
101849  0, /*sq_contains*/
101850  0, /*sq_inplace_concat*/
101851  0, /*sq_inplace_repeat*/
101852 };
101853 
101854 static PyMappingMethods __pyx_tp_as_mapping_array = {
101855  __pyx_array___len__, /*mp_length*/
101856  __pyx_array___getitem__, /*mp_subscript*/
101857  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
101858 };
101859 
101860 static PyBufferProcs __pyx_tp_as_buffer_array = {
101861  #if PY_MAJOR_VERSION < 3
101862  0, /*bf_getreadbuffer*/
101863  #endif
101864  #if PY_MAJOR_VERSION < 3
101865  0, /*bf_getwritebuffer*/
101866  #endif
101867  #if PY_MAJOR_VERSION < 3
101868  0, /*bf_getsegcount*/
101869  #endif
101870  #if PY_MAJOR_VERSION < 3
101871  0, /*bf_getcharbuffer*/
101872  #endif
101873  __pyx_array_getbuffer, /*bf_getbuffer*/
101874  0, /*bf_releasebuffer*/
101875 };
101876 
101877 static PyTypeObject __pyx_type___pyx_array = {
101878  PyVarObject_HEAD_INIT(0, 0)
101879  "mbd.CouplingFSI.array", /*tp_name*/
101880  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
101881  0, /*tp_itemsize*/
101882  __pyx_tp_dealloc_array, /*tp_dealloc*/
101883  #if PY_VERSION_HEX < 0x030800b4
101884  0, /*tp_print*/
101885  #endif
101886  #if PY_VERSION_HEX >= 0x030800b4
101887  0, /*tp_vectorcall_offset*/
101888  #endif
101889  0, /*tp_getattr*/
101890  0, /*tp_setattr*/
101891  #if PY_MAJOR_VERSION < 3
101892  0, /*tp_compare*/
101893  #endif
101894  #if PY_MAJOR_VERSION >= 3
101895  0, /*tp_as_async*/
101896  #endif
101897  0, /*tp_repr*/
101898  0, /*tp_as_number*/
101899  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
101900  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
101901  0, /*tp_hash*/
101902  0, /*tp_call*/
101903  0, /*tp_str*/
101904  __pyx_tp_getattro_array, /*tp_getattro*/
101905  0, /*tp_setattro*/
101906  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
101907  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
101908  0, /*tp_doc*/
101909  0, /*tp_traverse*/
101910  0, /*tp_clear*/
101911  0, /*tp_richcompare*/
101912  0, /*tp_weaklistoffset*/
101913  0, /*tp_iter*/
101914  0, /*tp_iternext*/
101915  __pyx_methods_array, /*tp_methods*/
101916  0, /*tp_members*/
101917  __pyx_getsets_array, /*tp_getset*/
101918  0, /*tp_base*/
101919  0, /*tp_dict*/
101920  0, /*tp_descr_get*/
101921  0, /*tp_descr_set*/
101922  0, /*tp_dictoffset*/
101923  0, /*tp_init*/
101924  0, /*tp_alloc*/
101925  __pyx_tp_new_array, /*tp_new*/
101926  0, /*tp_free*/
101927  0, /*tp_is_gc*/
101928  0, /*tp_bases*/
101929  0, /*tp_mro*/
101930  0, /*tp_cache*/
101931  0, /*tp_subclasses*/
101932  0, /*tp_weaklist*/
101933  0, /*tp_del*/
101934  0, /*tp_version_tag*/
101935  #if PY_VERSION_HEX >= 0x030400a1
101936  0, /*tp_finalize*/
101937  #endif
101938  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
101939  0, /*tp_vectorcall*/
101940  #endif
101941  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
101942  0, /*tp_print*/
101943  #endif
101944  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
101945  0, /*tp_pypy_flags*/
101946  #endif
101947 };
101948 
101949 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
101950  struct __pyx_MemviewEnum_obj *p;
101951  PyObject *o;
101952  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
101953  o = (*t->tp_alloc)(t, 0);
101954  } else {
101955  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
101956  }
101957  if (unlikely(!o)) return 0;
101958  p = ((struct __pyx_MemviewEnum_obj *)o);
101959  p->name = Py_None; Py_INCREF(Py_None);
101960  return o;
101961 }
101962 
101963 static void __pyx_tp_dealloc_Enum(PyObject *o) {
101964  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
101965  #if CYTHON_USE_TP_FINALIZE
101966  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
101967  if (PyObject_CallFinalizerFromDealloc(o)) return;
101968  }
101969  #endif
101970  PyObject_GC_UnTrack(o);
101971  Py_CLEAR(p->name);
101972  (*Py_TYPE(o)->tp_free)(o);
101973 }
101974 
101975 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
101976  int e;
101977  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
101978  if (p->name) {
101979  e = (*v)(p->name, a); if (e) return e;
101980  }
101981  return 0;
101982 }
101983 
101984 static int __pyx_tp_clear_Enum(PyObject *o) {
101985  PyObject* tmp;
101986  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
101987  tmp = ((PyObject*)p->name);
101988  p->name = Py_None; Py_INCREF(Py_None);
101989  Py_XDECREF(tmp);
101990  return 0;
101991 }
101992 
101993 static PyMethodDef __pyx_methods_Enum[] = {
101994  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
101995  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
101996  {0, 0, 0, 0}
101997 };
101998 
101999 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
102000  PyVarObject_HEAD_INIT(0, 0)
102001  "mbd.CouplingFSI.Enum", /*tp_name*/
102002  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
102003  0, /*tp_itemsize*/
102004  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
102005  #if PY_VERSION_HEX < 0x030800b4
102006  0, /*tp_print*/
102007  #endif
102008  #if PY_VERSION_HEX >= 0x030800b4
102009  0, /*tp_vectorcall_offset*/
102010  #endif
102011  0, /*tp_getattr*/
102012  0, /*tp_setattr*/
102013  #if PY_MAJOR_VERSION < 3
102014  0, /*tp_compare*/
102015  #endif
102016  #if PY_MAJOR_VERSION >= 3
102017  0, /*tp_as_async*/
102018  #endif
102019  __pyx_MemviewEnum___repr__, /*tp_repr*/
102020  0, /*tp_as_number*/
102021  0, /*tp_as_sequence*/
102022  0, /*tp_as_mapping*/
102023  0, /*tp_hash*/
102024  0, /*tp_call*/
102025  0, /*tp_str*/
102026  0, /*tp_getattro*/
102027  0, /*tp_setattro*/
102028  0, /*tp_as_buffer*/
102029  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
102030  0, /*tp_doc*/
102031  __pyx_tp_traverse_Enum, /*tp_traverse*/
102032  __pyx_tp_clear_Enum, /*tp_clear*/
102033  0, /*tp_richcompare*/
102034  0, /*tp_weaklistoffset*/
102035  0, /*tp_iter*/
102036  0, /*tp_iternext*/
102037  __pyx_methods_Enum, /*tp_methods*/
102038  0, /*tp_members*/
102039  0, /*tp_getset*/
102040  0, /*tp_base*/
102041  0, /*tp_dict*/
102042  0, /*tp_descr_get*/
102043  0, /*tp_descr_set*/
102044  0, /*tp_dictoffset*/
102045  __pyx_MemviewEnum___init__, /*tp_init*/
102046  0, /*tp_alloc*/
102047  __pyx_tp_new_Enum, /*tp_new*/
102048  0, /*tp_free*/
102049  0, /*tp_is_gc*/
102050  0, /*tp_bases*/
102051  0, /*tp_mro*/
102052  0, /*tp_cache*/
102053  0, /*tp_subclasses*/
102054  0, /*tp_weaklist*/
102055  0, /*tp_del*/
102056  0, /*tp_version_tag*/
102057  #if PY_VERSION_HEX >= 0x030400a1
102058  0, /*tp_finalize*/
102059  #endif
102060  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102061  0, /*tp_vectorcall*/
102062  #endif
102063  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
102064  0, /*tp_print*/
102065  #endif
102066  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
102067  0, /*tp_pypy_flags*/
102068  #endif
102069 };
102070 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
102071 
102072 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
102073  struct __pyx_memoryview_obj *p;
102074  PyObject *o;
102075  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
102076  o = (*t->tp_alloc)(t, 0);
102077  } else {
102078  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
102079  }
102080  if (unlikely(!o)) return 0;
102081  p = ((struct __pyx_memoryview_obj *)o);
102082  p->__pyx_vtab = __pyx_vtabptr_memoryview;
102083  p->obj = Py_None; Py_INCREF(Py_None);
102084  p->_size = Py_None; Py_INCREF(Py_None);
102085  p->_array_interface = Py_None; Py_INCREF(Py_None);
102086  p->view.obj = NULL;
102087  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
102088  return o;
102089  bad:
102090  Py_DECREF(o); o = 0;
102091  return NULL;
102092 }
102093 
102094 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
102095  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
102096  #if CYTHON_USE_TP_FINALIZE
102097  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
102098  if (PyObject_CallFinalizerFromDealloc(o)) return;
102099  }
102100  #endif
102101  PyObject_GC_UnTrack(o);
102102  {
102103  PyObject *etype, *eval, *etb;
102104  PyErr_Fetch(&etype, &eval, &etb);
102105  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
102106  __pyx_memoryview___dealloc__(o);
102107  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
102108  PyErr_Restore(etype, eval, etb);
102109  }
102110  Py_CLEAR(p->obj);
102111  Py_CLEAR(p->_size);
102112  Py_CLEAR(p->_array_interface);
102113  (*Py_TYPE(o)->tp_free)(o);
102114 }
102115 
102116 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
102117  int e;
102118  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
102119  if (p->obj) {
102120  e = (*v)(p->obj, a); if (e) return e;
102121  }
102122  if (p->_size) {
102123  e = (*v)(p->_size, a); if (e) return e;
102124  }
102125  if (p->_array_interface) {
102126  e = (*v)(p->_array_interface, a); if (e) return e;
102127  }
102128  if (p->view.obj) {
102129  e = (*v)(p->view.obj, a); if (e) return e;
102130  }
102131  return 0;
102132 }
102133 
102134 static int __pyx_tp_clear_memoryview(PyObject *o) {
102135  PyObject* tmp;
102136  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
102137  tmp = ((PyObject*)p->obj);
102138  p->obj = Py_None; Py_INCREF(Py_None);
102139  Py_XDECREF(tmp);
102140  tmp = ((PyObject*)p->_size);
102141  p->_size = Py_None; Py_INCREF(Py_None);
102142  Py_XDECREF(tmp);
102143  tmp = ((PyObject*)p->_array_interface);
102144  p->_array_interface = Py_None; Py_INCREF(Py_None);
102145  Py_XDECREF(tmp);
102146  Py_CLEAR(p->view.obj);
102147  return 0;
102148 }
102149 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
102150  PyObject *r;
102151  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
102152  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
102153  Py_DECREF(x);
102154  return r;
102155 }
102156 
102157 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
102158  if (v) {
102159  return __pyx_memoryview___setitem__(o, i, v);
102160  }
102161  else {
102162  PyErr_Format(PyExc_NotImplementedError,
102163  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
102164  return -1;
102165  }
102166 }
102167 
102168 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
102169  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
102170 }
102171 
102172 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
102173  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
102174 }
102175 
102176 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
102177  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
102178 }
102179 
102180 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
102181  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
102182 }
102183 
102184 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
102185  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
102186 }
102187 
102188 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
102189  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
102190 }
102191 
102192 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
102193  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
102194 }
102195 
102196 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
102197  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
102198 }
102199 
102200 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
102201  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
102202 }
102203 
102204 static PyMethodDef __pyx_methods_memoryview[] = {
102205  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
102206  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
102207  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
102208  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
102209  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
102210  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
102211  {0, 0, 0, 0}
102212 };
102213 
102214 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
102215  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
102216  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
102217  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
102218  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
102219  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
102220  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
102221  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
102222  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
102223  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
102224  {0, 0, 0, 0, 0}
102225 };
102226 
102227 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
102228  __pyx_memoryview___len__, /*sq_length*/
102229  0, /*sq_concat*/
102230  0, /*sq_repeat*/
102231  __pyx_sq_item_memoryview, /*sq_item*/
102232  0, /*sq_slice*/
102233  0, /*sq_ass_item*/
102234  0, /*sq_ass_slice*/
102235  0, /*sq_contains*/
102236  0, /*sq_inplace_concat*/
102237  0, /*sq_inplace_repeat*/
102238 };
102239 
102240 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
102241  __pyx_memoryview___len__, /*mp_length*/
102242  __pyx_memoryview___getitem__, /*mp_subscript*/
102243  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
102244 };
102245 
102246 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
102247  #if PY_MAJOR_VERSION < 3
102248  0, /*bf_getreadbuffer*/
102249  #endif
102250  #if PY_MAJOR_VERSION < 3
102251  0, /*bf_getwritebuffer*/
102252  #endif
102253  #if PY_MAJOR_VERSION < 3
102254  0, /*bf_getsegcount*/
102255  #endif
102256  #if PY_MAJOR_VERSION < 3
102257  0, /*bf_getcharbuffer*/
102258  #endif
102259  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
102260  0, /*bf_releasebuffer*/
102261 };
102262 
102263 static PyTypeObject __pyx_type___pyx_memoryview = {
102264  PyVarObject_HEAD_INIT(0, 0)
102265  "mbd.CouplingFSI.memoryview", /*tp_name*/
102266  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
102267  0, /*tp_itemsize*/
102268  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
102269  #if PY_VERSION_HEX < 0x030800b4
102270  0, /*tp_print*/
102271  #endif
102272  #if PY_VERSION_HEX >= 0x030800b4
102273  0, /*tp_vectorcall_offset*/
102274  #endif
102275  0, /*tp_getattr*/
102276  0, /*tp_setattr*/
102277  #if PY_MAJOR_VERSION < 3
102278  0, /*tp_compare*/
102279  #endif
102280  #if PY_MAJOR_VERSION >= 3
102281  0, /*tp_as_async*/
102282  #endif
102283  __pyx_memoryview___repr__, /*tp_repr*/
102284  0, /*tp_as_number*/
102285  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
102286  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
102287  0, /*tp_hash*/
102288  0, /*tp_call*/
102289  __pyx_memoryview___str__, /*tp_str*/
102290  0, /*tp_getattro*/
102291  0, /*tp_setattro*/
102292  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
102293  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
102294  0, /*tp_doc*/
102295  __pyx_tp_traverse_memoryview, /*tp_traverse*/
102296  __pyx_tp_clear_memoryview, /*tp_clear*/
102297  0, /*tp_richcompare*/
102298  0, /*tp_weaklistoffset*/
102299  0, /*tp_iter*/
102300  0, /*tp_iternext*/
102301  __pyx_methods_memoryview, /*tp_methods*/
102302  0, /*tp_members*/
102303  __pyx_getsets_memoryview, /*tp_getset*/
102304  0, /*tp_base*/
102305  0, /*tp_dict*/
102306  0, /*tp_descr_get*/
102307  0, /*tp_descr_set*/
102308  0, /*tp_dictoffset*/
102309  0, /*tp_init*/
102310  0, /*tp_alloc*/
102311  __pyx_tp_new_memoryview, /*tp_new*/
102312  0, /*tp_free*/
102313  0, /*tp_is_gc*/
102314  0, /*tp_bases*/
102315  0, /*tp_mro*/
102316  0, /*tp_cache*/
102317  0, /*tp_subclasses*/
102318  0, /*tp_weaklist*/
102319  0, /*tp_del*/
102320  0, /*tp_version_tag*/
102321  #if PY_VERSION_HEX >= 0x030400a1
102322  0, /*tp_finalize*/
102323  #endif
102324  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102325  0, /*tp_vectorcall*/
102326  #endif
102327  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
102328  0, /*tp_print*/
102329  #endif
102330  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
102331  0, /*tp_pypy_flags*/
102332  #endif
102333 };
102334 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
102335 
102336 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
102337  struct __pyx_memoryviewslice_obj *p;
102338  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
102339  if (unlikely(!o)) return 0;
102340  p = ((struct __pyx_memoryviewslice_obj *)o);
102341  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
102342  p->from_object = Py_None; Py_INCREF(Py_None);
102343  p->from_slice.memview = NULL;
102344  return o;
102345 }
102346 
102347 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
102348  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
102349  #if CYTHON_USE_TP_FINALIZE
102350  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
102351  if (PyObject_CallFinalizerFromDealloc(o)) return;
102352  }
102353  #endif
102354  PyObject_GC_UnTrack(o);
102355  {
102356  PyObject *etype, *eval, *etb;
102357  PyErr_Fetch(&etype, &eval, &etb);
102358  __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
102359  __pyx_memoryviewslice___dealloc__(o);
102360  __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
102361  PyErr_Restore(etype, eval, etb);
102362  }
102363  Py_CLEAR(p->from_object);
102364  PyObject_GC_Track(o);
102365  __pyx_tp_dealloc_memoryview(o);
102366 }
102367 
102368 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
102369  int e;
102370  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
102371  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
102372  if (p->from_object) {
102373  e = (*v)(p->from_object, a); if (e) return e;
102374  }
102375  return 0;
102376 }
102377 
102378 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
102379  PyObject* tmp;
102380  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
102381  __pyx_tp_clear_memoryview(o);
102382  tmp = ((PyObject*)p->from_object);
102383  p->from_object = Py_None; Py_INCREF(Py_None);
102384  Py_XDECREF(tmp);
102385  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
102386  return 0;
102387 }
102388 
102389 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
102390  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
102391 }
102392 
102393 static PyMethodDef __pyx_methods__memoryviewslice[] = {
102394  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
102395  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
102396  {0, 0, 0, 0}
102397 };
102398 
102399 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
102400  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
102401  {0, 0, 0, 0, 0}
102402 };
102403 
102404 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
102405  PyVarObject_HEAD_INIT(0, 0)
102406  "mbd.CouplingFSI._memoryviewslice", /*tp_name*/
102407  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
102408  0, /*tp_itemsize*/
102409  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
102410  #if PY_VERSION_HEX < 0x030800b4
102411  0, /*tp_print*/
102412  #endif
102413  #if PY_VERSION_HEX >= 0x030800b4
102414  0, /*tp_vectorcall_offset*/
102415  #endif
102416  0, /*tp_getattr*/
102417  0, /*tp_setattr*/
102418  #if PY_MAJOR_VERSION < 3
102419  0, /*tp_compare*/
102420  #endif
102421  #if PY_MAJOR_VERSION >= 3
102422  0, /*tp_as_async*/
102423  #endif
102424  #if CYTHON_COMPILING_IN_PYPY
102425  __pyx_memoryview___repr__, /*tp_repr*/
102426  #else
102427  0, /*tp_repr*/
102428  #endif
102429  0, /*tp_as_number*/
102430  0, /*tp_as_sequence*/
102431  0, /*tp_as_mapping*/
102432  0, /*tp_hash*/
102433  0, /*tp_call*/
102434  #if CYTHON_COMPILING_IN_PYPY
102435  __pyx_memoryview___str__, /*tp_str*/
102436  #else
102437  0, /*tp_str*/
102438  #endif
102439  0, /*tp_getattro*/
102440  0, /*tp_setattro*/
102441  0, /*tp_as_buffer*/
102442  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
102443  "Internal class for passing memoryview slices to Python", /*tp_doc*/
102444  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
102445  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
102446  0, /*tp_richcompare*/
102447  0, /*tp_weaklistoffset*/
102448  0, /*tp_iter*/
102449  0, /*tp_iternext*/
102450  __pyx_methods__memoryviewslice, /*tp_methods*/
102451  0, /*tp_members*/
102452  __pyx_getsets__memoryviewslice, /*tp_getset*/
102453  0, /*tp_base*/
102454  0, /*tp_dict*/
102455  0, /*tp_descr_get*/
102456  0, /*tp_descr_set*/
102457  0, /*tp_dictoffset*/
102458  0, /*tp_init*/
102459  0, /*tp_alloc*/
102460  __pyx_tp_new__memoryviewslice, /*tp_new*/
102461  0, /*tp_free*/
102462  0, /*tp_is_gc*/
102463  0, /*tp_bases*/
102464  0, /*tp_mro*/
102465  0, /*tp_cache*/
102466  0, /*tp_subclasses*/
102467  0, /*tp_weaklist*/
102468  0, /*tp_del*/
102469  0, /*tp_version_tag*/
102470  #if PY_VERSION_HEX >= 0x030400a1
102471  0, /*tp_finalize*/
102472  #endif
102473  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
102474  0, /*tp_vectorcall*/
102475  #endif
102476  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
102477  0, /*tp_print*/
102478  #endif
102479  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
102480  0, /*tp_pypy_flags*/
102481  #endif
102482 };
102483 
102484 static PyMethodDef __pyx_methods[] = {
102485  {0, 0, 0, 0}
102486 };
102487 
102488 #if PY_MAJOR_VERSION >= 3
102489 #if CYTHON_PEP489_MULTI_PHASE_INIT
102490 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
102491 static int __pyx_pymod_exec_CouplingFSI(PyObject* module); /*proto*/
102492 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
102493  {Py_mod_create, (void*)__pyx_pymod_create},
102494  {Py_mod_exec, (void*)__pyx_pymod_exec_CouplingFSI},
102495  {0, NULL}
102496 };
102497 #endif
102498 
102499 static struct PyModuleDef __pyx_moduledef = {
102500  PyModuleDef_HEAD_INIT,
102501  "CouplingFSI",
102502  __pyx_k_Coupling_between_Chrono_and_Pro, /* m_doc */
102503  #if CYTHON_PEP489_MULTI_PHASE_INIT
102504  0, /* m_size */
102505  #else
102506  -1, /* m_size */
102507  #endif
102508  __pyx_methods /* m_methods */,
102509  #if CYTHON_PEP489_MULTI_PHASE_INIT
102510  __pyx_moduledef_slots, /* m_slots */
102511  #else
102512  NULL, /* m_reload */
102513  #endif
102514  NULL, /* m_traverse */
102515  NULL, /* m_clear */
102516  NULL /* m_free */
102517 };
102518 #endif
102519 #ifndef CYTHON_SMALL_CODE
102520 #if defined(__clang__)
102521  #define CYTHON_SMALL_CODE
102522 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
102523  #define CYTHON_SMALL_CODE __attribute__((cold))
102524 #else
102525  #define CYTHON_SMALL_CODE
102526 #endif
102527 #endif
102528 
102529 static __Pyx_StringTabEntry __pyx_string_tab[] = {
102530  {&__pyx_kp_s_0_d, __pyx_k_0_d, sizeof(__pyx_k_0_d), 0, 0, 1, 0},
102531  {&__pyx_kp_s_0_d_1_d, __pyx_k_0_d_1_d, sizeof(__pyx_k_0_d_1_d), 0, 0, 1, 0},
102532  {&__pyx_kp_s_0_e, __pyx_k_0_e, sizeof(__pyx_k_0_e), 0, 0, 1, 0},
102533  {&__pyx_kp_s_0_h5_1__t_2_d, __pyx_k_0_h5_1__t_2_d, sizeof(__pyx_k_0_h5_1__t_2_d), 0, 0, 1, 0},
102534  {&__pyx_kp_s_0_h5_elementsSpatial_Domain_1_d, __pyx_k_0_h5_elementsSpatial_Domain_1_d, sizeof(__pyx_k_0_h5_elementsSpatial_Domain_1_d), 0, 0, 1, 0},
102535  {&__pyx_kp_s_0_h5_nodesSpatial_Domain_1_d, __pyx_k_0_h5_nodesSpatial_Domain_1_d, sizeof(__pyx_k_0_h5_nodesSpatial_Domain_1_d), 0, 0, 1, 0},
102536  {&__pyx_kp_s_2_0, __pyx_k_2_0, sizeof(__pyx_k_2_0), 0, 0, 1, 0},
102537  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
102538  {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
102539  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
102540  {&__pyx_n_s_Add, __pyx_k_Add, sizeof(__pyx_k_Add), 0, 0, 1, 1},
102541  {&__pyx_kp_s_Added_Mass_Matrix, __pyx_k_Added_Mass_Matrix, sizeof(__pyx_k_Added_Mass_Matrix), 0, 0, 1, 0},
102542  {&__pyx_kp_s_Added_mass_matrix_must_be_6x6_np, __pyx_k_Added_mass_matrix_must_be_6x6_np, sizeof(__pyx_k_Added_mass_matrix_must_be_6x6_np), 0, 0, 1, 0},
102543  {&__pyx_n_s_Aij, __pyx_k_Aij, sizeof(__pyx_k_Aij), 0, 0, 1, 1},
102544  {&__pyx_kp_s_Aij_csv, __pyx_k_Aij_csv, sizeof(__pyx_k_Aij_csv), 0, 0, 1, 0},
102545  {&__pyx_n_s_Aij_global, __pyx_k_Aij_global, sizeof(__pyx_k_Aij_global), 0, 0, 1, 1},
102546  {&__pyx_n_s_Aij_last, __pyx_k_Aij_last, sizeof(__pyx_k_Aij_last), 0, 0, 1, 1},
102547  {&__pyx_n_s_Aija, __pyx_k_Aija, sizeof(__pyx_k_Aija), 0, 0, 1, 1},
102548  {&__pyx_n_s_Archiver, __pyx_k_Archiver, sizeof(__pyx_k_Archiver), 0, 0, 1, 1},
102549  {&__pyx_n_s_Attribute, __pyx_k_Attribute, sizeof(__pyx_k_Attribute), 0, 0, 1, 1},
102550  {&__pyx_n_s_AttributeType, __pyx_k_AttributeType, sizeof(__pyx_k_AttributeType), 0, 0, 1, 1},
102551  {&__pyx_n_s_AuxiliaryVariables, __pyx_k_AuxiliaryVariables, sizeof(__pyx_k_AuxiliaryVariables), 0, 0, 1, 1},
102552  {&__pyx_n_s_BodyDynamics, __pyx_k_BodyDynamics, sizeof(__pyx_k_BodyDynamics), 0, 0, 1, 1},
102553  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
102554  {&__pyx_kp_s_Building_k_d_tree_for_mooring_no, __pyx_k_Building_k_d_tree_for_mooring_no, sizeof(__pyx_k_Building_k_d_tree_for_mooring_no), 0, 0, 1, 0},
102555  {&__pyx_kp_s_Building_k_d_tree_for_mooring_no_2, __pyx_k_Building_k_d_tree_for_mooring_no_2, sizeof(__pyx_k_Building_k_d_tree_for_mooring_no_2), 0, 0, 1, 0},
102556  {&__pyx_n_b_CSS, __pyx_k_CSS, sizeof(__pyx_k_CSS), 0, 0, 0, 1},
102557  {&__pyx_n_b_CableANCF, __pyx_k_CableANCF, sizeof(__pyx_k_CableANCF), 0, 0, 0, 1},
102558  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
102559  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
102560  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
102561  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
102562  {&__pyx_n_s_Center, __pyx_k_Center, sizeof(__pyx_k_Center), 0, 0, 1, 1},
102563  {&__pyx_n_s_ChBody, __pyx_k_ChBody, sizeof(__pyx_k_ChBody), 0, 0, 1, 1},
102564  {&__pyx_n_s_ChBodyAddedMass, __pyx_k_ChBodyAddedMass, sizeof(__pyx_k_ChBodyAddedMass), 0, 0, 1, 1},
102565  {&__pyx_n_s_ChBodyAddedMass___reduce_cython, __pyx_k_ChBodyAddedMass___reduce_cython, sizeof(__pyx_k_ChBodyAddedMass___reduce_cython), 0, 0, 1, 1},
102566  {&__pyx_n_s_ChBodyAddedMass___setstate_cytho, __pyx_k_ChBodyAddedMass___setstate_cytho, sizeof(__pyx_k_ChBodyAddedMass___setstate_cytho), 0, 0, 1, 1},
102567  {&__pyx_n_s_ChElementBeamEuler, __pyx_k_ChElementBeamEuler, sizeof(__pyx_k_ChElementBeamEuler), 0, 0, 1, 1},
102568  {&__pyx_n_s_ChElementCableANCF, __pyx_k_ChElementCableANCF, sizeof(__pyx_k_ChElementCableANCF), 0, 0, 1, 1},
102569  {&__pyx_n_s_ChMatrix33D, __pyx_k_ChMatrix33D, sizeof(__pyx_k_ChMatrix33D), 0, 0, 1, 1},
102570  {&__pyx_n_s_ChMatrixDynamicD, __pyx_k_ChMatrixDynamicD, sizeof(__pyx_k_ChMatrixDynamicD), 0, 0, 1, 1},
102571  {&__pyx_n_s_ChMesh, __pyx_k_ChMesh, sizeof(__pyx_k_ChMesh), 0, 0, 1, 1},
102572  {&__pyx_n_s_ChNodeFEAxyzD, __pyx_k_ChNodeFEAxyzD, sizeof(__pyx_k_ChNodeFEAxyzD), 0, 0, 1, 1},
102573  {&__pyx_n_s_ChNodeFEAxyzrot, __pyx_k_ChNodeFEAxyzrot, sizeof(__pyx_k_ChNodeFEAxyzrot), 0, 0, 1, 1},
102574  {&__pyx_n_s_ChQuaternionD, __pyx_k_ChQuaternionD, sizeof(__pyx_k_ChQuaternionD), 0, 0, 1, 1},
102575  {&__pyx_n_s_ChRigidBody, __pyx_k_ChRigidBody, sizeof(__pyx_k_ChRigidBody), 0, 0, 1, 1},
102576  {&__pyx_n_s_ChSystemSMC, __pyx_k_ChSystemSMC, sizeof(__pyx_k_ChSystemSMC), 0, 0, 1, 1},
102577  {&__pyx_n_s_ChVectorD, __pyx_k_ChVectorD, sizeof(__pyx_k_ChVectorD), 0, 0, 1, 1},
102578  {&__pyx_kp_s_Chrono_body_log_not_understood, __pyx_k_Chrono_body_log_not_understood, sizeof(__pyx_k_Chrono_body_log_not_understood), 0, 0, 1, 0},
102579  {&__pyx_kp_s_Chrono_poststep, __pyx_k_Chrono_poststep, sizeof(__pyx_k_Chrono_poststep), 0, 0, 1, 0},
102580  {&__pyx_kp_s_Chrono_poststep_finished, __pyx_k_Chrono_poststep_finished, sizeof(__pyx_k_Chrono_poststep_finished), 0, 0, 1, 0},
102581  {&__pyx_kp_s_Chrono_prestep, __pyx_k_Chrono_prestep, sizeof(__pyx_k_Chrono_prestep), 0, 0, 1, 0},
102582  {&__pyx_kp_s_Chrono_system_to_t, __pyx_k_Chrono_system_to_t, sizeof(__pyx_k_Chrono_system_to_t), 0, 0, 1, 0},
102583  {&__pyx_n_s_Collection, __pyx_k_Collection, sizeof(__pyx_k_Collection), 0, 0, 1, 1},
102584  {&__pyx_n_s_CollectionType, __pyx_k_CollectionType, sizeof(__pyx_k_CollectionType), 0, 0, 1, 1},
102585  {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1},
102586  {&__pyx_kp_s_Coupling_scheme_requested_unknow, __pyx_k_Coupling_scheme_requested_unknow, sizeof(__pyx_k_Coupling_scheme_requested_unknow), 0, 0, 1, 0},
102587  {&__pyx_n_s_DataItem, __pyx_k_DataItem, sizeof(__pyx_k_DataItem), 0, 0, 1, 1},
102588  {&__pyx_n_s_DataType, __pyx_k_DataType, sizeof(__pyx_k_DataType), 0, 0, 1, 1},
102589  {&__pyx_n_s_Dimensions, __pyx_k_Dimensions, sizeof(__pyx_k_Dimensions), 0, 0, 1, 1},
102590  {&__pyx_n_s_Domain, __pyx_k_Domain, sizeof(__pyx_k_Domain), 0, 0, 1, 1},
102591  {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
102592  {&__pyx_n_s_ET, __pyx_k_ET, sizeof(__pyx_k_ET), 0, 0, 1, 1},
102593  {&__pyx_n_s_Element, __pyx_k_Element, sizeof(__pyx_k_Element), 0, 0, 1, 1},
102594  {&__pyx_n_s_ElementTree, __pyx_k_ElementTree, sizeof(__pyx_k_ElementTree), 0, 0, 1, 1},
102595  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
102596  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
102597  {&__pyx_n_s_Euler, __pyx_k_Euler, sizeof(__pyx_k_Euler), 0, 0, 1, 1},
102598  {&__pyx_n_s_F, __pyx_k_F, sizeof(__pyx_k_F), 0, 0, 1, 1},
102599  {&__pyx_n_s_FM, __pyx_k_FM, sizeof(__pyx_k_FM), 0, 0, 1, 1},
102600  {&__pyx_n_s_F_Aij, __pyx_k_F_Aij, sizeof(__pyx_k_F_Aij), 0, 0, 1, 1},
102601  {&__pyx_kp_s_F_applied, __pyx_k_F_applied, sizeof(__pyx_k_F_applied), 0, 0, 1, 0},
102602  {&__pyx_n_s_F_applied_2, __pyx_k_F_applied_2, sizeof(__pyx_k_F_applied_2), 0, 0, 1, 1},
102603  {&__pyx_n_s_F_bar, __pyx_k_F_bar, sizeof(__pyx_k_F_bar), 0, 0, 1, 1},
102604  {&__pyx_n_s_F_body, __pyx_k_F_body, sizeof(__pyx_k_F_body), 0, 0, 1, 1},
102605  {&__pyx_n_s_F_p, __pyx_k_F_p, sizeof(__pyx_k_F_p), 0, 0, 1, 1},
102606  {&__pyx_n_s_F_prot, __pyx_k_F_prot, sizeof(__pyx_k_F_prot), 0, 0, 1, 1},
102607  {&__pyx_n_s_F_solid_type, __pyx_k_F_solid_type, sizeof(__pyx_k_F_solid_type), 0, 0, 1, 1},
102608  {&__pyx_n_s_F_v, __pyx_k_F_v, sizeof(__pyx_k_F_v), 0, 0, 1, 1},
102609  {&__pyx_kp_s_Facets_must_be_triangles_for_tri, __pyx_k_Facets_must_be_triangles_for_tri, sizeof(__pyx_k_Facets_must_be_triangles_for_tri), 0, 0, 1, 0},
102610  {&__pyx_n_s_Fd, __pyx_k_Fd, sizeof(__pyx_k_Fd), 0, 0, 1, 1},
102611  {&__pyx_n_s_File, __pyx_k_File, sizeof(__pyx_k_File), 0, 0, 1, 1},
102612  {&__pyx_kp_s_Finished_init, __pyx_k_Finished_init, sizeof(__pyx_k_Finished_init), 0, 0, 1, 0},
102613  {&__pyx_kp_s_Finished_search_for_cable_nodes, __pyx_k_Finished_search_for_cable_nodes, sizeof(__pyx_k_Finished_search_for_cable_nodes), 0, 0, 1, 0},
102614  {&__pyx_n_s_Float, __pyx_k_Float, sizeof(__pyx_k_Float), 0, 0, 1, 1},
102615  {&__pyx_n_s_Format, __pyx_k_Format, sizeof(__pyx_k_Format), 0, 0, 1, 1},
102616  {&__pyx_kp_s_Full_Mass_Matrix, __pyx_k_Full_Mass_Matrix, sizeof(__pyx_k_Full_Mass_Matrix), 0, 0, 1, 0},
102617  {&__pyx_n_s_Fx, __pyx_k_Fx, sizeof(__pyx_k_Fx), 0, 0, 1, 1},
102618  {&__pyx_n_s_Fx_Aij, __pyx_k_Fx_Aij, sizeof(__pyx_k_Fx_Aij), 0, 0, 1, 1},
102619  {&__pyx_n_s_Fx_applied, __pyx_k_Fx_applied, sizeof(__pyx_k_Fx_applied), 0, 0, 1, 1},
102620  {&__pyx_n_s_Fx_prot, __pyx_k_Fx_prot, sizeof(__pyx_k_Fx_prot), 0, 0, 1, 1},
102621  {&__pyx_n_s_Fy, __pyx_k_Fy, sizeof(__pyx_k_Fy), 0, 0, 1, 1},
102622  {&__pyx_n_s_Fy_Aij, __pyx_k_Fy_Aij, sizeof(__pyx_k_Fy_Aij), 0, 0, 1, 1},
102623  {&__pyx_n_s_Fy_applied, __pyx_k_Fy_applied, sizeof(__pyx_k_Fy_applied), 0, 0, 1, 1},
102624  {&__pyx_n_s_Fy_prot, __pyx_k_Fy_prot, sizeof(__pyx_k_Fy_prot), 0, 0, 1, 1},
102625  {&__pyx_n_s_Fz, __pyx_k_Fz, sizeof(__pyx_k_Fz), 0, 0, 1, 1},
102626  {&__pyx_n_s_Fz_Aij, __pyx_k_Fz_Aij, sizeof(__pyx_k_Fz_Aij), 0, 0, 1, 1},
102627  {&__pyx_n_s_Fz_applied, __pyx_k_Fz_applied, sizeof(__pyx_k_Fz_applied), 0, 0, 1, 1},
102628  {&__pyx_n_s_Fz_prot, __pyx_k_Fz_prot, sizeof(__pyx_k_Fz_prot), 0, 0, 1, 1},
102629  {&__pyx_n_s_Geometry, __pyx_k_Geometry, sizeof(__pyx_k_Geometry), 0, 0, 1, 1},
102630  {&__pyx_n_s_GetC, __pyx_k_GetC, sizeof(__pyx_k_GetC), 0, 0, 1, 1},
102631  {&__pyx_n_s_GetChTime, __pyx_k_GetChTime, sizeof(__pyx_k_GetChTime), 0, 0, 1, 1},
102632  {&__pyx_n_s_GetElement, __pyx_k_GetElement, sizeof(__pyx_k_GetElement), 0, 0, 1, 1},
102633  {&__pyx_n_s_GetInertia, __pyx_k_GetInertia, sizeof(__pyx_k_GetInertia), 0, 0, 1, 1},
102634  {&__pyx_n_s_GetMass, __pyx_k_GetMass, sizeof(__pyx_k_GetMass), 0, 0, 1, 1},
102635  {&__pyx_n_s_GetPos, __pyx_k_GetPos, sizeof(__pyx_k_GetPos), 0, 0, 1, 1},
102636  {&__pyx_n_s_GetPos_dt, __pyx_k_GetPos_dt, sizeof(__pyx_k_GetPos_dt), 0, 0, 1, 1},
102637  {&__pyx_n_s_GetPos_dtdt, __pyx_k_GetPos_dtdt, sizeof(__pyx_k_GetPos_dtdt), 0, 0, 1, 1},
102638  {&__pyx_n_s_GetRot, __pyx_k_GetRot, sizeof(__pyx_k_GetRot), 0, 0, 1, 1},
102639  {&__pyx_n_s_GetSpringLength, __pyx_k_GetSpringLength, sizeof(__pyx_k_GetSpringLength), 0, 0, 1, 1},
102640  {&__pyx_n_s_GetSpringReact, __pyx_k_GetSpringReact, sizeof(__pyx_k_GetSpringReact), 0, 0, 1, 1},
102641  {&__pyx_n_s_GetSpringVelocity, __pyx_k_GetSpringVelocity, sizeof(__pyx_k_GetSpringVelocity), 0, 0, 1, 1},
102642  {&__pyx_n_s_GetWacc_loc, __pyx_k_GetWacc_loc, sizeof(__pyx_k_GetWacc_loc), 0, 0, 1, 1},
102643  {&__pyx_n_s_GetWacc_par, __pyx_k_GetWacc_par, sizeof(__pyx_k_GetWacc_par), 0, 0, 1, 1},
102644  {&__pyx_n_s_GetWvel_loc, __pyx_k_GetWvel_loc, sizeof(__pyx_k_GetWvel_loc), 0, 0, 1, 1},
102645  {&__pyx_n_s_Get_A_Xaxis, __pyx_k_Get_A_Xaxis, sizeof(__pyx_k_Get_A_Xaxis), 0, 0, 1, 1},
102646  {&__pyx_n_s_Get_A_Yaxis, __pyx_k_Get_A_Yaxis, sizeof(__pyx_k_Get_A_Yaxis), 0, 0, 1, 1},
102647  {&__pyx_n_s_Get_A_Zaxis, __pyx_k_Get_A_Zaxis, sizeof(__pyx_k_Get_A_Zaxis), 0, 0, 1, 1},
102648  {&__pyx_n_s_Get_G_acc, __pyx_k_Get_G_acc, sizeof(__pyx_k_Get_G_acc), 0, 0, 1, 1},
102649  {&__pyx_n_s_Get_XForce, __pyx_k_Get_XForce, sizeof(__pyx_k_Get_XForce), 0, 0, 1, 1},
102650  {&__pyx_n_s_Get_Xtorque, __pyx_k_Get_Xtorque, sizeof(__pyx_k_Get_Xtorque), 0, 0, 1, 1},
102651  {&__pyx_n_s_Grid, __pyx_k_Grid, sizeof(__pyx_k_Grid), 0, 0, 1, 1},
102652  {&__pyx_n_s_GridType, __pyx_k_GridType, sizeof(__pyx_k_GridType), 0, 0, 1, 1},
102653  {&__pyx_n_s_HDF, __pyx_k_HDF, sizeof(__pyx_k_HDF), 0, 0, 1, 1},
102654  {&__pyx_n_s_HHT, __pyx_k_HHT, sizeof(__pyx_k_HHT), 0, 0, 1, 1},
102655  {&__pyx_kp_s_IBM_set_to_be_used_in_bodies_but, __pyx_k_IBM_set_to_be_used_in_bodies_but, sizeof(__pyx_k_IBM_set_to_be_used_in_bodies_but), 0, 0, 1, 0},
102656  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
102657  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
102658  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
102659  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
102660  {&__pyx_n_s_Int, __pyx_k_Int, sizeof(__pyx_k_Int), 0, 0, 1, 1},
102661  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
102662  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
102663  {&__pyx_n_s_Iyy, __pyx_k_Iyy, sizeof(__pyx_k_Iyy), 0, 0, 1, 1},
102664  {&__pyx_n_s_L, __pyx_k_L, sizeof(__pyx_k_L), 0, 0, 1, 1},
102665  {&__pyx_n_s_L0, __pyx_k_L0, sizeof(__pyx_k_L0), 0, 0, 1, 1},
102666  {&__pyx_n_s_M, __pyx_k_M, sizeof(__pyx_k_M), 0, 0, 1, 1},
102667  {&__pyx_n_s_MAXLOC, __pyx_k_MAXLOC, sizeof(__pyx_k_MAXLOC), 0, 0, 1, 1},
102668  {&__pyx_n_s_MINLOC, __pyx_k_MINLOC, sizeof(__pyx_k_MINLOC), 0, 0, 1, 1},
102669  {&__pyx_n_s_MM, __pyx_k_MM, sizeof(__pyx_k_MM), 0, 0, 1, 1},
102670  {&__pyx_n_s_MPI, __pyx_k_MPI, sizeof(__pyx_k_MPI), 0, 0, 1, 1},
102671  {&__pyx_n_s_M_applied, __pyx_k_M_applied, sizeof(__pyx_k_M_applied), 0, 0, 1, 1},
102672  {&__pyx_n_s_M_bar, __pyx_k_M_bar, sizeof(__pyx_k_M_bar), 0, 0, 1, 1},
102673  {&__pyx_n_s_M_body, __pyx_k_M_body, sizeof(__pyx_k_M_body), 0, 0, 1, 1},
102674  {&__pyx_n_s_M_prot, __pyx_k_M_prot, sizeof(__pyx_k_M_prot), 0, 0, 1, 1},
102675  {&__pyx_kp_s_Mass_Matrix, __pyx_k_Mass_Matrix, sizeof(__pyx_k_Mass_Matrix), 0, 0, 1, 0},
102676  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
102677  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
102678  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
102679  {&__pyx_n_s_Mesh, __pyx_k_Mesh, sizeof(__pyx_k_Mesh), 0, 0, 1, 1},
102680  {&__pyx_n_s_Mesh_Spatial_Domain, __pyx_k_Mesh_Spatial_Domain, sizeof(__pyx_k_Mesh_Spatial_Domain), 0, 0, 1, 1},
102681  {&__pyx_kp_s_Mesh_Spatial_Domain__0_d, __pyx_k_Mesh_Spatial_Domain__0_d, sizeof(__pyx_k_Mesh_Spatial_Domain__0_d), 0, 0, 1, 0},
102682  {&__pyx_n_s_Mp, __pyx_k_Mp, sizeof(__pyx_k_Mp), 0, 0, 1, 1},
102683  {&__pyx_n_s_Mx, __pyx_k_Mx, sizeof(__pyx_k_Mx), 0, 0, 1, 1},
102684  {&__pyx_n_s_Mx_applied, __pyx_k_Mx_applied, sizeof(__pyx_k_Mx_applied), 0, 0, 1, 1},
102685  {&__pyx_n_s_Mx_prot, __pyx_k_Mx_prot, sizeof(__pyx_k_Mx_prot), 0, 0, 1, 1},
102686  {&__pyx_n_s_My, __pyx_k_My, sizeof(__pyx_k_My), 0, 0, 1, 1},
102687  {&__pyx_n_s_My_applied, __pyx_k_My_applied, sizeof(__pyx_k_My_applied), 0, 0, 1, 1},
102688  {&__pyx_n_s_My_prot, __pyx_k_My_prot, sizeof(__pyx_k_My_prot), 0, 0, 1, 1},
102689  {&__pyx_n_s_Mz, __pyx_k_Mz, sizeof(__pyx_k_Mz), 0, 0, 1, 1},
102690  {&__pyx_n_s_Mz_applied, __pyx_k_Mz_applied, sizeof(__pyx_k_Mz_applied), 0, 0, 1, 1},
102691  {&__pyx_n_s_Mz_prot, __pyx_k_Mz_prot, sizeof(__pyx_k_Mz_prot), 0, 0, 1, 1},
102692  {&__pyx_n_s_Name, __pyx_k_Name, sizeof(__pyx_k_Name), 0, 0, 1, 1},
102693  {&__pyx_n_s_Node, __pyx_k_Node, sizeof(__pyx_k_Node), 0, 0, 1, 1},
102694  {&__pyx_n_s_NodesPerElement, __pyx_k_NodesPerElement, sizeof(__pyx_k_NodesPerElement), 0, 0, 1, 1},
102695  {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
102696  {&__pyx_n_s_NumberOfElements, __pyx_k_NumberOfElements, sizeof(__pyx_k_NumberOfElements), 0, 0, 1, 1},
102697  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
102698  {&__pyx_n_s_OrderedDict, __pyx_k_OrderedDict, sizeof(__pyx_k_OrderedDict), 0, 0, 1, 1},
102699  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
102700  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
102701  {&__pyx_n_s_Polyline, __pyx_k_Polyline, sizeof(__pyx_k_Polyline), 0, 0, 1, 1},
102702  {&__pyx_n_s_Precision, __pyx_k_Precision, sizeof(__pyx_k_Precision), 0, 0, 1, 1},
102703  {&__pyx_kp_s_Prediction_requested_unknown, __pyx_k_Prediction_requested_unknown, sizeof(__pyx_k_Prediction_requested_unknown), 0, 0, 1, 0},
102704  {&__pyx_n_s_Profiling, __pyx_k_Profiling, sizeof(__pyx_k_Profiling), 0, 0, 1, 1},
102705  {&__pyx_n_s_ProtChAddedMass, __pyx_k_ProtChAddedMass, sizeof(__pyx_k_ProtChAddedMass), 0, 0, 1, 1},
102706  {&__pyx_n_s_ProtChAddedMass___reduce_cython, __pyx_k_ProtChAddedMass___reduce_cython, sizeof(__pyx_k_ProtChAddedMass___reduce_cython), 0, 0, 1, 1},
102707  {&__pyx_n_s_ProtChAddedMass___setstate_cytho, __pyx_k_ProtChAddedMass___setstate_cytho, sizeof(__pyx_k_ProtChAddedMass___setstate_cytho), 0, 0, 1, 1},
102708  {&__pyx_n_s_ProtChAddedMass_attachAuxiliaryV, __pyx_k_ProtChAddedMass_attachAuxiliaryV, sizeof(__pyx_k_ProtChAddedMass_attachAuxiliaryV), 0, 0, 1, 1},
102709  {&__pyx_n_s_ProtChAddedMass_attachModel, __pyx_k_ProtChAddedMass_attachModel, sizeof(__pyx_k_ProtChAddedMass_attachModel), 0, 0, 1, 1},
102710  {&__pyx_n_s_ProtChAddedMass_calculate, __pyx_k_ProtChAddedMass_calculate, sizeof(__pyx_k_ProtChAddedMass_calculate), 0, 0, 1, 1},
102711  {&__pyx_n_s_ProtChAddedMass_calculate_init, __pyx_k_ProtChAddedMass_calculate_init, sizeof(__pyx_k_ProtChAddedMass_calculate_init), 0, 0, 1, 1},
102712  {&__pyx_n_s_ProtChBody, __pyx_k_ProtChBody, sizeof(__pyx_k_ProtChBody), 0, 0, 1, 1},
102713  {&__pyx_n_s_ProtChBody___reduce_cython, __pyx_k_ProtChBody___reduce_cython, sizeof(__pyx_k_ProtChBody___reduce_cython), 0, 0, 1, 1},
102714  {&__pyx_n_s_ProtChBody___setstate_cython, __pyx_k_ProtChBody___setstate_cython, sizeof(__pyx_k_ProtChBody___setstate_cython), 0, 0, 1, 1},
102715  {&__pyx_n_s_ProtChBody__recordH5, __pyx_k_ProtChBody__recordH5, sizeof(__pyx_k_ProtChBody__recordH5), 0, 0, 1, 1},
102716  {&__pyx_n_s_ProtChBody__recordValues, __pyx_k_ProtChBody__recordValues, sizeof(__pyx_k_ProtChBody__recordValues), 0, 0, 1, 1},
102717  {&__pyx_n_s_ProtChBody__recordXML, __pyx_k_ProtChBody__recordXML, sizeof(__pyx_k_ProtChBody__recordXML), 0, 0, 1, 1},
102718  {&__pyx_n_s_ProtChBody_addPrismaticLinkX, __pyx_k_ProtChBody_addPrismaticLinkX, sizeof(__pyx_k_ProtChBody_addPrismaticLinkX), 0, 0, 1, 1},
102719  {&__pyx_n_s_ProtChBody_addPrismaticLinksWith, __pyx_k_ProtChBody_addPrismaticLinksWith, sizeof(__pyx_k_ProtChBody_addPrismaticLinksWith), 0, 0, 1, 1},
102720  {&__pyx_n_s_ProtChBody_addSpring, __pyx_k_ProtChBody_addSpring, sizeof(__pyx_k_ProtChBody_addSpring), 0, 0, 1, 1},
102721  {&__pyx_n_s_ProtChBody_addTriangleMeshFromSh, __pyx_k_ProtChBody_addTriangleMeshFromSh, sizeof(__pyx_k_ProtChBody_addTriangleMeshFromSh), 0, 0, 1, 1},
102722  {&__pyx_n_s_ProtChBody_attachAuxiliaryVariab, __pyx_k_ProtChBody_attachAuxiliaryVariab, sizeof(__pyx_k_ProtChBody_attachAuxiliaryVariab), 0, 0, 1, 1},
102723  {&__pyx_n_s_ProtChBody_attachShape, __pyx_k_ProtChBody_attachShape, sizeof(__pyx_k_ProtChBody_attachShape), 0, 0, 1, 1},
102724  {&__pyx_n_s_ProtChBody_calculate, __pyx_k_ProtChBody_calculate, sizeof(__pyx_k_ProtChBody_calculate), 0, 0, 1, 1},
102725  {&__pyx_n_s_ProtChBody_calculate_init, __pyx_k_ProtChBody_calculate_init, sizeof(__pyx_k_ProtChBody_calculate_init), 0, 0, 1, 1},
102726  {&__pyx_n_s_ProtChBody_getChronoObject, __pyx_k_ProtChBody_getChronoObject, sizeof(__pyx_k_ProtChBody_getChronoObject), 0, 0, 1, 1},
102727  {&__pyx_n_s_ProtChBody_getDynamicSDF, __pyx_k_ProtChBody_getDynamicSDF, sizeof(__pyx_k_ProtChBody_getDynamicSDF), 0, 0, 1, 1},
102728  {&__pyx_n_s_ProtChBody_getInertia, __pyx_k_ProtChBody_getInertia, sizeof(__pyx_k_ProtChBody_getInertia), 0, 0, 1, 1},
102729  {&__pyx_n_s_ProtChBody_getMass, __pyx_k_ProtChBody_getMass, sizeof(__pyx_k_ProtChBody_getMass), 0, 0, 1, 1},
102730  {&__pyx_n_s_ProtChBody_getMoments, __pyx_k_ProtChBody_getMoments, sizeof(__pyx_k_ProtChBody_getMoments), 0, 0, 1, 1},
102731  {&__pyx_n_s_ProtChBody_getPosition, __pyx_k_ProtChBody_getPosition, sizeof(__pyx_k_ProtChBody_getPosition), 0, 0, 1, 1},
102732  {&__pyx_n_s_ProtChBody_getPressureForces, __pyx_k_ProtChBody_getPressureForces, sizeof(__pyx_k_ProtChBody_getPressureForces), 0, 0, 1, 1},
102733  {&__pyx_n_s_ProtChBody_getRotationMatrix, __pyx_k_ProtChBody_getRotationMatrix, sizeof(__pyx_k_ProtChBody_getRotationMatrix), 0, 0, 1, 1},
102734  {&__pyx_n_s_ProtChBody_getShearForces, __pyx_k_ProtChBody_getShearForces, sizeof(__pyx_k_ProtChBody_getShearForces), 0, 0, 1, 1},
102735  {&__pyx_n_s_ProtChBody_getTriangleMeshInfo, __pyx_k_ProtChBody_getTriangleMeshInfo, sizeof(__pyx_k_ProtChBody_getTriangleMeshInfo), 0, 0, 1, 1},
102736  {&__pyx_n_s_ProtChBody_getValues, __pyx_k_ProtChBody_getValues, sizeof(__pyx_k_ProtChBody_getValues), 0, 0, 1, 1},
102737  {&__pyx_n_s_ProtChBody_getVelocity, __pyx_k_ProtChBody_getVelocity, sizeof(__pyx_k_ProtChBody_getVelocity), 0, 0, 1, 1},
102738  {&__pyx_n_s_ProtChBody_hx, __pyx_k_ProtChBody_hx, sizeof(__pyx_k_ProtChBody_hx), 0, 0, 1, 1},
102739  {&__pyx_n_s_ProtChBody_hx_rotation, __pyx_k_ProtChBody_hx_rotation, sizeof(__pyx_k_ProtChBody_hx_rotation), 0, 0, 1, 1},
102740  {&__pyx_n_s_ProtChBody_hx_translation, __pyx_k_ProtChBody_hx_translation, sizeof(__pyx_k_ProtChBody_hx_translation), 0, 0, 1, 1},
102741  {&__pyx_n_s_ProtChBody_hxyz, __pyx_k_ProtChBody_hxyz, sizeof(__pyx_k_ProtChBody_hxyz), 0, 0, 1, 1},
102742  {&__pyx_n_s_ProtChBody_hy, __pyx_k_ProtChBody_hy, sizeof(__pyx_k_ProtChBody_hy), 0, 0, 1, 1},
102743  {&__pyx_n_s_ProtChBody_hy_rotation, __pyx_k_ProtChBody_hy_rotation, sizeof(__pyx_k_ProtChBody_hy_rotation), 0, 0, 1, 1},
102744  {&__pyx_n_s_ProtChBody_hy_translation, __pyx_k_ProtChBody_hy_translation, sizeof(__pyx_k_ProtChBody_hy_translation), 0, 0, 1, 1},
102745  {&__pyx_n_s_ProtChBody_hz, __pyx_k_ProtChBody_hz, sizeof(__pyx_k_ProtChBody_hz), 0, 0, 1, 1},
102746  {&__pyx_n_s_ProtChBody_hz_rotation, __pyx_k_ProtChBody_hz_rotation, sizeof(__pyx_k_ProtChBody_hz_rotation), 0, 0, 1, 1},
102747  {&__pyx_n_s_ProtChBody_hz_translation, __pyx_k_ProtChBody_hz_translation, sizeof(__pyx_k_ProtChBody_hz_translation), 0, 0, 1, 1},
102748  {&__pyx_n_s_ProtChBody_poststep, __pyx_k_ProtChBody_poststep, sizeof(__pyx_k_ProtChBody_poststep), 0, 0, 1, 1},
102749  {&__pyx_n_s_ProtChBody_prediction, __pyx_k_ProtChBody_prediction, sizeof(__pyx_k_ProtChBody_prediction), 0, 0, 1, 1},
102750  {&__pyx_n_s_ProtChBody_prestep, __pyx_k_ProtChBody_prestep, sizeof(__pyx_k_ProtChBody_prestep), 0, 0, 1, 1},
102751  {&__pyx_n_s_ProtChBody_setAddedMass, __pyx_k_ProtChBody_setAddedMass, sizeof(__pyx_k_ProtChBody_setAddedMass), 0, 0, 1, 1},
102752  {&__pyx_n_s_ProtChBody_setBoundaryFlags, __pyx_k_ProtChBody_setBoundaryFlags, sizeof(__pyx_k_ProtChBody_setBoundaryFlags), 0, 0, 1, 1},
102753  {&__pyx_n_s_ProtChBody_setCollisionOptions, __pyx_k_ProtChBody_setCollisionOptions, sizeof(__pyx_k_ProtChBody_setCollisionOptions), 0, 0, 1, 1},
102754  {&__pyx_n_s_ProtChBody_setConstraints, __pyx_k_ProtChBody_setConstraints, sizeof(__pyx_k_ProtChBody_setConstraints), 0, 0, 1, 1},
102755  {&__pyx_n_s_ProtChBody_setExternalForces, __pyx_k_ProtChBody_setExternalForces, sizeof(__pyx_k_ProtChBody_setExternalForces), 0, 0, 1, 1},
102756  {&__pyx_n_s_ProtChBody_setIBM, __pyx_k_ProtChBody_setIBM, sizeof(__pyx_k_ProtChBody_setIBM), 0, 0, 1, 1},
102757  {&__pyx_n_s_ProtChBody_setInertiaXX, __pyx_k_ProtChBody_setInertiaXX, sizeof(__pyx_k_ProtChBody_setInertiaXX), 0, 0, 1, 1},
102758  {&__pyx_n_s_ProtChBody_setInertiaXY, __pyx_k_ProtChBody_setInertiaXY, sizeof(__pyx_k_ProtChBody_setInertiaXY), 0, 0, 1, 1},
102759  {&__pyx_n_s_ProtChBody_setInitialRot, __pyx_k_ProtChBody_setInitialRot, sizeof(__pyx_k_ProtChBody_setInitialRot), 0, 0, 1, 1},
102760  {&__pyx_n_s_ProtChBody_setMass, __pyx_k_ProtChBody_setMass, sizeof(__pyx_k_ProtChBody_setMass), 0, 0, 1, 1},
102761  {&__pyx_n_s_ProtChBody_setName, __pyx_k_ProtChBody_setName, sizeof(__pyx_k_ProtChBody_setName), 0, 0, 1, 1},
102762  {&__pyx_n_s_ProtChBody_setPosition, __pyx_k_ProtChBody_setPosition, sizeof(__pyx_k_ProtChBody_setPosition), 0, 0, 1, 1},
102763  {&__pyx_n_s_ProtChBody_setPrescribedMotion, __pyx_k_ProtChBody_setPrescribedMotion, sizeof(__pyx_k_ProtChBody_setPrescribedMotion), 0, 0, 1, 1},
102764  {&__pyx_n_s_ProtChBody_setPrescribedMotionCu, __pyx_k_ProtChBody_setPrescribedMotionCu, sizeof(__pyx_k_ProtChBody_setPrescribedMotionCu), 0, 0, 1, 1},
102765  {&__pyx_n_s_ProtChBody_setPrescribedMotionPo, __pyx_k_ProtChBody_setPrescribedMotionPo, sizeof(__pyx_k_ProtChBody_setPrescribedMotionPo), 0, 0, 1, 1},
102766  {&__pyx_n_s_ProtChBody_setPrescribedMotionSi, __pyx_k_ProtChBody_setPrescribedMotionSi, sizeof(__pyx_k_ProtChBody_setPrescribedMotionSi), 0, 0, 1, 1},
102767  {&__pyx_n_s_ProtChBody_setRecordValues, __pyx_k_ProtChBody_setRecordValues, sizeof(__pyx_k_ProtChBody_setRecordValues), 0, 0, 1, 1},
102768  {&__pyx_n_s_ProtChBody_setVelocity, __pyx_k_ProtChBody_setVelocity, sizeof(__pyx_k_ProtChBody_setVelocity), 0, 0, 1, 1},
102769  {&__pyx_n_s_ProtChBody_setWidth2D, __pyx_k_ProtChBody_setWidth2D, sizeof(__pyx_k_ProtChBody_setWidth2D), 0, 0, 1, 1},
102770  {&__pyx_n_s_ProtChBody_storeValues, __pyx_k_ProtChBody_storeValues, sizeof(__pyx_k_ProtChBody_storeValues), 0, 0, 1, 1},
102771  {&__pyx_n_s_ProtChBody_updateIBM, __pyx_k_ProtChBody_updateIBM, sizeof(__pyx_k_ProtChBody_updateIBM), 0, 0, 1, 1},
102772  {&__pyx_n_s_ProtChMesh, __pyx_k_ProtChMesh, sizeof(__pyx_k_ProtChMesh), 0, 0, 1, 1},
102773  {&__pyx_n_s_ProtChMesh___reduce_cython, __pyx_k_ProtChMesh___reduce_cython, sizeof(__pyx_k_ProtChMesh___reduce_cython), 0, 0, 1, 1},
102774  {&__pyx_n_s_ProtChMesh___setstate_cython, __pyx_k_ProtChMesh___setstate_cython, sizeof(__pyx_k_ProtChMesh___setstate_cython), 0, 0, 1, 1},
102775  {&__pyx_n_s_ProtChMesh_getChronoObject, __pyx_k_ProtChMesh_getChronoObject, sizeof(__pyx_k_ProtChMesh_getChronoObject), 0, 0, 1, 1},
102776  {&__pyx_n_s_ProtChMoorings, __pyx_k_ProtChMoorings, sizeof(__pyx_k_ProtChMoorings), 0, 0, 1, 1},
102777  {&__pyx_n_s_ProtChMoorings___reduce_cython, __pyx_k_ProtChMoorings___reduce_cython, sizeof(__pyx_k_ProtChMoorings___reduce_cython), 0, 0, 1, 1},
102778  {&__pyx_n_s_ProtChMoorings___setstate_cython, __pyx_k_ProtChMoorings___setstate_cython, sizeof(__pyx_k_ProtChMoorings___setstate_cython), 0, 0, 1, 1},
102779  {&__pyx_n_s_ProtChMoorings__recordH5, __pyx_k_ProtChMoorings__recordH5, sizeof(__pyx_k_ProtChMoorings__recordH5), 0, 0, 1, 1},
102780  {&__pyx_n_s_ProtChMoorings__recordValues, __pyx_k_ProtChMoorings__recordValues, sizeof(__pyx_k_ProtChMoorings__recordValues), 0, 0, 1, 1},
102781  {&__pyx_n_s_ProtChMoorings__recordXML, __pyx_k_ProtChMoorings__recordXML, sizeof(__pyx_k_ProtChMoorings__recordXML), 0, 0, 1, 1},
102782  {&__pyx_n_s_ProtChMoorings_attachBackNodeToB, __pyx_k_ProtChMoorings_attachBackNodeToB, sizeof(__pyx_k_ProtChMoorings_attachBackNodeToB), 0, 0, 1, 1},
102783  {&__pyx_n_s_ProtChMoorings_attachFrontNodeTo, __pyx_k_ProtChMoorings_attachFrontNodeTo, sizeof(__pyx_k_ProtChMoorings_attachFrontNodeTo), 0, 0, 1, 1},
102784  {&__pyx_n_s_ProtChMoorings_buildNodes, __pyx_k_ProtChMoorings_buildNodes, sizeof(__pyx_k_ProtChMoorings_buildNodes), 0, 0, 1, 1},
102785  {&__pyx_n_s_ProtChMoorings_calculate_init, __pyx_k_ProtChMoorings_calculate_init, sizeof(__pyx_k_ProtChMoorings_calculate_init), 0, 0, 1, 1},
102786  {&__pyx_n_s_ProtChMoorings_fixBackNode, __pyx_k_ProtChMoorings_fixBackNode, sizeof(__pyx_k_ProtChMoorings_fixBackNode), 0, 0, 1, 1},
102787  {&__pyx_n_s_ProtChMoorings_fixFrontNode, __pyx_k_ProtChMoorings_fixFrontNode, sizeof(__pyx_k_ProtChMoorings_fixFrontNode), 0, 0, 1, 1},
102788  {&__pyx_n_s_ProtChMoorings_getAddedMassForce, __pyx_k_ProtChMoorings_getAddedMassForce, sizeof(__pyx_k_ProtChMoorings_getAddedMassForce), 0, 0, 1, 1},
102789  {&__pyx_n_s_ProtChMoorings_getDragForces, __pyx_k_ProtChMoorings_getDragForces, sizeof(__pyx_k_ProtChMoorings_getDragForces), 0, 0, 1, 1},
102790  {&__pyx_n_s_ProtChMoorings_getNodesAccelerat, __pyx_k_ProtChMoorings_getNodesAccelerat, sizeof(__pyx_k_ProtChMoorings_getNodesAccelerat), 0, 0, 1, 1},
102791  {&__pyx_n_s_ProtChMoorings_getNodesD, __pyx_k_ProtChMoorings_getNodesD, sizeof(__pyx_k_ProtChMoorings_getNodesD), 0, 0, 1, 1},
102792  {&__pyx_n_s_ProtChMoorings_getNodesPosition, __pyx_k_ProtChMoorings_getNodesPosition, sizeof(__pyx_k_ProtChMoorings_getNodesPosition), 0, 0, 1, 1},
102793  {&__pyx_n_s_ProtChMoorings_getNodesTension, __pyx_k_ProtChMoorings_getNodesTension, sizeof(__pyx_k_ProtChMoorings_getNodesTension), 0, 0, 1, 1},
102794  {&__pyx_n_s_ProtChMoorings_getNodesVelocity, __pyx_k_ProtChMoorings_getNodesVelocity, sizeof(__pyx_k_ProtChMoorings_getNodesVelocity), 0, 0, 1, 1},
102795  {&__pyx_n_s_ProtChMoorings_getTensionBack, __pyx_k_ProtChMoorings_getTensionBack, sizeof(__pyx_k_ProtChMoorings_getTensionBack), 0, 0, 1, 1},
102796  {&__pyx_n_s_ProtChMoorings_getTensionElement, __pyx_k_ProtChMoorings_getTensionElement, sizeof(__pyx_k_ProtChMoorings_getTensionElement), 0, 0, 1, 1},
102797  {&__pyx_n_s_ProtChMoorings_getTensionFront, __pyx_k_ProtChMoorings_getTensionFront, sizeof(__pyx_k_ProtChMoorings_getTensionFront), 0, 0, 1, 1},
102798  {&__pyx_n_s_ProtChMoorings_poststep, __pyx_k_ProtChMoorings_poststep, sizeof(__pyx_k_ProtChMoorings_poststep), 0, 0, 1, 1},
102799  {&__pyx_n_s_ProtChMoorings_prestep, __pyx_k_ProtChMoorings_prestep, sizeof(__pyx_k_ProtChMoorings_prestep), 0, 0, 1, 1},
102800  {&__pyx_n_s_ProtChMoorings_recordStrainEta, __pyx_k_ProtChMoorings_recordStrainEta, sizeof(__pyx_k_ProtChMoorings_recordStrainEta), 0, 0, 1, 1},
102801  {&__pyx_n_s_ProtChMoorings_setAddedMassCoeff, __pyx_k_ProtChMoorings_setAddedMassCoeff, sizeof(__pyx_k_ProtChMoorings_setAddedMassCoeff), 0, 0, 1, 1},
102802  {&__pyx_n_s_ProtChMoorings_setApplyAddedMass, __pyx_k_ProtChMoorings_setApplyAddedMass, sizeof(__pyx_k_ProtChMoorings_setApplyAddedMass), 0, 0, 1, 1},
102803  {&__pyx_n_s_ProtChMoorings_setApplyBuoyancy, __pyx_k_ProtChMoorings_setApplyBuoyancy, sizeof(__pyx_k_ProtChMoorings_setApplyBuoyancy), 0, 0, 1, 1},
102804  {&__pyx_n_s_ProtChMoorings_setApplyDrag, __pyx_k_ProtChMoorings_setApplyDrag, sizeof(__pyx_k_ProtChMoorings_setApplyDrag), 0, 0, 1, 1},
102805  {&__pyx_n_s_ProtChMoorings_setContactMateria, __pyx_k_ProtChMoorings_setContactMateria, sizeof(__pyx_k_ProtChMoorings_setContactMateria), 0, 0, 1, 1},
102806  {&__pyx_n_s_ProtChMoorings_setDragCoefficien, __pyx_k_ProtChMoorings_setDragCoefficien, sizeof(__pyx_k_ProtChMoorings_setDragCoefficien), 0, 0, 1, 1},
102807  {&__pyx_n_s_ProtChMoorings_setExternalForces, __pyx_k_ProtChMoorings_setExternalForces, sizeof(__pyx_k_ProtChMoorings_setExternalForces), 0, 0, 1, 1},
102808  {&__pyx_n_s_ProtChMoorings_setFluidAccelerat, __pyx_k_ProtChMoorings_setFluidAccelerat, sizeof(__pyx_k_ProtChMoorings_setFluidAccelerat), 0, 0, 1, 1},
102809  {&__pyx_n_s_ProtChMoorings_setFluidDensityAt, __pyx_k_ProtChMoorings_setFluidDensityAt, sizeof(__pyx_k_ProtChMoorings_setFluidDensityAt), 0, 0, 1, 1},
102810  {&__pyx_n_s_ProtChMoorings_setFluidVelocityA, __pyx_k_ProtChMoorings_setFluidVelocityA, sizeof(__pyx_k_ProtChMoorings_setFluidVelocityA), 0, 0, 1, 1},
102811  {&__pyx_n_s_ProtChMoorings_setFluidVelocityF, __pyx_k_ProtChMoorings_setFluidVelocityF, sizeof(__pyx_k_ProtChMoorings_setFluidVelocityF), 0, 0, 1, 1},
102812  {&__pyx_n_s_ProtChMoorings_setIyy, __pyx_k_ProtChMoorings_setIyy, sizeof(__pyx_k_ProtChMoorings_setIyy), 0, 0, 1, 1},
102813  {&__pyx_n_s_ProtChMoorings_setName, __pyx_k_ProtChMoorings_setName, sizeof(__pyx_k_ProtChMoorings_setName), 0, 0, 1, 1},
102814  {&__pyx_n_s_ProtChMoorings_setNodesPosition, __pyx_k_ProtChMoorings_setNodesPosition, sizeof(__pyx_k_ProtChMoorings_setNodesPosition), 0, 0, 1, 1},
102815  {&__pyx_n_s_ProtChMoorings_setNodesPositionF, __pyx_k_ProtChMoorings_setNodesPositionF, sizeof(__pyx_k_ProtChMoorings_setNodesPositionF), 0, 0, 1, 1},
102816  {&__pyx_n_s_ProtChMoorings_setRestLengthPerE, __pyx_k_ProtChMoorings_setRestLengthPerE, sizeof(__pyx_k_ProtChMoorings_setRestLengthPerE), 0, 0, 1, 1},
102817  {&__pyx_n_s_ProtChMoorings_updateForces, __pyx_k_ProtChMoorings_updateForces, sizeof(__pyx_k_ProtChMoorings_updateForces), 0, 0, 1, 1},
102818  {&__pyx_n_s_ProtChSystem, __pyx_k_ProtChSystem, sizeof(__pyx_k_ProtChSystem), 0, 0, 1, 1},
102819  {&__pyx_n_s_ProtChSystem___reduce_cython, __pyx_k_ProtChSystem___reduce_cython, sizeof(__pyx_k_ProtChSystem___reduce_cython), 0, 0, 1, 1},
102820  {&__pyx_n_s_ProtChSystem___setstate_cython, __pyx_k_ProtChSystem___setstate_cython, sizeof(__pyx_k_ProtChSystem___setstate_cython), 0, 0, 1, 1},
102821  {&__pyx_n_s_ProtChSystem_addProtChBody, __pyx_k_ProtChSystem_addProtChBody, sizeof(__pyx_k_ProtChSystem_addProtChBody), 0, 0, 1, 1},
102822  {&__pyx_n_s_ProtChSystem_addProtChMesh, __pyx_k_ProtChSystem_addProtChMesh, sizeof(__pyx_k_ProtChSystem_addProtChMesh), 0, 0, 1, 1},
102823  {&__pyx_n_s_ProtChSystem_addSubcomponent, __pyx_k_ProtChSystem_addSubcomponent, sizeof(__pyx_k_ProtChSystem_addSubcomponent), 0, 0, 1, 1},
102824  {&__pyx_n_s_ProtChSystem_attachAuxiliaryVari, __pyx_k_ProtChSystem_attachAuxiliaryVari, sizeof(__pyx_k_ProtChSystem_attachAuxiliaryVari), 0, 0, 1, 1},
102825  {&__pyx_n_s_ProtChSystem_attachModel, __pyx_k_ProtChSystem_attachModel, sizeof(__pyx_k_ProtChSystem_attachModel), 0, 0, 1, 1},
102826  {&__pyx_n_s_ProtChSystem_calculate, __pyx_k_ProtChSystem_calculate, sizeof(__pyx_k_ProtChSystem_calculate), 0, 0, 1, 1},
102827  {&__pyx_n_s_ProtChSystem_calculate_init, __pyx_k_ProtChSystem_calculate_init, sizeof(__pyx_k_ProtChSystem_calculate_init), 0, 0, 1, 1},
102828  {&__pyx_n_s_ProtChSystem_findElementContaini, __pyx_k_ProtChSystem_findElementContaini, sizeof(__pyx_k_ProtChSystem_findElementContaini), 0, 0, 1, 1},
102829  {&__pyx_n_s_ProtChSystem_findElementContaini_2, __pyx_k_ProtChSystem_findElementContaini_2, sizeof(__pyx_k_ProtChSystem_findElementContaini_2), 0, 0, 1, 1},
102830  {&__pyx_n_s_ProtChSystem_getChronoObject, __pyx_k_ProtChSystem_getChronoObject, sizeof(__pyx_k_ProtChSystem_getChronoObject), 0, 0, 1, 1},
102831  {&__pyx_n_s_ProtChSystem_getFluidVelocityGra, __pyx_k_ProtChSystem_getFluidVelocityGra, sizeof(__pyx_k_ProtChSystem_getFluidVelocityGra), 0, 0, 1, 1},
102832  {&__pyx_n_s_ProtChSystem_getFluidVelocityLoc, __pyx_k_ProtChSystem_getFluidVelocityLoc, sizeof(__pyx_k_ProtChSystem_getFluidVelocityLoc), 0, 0, 1, 1},
102833  {&__pyx_n_s_ProtChSystem_getGravitationalAcc, __pyx_k_ProtChSystem_getGravitationalAcc, sizeof(__pyx_k_ProtChSystem_getGravitationalAcc), 0, 0, 1, 1},
102834  {&__pyx_n_s_ProtChSystem_log_bodies_h5, __pyx_k_ProtChSystem_log_bodies_h5, sizeof(__pyx_k_ProtChSystem_log_bodies_h5), 0, 0, 1, 1},
102835  {&__pyx_n_s_ProtChSystem_log_bodies_text, __pyx_k_ProtChSystem_log_bodies_text, sizeof(__pyx_k_ProtChSystem_log_bodies_text), 0, 0, 1, 1},
102836  {&__pyx_n_s_ProtChSystem_log_residuals_h5, __pyx_k_ProtChSystem_log_residuals_h5, sizeof(__pyx_k_ProtChSystem_log_residuals_h5), 0, 0, 1, 1},
102837  {&__pyx_n_s_ProtChSystem_log_residuals_text, __pyx_k_ProtChSystem_log_residuals_text, sizeof(__pyx_k_ProtChSystem_log_residuals_text), 0, 0, 1, 1},
102838  {&__pyx_n_s_ProtChSystem_log_springs_h5, __pyx_k_ProtChSystem_log_springs_h5, sizeof(__pyx_k_ProtChSystem_log_springs_h5), 0, 0, 1, 1},
102839  {&__pyx_n_s_ProtChSystem_log_springs_text, __pyx_k_ProtChSystem_log_springs_text, sizeof(__pyx_k_ProtChSystem_log_springs_text), 0, 0, 1, 1},
102840  {&__pyx_n_s_ProtChSystem_log_times_h5, __pyx_k_ProtChSystem_log_times_h5, sizeof(__pyx_k_ProtChSystem_log_times_h5), 0, 0, 1, 1},
102841  {&__pyx_kp_s_ProtChSystem_no_time_step_set_in, __pyx_k_ProtChSystem_no_time_step_set_in, sizeof(__pyx_k_ProtChSystem_no_time_step_set_in), 0, 0, 1, 0},
102842  {&__pyx_n_s_ProtChSystem_setCollisionEnvelop, __pyx_k_ProtChSystem_setCollisionEnvelop, sizeof(__pyx_k_ProtChSystem_setCollisionEnvelop), 0, 0, 1, 1},
102843  {&__pyx_n_s_ProtChSystem_setCouplingScheme, __pyx_k_ProtChSystem_setCouplingScheme, sizeof(__pyx_k_ProtChSystem_setCouplingScheme), 0, 0, 1, 1},
102844  {&__pyx_n_s_ProtChSystem_setGravitationalAcc, __pyx_k_ProtChSystem_setGravitationalAcc, sizeof(__pyx_k_ProtChSystem_setGravitationalAcc), 0, 0, 1, 1},
102845  {&__pyx_n_s_ProtChSystem_setMinimumSubsteps, __pyx_k_ProtChSystem_setMinimumSubsteps, sizeof(__pyx_k_ProtChSystem_setMinimumSubsteps), 0, 0, 1, 1},
102846  {&__pyx_n_s_ProtChSystem_setSampleRate, __pyx_k_ProtChSystem_setSampleRate, sizeof(__pyx_k_ProtChSystem_setSampleRate), 0, 0, 1, 1},
102847  {&__pyx_n_s_ProtChSystem_setTimeStep, __pyx_k_ProtChSystem_setTimeStep, sizeof(__pyx_k_ProtChSystem_setTimeStep), 0, 0, 1, 1},
102848  {&__pyx_n_s_ProtChSystem_setTimestepperType, __pyx_k_ProtChSystem_setTimestepperType, sizeof(__pyx_k_ProtChSystem_setTimestepperType), 0, 0, 1, 1},
102849  {&__pyx_n_s_ProtChSystem_step, __pyx_k_ProtChSystem_step, sizeof(__pyx_k_ProtChSystem_step), 0, 0, 1, 1},
102850  {&__pyx_n_s_Scalar, __pyx_k_Scalar, sizeof(__pyx_k_Scalar), 0, 0, 1, 1},
102851  {&__pyx_n_s_SetInertiaXX, __pyx_k_SetInertiaXX, sizeof(__pyx_k_SetInertiaXX), 0, 0, 1, 1},
102852  {&__pyx_n_s_SetInertiaXY, __pyx_k_SetInertiaXY, sizeof(__pyx_k_SetInertiaXY), 0, 0, 1, 1},
102853  {&__pyx_n_s_SetMass, __pyx_k_SetMass, sizeof(__pyx_k_SetMass), 0, 0, 1, 1},
102854  {&__pyx_n_s_SetPos, __pyx_k_SetPos, sizeof(__pyx_k_SetPos), 0, 0, 1, 1},
102855  {&__pyx_n_s_SetPos_dt, __pyx_k_SetPos_dt, sizeof(__pyx_k_SetPos_dt), 0, 0, 1, 1},
102856  {&__pyx_n_s_SetRot, __pyx_k_SetRot, sizeof(__pyx_k_SetRot), 0, 0, 1, 1},
102857  {&__pyx_n_s_Set_G_acc, __pyx_k_Set_G_acc, sizeof(__pyx_k_Set_G_acc), 0, 0, 1, 1},
102858  {&__pyx_n_s_Setup, __pyx_k_Setup, sizeof(__pyx_k_Setup), 0, 0, 1, 1},
102859  {&__pyx_kp_s_Setup_initial, __pyx_k_Setup_initial, sizeof(__pyx_k_Setup_initial), 0, 0, 1, 0},
102860  {&__pyx_kp_s_Shape, __pyx_k_Shape, sizeof(__pyx_k_Shape), 0, 0, 1, 0},
102861  {&__pyx_kp_s_Solved_Chrono_system_to_t, __pyx_k_Solved_Chrono_system_to_t, sizeof(__pyx_k_Solved_Chrono_system_to_t), 0, 0, 1, 0},
102862  {&__pyx_kp_s_Solving_Chrono_system_from_t, __pyx_k_Solving_Chrono_system_from_t, sizeof(__pyx_k_Solving_Chrono_system_from_t), 0, 0, 1, 0},
102863  {&__pyx_n_s_SpatialTools, __pyx_k_SpatialTools, sizeof(__pyx_k_SpatialTools), 0, 0, 1, 1},
102864  {&__pyx_kp_s_Spatial_Domain, __pyx_k_Spatial_Domain, sizeof(__pyx_k_Spatial_Domain), 0, 0, 1, 0},
102865  {&__pyx_kp_s_Starting_distance_search_for_cab, __pyx_k_Starting_distance_search_for_cab, sizeof(__pyx_k_Starting_distance_search_for_cab), 0, 0, 1, 0},
102866  {&__pyx_kp_s_Starting_init, __pyx_k_Starting_init, sizeof(__pyx_k_Starting_init), 0, 0, 1, 0},
102867  {&__pyx_kp_s_Starting_k_d_tree_search_for_cab, __pyx_k_Starting_k_d_tree_search_for_cab, sizeof(__pyx_k_Starting_k_d_tree_search_for_cab), 0, 0, 1, 0},
102868  {&__pyx_n_s_SubElement, __pyx_k_SubElement, sizeof(__pyx_k_SubElement), 0, 0, 1, 1},
102869  {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
102870  {&__pyx_n_s_Tb, __pyx_k_Tb, sizeof(__pyx_k_Tb), 0, 0, 1, 1},
102871  {&__pyx_n_s_Tb0, __pyx_k_Tb0, sizeof(__pyx_k_Tb0), 0, 0, 1, 1},
102872  {&__pyx_n_s_Tb1, __pyx_k_Tb1, sizeof(__pyx_k_Tb1), 0, 0, 1, 1},
102873  {&__pyx_n_s_Tb2, __pyx_k_Tb2, sizeof(__pyx_k_Tb2), 0, 0, 1, 1},
102874  {&__pyx_n_s_Temporal, __pyx_k_Temporal, sizeof(__pyx_k_Temporal), 0, 0, 1, 1},
102875  {&__pyx_n_s_Tf, __pyx_k_Tf, sizeof(__pyx_k_Tf), 0, 0, 1, 1},
102876  {&__pyx_n_s_Tf0, __pyx_k_Tf0, sizeof(__pyx_k_Tf0), 0, 0, 1, 1},
102877  {&__pyx_n_s_Tf1, __pyx_k_Tf1, sizeof(__pyx_k_Tf1), 0, 0, 1, 1},
102878  {&__pyx_n_s_Tf2, __pyx_k_Tf2, sizeof(__pyx_k_Tf2), 0, 0, 1, 1},
102879  {&__pyx_n_s_Time, __pyx_k_Time, sizeof(__pyx_k_Time), 0, 0, 1, 1},
102880  {&__pyx_n_s_Topology, __pyx_k_Topology, sizeof(__pyx_k_Topology), 0, 0, 1, 1},
102881  {&__pyx_n_s_Trapezoidal, __pyx_k_Trapezoidal, sizeof(__pyx_k_Trapezoidal), 0, 0, 1, 1},
102882  {&__pyx_n_s_Triangle, __pyx_k_Triangle, sizeof(__pyx_k_Triangle), 0, 0, 1, 1},
102883  {&__pyx_n_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 1},
102884  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
102885  {&__pyx_n_s_UInt, __pyx_k_UInt, sizeof(__pyx_k_UInt), 0, 0, 1, 1},
102886  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
102887  {&__pyx_n_s_Uniform, __pyx_k_Uniform, sizeof(__pyx_k_Uniform), 0, 0, 1, 1},
102888  {&__pyx_n_s_Value, __pyx_k_Value, sizeof(__pyx_k_Value), 0, 0, 1, 1},
102889  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
102890  {&__pyx_n_s_Version, __pyx_k_Version, sizeof(__pyx_k_Version), 0, 0, 1, 1},
102891  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
102892  {&__pyx_kp_s_Warning_Chrono_system_was_alread, __pyx_k_Warning_Chrono_system_was_alread, sizeof(__pyx_k_Warning_Chrono_system_was_alread), 0, 0, 1, 0},
102893  {&__pyx_n_s_XYZ, __pyx_k_XYZ, sizeof(__pyx_k_XYZ), 0, 0, 1, 1},
102894  {&__pyx_n_s_Xdmf, __pyx_k_Xdmf, sizeof(__pyx_k_Xdmf), 0, 0, 1, 1},
102895  {&__pyx_n_s_Xdmf_ElementTopology, __pyx_k_Xdmf_ElementTopology, sizeof(__pyx_k_Xdmf_ElementTopology), 0, 0, 1, 1},
102896  {&__pyx_n_s_Xdmf_NodesPerElement, __pyx_k_Xdmf_NodesPerElement, sizeof(__pyx_k_Xdmf_NodesPerElement), 0, 0, 1, 1},
102897  {&__pyx_n_s_Xdmf_NumberOfElements, __pyx_k_Xdmf_NumberOfElements, sizeof(__pyx_k_Xdmf_NumberOfElements), 0, 0, 1, 1},
102898  {&__pyx_kp_s__112, __pyx_k__112, sizeof(__pyx_k__112), 0, 0, 1, 0},
102899  {&__pyx_kp_s__115, __pyx_k__115, sizeof(__pyx_k__115), 0, 0, 1, 0},
102900  {&__pyx_kp_s__125, __pyx_k__125, sizeof(__pyx_k__125), 0, 0, 1, 0},
102901  {&__pyx_kp_s__126, __pyx_k__126, sizeof(__pyx_k__126), 0, 0, 1, 0},
102902  {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
102903  {&__pyx_n_s__240, __pyx_k__240, sizeof(__pyx_k__240), 0, 0, 1, 1},
102904  {&__pyx_n_s__316, __pyx_k__316, sizeof(__pyx_k__316), 0, 0, 1, 1},
102905  {&__pyx_kp_s__87, __pyx_k__87, sizeof(__pyx_k__87), 0, 0, 1, 0},
102906  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
102907  {&__pyx_kp_s_a_2, __pyx_k_a_2, sizeof(__pyx_k_a_2), 0, 0, 1, 0},
102908  {&__pyx_n_s_aa, __pyx_k_aa, sizeof(__pyx_k_aa), 0, 0, 1, 1},
102909  {&__pyx_n_s_acc, __pyx_k_acc, sizeof(__pyx_k_acc), 0, 0, 1, 1},
102910  {&__pyx_n_s_acceleration, __pyx_k_acceleration, sizeof(__pyx_k_acceleration), 0, 0, 1, 1},
102911  {&__pyx_n_s_acceleration_array, __pyx_k_acceleration_array, sizeof(__pyx_k_acceleration_array), 0, 0, 1, 1},
102912  {&__pyx_n_s_acceleration_t, __pyx_k_acceleration_t, sizeof(__pyx_k_acceleration_t), 0, 0, 1, 1},
102913  {&__pyx_n_s_addPrismaticLinkX, __pyx_k_addPrismaticLinkX, sizeof(__pyx_k_addPrismaticLinkX), 0, 0, 1, 1},
102914  {&__pyx_n_s_addPrismaticLinksWithSpring, __pyx_k_addPrismaticLinksWithSpring, sizeof(__pyx_k_addPrismaticLinksWithSpring), 0, 0, 1, 1},
102915  {&__pyx_n_s_addProtChBody, __pyx_k_addProtChBody, sizeof(__pyx_k_addProtChBody), 0, 0, 1, 1},
102916  {&__pyx_n_s_addProtChMesh, __pyx_k_addProtChMesh, sizeof(__pyx_k_addProtChMesh), 0, 0, 1, 1},
102917  {&__pyx_n_s_addSpring, __pyx_k_addSpring, sizeof(__pyx_k_addSpring), 0, 0, 1, 1},
102918  {&__pyx_n_s_addSubcomponent, __pyx_k_addSubcomponent, sizeof(__pyx_k_addSubcomponent), 0, 0, 1, 1},
102919  {&__pyx_n_s_addTriangleMeshFromShape, __pyx_k_addTriangleMeshFromShape, sizeof(__pyx_k_addTriangleMeshFromShape), 0, 0, 1, 1},
102920  {&__pyx_n_s_addTriangleMeshFromVerticesFaces, __pyx_k_addTriangleMeshFromVerticesFaces, sizeof(__pyx_k_addTriangleMeshFromVerticesFaces), 0, 0, 1, 1},
102921  {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
102922  {&__pyx_n_s_all_names, __pyx_k_all_names, sizeof(__pyx_k_all_names), 0, 0, 1, 1},
102923  {&__pyx_n_s_all_values, __pyx_k_all_values, sizeof(__pyx_k_all_values), 0, 0, 1, 1},
102924  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
102925  {&__pyx_n_s_allreduce, __pyx_k_allreduce, sizeof(__pyx_k_allreduce), 0, 0, 1, 1},
102926  {&__pyx_n_s_am, __pyx_k_am, sizeof(__pyx_k_am), 0, 0, 1, 1},
102927  {&__pyx_n_s_am_t, __pyx_k_am_t, sizeof(__pyx_k_am_t), 0, 0, 1, 1},
102928  {&__pyx_n_s_amx, __pyx_k_amx, sizeof(__pyx_k_amx), 0, 0, 1, 1},
102929  {&__pyx_n_s_amx_t, __pyx_k_amx_t, sizeof(__pyx_k_amx_t), 0, 0, 1, 1},
102930  {&__pyx_n_s_amy, __pyx_k_amy, sizeof(__pyx_k_amy), 0, 0, 1, 1},
102931  {&__pyx_n_s_amy_t, __pyx_k_amy_t, sizeof(__pyx_k_amy_t), 0, 0, 1, 1},
102932  {&__pyx_n_s_amz, __pyx_k_amz, sizeof(__pyx_k_amz), 0, 0, 1, 1},
102933  {&__pyx_n_s_amz_t, __pyx_k_amz_t, sizeof(__pyx_k_amz_t), 0, 0, 1, 1},
102934  {&__pyx_n_s_anchor, __pyx_k_anchor, sizeof(__pyx_k_anchor), 0, 0, 1, 1},
102935  {&__pyx_n_s_ang, __pyx_k_ang, sizeof(__pyx_k_ang), 0, 0, 1, 1},
102936  {&__pyx_n_s_ang2, __pyx_k_ang2, sizeof(__pyx_k_ang2), 0, 0, 1, 1},
102937  {&__pyx_kp_s_ang2_and_t_should_have_the_same, __pyx_k_ang2_and_t_should_have_the_same, sizeof(__pyx_k_ang2_and_t_should_have_the_same), 0, 0, 1, 0},
102938  {&__pyx_n_s_ang2_vec, __pyx_k_ang2_vec, sizeof(__pyx_k_ang2_vec), 0, 0, 1, 1},
102939  {&__pyx_n_s_ang2ang2, __pyx_k_ang2ang2, sizeof(__pyx_k_ang2ang2), 0, 0, 1, 1},
102940  {&__pyx_n_s_ang3, __pyx_k_ang3, sizeof(__pyx_k_ang3), 0, 0, 1, 1},
102941  {&__pyx_kp_s_ang3_and_t_should_have_the_same, __pyx_k_ang3_and_t_should_have_the_same, sizeof(__pyx_k_ang3_and_t_should_have_the_same), 0, 0, 1, 0},
102942  {&__pyx_n_s_ang3_vec, __pyx_k_ang3_vec, sizeof(__pyx_k_ang3_vec), 0, 0, 1, 1},
102943  {&__pyx_n_s_ang3ang3, __pyx_k_ang3ang3, sizeof(__pyx_k_ang3ang3), 0, 0, 1, 1},
102944  {&__pyx_n_s_ang_acc, __pyx_k_ang_acc, sizeof(__pyx_k_ang_acc), 0, 0, 1, 1},
102945  {&__pyx_n_s_ang_acceleration, __pyx_k_ang_acceleration, sizeof(__pyx_k_ang_acceleration), 0, 0, 1, 1},
102946  {&__pyx_kp_s_ang_and_t_should_have_the_same_l, __pyx_k_ang_and_t_should_have_the_same_l, sizeof(__pyx_k_ang_and_t_should_have_the_same_l), 0, 0, 1, 0},
102947  {&__pyx_n_s_ang_ax, __pyx_k_ang_ax, sizeof(__pyx_k_ang_ax), 0, 0, 1, 1},
102948  {&__pyx_n_s_ang_ay, __pyx_k_ang_ay, sizeof(__pyx_k_ang_ay), 0, 0, 1, 1},
102949  {&__pyx_n_s_ang_az, __pyx_k_ang_az, sizeof(__pyx_k_ang_az), 0, 0, 1, 1},
102950  {&__pyx_n_s_ang_disp, __pyx_k_ang_disp, sizeof(__pyx_k_ang_disp), 0, 0, 1, 1},
102951  {&__pyx_n_s_ang_last, __pyx_k_ang_last, sizeof(__pyx_k_ang_last), 0, 0, 1, 1},
102952  {&__pyx_n_s_ang_ux, __pyx_k_ang_ux, sizeof(__pyx_k_ang_ux), 0, 0, 1, 1},
102953  {&__pyx_n_s_ang_uy, __pyx_k_ang_uy, sizeof(__pyx_k_ang_uy), 0, 0, 1, 1},
102954  {&__pyx_n_s_ang_uz, __pyx_k_ang_uz, sizeof(__pyx_k_ang_uz), 0, 0, 1, 1},
102955  {&__pyx_n_s_ang_vec, __pyx_k_ang_vec, sizeof(__pyx_k_ang_vec), 0, 0, 1, 1},
102956  {&__pyx_n_s_ang_vel, __pyx_k_ang_vel, sizeof(__pyx_k_ang_vel), 0, 0, 1, 1},
102957  {&__pyx_n_s_ang_velocity, __pyx_k_ang_velocity, sizeof(__pyx_k_ang_velocity), 0, 0, 1, 1},
102958  {&__pyx_n_s_angang, __pyx_k_angang, sizeof(__pyx_k_angang), 0, 0, 1, 1},
102959  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
102960  {&__pyx_n_s_ar, __pyx_k_ar, sizeof(__pyx_k_ar), 0, 0, 1, 1},
102961  {&__pyx_n_s_arGrid, __pyx_k_arGrid, sizeof(__pyx_k_arGrid), 0, 0, 1, 1},
102962  {&__pyx_n_s_arGridCollection, __pyx_k_arGridCollection, sizeof(__pyx_k_arGridCollection), 0, 0, 1, 1},
102963  {&__pyx_n_s_arTime, __pyx_k_arTime, sizeof(__pyx_k_arTime), 0, 0, 1, 1},
102964  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
102965  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
102966  {&__pyx_kp_s_array_of_length_of_elements_not, __pyx_k_array_of_length_of_elements_not, sizeof(__pyx_k_array_of_length_of_elements_not), 0, 0, 1, 0},
102967  {&__pyx_kp_s_arrays_are_not_of_same_length, __pyx_k_arrays_are_not_of_same_length, sizeof(__pyx_k_arrays_are_not_of_same_length), 0, 0, 1, 0},
102968  {&__pyx_n_s_attachAuxiliaryVariables, __pyx_k_attachAuxiliaryVariables, sizeof(__pyx_k_attachAuxiliaryVariables), 0, 0, 1, 1},
102969  {&__pyx_n_s_attachBackNodeToBody, __pyx_k_attachBackNodeToBody, sizeof(__pyx_k_attachBackNodeToBody), 0, 0, 1, 1},
102970  {&__pyx_n_s_attachFrontNodeToBody, __pyx_k_attachFrontNodeToBody, sizeof(__pyx_k_attachFrontNodeToBody), 0, 0, 1, 1},
102971  {&__pyx_n_s_attachModel, __pyx_k_attachModel, sizeof(__pyx_k_attachModel), 0, 0, 1, 1},
102972  {&__pyx_n_s_attachNodeToNode, __pyx_k_attachNodeToNode, sizeof(__pyx_k_attachNodeToNode), 0, 0, 1, 1},
102973  {&__pyx_n_s_attachShape, __pyx_k_attachShape, sizeof(__pyx_k_attachShape), 0, 0, 1, 1},
102974  {&__pyx_n_s_attr, __pyx_k_attr, sizeof(__pyx_k_attr), 0, 0, 1, 1},
102975  {&__pyx_n_s_auxiliaryVariables, __pyx_k_auxiliaryVariables, sizeof(__pyx_k_auxiliaryVariables), 0, 0, 1, 1},
102976  {&__pyx_n_s_avDict, __pyx_k_avDict, sizeof(__pyx_k_avDict), 0, 0, 1, 1},
102977  {&__pyx_n_s_ax, __pyx_k_ax, sizeof(__pyx_k_ax), 0, 0, 1, 1},
102978  {&__pyx_n_s_ax_t, __pyx_k_ax_t, sizeof(__pyx_k_ax_t), 0, 0, 1, 1},
102979  {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
102980  {&__pyx_n_s_ay, __pyx_k_ay, sizeof(__pyx_k_ay), 0, 0, 1, 1},
102981  {&__pyx_n_s_ay_t, __pyx_k_ay_t, sizeof(__pyx_k_ay_t), 0, 0, 1, 1},
102982  {&__pyx_n_s_az, __pyx_k_az, sizeof(__pyx_k_az), 0, 0, 1, 1},
102983  {&__pyx_n_s_az_t, __pyx_k_az_t, sizeof(__pyx_k_az_t), 0, 0, 1, 1},
102984  {&__pyx_n_b_backwardEuler, __pyx_k_backwardEuler, sizeof(__pyx_k_backwardEuler), 0, 0, 0, 1},
102985  {&__pyx_n_s_ball_angular_velocity, __pyx_k_ball_angular_velocity, sizeof(__pyx_k_ball_angular_velocity), 0, 0, 1, 1},
102986  {&__pyx_n_s_ball_center, __pyx_k_ball_center, sizeof(__pyx_k_ball_center), 0, 0, 1, 1},
102987  {&__pyx_n_s_ball_radius, __pyx_k_ball_radius, sizeof(__pyx_k_ball_radius), 0, 0, 1, 1},
102988  {&__pyx_n_s_ball_velocity, __pyx_k_ball_velocity, sizeof(__pyx_k_ball_velocity), 0, 0, 1, 1},
102989  {&__pyx_n_s_barrier, __pyx_k_barrier, sizeof(__pyx_k_barrier), 0, 0, 1, 1},
102990  {&__pyx_n_s_barycenter, __pyx_k_barycenter, sizeof(__pyx_k_barycenter), 0, 0, 1, 1},
102991  {&__pyx_n_s_barycenters, __pyx_k_barycenters, sizeof(__pyx_k_barycenters), 0, 0, 1, 1},
102992  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
102993  {&__pyx_n_s_bcast, __pyx_k_bcast, sizeof(__pyx_k_bcast), 0, 0, 1, 1},
102994  {&__pyx_n_s_bd, __pyx_k_bd, sizeof(__pyx_k_bd), 0, 0, 1, 1},
102995  {&__pyx_n_s_beam_type, __pyx_k_beam_type, sizeof(__pyx_k_beam_type), 0, 0, 1, 1},
102996  {&__pyx_n_s_body, __pyx_k_body, sizeof(__pyx_k_body), 0, 0, 1, 1},
102997  {&__pyx_n_s_boolval, __pyx_k_boolval, sizeof(__pyx_k_boolval), 0, 0, 1, 1},
102998  {&__pyx_n_s_buildNodes, __pyx_k_buildNodes, sizeof(__pyx_k_buildNodes), 0, 0, 1, 1},
102999  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
103000  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
103001  {&__pyx_n_s_cKDTree, __pyx_k_cKDTree, sizeof(__pyx_k_cKDTree), 0, 0, 1, 1},
103002  {&__pyx_n_s_cable1, __pyx_k_cable1, sizeof(__pyx_k_cable1), 0, 0, 1, 1},
103003  {&__pyx_n_s_cable2, __pyx_k_cable2, sizeof(__pyx_k_cable2), 0, 0, 1, 1},
103004  {&__pyx_n_s_cable_nb, __pyx_k_cable_nb, sizeof(__pyx_k_cable_nb), 0, 0, 1, 1},
103005  {&__pyx_n_s_calculate, __pyx_k_calculate, sizeof(__pyx_k_calculate), 0, 0, 1, 1},
103006  {&__pyx_n_s_calculate_init, __pyx_k_calculate_init, sizeof(__pyx_k_calculate_init), 0, 0, 1, 1},
103007  {&__pyx_kp_s_call_buildNodes_before_calling_t, __pyx_k_call_buildNodes_before_calling_t, sizeof(__pyx_k_call_buildNodes_before_calling_t), 0, 0, 1, 0},
103008  {&__pyx_n_s_chFM, __pyx_k_chFM, sizeof(__pyx_k_chFM), 0, 0, 1, 1},
103009  {&__pyx_n_s_checkedElements, __pyx_k_checkedElements, sizeof(__pyx_k_checkedElements), 0, 0, 1, 1},
103010  {&__pyx_n_s_chel_connect, __pyx_k_chel_connect, sizeof(__pyx_k_chel_connect), 0, 0, 1, 1},
103011  {&__pyx_n_s_chpos, __pyx_k_chpos, sizeof(__pyx_k_chpos), 0, 0, 1, 1},
103012  {&__pyx_n_s_chrono, __pyx_k_chrono, sizeof(__pyx_k_chrono), 0, 0, 1, 1},
103013  {&__pyx_n_s_chrono_2, __pyx_k_chrono_2, sizeof(__pyx_k_chrono_2), 0, 0, 1, 1},
103014  {&__pyx_n_s_chrono_fea, __pyx_k_chrono_fea, sizeof(__pyx_k_chrono_fea), 0, 0, 1, 1},
103015  {&__pyx_kp_s_chrono_log_body_txt, __pyx_k_chrono_log_body_txt, sizeof(__pyx_k_chrono_log_body_txt), 0, 0, 1, 0},
103016  {&__pyx_kp_s_chrono_log_h5, __pyx_k_chrono_log_h5, sizeof(__pyx_k_chrono_log_h5), 0, 0, 1, 0},
103017  {&__pyx_kp_s_chrono_log_spring_txt, __pyx_k_chrono_log_spring_txt, sizeof(__pyx_k_chrono_log_spring_txt), 0, 0, 1, 0},
103018  {&__pyx_n_s_chvec, __pyx_k_chvec, sizeof(__pyx_k_chvec), 0, 0, 1, 1},
103019  {&__pyx_n_s_chvel, __pyx_k_chvel, sizeof(__pyx_k_chvel), 0, 0, 1, 1},
103020  {&__pyx_n_s_chvel_ang, __pyx_k_chvel_ang, sizeof(__pyx_k_chvel_ang), 0, 0, 1, 1},
103021  {&__pyx_n_s_cinit___locals_genexpr, __pyx_k_cinit___locals_genexpr, sizeof(__pyx_k_cinit___locals_genexpr), 0, 0, 1, 1},
103022  {&__pyx_n_s_cinit___locals_lambda, __pyx_k_cinit___locals_lambda, sizeof(__pyx_k_cinit___locals_lambda), 0, 0, 1, 1},
103023  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
103024  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
103025  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
103026  {&__pyx_n_s_coeff1, __pyx_k_coeff1, sizeof(__pyx_k_coeff1), 0, 0, 1, 1},
103027  {&__pyx_n_s_coefficients, __pyx_k_coefficients, sizeof(__pyx_k_coefficients), 0, 0, 1, 1},
103028  {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
103029  {&__pyx_n_s_collide, __pyx_k_collide, sizeof(__pyx_k_collide), 0, 0, 1, 1},
103030  {&__pyx_n_s_comm, __pyx_k_comm, sizeof(__pyx_k_comm), 0, 0, 1, 1},
103031  {&__pyx_n_s_compression, __pyx_k_compression, sizeof(__pyx_k_compression), 0, 0, 1, 1},
103032  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
103033  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
103034  {&__pyx_n_s_coords, __pyx_k_coords, sizeof(__pyx_k_coords), 0, 0, 1, 1},
103035  {&__pyx_n_s_coords_outside, __pyx_k_coords_outside, sizeof(__pyx_k_coords_outside), 0, 0, 1, 1},
103036  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
103037  {&__pyx_n_s_create_dataset, __pyx_k_create_dataset, sizeof(__pyx_k_create_dataset), 0, 0, 1, 1},
103038  {&__pyx_kp_s_csv, __pyx_k_csv, sizeof(__pyx_k_csv), 0, 0, 1, 0},
103039  {&__pyx_n_s_csv_2, __pyx_k_csv_2, sizeof(__pyx_k_csv_2), 0, 0, 1, 1},
103040  {&__pyx_n_s_csvfile, __pyx_k_csvfile, sizeof(__pyx_k_csvfile), 0, 0, 1, 1},
103041  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
103042  {&__pyx_n_s_d_internal_force, __pyx_k_d_internal_force, sizeof(__pyx_k_d_internal_force), 0, 0, 1, 1},
103043  {&__pyx_n_s_d_rot, __pyx_k_d_rot, sizeof(__pyx_k_d_rot), 0, 0, 1, 1},
103044  {&__pyx_n_s_d_rot_last, __pyx_k_d_rot_last, sizeof(__pyx_k_d_rot_last), 0, 0, 1, 1},
103045  {&__pyx_n_s_d_spring_length, __pyx_k_d_spring_length, sizeof(__pyx_k_d_spring_length), 0, 0, 1, 1},
103046  {&__pyx_n_s_d_spring_velocity, __pyx_k_d_spring_velocity, sizeof(__pyx_k_d_spring_velocity), 0, 0, 1, 1},
103047  {&__pyx_n_s_d_time, __pyx_k_d_time, sizeof(__pyx_k_d_time), 0, 0, 1, 1},
103048  {&__pyx_n_s_d_tra, __pyx_k_d_tra, sizeof(__pyx_k_d_tra), 0, 0, 1, 1},
103049  {&__pyx_n_s_d_tra_last, __pyx_k_d_tra_last, sizeof(__pyx_k_d_tra_last), 0, 0, 1, 1},
103050  {&__pyx_n_s_damping, __pyx_k_damping, sizeof(__pyx_k_damping), 0, 0, 1, 1},
103051  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
103052  {&__pyx_n_s_dataItemFormat, __pyx_k_dataItemFormat, sizeof(__pyx_k_dataItemFormat), 0, 0, 1, 1},
103053  {&__pyx_n_s_datav, __pyx_k_datav, sizeof(__pyx_k_datav), 0, 0, 1, 1},
103054  {&__pyx_n_s_debug, __pyx_k_debug, sizeof(__pyx_k_debug), 0, 0, 1, 1},
103055  {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1},
103056  {&__pyx_n_s_delimiter, __pyx_k_delimiter, sizeof(__pyx_k_delimiter), 0, 0, 1, 1},
103057  {&__pyx_n_s_dens, __pyx_k_dens, sizeof(__pyx_k_dens), 0, 0, 1, 1},
103058  {&__pyx_n_s_density_array, __pyx_k_density_array, sizeof(__pyx_k_density_array), 0, 0, 1, 1},
103059  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
103060  {&__pyx_n_s_dire, __pyx_k_dire, sizeof(__pyx_k_dire), 0, 0, 1, 1},
103061  {&__pyx_n_s_disown, __pyx_k_disown, sizeof(__pyx_k_disown), 0, 0, 1, 1},
103062  {&__pyx_n_s_dist, __pyx_k_dist, sizeof(__pyx_k_dist), 0, 0, 1, 1},
103063  {&__pyx_n_s_dist_search, __pyx_k_dist_search, sizeof(__pyx_k_dist_search), 0, 0, 1, 1},
103064  {&__pyx_n_s_distance, __pyx_k_distance, sizeof(__pyx_k_distance), 0, 0, 1, 1},
103065  {&__pyx_n_s_dm_force, __pyx_k_dm_force, sizeof(__pyx_k_dm_force), 0, 0, 1, 1},
103066  {&__pyx_n_s_dm_position, __pyx_k_dm_position, sizeof(__pyx_k_dm_position), 0, 0, 1, 1},
103067  {&__pyx_n_s_dm_residuals, __pyx_k_dm_residuals, sizeof(__pyx_k_dm_residuals), 0, 0, 1, 1},
103068  {&__pyx_n_s_dm_residuals_h5, __pyx_k_dm_residuals_h5, sizeof(__pyx_k_dm_residuals_h5), 0, 0, 1, 1},
103069  {&__pyx_n_s_dm_rotation, __pyx_k_dm_rotation, sizeof(__pyx_k_dm_rotation), 0, 0, 1, 1},
103070  {&__pyx_n_s_dm_springs, __pyx_k_dm_springs, sizeof(__pyx_k_dm_springs), 0, 0, 1, 1},
103071  {&__pyx_n_s_dm_time, __pyx_k_dm_time, sizeof(__pyx_k_dm_time), 0, 0, 1, 1},
103072  {&__pyx_n_s_dm_torque, __pyx_k_dm_torque, sizeof(__pyx_k_dm_torque), 0, 0, 1, 1},
103073  {&__pyx_n_s_domain, __pyx_k_domain, sizeof(__pyx_k_domain), 0, 0, 1, 1},
103074  {&__pyx_n_s_dot, __pyx_k_dot, sizeof(__pyx_k_dot), 0, 0, 1, 1},
103075  {&__pyx_n_s_drag, __pyx_k_drag, sizeof(__pyx_k_drag), 0, 0, 1, 1},
103076  {&__pyx_n_s_drag_t, __pyx_k_drag_t, sizeof(__pyx_k_drag_t), 0, 0, 1, 1},
103077  {&__pyx_n_s_dragx, __pyx_k_dragx, sizeof(__pyx_k_dragx), 0, 0, 1, 1},
103078  {&__pyx_n_s_dragx_t, __pyx_k_dragx_t, sizeof(__pyx_k_dragx_t), 0, 0, 1, 1},
103079  {&__pyx_n_s_dragy, __pyx_k_dragy, sizeof(__pyx_k_dragy), 0, 0, 1, 1},
103080  {&__pyx_n_s_dragy_t, __pyx_k_dragy_t, sizeof(__pyx_k_dragy_t), 0, 0, 1, 1},
103081  {&__pyx_n_s_dragz, __pyx_k_dragz, sizeof(__pyx_k_dragz), 0, 0, 1, 1},
103082  {&__pyx_n_s_dragz_t, __pyx_k_dragz_t, sizeof(__pyx_k_dragz_t), 0, 0, 1, 1},
103083  {&__pyx_n_s_ds, __pyx_k_ds, sizeof(__pyx_k_ds), 0, 0, 1, 1},
103084  {&__pyx_n_s_dset, __pyx_k_dset, sizeof(__pyx_k_dset), 0, 0, 1, 1},
103085  {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
103086  {&__pyx_n_s_dt_init, __pyx_k_dt_init, sizeof(__pyx_k_dt_init), 0, 0, 1, 1},
103087  {&__pyx_n_s_dt_last, __pyx_k_dt_last, sizeof(__pyx_k_dt_last), 0, 0, 1, 1},
103088  {&__pyx_n_s_dt_next, __pyx_k_dt_next, sizeof(__pyx_k_dt_next), 0, 0, 1, 1},
103089  {&__pyx_n_s_dt_substep, __pyx_k_dt_substep, sizeof(__pyx_k_dt_substep), 0, 0, 1, 1},
103090  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
103091  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
103092  {&__pyx_n_s_e0, __pyx_k_e0, sizeof(__pyx_k_e0), 0, 0, 1, 1},
103093  {&__pyx_n_s_e0_last, __pyx_k_e0_last, sizeof(__pyx_k_e0_last), 0, 0, 1, 1},
103094  {&__pyx_n_s_e1, __pyx_k_e1, sizeof(__pyx_k_e1), 0, 0, 1, 1},
103095  {&__pyx_n_s_e1_last, __pyx_k_e1_last, sizeof(__pyx_k_e1_last), 0, 0, 1, 1},
103096  {&__pyx_n_s_e2, __pyx_k_e2, sizeof(__pyx_k_e2), 0, 0, 1, 1},
103097  {&__pyx_n_s_e2_last, __pyx_k_e2_last, sizeof(__pyx_k_e2_last), 0, 0, 1, 1},
103098  {&__pyx_n_s_e3, __pyx_k_e3, sizeof(__pyx_k_e3), 0, 0, 1, 1},
103099  {&__pyx_n_s_e3_last, __pyx_k_e3_last, sizeof(__pyx_k_e3_last), 0, 0, 1, 1},
103100  {&__pyx_n_s_eN, __pyx_k_eN, sizeof(__pyx_k_eN), 0, 0, 1, 1},
103101  {&__pyx_n_s_eN_guess, __pyx_k_eN_guess, sizeof(__pyx_k_eN_guess), 0, 0, 1, 1},
103102  {&__pyx_n_s_eOffset, __pyx_k_eOffset, sizeof(__pyx_k_eOffset), 0, 0, 1, 1},
103103  {&__pyx_n_s_el, __pyx_k_el, sizeof(__pyx_k_el), 0, 0, 1, 1},
103104  {&__pyx_n_s_el_connect, __pyx_k_el_connect, sizeof(__pyx_k_el_connect), 0, 0, 1, 1},
103105  {&__pyx_n_s_elem, __pyx_k_elem, sizeof(__pyx_k_elem), 0, 0, 1, 1},
103106  {&__pyx_n_s_elemN, __pyx_k_elemN, sizeof(__pyx_k_elemN), 0, 0, 1, 1},
103107  {&__pyx_n_s_element, __pyx_k_element, sizeof(__pyx_k_element), 0, 0, 1, 1},
103108  {&__pyx_n_s_elementMaps, __pyx_k_elementMaps, sizeof(__pyx_k_elementMaps), 0, 0, 1, 1},
103109  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
103110  {&__pyx_n_s_element_connection, __pyx_k_element_connection, sizeof(__pyx_k_element_connection), 0, 0, 1, 1},
103111  {&__pyx_n_s_elements, __pyx_k_elements, sizeof(__pyx_k_elements), 0, 0, 1, 1},
103112  {&__pyx_n_s_elementsSpatial_Domain, __pyx_k_elementsSpatial_Domain, sizeof(__pyx_k_elementsSpatial_Domain), 0, 0, 1, 1},
103113  {&__pyx_n_s_elements_t, __pyx_k_elements_t, sizeof(__pyx_k_elements_t), 0, 0, 1, 1},
103114  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
103115  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
103116  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
103117  {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
103118  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
103119  {&__pyx_n_s_envelope, __pyx_k_envelope, sizeof(__pyx_k_envelope), 0, 0, 1, 1},
103120  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
103121  {&__pyx_n_s_eta, __pyx_k_eta, sizeof(__pyx_k_eta), 0, 0, 1, 1},
103122  {&__pyx_n_s_etas, __pyx_k_etas, sizeof(__pyx_k_etas), 0, 0, 1, 1},
103123  {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
103124  {&__pyx_n_s_exit_2, __pyx_k_exit_2, sizeof(__pyx_k_exit_2), 0, 0, 1, 1},
103125  {&__pyx_n_s_f, __pyx_k_f, sizeof(__pyx_k_f), 0, 0, 1, 1},
103126  {&__pyx_n_s_f_i, __pyx_k_f_i, sizeof(__pyx_k_f_i), 0, 0, 1, 1},
103127  {&__pyx_n_s_facet, __pyx_k_facet, sizeof(__pyx_k_facet), 0, 0, 1, 1},
103128  {&__pyx_n_s_facets, __pyx_k_facets, sizeof(__pyx_k_facets), 0, 0, 1, 1},
103129  {&__pyx_n_s_fairlead, __pyx_k_fairlead, sizeof(__pyx_k_fairlead), 0, 0, 1, 1},
103130  {&__pyx_n_s_fea, __pyx_k_fea, sizeof(__pyx_k_fea), 0, 0, 1, 1},
103131  {&__pyx_n_s_femSpace, __pyx_k_femSpace, sizeof(__pyx_k_femSpace), 0, 0, 1, 1},
103132  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
103133  {&__pyx_n_s_file_name, __pyx_k_file_name, sizeof(__pyx_k_file_name), 0, 0, 1, 1},
103134  {&__pyx_n_s_findElementContainingCoordsDist, __pyx_k_findElementContainingCoordsDist, sizeof(__pyx_k_findElementContainingCoordsDist), 0, 0, 1, 1},
103135  {&__pyx_n_s_findElementContainingCoordsKD, __pyx_k_findElementContainingCoordsKD, sizeof(__pyx_k_findElementContainingCoordsKD), 0, 0, 1, 1},
103136  {&__pyx_kp_s_finished_recording_h5_file_of, __pyx_k_finished_recording_h5_file_of, sizeof(__pyx_k_finished_recording_h5_file_of), 0, 0, 1, 0},
103137  {&__pyx_kp_s_finished_recording_values_file_o, __pyx_k_finished_recording_values_file_o, sizeof(__pyx_k_finished_recording_values_file_o), 0, 0, 1, 0},
103138  {&__pyx_kp_s_finished_recording_xmf_file_of, __pyx_k_finished_recording_xmf_file_of, sizeof(__pyx_k_finished_recording_xmf_file_of), 0, 0, 1, 0},
103139  {&__pyx_kp_s_finished_recording_xml_file_of, __pyx_k_finished_recording_xml_file_of, sizeof(__pyx_k_finished_recording_xml_file_of), 0, 0, 1, 0},
103140  {&__pyx_n_s_fixBackNode, __pyx_k_fixBackNode, sizeof(__pyx_k_fixBackNode), 0, 0, 1, 1},
103141  {&__pyx_n_s_fixFrontNode, __pyx_k_fixFrontNode, sizeof(__pyx_k_fixFrontNode), 0, 0, 1, 1},
103142  {&__pyx_n_s_fixed, __pyx_k_fixed, sizeof(__pyx_k_fixed), 0, 0, 1, 1},
103143  {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
103144  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
103145  {&__pyx_n_s_fluid_acceleration, __pyx_k_fluid_acceleration, sizeof(__pyx_k_fluid_acceleration), 0, 0, 1, 1},
103146  {&__pyx_n_s_fluid_acceleration_array, __pyx_k_fluid_acceleration_array, sizeof(__pyx_k_fluid_acceleration_array), 0, 0, 1, 1},
103147  {&__pyx_n_s_fluid_acceleration_t, __pyx_k_fluid_acceleration_t, sizeof(__pyx_k_fluid_acceleration_t), 0, 0, 1, 1},
103148  {&__pyx_n_s_fluid_ax, __pyx_k_fluid_ax, sizeof(__pyx_k_fluid_ax), 0, 0, 1, 1},
103149  {&__pyx_n_s_fluid_ax_t, __pyx_k_fluid_ax_t, sizeof(__pyx_k_fluid_ax_t), 0, 0, 1, 1},
103150  {&__pyx_n_s_fluid_ay, __pyx_k_fluid_ay, sizeof(__pyx_k_fluid_ay), 0, 0, 1, 1},
103151  {&__pyx_n_s_fluid_ay_t, __pyx_k_fluid_ay_t, sizeof(__pyx_k_fluid_ay_t), 0, 0, 1, 1},
103152  {&__pyx_n_s_fluid_az, __pyx_k_fluid_az, sizeof(__pyx_k_fluid_az), 0, 0, 1, 1},
103153  {&__pyx_n_s_fluid_az_t, __pyx_k_fluid_az_t, sizeof(__pyx_k_fluid_az_t), 0, 0, 1, 1},
103154  {&__pyx_n_s_fluid_density, __pyx_k_fluid_density, sizeof(__pyx_k_fluid_density), 0, 0, 1, 1},
103155  {&__pyx_n_s_fluid_density_array, __pyx_k_fluid_density_array, sizeof(__pyx_k_fluid_density_array), 0, 0, 1, 1},
103156  {&__pyx_n_s_fluid_ux, __pyx_k_fluid_ux, sizeof(__pyx_k_fluid_ux), 0, 0, 1, 1},
103157  {&__pyx_n_s_fluid_ux_t, __pyx_k_fluid_ux_t, sizeof(__pyx_k_fluid_ux_t), 0, 0, 1, 1},
103158  {&__pyx_n_s_fluid_uy, __pyx_k_fluid_uy, sizeof(__pyx_k_fluid_uy), 0, 0, 1, 1},
103159  {&__pyx_n_s_fluid_uy_t, __pyx_k_fluid_uy_t, sizeof(__pyx_k_fluid_uy_t), 0, 0, 1, 1},
103160  {&__pyx_n_s_fluid_uz, __pyx_k_fluid_uz, sizeof(__pyx_k_fluid_uz), 0, 0, 1, 1},
103161  {&__pyx_n_s_fluid_uz_t, __pyx_k_fluid_uz_t, sizeof(__pyx_k_fluid_uz_t), 0, 0, 1, 1},
103162  {&__pyx_n_s_fluid_velocity, __pyx_k_fluid_velocity, sizeof(__pyx_k_fluid_velocity), 0, 0, 1, 1},
103163  {&__pyx_n_s_fluid_velocity_array, __pyx_k_fluid_velocity_array, sizeof(__pyx_k_fluid_velocity_array), 0, 0, 1, 1},
103164  {&__pyx_n_s_fluid_velocity_t, __pyx_k_fluid_velocity_t, sizeof(__pyx_k_fluid_velocity_t), 0, 0, 1, 1},
103165  {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1},
103166  {&__pyx_n_s_forces, __pyx_k_forces, sizeof(__pyx_k_forces), 0, 0, 1, 1},
103167  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
103168  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
103169  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
103170  {&__pyx_n_s_free_r, __pyx_k_free_r, sizeof(__pyx_k_free_r), 0, 0, 1, 1},
103171  {&__pyx_n_s_free_x, __pyx_k_free_x, sizeof(__pyx_k_free_x), 0, 0, 1, 1},
103172  {&__pyx_n_s_function, __pyx_k_function, sizeof(__pyx_k_function), 0, 0, 1, 1},
103173  {&__pyx_n_s_function_position, __pyx_k_function_position, sizeof(__pyx_k_function_position), 0, 0, 1, 1},
103174  {&__pyx_n_s_function_tangent, __pyx_k_function_tangent, sizeof(__pyx_k_function_tangent), 0, 0, 1, 1},
103175  {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
103176  {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
103177  {&__pyx_n_s_geometry, __pyx_k_geometry, sizeof(__pyx_k_geometry), 0, 0, 1, 1},
103178  {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
103179  {&__pyx_n_s_getAddedMassForces, __pyx_k_getAddedMassForces, sizeof(__pyx_k_getAddedMassForces), 0, 0, 1, 1},
103180  {&__pyx_n_s_getChronoObject, __pyx_k_getChronoObject, sizeof(__pyx_k_getChronoObject), 0, 0, 1, 1},
103181  {&__pyx_n_s_getDragForces, __pyx_k_getDragForces, sizeof(__pyx_k_getDragForces), 0, 0, 1, 1},
103182  {&__pyx_n_s_getDynamicSDF, __pyx_k_getDynamicSDF, sizeof(__pyx_k_getDynamicSDF), 0, 0, 1, 1},
103183  {&__pyx_n_s_getFluidVelocityGradientLocalCoo, __pyx_k_getFluidVelocityGradientLocalCoo, sizeof(__pyx_k_getFluidVelocityGradientLocalCoo), 0, 0, 1, 1},
103184  {&__pyx_n_s_getFluidVelocityLocalCoords, __pyx_k_getFluidVelocityLocalCoords, sizeof(__pyx_k_getFluidVelocityLocalCoords), 0, 0, 1, 1},
103185  {&__pyx_n_s_getGradientValue, __pyx_k_getGradientValue, sizeof(__pyx_k_getGradientValue), 0, 0, 1, 1},
103186  {&__pyx_n_s_getGravitationalAcceleration, __pyx_k_getGravitationalAcceleration, sizeof(__pyx_k_getGravitationalAcceleration), 0, 0, 1, 1},
103187  {&__pyx_n_s_getInertia, __pyx_k_getInertia, sizeof(__pyx_k_getInertia), 0, 0, 1, 1},
103188  {&__pyx_n_s_getInverseValue, __pyx_k_getInverseValue, sizeof(__pyx_k_getInverseValue), 0, 0, 1, 1},
103189  {&__pyx_n_s_getLocalElement, __pyx_k_getLocalElement, sizeof(__pyx_k_getLocalElement), 0, 0, 1, 1},
103190  {&__pyx_n_s_getLocalNearestNode, __pyx_k_getLocalNearestNode, sizeof(__pyx_k_getLocalNearestNode), 0, 0, 1, 1},
103191  {&__pyx_n_s_getMass, __pyx_k_getMass, sizeof(__pyx_k_getMass), 0, 0, 1, 1},
103192  {&__pyx_n_s_getMoments, __pyx_k_getMoments, sizeof(__pyx_k_getMoments), 0, 0, 1, 1},
103193  {&__pyx_n_s_getNodesAcceleration, __pyx_k_getNodesAcceleration, sizeof(__pyx_k_getNodesAcceleration), 0, 0, 1, 1},
103194  {&__pyx_n_s_getNodesD, __pyx_k_getNodesD, sizeof(__pyx_k_getNodesD), 0, 0, 1, 1},
103195  {&__pyx_n_s_getNodesPosition, __pyx_k_getNodesPosition, sizeof(__pyx_k_getNodesPosition), 0, 0, 1, 1},
103196  {&__pyx_n_s_getNodesTension, __pyx_k_getNodesTension, sizeof(__pyx_k_getNodesTension), 0, 0, 1, 1},
103197  {&__pyx_n_s_getNodesVelocity, __pyx_k_getNodesVelocity, sizeof(__pyx_k_getNodesVelocity), 0, 0, 1, 1},
103198  {&__pyx_n_s_getPosition, __pyx_k_getPosition, sizeof(__pyx_k_getPosition), 0, 0, 1, 1},
103199  {&__pyx_n_s_getPressureForces, __pyx_k_getPressureForces, sizeof(__pyx_k_getPressureForces), 0, 0, 1, 1},
103200  {&__pyx_n_s_getRotationMatrix, __pyx_k_getRotationMatrix, sizeof(__pyx_k_getRotationMatrix), 0, 0, 1, 1},
103201  {&__pyx_n_s_getShearForces, __pyx_k_getShearForces, sizeof(__pyx_k_getShearForces), 0, 0, 1, 1},
103202  {&__pyx_n_s_getTensionBack, __pyx_k_getTensionBack, sizeof(__pyx_k_getTensionBack), 0, 0, 1, 1},
103203  {&__pyx_n_s_getTensionElement, __pyx_k_getTensionElement, sizeof(__pyx_k_getTensionElement), 0, 0, 1, 1},
103204  {&__pyx_n_s_getTensionFront, __pyx_k_getTensionFront, sizeof(__pyx_k_getTensionFront), 0, 0, 1, 1},
103205  {&__pyx_n_s_getTriangleMeshInfo, __pyx_k_getTriangleMeshInfo, sizeof(__pyx_k_getTriangleMeshInfo), 0, 0, 1, 1},
103206  {&__pyx_n_s_getValue, __pyx_k_getValue, sizeof(__pyx_k_getValue), 0, 0, 1, 1},
103207  {&__pyx_n_s_getValues, __pyx_k_getValues, sizeof(__pyx_k_getValues), 0, 0, 1, 1},
103208  {&__pyx_n_s_getVelocity, __pyx_k_getVelocity, sizeof(__pyx_k_getVelocity), 0, 0, 1, 1},
103209  {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
103210  {&__pyx_n_s_getroot, __pyx_k_getroot, sizeof(__pyx_k_getroot), 0, 0, 1, 1},
103211  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
103212  {&__pyx_n_s_globalMesh, __pyx_k_globalMesh, sizeof(__pyx_k_globalMesh), 0, 0, 1, 1},
103213  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
103214  {&__pyx_n_s_gzip, __pyx_k_gzip, sizeof(__pyx_k_gzip), 0, 0, 1, 1},
103215  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
103216  {&__pyx_kp_b_h5, __pyx_k_h5, sizeof(__pyx_k_h5), 0, 0, 0, 0},
103217  {&__pyx_n_b_h5_2, __pyx_k_h5_2, sizeof(__pyx_k_h5_2), 0, 0, 0, 1},
103218  {&__pyx_kp_s_h5_elementsSpatial_Domain, __pyx_k_h5_elementsSpatial_Domain, sizeof(__pyx_k_h5_elementsSpatial_Domain), 0, 0, 1, 0},
103219  {&__pyx_kp_s_h5_nodesSpatial_Domain, __pyx_k_h5_nodesSpatial_Domain, sizeof(__pyx_k_h5_nodesSpatial_Domain), 0, 0, 1, 0},
103220  {&__pyx_n_s_h5py, __pyx_k_h5py, sizeof(__pyx_k_h5py), 0, 0, 1, 1},
103221  {&__pyx_kp_s_h_ang_predict, __pyx_k_h_ang_predict, sizeof(__pyx_k_h_ang_predict), 0, 0, 1, 0},
103222  {&__pyx_kp_s_h_ang_predict_last, __pyx_k_h_ang_predict_last, sizeof(__pyx_k_h_ang_predict_last), 0, 0, 1, 0},
103223  {&__pyx_kp_s_h_ang_vel_predict, __pyx_k_h_ang_vel_predict, sizeof(__pyx_k_h_ang_vel_predict), 0, 0, 1, 0},
103224  {&__pyx_kp_s_h_ang_vel_predict_last, __pyx_k_h_ang_vel_predict_last, sizeof(__pyx_k_h_ang_vel_predict_last), 0, 0, 1, 0},
103225  {&__pyx_n_s_h_body, __pyx_k_h_body, sizeof(__pyx_k_h_body), 0, 0, 1, 1},
103226  {&__pyx_n_s_h_body_vec, __pyx_k_h_body_vec, sizeof(__pyx_k_h_body_vec), 0, 0, 1, 1},
103227  {&__pyx_kp_s_h_predict, __pyx_k_h_predict, sizeof(__pyx_k_h_predict), 0, 0, 1, 0},
103228  {&__pyx_n_s_h_predict_2, __pyx_k_h_predict_2, sizeof(__pyx_k_h_predict_2), 0, 0, 1, 1},
103229  {&__pyx_kp_s_h_predict_last, __pyx_k_h_predict_last, sizeof(__pyx_k_h_predict_last), 0, 0, 1, 0},
103230  {&__pyx_n_s_hdfFileName, __pyx_k_hdfFileName, sizeof(__pyx_k_hdfFileName), 0, 0, 1, 1},
103231  {&__pyx_n_s_header_x, __pyx_k_header_x, sizeof(__pyx_k_header_x), 0, 0, 1, 1},
103232  {&__pyx_n_s_headers, __pyx_k_headers, sizeof(__pyx_k_headers), 0, 0, 1, 1},
103233  {&__pyx_kp_s_http_www_w3_org_2001_XInclude, __pyx_k_http_www_w3_org_2001_XInclude, sizeof(__pyx_k_http_www_w3_org_2001_XInclude), 0, 0, 1, 0},
103234  {&__pyx_n_s_hx, __pyx_k_hx, sizeof(__pyx_k_hx), 0, 0, 1, 1},
103235  {&__pyx_n_s_hx_rotation, __pyx_k_hx_rotation, sizeof(__pyx_k_hx_rotation), 0, 0, 1, 1},
103236  {&__pyx_n_s_hx_translation, __pyx_k_hx_translation, sizeof(__pyx_k_hx_translation), 0, 0, 1, 1},
103237  {&__pyx_n_s_hxyz, __pyx_k_hxyz, sizeof(__pyx_k_hxyz), 0, 0, 1, 1},
103238  {&__pyx_n_s_hy, __pyx_k_hy, sizeof(__pyx_k_hy), 0, 0, 1, 1},
103239  {&__pyx_n_s_hy_rotation, __pyx_k_hy_rotation, sizeof(__pyx_k_hy_rotation), 0, 0, 1, 1},
103240  {&__pyx_n_s_hy_translation, __pyx_k_hy_translation, sizeof(__pyx_k_hy_translation), 0, 0, 1, 1},
103241  {&__pyx_n_s_hz, __pyx_k_hz, sizeof(__pyx_k_hz), 0, 0, 1, 1},
103242  {&__pyx_n_s_hz_rotation, __pyx_k_hz_rotation, sizeof(__pyx_k_hz_rotation), 0, 0, 1, 1},
103243  {&__pyx_n_s_hz_translation, __pyx_k_hz_translation, sizeof(__pyx_k_hz_translation), 0, 0, 1, 1},
103244  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
103245  {&__pyx_n_s_i8, __pyx_k_i8, sizeof(__pyx_k_i8), 0, 0, 1, 1},
103246  {&__pyx_n_s_i_entry_body, __pyx_k_i_entry_body, sizeof(__pyx_k_i_entry_body), 0, 0, 1, 1},
103247  {&__pyx_n_s_i_entry_linkage, __pyx_k_i_entry_linkage, sizeof(__pyx_k_i_entry_linkage), 0, 0, 1, 1},
103248  {&__pyx_n_s_i_entry_residual, __pyx_k_i_entry_residual, sizeof(__pyx_k_i_entry_residual), 0, 0, 1, 1},
103249  {&__pyx_n_s_i_entry_spring, __pyx_k_i_entry_spring, sizeof(__pyx_k_i_entry_spring), 0, 0, 1, 1},
103250  {&__pyx_kp_s_i_i, __pyx_k_i_i, sizeof(__pyx_k_i_i), 0, 0, 1, 0},
103251  {&__pyx_n_s_i_index, __pyx_k_i_index, sizeof(__pyx_k_i_index), 0, 0, 1, 1},
103252  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
103253  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
103254  {&__pyx_n_s_indentXML, __pyx_k_indentXML, sizeof(__pyx_k_indentXML), 0, 0, 1, 1},
103255  {&__pyx_n_s_iner, __pyx_k_iner, sizeof(__pyx_k_iner), 0, 0, 1, 1},
103256  {&__pyx_n_s_inertia, __pyx_k_inertia, sizeof(__pyx_k_inertia), 0, 0, 1, 1},
103257  {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
103258  {&__pyx_n_s_intertia, __pyx_k_intertia, sizeof(__pyx_k_intertia), 0, 0, 1, 1},
103259  {&__pyx_n_s_inv, __pyx_k_inv, sizeof(__pyx_k_inv), 0, 0, 1, 1},
103260  {&__pyx_n_s_inv_FM, __pyx_k_inv_FM, sizeof(__pyx_k_inv_FM), 0, 0, 1, 1},
103261  {&__pyx_n_s_inv_chFM, __pyx_k_inv_chFM, sizeof(__pyx_k_inv_chFM), 0, 0, 1, 1},
103262  {&__pyx_n_s_is_convex, __pyx_k_is_convex, sizeof(__pyx_k_is_convex), 0, 0, 1, 1},
103263  {&__pyx_kp_s_is_not_of_length_3, __pyx_k_is_not_of_length_3, sizeof(__pyx_k_is_not_of_length_3), 0, 0, 1, 0},
103264  {&__pyx_n_s_is_static, __pyx_k_is_static, sizeof(__pyx_k_is_static), 0, 0, 1, 1},
103265  {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
103266  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
103267  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
103268  {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
103269  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
103270  {&__pyx_n_s_kdtree, __pyx_k_kdtree, sizeof(__pyx_k_kdtree), 0, 0, 1, 1},
103271  {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
103272  {&__pyx_n_s_l_force, __pyx_k_l_force, sizeof(__pyx_k_l_force), 0, 0, 1, 1},
103273  {&__pyx_n_s_l_linklocks, __pyx_k_l_linklocks, sizeof(__pyx_k_l_linklocks), 0, 0, 1, 1},
103274  {&__pyx_n_s_l_logging_info, __pyx_k_l_logging_info, sizeof(__pyx_k_l_logging_info), 0, 0, 1, 1},
103275  {&__pyx_n_s_l_position, __pyx_k_l_position, sizeof(__pyx_k_l_position), 0, 0, 1, 1},
103276  {&__pyx_n_s_l_rotation, __pyx_k_l_rotation, sizeof(__pyx_k_l_rotation), 0, 0, 1, 1},
103277  {&__pyx_n_s_l_spring_data, __pyx_k_l_spring_data, sizeof(__pyx_k_l_spring_data), 0, 0, 1, 1},
103278  {&__pyx_n_s_l_springs, __pyx_k_l_springs, sizeof(__pyx_k_l_springs), 0, 0, 1, 1},
103279  {&__pyx_n_s_l_torque, __pyx_k_l_torque, sizeof(__pyx_k_l_torque), 0, 0, 1, 1},
103280  {&__pyx_n_s_latest, __pyx_k_latest, sizeof(__pyx_k_latest), 0, 0, 1, 1},
103281  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
103282  {&__pyx_n_s_length_array, __pyx_k_length_array, sizeof(__pyx_k_length_array), 0, 0, 1, 1},
103283  {&__pyx_n_s_levelModelList, __pyx_k_levelModelList, sizeof(__pyx_k_levelModelList), 0, 0, 1, 1},
103284  {&__pyx_n_s_libver, __pyx_k_libver, sizeof(__pyx_k_libver), 0, 0, 1, 1},
103285  {&__pyx_n_s_linalg, __pyx_k_linalg, sizeof(__pyx_k_linalg), 0, 0, 1, 1},
103286  {&__pyx_n_s_local_element, __pyx_k_local_element, sizeof(__pyx_k_local_element), 0, 0, 1, 1},
103287  {&__pyx_n_s_logDir, __pyx_k_logDir, sizeof(__pyx_k_logDir), 0, 0, 1, 1},
103288  {&__pyx_n_s_logEvent, __pyx_k_logEvent, sizeof(__pyx_k_logEvent), 0, 0, 1, 1},
103289  {&__pyx_n_s_log_bodies_h5, __pyx_k_log_bodies_h5, sizeof(__pyx_k_log_bodies_h5), 0, 0, 1, 1},
103290  {&__pyx_n_s_log_bodies_text, __pyx_k_log_bodies_text, sizeof(__pyx_k_log_bodies_text), 0, 0, 1, 1},
103291  {&__pyx_n_s_log_residuals_h5, __pyx_k_log_residuals_h5, sizeof(__pyx_k_log_residuals_h5), 0, 0, 1, 1},
103292  {&__pyx_n_s_log_residuals_text, __pyx_k_log_residuals_text, sizeof(__pyx_k_log_residuals_text), 0, 0, 1, 1},
103293  {&__pyx_n_s_log_springs_h5, __pyx_k_log_springs_h5, sizeof(__pyx_k_log_springs_h5), 0, 0, 1, 1},
103294  {&__pyx_n_s_log_springs_text, __pyx_k_log_springs_text, sizeof(__pyx_k_log_springs_text), 0, 0, 1, 1},
103295  {&__pyx_n_s_log_times_h5, __pyx_k_log_times_h5, sizeof(__pyx_k_log_times_h5), 0, 0, 1, 1},
103296  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
103297  {&__pyx_n_s_margin, __pyx_k_margin, sizeof(__pyx_k_margin), 0, 0, 1, 1},
103298  {&__pyx_n_s_mass, __pyx_k_mass, sizeof(__pyx_k_mass), 0, 0, 1, 1},
103299  {&__pyx_n_s_mat, __pyx_k_mat, sizeof(__pyx_k_mat), 0, 0, 1, 1},
103300  {&__pyx_n_s_mat332array, __pyx_k_mat332array, sizeof(__pyx_k_mat332array), 0, 0, 1, 1},
103301  {&__pyx_n_s_matp, __pyx_k_matp, sizeof(__pyx_k_matp), 0, 0, 1, 1},
103302  {&__pyx_n_s_maxshape, __pyx_k_maxshape, sizeof(__pyx_k_maxshape), 0, 0, 1, 1},
103303  {&__pyx_n_s_mbd_CouplingFSI, __pyx_k_mbd_CouplingFSI, sizeof(__pyx_k_mbd_CouplingFSI), 0, 0, 1, 1},
103304  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
103305  {&__pyx_n_s_mesh, __pyx_k_mesh, sizeof(__pyx_k_mesh), 0, 0, 1, 1},
103306  {&__pyx_n_s_mesh_search, __pyx_k_mesh_search, sizeof(__pyx_k_mesh_search), 0, 0, 1, 1},
103307  {&__pyx_n_s_mg, __pyx_k_mg, sizeof(__pyx_k_mg), 0, 0, 1, 1},
103308  {&__pyx_n_s_mm, __pyx_k_mm, sizeof(__pyx_k_mm), 0, 0, 1, 1},
103309  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
103310  {&__pyx_n_s_model, __pyx_k_model, sizeof(__pyx_k_model), 0, 0, 1, 1},
103311  {&__pyx_n_s_moments, __pyx_k_moments, sizeof(__pyx_k_moments), 0, 0, 1, 1},
103312  {&__pyx_n_b_mooring, __pyx_k_mooring, sizeof(__pyx_k_mooring), 0, 0, 0, 1},
103313  {&__pyx_n_s_mpi4py, __pyx_k_mpi4py, sizeof(__pyx_k_mpi4py), 0, 0, 1, 1},
103314  {&__pyx_n_s_my_instance, __pyx_k_my_instance, sizeof(__pyx_k_my_instance), 0, 0, 1, 1},
103315  {&__pyx_n_s_mycpp_ptr, __pyx_k_mycpp_ptr, sizeof(__pyx_k_mycpp_ptr), 0, 0, 1, 1},
103316  {&__pyx_n_s_nB, __pyx_k_nB, sizeof(__pyx_k_nB), 0, 0, 1, 1},
103317  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
103318  {&__pyx_n_s_nNodes_owned, __pyx_k_nNodes_owned, sizeof(__pyx_k_nNodes_owned), 0, 0, 1, 1},
103319  {&__pyx_n_s_nP, __pyx_k_nP, sizeof(__pyx_k_nP), 0, 0, 1, 1},
103320  {&__pyx_n_s_nParticles, __pyx_k_nParticles, sizeof(__pyx_k_nParticles), 0, 0, 1, 1},
103321  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
103322  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
103323  {&__pyx_n_s_nb, __pyx_k_nb, sizeof(__pyx_k_nb), 0, 0, 1, 1},
103324  {&__pyx_n_s_nb_elems, __pyx_k_nb_elems, sizeof(__pyx_k_nb_elems), 0, 0, 1, 1},
103325  {&__pyx_n_s_nb_nodes, __pyx_k_nb_nodes, sizeof(__pyx_k_nb_nodes), 0, 0, 1, 1},
103326  {&__pyx_n_s_nb_steps, __pyx_k_nb_steps, sizeof(__pyx_k_nb_steps), 0, 0, 1, 1},
103327  {&__pyx_n_s_nd, __pyx_k_nd, sizeof(__pyx_k_nd), 0, 0, 1, 1},
103328  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
103329  {&__pyx_n_s_nearest_node, __pyx_k_nearest_node, sizeof(__pyx_k_nearest_node), 0, 0, 1, 1},
103330  {&__pyx_n_s_nearest_node_distance, __pyx_k_nearest_node_distance, sizeof(__pyx_k_nearest_node_distance), 0, 0, 1, 1},
103331  {&__pyx_n_s_netForces_p, __pyx_k_netForces_p, sizeof(__pyx_k_netForces_p), 0, 0, 1, 1},
103332  {&__pyx_n_s_netForces_v, __pyx_k_netForces_v, sizeof(__pyx_k_netForces_v), 0, 0, 1, 1},
103333  {&__pyx_n_s_netMoments, __pyx_k_netMoments, sizeof(__pyx_k_netMoments), 0, 0, 1, 1},
103334  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
103335  {&__pyx_n_s_new_quat, __pyx_k_new_quat, sizeof(__pyx_k_new_quat), 0, 0, 1, 1},
103336  {&__pyx_n_s_new_rank, __pyx_k_new_rank, sizeof(__pyx_k_new_rank), 0, 0, 1, 1},
103337  {&__pyx_n_s_new_vec, __pyx_k_new_vec, sizeof(__pyx_k_new_vec), 0, 0, 1, 1},
103338  {&__pyx_n_s_new_x, __pyx_k_new_x, sizeof(__pyx_k_new_x), 0, 0, 1, 1},
103339  {&__pyx_kp_s_no_Shape_was_defined_for_making, __pyx_k_no_Shape_was_defined_for_making, sizeof(__pyx_k_no_Shape_was_defined_for_making), 0, 0, 1, 0},
103340  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
103341  {&__pyx_n_s_node, __pyx_k_node, sizeof(__pyx_k_node), 0, 0, 1, 1},
103342  {&__pyx_n_s_node1, __pyx_k_node1, sizeof(__pyx_k_node1), 0, 0, 1, 1},
103343  {&__pyx_n_s_node2, __pyx_k_node2, sizeof(__pyx_k_node2), 0, 0, 1, 1},
103344  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
103345  {&__pyx_n_s_nodeElementOffsets, __pyx_k_nodeElementOffsets, sizeof(__pyx_k_nodeElementOffsets), 0, 0, 1, 1},
103346  {&__pyx_n_s_nodeElementsArray, __pyx_k_nodeElementsArray, sizeof(__pyx_k_nodeElementsArray), 0, 0, 1, 1},
103347  {&__pyx_n_s_nodeN, __pyx_k_nodeN, sizeof(__pyx_k_nodeN), 0, 0, 1, 1},
103348  {&__pyx_n_s_nodeNumbering_subdomain2global, __pyx_k_nodeNumbering_subdomain2global, sizeof(__pyx_k_nodeNumbering_subdomain2global), 0, 0, 1, 1},
103349  {&__pyx_n_s_nodeOffsets_subdomain_owned, __pyx_k_nodeOffsets_subdomain_owned, sizeof(__pyx_k_nodeOffsets_subdomain_owned), 0, 0, 1, 1},
103350  {&__pyx_n_s_nodeStarArray, __pyx_k_nodeStarArray, sizeof(__pyx_k_nodeStarArray), 0, 0, 1, 1},
103351  {&__pyx_n_s_nodeStarOffsets, __pyx_k_nodeStarOffsets, sizeof(__pyx_k_nodeStarOffsets), 0, 0, 1, 1},
103352  {&__pyx_n_s_node_guess, __pyx_k_node_guess, sizeof(__pyx_k_node_guess), 0, 0, 1, 1},
103353  {&__pyx_n_s_node_nb_global, __pyx_k_node_nb_global, sizeof(__pyx_k_node_nb_global), 0, 0, 1, 1},
103354  {&__pyx_n_s_nodes, __pyx_k_nodes, sizeof(__pyx_k_nodes), 0, 0, 1, 1},
103355  {&__pyx_n_s_nodesSpatial_Domain, __pyx_k_nodesSpatial_Domain, sizeof(__pyx_k_nodesSpatial_Domain), 0, 0, 1, 1},
103356  {&__pyx_n_s_nodes_t, __pyx_k_nodes_t, sizeof(__pyx_k_nodes_t), 0, 0, 1, 1},
103357  {&__pyx_n_s_norm, __pyx_k_norm, sizeof(__pyx_k_norm), 0, 0, 1, 1},
103358  {&__pyx_n_s_normal, __pyx_k_normal, sizeof(__pyx_k_normal), 0, 0, 1, 1},
103359  {&__pyx_kp_s_not_a_valid_choice, __pyx_k_not_a_valid_choice, sizeof(__pyx_k_not_a_valid_choice), 0, 0, 1, 0},
103360  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
103361  {&__pyx_kp_s_number_of_RANS_particles_nP_numb, __pyx_k_number_of_RANS_particles_nP_numb, sizeof(__pyx_k_number_of_RANS_particles_nP_numb), 0, 0, 1, 0},
103362  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
103363  {&__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},
103364  {&__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},
103365  {&__pyx_n_s_o_body, __pyx_k_o_body, sizeof(__pyx_k_o_body), 0, 0, 1, 1},
103366  {&__pyx_n_s_o_body_force, __pyx_k_o_body_force, sizeof(__pyx_k_o_body_force), 0, 0, 1, 1},
103367  {&__pyx_n_s_o_body_position, __pyx_k_o_body_position, sizeof(__pyx_k_o_body_position), 0, 0, 1, 1},
103368  {&__pyx_n_s_o_body_rotation, __pyx_k_o_body_rotation, sizeof(__pyx_k_o_body_rotation), 0, 0, 1, 1},
103369  {&__pyx_n_s_o_body_torque, __pyx_k_o_body_torque, sizeof(__pyx_k_o_body_torque), 0, 0, 1, 1},
103370  {&__pyx_n_s_o_file, __pyx_k_o_file, sizeof(__pyx_k_o_file), 0, 0, 1, 1},
103371  {&__pyx_n_s_o_linkage_residual, __pyx_k_o_linkage_residual, sizeof(__pyx_k_o_linkage_residual), 0, 0, 1, 1},
103372  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
103373  {&__pyx_n_s_onElement, __pyx_k_onElement, sizeof(__pyx_k_onElement), 0, 0, 1, 1},
103374  {&__pyx_n_s_op, __pyx_k_op, sizeof(__pyx_k_op), 0, 0, 1, 1},
103375  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
103376  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
103377  {&__pyx_n_s_owning_proc, __pyx_k_owning_proc, sizeof(__pyx_k_owning_proc), 0, 0, 1, 1},
103378  {&__pyx_n_s_owning_rank, __pyx_k_owning_rank, sizeof(__pyx_k_owning_rank), 0, 0, 1, 1},
103379  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
103380  {&__pyx_n_s_particle_Aij, __pyx_k_particle_Aij, sizeof(__pyx_k_particle_Aij), 0, 0, 1, 1},
103381  {&__pyx_n_s_particle_netForces, __pyx_k_particle_netForces, sizeof(__pyx_k_particle_netForces), 0, 0, 1, 1},
103382  {&__pyx_n_s_particle_netMoments, __pyx_k_particle_netMoments, sizeof(__pyx_k_particle_netMoments), 0, 0, 1, 1},
103383  {&__pyx_n_s_particle_sdfList, __pyx_k_particle_sdfList, sizeof(__pyx_k_particle_sdfList), 0, 0, 1, 1},
103384  {&__pyx_n_s_particle_velocityList, __pyx_k_particle_velocityList, sizeof(__pyx_k_particle_velocityList), 0, 0, 1, 1},
103385  {&__pyx_n_s_patchBoundaryNodes, __pyx_k_patchBoundaryNodes, sizeof(__pyx_k_patchBoundaryNodes), 0, 0, 1, 1},
103386  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
103387  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
103388  {&__pyx_n_s_pivot, __pyx_k_pivot, sizeof(__pyx_k_pivot), 0, 0, 1, 1},
103389  {&__pyx_n_s_points, __pyx_k_points, sizeof(__pyx_k_points), 0, 0, 1, 1},
103390  {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
103391  {&__pyx_kp_s_pos_body, __pyx_k_pos_body, sizeof(__pyx_k_pos_body), 0, 0, 1, 0},
103392  {&__pyx_n_s_pos_last, __pyx_k_pos_last, sizeof(__pyx_k_pos_last), 0, 0, 1, 1},
103393  {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1},
103394  {&__pyx_n_s_positions, __pyx_k_positions, sizeof(__pyx_k_positions), 0, 0, 1, 1},
103395  {&__pyx_n_s_poss, __pyx_k_poss, sizeof(__pyx_k_poss), 0, 0, 1, 1},
103396  {&__pyx_n_s_poststep, __pyx_k_poststep, sizeof(__pyx_k_poststep), 0, 0, 1, 1},
103397  {&__pyx_n_s_posx, __pyx_k_posx, sizeof(__pyx_k_posx), 0, 0, 1, 1},
103398  {&__pyx_n_s_posx_last, __pyx_k_posx_last, sizeof(__pyx_k_posx_last), 0, 0, 1, 1},
103399  {&__pyx_n_s_posy, __pyx_k_posy, sizeof(__pyx_k_posy), 0, 0, 1, 1},
103400  {&__pyx_n_s_posy_last, __pyx_k_posy_last, sizeof(__pyx_k_posy_last), 0, 0, 1, 1},
103401  {&__pyx_n_s_posz, __pyx_k_posz, sizeof(__pyx_k_posz), 0, 0, 1, 1},
103402  {&__pyx_n_s_posz_last, __pyx_k_posz_last, sizeof(__pyx_k_posz_last), 0, 0, 1, 1},
103403  {&__pyx_n_s_prediction, __pyx_k_prediction, sizeof(__pyx_k_prediction), 0, 0, 1, 1},
103404  {&__pyx_n_s_prestep, __pyx_k_prestep, sizeof(__pyx_k_prestep), 0, 0, 1, 1},
103405  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
103406  {&__pyx_n_s_pris1, __pyx_k_pris1, sizeof(__pyx_k_pris1), 0, 0, 1, 1},
103407  {&__pyx_n_s_pris2, __pyx_k_pris2, sizeof(__pyx_k_pris2), 0, 0, 1, 1},
103408  {&__pyx_n_s_proteus, __pyx_k_proteus, sizeof(__pyx_k_proteus), 0, 0, 1, 1},
103409  {&__pyx_n_s_proteus_Archiver, __pyx_k_proteus_Archiver, sizeof(__pyx_k_proteus_Archiver), 0, 0, 1, 1},
103410  {&__pyx_n_s_proteus_dt, __pyx_k_proteus_dt, sizeof(__pyx_k_proteus_dt), 0, 0, 1, 1},
103411  {&__pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_k_proteus_mbd_CouplingFSI_pyx, sizeof(__pyx_k_proteus_mbd_CouplingFSI_pyx), 0, 0, 1, 0},
103412  {&__pyx_n_s_proteus_mprans, __pyx_k_proteus_mprans, sizeof(__pyx_k_proteus_mprans), 0, 0, 1, 1},
103413  {&__pyx_n_s_pt_to_shp, __pyx_k_pt_to_shp, sizeof(__pyx_k_pt_to_shp), 0, 0, 1, 1},
103414  {&__pyx_n_s_pychrono, __pyx_k_pychrono, sizeof(__pyx_k_pychrono), 0, 0, 1, 1},
103415  {&__pyx_n_s_pymat332array, __pyx_k_pymat332array, sizeof(__pyx_k_pymat332array), 0, 0, 1, 1},
103416  {&__pyx_n_s_pyquat2array, __pyx_k_pyquat2array, sizeof(__pyx_k_pyquat2array), 0, 0, 1, 1},
103417  {&__pyx_n_s_pyvec2array, __pyx_k_pyvec2array, sizeof(__pyx_k_pyvec2array), 0, 0, 1, 1},
103418  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
103419  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
103420  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
103421  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
103422  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
103423  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
103424  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
103425  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
103426  {&__pyx_n_s_quat, __pyx_k_quat, sizeof(__pyx_k_quat), 0, 0, 1, 1},
103427  {&__pyx_n_s_quat2array, __pyx_k_quat2array, sizeof(__pyx_k_quat2array), 0, 0, 1, 1},
103428  {&__pyx_n_s_query, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1},
103429  {&__pyx_n_s_radiusIBM, __pyx_k_radiusIBM, sizeof(__pyx_k_radiusIBM), 0, 0, 1, 1},
103430  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
103431  {&__pyx_n_s_rank, __pyx_k_rank, sizeof(__pyx_k_rank), 0, 0, 1, 1},
103432  {&__pyx_n_s_rank_guess, __pyx_k_rank_guess, sizeof(__pyx_k_rank_guess), 0, 0, 1, 1},
103433  {&__pyx_n_s_rank_owning, __pyx_k_rank_owning, sizeof(__pyx_k_rank_owning), 0, 0, 1, 1},
103434  {&__pyx_n_s_rank_owning_previous, __pyx_k_rank_owning_previous, sizeof(__pyx_k_rank_owning_previous), 0, 0, 1, 1},
103435  {&__pyx_n_s_record, __pyx_k_record, sizeof(__pyx_k_record), 0, 0, 1, 1},
103436  {&__pyx_n_s_recordH5, __pyx_k_recordH5, sizeof(__pyx_k_recordH5), 0, 0, 1, 1},
103437  {&__pyx_n_s_recordStrainEta, __pyx_k_recordStrainEta, sizeof(__pyx_k_recordStrainEta), 0, 0, 1, 1},
103438  {&__pyx_n_s_recordValues, __pyx_k_recordValues, sizeof(__pyx_k_recordValues), 0, 0, 1, 1},
103439  {&__pyx_n_s_recordValues_locals_record, __pyx_k_recordValues_locals_record, sizeof(__pyx_k_recordValues_locals_record), 0, 0, 1, 1},
103440  {&__pyx_n_s_recordXML, __pyx_k_recordXML, sizeof(__pyx_k_recordXML), 0, 0, 1, 1},
103441  {&__pyx_n_s_record_file, __pyx_k_record_file, sizeof(__pyx_k_record_file), 0, 0, 1, 1},
103442  {&__pyx_kp_s_recording_h5_file_of, __pyx_k_recording_h5_file_of, sizeof(__pyx_k_recording_h5_file_of), 0, 0, 1, 0},
103443  {&__pyx_kp_s_recording_values_file_of, __pyx_k_recording_values_file_of, sizeof(__pyx_k_recording_values_file_of), 0, 0, 1, 0},
103444  {&__pyx_kp_s_recording_xml_file_of, __pyx_k_recording_xml_file_of, sizeof(__pyx_k_recording_xml_file_of), 0, 0, 1, 0},
103445  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
103446  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
103447  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
103448  {&__pyx_n_s_referenceElement, __pyx_k_referenceElement, sizeof(__pyx_k_referenceElement), 0, 0, 1, 1},
103449  {&__pyx_n_s_relative_x, __pyx_k_relative_x, sizeof(__pyx_k_relative_x), 0, 0, 1, 1},
103450  {&__pyx_n_s_residuals, __pyx_k_residuals, sizeof(__pyx_k_residuals), 0, 0, 1, 1},
103451  {&__pyx_n_s_resize, __pyx_k_resize, sizeof(__pyx_k_resize), 0, 0, 1, 1},
103452  {&__pyx_n_s_rest_length, __pyx_k_rest_length, sizeof(__pyx_k_rest_length), 0, 0, 1, 1},
103453  {&__pyx_n_s_rho, __pyx_k_rho, sizeof(__pyx_k_rho), 0, 0, 1, 1},
103454  {&__pyx_n_b_rigidbody, __pyx_k_rigidbody, sizeof(__pyx_k_rigidbody), 0, 0, 0, 1},
103455  {&__pyx_n_s_root, __pyx_k_root, sizeof(__pyx_k_root), 0, 0, 1, 1},
103456  {&__pyx_n_s_rot, __pyx_k_rot, sizeof(__pyx_k_rot), 0, 0, 1, 1},
103457  {&__pyx_n_s_rotMarrT_big, __pyx_k_rotMarrT_big, sizeof(__pyx_k_rotMarrT_big), 0, 0, 1, 1},
103458  {&__pyx_n_s_rotMarr_big, __pyx_k_rotMarr_big, sizeof(__pyx_k_rotMarr_big), 0, 0, 1, 1},
103459  {&__pyx_n_s_rotation, __pyx_k_rotation, sizeof(__pyx_k_rotation), 0, 0, 1, 1},
103460  {&__pyx_n_s_rotation3D, __pyx_k_rotation3D, sizeof(__pyx_k_rotation3D), 0, 0, 1, 1},
103461  {&__pyx_n_s_rotch, __pyx_k_rotch, sizeof(__pyx_k_rotch), 0, 0, 1, 1},
103462  {&__pyx_n_s_rotq, __pyx_k_rotq, sizeof(__pyx_k_rotq), 0, 0, 1, 1},
103463  {&__pyx_n_s_rotq_e0, __pyx_k_rotq_e0, sizeof(__pyx_k_rotq_e0), 0, 0, 1, 1},
103464  {&__pyx_n_s_rotq_e1, __pyx_k_rotq_e1, sizeof(__pyx_k_rotq_e1), 0, 0, 1, 1},
103465  {&__pyx_n_s_rotq_e2, __pyx_k_rotq_e2, sizeof(__pyx_k_rotq_e2), 0, 0, 1, 1},
103466  {&__pyx_n_s_rotq_e3, __pyx_k_rotq_e3, sizeof(__pyx_k_rotq_e3), 0, 0, 1, 1},
103467  {&__pyx_n_s_rotq_last, __pyx_k_rotq_last, sizeof(__pyx_k_rotq_last), 0, 0, 1, 1},
103468  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
103469  {&__pyx_n_s_rx, __pyx_k_rx, sizeof(__pyx_k_rx), 0, 0, 1, 1},
103470  {&__pyx_n_s_ry, __pyx_k_ry, sizeof(__pyx_k_ry), 0, 0, 1, 1},
103471  {&__pyx_n_s_rz, __pyx_k_rz, sizeof(__pyx_k_rz), 0, 0, 1, 1},
103472  {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1},
103473  {&__pyx_n_s_s_filename, __pyx_k_s_filename, sizeof(__pyx_k_s_filename), 0, 0, 1, 1},
103474  {&__pyx_n_s_s_residuals, __pyx_k_s_residuals, sizeof(__pyx_k_s_residuals), 0, 0, 1, 1},
103475  {&__pyx_n_s_sampleRate, __pyx_k_sampleRate, sizeof(__pyx_k_sampleRate), 0, 0, 1, 1},
103476  {&__pyx_n_s_scheme, __pyx_k_scheme, sizeof(__pyx_k_scheme), 0, 0, 1, 1},
103477  {&__pyx_n_s_scipy, __pyx_k_scipy, sizeof(__pyx_k_scipy), 0, 0, 1, 1},
103478  {&__pyx_n_s_sdfIBM, __pyx_k_sdfIBM, sizeof(__pyx_k_sdfIBM), 0, 0, 1, 1},
103479  {&__pyx_n_s_segment_nb, __pyx_k_segment_nb, sizeof(__pyx_k_segment_nb), 0, 0, 1, 1},
103480  {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
103481  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
103482  {&__pyx_n_s_setAddedMass, __pyx_k_setAddedMass, sizeof(__pyx_k_setAddedMass), 0, 0, 1, 1},
103483  {&__pyx_n_s_setAddedMassCoefficients, __pyx_k_setAddedMassCoefficients, sizeof(__pyx_k_setAddedMassCoefficients), 0, 0, 1, 1},
103484  {&__pyx_n_s_setApplyAddedMass, __pyx_k_setApplyAddedMass, sizeof(__pyx_k_setApplyAddedMass), 0, 0, 1, 1},
103485  {&__pyx_n_s_setApplyBuoyancy, __pyx_k_setApplyBuoyancy, sizeof(__pyx_k_setApplyBuoyancy), 0, 0, 1, 1},
103486  {&__pyx_n_s_setApplyDrag, __pyx_k_setApplyDrag, sizeof(__pyx_k_setApplyDrag), 0, 0, 1, 1},
103487  {&__pyx_n_s_setBoundaryFlags, __pyx_k_setBoundaryFlags, sizeof(__pyx_k_setBoundaryFlags), 0, 0, 1, 1},
103488  {&__pyx_n_s_setCollisionEnvelopeMargin, __pyx_k_setCollisionEnvelopeMargin, sizeof(__pyx_k_setCollisionEnvelopeMargin), 0, 0, 1, 1},
103489  {&__pyx_n_s_setCollisionOptions, __pyx_k_setCollisionOptions, sizeof(__pyx_k_setCollisionOptions), 0, 0, 1, 1},
103490  {&__pyx_n_s_setConstraints, __pyx_k_setConstraints, sizeof(__pyx_k_setConstraints), 0, 0, 1, 1},
103491  {&__pyx_n_s_setContactMaterial, __pyx_k_setContactMaterial, sizeof(__pyx_k_setContactMaterial), 0, 0, 1, 1},
103492  {&__pyx_n_s_setCouplingScheme, __pyx_k_setCouplingScheme, sizeof(__pyx_k_setCouplingScheme), 0, 0, 1, 1},
103493  {&__pyx_n_s_setDragCoefficients, __pyx_k_setDragCoefficients, sizeof(__pyx_k_setDragCoefficients), 0, 0, 1, 1},
103494  {&__pyx_n_s_setExternalForces, __pyx_k_setExternalForces, sizeof(__pyx_k_setExternalForces), 0, 0, 1, 1},
103495  {&__pyx_n_s_setFluidAccelerationAtNodes, __pyx_k_setFluidAccelerationAtNodes, sizeof(__pyx_k_setFluidAccelerationAtNodes), 0, 0, 1, 1},
103496  {&__pyx_n_s_setFluidDensityAtNodes, __pyx_k_setFluidDensityAtNodes, sizeof(__pyx_k_setFluidDensityAtNodes), 0, 0, 1, 1},
103497  {&__pyx_n_s_setFluidVelocityAtNodes, __pyx_k_setFluidVelocityAtNodes, sizeof(__pyx_k_setFluidVelocityAtNodes), 0, 0, 1, 1},
103498  {&__pyx_n_s_setFluidVelocityFunction, __pyx_k_setFluidVelocityFunction, sizeof(__pyx_k_setFluidVelocityFunction), 0, 0, 1, 1},
103499  {&__pyx_n_s_setGravitationalAcceleration, __pyx_k_setGravitationalAcceleration, sizeof(__pyx_k_setGravitationalAcceleration), 0, 0, 1, 1},
103500  {&__pyx_n_s_setIBM, __pyx_k_setIBM, sizeof(__pyx_k_setIBM), 0, 0, 1, 1},
103501  {&__pyx_n_s_setInertiaXX, __pyx_k_setInertiaXX, sizeof(__pyx_k_setInertiaXX), 0, 0, 1, 1},
103502  {&__pyx_n_s_setInertiaXY, __pyx_k_setInertiaXY, sizeof(__pyx_k_setInertiaXY), 0, 0, 1, 1},
103503  {&__pyx_n_s_setInitialRot, __pyx_k_setInitialRot, sizeof(__pyx_k_setInitialRot), 0, 0, 1, 1},
103504  {&__pyx_n_s_setIyy, __pyx_k_setIyy, sizeof(__pyx_k_setIyy), 0, 0, 1, 1},
103505  {&__pyx_n_s_setMass, __pyx_k_setMass, sizeof(__pyx_k_setMass), 0, 0, 1, 1},
103506  {&__pyx_n_s_setMinimumSubsteps, __pyx_k_setMinimumSubsteps, sizeof(__pyx_k_setMinimumSubsteps), 0, 0, 1, 1},
103507  {&__pyx_n_s_setName, __pyx_k_setName, sizeof(__pyx_k_setName), 0, 0, 1, 1},
103508  {&__pyx_n_s_setNodesPosition, __pyx_k_setNodesPosition, sizeof(__pyx_k_setNodesPosition), 0, 0, 1, 1},
103509  {&__pyx_n_s_setNodesPositionFunction, __pyx_k_setNodesPositionFunction, sizeof(__pyx_k_setNodesPositionFunction), 0, 0, 1, 1},
103510  {&__pyx_n_s_setPosition, __pyx_k_setPosition, sizeof(__pyx_k_setPosition), 0, 0, 1, 1},
103511  {&__pyx_n_s_setPrescribedMotion, __pyx_k_setPrescribedMotion, sizeof(__pyx_k_setPrescribedMotion), 0, 0, 1, 1},
103512  {&__pyx_n_s_setPrescribedMotionCustom, __pyx_k_setPrescribedMotionCustom, sizeof(__pyx_k_setPrescribedMotionCustom), 0, 0, 1, 1},
103513  {&__pyx_n_s_setPrescribedMotionPoly, __pyx_k_setPrescribedMotionPoly, sizeof(__pyx_k_setPrescribedMotionPoly), 0, 0, 1, 1},
103514  {&__pyx_n_s_setPrescribedMotionSine, __pyx_k_setPrescribedMotionSine, sizeof(__pyx_k_setPrescribedMotionSine), 0, 0, 1, 1},
103515  {&__pyx_n_s_setRecordValues, __pyx_k_setRecordValues, sizeof(__pyx_k_setRecordValues), 0, 0, 1, 1},
103516  {&__pyx_n_s_setRestLengthPerElement, __pyx_k_setRestLengthPerElement, sizeof(__pyx_k_setRestLengthPerElement), 0, 0, 1, 1},
103517  {&__pyx_n_s_setSampleRate, __pyx_k_setSampleRate, sizeof(__pyx_k_setSampleRate), 0, 0, 1, 1},
103518  {&__pyx_n_s_setTimeStep, __pyx_k_setTimeStep, sizeof(__pyx_k_setTimeStep), 0, 0, 1, 1},
103519  {&__pyx_n_s_setTimestepperType, __pyx_k_setTimestepperType, sizeof(__pyx_k_setTimestepperType), 0, 0, 1, 1},
103520  {&__pyx_n_s_setVelocity, __pyx_k_setVelocity, sizeof(__pyx_k_setVelocity), 0, 0, 1, 1},
103521  {&__pyx_n_s_setWidth2D, __pyx_k_setWidth2D, sizeof(__pyx_k_setWidth2D), 0, 0, 1, 1},
103522  {&__pyx_kp_s_set_element_type, __pyx_k_set_element_type, sizeof(__pyx_k_set_element_type), 0, 0, 1, 0},
103523  {&__pyx_n_s_setitem, __pyx_k_setitem, sizeof(__pyx_k_setitem), 0, 0, 1, 1},
103524  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
103525  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
103526  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
103527  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
103528  {&__pyx_n_s_spatial, __pyx_k_spatial, sizeof(__pyx_k_spatial), 0, 0, 1, 1},
103529  {&__pyx_n_s_special_dtype, __pyx_k_special_dtype, sizeof(__pyx_k_special_dtype), 0, 0, 1, 1},
103530  {&__pyx_n_s_sphereswept_thickness, __pyx_k_sphereswept_thickness, sizeof(__pyx_k_sphereswept_thickness), 0, 0, 1, 1},
103531  {&__pyx_n_s_springs, __pyx_k_springs, sizeof(__pyx_k_springs), 0, 0, 1, 1},
103532  {&__pyx_n_s_sqrt, __pyx_k_sqrt, sizeof(__pyx_k_sqrt), 0, 0, 1, 1},
103533  {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1},
103534  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
103535  {&__pyx_n_s_startTime, __pyx_k_startTime, sizeof(__pyx_k_startTime), 0, 0, 1, 1},
103536  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
103537  {&__pyx_n_s_stepController, __pyx_k_stepController, sizeof(__pyx_k_stepController), 0, 0, 1, 1},
103538  {&__pyx_n_s_stiffness, __pyx_k_stiffness, sizeof(__pyx_k_stiffness), 0, 0, 1, 1},
103539  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
103540  {&__pyx_n_s_storeValues, __pyx_k_storeValues, sizeof(__pyx_k_storeValues), 0, 0, 1, 1},
103541  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
103542  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
103543  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
103544  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
103545  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
103546  {&__pyx_n_s_subcomponent, __pyx_k_subcomponent, sizeof(__pyx_k_subcomponent), 0, 0, 1, 1},
103547  {&__pyx_kp_s_substeps, __pyx_k_substeps, sizeof(__pyx_k_substeps), 0, 0, 1, 0},
103548  {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
103549  {&__pyx_n_s_swig_obj, __pyx_k_swig_obj, sizeof(__pyx_k_swig_obj), 0, 0, 1, 1},
103550  {&__pyx_n_s_sx, __pyx_k_sx, sizeof(__pyx_k_sx), 0, 0, 1, 1},
103551  {&__pyx_n_s_sy, __pyx_k_sy, sizeof(__pyx_k_sy), 0, 0, 1, 1},
103552  {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
103553  {&__pyx_n_s_system, __pyx_k_system, sizeof(__pyx_k_system), 0, 0, 1, 1},
103554  {&__pyx_n_s_sz, __pyx_k_sz, sizeof(__pyx_k_sz), 0, 0, 1, 1},
103555  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
103556  {&__pyx_n_s_tCount, __pyx_k_tCount, sizeof(__pyx_k_tCount), 0, 0, 1, 1},
103557  {&__pyx_n_s_t_2, __pyx_k_t_2, sizeof(__pyx_k_t_2), 0, 0, 1, 1},
103558  {&__pyx_n_s_t_ch, __pyx_k_t_ch, sizeof(__pyx_k_t_ch), 0, 0, 1, 1},
103559  {&__pyx_n_s_t_chrono, __pyx_k_t_chrono, sizeof(__pyx_k_t_chrono), 0, 0, 1, 1},
103560  {&__pyx_kp_s_t_csv, __pyx_k_t_csv, sizeof(__pyx_k_t_csv), 0, 0, 1, 0},
103561  {&__pyx_n_s_t_last, __pyx_k_t_last, sizeof(__pyx_k_t_last), 0, 0, 1, 1},
103562  {&__pyx_n_s_t_max, __pyx_k_t_max, sizeof(__pyx_k_t_max), 0, 0, 1, 1},
103563  {&__pyx_n_s_t_model_last, __pyx_k_t_model_last, sizeof(__pyx_k_t_model_last), 0, 0, 1, 1},
103564  {&__pyx_n_s_t_sim, __pyx_k_t_sim, sizeof(__pyx_k_t_sim), 0, 0, 1, 1},
103565  {&__pyx_n_s_t_t, __pyx_k_t_t, sizeof(__pyx_k_t_t), 0, 0, 1, 1},
103566  {&__pyx_n_s_t_vec, __pyx_k_t_vec, sizeof(__pyx_k_t_vec), 0, 0, 1, 1},
103567  {&__pyx_n_s_take_shape_name, __pyx_k_take_shape_name, sizeof(__pyx_k_take_shape_name), 0, 0, 1, 1},
103568  {&__pyx_n_s_tangential, __pyx_k_tangential, sizeof(__pyx_k_tangential), 0, 0, 1, 1},
103569  {&__pyx_n_s_tangents, __pyx_k_tangents, sizeof(__pyx_k_tangents), 0, 0, 1, 1},
103570  {&__pyx_kp_s_tens_csv, __pyx_k_tens_csv, sizeof(__pyx_k_tens_csv), 0, 0, 1, 0},
103571  {&__pyx_n_s_tensions, __pyx_k_tensions, sizeof(__pyx_k_tensions), 0, 0, 1, 1},
103572  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
103573  {&__pyx_n_s_text, __pyx_k_text, sizeof(__pyx_k_text), 0, 0, 1, 1},
103574  {&__pyx_n_s_this, __pyx_k_this, sizeof(__pyx_k_this), 0, 0, 1, 1},
103575  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
103576  {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
103577  {&__pyx_n_s_tompi4py, __pyx_k_tompi4py, sizeof(__pyx_k_tompi4py), 0, 0, 1, 1},
103578  {&__pyx_n_s_topology, __pyx_k_topology, sizeof(__pyx_k_topology), 0, 0, 1, 1},
103579  {&__pyx_n_s_torque, __pyx_k_torque, sizeof(__pyx_k_torque), 0, 0, 1, 1},
103580  {&__pyx_n_s_tostring, __pyx_k_tostring, sizeof(__pyx_k_tostring), 0, 0, 1, 1},
103581  {&__pyx_n_s_tree, __pyx_k_tree, sizeof(__pyx_k_tree), 0, 0, 1, 1},
103582  {&__pyx_n_s_tstype, __pyx_k_tstype, sizeof(__pyx_k_tstype), 0, 0, 1, 1},
103583  {&__pyx_n_s_tstypes, __pyx_k_tstypes, sizeof(__pyx_k_tstypes), 0, 0, 1, 1},
103584  {&__pyx_n_s_tt, __pyx_k_tt, sizeof(__pyx_k_tt), 0, 0, 1, 1},
103585  {&__pyx_kp_s_txt, __pyx_k_txt, sizeof(__pyx_k_txt), 0, 0, 1, 0},
103586  {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
103587  {&__pyx_n_s_u_grad, __pyx_k_u_grad, sizeof(__pyx_k_u_grad), 0, 0, 1, 1},
103588  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
103589  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
103590  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
103591  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
103592  {&__pyx_n_s_updateForces, __pyx_k_updateForces, sizeof(__pyx_k_updateForces), 0, 0, 1, 1},
103593  {&__pyx_n_s_updateIBM, __pyx_k_updateIBM, sizeof(__pyx_k_updateIBM), 0, 0, 1, 1},
103594  {&__pyx_n_s_updateIBM_locals_lambda, __pyx_k_updateIBM_locals_lambda, sizeof(__pyx_k_updateIBM_locals_lambda), 0, 0, 1, 1},
103595  {&__pyx_n_s_updated_global, __pyx_k_updated_global, sizeof(__pyx_k_updated_global), 0, 0, 1, 1},
103596  {&__pyx_n_s_useIBM, __pyx_k_useIBM, sizeof(__pyx_k_useIBM), 0, 0, 1, 1},
103597  {&__pyx_n_s_use_ball_as_particle, __pyx_k_use_ball_as_particle, sizeof(__pyx_k_use_ball_as_particle), 0, 0, 1, 1},
103598  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
103599  {&__pyx_n_s_ux, __pyx_k_ux, sizeof(__pyx_k_ux), 0, 0, 1, 1},
103600  {&__pyx_n_s_ux_t, __pyx_k_ux_t, sizeof(__pyx_k_ux_t), 0, 0, 1, 1},
103601  {&__pyx_n_s_uy, __pyx_k_uy, sizeof(__pyx_k_uy), 0, 0, 1, 1},
103602  {&__pyx_n_s_uy_t, __pyx_k_uy_t, sizeof(__pyx_k_uy_t), 0, 0, 1, 1},
103603  {&__pyx_n_s_uz, __pyx_k_uz, sizeof(__pyx_k_uz), 0, 0, 1, 1},
103604  {&__pyx_n_s_uz_t, __pyx_k_uz_t, sizeof(__pyx_k_uz_t), 0, 0, 1, 1},
103605  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
103606  {&__pyx_n_s_v_grad, __pyx_k_v_grad, sizeof(__pyx_k_v_grad), 0, 0, 1, 1},
103607  {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
103608  {&__pyx_n_s_values_towrite, __pyx_k_values_towrite, sizeof(__pyx_k_values_towrite), 0, 0, 1, 1},
103609  {&__pyx_n_s_vec, __pyx_k_vec, sizeof(__pyx_k_vec), 0, 0, 1, 1},
103610  {&__pyx_n_s_vec2array, __pyx_k_vec2array, sizeof(__pyx_k_vec2array), 0, 0, 1, 1},
103611  {&__pyx_n_s_vel, __pyx_k_vel, sizeof(__pyx_k_vel), 0, 0, 1, 1},
103612  {&__pyx_n_s_vel_arr, __pyx_k_vel_arr, sizeof(__pyx_k_vel_arr), 0, 0, 1, 1},
103613  {&__pyx_n_s_vel_grad_arr, __pyx_k_vel_grad_arr, sizeof(__pyx_k_vel_grad_arr), 0, 0, 1, 1},
103614  {&__pyx_n_s_velocity, __pyx_k_velocity, sizeof(__pyx_k_velocity), 0, 0, 1, 1},
103615  {&__pyx_n_s_velocity_array, __pyx_k_velocity_array, sizeof(__pyx_k_velocity_array), 0, 0, 1, 1},
103616  {&__pyx_n_s_velocity_t, __pyx_k_velocity_t, sizeof(__pyx_k_velocity_t), 0, 0, 1, 1},
103617  {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
103618  {&__pyx_n_s_vertices, __pyx_k_vertices, sizeof(__pyx_k_vertices), 0, 0, 1, 1},
103619  {&__pyx_n_s_vlen, __pyx_k_vlen, sizeof(__pyx_k_vlen), 0, 0, 1, 1},
103620  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
103621  {&__pyx_n_s_w_grad, __pyx_k_w_grad, sizeof(__pyx_k_w_grad), 0, 0, 1, 1},
103622  {&__pyx_kp_s_was_already_attached, __pyx_k_was_already_attached, sizeof(__pyx_k_was_already_attached), 0, 0, 1, 0},
103623  {&__pyx_n_s_wb, __pyx_k_wb, sizeof(__pyx_k_wb), 0, 0, 1, 1},
103624  {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
103625  {&__pyx_kp_s_with_dt, __pyx_k_with_dt, sizeof(__pyx_k_with_dt), 0, 0, 1, 0},
103626  {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
103627  {&__pyx_n_s_writer, __pyx_k_writer, sizeof(__pyx_k_writer), 0, 0, 1, 1},
103628  {&__pyx_n_s_writerow, __pyx_k_writerow, sizeof(__pyx_k_writerow), 0, 0, 1, 1},
103629  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
103630  {&__pyx_n_s_x0, __pyx_k_x0, sizeof(__pyx_k_x0), 0, 0, 1, 1},
103631  {&__pyx_n_s_x1, __pyx_k_x1, sizeof(__pyx_k_x1), 0, 0, 1, 1},
103632  {&__pyx_n_s_x2, __pyx_k_x2, sizeof(__pyx_k_x2), 0, 0, 1, 1},
103633  {&__pyx_kp_s_x_2, __pyx_k_x_2, sizeof(__pyx_k_x_2), 0, 0, 1, 0},
103634  {&__pyx_kp_s_x_and_t_should_have_the_same_len, __pyx_k_x_and_t_should_have_the_same_len, sizeof(__pyx_k_x_and_t_should_have_the_same_len), 0, 0, 1, 0},
103635  {&__pyx_kp_s_x_body, __pyx_k_x_body, sizeof(__pyx_k_x_body), 0, 0, 1, 0},
103636  {&__pyx_kp_s_x_new_rot, __pyx_k_x_new_rot, sizeof(__pyx_k_x_new_rot), 0, 0, 1, 0},
103637  {&__pyx_kp_s_x_new_trarot, __pyx_k_x_new_trarot, sizeof(__pyx_k_x_new_trarot), 0, 0, 1, 0},
103638  {&__pyx_kp_s_x_old, __pyx_k_x_old, sizeof(__pyx_k_x_old), 0, 0, 1, 0},
103639  {&__pyx_n_s_x_vec, __pyx_k_x_vec, sizeof(__pyx_k_x_vec), 0, 0, 1, 1},
103640  {&__pyx_n_s_xi, __pyx_k_xi, sizeof(__pyx_k_xi), 0, 0, 1, 1},
103641  {&__pyx_kp_b_xmf, __pyx_k_xmf, sizeof(__pyx_k_xmf), 0, 0, 0, 0},
103642  {&__pyx_kp_s_xmf, __pyx_k_xmf, sizeof(__pyx_k_xmf), 0, 0, 1, 0},
103643  {&__pyx_n_s_xmlFile, __pyx_k_xmlFile, sizeof(__pyx_k_xmlFile), 0, 0, 1, 1},
103644  {&__pyx_n_s_xmlHeader, __pyx_k_xmlHeader, sizeof(__pyx_k_xmlHeader), 0, 0, 1, 1},
103645  {&__pyx_n_s_xml_etree_ElementTree, __pyx_k_xml_etree_ElementTree, sizeof(__pyx_k_xml_etree_ElementTree), 0, 0, 1, 1},
103646  {&__pyx_kp_s_xml_version_1_0_DOCTYPE_Xdmf_SY, __pyx_k_xml_version_1_0_DOCTYPE_Xdmf_SY, sizeof(__pyx_k_xml_version_1_0_DOCTYPE_Xdmf_SY), 0, 0, 1, 0},
103647  {&__pyx_kp_s_xmlns_xi, __pyx_k_xmlns_xi, sizeof(__pyx_k_xmlns_xi), 0, 0, 1, 0},
103648  {&__pyx_n_s_xx, __pyx_k_xx, sizeof(__pyx_k_xx), 0, 0, 1, 1},
103649  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
103650  {&__pyx_n_s_y0, __pyx_k_y0, sizeof(__pyx_k_y0), 0, 0, 1, 1},
103651  {&__pyx_n_s_y1, __pyx_k_y1, sizeof(__pyx_k_y1), 0, 0, 1, 1},
103652  {&__pyx_n_s_y2, __pyx_k_y2, sizeof(__pyx_k_y2), 0, 0, 1, 1},
103653  {&__pyx_kp_s_y_and_t_should_have_the_same_len, __pyx_k_y_and_t_should_have_the_same_len, sizeof(__pyx_k_y_and_t_should_have_the_same_len), 0, 0, 1, 0},
103654  {&__pyx_n_s_y_vec, __pyx_k_y_vec, sizeof(__pyx_k_y_vec), 0, 0, 1, 1},
103655  {&__pyx_n_s_yy, __pyx_k_yy, sizeof(__pyx_k_yy), 0, 0, 1, 1},
103656  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
103657  {&__pyx_n_s_z0, __pyx_k_z0, sizeof(__pyx_k_z0), 0, 0, 1, 1},
103658  {&__pyx_n_s_z1, __pyx_k_z1, sizeof(__pyx_k_z1), 0, 0, 1, 1},
103659  {&__pyx_n_s_z2, __pyx_k_z2, sizeof(__pyx_k_z2), 0, 0, 1, 1},
103660  {&__pyx_kp_s_z_and_t_should_have_the_same_len, __pyx_k_z_and_t_should_have_the_same_len, sizeof(__pyx_k_z_and_t_should_have_the_same_len), 0, 0, 1, 0},
103661  {&__pyx_n_s_z_vec, __pyx_k_z_vec, sizeof(__pyx_k_z_vec), 0, 0, 1, 1},
103662  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
103663  {&__pyx_n_s_zeros_like, __pyx_k_zeros_like, sizeof(__pyx_k_zeros_like), 0, 0, 1, 1},
103664  {&__pyx_n_s_zz, __pyx_k_zz, sizeof(__pyx_k_zz), 0, 0, 1, 1},
103665  {0, 0, 0, 0, 0, 0, 0}
103666 };
103667 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
103668  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 155, __pyx_L1_error)
103669  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 250, __pyx_L1_error)
103670  __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 1257, __pyx_L1_error)
103671  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
103672  __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 1966, __pyx_L1_error)
103673  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 945, __pyx_L1_error)
103674  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 133, __pyx_L1_error)
103675  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 148, __pyx_L1_error)
103676  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(1, 404, __pyx_L1_error)
103677  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(1, 613, __pyx_L1_error)
103678  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(1, 832, __pyx_L1_error)
103679  return 0;
103680  __pyx_L1_error:;
103681  return -1;
103682 }
103683 
103684 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
103685  __Pyx_RefNannyDeclarations
103686  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
103687 
103688  /* "mbd/CouplingFSI.pyx":103
103689  * self.h_ang_vel_predict_last = np.zeros(3)
103690  * self.predicted = False
103691  * self.adams_vel = np.zeros((5, 3)) # <<<<<<<<<<<<<<
103692  * self.Aij = np.zeros((6, 6)) # added mass array
103693  * self.applyAddedMass = True # will apply added mass in Chrono calculations if True
103694  */
103695  __pyx_tuple_ = PyTuple_Pack(2, __pyx_int_5, __pyx_int_3); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 103, __pyx_L1_error)
103696  __Pyx_GOTREF(__pyx_tuple_);
103697  __Pyx_GIVEREF(__pyx_tuple_);
103698 
103699  /* "mbd/CouplingFSI.pyx":104
103700  * self.predicted = False
103701  * self.adams_vel = np.zeros((5, 3))
103702  * self.Aij = np.zeros((6, 6)) # added mass array # <<<<<<<<<<<<<<
103703  * self.applyAddedMass = True # will apply added mass in Chrono calculations if True
103704  * self.useIBM = False
103705  */
103706  __pyx_tuple__2 = PyTuple_Pack(2, __pyx_int_6, __pyx_int_6); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 104, __pyx_L1_error)
103707  __Pyx_GOTREF(__pyx_tuple__2);
103708  __Pyx_GIVEREF(__pyx_tuple__2);
103709 
103710  /* "mbd/CouplingFSI.pyx":110
103711  * self.Aij_updated_global = False
103712  * self.Aij_transform_local = False
103713  * self.boundaryFlags = np.empty(0, 'i') # <<<<<<<<<<<<<<
103714  * self.setName(b'rigidbody')
103715  *
103716  */
103717  __pyx_tuple__3 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_i); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 110, __pyx_L1_error)
103718  __Pyx_GOTREF(__pyx_tuple__3);
103719  __Pyx_GIVEREF(__pyx_tuple__3);
103720 
103721  /* "mbd/CouplingFSI.pyx":547
103722  * # store Aij in global frame
103723  * cdef np.ndarray Aij_global = np.zeros((6, 6))
103724  * Aij_global[:] = Aij[:] # <<<<<<<<<<<<<<
103725  * # transform Aij in local frame
103726  * if self.Aij_updated_global is True and self.Aij_transform_local is True:
103727  */
103728  __pyx_slice__30 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 547, __pyx_L1_error)
103729  __Pyx_GOTREF(__pyx_slice__30);
103730  __Pyx_GIVEREF(__pyx_slice__30);
103731 
103732  /* "mbd/CouplingFSI.pyx":568
103733  * self.Aij[:] = Aij
103734  * # remove terms from restrained DOFs
103735  * self.Aij[0, 1:] *= self.thisptr.free_x.x() # <<<<<<<<<<<<<<
103736  * self.Aij[1, 0] *= self.thisptr.free_x.y()
103737  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
103738  */
103739  __pyx_slice__31 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 568, __pyx_L1_error)
103740  __Pyx_GOTREF(__pyx_slice__31);
103741  __Pyx_GIVEREF(__pyx_slice__31);
103742  __pyx_tuple__32 = PyTuple_Pack(2, __pyx_int_0, __pyx_slice__31); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 568, __pyx_L1_error)
103743  __Pyx_GOTREF(__pyx_tuple__32);
103744  __Pyx_GIVEREF(__pyx_tuple__32);
103745 
103746  /* "mbd/CouplingFSI.pyx":569
103747  * # remove terms from restrained DOFs
103748  * self.Aij[0, 1:] *= self.thisptr.free_x.x()
103749  * self.Aij[1, 0] *= self.thisptr.free_x.y() # <<<<<<<<<<<<<<
103750  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
103751  * self.Aij[2, :2] *= self.thisptr.free_x.z()
103752  */
103753  __pyx_tuple__33 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_0); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 569, __pyx_L1_error)
103754  __Pyx_GOTREF(__pyx_tuple__33);
103755  __Pyx_GIVEREF(__pyx_tuple__33);
103756 
103757  /* "mbd/CouplingFSI.pyx":570
103758  * self.Aij[0, 1:] *= self.thisptr.free_x.x()
103759  * self.Aij[1, 0] *= self.thisptr.free_x.y()
103760  * self.Aij[1, 2:] *= self.thisptr.free_x.y() # <<<<<<<<<<<<<<
103761  * self.Aij[2, :2] *= self.thisptr.free_x.z()
103762  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
103763  */
103764  __pyx_slice__34 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__34)) __PYX_ERR(0, 570, __pyx_L1_error)
103765  __Pyx_GOTREF(__pyx_slice__34);
103766  __Pyx_GIVEREF(__pyx_slice__34);
103767  __pyx_tuple__35 = PyTuple_Pack(2, __pyx_int_1, __pyx_slice__34); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 570, __pyx_L1_error)
103768  __Pyx_GOTREF(__pyx_tuple__35);
103769  __Pyx_GIVEREF(__pyx_tuple__35);
103770 
103771  /* "mbd/CouplingFSI.pyx":571
103772  * self.Aij[1, 0] *= self.thisptr.free_x.y()
103773  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
103774  * self.Aij[2, :2] *= self.thisptr.free_x.z() # <<<<<<<<<<<<<<
103775  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
103776  * self.Aij[3, :3] *= self.thisptr.free_r.x()
103777  */
103778  __pyx_slice__36 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__36)) __PYX_ERR(0, 571, __pyx_L1_error)
103779  __Pyx_GOTREF(__pyx_slice__36);
103780  __Pyx_GIVEREF(__pyx_slice__36);
103781  __pyx_tuple__37 = PyTuple_Pack(2, __pyx_int_2, __pyx_slice__36); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 571, __pyx_L1_error)
103782  __Pyx_GOTREF(__pyx_tuple__37);
103783  __Pyx_GIVEREF(__pyx_tuple__37);
103784 
103785  /* "mbd/CouplingFSI.pyx":572
103786  * self.Aij[1, 2:] *= self.thisptr.free_x.y()
103787  * self.Aij[2, :2] *= self.thisptr.free_x.z()
103788  * self.Aij[2, 3:] *= self.thisptr.free_x.z() # <<<<<<<<<<<<<<
103789  * self.Aij[3, :3] *= self.thisptr.free_r.x()
103790  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
103791  */
103792  __pyx_slice__38 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__38)) __PYX_ERR(0, 572, __pyx_L1_error)
103793  __Pyx_GOTREF(__pyx_slice__38);
103794  __Pyx_GIVEREF(__pyx_slice__38);
103795  __pyx_tuple__39 = PyTuple_Pack(2, __pyx_int_2, __pyx_slice__38); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 572, __pyx_L1_error)
103796  __Pyx_GOTREF(__pyx_tuple__39);
103797  __Pyx_GIVEREF(__pyx_tuple__39);
103798 
103799  /* "mbd/CouplingFSI.pyx":573
103800  * self.Aij[2, :2] *= self.thisptr.free_x.z()
103801  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
103802  * self.Aij[3, :3] *= self.thisptr.free_r.x() # <<<<<<<<<<<<<<
103803  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
103804  * self.Aij[4, :4] *= self.thisptr.free_r.y()
103805  */
103806  __pyx_slice__40 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__40)) __PYX_ERR(0, 573, __pyx_L1_error)
103807  __Pyx_GOTREF(__pyx_slice__40);
103808  __Pyx_GIVEREF(__pyx_slice__40);
103809  __pyx_tuple__41 = PyTuple_Pack(2, __pyx_int_3, __pyx_slice__40); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 573, __pyx_L1_error)
103810  __Pyx_GOTREF(__pyx_tuple__41);
103811  __Pyx_GIVEREF(__pyx_tuple__41);
103812 
103813  /* "mbd/CouplingFSI.pyx":574
103814  * self.Aij[2, 3:] *= self.thisptr.free_x.z()
103815  * self.Aij[3, :3] *= self.thisptr.free_r.x()
103816  * self.Aij[3, 4:] *= self.thisptr.free_r.x() # <<<<<<<<<<<<<<
103817  * self.Aij[4, :4] *= self.thisptr.free_r.y()
103818  * self.Aij[4, 5] *= self.thisptr.free_r.y()
103819  */
103820  __pyx_slice__42 = PySlice_New(__pyx_int_4, Py_None, Py_None); if (unlikely(!__pyx_slice__42)) __PYX_ERR(0, 574, __pyx_L1_error)
103821  __Pyx_GOTREF(__pyx_slice__42);
103822  __Pyx_GIVEREF(__pyx_slice__42);
103823  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_int_3, __pyx_slice__42); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 574, __pyx_L1_error)
103824  __Pyx_GOTREF(__pyx_tuple__43);
103825  __Pyx_GIVEREF(__pyx_tuple__43);
103826 
103827  /* "mbd/CouplingFSI.pyx":575
103828  * self.Aij[3, :3] *= self.thisptr.free_r.x()
103829  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
103830  * self.Aij[4, :4] *= self.thisptr.free_r.y() # <<<<<<<<<<<<<<
103831  * self.Aij[4, 5] *= self.thisptr.free_r.y()
103832  * self.Aij[5, :5] *= self.thisptr.free_r.z()
103833  */
103834  __pyx_slice__44 = PySlice_New(Py_None, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 575, __pyx_L1_error)
103835  __Pyx_GOTREF(__pyx_slice__44);
103836  __Pyx_GIVEREF(__pyx_slice__44);
103837  __pyx_tuple__45 = PyTuple_Pack(2, __pyx_int_4, __pyx_slice__44); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 575, __pyx_L1_error)
103838  __Pyx_GOTREF(__pyx_tuple__45);
103839  __Pyx_GIVEREF(__pyx_tuple__45);
103840 
103841  /* "mbd/CouplingFSI.pyx":576
103842  * self.Aij[3, 4:] *= self.thisptr.free_r.x()
103843  * self.Aij[4, :4] *= self.thisptr.free_r.y()
103844  * self.Aij[4, 5] *= self.thisptr.free_r.y() # <<<<<<<<<<<<<<
103845  * self.Aij[5, :5] *= self.thisptr.free_r.z()
103846  * # mass matrix
103847  */
103848  __pyx_tuple__46 = PyTuple_Pack(2, __pyx_int_4, __pyx_int_5); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 576, __pyx_L1_error)
103849  __Pyx_GOTREF(__pyx_tuple__46);
103850  __Pyx_GIVEREF(__pyx_tuple__46);
103851 
103852  /* "mbd/CouplingFSI.pyx":577
103853  * self.Aij[4, :4] *= self.thisptr.free_r.y()
103854  * self.Aij[4, 5] *= self.thisptr.free_r.y()
103855  * self.Aij[5, :5] *= self.thisptr.free_r.z() # <<<<<<<<<<<<<<
103856  * # mass matrix
103857  * MM[0,0] = mass
103858  */
103859  __pyx_slice__47 = PySlice_New(Py_None, __pyx_int_5, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 577, __pyx_L1_error)
103860  __Pyx_GOTREF(__pyx_slice__47);
103861  __Pyx_GIVEREF(__pyx_slice__47);
103862  __pyx_tuple__48 = PyTuple_Pack(2, __pyx_int_5, __pyx_slice__47); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 577, __pyx_L1_error)
103863  __Pyx_GOTREF(__pyx_tuple__48);
103864  __Pyx_GIVEREF(__pyx_tuple__48);
103865 
103866  /* "mbd/CouplingFSI.pyx":579
103867  * self.Aij[5, :5] *= self.thisptr.free_r.z()
103868  * # mass matrix
103869  * MM[0,0] = mass # <<<<<<<<<<<<<<
103870  * MM[1,1] = mass
103871  * MM[2,2] = mass
103872  */
103873  __pyx_tuple__49 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 579, __pyx_L1_error)
103874  __Pyx_GOTREF(__pyx_tuple__49);
103875  __Pyx_GIVEREF(__pyx_tuple__49);
103876 
103877  /* "mbd/CouplingFSI.pyx":580
103878  * # mass matrix
103879  * MM[0,0] = mass
103880  * MM[1,1] = mass # <<<<<<<<<<<<<<
103881  * MM[2,2] = mass
103882  * for i in range(3):
103883  */
103884  __pyx_tuple__50 = PyTuple_Pack(2, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 580, __pyx_L1_error)
103885  __Pyx_GOTREF(__pyx_tuple__50);
103886  __Pyx_GIVEREF(__pyx_tuple__50);
103887 
103888  /* "mbd/CouplingFSI.pyx":581
103889  * MM[0,0] = mass
103890  * MM[1,1] = mass
103891  * MM[2,2] = mass # <<<<<<<<<<<<<<
103892  * for i in range(3):
103893  * for j in range(3):
103894  */
103895  __pyx_tuple__51 = PyTuple_Pack(2, __pyx_int_2, __pyx_int_2); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 581, __pyx_L1_error)
103896  __Pyx_GOTREF(__pyx_tuple__51);
103897  __Pyx_GIVEREF(__pyx_tuple__51);
103898 
103899  /* "mbd/CouplingFSI.pyx":1257
103900  * for key in self.record_dict:
103901  * headers += [key]
103902  * with open(record_file+'.csv', 'w') as csvfile: # <<<<<<<<<<<<<<
103903  * writer = csv.writer(csvfile, delimiter=',')
103904  * writer.writerow(headers)
103905  */
103906  __pyx_tuple__88 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 1257, __pyx_L1_error)
103907  __Pyx_GOTREF(__pyx_tuple__88);
103908  __Pyx_GIVEREF(__pyx_tuple__88);
103909 
103910  /* "mbd/CouplingFSI.pyx":1377
103911  * datav = ET.tostring(arGrid)
103912  * dset = f.create_dataset('Mesh_Spatial_Domain_'+str(tCount),
103913  * (1,), # <<<<<<<<<<<<<<
103914  * dtype=h5py.special_dtype(vlen=str))
103915  * dset[0] = datav
103916  */
103917  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 1377, __pyx_L1_error)
103918  __Pyx_GOTREF(__pyx_tuple__91);
103919  __Pyx_GIVEREF(__pyx_tuple__91);
103920 
103921  /* "(tree fragment)":2
103922  * def __reduce_cython__(self):
103923  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
103924  * def __setstate_cython__(self, __pyx_state):
103925  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
103926  */
103927  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 2, __pyx_L1_error)
103928  __Pyx_GOTREF(__pyx_tuple__96);
103929  __Pyx_GIVEREF(__pyx_tuple__96);
103930 
103931  /* "(tree fragment)":4
103932  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
103933  * def __setstate_cython__(self, __pyx_state):
103934  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
103935  */
103936  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 4, __pyx_L1_error)
103937  __Pyx_GOTREF(__pyx_tuple__98);
103938  __Pyx_GIVEREF(__pyx_tuple__98);
103939 
103940  /* "mbd/CouplingFSI.pyx":1660
103941  * Profiling.logEvent("Warning: Chrono system was already initialized")
103942  * Profiling.logEvent("Starting init"+str(self.next_sample))
103943  * self.directory = bytes(Profiling.logDir+str("/"),'utf-8') # <<<<<<<<<<<<<<
103944  * self.thisptr.setDirectory(self.directory)
103945  * if self.nBodiesIBM > 0:
103946  */
103947  __pyx_tuple__116 = PyTuple_Pack(1, __pyx_kp_s__115); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 1660, __pyx_L1_error)
103948  __Pyx_GOTREF(__pyx_tuple__116);
103949  __Pyx_GIVEREF(__pyx_tuple__116);
103950 
103951  /* "mbd/CouplingFSI.pyx":1966
103952  *
103953  * else:
103954  * raise NotImplementedError('Chrono body log not understood.') # <<<<<<<<<<<<<<
103955  *
103956  * # Close the log file
103957  */
103958  __pyx_tuple__127 = PyTuple_Pack(1, __pyx_kp_s_Chrono_body_log_not_understood); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 1966, __pyx_L1_error)
103959  __Pyx_GOTREF(__pyx_tuple__127);
103960  __Pyx_GIVEREF(__pyx_tuple__127);
103961 
103962  /* "mbd/CouplingFSI.pyx":2041
103963  *
103964  * # Store the first entry into the dataset
103965  * dm_position[0, :, :] = np.array(l_position) # <<<<<<<<<<<<<<
103966  *
103967  * # Log the rotation data
103968  */
103969  __pyx_tuple__129 = PyTuple_Pack(3, __pyx_int_0, __pyx_slice__30, __pyx_slice__30); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(0, 2041, __pyx_L1_error)
103970  __Pyx_GOTREF(__pyx_tuple__129);
103971  __Pyx_GIVEREF(__pyx_tuple__129);
103972 
103973  /* "mbd/CouplingFSI.pyx":2237
103974  * except:
103975  * # Residual doesn't exist. Keep the zero in the array.
103976  * s_residuals += str(0.000) + '\t' # <<<<<<<<<<<<<<
103977  *
103978  * # Add the new line to the code, replacing the last tab
103979  */
103980  __pyx_tuple__133 = PyTuple_Pack(1, __pyx_float_0_000); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(0, 2237, __pyx_L1_error)
103981  __Pyx_GOTREF(__pyx_tuple__133);
103982  __Pyx_GIVEREF(__pyx_tuple__133);
103983 
103984  /* "mbd/CouplingFSI.pyx":2337
103985  * except:
103986  * # Create the initial dataset
103987  * dm_time = o_file.create_dataset('time', (1,), compression="gzip", # <<<<<<<<<<<<<<
103988  * maxshape=(None,), dtype=float)
103989  *
103990  */
103991  __pyx_tuple__136 = PyTuple_Pack(2, __pyx_n_s_time, __pyx_tuple__91); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 2337, __pyx_L1_error)
103992  __Pyx_GOTREF(__pyx_tuple__136);
103993  __Pyx_GIVEREF(__pyx_tuple__136);
103994 
103995  /* "mbd/CouplingFSI.pyx":2338
103996  * # Create the initial dataset
103997  * dm_time = o_file.create_dataset('time', (1,), compression="gzip",
103998  * maxshape=(None,), dtype=float) # <<<<<<<<<<<<<<
103999  *
104000  * # Store the first entry into the dataset
104001  */
104002  __pyx_tuple__137 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(0, 2338, __pyx_L1_error)
104003  __Pyx_GOTREF(__pyx_tuple__137);
104004  __Pyx_GIVEREF(__pyx_tuple__137);
104005 
104006  /* "(tree fragment)":2
104007  * def __reduce_cython__(self):
104008  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104009  * def __setstate_cython__(self, __pyx_state):
104010  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104011  */
104012  __pyx_tuple__139 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(1, 2, __pyx_L1_error)
104013  __Pyx_GOTREF(__pyx_tuple__139);
104014  __Pyx_GIVEREF(__pyx_tuple__139);
104015 
104016  /* "(tree fragment)":4
104017  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104018  * def __setstate_cython__(self, __pyx_state):
104019  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104020  */
104021  __pyx_tuple__141 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(1, 4, __pyx_L1_error)
104022  __Pyx_GOTREF(__pyx_tuple__141);
104023  __Pyx_GIVEREF(__pyx_tuple__141);
104024 
104025  /* "(tree fragment)":2
104026  * def __reduce_cython__(self):
104027  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104028  * def __setstate_cython__(self, __pyx_state):
104029  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104030  */
104031  __pyx_tuple__144 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(1, 2, __pyx_L1_error)
104032  __Pyx_GOTREF(__pyx_tuple__144);
104033  __Pyx_GIVEREF(__pyx_tuple__144);
104034 
104035  /* "(tree fragment)":4
104036  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104037  * def __setstate_cython__(self, __pyx_state):
104038  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104039  */
104040  __pyx_tuple__146 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(1, 4, __pyx_L1_error)
104041  __Pyx_GOTREF(__pyx_tuple__146);
104042  __Pyx_GIVEREF(__pyx_tuple__146);
104043 
104044  /* "mbd/CouplingFSI.pyx":2566
104045  * dset[...] = datav
104046  * dset = f.create_dataset('sx'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
104047  * dset[...] = datav[:,0] # <<<<<<<<<<<<<<
104048  * dset = f.create_dataset('sy'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
104049  * dset[...] = datav[:,1]
104050  */
104051  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_slice__30, __pyx_int_0); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 2566, __pyx_L1_error)
104052  __Pyx_GOTREF(__pyx_tuple__151);
104053  __Pyx_GIVEREF(__pyx_tuple__151);
104054 
104055  /* "mbd/CouplingFSI.pyx":2568
104056  * dset[...] = datav[:,0]
104057  * dset = f.create_dataset('sy'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
104058  * dset[...] = datav[:,1] # <<<<<<<<<<<<<<
104059  * dset = f.create_dataset('sz'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
104060  * dset[...] = datav[:,2]
104061  */
104062  __pyx_tuple__152 = PyTuple_Pack(2, __pyx_slice__30, __pyx_int_1); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 2568, __pyx_L1_error)
104063  __Pyx_GOTREF(__pyx_tuple__152);
104064  __Pyx_GIVEREF(__pyx_tuple__152);
104065 
104066  /* "mbd/CouplingFSI.pyx":2570
104067  * dset[...] = datav[:,1]
104068  * dset = f.create_dataset('sz'+str(eta)+'_t'+str(tCount), (datav.shape[0],))
104069  * dset[...] = datav[:,2] # <<<<<<<<<<<<<<
104070  * # velocity
104071  * datav = self.getNodesVelocity()
104072  */
104073  __pyx_tuple__153 = PyTuple_Pack(2, __pyx_slice__30, __pyx_int_2); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 2570, __pyx_L1_error)
104074  __Pyx_GOTREF(__pyx_tuple__153);
104075  __Pyx_GIVEREF(__pyx_tuple__153);
104076 
104077  /* "mbd/CouplingFSI.pyx":2730
104078  * Profiling.logEvent('recording values file of '+str(self.name))
104079  * self.record_file = str(os.path.join(bytes(Profiling.logDir,'utf-8'), self.name),'utf-8')
104080  * def record(record_file, row, mode='a'): # <<<<<<<<<<<<<<
104081  * with open(record_file, mode) as csvfile:
104082  * writer = csv.writer(csvfile, delimiter=',')
104083  */
104084  __pyx_tuple__156 = PyTuple_Pack(5, __pyx_n_s_record_file, __pyx_n_s_row, __pyx_n_s_mode, __pyx_n_s_csvfile, __pyx_n_s_writer); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 2730, __pyx_L1_error)
104085  __Pyx_GOTREF(__pyx_tuple__156);
104086  __Pyx_GIVEREF(__pyx_tuple__156);
104087  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_record, 2730, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 2730, __pyx_L1_error)
104088  __pyx_tuple__158 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_a)); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 2730, __pyx_L1_error)
104089  __Pyx_GOTREF(__pyx_tuple__158);
104090  __Pyx_GIVEREF(__pyx_tuple__158);
104091 
104092  /* "(tree fragment)":2
104093  * def __reduce_cython__(self):
104094  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104095  * def __setstate_cython__(self, __pyx_state):
104096  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104097  */
104098  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(1, 2, __pyx_L1_error)
104099  __Pyx_GOTREF(__pyx_tuple__195);
104100  __Pyx_GIVEREF(__pyx_tuple__195);
104101 
104102  /* "(tree fragment)":4
104103  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104104  * def __setstate_cython__(self, __pyx_state):
104105  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104106  */
104107  __pyx_tuple__197 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(1, 4, __pyx_L1_error)
104108  __Pyx_GOTREF(__pyx_tuple__197);
104109  __Pyx_GIVEREF(__pyx_tuple__197);
104110 
104111  /* "(tree fragment)":2
104112  * def __reduce_cython__(self):
104113  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104114  * def __setstate_cython__(self, __pyx_state):
104115  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104116  */
104117  __pyx_tuple__205 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(1, 2, __pyx_L1_error)
104118  __Pyx_GOTREF(__pyx_tuple__205);
104119  __Pyx_GIVEREF(__pyx_tuple__205);
104120 
104121  /* "(tree fragment)":4
104122  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104123  * def __setstate_cython__(self, __pyx_state):
104124  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104125  */
104126  __pyx_tuple__207 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(1, 4, __pyx_L1_error)
104127  __Pyx_GOTREF(__pyx_tuple__207);
104128  __Pyx_GIVEREF(__pyx_tuple__207);
104129 
104130  /* "(tree fragment)":2
104131  * def __reduce_cython__(self):
104132  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104133  * def __setstate_cython__(self, __pyx_state):
104134  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104135  */
104136  __pyx_tuple__210 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(1, 2, __pyx_L1_error)
104137  __Pyx_GOTREF(__pyx_tuple__210);
104138  __Pyx_GIVEREF(__pyx_tuple__210);
104139 
104140  /* "(tree fragment)":4
104141  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104142  * def __setstate_cython__(self, __pyx_state):
104143  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104144  */
104145  __pyx_tuple__212 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(1, 4, __pyx_L1_error)
104146  __Pyx_GOTREF(__pyx_tuple__212);
104147  __Pyx_GIVEREF(__pyx_tuple__212);
104148 
104149  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":945
104150  * __pyx_import_array()
104151  * except Exception:
104152  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
104153  *
104154  * cdef inline int import_umath() except -1:
104155  */
104156  __pyx_tuple__219 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(3, 945, __pyx_L1_error)
104157  __Pyx_GOTREF(__pyx_tuple__219);
104158  __Pyx_GIVEREF(__pyx_tuple__219);
104159 
104160  /* "../miniconda3/envs/proteus-dev-up/lib/python3.10/site-packages/numpy/__init__.pxd":951
104161  * _import_umath()
104162  * except Exception:
104163  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
104164  *
104165  * cdef inline int import_ufunc() except -1:
104166  */
104167  __pyx_tuple__220 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(3, 951, __pyx_L1_error)
104168  __Pyx_GOTREF(__pyx_tuple__220);
104169  __Pyx_GIVEREF(__pyx_tuple__220);
104170 
104171  /* "View.MemoryView":133
104172  *
104173  * if not self.ndim:
104174  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
104175  *
104176  * if itemsize <= 0:
104177  */
104178  __pyx_tuple__221 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(1, 133, __pyx_L1_error)
104179  __Pyx_GOTREF(__pyx_tuple__221);
104180  __Pyx_GIVEREF(__pyx_tuple__221);
104181 
104182  /* "View.MemoryView":136
104183  *
104184  * if itemsize <= 0:
104185  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
104186  *
104187  * if not isinstance(format, bytes):
104188  */
104189  __pyx_tuple__222 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(1, 136, __pyx_L1_error)
104190  __Pyx_GOTREF(__pyx_tuple__222);
104191  __Pyx_GIVEREF(__pyx_tuple__222);
104192 
104193  /* "View.MemoryView":148
104194  *
104195  * if not self._shape:
104196  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
104197  *
104198  *
104199  */
104200  __pyx_tuple__223 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(1, 148, __pyx_L1_error)
104201  __Pyx_GOTREF(__pyx_tuple__223);
104202  __Pyx_GIVEREF(__pyx_tuple__223);
104203 
104204  /* "View.MemoryView":176
104205  * self.data = <char *>malloc(self.len)
104206  * if not self.data:
104207  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
104208  *
104209  * if self.dtype_is_object:
104210  */
104211  __pyx_tuple__224 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(1, 176, __pyx_L1_error)
104212  __Pyx_GOTREF(__pyx_tuple__224);
104213  __Pyx_GIVEREF(__pyx_tuple__224);
104214 
104215  /* "View.MemoryView":192
104216  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
104217  * if not (flags & bufmode):
104218  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
104219  * info.buf = self.data
104220  * info.len = self.len
104221  */
104222  __pyx_tuple__225 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(1, 192, __pyx_L1_error)
104223  __Pyx_GOTREF(__pyx_tuple__225);
104224  __Pyx_GIVEREF(__pyx_tuple__225);
104225 
104226  /* "(tree fragment)":2
104227  * def __reduce_cython__(self):
104228  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104229  * def __setstate_cython__(self, __pyx_state):
104230  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104231  */
104232  __pyx_tuple__226 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(1, 2, __pyx_L1_error)
104233  __Pyx_GOTREF(__pyx_tuple__226);
104234  __Pyx_GIVEREF(__pyx_tuple__226);
104235 
104236  /* "(tree fragment)":4
104237  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104238  * def __setstate_cython__(self, __pyx_state):
104239  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104240  */
104241  __pyx_tuple__227 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(1, 4, __pyx_L1_error)
104242  __Pyx_GOTREF(__pyx_tuple__227);
104243  __Pyx_GIVEREF(__pyx_tuple__227);
104244 
104245  /* "View.MemoryView":418
104246  * def __setitem__(memoryview self, object index, object value):
104247  * if self.view.readonly:
104248  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
104249  *
104250  * have_slices, index = _unellipsify(index, self.view.ndim)
104251  */
104252  __pyx_tuple__228 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(1, 418, __pyx_L1_error)
104253  __Pyx_GOTREF(__pyx_tuple__228);
104254  __Pyx_GIVEREF(__pyx_tuple__228);
104255 
104256  /* "View.MemoryView":495
104257  * result = struct.unpack(self.view.format, bytesitem)
104258  * except struct.error:
104259  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
104260  * else:
104261  * if len(self.view.format) == 1:
104262  */
104263  __pyx_tuple__229 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(1, 495, __pyx_L1_error)
104264  __Pyx_GOTREF(__pyx_tuple__229);
104265  __Pyx_GIVEREF(__pyx_tuple__229);
104266 
104267  /* "View.MemoryView":520
104268  * def __getbuffer__(self, Py_buffer *info, int flags):
104269  * if flags & PyBUF_WRITABLE and self.view.readonly:
104270  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
104271  *
104272  * if flags & PyBUF_ND:
104273  */
104274  __pyx_tuple__230 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(1, 520, __pyx_L1_error)
104275  __Pyx_GOTREF(__pyx_tuple__230);
104276  __Pyx_GIVEREF(__pyx_tuple__230);
104277 
104278  /* "View.MemoryView":570
104279  * if self.view.strides == NULL:
104280  *
104281  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
104282  *
104283  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
104284  */
104285  __pyx_tuple__231 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(1, 570, __pyx_L1_error)
104286  __Pyx_GOTREF(__pyx_tuple__231);
104287  __Pyx_GIVEREF(__pyx_tuple__231);
104288 
104289  /* "View.MemoryView":577
104290  * def suboffsets(self):
104291  * if self.view.suboffsets == NULL:
104292  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
104293  *
104294  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
104295  */
104296  __pyx_tuple__232 = PyTuple_New(1); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(1, 577, __pyx_L1_error)
104297  __Pyx_GOTREF(__pyx_tuple__232);
104298  __Pyx_INCREF(__pyx_int_neg_1);
104299  __Pyx_GIVEREF(__pyx_int_neg_1);
104300  PyTuple_SET_ITEM(__pyx_tuple__232, 0, __pyx_int_neg_1);
104301  __Pyx_GIVEREF(__pyx_tuple__232);
104302 
104303  /* "(tree fragment)":2
104304  * def __reduce_cython__(self):
104305  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104306  * def __setstate_cython__(self, __pyx_state):
104307  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104308  */
104309  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(1, 2, __pyx_L1_error)
104310  __Pyx_GOTREF(__pyx_tuple__233);
104311  __Pyx_GIVEREF(__pyx_tuple__233);
104312 
104313  /* "(tree fragment)":4
104314  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104315  * def __setstate_cython__(self, __pyx_state):
104316  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104317  */
104318  __pyx_tuple__234 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(1, 4, __pyx_L1_error)
104319  __Pyx_GOTREF(__pyx_tuple__234);
104320  __Pyx_GIVEREF(__pyx_tuple__234);
104321 
104322  /* "View.MemoryView":703
104323  * for suboffset in suboffsets[:ndim]:
104324  * if suboffset >= 0:
104325  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
104326  *
104327  *
104328  */
104329  __pyx_tuple__235 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(1, 703, __pyx_L1_error)
104330  __Pyx_GOTREF(__pyx_tuple__235);
104331  __Pyx_GIVEREF(__pyx_tuple__235);
104332 
104333  /* "(tree fragment)":2
104334  * def __reduce_cython__(self):
104335  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104336  * def __setstate_cython__(self, __pyx_state):
104337  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104338  */
104339  __pyx_tuple__236 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(1, 2, __pyx_L1_error)
104340  __Pyx_GOTREF(__pyx_tuple__236);
104341  __Pyx_GIVEREF(__pyx_tuple__236);
104342 
104343  /* "(tree fragment)":4
104344  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
104345  * def __setstate_cython__(self, __pyx_state):
104346  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
104347  */
104348  __pyx_tuple__237 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(1, 4, __pyx_L1_error)
104349  __Pyx_GOTREF(__pyx_tuple__237);
104350  __Pyx_GIVEREF(__pyx_tuple__237);
104351  __pyx_tuple__239 = PyTuple_Pack(3, __pyx_int_184977713, __pyx_int_136983863, __pyx_int_112105877); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(1, 4, __pyx_L1_error)
104352  __Pyx_GOTREF(__pyx_tuple__239);
104353  __Pyx_GIVEREF(__pyx_tuple__239);
104354 
104355  /* "mbd/CouplingFSI.pyx":113
104356  * self.setName(b'rigidbody')
104357  *
104358  * def getChronoObject(self): # <<<<<<<<<<<<<<
104359  * return self.ChBody
104360  *
104361  */
104362  __pyx_tuple__241 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 113, __pyx_L1_error)
104363  __Pyx_GOTREF(__pyx_tuple__241);
104364  __Pyx_GIVEREF(__pyx_tuple__241);
104365  __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getChronoObject, 113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 113, __pyx_L1_error)
104366 
104367  /* "mbd/CouplingFSI.pyx":116
104368  * return self.ChBody
104369  *
104370  * def attachShape(self, # <<<<<<<<<<<<<<
104371  * shape,
104372  * take_shape_name=True):
104373  */
104374  __pyx_tuple__242 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_shape, __pyx_n_s_take_shape_name, __pyx_n_s_new_vec); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 116, __pyx_L1_error)
104375  __Pyx_GOTREF(__pyx_tuple__242);
104376  __Pyx_GIVEREF(__pyx_tuple__242);
104377  __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachShape, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 116, __pyx_L1_error)
104378 
104379  /* "mbd/CouplingFSI.pyx":142
104380  * self.ChBody.SetPos(new_vec)
104381  *
104382  * def addTriangleMeshFromShape(self, # <<<<<<<<<<<<<<
104383  * object shape=None,
104384  * double[:] pos=None,
104385  */
104386  __pyx_tuple__243 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_shape, __pyx_n_s_pos, __pyx_n_s_rot, __pyx_n_s_is_static, __pyx_n_s_is_convex, __pyx_n_s_sphereswept_thickness, __pyx_n_s_vertices, __pyx_n_s_f_i, __pyx_n_s_facet, __pyx_n_s_f, __pyx_n_s_facets); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 142, __pyx_L1_error)
104387  __Pyx_GOTREF(__pyx_tuple__243);
104388  __Pyx_GIVEREF(__pyx_tuple__243);
104389  __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(7, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_addTriangleMeshFromShape, 142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 142, __pyx_L1_error)
104390 
104391  /* "mbd/CouplingFSI.pyx":246
104392  * # sphereswept_thickness)
104393  *
104394  * def getTriangleMeshInfo(self): # <<<<<<<<<<<<<<
104395  * # vertices
104396  * cdef vector[ch.ChVector[double]] chpos = deref(self.thisptr.trimesh).getCoordsVertices()
104397  */
104398  __pyx_tuple__244 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_chpos, __pyx_n_s_pos, __pyx_n_s_i, __pyx_n_s_chel_connect, __pyx_n_s_el_connect); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 246, __pyx_L1_error)
104399  __Pyx_GOTREF(__pyx_tuple__244);
104400  __Pyx_GIVEREF(__pyx_tuple__244);
104401  __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getTriangleMeshInfo, 246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 246, __pyx_L1_error)
104402 
104403  /* "mbd/CouplingFSI.pyx":263
104404  * return pos, el_connect
104405  *
104406  * def setCollisionOptions(self, # <<<<<<<<<<<<<<
104407  * double envelope=0.001,
104408  * double margin=0.0005,
104409  */
104410  __pyx_tuple__245 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_envelope, __pyx_n_s_margin, __pyx_n_s_collide); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 263, __pyx_L1_error)
104411  __Pyx_GOTREF(__pyx_tuple__245);
104412  __Pyx_GIVEREF(__pyx_tuple__245);
104413  __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setCollisionOptions, 263, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 263, __pyx_L1_error)
104414 
104415  /* "mbd/CouplingFSI.pyx":271
104416  * deref(deref(self.thisptr.body).GetCollisionModel()).SetSafeMargin(margin)
104417  *
104418  * def setBoundaryFlags(self, flags): # <<<<<<<<<<<<<<
104419  * """Sets the flags of the boundaries of the body
104420  * numbers must be gloabal (from domain.segmentFlags or
104421  */
104422  __pyx_tuple__246 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_flags); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 271, __pyx_L1_error)
104423  __Pyx_GOTREF(__pyx_tuple__246);
104424  __Pyx_GIVEREF(__pyx_tuple__246);
104425  __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setBoundaryFlags, 271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 271, __pyx_L1_error)
104426 
104427  /* "mbd/CouplingFSI.pyx":283
104428  * self.boundaryFlags = np.array(flags, 'i')
104429  *
104430  * def setIBM(self, useIBM=True, radiusIBM=0., sdfIBM=None): # <<<<<<<<<<<<<<
104431  * """Sets IBM mode for retrieving fluid forces
104432  *
104433  */
104434  __pyx_tuple__247 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_useIBM, __pyx_n_s_radiusIBM, __pyx_n_s_sdfIBM); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 283, __pyx_L1_error)
104435  __Pyx_GOTREF(__pyx_tuple__247);
104436  __Pyx_GIVEREF(__pyx_tuple__247);
104437  __pyx_codeobj__12 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setIBM, 283, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 283, __pyx_L1_error)
104438 
104439  /* "mbd/CouplingFSI.pyx":299
104440  * self.sdfIBM = sdfIBM
104441  *
104442  * def setWidth2D(self, width): # <<<<<<<<<<<<<<
104443  * """Sets width of 2D body (for forces and moments calculation)
104444  *
104445  */
104446  __pyx_tuple__248 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_width); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 299, __pyx_L1_error)
104447  __Pyx_GOTREF(__pyx_tuple__248);
104448  __Pyx_GIVEREF(__pyx_tuple__248);
104449  __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setWidth2D, 299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 299, __pyx_L1_error)
104450 
104451  /* "mbd/CouplingFSI.pyx":309
104452  * self.width_2D = width
104453  *
104454  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
104455  * pass
104456  *
104457  */
104458  __pyx_tuple__249 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_avDict); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 309, __pyx_L1_error)
104459  __Pyx_GOTREF(__pyx_tuple__249);
104460  __Pyx_GIVEREF(__pyx_tuple__249);
104461  __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachAuxiliaryVariables, 309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 309, __pyx_L1_error)
104462 
104463  /* "mbd/CouplingFSI.pyx":312
104464  * pass
104465  *
104466  * def setInitialRot(self, rot): # <<<<<<<<<<<<<<
104467  * cdef np.ndarray zeros = np.zeros(3)
104468  * self.rotation_init = rot
104469  */
104470  __pyx_tuple__250 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_rot, __pyx_n_s_zeros, __pyx_n_s_new_quat); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 312, __pyx_L1_error)
104471  __Pyx_GOTREF(__pyx_tuple__250);
104472  __Pyx_GIVEREF(__pyx_tuple__250);
104473  __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setInitialRot, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 312, __pyx_L1_error)
104474 
104475  /* "mbd/CouplingFSI.pyx":322
104476  * self.thisptr.poststep()
104477  *
104478  * def hxyz(self, np.ndarray x, double t, debug=False): # <<<<<<<<<<<<<<
104479  * cdef np.ndarray h
104480  * cdef np.ndarray xx
104481  */
104482  __pyx_tuple__251 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t, __pyx_n_s_debug, __pyx_n_s_h, __pyx_n_s_xx, __pyx_n_s_ang, __pyx_n_s_ang_last, __pyx_n_s_d_tra, __pyx_n_s_d_tra_last, __pyx_n_s_d_rot, __pyx_n_s_d_rot_last, __pyx_n_s_h_body, __pyx_n_s_h_body_vec, __pyx_n_s_comm); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 322, __pyx_L1_error)
104483  __Pyx_GOTREF(__pyx_tuple__251);
104484  __Pyx_GIVEREF(__pyx_tuple__251);
104485  __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(4, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hxyz, 322, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 322, __pyx_L1_error)
104486 
104487  /* "mbd/CouplingFSI.pyx":400
104488  * return h
104489  *
104490  * def hx(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104491  * """BC function for mesh nodes displacement (x component)
104492  *
104493  */
104494  __pyx_tuple__252 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 400, __pyx_L1_error)
104495  __Pyx_GOTREF(__pyx_tuple__252);
104496  __Pyx_GIVEREF(__pyx_tuple__252);
104497  __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hx, 400, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 400, __pyx_L1_error)
104498 
104499  /* "mbd/CouplingFSI.pyx":412
104500  * return self.hxyz(x, t)[0]
104501  *
104502  * def hy(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104503  * """BC function for mesh nodes displacement (y component)
104504  *
104505  */
104506  __pyx_tuple__253 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 412, __pyx_L1_error)
104507  __Pyx_GOTREF(__pyx_tuple__253);
104508  __Pyx_GIVEREF(__pyx_tuple__253);
104509  __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hy, 412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 412, __pyx_L1_error)
104510 
104511  /* "mbd/CouplingFSI.pyx":424
104512  * return self.hxyz(x, t)[1]
104513  *
104514  * def hz(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104515  * """BC function for mesh nodes displacement (z component)
104516  *
104517  */
104518  __pyx_tuple__254 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 424, __pyx_L1_error)
104519  __Pyx_GOTREF(__pyx_tuple__254);
104520  __Pyx_GIVEREF(__pyx_tuple__254);
104521  __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hz, 424, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 424, __pyx_L1_error)
104522 
104523  /* "mbd/CouplingFSI.pyx":436
104524  * return self.hxyz(x, t)[2]
104525  *
104526  * def hx_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104527  * """BC function for mesh nodes displacement (x component)
104528  *
104529  */
104530  __pyx_tuple__255 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 436, __pyx_L1_error)
104531  __Pyx_GOTREF(__pyx_tuple__255);
104532  __Pyx_GIVEREF(__pyx_tuple__255);
104533  __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hx_translation, 436, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 436, __pyx_L1_error)
104534 
104535  /* "mbd/CouplingFSI.pyx":448
104536  * return (self.position-self.position_last)[0]
104537  *
104538  * def hy_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104539  * """BC function for mesh nodes displacement (y component)
104540  *
104541  */
104542  __pyx_tuple__256 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 448, __pyx_L1_error)
104543  __Pyx_GOTREF(__pyx_tuple__256);
104544  __Pyx_GIVEREF(__pyx_tuple__256);
104545  __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hy_translation, 448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 448, __pyx_L1_error)
104546 
104547  /* "mbd/CouplingFSI.pyx":460
104548  * return (self.position-self.position_last)[1]
104549  *
104550  * def hz_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104551  * """BC function for mesh nodes displacement (z component)
104552  *
104553  */
104554  __pyx_tuple__257 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 460, __pyx_L1_error)
104555  __Pyx_GOTREF(__pyx_tuple__257);
104556  __Pyx_GIVEREF(__pyx_tuple__257);
104557  __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hz_translation, 460, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 460, __pyx_L1_error)
104558 
104559  /* "mbd/CouplingFSI.pyx":472
104560  * return (self.position-self.position_last)[2]
104561  *
104562  * def hx_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104563  * """BC function for mesh nodes displacement (x component)
104564  *
104565  */
104566  __pyx_tuple__258 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 472, __pyx_L1_error)
104567  __Pyx_GOTREF(__pyx_tuple__258);
104568  __Pyx_GIVEREF(__pyx_tuple__258);
104569  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hx_rotation, 472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 472, __pyx_L1_error)
104570 
104571  /* "mbd/CouplingFSI.pyx":484
104572  * return self.hxyz(x, t)[0]-(self.position-self.position_last)[0]
104573  *
104574  * def hy_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104575  * """BC function for mesh nodes displacement (y component)
104576  *
104577  */
104578  __pyx_tuple__259 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 484, __pyx_L1_error)
104579  __Pyx_GOTREF(__pyx_tuple__259);
104580  __Pyx_GIVEREF(__pyx_tuple__259);
104581  __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hy_rotation, 484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 484, __pyx_L1_error)
104582 
104583  /* "mbd/CouplingFSI.pyx":496
104584  * return self.hxyz(x, t)[1]-(self.position-self.position_last)[1]
104585  *
104586  * def hz_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
104587  * """BC function for mesh nodes displacement (z component)
104588  *
104589  */
104590  __pyx_tuple__260 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_t); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 496, __pyx_L1_error)
104591  __Pyx_GOTREF(__pyx_tuple__260);
104592  __Pyx_GIVEREF(__pyx_tuple__260);
104593  __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_hz_rotation, 496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) __PYX_ERR(0, 496, __pyx_L1_error)
104594 
104595  /* "mbd/CouplingFSI.pyx":508
104596  * return self.hxyz(x, t)[2]-(self.position-self.position_last)[2]
104597  *
104598  * def addSpring(self, double stiffness, double damping, np.ndarray fairlead, # <<<<<<<<<<<<<<
104599  * np.ndarray anchor, double rest_length):
104600  * self.thisptr.addSpring(stiffness, damping, <double*> fairlead.data,
104601  */
104602  __pyx_tuple__261 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_stiffness, __pyx_n_s_damping, __pyx_n_s_fairlead, __pyx_n_s_anchor, __pyx_n_s_rest_length); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 508, __pyx_L1_error)
104603  __Pyx_GOTREF(__pyx_tuple__261);
104604  __Pyx_GIVEREF(__pyx_tuple__261);
104605  __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_addSpring, 508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 508, __pyx_L1_error)
104606 
104607  /* "mbd/CouplingFSI.pyx":513
104608  * <double*> anchor.data, rest_length)
104609  *
104610  * def setConstraints(self, np.ndarray free_x, np.ndarray free_r): # <<<<<<<<<<<<<<
104611  * """Sets constraints on the body
104612  * (!) Only acts on Proteus and gravity forces
104613  */
104614  __pyx_tuple__262 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_free_x, __pyx_n_s_free_r); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 513, __pyx_L1_error)
104615  __Pyx_GOTREF(__pyx_tuple__262);
104616  __Pyx_GIVEREF(__pyx_tuple__262);
104617  __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setConstraints, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(0, 513, __pyx_L1_error)
104618 
104619  /* "mbd/CouplingFSI.pyx":526
104620  * self.thisptr.setConstraints(<double*> free_x.data, <double*> free_r.data)
104621  *
104622  * def setAddedMass(self, np.ndarray Aij): # <<<<<<<<<<<<<<
104623  * """
104624  * Sets the added mass matrix of the body
104625  */
104626  __pyx_tuple__263 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_Aij, __pyx_n_s_mass, __pyx_n_s_iner, __pyx_n_s_MM, __pyx_n_s_FM, __pyx_n_s_rotMarr_big, __pyx_n_s_rotMarrT_big, __pyx_n_s_Aij_global, __pyx_n_s_rot, __pyx_n_s_rotch, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_inv_FM, __pyx_n_s_chFM, __pyx_n_s_inv_chFM, __pyx_n_s_swig_obj, __pyx_n_s_mycpp_ptr, __pyx_n_s_my_instance, __pyx_n_s_aa, __pyx_n_s_Aija); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 526, __pyx_L1_error)
104627  __Pyx_GOTREF(__pyx_tuple__263);
104628  __Pyx_GIVEREF(__pyx_tuple__263);
104629  __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setAddedMass, 526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 526, __pyx_L1_error)
104630 
104631  /* "mbd/CouplingFSI.pyx":616
104632  * self.M_Aij = Aija[3:]
104633  *
104634  * def getPressureForces(self): # <<<<<<<<<<<<<<
104635  * """Gives pressure forces from fluid (Proteus) acting on body.
104636  * (!) Only works during proteus simulation
104637  */
104638  __pyx_tuple__264 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_F_p, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 616, __pyx_L1_error)
104639  __Pyx_GOTREF(__pyx_tuple__264);
104640  __Pyx_GIVEREF(__pyx_tuple__264);
104641  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getPressureForces, 616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 616, __pyx_L1_error)
104642 
104643  /* "mbd/CouplingFSI.pyx":633
104644  * return F_p
104645  *
104646  * def getShearForces(self): # <<<<<<<<<<<<<<
104647  * """Gives shear forces from fluid (Proteus) acting on body
104648  * (!) Only works during proteus simulation
104649  */
104650  __pyx_tuple__265 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_F_v, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 633, __pyx_L1_error)
104651  __Pyx_GOTREF(__pyx_tuple__265);
104652  __Pyx_GIVEREF(__pyx_tuple__265);
104653  __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getShearForces, 633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 633, __pyx_L1_error)
104654 
104655  /* "mbd/CouplingFSI.pyx":650
104656  * return F_v
104657  *
104658  * def getMoments(self): # <<<<<<<<<<<<<<
104659  * """Gives moments from fluid (Proteus) acting on body
104660  * (!) Only works during proteus simulation
104661  */
104662  __pyx_tuple__266 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_M, __pyx_n_s_flag, __pyx_n_s_Fx, __pyx_n_s_Fy, __pyx_n_s_Fz, __pyx_n_s_rx, __pyx_n_s_ry, __pyx_n_s_rz, __pyx_n_s_Mp); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 650, __pyx_L1_error)
104663  __Pyx_GOTREF(__pyx_tuple__266);
104664  __Pyx_GIVEREF(__pyx_tuple__266);
104665  __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getMoments, 650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 650, __pyx_L1_error)
104666 
104667  /* "mbd/CouplingFSI.pyx":672
104668  * return M
104669  *
104670  * def getRotationMatrix(self): # <<<<<<<<<<<<<<
104671  * """Gives current rotation (matrix) of body
104672  *
104673  */
104674  __pyx_tuple__267 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_x0, __pyx_n_s_x1, __pyx_n_s_x2, __pyx_n_s_y0, __pyx_n_s_y1, __pyx_n_s_y2, __pyx_n_s_z0, __pyx_n_s_z1, __pyx_n_s_z2, __pyx_n_s_rot); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 672, __pyx_L1_error)
104675  __Pyx_GOTREF(__pyx_tuple__267);
104676  __Pyx_GIVEREF(__pyx_tuple__267);
104677  __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getRotationMatrix, 672, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 672, __pyx_L1_error)
104678 
104679  /* "mbd/CouplingFSI.pyx":694
104680  * return rot
104681  *
104682  * def prestep(self): # <<<<<<<<<<<<<<
104683  * """Called before Chrono system step.
104684  * Sets external forces automatically from Proteus solution.
104685  */
104686  __pyx_tuple__268 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_am, __pyx_n_s_flag, __pyx_n_s_Aij); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 694, __pyx_L1_error)
104687  __Pyx_GOTREF(__pyx_tuple__268);
104688  __Pyx_GIVEREF(__pyx_tuple__268);
104689  __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_prestep, 694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 694, __pyx_L1_error)
104690 
104691  /* "mbd/CouplingFSI.pyx":723
104692  * self.setExternalForces()
104693  *
104694  * def setExternalForces(self, np.ndarray forces=None, np.ndarray moments=None): # <<<<<<<<<<<<<<
104695  * """Sets external forces to body.
104696  * Called during prestep or can be called manually. If called manually,
104697  */
104698  __pyx_tuple__269 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_forces, __pyx_n_s_moments, __pyx_n_s_F_bar, __pyx_n_s_M_bar, __pyx_n_s_F_solid_type, __pyx_n_s_F_body, __pyx_n_s_M_body); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 723, __pyx_L1_error)
104699  __Pyx_GOTREF(__pyx_tuple__269);
104700  __Pyx_GIVEREF(__pyx_tuple__269);
104701  __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setExternalForces, 723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 723, __pyx_L1_error)
104702 
104703  /* "mbd/CouplingFSI.pyx":784
104704  * self.predicted = False
104705  *
104706  * def poststep(self): # <<<<<<<<<<<<<<
104707  * """Called after Chrono system step.
104708  * Records values to csv, broadcast new position and rotation from
104709  */
104710  __pyx_tuple__270 = PyTuple_Pack(24, __pyx_n_s_self, __pyx_n_s_new_x, __pyx_n_s_new_vec, __pyx_n_s_comm, __pyx_n_s_rotq, __pyx_n_s_rotq_last, __pyx_n_s_pos, __pyx_n_s_pos_last, __pyx_n_s_e0, __pyx_n_s_e1, __pyx_n_s_e2, __pyx_n_s_e3, __pyx_n_s_e0_last, __pyx_n_s_e1_last, __pyx_n_s_e2_last, __pyx_n_s_e3_last, __pyx_n_s_posx, __pyx_n_s_posy, __pyx_n_s_posz, __pyx_n_s_posx_last, __pyx_n_s_posy_last, __pyx_n_s_posz_last, __pyx_n_s_am, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 784, __pyx_L1_error)
104711  __Pyx_GOTREF(__pyx_tuple__270);
104712  __Pyx_GIVEREF(__pyx_tuple__270);
104713  __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_poststep, 784, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 784, __pyx_L1_error)
104714 
104715  /* "mbd/CouplingFSI.pyx":828
104716  * self.updateIBM()
104717  *
104718  * def updateIBM(self): # <<<<<<<<<<<<<<
104719  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
104720  * if c.use_ball_as_particle:
104721  */
104722  __pyx_tuple__271 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_c, __pyx_n_s_chpos, __pyx_n_s_chvel, __pyx_n_s_chvel_ang, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 828, __pyx_L1_error)
104723  __Pyx_GOTREF(__pyx_tuple__271);
104724  __Pyx_GIVEREF(__pyx_tuple__271);
104725  __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_updateIBM, 828, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 828, __pyx_L1_error)
104726 
104727  /* "mbd/CouplingFSI.pyx":850
104728  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity()
104729  *
104730  * def getDynamicSDF(self, t, x): # <<<<<<<<<<<<<<
104731  * chpos = self.ChBody.GetPos()
104732  * relative_x = x-np.array([chpos.x, chpos.y, chpos.z])
104733  */
104734  __pyx_tuple__272 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_chpos, __pyx_n_s_relative_x); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 850, __pyx_L1_error)
104735  __Pyx_GOTREF(__pyx_tuple__272);
104736  __Pyx_GIVEREF(__pyx_tuple__272);
104737  __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getDynamicSDF, 850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 850, __pyx_L1_error)
104738 
104739  /* "mbd/CouplingFSI.pyx":855
104740  * return self.sdfIBM(t, relative_x)
104741  *
104742  * def setPosition(self, np.ndarray pos): # <<<<<<<<<<<<<<
104743  * chvec = chrono.ChVectorD(pos[0], pos[1], pos[2])
104744  * self.ChBody.SetPos(chvec)
104745  */
104746  __pyx_tuple__273 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_pos, __pyx_n_s_chvec); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 855, __pyx_L1_error)
104747  __Pyx_GOTREF(__pyx_tuple__273);
104748  __Pyx_GIVEREF(__pyx_tuple__273);
104749  __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setPosition, 855, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 855, __pyx_L1_error)
104750 
104751  /* "mbd/CouplingFSI.pyx":859
104752  * self.ChBody.SetPos(chvec)
104753  *
104754  * def getPosition(self): # <<<<<<<<<<<<<<
104755  * chpos = self.ChBody.GetPos()
104756  * return pyvec2array(chpos)
104757  */
104758  __pyx_tuple__274 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_chpos); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 859, __pyx_L1_error)
104759  __Pyx_GOTREF(__pyx_tuple__274);
104760  __Pyx_GIVEREF(__pyx_tuple__274);
104761  __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getPosition, 859, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 859, __pyx_L1_error)
104762 
104763  /* "mbd/CouplingFSI.pyx":863
104764  * return pyvec2array(chpos)
104765  *
104766  * def setMass(self, double mass): # <<<<<<<<<<<<<<
104767  * self.ChBody.SetMass(mass)
104768  *
104769  */
104770  __pyx_tuple__275 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_mass, __pyx_n_s_mass); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 863, __pyx_L1_error)
104771  __Pyx_GOTREF(__pyx_tuple__275);
104772  __Pyx_GIVEREF(__pyx_tuple__275);
104773  __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setMass, 863, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 863, __pyx_L1_error)
104774 
104775  /* "mbd/CouplingFSI.pyx":866
104776  * self.ChBody.SetMass(mass)
104777  *
104778  * def getMass(self): # <<<<<<<<<<<<<<
104779  * return self.ChBody.GetMass()
104780  *
104781  */
104782  __pyx_tuple__276 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 866, __pyx_L1_error)
104783  __Pyx_GOTREF(__pyx_tuple__276);
104784  __Pyx_GIVEREF(__pyx_tuple__276);
104785  __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getMass, 866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 866, __pyx_L1_error)
104786 
104787  /* "mbd/CouplingFSI.pyx":869
104788  * return self.ChBody.GetMass()
104789  *
104790  * def setInertiaXX(self, np.ndarray inertia): # <<<<<<<<<<<<<<
104791  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
104792  * self.ChBody.SetInertiaXX(chvec)
104793  */
104794  __pyx_tuple__277 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_inertia, __pyx_n_s_chvec); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 869, __pyx_L1_error)
104795  __Pyx_GOTREF(__pyx_tuple__277);
104796  __Pyx_GIVEREF(__pyx_tuple__277);
104797  __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setInertiaXX, 869, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 869, __pyx_L1_error)
104798 
104799  /* "mbd/CouplingFSI.pyx":873
104800  * self.ChBody.SetInertiaXX(chvec)
104801  *
104802  * def setInertiaXY(self, np.ndarray inertia): # <<<<<<<<<<<<<<
104803  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
104804  * self.ChBody.SetInertiaXY(chvec)
104805  */
104806  __pyx_tuple__278 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_inertia, __pyx_n_s_chvec); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 873, __pyx_L1_error)
104807  __Pyx_GOTREF(__pyx_tuple__278);
104808  __Pyx_GIVEREF(__pyx_tuple__278);
104809  __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setInertiaXY, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 873, __pyx_L1_error)
104810 
104811  /* "mbd/CouplingFSI.pyx":877
104812  * self.ChBody.SetInertiaXY(chvec)
104813  *
104814  * def getInertia(self): # <<<<<<<<<<<<<<
104815  * iner = pymat332array(self.ChBody.GetInertia())
104816  * return iner
104817  */
104818  __pyx_tuple__279 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_iner); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 877, __pyx_L1_error)
104819  __Pyx_GOTREF(__pyx_tuple__279);
104820  __Pyx_GIVEREF(__pyx_tuple__279);
104821  __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getInertia, 877, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 877, __pyx_L1_error)
104822 
104823  /* "mbd/CouplingFSI.pyx":881
104824  * return iner
104825  *
104826  * def getVelocity(self): # <<<<<<<<<<<<<<
104827  * chvel = self.ChBody.GetPos_dt()
104828  * return pyvec2array(chvel)
104829  */
104830  __pyx_tuple__280 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_chvel); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 881, __pyx_L1_error)
104831  __Pyx_GOTREF(__pyx_tuple__280);
104832  __Pyx_GIVEREF(__pyx_tuple__280);
104833  __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getVelocity, 881, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 881, __pyx_L1_error)
104834 
104835  /* "mbd/CouplingFSI.pyx":885
104836  * return pyvec2array(chvel)
104837  *
104838  * def setVelocity(self, np.ndarray vel): # <<<<<<<<<<<<<<
104839  * chvec = chrono.ChVectorD(vel[0], vel[1], vel[2])
104840  * self.ChBody.SetPos_dt(chvec)
104841  */
104842  __pyx_tuple__281 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_vel, __pyx_n_s_chvec); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 885, __pyx_L1_error)
104843  __Pyx_GOTREF(__pyx_tuple__281);
104844  __Pyx_GIVEREF(__pyx_tuple__281);
104845  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setVelocity, 885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 885, __pyx_L1_error)
104846 
104847  /* "mbd/CouplingFSI.pyx":889
104848  * self.ChBody.SetPos_dt(chvec)
104849  *
104850  * def prediction(self): # <<<<<<<<<<<<<<
104851  * comm = Comm.get().comm.tompi4py()
104852  * cdef ch.ChVector h_body_vec
104853  */
104854  __pyx_tuple__282 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_comm, __pyx_n_s_h_body_vec, __pyx_n_s_dt, __pyx_n_s_dt_next); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 889, __pyx_L1_error)
104855  __Pyx_GOTREF(__pyx_tuple__282);
104856  __Pyx_GIVEREF(__pyx_tuple__282);
104857  __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_prediction, 889, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 889, __pyx_L1_error)
104858 
104859  /* "mbd/CouplingFSI.pyx":944
104860  * self.predicted = True
104861  *
104862  * def calculate_init(self): # <<<<<<<<<<<<<<
104863  * """Called from self.ProtChSystem.calculate_init()
104864  * before simulation starts
104865  */
104866  __pyx_tuple__283 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_zeros); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 944, __pyx_L1_error)
104867  __Pyx_GOTREF(__pyx_tuple__283);
104868  __Pyx_GIVEREF(__pyx_tuple__283);
104869  __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_calculate_init, 944, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 944, __pyx_L1_error)
104870 
104871  /* "mbd/CouplingFSI.pyx":975
104872  * self.thisptr.calculate_init()
104873  *
104874  * def calculate(self): # <<<<<<<<<<<<<<
104875  * pass
104876  *
104877  */
104878  __pyx_tuple__284 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 975, __pyx_L1_error)
104879  __Pyx_GOTREF(__pyx_tuple__284);
104880  __Pyx_GIVEREF(__pyx_tuple__284);
104881  __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_calculate, 975, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(0, 975, __pyx_L1_error)
104882 
104883  /* "mbd/CouplingFSI.pyx":978
104884  * pass
104885  *
104886  * def setPrescribedMotionCustom(self, double[:] t, double[:] x=None, # <<<<<<<<<<<<<<
104887  * double[:] y=None, double[:] z=None,
104888  * double[:] ang=None, double[:] ang2=None,
104889  */
104890  __pyx_tuple__285 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_t, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_ang, __pyx_n_s_ang2, __pyx_n_s_ang3, __pyx_n_s_t_max, __pyx_n_s_t_vec, __pyx_n_s_x_vec, __pyx_n_s_y_vec, __pyx_n_s_z_vec, __pyx_n_s_ang_vec, __pyx_n_s_ang2_vec, __pyx_n_s_ang3_vec, __pyx_n_s_tt, __pyx_n_s_xx, __pyx_n_s_yy, __pyx_n_s_zz, __pyx_n_s_angang, __pyx_n_s_ang2ang2, __pyx_n_s_ang3ang3); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 978, __pyx_L1_error)
104891  __Pyx_GOTREF(__pyx_tuple__285);
104892  __Pyx_GIVEREF(__pyx_tuple__285);
104893  __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(9, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setPrescribedMotionCustom, 978, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 978, __pyx_L1_error)
104894 
104895  /* "mbd/CouplingFSI.pyx":1042
104896  * t_max)
104897  *
104898  * def setPrescribedMotionSine(self, double a, double f): # <<<<<<<<<<<<<<
104899  * """Sets sinusoidal prescribed motion for body
104900  *
104901  */
104902  __pyx_tuple__286 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_a, __pyx_n_s_f); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 1042, __pyx_L1_error)
104903  __Pyx_GOTREF(__pyx_tuple__286);
104904  __Pyx_GIVEREF(__pyx_tuple__286);
104905  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setPrescribedMotionSine, 1042, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1042, __pyx_L1_error)
104906 
104907  /* "mbd/CouplingFSI.pyx":1054
104908  * self.thisptr.setPrescribedMotionSine(a, f)
104909  *
104910  * def setPrescribedMotionPoly(self, double coeff1): # <<<<<<<<<<<<<<
104911  * """Sets polynomial prescribed motion for body
104912  *
104913  */
104914  __pyx_tuple__287 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_coeff1, __pyx_n_s_coeff1); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 1054, __pyx_L1_error)
104915  __Pyx_GOTREF(__pyx_tuple__287);
104916  __Pyx_GIVEREF(__pyx_tuple__287);
104917  __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setPrescribedMotionPoly, 1054, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 1054, __pyx_L1_error)
104918 
104919  /* "mbd/CouplingFSI.pyx":1064
104920  * self.thisptr.setPrescribedMotionPoly(coeff1)
104921  *
104922  * def setPrescribedMotion(self, function): # <<<<<<<<<<<<<<
104923  * """Sets custom prescribed motion function
104924  * (!) should be preferably set only if body is free and not
104925  */
104926  __pyx_tuple__288 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_function); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 1064, __pyx_L1_error)
104927  __Pyx_GOTREF(__pyx_tuple__288);
104928  __Pyx_GIVEREF(__pyx_tuple__288);
104929  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setPrescribedMotion, 1064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1064, __pyx_L1_error)
104930 
104931  /* "mbd/CouplingFSI.pyx":1086
104932  * return self.prescribed_motion_function(t)
104933  *
104934  * def storeValues(self): # <<<<<<<<<<<<<<
104935  * self.velocity_last = self.velocity
104936  * self.position_last = self.position
104937  */
104938  __pyx_tuple__289 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 1086, __pyx_L1_error)
104939  __Pyx_GOTREF(__pyx_tuple__289);
104940  __Pyx_GIVEREF(__pyx_tuple__289);
104941  __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_storeValues, 1086, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 1086, __pyx_L1_error)
104942 
104943  /* "mbd/CouplingFSI.pyx":1105
104944  * self.M_Aij_last = np.array(self.M_Aij)
104945  *
104946  * def getValues(self): # <<<<<<<<<<<<<<
104947  * """Get values (pos, vel, acc, etc.) from C++ to python
104948  * """
104949  */
104950  __pyx_tuple__290 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 1105, __pyx_L1_error)
104951  __Pyx_GOTREF(__pyx_tuple__290);
104952  __Pyx_GIVEREF(__pyx_tuple__290);
104953  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getValues, 1105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1105, __pyx_L1_error)
104954 
104955  /* "mbd/CouplingFSI.pyx":1135
104956  *
104957  *
104958  * def setRecordValues(self, all_values=False, pos=False, # <<<<<<<<<<<<<<
104959  * rot=False, ang_disp=False, F=False, M=False,
104960  * inertia=False, vel=False, acc=False, ang_vel=False,
104961  */
104962  __pyx_tuple__291 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_all_values, __pyx_n_s_pos, __pyx_n_s_rot, __pyx_n_s_ang_disp, __pyx_n_s_F, __pyx_n_s_M, __pyx_n_s_inertia, __pyx_n_s_vel, __pyx_n_s_acc, __pyx_n_s_ang_vel, __pyx_n_s_ang_acc, __pyx_n_s_h_predict_2, __pyx_n_s_Fx, __pyx_n_s_Fy, __pyx_n_s_Fz); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 1135, __pyx_L1_error)
104963  __Pyx_GOTREF(__pyx_tuple__291);
104964  __Pyx_GIVEREF(__pyx_tuple__291);
104965  __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(13, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setRecordValues, 1135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 1135, __pyx_L1_error)
104966 
104967  /* "mbd/CouplingFSI.pyx":1236
104968  * self.record_dict['hz'] = ['h_predict', 2]
104969  *
104970  * def _recordValues(self): # <<<<<<<<<<<<<<
104971  * """Records values of body attributes in a csv file.
104972  * """
104973  */
104974  __pyx_tuple__292 = PyTuple_Pack(15, __pyx_n_s_self, __pyx_n_s_record_file, __pyx_n_s_t_chrono, __pyx_n_s_t_last, __pyx_n_s_dt_last, __pyx_n_s_t, __pyx_n_s_t_sim, __pyx_n_s_values_towrite, __pyx_n_s_headers, __pyx_n_s_key, __pyx_n_s_csvfile, __pyx_n_s_writer, __pyx_n_s_val, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 1236, __pyx_L1_error)
104975  __Pyx_GOTREF(__pyx_tuple__292);
104976  __Pyx_GIVEREF(__pyx_tuple__292);
104977  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 0, 15, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_recordValues, 1236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1236, __pyx_L1_error)
104978 
104979  /* "mbd/CouplingFSI.pyx":1287
104980  * Profiling.logEvent('finished recording values file of '+str(self.name))
104981  *
104982  * def _recordH5(self): # <<<<<<<<<<<<<<
104983  * Profiling.logEvent('recording h5 file of '+str(self.name))
104984  * tCount = self.ProtChSystem.tCount
104985  */
104986  __pyx_tuple__293 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_tCount, __pyx_n_s_hdfFileName, __pyx_n_s_f, __pyx_n_s_poss, __pyx_n_s_element_connection, __pyx_n_s_pos, __pyx_n_s_i, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 1287, __pyx_L1_error)
104987  __Pyx_GOTREF(__pyx_tuple__293);
104988  __Pyx_GIVEREF(__pyx_tuple__293);
104989  __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(1, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_recordH5, 1287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 1287, __pyx_L1_error)
104990 
104991  /* "mbd/CouplingFSI.pyx":1309
104992  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
104993  *
104994  * def _recordXML(self): # <<<<<<<<<<<<<<
104995  * Profiling.logEvent('recording xml file of '+str(self.name))
104996  * tCount = self.ProtChSystem.tCount
104997  */
104998  __pyx_tuple__294 = PyTuple_Pack(25, __pyx_n_s_self, __pyx_n_s_tCount, __pyx_n_s_t, __pyx_n_s_xmlFile, __pyx_n_s_root, __pyx_n_s_domain, __pyx_n_s_arGridCollection, __pyx_n_s_Xdmf_ElementTopology, __pyx_n_s_pos, __pyx_n_s_el, __pyx_n_s_Xdmf_NumberOfElements, __pyx_n_s_Xdmf_NodesPerElement, __pyx_n_s_dataItemFormat, __pyx_n_s_arGrid, __pyx_n_s_arTime, __pyx_n_s_topology, __pyx_n_s_elements, __pyx_n_s_geometry, __pyx_n_s_nodes, __pyx_n_s_tree, __pyx_n_s_f, __pyx_n_s_xmlHeader, __pyx_n_s_hdfFileName, __pyx_n_s_datav, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 1309, __pyx_L1_error)
104999  __Pyx_GOTREF(__pyx_tuple__294);
105000  __Pyx_GIVEREF(__pyx_tuple__294);
105001  __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(1, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_recordXML, 1309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 1309, __pyx_L1_error)
105002 
105003  /* "mbd/CouplingFSI.pyx":1385
105004  *
105005  *
105006  * def addPrismaticLinksWithSpring(self, np.ndarray pris1, # <<<<<<<<<<<<<<
105007  * np.ndarray pris2, double stiffness, double damping,
105008  * double rest_length):
105009  */
105010  __pyx_tuple__295 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_pris1, __pyx_n_s_pris2, __pyx_n_s_stiffness, __pyx_n_s_damping, __pyx_n_s_rest_length); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 1385, __pyx_L1_error)
105011  __Pyx_GOTREF(__pyx_tuple__295);
105012  __Pyx_GIVEREF(__pyx_tuple__295);
105013  __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_addPrismaticLinksWithSpring, 1385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 1385, __pyx_L1_error)
105014 
105015  /* "mbd/CouplingFSI.pyx":1403
105016  * damping,
105017  * rest_length)
105018  * def addPrismaticLinkX(self, double[:] pris1): # <<<<<<<<<<<<<<
105019  * self.thisptr.addPrismaticLinkX(&pris1[0]);
105020  *
105021  */
105022  __pyx_tuple__296 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_pris1, __pyx_n_s_pris1); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 1403, __pyx_L1_error)
105023  __Pyx_GOTREF(__pyx_tuple__296);
105024  __Pyx_GIVEREF(__pyx_tuple__296);
105025  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_addPrismaticLinkX, 1403, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1403, __pyx_L1_error)
105026 
105027  /* "mbd/CouplingFSI.pyx":1406
105028  * self.thisptr.addPrismaticLinkX(&pris1[0]);
105029  *
105030  * def setName(self, string name): # <<<<<<<<<<<<<<
105031  * """Sets name of body (used for csv file)
105032  *
105033  */
105034  __pyx_tuple__297 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_name); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 1406, __pyx_L1_error)
105035  __Pyx_GOTREF(__pyx_tuple__297);
105036  __Pyx_GIVEREF(__pyx_tuple__297);
105037  __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setName, 1406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 1406, __pyx_L1_error)
105038 
105039  /* "(tree fragment)":1
105040  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
105041  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105042  * def __setstate_cython__(self, __pyx_state):
105043  */
105044  __pyx_tuple__298 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(1, 1, __pyx_L1_error)
105045  __Pyx_GOTREF(__pyx_tuple__298);
105046  __Pyx_GIVEREF(__pyx_tuple__298);
105047  __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(1, 1, __pyx_L1_error)
105048 
105049  /* "(tree fragment)":3
105050  * def __reduce_cython__(self):
105051  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105052  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
105053  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105054  */
105055  __pyx_tuple__299 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(1, 3, __pyx_L1_error)
105056  __Pyx_GOTREF(__pyx_tuple__299);
105057  __Pyx_GIVEREF(__pyx_tuple__299);
105058  __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(1, 3, __pyx_L1_error)
105059 
105060  /* "mbd/CouplingFSI.pyx":1462
105061  * self.log_chrono_residuals = None
105062  *
105063  * def getChronoObject(self): # <<<<<<<<<<<<<<
105064  * return self.ChSystem
105065  *
105066  */
105067  __pyx_tuple__300 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 1462, __pyx_L1_error)
105068  __Pyx_GOTREF(__pyx_tuple__300);
105069  __Pyx_GIVEREF(__pyx_tuple__300);
105070  __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getChronoObject, 1462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1462, __pyx_L1_error)
105071 
105072  /* "mbd/CouplingFSI.pyx":1465
105073  * return self.ChSystem
105074  *
105075  * def setTimeStep(self, double dt): # <<<<<<<<<<<<<<
105076  * """Sets time step for Chrono solver.
105077  * Calculations in Chrono will use this time step within the
105078  */
105079  __pyx_tuple__301 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_dt, __pyx_n_s_dt); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 1465, __pyx_L1_error)
105080  __Pyx_GOTREF(__pyx_tuple__301);
105081  __Pyx_GIVEREF(__pyx_tuple__301);
105082  __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setTimeStep, 1465, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 1465, __pyx_L1_error)
105083 
105084  /* "mbd/CouplingFSI.pyx":1477
105085  * self.thisptr.chrono_dt = dt
105086  *
105087  * def setSampleRate(self, sampleRate): # <<<<<<<<<<<<<<
105088  * self.sampleRate = sampleRate
105089  *
105090  */
105091  __pyx_tuple__302 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_sampleRate); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 1477, __pyx_L1_error)
105092  __Pyx_GOTREF(__pyx_tuple__302);
105093  __Pyx_GIVEREF(__pyx_tuple__302);
105094  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setSampleRate, 1477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 1477, __pyx_L1_error)
105095 
105096  /* "mbd/CouplingFSI.pyx":1480
105097  * self.sampleRate = sampleRate
105098  *
105099  * def addProtChBody(self, ProtChBody body): # <<<<<<<<<<<<<<
105100  * # self.ChSystemSMC.Add(body.ChBody)
105101  * self.ChSystem.Add(body.ChBody)
105102  */
105103  __pyx_tuple__303 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_body); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 1480, __pyx_L1_error)
105104  __Pyx_GOTREF(__pyx_tuple__303);
105105  __Pyx_GIVEREF(__pyx_tuple__303);
105106  __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_addProtChBody, 1480, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1480, __pyx_L1_error)
105107 
105108  /* "mbd/CouplingFSI.pyx":1486
105109  * self.addSubcomponent(body) # add body to system (for pre and post steps)
105110  *
105111  * def addProtChMesh(self, ProtChMesh mesh): # <<<<<<<<<<<<<<
105112  * self.thisptr.addMesh(mesh.mesh)
105113  * mesh.ProtChSystem = self
105114  */
105115  __pyx_tuple__304 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_mesh); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 1486, __pyx_L1_error)
105116  __Pyx_GOTREF(__pyx_tuple__304);
105117  __Pyx_GIVEREF(__pyx_tuple__304);
105118  __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_addProtChMesh, 1486, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 1486, __pyx_L1_error)
105119 
105120  /* "mbd/CouplingFSI.pyx":1490
105121  * mesh.ProtChSystem = self
105122  *
105123  * def setGravitationalAcceleration(self, g): # <<<<<<<<<<<<<<
105124  * chvec = chrono.ChVectorD(g[0], g[1], g[2])
105125  * self.ChSystem.Set_G_acc(chvec)
105126  */
105127  __pyx_tuple__305 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_g, __pyx_n_s_chvec); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 1490, __pyx_L1_error)
105128  __Pyx_GOTREF(__pyx_tuple__305);
105129  __Pyx_GIVEREF(__pyx_tuple__305);
105130  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setGravitationalAcceleration, 1490, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 1490, __pyx_L1_error)
105131 
105132  /* "mbd/CouplingFSI.pyx":1494
105133  * self.ChSystem.Set_G_acc(chvec)
105134  *
105135  * def getGravitationalAcceleration(self): # <<<<<<<<<<<<<<
105136  * return pyvec2array(self.ChSystem.Get_G_acc())
105137  *
105138  */
105139  __pyx_tuple__306 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 1494, __pyx_L1_error)
105140  __Pyx_GOTREF(__pyx_tuple__306);
105141  __Pyx_GIVEREF(__pyx_tuple__306);
105142  __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getGravitationalAcceleration, 1494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1494, __pyx_L1_error)
105143 
105144  /* "mbd/CouplingFSI.pyx":1497
105145  * return pyvec2array(self.ChSystem.Get_G_acc())
105146  *
105147  * def setCouplingScheme(self, string scheme, string prediction='backwardEuler'): # <<<<<<<<<<<<<<
105148  * assert scheme == "CSS" or scheme == "ISS", "Coupling scheme requested unknown"
105149  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown"
105150  */
105151  __pyx_tuple__307 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_scheme, __pyx_n_s_prediction); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 1497, __pyx_L1_error)
105152  __Pyx_GOTREF(__pyx_tuple__307);
105153  __Pyx_GIVEREF(__pyx_tuple__307);
105154  __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setCouplingScheme, 1497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 1497, __pyx_L1_error)
105155 
105156  /* "mbd/CouplingFSI.pyx":1503
105157  * self.prediction = prediction
105158  *
105159  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
105160  * """Attaches Proteus model to auxiliary variable
105161  * """
105162  */
105163  __pyx_tuple__308 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_model, __pyx_n_s_ar, __pyx_n_s_c); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 1503, __pyx_L1_error)
105164  __Pyx_GOTREF(__pyx_tuple__308);
105165  __Pyx_GIVEREF(__pyx_tuple__308);
105166  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachModel, 1503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 1503, __pyx_L1_error)
105167 
105168  /* "mbd/CouplingFSI.pyx":1510
105169  * return self
105170  *
105171  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
105172  * pass
105173  *
105174  */
105175  __pyx_tuple__309 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_avDict); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 1510, __pyx_L1_error)
105176  __Pyx_GOTREF(__pyx_tuple__309);
105177  __Pyx_GIVEREF(__pyx_tuple__309);
105178  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachAuxiliaryVariables, 1510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 1510, __pyx_L1_error)
105179 
105180  /* "mbd/CouplingFSI.pyx":1513
105181  * pass
105182  *
105183  * def setMinimumSubsteps(self, int nb): # <<<<<<<<<<<<<<
105184  * """Sets the minimum nb of chrono substeps per proteus step
105185  * if prot_dt=0.001 and ch_dt=0.002, there will be <nb>
105186  */
105187  __pyx_tuple__310 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_nb, __pyx_n_s_nb); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 1513, __pyx_L1_error)
105188  __Pyx_GOTREF(__pyx_tuple__310);
105189  __Pyx_GIVEREF(__pyx_tuple__310);
105190  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setMinimumSubsteps, 1513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 1513, __pyx_L1_error)
105191 
105192  /* "mbd/CouplingFSI.pyx":1525
105193  * self.min_nb_steps = nb
105194  *
105195  * def step(self, dt): # <<<<<<<<<<<<<<
105196  * self.dt_fluid_last = self.dt_fluid
105197  * self.dt_fluid = dt
105198  */
105199  __pyx_tuple__311 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_dt, __pyx_n_s_nb_steps, __pyx_n_s_comm, __pyx_n_s_t, __pyx_n_s_dt_substep, __pyx_n_s_i, __pyx_n_s_s); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 1525, __pyx_L1_error)
105200  __Pyx_GOTREF(__pyx_tuple__311);
105201  __Pyx_GIVEREF(__pyx_tuple__311);
105202  __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_step, 1525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 1525, __pyx_L1_error)
105203 
105204  /* "mbd/CouplingFSI.pyx":1564
105205  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.))
105206  *
105207  * def calculate(self, proteus_dt=None): # <<<<<<<<<<<<<<
105208  * """Does chrono system calculation for a Proteus time step
105209  * Calls prestep and poststep on all subcomponents (bodies,
105210  */
105211  __pyx_tuple__312 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_proteus_dt, __pyx_n_s_t, __pyx_n_s_time, __pyx_n_s_s); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 1564, __pyx_L1_error)
105212  __Pyx_GOTREF(__pyx_tuple__312);
105213  __Pyx_GIVEREF(__pyx_tuple__312);
105214  __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_calculate, 1564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 1564, __pyx_L1_error)
105215 
105216  /* "mbd/CouplingFSI.pyx":1634
105217  * Profiling.logEvent("Chrono poststep finished")
105218  *
105219  * def calculate_init(self): # <<<<<<<<<<<<<<
105220  * """Does chrono system initialisation
105221  * (!) Must be called before the first calculate() call.
105222  */
105223  __pyx_tuple__313 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_s, __pyx_n_s_c, __pyx_n_s_i); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 1634, __pyx_L1_error)
105224  __Pyx_GOTREF(__pyx_tuple__313);
105225  __Pyx_GIVEREF(__pyx_tuple__313);
105226  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_calculate_init, 1634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 1634, __pyx_L1_error)
105227 
105228  /* "mbd/CouplingFSI.pyx":1687
105229  * s.poststep()
105230  *
105231  * def setTimestepperType(self, string tstype, bool verbose=False): # <<<<<<<<<<<<<<
105232  * """Change timestepper (default: Euler)
105233  *
105234  */
105235  __pyx_tuple__314 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tstype, __pyx_n_s_verbose, __pyx_n_s_tstypes); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 1687, __pyx_L1_error)
105236  __Pyx_GOTREF(__pyx_tuple__314);
105237  __Pyx_GIVEREF(__pyx_tuple__314);
105238  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setTimestepperType, 1687, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 1687, __pyx_L1_error)
105239 
105240  /* "mbd/CouplingFSI.pyx":1699
105241  * self.thisptr.setTimestepperType(tstype, verbose)
105242  *
105243  * def addSubcomponent(self, subcomponent): # <<<<<<<<<<<<<<
105244  * """Adds subcomponent to system
105245  * calculate_init() of subcomponent called before initial timestep
105246  */
105247  __pyx_tuple__315 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_subcomponent); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 1699, __pyx_L1_error)
105248  __Pyx_GOTREF(__pyx_tuple__315);
105249  __Pyx_GIVEREF(__pyx_tuple__315);
105250  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__315, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_addSubcomponent, 1699, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 1699, __pyx_L1_error)
105251 
105252  /* "mbd/CouplingFSI.pyx":1711
105253  * self.subcomponents += [subcomponent]
105254  *
105255  * def findElementContainingCoordsKD(self, coords): # <<<<<<<<<<<<<<
105256  * """
105257  * k-d tree search of nearest node, element containing coords, and owning
105258  */
105259  __pyx_tuple__317 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_coords, __pyx_n_s_comm, __pyx_n_s_owning_proc, __pyx_n_s_xi, __pyx_n_s_element, __pyx_n_s_local_element, __pyx_n_s_nearest_node, __pyx_n_s_nearest_node_distance, __pyx_n_s__316, __pyx_n_s_eN, __pyx_n_s_rank, __pyx_n_s_node); if (unlikely(!__pyx_tuple__317)) __PYX_ERR(0, 1711, __pyx_L1_error)
105260  __Pyx_GOTREF(__pyx_tuple__317);
105261  __Pyx_GIVEREF(__pyx_tuple__317);
105262  __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__317, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_findElementContainingCoordsKD, 1711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 1711, __pyx_L1_error)
105263 
105264  /* "mbd/CouplingFSI.pyx":1761
105265  *
105266  *
105267  * def findElementContainingCoordsDist(self, # <<<<<<<<<<<<<<
105268  * coords,
105269  * node_guess,
105270  */
105271  __pyx_tuple__318 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_coords, __pyx_n_s_node_guess, __pyx_n_s_eN_guess, __pyx_n_s_rank_guess, __pyx_n_s_mm, __pyx_n_s_mg, __pyx_n_s_comm, __pyx_n_s_xi, __pyx_n_s_local_element, __pyx_n_s_rank_owning, __pyx_n_s_nearest_node, __pyx_n_s_coords_outside, __pyx_n_s_rank_owning_previous, __pyx_n_s_owning_rank, __pyx_n_s_dist, __pyx_n_s_node_nb_global, __pyx_n_s_new_rank, __pyx_n_s_i, __pyx_n_s__316, __pyx_n_s_eN, __pyx_n_s_rank, __pyx_n_s_node); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 1761, __pyx_L1_error)
105272  __Pyx_GOTREF(__pyx_tuple__318);
105273  __Pyx_GIVEREF(__pyx_tuple__318);
105274  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(5, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_findElementContainingCoordsDist, 1761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 1761, __pyx_L1_error)
105275 
105276  /* "mbd/CouplingFSI.pyx":1862
105277  * return xi, node, eN, rank
105278  *
105279  * def getFluidVelocityLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
105280  * """
105281  * Parameters
105282  */
105283  __pyx_tuple__319 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_xi, __pyx_n_s_element, __pyx_n_s_rank, __pyx_n_s_comm, __pyx_n_s_u, __pyx_n_s_v, __pyx_n_s_w); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 1862, __pyx_L1_error)
105284  __Pyx_GOTREF(__pyx_tuple__319);
105285  __Pyx_GIVEREF(__pyx_tuple__319);
105286  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getFluidVelocityLocalCoords, 1862, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 1862, __pyx_L1_error)
105287 
105288  /* "mbd/CouplingFSI.pyx":1891
105289  * return u, v, w
105290  *
105291  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
105292  * comm = Comm.get().comm.tompi4py()
105293  * if comm.rank == rank:
105294  */
105295  __pyx_tuple__320 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_xi, __pyx_n_s_element, __pyx_n_s_rank, __pyx_n_s_comm, __pyx_n_s_u_grad, __pyx_n_s_v_grad, __pyx_n_s_w_grad); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 1891, __pyx_L1_error)
105296  __Pyx_GOTREF(__pyx_tuple__320);
105297  __Pyx_GIVEREF(__pyx_tuple__320);
105298  __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getFluidVelocityGradientLocalCoo, 1891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(0, 1891, __pyx_L1_error)
105299 
105300  /* "mbd/CouplingFSI.pyx":1906
105301  * return u_grad, v_grad, w_grad
105302  *
105303  * def setCollisionEnvelopeMargin(self, double envelope, double margin): # <<<<<<<<<<<<<<
105304  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
105305  *
105306  */
105307  __pyx_tuple__321 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_envelope, __pyx_n_s_margin); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 1906, __pyx_L1_error)
105308  __Pyx_GOTREF(__pyx_tuple__321);
105309  __Pyx_GIVEREF(__pyx_tuple__321);
105310  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setCollisionEnvelopeMargin, 1906, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 1906, __pyx_L1_error)
105311 
105312  /* "mbd/CouplingFSI.pyx":1909
105313  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
105314  *
105315  * def log_bodies_text(self, d_time, l_logging_info): # <<<<<<<<<<<<<<
105316  * """
105317  * Logs the chrono information into a text file at each timestep
105318  */
105319  __pyx_tuple__322 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_d_time, __pyx_n_s_l_logging_info, __pyx_n_s_s_filename, __pyx_n_s_o_file, __pyx_n_s_i_entry_body, __pyx_n_s_o_body, __pyx_n_s_o_body_position, __pyx_n_s_o_body_rotation, __pyx_n_s_o_body_force, __pyx_n_s_o_body_torque); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 1909, __pyx_L1_error)
105320  __Pyx_GOTREF(__pyx_tuple__322);
105321  __Pyx_GIVEREF(__pyx_tuple__322);
105322  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_log_bodies_text, 1909, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 1909, __pyx_L1_error)
105323 
105324  /* "mbd/CouplingFSI.pyx":1972
105325  *
105326  *
105327  * def log_bodies_h5(self, l_logging_info): # <<<<<<<<<<<<<<
105328  * """
105329  * Logs the chrono information into a h5 file at each timestep
105330  */
105331  __pyx_tuple__323 = PyTuple_Pack(18, __pyx_n_s_self, __pyx_n_s_l_logging_info, __pyx_n_s_o_file, __pyx_n_s_l_position, __pyx_n_s_l_rotation, __pyx_n_s_l_force, __pyx_n_s_l_torque, __pyx_n_s_i_entry_body, __pyx_n_s_o_body, __pyx_n_s_o_body_position, __pyx_n_s_o_body_rotation, __pyx_n_s_o_body_force, __pyx_n_s_o_body_torque, __pyx_n_s_dm_position, __pyx_n_s_i_index, __pyx_n_s_dm_rotation, __pyx_n_s_dm_force, __pyx_n_s_dm_torque); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 1972, __pyx_L1_error)
105332  __Pyx_GOTREF(__pyx_tuple__323);
105333  __Pyx_GIVEREF(__pyx_tuple__323);
105334  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(2, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__323, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_log_bodies_h5, 1972, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 1972, __pyx_L1_error)
105335 
105336  /* "mbd/CouplingFSI.pyx":2113
105337  *
105338  *
105339  * def log_springs_text(self, d_time, l_springs): # <<<<<<<<<<<<<<
105340  * """
105341  * Logs the chrono information into a text file at each timestep
105342  */
105343  __pyx_tuple__324 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_d_time, __pyx_n_s_l_springs, __pyx_n_s_s_filename, __pyx_n_s_o_file, __pyx_n_s_i_entry_spring, __pyx_n_s_d_internal_force, __pyx_n_s_d_spring_velocity, __pyx_n_s_d_spring_length); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 2113, __pyx_L1_error)
105344  __Pyx_GOTREF(__pyx_tuple__324);
105345  __Pyx_GIVEREF(__pyx_tuple__324);
105346  __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_log_springs_text, 2113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(0, 2113, __pyx_L1_error)
105347 
105348  /* "mbd/CouplingFSI.pyx":2148
105349  *
105350  *
105351  * def log_springs_h5(self, l_springs): # <<<<<<<<<<<<<<
105352  * """
105353  * Logs chrono spring information to an h5 file
105354  */
105355  __pyx_tuple__325 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_l_springs, __pyx_n_s_o_file, __pyx_n_s_l_spring_data, __pyx_n_s_i_entry_spring, __pyx_n_s_d_internal_force, __pyx_n_s_d_spring_velocity, __pyx_n_s_d_spring_length, __pyx_n_s_dm_springs, __pyx_n_s_i_index); if (unlikely(!__pyx_tuple__325)) __PYX_ERR(0, 2148, __pyx_L1_error)
105356  __Pyx_GOTREF(__pyx_tuple__325);
105357  __Pyx_GIVEREF(__pyx_tuple__325);
105358  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__325, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_log_springs_h5, 2148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 2148, __pyx_L1_error)
105359 
105360  /* "mbd/CouplingFSI.pyx":2201
105361  * o_file.close()
105362  *
105363  * def log_residuals_text(self, d_time, l_linklocks): # <<<<<<<<<<<<<<
105364  * """
105365  * Logs the chrono information into a text file at each timestep
105366  */
105367  __pyx_tuple__326 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_d_time, __pyx_n_s_l_linklocks, __pyx_n_s_i_entry_linkage, __pyx_n_s_s_filename, __pyx_n_s_o_file, __pyx_n_s_o_linkage_residual, __pyx_n_s_s_residuals, __pyx_n_s_i_entry_residual); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 2201, __pyx_L1_error)
105368  __Pyx_GOTREF(__pyx_tuple__326);
105369  __Pyx_GIVEREF(__pyx_tuple__326);
105370  __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(3, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_log_residuals_text, 2201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(0, 2201, __pyx_L1_error)
105371 
105372  /* "mbd/CouplingFSI.pyx":2248
105373  * o_file.close()
105374  *
105375  * def log_residuals_h5(self, l_linklocks): # <<<<<<<<<<<<<<
105376  * """
105377  * Logs chrono spring information to an h5 file
105378  */
105379  __pyx_tuple__327 = PyTuple_Pack(9, __pyx_n_s_self, __pyx_n_s_l_linklocks, __pyx_n_s_o_file, __pyx_n_s_dm_residuals, __pyx_n_s_i_entry_linkage, __pyx_n_s_o_linkage_residual, __pyx_n_s_i_entry_residual, __pyx_n_s_dm_residuals_h5, __pyx_n_s_i_index); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 2248, __pyx_L1_error)
105380  __Pyx_GOTREF(__pyx_tuple__327);
105381  __Pyx_GIVEREF(__pyx_tuple__327);
105382  __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_log_residuals_h5, 2248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(0, 2248, __pyx_L1_error)
105383 
105384  /* "mbd/CouplingFSI.pyx":2306
105385  *
105386  *
105387  * def log_times_h5(self, d_time): # <<<<<<<<<<<<<<
105388  * """
105389  * Creates a log of the Proteus timestep within the h5 log file
105390  */
105391  __pyx_tuple__328 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_d_time, __pyx_n_s_o_file, __pyx_n_s_dm_time, __pyx_n_s_i_index); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 2306, __pyx_L1_error)
105392  __Pyx_GOTREF(__pyx_tuple__328);
105393  __Pyx_GIVEREF(__pyx_tuple__328);
105394  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_log_times_h5, 2306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 2306, __pyx_L1_error)
105395 
105396  /* "(tree fragment)":1
105397  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
105398  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105399  * def __setstate_cython__(self, __pyx_state):
105400  */
105401  __pyx_tuple__329 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(1, 1, __pyx_L1_error)
105402  __Pyx_GOTREF(__pyx_tuple__329);
105403  __Pyx_GIVEREF(__pyx_tuple__329);
105404  __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__329, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(1, 1, __pyx_L1_error)
105405 
105406  /* "(tree fragment)":3
105407  * def __reduce_cython__(self):
105408  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105409  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
105410  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105411  */
105412  __pyx_tuple__330 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(1, 3, __pyx_L1_error)
105413  __Pyx_GOTREF(__pyx_tuple__330);
105414  __Pyx_GIVEREF(__pyx_tuple__330);
105415  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(1, 3, __pyx_L1_error)
105416 
105417  /* "mbd/CouplingFSI.pyx":2415
105418  * system.addProtChMesh(self)
105419  *
105420  * def getChronoObject(self): # <<<<<<<<<<<<<<
105421  * return self.ChMeshh
105422  *
105423  */
105424  __pyx_tuple__331 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__331)) __PYX_ERR(0, 2415, __pyx_L1_error)
105425  __Pyx_GOTREF(__pyx_tuple__331);
105426  __Pyx_GIVEREF(__pyx_tuple__331);
105427  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__331, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getChronoObject, 2415, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 2415, __pyx_L1_error)
105428 
105429  /* "(tree fragment)":1
105430  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
105431  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105432  * def __setstate_cython__(self, __pyx_state):
105433  */
105434  __pyx_tuple__332 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(1, 1, __pyx_L1_error)
105435  __Pyx_GOTREF(__pyx_tuple__332);
105436  __Pyx_GIVEREF(__pyx_tuple__332);
105437  __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(1, 1, __pyx_L1_error)
105438 
105439  /* "(tree fragment)":3
105440  * def __reduce_cython__(self):
105441  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105442  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
105443  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105444  */
105445  __pyx_tuple__333 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(1, 3, __pyx_L1_error)
105446  __Pyx_GOTREF(__pyx_tuple__333);
105447  __Pyx_GIVEREF(__pyx_tuple__333);
105448  __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(1, 3, __pyx_L1_error)
105449 
105450  /* "mbd/CouplingFSI.pyx":2520
105451  * self.tCount = 0
105452  *
105453  * def setName(self, string name): # <<<<<<<<<<<<<<
105454  * """Sets name of cable, used for csv file
105455  *
105456  */
105457  __pyx_tuple__334 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_name, __pyx_n_s_name); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 2520, __pyx_L1_error)
105458  __Pyx_GOTREF(__pyx_tuple__334);
105459  __Pyx_GIVEREF(__pyx_tuple__334);
105460  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setName, 2520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 2520, __pyx_L1_error)
105461 
105462  /* "mbd/CouplingFSI.pyx":2530
105463  * self.name = name
105464  *
105465  * def recordStrainEta(self, double[:] etas): # <<<<<<<<<<<<<<
105466  * self._record_etas = etas
105467  * self._record_etas_names = []
105468  */
105469  __pyx_tuple__335 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_etas, __pyx_n_s_etas, __pyx_n_s_i, __pyx_n_s_eta); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 2530, __pyx_L1_error)
105470  __Pyx_GOTREF(__pyx_tuple__335);
105471  __Pyx_GIVEREF(__pyx_tuple__335);
105472  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__335, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_recordStrainEta, 2530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 2530, __pyx_L1_error)
105473 
105474  /* "mbd/CouplingFSI.pyx":2539
105475  * 'sz'+str(eta)]
105476  *
105477  * def _recordH5(self): # <<<<<<<<<<<<<<
105478  * Profiling.logEvent('recording h5 file of '+str(self.name))
105479  * tCount = self.tCount
105480  */
105481  __pyx_tuple__336 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_tCount, __pyx_n_s_t, __pyx_n_s_hdfFileName, __pyx_n_s_f, __pyx_n_s_pos, __pyx_n_s_element_connection, __pyx_n_s_dset, __pyx_n_s_datav, __pyx_n_s_i, __pyx_n_s_eta); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 2539, __pyx_L1_error)
105482  __Pyx_GOTREF(__pyx_tuple__336);
105483  __Pyx_GIVEREF(__pyx_tuple__336);
105484  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_recordH5, 2539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 2539, __pyx_L1_error)
105485 
105486  /* "mbd/CouplingFSI.pyx":2635
105487  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
105488  *
105489  * def _recordXML(self): # <<<<<<<<<<<<<<
105490  * Profiling.logEvent('recording xml file of '+str(self.name))
105491  * tCount = self.tCount
105492  */
105493  __pyx_tuple__337 = PyTuple_Pack(28, __pyx_n_s_self, __pyx_n_s_tCount, __pyx_n_s_t, __pyx_n_s_xmlFile, __pyx_n_s_root, __pyx_n_s_domain, __pyx_n_s_arGridCollection, __pyx_n_s_Xdmf_ElementTopology, __pyx_n_s_pos, __pyx_n_s_Xdmf_NumberOfElements, __pyx_n_s_Xdmf_NodesPerElement, __pyx_n_s_dataItemFormat, __pyx_n_s_arGrid, __pyx_n_s_arTime, __pyx_n_s_topology, __pyx_n_s_elements, __pyx_n_s_geometry, __pyx_n_s_nodes, __pyx_n_s_all_names, __pyx_n_s_name, __pyx_n_s_attr, __pyx_n_s_data, __pyx_n_s_tree, __pyx_n_s_f, __pyx_n_s_xmlHeader, __pyx_n_s_hdfFileName, __pyx_n_s_datav, __pyx_n_s_dset); if (unlikely(!__pyx_tuple__337)) __PYX_ERR(0, 2635, __pyx_L1_error)
105494  __Pyx_GOTREF(__pyx_tuple__337);
105495  __Pyx_GIVEREF(__pyx_tuple__337);
105496  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 28, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__337, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_recordXML, 2635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 2635, __pyx_L1_error)
105497 
105498  /* "mbd/CouplingFSI.pyx":2725
105499  * Profiling.logEvent('finished recording xmf file of '+str(self.name))
105500  *
105501  * def _recordValues(self): # <<<<<<<<<<<<<<
105502  * """Records values in csv files
105503  * """
105504  */
105505  __pyx_tuple__338 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_record, __pyx_n_s_record, __pyx_n_s_t_chrono, __pyx_n_s_t_last, __pyx_n_s_dt_last, __pyx_n_s_t, __pyx_n_s_t_sim, __pyx_n_s_header_x, __pyx_n_s_i, __pyx_n_s_file_name, __pyx_n_s_row, __pyx_n_s_Tb, __pyx_n_s_Tf); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 2725, __pyx_L1_error)
105506  __Pyx_GOTREF(__pyx_tuple__338);
105507  __Pyx_GIVEREF(__pyx_tuple__338);
105508  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(1, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_recordValues, 2725, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 2725, __pyx_L1_error)
105509 
105510  /* "mbd/CouplingFSI.pyx":2825
105511  * Profiling.logEvent('finished recording values file of '+str(self.name))
105512  *
105513  * def getTensionBack(self): # <<<<<<<<<<<<<<
105514  * """
105515  * Get Tension at the back of the cable
105516  */
105517  __pyx_tuple__339 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_T); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 2825, __pyx_L1_error)
105518  __Pyx_GOTREF(__pyx_tuple__339);
105519  __Pyx_GIVEREF(__pyx_tuple__339);
105520  __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getTensionBack, 2825, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 2825, __pyx_L1_error)
105521 
105522  /* "mbd/CouplingFSI.pyx":2836
105523  * return np.zeros(3)
105524  *
105525  * def getTensionFront(self): # <<<<<<<<<<<<<<
105526  * """
105527  * Get Tension at the front of the cable
105528  */
105529  __pyx_tuple__340 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_T); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 2836, __pyx_L1_error)
105530  __Pyx_GOTREF(__pyx_tuple__340);
105531  __Pyx_GIVEREF(__pyx_tuple__340);
105532  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getTensionFront, 2836, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 2836, __pyx_L1_error)
105533 
105534  /* "mbd/CouplingFSI.pyx":2847
105535  * return np.zeros(3)
105536  *
105537  * def calculate_init(self): # <<<<<<<<<<<<<<
105538  * # build position vector of nodes (for each segment)
105539  * # self.setNodesPosition()
105540  */
105541  __pyx_tuple__341 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_nb_nodes); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 2847, __pyx_L1_error)
105542  __Pyx_GOTREF(__pyx_tuple__341);
105543  __Pyx_GIVEREF(__pyx_tuple__341);
105544  __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_calculate_init, 2847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 2847, __pyx_L1_error)
105545 
105546  /* "mbd/CouplingFSI.pyx":2867
105547  * self.owning_rank = np.zeros(nb_nodes, dtype=np.int32)
105548  *
105549  * def prestep(self): # <<<<<<<<<<<<<<
105550  * """Sets external forces on the cable (if any)
105551  * """
105552  */
105553  __pyx_tuple__342 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 2867, __pyx_L1_error)
105554  __Pyx_GOTREF(__pyx_tuple__342);
105555  __Pyx_GIVEREF(__pyx_tuple__342);
105556  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_prestep, 2867, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 2867, __pyx_L1_error)
105557 
105558  /* "mbd/CouplingFSI.pyx":2875
105559  * self.setExternalForces()
105560  *
105561  * def poststep(self): # <<<<<<<<<<<<<<
105562  * """Records values
105563  * """
105564  */
105565  __pyx_tuple__343 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_comm); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 2875, __pyx_L1_error)
105566  __Pyx_GOTREF(__pyx_tuple__343);
105567  __Pyx_GIVEREF(__pyx_tuple__343);
105568  __pyx_codeobj__163 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_poststep, 2875, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__163)) __PYX_ERR(0, 2875, __pyx_L1_error)
105569 
105570  /* "mbd/CouplingFSI.pyx":2887
105571  * self.tCount += 1
105572  *
105573  * def setApplyDrag(self, bool boolval): # <<<<<<<<<<<<<<
105574  * for i in range(self.thisptr.cables.size()):
105575  * deref(self.thisptr.cables[i]).applyDrag = boolval
105576  */
105577  __pyx_tuple__344 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_boolval, __pyx_n_s_boolval, __pyx_n_s_i); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 2887, __pyx_L1_error)
105578  __Pyx_GOTREF(__pyx_tuple__344);
105579  __Pyx_GIVEREF(__pyx_tuple__344);
105580  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__344, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setApplyDrag, 2887, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 2887, __pyx_L1_error)
105581 
105582  /* "mbd/CouplingFSI.pyx":2891
105583  * deref(self.thisptr.cables[i]).applyDrag = boolval
105584  *
105585  * def setApplyAddedMass(self, bool boolval): # <<<<<<<<<<<<<<
105586  * for i in range(self.thisptr.cables.size()):
105587  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
105588  */
105589  __pyx_tuple__345 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_boolval, __pyx_n_s_boolval, __pyx_n_s_i); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 2891, __pyx_L1_error)
105590  __Pyx_GOTREF(__pyx_tuple__345);
105591  __Pyx_GIVEREF(__pyx_tuple__345);
105592  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setApplyAddedMass, 2891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 2891, __pyx_L1_error)
105593 
105594  /* "mbd/CouplingFSI.pyx":2895
105595  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
105596  *
105597  * def setApplyBuoyancy(self, bool boolval): # <<<<<<<<<<<<<<
105598  * for i in range(self.thisptr.cables.size()):
105599  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
105600  */
105601  __pyx_tuple__346 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_boolval, __pyx_n_s_boolval, __pyx_n_s_i); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 2895, __pyx_L1_error)
105602  __Pyx_GOTREF(__pyx_tuple__346);
105603  __Pyx_GIVEREF(__pyx_tuple__346);
105604  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setApplyBuoyancy, 2895, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 2895, __pyx_L1_error)
105605 
105606  /* "mbd/CouplingFSI.pyx":2899
105607  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
105608  *
105609  * def setNodesPositionFunction(self, function_position, function_tangent=None): # <<<<<<<<<<<<<<
105610  * """Function to build nodes
105611  *
105612  */
105613  __pyx_tuple__347 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_function_position, __pyx_n_s_function_tangent); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 2899, __pyx_L1_error)
105614  __Pyx_GOTREF(__pyx_tuple__347);
105615  __Pyx_GIVEREF(__pyx_tuple__347);
105616  __pyx_codeobj__167 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setNodesPositionFunction, 2899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__167)) __PYX_ERR(0, 2899, __pyx_L1_error)
105617 
105618  /* "mbd/CouplingFSI.pyx":2914
105619  * self.nodes_function_tangent = function_tangent
105620  *
105621  * def setFluidVelocityFunction(self, function): # <<<<<<<<<<<<<<
105622  * """Function to build nodes
105623  *
105624  */
105625  __pyx_tuple__348 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_function); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 2914, __pyx_L1_error)
105626  __Pyx_GOTREF(__pyx_tuple__348);
105627  __Pyx_GIVEREF(__pyx_tuple__348);
105628  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setFluidVelocityFunction, 2914, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 2914, __pyx_L1_error)
105629 
105630  /* "mbd/CouplingFSI.pyx":2925
105631  * self.fluid_velocity_function = function
105632  *
105633  * def fixFrontNode(self, bool fixed): # <<<<<<<<<<<<<<
105634  * """Fix front node of cable
105635  *
105636  */
105637  __pyx_tuple__349 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fixed, __pyx_n_s_fixed); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 2925, __pyx_L1_error)
105638  __Pyx_GOTREF(__pyx_tuple__349);
105639  __Pyx_GIVEREF(__pyx_tuple__349);
105640  __pyx_codeobj__169 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_fixFrontNode, 2925, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__169)) __PYX_ERR(0, 2925, __pyx_L1_error)
105641 
105642  /* "mbd/CouplingFSI.pyx":2939
105643  * deref(self.thisptr.nodes.front()).SetFixed(fixed)
105644  *
105645  * def fixBackNode(self, bool fixed): # <<<<<<<<<<<<<<
105646  * """Fix back node of cable
105647  *
105648  */
105649  __pyx_tuple__350 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_fixed, __pyx_n_s_fixed); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 2939, __pyx_L1_error)
105650  __Pyx_GOTREF(__pyx_tuple__350);
105651  __Pyx_GIVEREF(__pyx_tuple__350);
105652  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_fixBackNode, 2939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 2939, __pyx_L1_error)
105653 
105654  /* "mbd/CouplingFSI.pyx":2953
105655  * deref(self.thisptr.nodes.back()).SetFixed(fixed)
105656  *
105657  * def attachBackNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
105658  * """Attaches back node to a body with ChLinkLockLock
105659  *
105660  */
105661  __pyx_tuple__351 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_body); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 2953, __pyx_L1_error)
105662  __Pyx_GOTREF(__pyx_tuple__351);
105663  __Pyx_GIVEREF(__pyx_tuple__351);
105664  __pyx_codeobj__171 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__351, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachBackNodeToBody, 2953, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__171)) __PYX_ERR(0, 2953, __pyx_L1_error)
105665 
105666  /* "mbd/CouplingFSI.pyx":2964
105667  * self.thisptr.attachBackNodeToBody(body.thisptr.body)
105668  *
105669  * def attachFrontNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
105670  * """Attaches front node to a body with ChLinkLockLock
105671  *
105672  */
105673  __pyx_tuple__352 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_body); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 2964, __pyx_L1_error)
105674  __Pyx_GOTREF(__pyx_tuple__352);
105675  __Pyx_GIVEREF(__pyx_tuple__352);
105676  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachFrontNodeToBody, 2964, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 2964, __pyx_L1_error)
105677 
105678  /* "mbd/CouplingFSI.pyx":2975
105679  * self.thisptr.attachFrontNodeToBody(body.thisptr.body)
105680  *
105681  * def getTensionElement(self, int i=0, eta=0.): # <<<<<<<<<<<<<<
105682  * cdef ch.ChVector[double] F
105683  * F = self.thisptr.getTensionElement(i, eta)
105684  */
105685  __pyx_tuple__353 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_i, __pyx_n_s_eta, __pyx_n_s_F); if (unlikely(!__pyx_tuple__353)) __PYX_ERR(0, 2975, __pyx_L1_error)
105686  __Pyx_GOTREF(__pyx_tuple__353);
105687  __Pyx_GIVEREF(__pyx_tuple__353);
105688  __pyx_codeobj__173 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__353, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getTensionElement, 2975, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__173)) __PYX_ERR(0, 2975, __pyx_L1_error)
105689 
105690  /* "mbd/CouplingFSI.pyx":2980
105691  * return np.array([F.x(), F.y(), F.z()])
105692  *
105693  * def getNodesTension(self, eta=0.): # <<<<<<<<<<<<<<
105694  * cdef ch.ChVector[double] vec
105695  * if self.beam_type == 'BeamEuler':
105696  */
105697  __pyx_tuple__354 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_eta, __pyx_n_s_vec, __pyx_n_s_T, __pyx_n_s_i); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 2980, __pyx_L1_error)
105698  __Pyx_GOTREF(__pyx_tuple__354);
105699  __Pyx_GIVEREF(__pyx_tuple__354);
105700  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getNodesTension, 2980, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 2980, __pyx_L1_error)
105701 
105702  /* "mbd/CouplingFSI.pyx":2991
105703  * return T
105704  *
105705  * def setDragCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
105706  * """Sets drag coefficients of cable
105707  *
105708  */
105709  __pyx_tuple__355 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tangential, __pyx_n_s_normal, __pyx_n_s_segment_nb); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 2991, __pyx_L1_error)
105710  __Pyx_GOTREF(__pyx_tuple__355);
105711  __Pyx_GIVEREF(__pyx_tuple__355);
105712  __pyx_codeobj__175 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setDragCoefficients, 2991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__175)) __PYX_ERR(0, 2991, __pyx_L1_error)
105713 
105714  /* "mbd/CouplingFSI.pyx":3005
105715  * deref(self.thisptr.cables[segment_nb]).setDragCoefficients(tangential, normal)
105716  *
105717  * def setAddedMassCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
105718  * """Sets added mass coefficients of cable
105719  *
105720  */
105721  __pyx_tuple__356 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tangential, __pyx_n_s_normal, __pyx_n_s_segment_nb); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 3005, __pyx_L1_error)
105722  __Pyx_GOTREF(__pyx_tuple__356);
105723  __Pyx_GIVEREF(__pyx_tuple__356);
105724  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__356, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setAddedMassCoefficients, 3005, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 3005, __pyx_L1_error)
105725 
105726  /* "mbd/CouplingFSI.pyx":3019
105727  * deref(self.thisptr.cables[segment_nb]).setAddedMassCoefficients(tangential, normal)
105728  *
105729  * def setRestLengthPerElement(self, double[:] length_array, int segment_nb): # <<<<<<<<<<<<<<
105730  * """Sets rest length per element of cable
105731  *
105732  */
105733  __pyx_tuple__357 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_length_array, __pyx_n_s_segment_nb, __pyx_n_s_vec, __pyx_n_s_length); if (unlikely(!__pyx_tuple__357)) __PYX_ERR(0, 3019, __pyx_L1_error)
105734  __Pyx_GOTREF(__pyx_tuple__357);
105735  __Pyx_GIVEREF(__pyx_tuple__357);
105736  __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__357, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setRestLengthPerElement, 3019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 3019, __pyx_L1_error)
105737 
105738  /* "mbd/CouplingFSI.pyx":3035
105739  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec)
105740  *
105741  * def setNodesPosition(self, double[:,:,:] positions=None, tangents=None): # <<<<<<<<<<<<<<
105742  * """Builds the nodes of the cable.
105743  *
105744  */
105745  __pyx_tuple__358 = PyTuple_Pack(14, __pyx_n_s_self, __pyx_n_s_positions, __pyx_n_s_tangents, __pyx_n_s_vec, __pyx_n_s_i, __pyx_n_s_L0, __pyx_n_s_L, __pyx_n_s_nb_elems, __pyx_n_s_nb_nodes, __pyx_n_s_ds, __pyx_n_s_j, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 3035, __pyx_L1_error)
105746  __Pyx_GOTREF(__pyx_tuple__358);
105747  __Pyx_GIVEREF(__pyx_tuple__358);
105748  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(3, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setNodesPosition, 3035, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 3035, __pyx_L1_error)
105749 
105750  /* "mbd/CouplingFSI.pyx":3093
105751  * # self.buildNodes()
105752  *
105753  * def buildNodes(self): # <<<<<<<<<<<<<<
105754  * # build nodes
105755  * self.thisptr.buildNodes()
105756  */
105757  __pyx_tuple__359 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_swig_obj, __pyx_n_s_nodeN, __pyx_n_s_node, __pyx_n_s_elemN, __pyx_n_s_elem); if (unlikely(!__pyx_tuple__359)) __PYX_ERR(0, 3093, __pyx_L1_error)
105758  __Pyx_GOTREF(__pyx_tuple__359);
105759  __Pyx_GIVEREF(__pyx_tuple__359);
105760  __pyx_codeobj__180 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__359, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_buildNodes, 3093, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__180)) __PYX_ERR(0, 3093, __pyx_L1_error)
105761 
105762  /* "mbd/CouplingFSI.pyx":3138
105763  * sys.exit()
105764  *
105765  * def getNodesPosition(self): # <<<<<<<<<<<<<<
105766  * """Gives array of nodes position
105767  *
105768  */
105769  __pyx_tuple__360 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_pos, __pyx_n_s_i, __pyx_n_s_vec); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 3138, __pyx_L1_error)
105770  __Pyx_GOTREF(__pyx_tuple__360);
105771  __Pyx_GIVEREF(__pyx_tuple__360);
105772  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getNodesPosition, 3138, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 3138, __pyx_L1_error)
105773 
105774  /* "mbd/CouplingFSI.pyx":3159
105775  * return pos
105776  *
105777  * def getNodesVelocity(self): # <<<<<<<<<<<<<<
105778  * """Gives array of nodes velocity
105779  *
105780  */
105781  __pyx_tuple__361 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_pos, __pyx_n_s_i, __pyx_n_s_vec); if (unlikely(!__pyx_tuple__361)) __PYX_ERR(0, 3159, __pyx_L1_error)
105782  __Pyx_GOTREF(__pyx_tuple__361);
105783  __Pyx_GIVEREF(__pyx_tuple__361);
105784  __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__361, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getNodesVelocity, 3159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 3159, __pyx_L1_error)
105785 
105786  /* "mbd/CouplingFSI.pyx":3180
105787  * return pos
105788  *
105789  * def getNodesAcceleration(self): # <<<<<<<<<<<<<<
105790  * """Gives array of nodes acceleration
105791  *
105792  */
105793  __pyx_tuple__362 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_pos, __pyx_n_s_i, __pyx_n_s_vec); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 3180, __pyx_L1_error)
105794  __Pyx_GOTREF(__pyx_tuple__362);
105795  __Pyx_GIVEREF(__pyx_tuple__362);
105796  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getNodesAcceleration, 3180, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 3180, __pyx_L1_error)
105797 
105798  /* "mbd/CouplingFSI.pyx":3201
105799  * return pos
105800  *
105801  * def getDragForces(self): # <<<<<<<<<<<<<<
105802  * cdef ch.ChVector Fd
105803  * drag = np.zeros((self.nodes_nb,3 ))
105804  */
105805  __pyx_tuple__363 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_Fd, __pyx_n_s_drag, __pyx_n_s_i); if (unlikely(!__pyx_tuple__363)) __PYX_ERR(0, 3201, __pyx_L1_error)
105806  __Pyx_GOTREF(__pyx_tuple__363);
105807  __Pyx_GIVEREF(__pyx_tuple__363);
105808  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__363, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getDragForces, 3201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 3201, __pyx_L1_error)
105809 
105810  /* "mbd/CouplingFSI.pyx":3209
105811  * return drag
105812  *
105813  * def getAddedMassForces(self): # <<<<<<<<<<<<<<
105814  * cdef ch.ChVector Fd
105815  * drag = np.zeros((self.nodes_nb,3 ))
105816  */
105817  __pyx_tuple__364 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_Fd, __pyx_n_s_drag, __pyx_n_s_i); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 3209, __pyx_L1_error)
105818  __Pyx_GOTREF(__pyx_tuple__364);
105819  __Pyx_GIVEREF(__pyx_tuple__364);
105820  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__364, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getAddedMassForces, 3209, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 3209, __pyx_L1_error)
105821 
105822  /* "mbd/CouplingFSI.pyx":3217
105823  * return drag
105824  *
105825  * def setIyy(self, double Iyy, int cable_nb): # <<<<<<<<<<<<<<
105826  * deref(self.thisptr.cables[cable_nb]).setIyy(Iyy)
105827  *
105828  */
105829  __pyx_tuple__365 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_Iyy, __pyx_n_s_cable_nb); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 3217, __pyx_L1_error)
105830  __Pyx_GOTREF(__pyx_tuple__365);
105831  __Pyx_GIVEREF(__pyx_tuple__365);
105832  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setIyy, 3217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 3217, __pyx_L1_error)
105833 
105834  /* "mbd/CouplingFSI.pyx":3221
105835  *
105836  *
105837  * def getNodesD(self): # <<<<<<<<<<<<<<
105838  * """Gives direction of nodes
105839  *
105840  */
105841  __pyx_tuple__366 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_dire, __pyx_n_s_i, __pyx_n_s_vec); if (unlikely(!__pyx_tuple__366)) __PYX_ERR(0, 3221, __pyx_L1_error)
105842  __Pyx_GOTREF(__pyx_tuple__366);
105843  __Pyx_GIVEREF(__pyx_tuple__366);
105844  __pyx_codeobj__187 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__366, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getNodesD, 3221, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__187)) __PYX_ERR(0, 3221, __pyx_L1_error)
105845 
105846  /* "mbd/CouplingFSI.pyx":3235
105847  * return dire
105848  *
105849  * def setContactMaterial(self, mat): # <<<<<<<<<<<<<<
105850  * """Sets contact material of the cable
105851  *
105852  */
105853  __pyx_tuple__367 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_mat, __pyx_n_s_swig_obj, __pyx_n_s_pt_to_shp, __pyx_n_s_matp); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 3235, __pyx_L1_error)
105854  __Pyx_GOTREF(__pyx_tuple__367);
105855  __Pyx_GIVEREF(__pyx_tuple__367);
105856  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setContactMaterial, 3235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 3235, __pyx_L1_error)
105857 
105858  /* "mbd/CouplingFSI.pyx":3248
105859  * self.thisptr.setContactMaterial(matp)
105860  *
105861  * def setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None, # <<<<<<<<<<<<<<
105862  * fluid_acceleration_array=None):
105863  * """
105864  */
105865  __pyx_tuple__368 = PyTuple_Pack(26, __pyx_n_s_self, __pyx_n_s_fluid_velocity_array, __pyx_n_s_fluid_density_array, __pyx_n_s_fluid_acceleration_array, __pyx_n_s_fluid_velocity, __pyx_n_s_fluid_acceleration, __pyx_n_s_vel, __pyx_n_s_acc, __pyx_n_s_fluid_density, __pyx_n_s_dens, __pyx_n_s_comm, __pyx_n_s_nb_nodes, __pyx_n_s_mesh_search, __pyx_n_s_dist_search, __pyx_n_s_i, __pyx_n_s_vec, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_coords, __pyx_n_s_vel_arr, __pyx_n_s_vel_grad_arr, __pyx_n_s_xi, __pyx_n_s_nearest_node, __pyx_n_s_el, __pyx_n_s_rank); if (unlikely(!__pyx_tuple__368)) __PYX_ERR(0, 3248, __pyx_L1_error)
105866  __Pyx_GOTREF(__pyx_tuple__368);
105867  __Pyx_GIVEREF(__pyx_tuple__368);
105868  __pyx_codeobj__189 = (PyObject*)__Pyx_PyCode_New(4, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__368, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setExternalForces, 3248, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__189)) __PYX_ERR(0, 3248, __pyx_L1_error)
105869 
105870  /* "mbd/CouplingFSI.pyx":3348
105871  * self.updateForces()
105872  *
105873  * def updateForces(self): # <<<<<<<<<<<<<<
105874  * # update drag forces
105875  * self.thisptr.updateDragForces()
105876  */
105877  __pyx_tuple__369 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 3348, __pyx_L1_error)
105878  __Pyx_GOTREF(__pyx_tuple__369);
105879  __Pyx_GIVEREF(__pyx_tuple__369);
105880  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_updateForces, 3348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 3348, __pyx_L1_error)
105881 
105882  /* "mbd/CouplingFSI.pyx":3358
105883  * self.thisptr.applyForces()
105884  *
105885  * def setFluidDensityAtNodes(self, np.ndarray density_array): # <<<<<<<<<<<<<<
105886  * cdef vector[double] fluid_density
105887  * self.fluid_density_array = density_array
105888  */
105889  __pyx_tuple__370 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_density_array, __pyx_n_s_fluid_density, __pyx_n_s_dens, __pyx_n_s_d); if (unlikely(!__pyx_tuple__370)) __PYX_ERR(0, 3358, __pyx_L1_error)
105890  __Pyx_GOTREF(__pyx_tuple__370);
105891  __Pyx_GIVEREF(__pyx_tuple__370);
105892  __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__370, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setFluidDensityAtNodes, 3358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 3358, __pyx_L1_error)
105893 
105894  /* "mbd/CouplingFSI.pyx":3366
105895  * self.thisptr.setFluidDensityAtNodes(fluid_density)
105896  *
105897  * def setFluidVelocityAtNodes(self, np.ndarray velocity_array): # <<<<<<<<<<<<<<
105898  * cdef vector[ch.ChVector[double]] fluid_velocity
105899  * cdef ch.ChVector[double] vel
105900  */
105901  __pyx_tuple__371 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_velocity_array, __pyx_n_s_fluid_velocity, __pyx_n_s_vel, __pyx_n_s_v); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 3366, __pyx_L1_error)
105902  __Pyx_GOTREF(__pyx_tuple__371);
105903  __Pyx_GIVEREF(__pyx_tuple__371);
105904  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setFluidVelocityAtNodes, 3366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 3366, __pyx_L1_error)
105905 
105906  /* "mbd/CouplingFSI.pyx":3375
105907  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
105908  *
105909  * def setFluidAccelerationAtNodes(self, np.ndarray acceleration_array): # <<<<<<<<<<<<<<
105910  * cdef vector[ch.ChVector[double]] fluid_acceleration
105911  * cdef ch.ChVector[double] acc
105912  */
105913  __pyx_tuple__372 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_acceleration_array, __pyx_n_s_fluid_acceleration, __pyx_n_s_acc, __pyx_n_s_a); if (unlikely(!__pyx_tuple__372)) __PYX_ERR(0, 3375, __pyx_L1_error)
105914  __Pyx_GOTREF(__pyx_tuple__372);
105915  __Pyx_GIVEREF(__pyx_tuple__372);
105916  __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__372, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_setFluidAccelerationAtNodes, 3375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 3375, __pyx_L1_error)
105917 
105918  /* "(tree fragment)":1
105919  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
105920  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105921  * def __setstate_cython__(self, __pyx_state):
105922  */
105923  __pyx_tuple__373 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(1, 1, __pyx_L1_error)
105924  __Pyx_GOTREF(__pyx_tuple__373);
105925  __Pyx_GIVEREF(__pyx_tuple__373);
105926  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(1, 1, __pyx_L1_error)
105927 
105928  /* "(tree fragment)":3
105929  * def __reduce_cython__(self):
105930  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105931  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
105932  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
105933  */
105934  __pyx_tuple__374 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__374)) __PYX_ERR(1, 3, __pyx_L1_error)
105935  __Pyx_GOTREF(__pyx_tuple__374);
105936  __Pyx_GIVEREF(__pyx_tuple__374);
105937  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__374, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(1, 3, __pyx_L1_error)
105938 
105939  /* "mbd/CouplingFSI.pyx":3385
105940  *
105941  *
105942  * def getLocalNearestNode(coords, kdtree): # <<<<<<<<<<<<<<
105943  * """Finds nearest node to coordinates (local)
105944  * Parameters
105945  */
105946  __pyx_tuple__375 = PyTuple_Pack(4, __pyx_n_s_coords, __pyx_n_s_kdtree, __pyx_n_s_distance, __pyx_n_s_node); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 3385, __pyx_L1_error)
105947  __Pyx_GOTREF(__pyx_tuple__375);
105948  __Pyx_GIVEREF(__pyx_tuple__375);
105949  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getLocalNearestNode, 3385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 3385, __pyx_L1_error)
105950 
105951  /* "mbd/CouplingFSI.pyx":3463
105952  *
105953  *
105954  * def getLocalElement(femSpace, coords, node): # <<<<<<<<<<<<<<
105955  * """Given coordinates and its nearest node, determine if it is on a
105956  * local element.
105957  */
105958  __pyx_tuple__376 = PyTuple_Pack(8, __pyx_n_s_femSpace, __pyx_n_s_coords, __pyx_n_s_node, __pyx_n_s_patchBoundaryNodes, __pyx_n_s_checkedElements, __pyx_n_s_eOffset, __pyx_n_s_eN, __pyx_n_s_xi); if (unlikely(!__pyx_tuple__376)) __PYX_ERR(0, 3463, __pyx_L1_error)
105959  __Pyx_GOTREF(__pyx_tuple__376);
105960  __Pyx_GIVEREF(__pyx_tuple__376);
105961  __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(3, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__376, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_getLocalElement, 3463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 3463, __pyx_L1_error)
105962 
105963  /* "mbd/CouplingFSI.pyx":3535
105964  * self.ProtChSystem = system
105965  *
105966  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
105967  * """Attaches Proteus model to auxiliary variable
105968  * """
105969  */
105970  __pyx_tuple__377 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_model, __pyx_n_s_ar); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 3535, __pyx_L1_error)
105971  __Pyx_GOTREF(__pyx_tuple__377);
105972  __Pyx_GIVEREF(__pyx_tuple__377);
105973  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachModel, 3535, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 3535, __pyx_L1_error)
105974 
105975  /* "mbd/CouplingFSI.pyx":3543
105976  * return self
105977  *
105978  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
105979  * pass
105980  *
105981  */
105982  __pyx_tuple__378 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_avDict); if (unlikely(!__pyx_tuple__378)) __PYX_ERR(0, 3543, __pyx_L1_error)
105983  __Pyx_GOTREF(__pyx_tuple__378);
105984  __Pyx_GIVEREF(__pyx_tuple__378);
105985  __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__378, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachAuxiliaryVariables, 3543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 3543, __pyx_L1_error)
105986 
105987  /* "mbd/CouplingFSI.pyx":3546
105988  * pass
105989  *
105990  * def calculate_init(self): # <<<<<<<<<<<<<<
105991  * pass
105992  *
105993  */
105994  __pyx_tuple__379 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 3546, __pyx_L1_error)
105995  __Pyx_GOTREF(__pyx_tuple__379);
105996  __Pyx_GIVEREF(__pyx_tuple__379);
105997  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_calculate_init, 3546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 3546, __pyx_L1_error)
105998 
105999  /* "mbd/CouplingFSI.pyx":3549
106000  * pass
106001  *
106002  * def calculate(self): # <<<<<<<<<<<<<<
106003  * pass
106004  *
106005  */
106006  __pyx_tuple__380 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__380)) __PYX_ERR(0, 3549, __pyx_L1_error)
106007  __Pyx_GOTREF(__pyx_tuple__380);
106008  __Pyx_GIVEREF(__pyx_tuple__380);
106009  __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__380, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_calculate, 3549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 3549, __pyx_L1_error)
106010 
106011  /* "(tree fragment)":1
106012  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106013  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
106014  * def __setstate_cython__(self, __pyx_state):
106015  */
106016  __pyx_tuple__381 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(1, 1, __pyx_L1_error)
106017  __Pyx_GOTREF(__pyx_tuple__381);
106018  __Pyx_GIVEREF(__pyx_tuple__381);
106019  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(1, 1, __pyx_L1_error)
106020 
106021  /* "(tree fragment)":3
106022  * def __reduce_cython__(self):
106023  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
106024  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106025  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
106026  */
106027  __pyx_tuple__382 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__382)) __PYX_ERR(1, 3, __pyx_L1_error)
106028  __Pyx_GOTREF(__pyx_tuple__382);
106029  __Pyx_GIVEREF(__pyx_tuple__382);
106030  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__382, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(1, 3, __pyx_L1_error)
106031 
106032  /* "mbd/CouplingFSI.pyx":3553
106033  *
106034  *
106035  * cpdef void attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2): # <<<<<<<<<<<<<<
106036  * if cable1.beam_type == "CableANCF":
106037  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
106038  */
106039  __pyx_tuple__383 = PyTuple_Pack(4, __pyx_n_s_cable1, __pyx_n_s_node1, __pyx_n_s_cable2, __pyx_n_s_node2); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 3553, __pyx_L1_error)
106040  __Pyx_GOTREF(__pyx_tuple__383);
106041  __Pyx_GIVEREF(__pyx_tuple__383);
106042  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_attachNodeToNode, 3553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 3553, __pyx_L1_error)
106043 
106044  /* "(tree fragment)":1
106045  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
106046  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
106047  * def __setstate_cython__(self, __pyx_state):
106048  */
106049  __pyx_tuple__384 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__384)) __PYX_ERR(1, 1, __pyx_L1_error)
106050  __Pyx_GOTREF(__pyx_tuple__384);
106051  __Pyx_GIVEREF(__pyx_tuple__384);
106052  __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__384, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(1, 1, __pyx_L1_error)
106053 
106054  /* "(tree fragment)":3
106055  * def __reduce_cython__(self):
106056  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
106057  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
106058  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
106059  */
106060  __pyx_tuple__385 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(1, 3, __pyx_L1_error)
106061  __Pyx_GOTREF(__pyx_tuple__385);
106062  __Pyx_GIVEREF(__pyx_tuple__385);
106063  __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(1, 3, __pyx_L1_error)
106064 
106065  /* "mbd/CouplingFSI.pyx":3641
106066  *
106067  *
106068  * def vec2array(vec): # <<<<<<<<<<<<<<
106069  * return np.array([vec.x(), vec.y(), vec.z()])
106070  *
106071  */
106072  __pyx_tuple__386 = PyTuple_Pack(1, __pyx_n_s_vec); if (unlikely(!__pyx_tuple__386)) __PYX_ERR(0, 3641, __pyx_L1_error)
106073  __Pyx_GOTREF(__pyx_tuple__386);
106074  __Pyx_GIVEREF(__pyx_tuple__386);
106075  __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__386, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_vec2array, 3641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 3641, __pyx_L1_error)
106076 
106077  /* "mbd/CouplingFSI.pyx":3644
106078  * return np.array([vec.x(), vec.y(), vec.z()])
106079  *
106080  * def pyvec2array(vec): # <<<<<<<<<<<<<<
106081  * return np.array([vec.x, vec.y, vec.z])
106082  *
106083  */
106084  __pyx_tuple__387 = PyTuple_Pack(1, __pyx_n_s_vec); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 3644, __pyx_L1_error)
106085  __Pyx_GOTREF(__pyx_tuple__387);
106086  __Pyx_GIVEREF(__pyx_tuple__387);
106087  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_pyvec2array, 3644, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 3644, __pyx_L1_error)
106088 
106089  /* "mbd/CouplingFSI.pyx":3647
106090  * return np.array([vec.x, vec.y, vec.z])
106091  *
106092  * def mat332array(mat): # <<<<<<<<<<<<<<
106093  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()],
106094  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()],
106095  */
106096  __pyx_tuple__388 = PyTuple_Pack(1, __pyx_n_s_mat); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(0, 3647, __pyx_L1_error)
106097  __Pyx_GOTREF(__pyx_tuple__388);
106098  __Pyx_GIVEREF(__pyx_tuple__388);
106099  __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_mat332array, 3647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 3647, __pyx_L1_error)
106100 
106101  /* "mbd/CouplingFSI.pyx":3652
106102  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]])
106103  *
106104  * def pymat332array(mat): # <<<<<<<<<<<<<<
106105  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z],
106106  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z],
106107  */
106108  __pyx_tuple__389 = PyTuple_Pack(1, __pyx_n_s_mat); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(0, 3652, __pyx_L1_error)
106109  __Pyx_GOTREF(__pyx_tuple__389);
106110  __Pyx_GIVEREF(__pyx_tuple__389);
106111  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__389, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_pymat332array, 3652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 3652, __pyx_L1_error)
106112 
106113  /* "mbd/CouplingFSI.pyx":3657
106114  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]])
106115  *
106116  * def quat2array(quat): # <<<<<<<<<<<<<<
106117  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
106118  *
106119  */
106120  __pyx_tuple__390 = PyTuple_Pack(1, __pyx_n_s_quat); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 3657, __pyx_L1_error)
106121  __Pyx_GOTREF(__pyx_tuple__390);
106122  __Pyx_GIVEREF(__pyx_tuple__390);
106123  __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_quat2array, 3657, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 3657, __pyx_L1_error)
106124 
106125  /* "mbd/CouplingFSI.pyx":3660
106126  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
106127  *
106128  * def pyquat2array(quat): # <<<<<<<<<<<<<<
106129  * return np.array([quat.e0, quat.e1, quat.e2, quat.e3])
106130  */
106131  __pyx_tuple__391 = PyTuple_Pack(1, __pyx_n_s_quat); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 3660, __pyx_L1_error)
106132  __Pyx_GOTREF(__pyx_tuple__391);
106133  __Pyx_GIVEREF(__pyx_tuple__391);
106134  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_mbd_CouplingFSI_pyx, __pyx_n_s_pyquat2array, 3660, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 3660, __pyx_L1_error)
106135 
106136  /* "View.MemoryView":286
106137  * return self.name
106138  *
106139  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
106140  * cdef strided = Enum("<strided and direct>") # default
106141  * cdef indirect = Enum("<strided and indirect>")
106142  */
106143  __pyx_tuple__392 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(1, 286, __pyx_L1_error)
106144  __Pyx_GOTREF(__pyx_tuple__392);
106145  __Pyx_GIVEREF(__pyx_tuple__392);
106146 
106147  /* "View.MemoryView":287
106148  *
106149  * cdef generic = Enum("<strided and direct or indirect>")
106150  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
106151  * cdef indirect = Enum("<strided and indirect>")
106152  *
106153  */
106154  __pyx_tuple__393 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(1, 287, __pyx_L1_error)
106155  __Pyx_GOTREF(__pyx_tuple__393);
106156  __Pyx_GIVEREF(__pyx_tuple__393);
106157 
106158  /* "View.MemoryView":288
106159  * cdef generic = Enum("<strided and direct or indirect>")
106160  * cdef strided = Enum("<strided and direct>") # default
106161  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
106162  *
106163  *
106164  */
106165  __pyx_tuple__394 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__394)) __PYX_ERR(1, 288, __pyx_L1_error)
106166  __Pyx_GOTREF(__pyx_tuple__394);
106167  __Pyx_GIVEREF(__pyx_tuple__394);
106168 
106169  /* "View.MemoryView":291
106170  *
106171  *
106172  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
106173  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
106174  *
106175  */
106176  __pyx_tuple__395 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__395)) __PYX_ERR(1, 291, __pyx_L1_error)
106177  __Pyx_GOTREF(__pyx_tuple__395);
106178  __Pyx_GIVEREF(__pyx_tuple__395);
106179 
106180  /* "View.MemoryView":292
106181  *
106182  * cdef contiguous = Enum("<contiguous and direct>")
106183  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
106184  *
106185  *
106186  */
106187  __pyx_tuple__396 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__396)) __PYX_ERR(1, 292, __pyx_L1_error)
106188  __Pyx_GOTREF(__pyx_tuple__396);
106189  __Pyx_GIVEREF(__pyx_tuple__396);
106190 
106191  /* "(tree fragment)":1
106192  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
106193  * cdef object __pyx_PickleError
106194  * cdef object __pyx_result
106195  */
106196  __pyx_tuple__397 = 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__397)) __PYX_ERR(1, 1, __pyx_L1_error)
106197  __Pyx_GOTREF(__pyx_tuple__397);
106198  __Pyx_GIVEREF(__pyx_tuple__397);
106199  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(1, 1, __pyx_L1_error)
106200  __Pyx_RefNannyFinishContext();
106201  return 0;
106202  __pyx_L1_error:;
106203  __Pyx_RefNannyFinishContext();
106204  return -1;
106205 }
106206 
106207 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
106208  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
106209  __pyx_float_0_ = PyFloat_FromDouble(0.); if (unlikely(!__pyx_float_0_)) __PYX_ERR(0, 1, __pyx_L1_error)
106210  __pyx_float_2_ = PyFloat_FromDouble(2.); if (unlikely(!__pyx_float_2_)) __PYX_ERR(0, 1, __pyx_L1_error)
106211  __pyx_float_0_000 = PyFloat_FromDouble(0.000); if (unlikely(!__pyx_float_0_000)) __PYX_ERR(0, 1, __pyx_L1_error)
106212  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
106213  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
106214  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
106215  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
106216  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
106217  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
106218  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
106219  __pyx_int_112105877 = PyInt_FromLong(112105877L); if (unlikely(!__pyx_int_112105877)) __PYX_ERR(0, 1, __pyx_L1_error)
106220  __pyx_int_136983863 = PyInt_FromLong(136983863L); if (unlikely(!__pyx_int_136983863)) __PYX_ERR(0, 1, __pyx_L1_error)
106221  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(0, 1, __pyx_L1_error)
106222  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
106223  return 0;
106224  __pyx_L1_error:;
106225  return -1;
106226 }
106227 
106228 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
106229 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
106230 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
106231 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
106232 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
106233 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
106234 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
106235 
106236 static int __Pyx_modinit_global_init_code(void) {
106237  __Pyx_RefNannyDeclarations
106238  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
106239  /*--- Global init code ---*/
106240  generic = Py_None; Py_INCREF(Py_None);
106241  strided = Py_None; Py_INCREF(Py_None);
106242  indirect = Py_None; Py_INCREF(Py_None);
106243  contiguous = Py_None; Py_INCREF(Py_None);
106244  indirect_contiguous = Py_None; Py_INCREF(Py_None);
106245  __Pyx_RefNannyFinishContext();
106246  return 0;
106247 }
106248 
106249 static int __Pyx_modinit_variable_export_code(void) {
106250  __Pyx_RefNannyDeclarations
106251  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
106252  /*--- Variable export code ---*/
106253  __Pyx_RefNannyFinishContext();
106254  return 0;
106255 }
106256 
106257 static int __Pyx_modinit_function_export_code(void) {
106258  __Pyx_RefNannyDeclarations
106259  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
106260  /*--- Function export code ---*/
106261  __Pyx_RefNannyFinishContext();
106262  return 0;
106263 }
106264 
106265 static int __Pyx_modinit_type_init_code(void) {
106266  __Pyx_RefNannyDeclarations
106267  int __pyx_lineno = 0;
106268  const char *__pyx_filename = NULL;
106269  int __pyx_clineno = 0;
106270  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
106271  /*--- Type init code ---*/
106272  __pyx_vtabptr_3mbd_11CouplingFSI_ProtChBody = &__pyx_vtable_3mbd_11CouplingFSI_ProtChBody;
106273  __pyx_vtable_3mbd_11CouplingFSI_ProtChBody.callPrescribedMotion = (PyArrayObject *(*)(struct __pyx_obj_3mbd_11CouplingFSI_ProtChBody *, double))__pyx_f_3mbd_11CouplingFSI_10ProtChBody_callPrescribedMotion;
106274  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI_ProtChBody) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
106275  #if PY_VERSION_HEX < 0x030800B1
106276  __pyx_type_3mbd_11CouplingFSI_ProtChBody.tp_print = 0;
106277  #endif
106278  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI_ProtChBody.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI_ProtChBody.tp_getattro == PyObject_GenericGetAttr)) {
106279  __pyx_type_3mbd_11CouplingFSI_ProtChBody.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106280  }
106281  if (__Pyx_SetVtable(__pyx_type_3mbd_11CouplingFSI_ProtChBody.tp_dict, __pyx_vtabptr_3mbd_11CouplingFSI_ProtChBody) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
106282  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProtChBody, (PyObject *)&__pyx_type_3mbd_11CouplingFSI_ProtChBody) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
106283  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3mbd_11CouplingFSI_ProtChBody) < 0) __PYX_ERR(0, 65, __pyx_L1_error)
106284  __pyx_ptype_3mbd_11CouplingFSI_ProtChBody = &__pyx_type_3mbd_11CouplingFSI_ProtChBody;
106285  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI_ProtChSystem) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
106286  #if PY_VERSION_HEX < 0x030800B1
106287  __pyx_type_3mbd_11CouplingFSI_ProtChSystem.tp_print = 0;
106288  #endif
106289  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI_ProtChSystem.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI_ProtChSystem.tp_getattro == PyObject_GenericGetAttr)) {
106290  __pyx_type_3mbd_11CouplingFSI_ProtChSystem.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106291  }
106292  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProtChSystem, (PyObject *)&__pyx_type_3mbd_11CouplingFSI_ProtChSystem) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
106293  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3mbd_11CouplingFSI_ProtChSystem) < 0) __PYX_ERR(0, 1418, __pyx_L1_error)
106294  __pyx_ptype_3mbd_11CouplingFSI_ProtChSystem = &__pyx_type_3mbd_11CouplingFSI_ProtChSystem;
106295  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI_ProtChMesh) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
106296  #if PY_VERSION_HEX < 0x030800B1
106297  __pyx_type_3mbd_11CouplingFSI_ProtChMesh.tp_print = 0;
106298  #endif
106299  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI_ProtChMesh.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI_ProtChMesh.tp_getattro == PyObject_GenericGetAttr)) {
106300  __pyx_type_3mbd_11CouplingFSI_ProtChMesh.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106301  }
106302  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProtChMesh, (PyObject *)&__pyx_type_3mbd_11CouplingFSI_ProtChMesh) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
106303  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3mbd_11CouplingFSI_ProtChMesh) < 0) __PYX_ERR(0, 2406, __pyx_L1_error)
106304  __pyx_ptype_3mbd_11CouplingFSI_ProtChMesh = &__pyx_type_3mbd_11CouplingFSI_ProtChMesh;
106305  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI_ProtChMoorings) < 0) __PYX_ERR(0, 2440, __pyx_L1_error)
106306  #if PY_VERSION_HEX < 0x030800B1
106307  __pyx_type_3mbd_11CouplingFSI_ProtChMoorings.tp_print = 0;
106308  #endif
106309  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI_ProtChMoorings.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI_ProtChMoorings.tp_getattro == PyObject_GenericGetAttr)) {
106310  __pyx_type_3mbd_11CouplingFSI_ProtChMoorings.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106311  }
106312  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProtChMoorings, (PyObject *)&__pyx_type_3mbd_11CouplingFSI_ProtChMoorings) < 0) __PYX_ERR(0, 2440, __pyx_L1_error)
106313  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3mbd_11CouplingFSI_ProtChMoorings) < 0) __PYX_ERR(0, 2440, __pyx_L1_error)
106314  __pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings = &__pyx_type_3mbd_11CouplingFSI_ProtChMoorings;
106315  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI_ProtChAddedMass) < 0) __PYX_ERR(0, 3524, __pyx_L1_error)
106316  #if PY_VERSION_HEX < 0x030800B1
106317  __pyx_type_3mbd_11CouplingFSI_ProtChAddedMass.tp_print = 0;
106318  #endif
106319  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI_ProtChAddedMass.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI_ProtChAddedMass.tp_getattro == PyObject_GenericGetAttr)) {
106320  __pyx_type_3mbd_11CouplingFSI_ProtChAddedMass.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106321  }
106322  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProtChAddedMass, (PyObject *)&__pyx_type_3mbd_11CouplingFSI_ProtChAddedMass) < 0) __PYX_ERR(0, 3524, __pyx_L1_error)
106323  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3mbd_11CouplingFSI_ProtChAddedMass) < 0) __PYX_ERR(0, 3524, __pyx_L1_error)
106324  __pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass = &__pyx_type_3mbd_11CouplingFSI_ProtChAddedMass;
106325  __pyx_vtabptr_3mbd_11CouplingFSI_ChBodyAddedMass = &__pyx_vtable_3mbd_11CouplingFSI_ChBodyAddedMass;
106326  __pyx_vtable_3mbd_11CouplingFSI_ChBodyAddedMass.SetMfullmass = (void (*)(struct __pyx_obj_3mbd_11CouplingFSI_ChBodyAddedMass *, ChMatrixDynamic<double> ))__pyx_f_3mbd_11CouplingFSI_15ChBodyAddedMass_SetMfullmass;
106327  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass) < 0) __PYX_ERR(0, 3607, __pyx_L1_error)
106328  #if PY_VERSION_HEX < 0x030800B1
106329  __pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass.tp_print = 0;
106330  #endif
106331  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass.tp_getattro == PyObject_GenericGetAttr)) {
106332  __pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106333  }
106334  if (__Pyx_SetVtable(__pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass.tp_dict, __pyx_vtabptr_3mbd_11CouplingFSI_ChBodyAddedMass) < 0) __PYX_ERR(0, 3607, __pyx_L1_error)
106335  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ChBodyAddedMass, (PyObject *)&__pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass) < 0) __PYX_ERR(0, 3607, __pyx_L1_error)
106336  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass) < 0) __PYX_ERR(0, 3607, __pyx_L1_error)
106337  __pyx_ptype_3mbd_11CouplingFSI_ChBodyAddedMass = &__pyx_type_3mbd_11CouplingFSI_ChBodyAddedMass;
106338  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
106339  #if PY_VERSION_HEX < 0x030800B1
106340  __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM.tp_print = 0;
106341  #endif
106342  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM.tp_getattro == PyObject_GenericGetAttr)) {
106343  __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
106344  }
106345  __pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM = &__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct__updateIBM;
106346  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__) < 0) __PYX_ERR(0, 2465, __pyx_L1_error)
106347  #if PY_VERSION_HEX < 0x030800B1
106348  __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__.tp_print = 0;
106349  #endif
106350  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__.tp_getattro == PyObject_GenericGetAttr)) {
106351  __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
106352  }
106353  __pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__ = &__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_1___cinit__;
106354  if (PyType_Ready(&__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 2475, __pyx_L1_error)
106355  #if PY_VERSION_HEX < 0x030800B1
106356  __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr.tp_print = 0;
106357  #endif
106358  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr.tp_dictoffset && __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr.tp_getattro == PyObject_GenericGetAttr)) {
106359  __pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
106360  }
106361  __pyx_ptype_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr = &__pyx_type_3mbd_11CouplingFSI___pyx_scope_struct_2_genexpr;
106362  __pyx_vtabptr_array = &__pyx_vtable_array;
106363  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
106364  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
106365  #if PY_VERSION_HEX < 0x030800B1
106366  __pyx_type___pyx_array.tp_print = 0;
106367  #endif
106368  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
106369  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(1, 105, __pyx_L1_error)
106370  __pyx_array_type = &__pyx_type___pyx_array;
106371  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
106372  #if PY_VERSION_HEX < 0x030800B1
106373  __pyx_type___pyx_MemviewEnum.tp_print = 0;
106374  #endif
106375  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
106376  __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106377  }
106378  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(1, 279, __pyx_L1_error)
106379  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
106380  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
106381  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
106382  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
106383  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
106384  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
106385  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
106386  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
106387  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
106388  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
106389  #if PY_VERSION_HEX < 0x030800B1
106390  __pyx_type___pyx_memoryview.tp_print = 0;
106391  #endif
106392  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
106393  __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106394  }
106395  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
106396  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(1, 330, __pyx_L1_error)
106397  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
106398  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
106399  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
106400  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
106401  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
106402  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
106403  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 965, __pyx_L1_error)
106404  #if PY_VERSION_HEX < 0x030800B1
106405  __pyx_type___pyx_memoryviewslice.tp_print = 0;
106406  #endif
106407  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
106408  __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
106409  }
106410  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(1, 965, __pyx_L1_error)
106411  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(1, 965, __pyx_L1_error)
106412  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
106413  __Pyx_RefNannyFinishContext();
106414  return 0;
106415  __pyx_L1_error:;
106416  __Pyx_RefNannyFinishContext();
106417  return -1;
106418 }
106419 
106420 static int __Pyx_modinit_type_import_code(void) {
106421  __Pyx_RefNannyDeclarations
106422  PyObject *__pyx_t_1 = NULL;
106423  int __pyx_lineno = 0;
106424  const char *__pyx_filename = NULL;
106425  int __pyx_clineno = 0;
106426  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
106427  /*--- Type import code ---*/
106428  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
106429  __Pyx_GOTREF(__pyx_t_1);
106430  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
106431  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
106432  sizeof(PyTypeObject),
106433  #else
106434  sizeof(PyHeapTypeObject),
106435  #endif
106436  __Pyx_ImportType_CheckSize_Warn);
106437  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
106438  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106439  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 200, __pyx_L1_error)
106440  __Pyx_GOTREF(__pyx_t_1);
106441  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
106442  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 200, __pyx_L1_error)
106443  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore);
106444  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 223, __pyx_L1_error)
106445  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore);
106446  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 227, __pyx_L1_error)
106447  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
106448  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 239, __pyx_L1_error)
106449  __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106450  if (!__pyx_ptype_5numpy_generic) __PYX_ERR(3, 771, __pyx_L1_error)
106451  __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106452  if (!__pyx_ptype_5numpy_number) __PYX_ERR(3, 773, __pyx_L1_error)
106453  __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106454  if (!__pyx_ptype_5numpy_integer) __PYX_ERR(3, 775, __pyx_L1_error)
106455  __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106456  if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(3, 777, __pyx_L1_error)
106457  __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106458  if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(3, 779, __pyx_L1_error)
106459  __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106460  if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(3, 781, __pyx_L1_error)
106461  __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106462  if (!__pyx_ptype_5numpy_floating) __PYX_ERR(3, 783, __pyx_L1_error)
106463  __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106464  if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(3, 785, __pyx_L1_error)
106465  __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106466  if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(3, 787, __pyx_L1_error)
106467  __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn);
106468  if (!__pyx_ptype_5numpy_character) __PYX_ERR(3, 789, __pyx_L1_error)
106469  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore);
106470  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 827, __pyx_L1_error)
106471  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106472  __Pyx_RefNannyFinishContext();
106473  return 0;
106474  __pyx_L1_error:;
106475  __Pyx_XDECREF(__pyx_t_1);
106476  __Pyx_RefNannyFinishContext();
106477  return -1;
106478 }
106479 
106480 static int __Pyx_modinit_variable_import_code(void) {
106481  __Pyx_RefNannyDeclarations
106482  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
106483  /*--- Variable import code ---*/
106484  __Pyx_RefNannyFinishContext();
106485  return 0;
106486 }
106487 
106488 static int __Pyx_modinit_function_import_code(void) {
106489  __Pyx_RefNannyDeclarations
106490  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
106491  /*--- Function import code ---*/
106492  __Pyx_RefNannyFinishContext();
106493  return 0;
106494 }
106495 
106496 
106497 #ifndef CYTHON_NO_PYINIT_EXPORT
106498 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
106499 #elif PY_MAJOR_VERSION < 3
106500 #ifdef __cplusplus
106501 #define __Pyx_PyMODINIT_FUNC extern "C" void
106502 #else
106503 #define __Pyx_PyMODINIT_FUNC void
106504 #endif
106505 #else
106506 #ifdef __cplusplus
106507 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
106508 #else
106509 #define __Pyx_PyMODINIT_FUNC PyObject *
106510 #endif
106511 #endif
106512 
106513 
106514 #if PY_MAJOR_VERSION < 3
106515 __Pyx_PyMODINIT_FUNC initCouplingFSI(void) CYTHON_SMALL_CODE; /*proto*/
106516 __Pyx_PyMODINIT_FUNC initCouplingFSI(void)
106517 #else
106518 __Pyx_PyMODINIT_FUNC PyInit_CouplingFSI(void) CYTHON_SMALL_CODE; /*proto*/
106519 __Pyx_PyMODINIT_FUNC PyInit_CouplingFSI(void)
106520 #if CYTHON_PEP489_MULTI_PHASE_INIT
106521 {
106522  return PyModuleDef_Init(&__pyx_moduledef);
106523 }
106524 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
106525  #if PY_VERSION_HEX >= 0x030700A1
106526  static PY_INT64_T main_interpreter_id = -1;
106527  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
106528  if (main_interpreter_id == -1) {
106529  main_interpreter_id = current_id;
106530  return (unlikely(current_id == -1)) ? -1 : 0;
106531  } else if (unlikely(main_interpreter_id != current_id))
106532  #else
106533  static PyInterpreterState *main_interpreter = NULL;
106534  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
106535  if (!main_interpreter) {
106536  main_interpreter = current_interpreter;
106537  } else if (unlikely(main_interpreter != current_interpreter))
106538  #endif
106539  {
106540  PyErr_SetString(
106541  PyExc_ImportError,
106542  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
106543  return -1;
106544  }
106545  return 0;
106546 }
106547 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
106548  PyObject *value = PyObject_GetAttrString(spec, from_name);
106549  int result = 0;
106550  if (likely(value)) {
106551  if (allow_none || value != Py_None) {
106552  result = PyDict_SetItemString(moddict, to_name, value);
106553  }
106554  Py_DECREF(value);
106555  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
106556  PyErr_Clear();
106557  } else {
106558  result = -1;
106559  }
106560  return result;
106561 }
106562 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
106563  PyObject *module = NULL, *moddict, *modname;
106564  if (__Pyx_check_single_interpreter())
106565  return NULL;
106566  if (__pyx_m)
106567  return __Pyx_NewRef(__pyx_m);
106568  modname = PyObject_GetAttrString(spec, "name");
106569  if (unlikely(!modname)) goto bad;
106570  module = PyModule_NewObject(modname);
106571  Py_DECREF(modname);
106572  if (unlikely(!module)) goto bad;
106573  moddict = PyModule_GetDict(module);
106574  if (unlikely(!moddict)) goto bad;
106575  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
106576  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
106577  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
106578  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
106579  return module;
106580 bad:
106581  Py_XDECREF(module);
106582  return NULL;
106583 }
106584 
106585 
106586 static CYTHON_SMALL_CODE int __pyx_pymod_exec_CouplingFSI(PyObject *__pyx_pyinit_module)
106587 #endif
106588 #endif
106589 {
106590  __Pyx_TraceDeclarations
106591  PyObject *__pyx_t_1 = NULL;
106592  PyObject *__pyx_t_2 = NULL;
106593  __Pyx_memviewslice __pyx_t_3 = { 0, 0, { 0 }, { 0 }, { 0 } };
106594  __Pyx_memviewslice __pyx_t_4 = { 0, 0, { 0 }, { 0 }, { 0 } };
106595  std::string __pyx_t_5;
106596  __Pyx_memviewslice __pyx_t_6 = { 0, 0, { 0 }, { 0 }, { 0 } };
106597  static PyThread_type_lock __pyx_t_7[8];
106598  int __pyx_lineno = 0;
106599  const char *__pyx_filename = NULL;
106600  int __pyx_clineno = 0;
106601  __Pyx_RefNannyDeclarations
106602  #if CYTHON_PEP489_MULTI_PHASE_INIT
106603  if (__pyx_m) {
106604  if (__pyx_m == __pyx_pyinit_module) return 0;
106605  PyErr_SetString(PyExc_RuntimeError, "Module 'CouplingFSI' has already been imported. Re-initialisation is not supported.");
106606  return -1;
106607  }
106608  #elif PY_MAJOR_VERSION >= 3
106609  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
106610  #endif
106611  #if CYTHON_REFNANNY
106612 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
106613 if (!__Pyx_RefNanny) {
106614  PyErr_Clear();
106615  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
106616  if (!__Pyx_RefNanny)
106617  Py_FatalError("failed to import 'refnanny' module");
106618 }
106619 #endif
106620  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_CouplingFSI(void)", 0);
106621  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106622  #ifdef __Pxy_PyFrame_Initialize_Offsets
106623  __Pxy_PyFrame_Initialize_Offsets();
106624  #endif
106625  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
106626  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
106627  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
106628  #ifdef __Pyx_CyFunction_USED
106629  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106630  #endif
106631  #ifdef __Pyx_FusedFunction_USED
106632  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106633  #endif
106634  #ifdef __Pyx_Coroutine_USED
106635  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106636  #endif
106637  #ifdef __Pyx_Generator_USED
106638  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106639  #endif
106640  #ifdef __Pyx_AsyncGen_USED
106641  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106642  #endif
106643  #ifdef __Pyx_StopAsyncIteration_USED
106644  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106645  #endif
106646  /*--- Library function declarations ---*/
106647  /*--- Threads initialization code ---*/
106648  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
106649  PyEval_InitThreads();
106650  #endif
106651  /*--- Module creation code ---*/
106652  #if CYTHON_PEP489_MULTI_PHASE_INIT
106653  __pyx_m = __pyx_pyinit_module;
106654  Py_INCREF(__pyx_m);
106655  #else
106656  #if PY_MAJOR_VERSION < 3
106657  __pyx_m = Py_InitModule4("CouplingFSI", __pyx_methods, __pyx_k_Coupling_between_Chrono_and_Pro, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
106658  #else
106659  __pyx_m = PyModule_Create(&__pyx_moduledef);
106660  #endif
106661  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
106662  #endif
106663  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
106664  Py_INCREF(__pyx_d);
106665  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
106666  Py_INCREF(__pyx_b);
106667  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
106668  Py_INCREF(__pyx_cython_runtime);
106669  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
106670  /*--- Initialize various global constants etc. ---*/
106671  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106672  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
106673  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106674  #endif
106675  if (__pyx_module_is_main_mbd__CouplingFSI) {
106676  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106677  }
106678  #if PY_MAJOR_VERSION >= 3
106679  {
106680  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
106681  if (!PyDict_GetItemString(modules, "mbd.CouplingFSI")) {
106682  if (unlikely(PyDict_SetItemString(modules, "mbd.CouplingFSI", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
106683  }
106684  }
106685  #endif
106686  /*--- Builtin init code ---*/
106687  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106688  /*--- Constants init code ---*/
106689  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106690  /*--- Global type/function init code ---*/
106691  (void)__Pyx_modinit_global_init_code();
106692  (void)__Pyx_modinit_variable_export_code();
106693  (void)__Pyx_modinit_function_export_code();
106694  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
106695  if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
106696  (void)__Pyx_modinit_variable_import_code();
106697  (void)__Pyx_modinit_function_import_code();
106698  /*--- Execution code ---*/
106699  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
106700  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
106701  #endif
106702  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_CouplingFSI(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
106703 
106704  /* "mbd/CouplingFSI.pyx":29
106705  *
106706  *
106707  * import os # <<<<<<<<<<<<<<
106708  * import sys
106709  * import csv
106710  */
106711  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
106712  __Pyx_GOTREF(__pyx_t_1);
106713  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
106714  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106715 
106716  /* "mbd/CouplingFSI.pyx":30
106717  *
106718  * import os
106719  * import sys # <<<<<<<<<<<<<<
106720  * import csv
106721  * import copy
106722  */
106723  __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
106724  __Pyx_GOTREF(__pyx_t_1);
106725  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
106726  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106727 
106728  /* "mbd/CouplingFSI.pyx":31
106729  * import os
106730  * import sys
106731  * import csv # <<<<<<<<<<<<<<
106732  * import copy
106733  * cimport numpy as np
106734  */
106735  __pyx_t_1 = __Pyx_Import(__pyx_n_s_csv_2, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
106736  __Pyx_GOTREF(__pyx_t_1);
106737  if (PyDict_SetItem(__pyx_d, __pyx_n_s_csv_2, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
106738  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106739 
106740  /* "mbd/CouplingFSI.pyx":32
106741  * import sys
106742  * import csv
106743  * import copy # <<<<<<<<<<<<<<
106744  * cimport numpy as np
106745  * import numpy as np
106746  */
106747  __pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
106748  __Pyx_GOTREF(__pyx_t_1);
106749  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
106750  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106751 
106752  /* "mbd/CouplingFSI.pyx":34
106753  * import copy
106754  * cimport numpy as np
106755  * import numpy as np # <<<<<<<<<<<<<<
106756  * from mpi4py import MPI
106757  * from scipy import spatial
106758  */
106759  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
106760  __Pyx_GOTREF(__pyx_t_1);
106761  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
106762  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106763 
106764  /* "mbd/CouplingFSI.pyx":35
106765  * cimport numpy as np
106766  * import numpy as np
106767  * from mpi4py import MPI # <<<<<<<<<<<<<<
106768  * from scipy import spatial
106769  * from proteus import AuxiliaryVariables, Archiver, Comm, Profiling
106770  */
106771  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
106772  __Pyx_GOTREF(__pyx_t_1);
106773  __Pyx_INCREF(__pyx_n_s_MPI);
106774  __Pyx_GIVEREF(__pyx_n_s_MPI);
106775  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MPI);
106776  __pyx_t_2 = __Pyx_Import(__pyx_n_s_mpi4py, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
106777  __Pyx_GOTREF(__pyx_t_2);
106778  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106779  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
106780  __Pyx_GOTREF(__pyx_t_1);
106781  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPI, __pyx_t_1) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
106782  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106783  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106784 
106785  /* "mbd/CouplingFSI.pyx":36
106786  * import numpy as np
106787  * from mpi4py import MPI
106788  * from scipy import spatial # <<<<<<<<<<<<<<
106789  * from proteus import AuxiliaryVariables, Archiver, Comm, Profiling
106790  * from proteus import SpatialTools as st
106791  */
106792  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
106793  __Pyx_GOTREF(__pyx_t_2);
106794  __Pyx_INCREF(__pyx_n_s_spatial);
106795  __Pyx_GIVEREF(__pyx_n_s_spatial);
106796  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_spatial);
106797  __pyx_t_1 = __Pyx_Import(__pyx_n_s_scipy, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
106798  __Pyx_GOTREF(__pyx_t_1);
106799  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106800  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_spatial); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 36, __pyx_L1_error)
106801  __Pyx_GOTREF(__pyx_t_2);
106802  if (PyDict_SetItem(__pyx_d, __pyx_n_s_spatial, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
106803  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106804  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106805 
106806  /* "mbd/CouplingFSI.pyx":37
106807  * from mpi4py import MPI
106808  * from scipy import spatial
106809  * from proteus import AuxiliaryVariables, Archiver, Comm, Profiling # <<<<<<<<<<<<<<
106810  * from proteus import SpatialTools as st
106811  * from libcpp.string cimport string
106812  */
106813  __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
106814  __Pyx_GOTREF(__pyx_t_1);
106815  __Pyx_INCREF(__pyx_n_s_AuxiliaryVariables);
106816  __Pyx_GIVEREF(__pyx_n_s_AuxiliaryVariables);
106817  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_AuxiliaryVariables);
106818  __Pyx_INCREF(__pyx_n_s_Archiver);
106819  __Pyx_GIVEREF(__pyx_n_s_Archiver);
106820  PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Archiver);
106821  __Pyx_INCREF(__pyx_n_s_Comm);
106822  __Pyx_GIVEREF(__pyx_n_s_Comm);
106823  PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_Comm);
106824  __Pyx_INCREF(__pyx_n_s_Profiling);
106825  __Pyx_GIVEREF(__pyx_n_s_Profiling);
106826  PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_Profiling);
106827  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
106828  __Pyx_GOTREF(__pyx_t_2);
106829  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106830  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_AuxiliaryVariables); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
106831  __Pyx_GOTREF(__pyx_t_1);
106832  if (PyDict_SetItem(__pyx_d, __pyx_n_s_AuxiliaryVariables, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
106833  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106834  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Archiver); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
106835  __Pyx_GOTREF(__pyx_t_1);
106836  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Archiver, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
106837  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106838  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Comm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
106839  __Pyx_GOTREF(__pyx_t_1);
106840  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Comm, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
106841  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106842  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Profiling); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error)
106843  __Pyx_GOTREF(__pyx_t_1);
106844  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Profiling, __pyx_t_1) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
106845  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106846  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106847 
106848  /* "mbd/CouplingFSI.pyx":38
106849  * from scipy import spatial
106850  * from proteus import AuxiliaryVariables, Archiver, Comm, Profiling
106851  * from proteus import SpatialTools as st # <<<<<<<<<<<<<<
106852  * from libcpp.string cimport string
106853  * from libcpp.vector cimport vector
106854  */
106855  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
106856  __Pyx_GOTREF(__pyx_t_2);
106857  __Pyx_INCREF(__pyx_n_s_SpatialTools);
106858  __Pyx_GIVEREF(__pyx_n_s_SpatialTools);
106859  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SpatialTools);
106860  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
106861  __Pyx_GOTREF(__pyx_t_1);
106862  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106863  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SpatialTools); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
106864  __Pyx_GOTREF(__pyx_t_2);
106865  if (PyDict_SetItem(__pyx_d, __pyx_n_s_st, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
106866  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106867  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106868 
106869  /* "mbd/CouplingFSI.pyx":44
106870  * from libcpp.memory cimport (shared_ptr,
106871  * make_shared)
106872  * from collections import OrderedDict # <<<<<<<<<<<<<<
106873  * from cython.operator cimport dereference as deref
106874  * # from cython.cpp cimport static_cast
106875  */
106876  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
106877  __Pyx_GOTREF(__pyx_t_1);
106878  __Pyx_INCREF(__pyx_n_s_OrderedDict);
106879  __Pyx_GIVEREF(__pyx_n_s_OrderedDict);
106880  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_OrderedDict);
106881  __pyx_t_2 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
106882  __Pyx_GOTREF(__pyx_t_2);
106883  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106884  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_OrderedDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
106885  __Pyx_GOTREF(__pyx_t_1);
106886  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OrderedDict, __pyx_t_1) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
106887  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106888  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106889 
106890  /* "mbd/CouplingFSI.pyx":47
106891  * from cython.operator cimport dereference as deref
106892  * # from cython.cpp cimport static_cast
106893  * import xml.etree.ElementTree as ET # <<<<<<<<<<<<<<
106894  * import h5py
106895  * # chrono C++ headers
106896  */
106897  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
106898  __Pyx_GOTREF(__pyx_t_2);
106899  __Pyx_INCREF(__pyx_n_s__240);
106900  __Pyx_GIVEREF(__pyx_n_s__240);
106901  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s__240);
106902  __pyx_t_1 = __Pyx_Import(__pyx_n_s_xml_etree_ElementTree, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 47, __pyx_L1_error)
106903  __Pyx_GOTREF(__pyx_t_1);
106904  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106905  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ET, __pyx_t_1) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
106906  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106907 
106908  /* "mbd/CouplingFSI.pyx":48
106909  * # from cython.cpp cimport static_cast
106910  * import xml.etree.ElementTree as ET
106911  * import h5py # <<<<<<<<<<<<<<
106912  * # chrono C++ headers
106913  * cimport ChronoHeaders as ch
106914  */
106915  __pyx_t_1 = __Pyx_Import(__pyx_n_s_h5py, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
106916  __Pyx_GOTREF(__pyx_t_1);
106917  if (PyDict_SetItem(__pyx_d, __pyx_n_s_h5py, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
106918  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106919 
106920  /* "mbd/CouplingFSI.pyx":52
106921  * cimport ChronoHeaders as ch
106922  * # chrono Python headers
106923  * from proteus.mprans import BodyDynamics as bd # <<<<<<<<<<<<<<
106924  * from proteus.Archiver import indentXML
106925  * import pychrono as chrono
106926  */
106927  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
106928  __Pyx_GOTREF(__pyx_t_1);
106929  __Pyx_INCREF(__pyx_n_s_BodyDynamics);
106930  __Pyx_GIVEREF(__pyx_n_s_BodyDynamics);
106931  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_BodyDynamics);
106932  __pyx_t_2 = __Pyx_Import(__pyx_n_s_proteus_mprans, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
106933  __Pyx_GOTREF(__pyx_t_2);
106934  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106935  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_BodyDynamics); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
106936  __Pyx_GOTREF(__pyx_t_1);
106937  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bd, __pyx_t_1) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
106938  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106939  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106940 
106941  /* "mbd/CouplingFSI.pyx":53
106942  * # chrono Python headers
106943  * from proteus.mprans import BodyDynamics as bd
106944  * from proteus.Archiver import indentXML # <<<<<<<<<<<<<<
106945  * import pychrono as chrono
106946  * from pychrono import fea as chrono_fea
106947  */
106948  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
106949  __Pyx_GOTREF(__pyx_t_2);
106950  __Pyx_INCREF(__pyx_n_s_indentXML);
106951  __Pyx_GIVEREF(__pyx_n_s_indentXML);
106952  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_indentXML);
106953  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus_Archiver, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
106954  __Pyx_GOTREF(__pyx_t_1);
106955  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106956  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_indentXML); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
106957  __Pyx_GOTREF(__pyx_t_2);
106958  if (PyDict_SetItem(__pyx_d, __pyx_n_s_indentXML, __pyx_t_2) < 0) __PYX_ERR(0, 53, __pyx_L1_error)
106959  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106960  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106961 
106962  /* "mbd/CouplingFSI.pyx":54
106963  * from proteus.mprans import BodyDynamics as bd
106964  * from proteus.Archiver import indentXML
106965  * import pychrono as chrono # <<<<<<<<<<<<<<
106966  * from pychrono import fea as chrono_fea
106967  *
106968  */
106969  __pyx_t_1 = __Pyx_Import(__pyx_n_s_pychrono, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
106970  __Pyx_GOTREF(__pyx_t_1);
106971  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chrono, __pyx_t_1) < 0) __PYX_ERR(0, 54, __pyx_L1_error)
106972  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106973 
106974  /* "mbd/CouplingFSI.pyx":55
106975  * from proteus.Archiver import indentXML
106976  * import pychrono as chrono
106977  * from pychrono import fea as chrono_fea # <<<<<<<<<<<<<<
106978  *
106979  * # needed for sphinx docs
106980  */
106981  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
106982  __Pyx_GOTREF(__pyx_t_1);
106983  __Pyx_INCREF(__pyx_n_s_fea);
106984  __Pyx_GIVEREF(__pyx_n_s_fea);
106985  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_fea);
106986  __pyx_t_2 = __Pyx_Import(__pyx_n_s_pychrono, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
106987  __Pyx_GOTREF(__pyx_t_2);
106988  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106989  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_fea); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error)
106990  __Pyx_GOTREF(__pyx_t_1);
106991  if (PyDict_SetItem(__pyx_d, __pyx_n_s_chrono_fea, __pyx_t_1) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
106992  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
106993  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
106994 
106995  /* "mbd/CouplingFSI.pyx":58
106996  *
106997  * # needed for sphinx docs
106998  * __all__ = ['ProtChSystem', # <<<<<<<<<<<<<<
106999  * 'ProtChBody',
107000  * 'ProtChMesh',
107001  */
107002  __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
107003  __Pyx_GOTREF(__pyx_t_2);
107004  __Pyx_INCREF(__pyx_n_s_ProtChSystem);
107005  __Pyx_GIVEREF(__pyx_n_s_ProtChSystem);
107006  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ProtChSystem);
107007  __Pyx_INCREF(__pyx_n_s_ProtChBody);
107008  __Pyx_GIVEREF(__pyx_n_s_ProtChBody);
107009  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_ProtChBody);
107010  __Pyx_INCREF(__pyx_n_s_ProtChMesh);
107011  __Pyx_GIVEREF(__pyx_n_s_ProtChMesh);
107012  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_ProtChMesh);
107013  __Pyx_INCREF(__pyx_n_s_ProtChMoorings);
107014  __Pyx_GIVEREF(__pyx_n_s_ProtChMoorings);
107015  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_ProtChMoorings);
107016  __Pyx_INCREF(__pyx_n_s_ProtChAddedMass);
107017  __Pyx_GIVEREF(__pyx_n_s_ProtChAddedMass);
107018  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_ProtChAddedMass);
107019  if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
107020  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107021 
107022  /* "mbd/CouplingFSI.pyx":113
107023  * self.setName(b'rigidbody')
107024  *
107025  * def getChronoObject(self): # <<<<<<<<<<<<<<
107026  * return self.ChBody
107027  *
107028  */
107029  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_3getChronoObject, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getChronoObject, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
107030  __Pyx_GOTREF(__pyx_t_2);
107031  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getChronoObject, __pyx_t_2) < 0) __PYX_ERR(0, 113, __pyx_L1_error)
107032  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107033  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107034 
107035  /* "mbd/CouplingFSI.pyx":116
107036  * return self.ChBody
107037  *
107038  * def attachShape(self, # <<<<<<<<<<<<<<
107039  * shape,
107040  * take_shape_name=True):
107041  */
107042  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_5attachShape, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_attachShape, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 116, __pyx_L1_error)
107043  __Pyx_GOTREF(__pyx_t_2);
107044  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_attachShape, __pyx_t_2) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
107045  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107046  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107047 
107048  /* "mbd/CouplingFSI.pyx":144
107049  * def addTriangleMeshFromShape(self,
107050  * object shape=None,
107051  * double[:] pos=None, # <<<<<<<<<<<<<<
107052  * double[:,:] rot=None,
107053  * bool is_static=False,
107054  */
107055  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 144, __pyx_L1_error)
107056  __pyx_k__6 = __pyx_t_3;
107057  __pyx_t_3.memview = NULL;
107058  __pyx_t_3.data = NULL;
107059 
107060  /* "mbd/CouplingFSI.pyx":145
107061  * object shape=None,
107062  * double[:] pos=None,
107063  * double[:,:] rot=None, # <<<<<<<<<<<<<<
107064  * bool is_static=False,
107065  * bool is_convex=False,
107066  */
107067  __pyx_t_4 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_4.memview)) __PYX_ERR(0, 145, __pyx_L1_error)
107068  __pyx_k__7 = __pyx_t_4;
107069  __pyx_t_4.memview = NULL;
107070  __pyx_t_4.data = NULL;
107071 
107072  /* "mbd/CouplingFSI.pyx":142
107073  * self.ChBody.SetPos(new_vec)
107074  *
107075  * def addTriangleMeshFromShape(self, # <<<<<<<<<<<<<<
107076  * object shape=None,
107077  * double[:] pos=None,
107078  */
107079  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_7addTriangleMeshFromShape, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_addTriangleMeshFromSh, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
107080  __Pyx_GOTREF(__pyx_t_2);
107081  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_addTriangleMeshFromShape, __pyx_t_2) < 0) __PYX_ERR(0, 142, __pyx_L1_error)
107082  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107083  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107084 
107085  /* "mbd/CouplingFSI.pyx":246
107086  * # sphereswept_thickness)
107087  *
107088  * def getTriangleMeshInfo(self): # <<<<<<<<<<<<<<
107089  * # vertices
107090  * cdef vector[ch.ChVector[double]] chpos = deref(self.thisptr.trimesh).getCoordsVertices()
107091  */
107092  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_9getTriangleMeshInfo, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getTriangleMeshInfo, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__9)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
107093  __Pyx_GOTREF(__pyx_t_2);
107094  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getTriangleMeshInfo, __pyx_t_2) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
107095  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107096  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107097 
107098  /* "mbd/CouplingFSI.pyx":263
107099  * return pos, el_connect
107100  *
107101  * def setCollisionOptions(self, # <<<<<<<<<<<<<<
107102  * double envelope=0.001,
107103  * double margin=0.0005,
107104  */
107105  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_11setCollisionOptions, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setCollisionOptions, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__10)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error)
107106  __Pyx_GOTREF(__pyx_t_2);
107107  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setCollisionOptions, __pyx_t_2) < 0) __PYX_ERR(0, 263, __pyx_L1_error)
107108  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107109  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107110 
107111  /* "mbd/CouplingFSI.pyx":271
107112  * deref(deref(self.thisptr.body).GetCollisionModel()).SetSafeMargin(margin)
107113  *
107114  * def setBoundaryFlags(self, flags): # <<<<<<<<<<<<<<
107115  * """Sets the flags of the boundaries of the body
107116  * numbers must be gloabal (from domain.segmentFlags or
107117  */
107118  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_13setBoundaryFlags, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setBoundaryFlags, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__11)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
107119  __Pyx_GOTREF(__pyx_t_2);
107120  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setBoundaryFlags, __pyx_t_2) < 0) __PYX_ERR(0, 271, __pyx_L1_error)
107121  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107122  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107123 
107124  /* "mbd/CouplingFSI.pyx":283
107125  * self.boundaryFlags = np.array(flags, 'i')
107126  *
107127  * def setIBM(self, useIBM=True, radiusIBM=0., sdfIBM=None): # <<<<<<<<<<<<<<
107128  * """Sets IBM mode for retrieving fluid forces
107129  *
107130  */
107131  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_15setIBM, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setIBM, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error)
107132  __Pyx_GOTREF(__pyx_t_2);
107133  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setIBM, __pyx_t_2) < 0) __PYX_ERR(0, 283, __pyx_L1_error)
107134  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107135  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107136 
107137  /* "mbd/CouplingFSI.pyx":299
107138  * self.sdfIBM = sdfIBM
107139  *
107140  * def setWidth2D(self, width): # <<<<<<<<<<<<<<
107141  * """Sets width of 2D body (for forces and moments calculation)
107142  *
107143  */
107144  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_17setWidth2D, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setWidth2D, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error)
107145  __Pyx_GOTREF(__pyx_t_2);
107146  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setWidth2D, __pyx_t_2) < 0) __PYX_ERR(0, 299, __pyx_L1_error)
107147  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107148  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107149 
107150  /* "mbd/CouplingFSI.pyx":309
107151  * self.width_2D = width
107152  *
107153  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
107154  * pass
107155  *
107156  */
107157  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_19attachAuxiliaryVariables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_attachAuxiliaryVariab, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
107158  __Pyx_GOTREF(__pyx_t_2);
107159  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_attachAuxiliaryVariables, __pyx_t_2) < 0) __PYX_ERR(0, 309, __pyx_L1_error)
107160  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107161  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107162 
107163  /* "mbd/CouplingFSI.pyx":312
107164  * pass
107165  *
107166  * def setInitialRot(self, rot): # <<<<<<<<<<<<<<
107167  * cdef np.ndarray zeros = np.zeros(3)
107168  * self.rotation_init = rot
107169  */
107170  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_21setInitialRot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setInitialRot, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 312, __pyx_L1_error)
107171  __Pyx_GOTREF(__pyx_t_2);
107172  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setInitialRot, __pyx_t_2) < 0) __PYX_ERR(0, 312, __pyx_L1_error)
107173  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107174  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107175 
107176  /* "mbd/CouplingFSI.pyx":322
107177  * self.thisptr.poststep()
107178  *
107179  * def hxyz(self, np.ndarray x, double t, debug=False): # <<<<<<<<<<<<<<
107180  * cdef np.ndarray h
107181  * cdef np.ndarray xx
107182  */
107183  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_23hxyz, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hxyz, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L1_error)
107184  __Pyx_GOTREF(__pyx_t_2);
107185  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hxyz, __pyx_t_2) < 0) __PYX_ERR(0, 322, __pyx_L1_error)
107186  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107187  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107188 
107189  /* "mbd/CouplingFSI.pyx":400
107190  * return h
107191  *
107192  * def hx(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107193  * """BC function for mesh nodes displacement (x component)
107194  *
107195  */
107196  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_25hx, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hx, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error)
107197  __Pyx_GOTREF(__pyx_t_2);
107198  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hx, __pyx_t_2) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
107199  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107200  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107201 
107202  /* "mbd/CouplingFSI.pyx":412
107203  * return self.hxyz(x, t)[0]
107204  *
107205  * def hy(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107206  * """BC function for mesh nodes displacement (y component)
107207  *
107208  */
107209  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_27hy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hy, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
107210  __Pyx_GOTREF(__pyx_t_2);
107211  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hy, __pyx_t_2) < 0) __PYX_ERR(0, 412, __pyx_L1_error)
107212  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107213  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107214 
107215  /* "mbd/CouplingFSI.pyx":424
107216  * return self.hxyz(x, t)[1]
107217  *
107218  * def hz(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107219  * """BC function for mesh nodes displacement (z component)
107220  *
107221  */
107222  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_29hz, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hz, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 424, __pyx_L1_error)
107223  __Pyx_GOTREF(__pyx_t_2);
107224  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hz, __pyx_t_2) < 0) __PYX_ERR(0, 424, __pyx_L1_error)
107225  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107226  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107227 
107228  /* "mbd/CouplingFSI.pyx":436
107229  * return self.hxyz(x, t)[2]
107230  *
107231  * def hx_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107232  * """BC function for mesh nodes displacement (x component)
107233  *
107234  */
107235  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_31hx_translation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hx_translation, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
107236  __Pyx_GOTREF(__pyx_t_2);
107237  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hx_translation, __pyx_t_2) < 0) __PYX_ERR(0, 436, __pyx_L1_error)
107238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107239  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107240 
107241  /* "mbd/CouplingFSI.pyx":448
107242  * return (self.position-self.position_last)[0]
107243  *
107244  * def hy_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107245  * """BC function for mesh nodes displacement (y component)
107246  *
107247  */
107248  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_33hy_translation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hy_translation, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error)
107249  __Pyx_GOTREF(__pyx_t_2);
107250  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hy_translation, __pyx_t_2) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
107251  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107252  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107253 
107254  /* "mbd/CouplingFSI.pyx":460
107255  * return (self.position-self.position_last)[1]
107256  *
107257  * def hz_translation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107258  * """BC function for mesh nodes displacement (z component)
107259  *
107260  */
107261  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_35hz_translation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hz_translation, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
107262  __Pyx_GOTREF(__pyx_t_2);
107263  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hz_translation, __pyx_t_2) < 0) __PYX_ERR(0, 460, __pyx_L1_error)
107264  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107265  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107266 
107267  /* "mbd/CouplingFSI.pyx":472
107268  * return (self.position-self.position_last)[2]
107269  *
107270  * def hx_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107271  * """BC function for mesh nodes displacement (x component)
107272  *
107273  */
107274  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_37hx_rotation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hx_rotation, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
107275  __Pyx_GOTREF(__pyx_t_2);
107276  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hx_rotation, __pyx_t_2) < 0) __PYX_ERR(0, 472, __pyx_L1_error)
107277  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107278  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107279 
107280  /* "mbd/CouplingFSI.pyx":484
107281  * return self.hxyz(x, t)[0]-(self.position-self.position_last)[0]
107282  *
107283  * def hy_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107284  * """BC function for mesh nodes displacement (y component)
107285  *
107286  */
107287  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_39hy_rotation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hy_rotation, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
107288  __Pyx_GOTREF(__pyx_t_2);
107289  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hy_rotation, __pyx_t_2) < 0) __PYX_ERR(0, 484, __pyx_L1_error)
107290  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107291  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107292 
107293  /* "mbd/CouplingFSI.pyx":496
107294  * return self.hxyz(x, t)[1]-(self.position-self.position_last)[1]
107295  *
107296  * def hz_rotation(self, np.ndarray x, double t): # <<<<<<<<<<<<<<
107297  * """BC function for mesh nodes displacement (z component)
107298  *
107299  */
107300  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_41hz_rotation, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_hz_rotation, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 496, __pyx_L1_error)
107301  __Pyx_GOTREF(__pyx_t_2);
107302  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_hz_rotation, __pyx_t_2) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
107303  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107304  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107305 
107306  /* "mbd/CouplingFSI.pyx":508
107307  * return self.hxyz(x, t)[2]-(self.position-self.position_last)[2]
107308  *
107309  * def addSpring(self, double stiffness, double damping, np.ndarray fairlead, # <<<<<<<<<<<<<<
107310  * np.ndarray anchor, double rest_length):
107311  * self.thisptr.addSpring(stiffness, damping, <double*> fairlead.data,
107312  */
107313  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_43addSpring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_addSpring, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error)
107314  __Pyx_GOTREF(__pyx_t_2);
107315  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_addSpring, __pyx_t_2) < 0) __PYX_ERR(0, 508, __pyx_L1_error)
107316  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107317  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107318 
107319  /* "mbd/CouplingFSI.pyx":513
107320  * <double*> anchor.data, rest_length)
107321  *
107322  * def setConstraints(self, np.ndarray free_x, np.ndarray free_r): # <<<<<<<<<<<<<<
107323  * """Sets constraints on the body
107324  * (!) Only acts on Proteus and gravity forces
107325  */
107326  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_45setConstraints, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setConstraints, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
107327  __Pyx_GOTREF(__pyx_t_2);
107328  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setConstraints, __pyx_t_2) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
107329  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107330  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107331 
107332  /* "mbd/CouplingFSI.pyx":526
107333  * self.thisptr.setConstraints(<double*> free_x.data, <double*> free_r.data)
107334  *
107335  * def setAddedMass(self, np.ndarray Aij): # <<<<<<<<<<<<<<
107336  * """
107337  * Sets the added mass matrix of the body
107338  */
107339  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_47setAddedMass, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setAddedMass, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
107340  __Pyx_GOTREF(__pyx_t_2);
107341  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setAddedMass, __pyx_t_2) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
107342  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107343  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107344 
107345  /* "mbd/CouplingFSI.pyx":616
107346  * self.M_Aij = Aija[3:]
107347  *
107348  * def getPressureForces(self): # <<<<<<<<<<<<<<
107349  * """Gives pressure forces from fluid (Proteus) acting on body.
107350  * (!) Only works during proteus simulation
107351  */
107352  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_49getPressureForces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getPressureForces, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
107353  __Pyx_GOTREF(__pyx_t_2);
107354  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getPressureForces, __pyx_t_2) < 0) __PYX_ERR(0, 616, __pyx_L1_error)
107355  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107356  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107357 
107358  /* "mbd/CouplingFSI.pyx":633
107359  * return F_p
107360  *
107361  * def getShearForces(self): # <<<<<<<<<<<<<<
107362  * """Gives shear forces from fluid (Proteus) acting on body
107363  * (!) Only works during proteus simulation
107364  */
107365  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_51getShearForces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getShearForces, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 633, __pyx_L1_error)
107366  __Pyx_GOTREF(__pyx_t_2);
107367  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getShearForces, __pyx_t_2) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
107368  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107369  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107370 
107371  /* "mbd/CouplingFSI.pyx":650
107372  * return F_v
107373  *
107374  * def getMoments(self): # <<<<<<<<<<<<<<
107375  * """Gives moments from fluid (Proteus) acting on body
107376  * (!) Only works during proteus simulation
107377  */
107378  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_53getMoments, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getMoments, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
107379  __Pyx_GOTREF(__pyx_t_2);
107380  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getMoments, __pyx_t_2) < 0) __PYX_ERR(0, 650, __pyx_L1_error)
107381  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107382  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107383 
107384  /* "mbd/CouplingFSI.pyx":672
107385  * return M
107386  *
107387  * def getRotationMatrix(self): # <<<<<<<<<<<<<<
107388  * """Gives current rotation (matrix) of body
107389  *
107390  */
107391  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_55getRotationMatrix, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getRotationMatrix, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
107392  __Pyx_GOTREF(__pyx_t_2);
107393  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getRotationMatrix, __pyx_t_2) < 0) __PYX_ERR(0, 672, __pyx_L1_error)
107394  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107395  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107396 
107397  /* "mbd/CouplingFSI.pyx":694
107398  * return rot
107399  *
107400  * def prestep(self): # <<<<<<<<<<<<<<
107401  * """Called before Chrono system step.
107402  * Sets external forces automatically from Proteus solution.
107403  */
107404  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_57prestep, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_prestep, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 694, __pyx_L1_error)
107405  __Pyx_GOTREF(__pyx_t_2);
107406  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_prestep, __pyx_t_2) < 0) __PYX_ERR(0, 694, __pyx_L1_error)
107407  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107408  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107409 
107410  /* "mbd/CouplingFSI.pyx":723
107411  * self.setExternalForces()
107412  *
107413  * def setExternalForces(self, np.ndarray forces=None, np.ndarray moments=None): # <<<<<<<<<<<<<<
107414  * """Sets external forces to body.
107415  * Called during prestep or can be called manually. If called manually,
107416  */
107417  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_59setExternalForces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setExternalForces, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
107418  __Pyx_GOTREF(__pyx_t_2);
107419  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setExternalForces, __pyx_t_2) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
107420  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107421  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107422 
107423  /* "mbd/CouplingFSI.pyx":784
107424  * self.predicted = False
107425  *
107426  * def poststep(self): # <<<<<<<<<<<<<<
107427  * """Called after Chrono system step.
107428  * Records values to csv, broadcast new position and rotation from
107429  */
107430  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_61poststep, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_poststep, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error)
107431  __Pyx_GOTREF(__pyx_t_2);
107432  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_poststep, __pyx_t_2) < 0) __PYX_ERR(0, 784, __pyx_L1_error)
107433  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107434  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107435 
107436  /* "mbd/CouplingFSI.pyx":828
107437  * self.updateIBM()
107438  *
107439  * def updateIBM(self): # <<<<<<<<<<<<<<
107440  * c = self.ProtChSystem.model.levelModelList[-1].coefficients
107441  * if c.use_ball_as_particle:
107442  */
107443  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_63updateIBM, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_updateIBM, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
107444  __Pyx_GOTREF(__pyx_t_2);
107445  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_updateIBM, __pyx_t_2) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
107446  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107447  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107448 
107449  /* "mbd/CouplingFSI.pyx":850
107450  * c.particle_velocityList[flag] = lambda x, t: self.getVelocity()
107451  *
107452  * def getDynamicSDF(self, t, x): # <<<<<<<<<<<<<<
107453  * chpos = self.ChBody.GetPos()
107454  * relative_x = x-np.array([chpos.x, chpos.y, chpos.z])
107455  */
107456  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_65getDynamicSDF, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getDynamicSDF, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error)
107457  __Pyx_GOTREF(__pyx_t_2);
107458  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getDynamicSDF, __pyx_t_2) < 0) __PYX_ERR(0, 850, __pyx_L1_error)
107459  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107460  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107461 
107462  /* "mbd/CouplingFSI.pyx":855
107463  * return self.sdfIBM(t, relative_x)
107464  *
107465  * def setPosition(self, np.ndarray pos): # <<<<<<<<<<<<<<
107466  * chvec = chrono.ChVectorD(pos[0], pos[1], pos[2])
107467  * self.ChBody.SetPos(chvec)
107468  */
107469  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_67setPosition, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setPosition, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error)
107470  __Pyx_GOTREF(__pyx_t_2);
107471  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setPosition, __pyx_t_2) < 0) __PYX_ERR(0, 855, __pyx_L1_error)
107472  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107473  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107474 
107475  /* "mbd/CouplingFSI.pyx":859
107476  * self.ChBody.SetPos(chvec)
107477  *
107478  * def getPosition(self): # <<<<<<<<<<<<<<
107479  * chpos = self.ChBody.GetPos()
107480  * return pyvec2array(chpos)
107481  */
107482  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_69getPosition, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getPosition, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error)
107483  __Pyx_GOTREF(__pyx_t_2);
107484  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getPosition, __pyx_t_2) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
107485  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107486  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107487 
107488  /* "mbd/CouplingFSI.pyx":863
107489  * return pyvec2array(chpos)
107490  *
107491  * def setMass(self, double mass): # <<<<<<<<<<<<<<
107492  * self.ChBody.SetMass(mass)
107493  *
107494  */
107495  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_71setMass, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setMass, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 863, __pyx_L1_error)
107496  __Pyx_GOTREF(__pyx_t_2);
107497  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setMass, __pyx_t_2) < 0) __PYX_ERR(0, 863, __pyx_L1_error)
107498  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107499  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107500 
107501  /* "mbd/CouplingFSI.pyx":866
107502  * self.ChBody.SetMass(mass)
107503  *
107504  * def getMass(self): # <<<<<<<<<<<<<<
107505  * return self.ChBody.GetMass()
107506  *
107507  */
107508  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_73getMass, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getMass, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error)
107509  __Pyx_GOTREF(__pyx_t_2);
107510  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getMass, __pyx_t_2) < 0) __PYX_ERR(0, 866, __pyx_L1_error)
107511  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107512  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107513 
107514  /* "mbd/CouplingFSI.pyx":869
107515  * return self.ChBody.GetMass()
107516  *
107517  * def setInertiaXX(self, np.ndarray inertia): # <<<<<<<<<<<<<<
107518  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
107519  * self.ChBody.SetInertiaXX(chvec)
107520  */
107521  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_75setInertiaXX, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setInertiaXX, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error)
107522  __Pyx_GOTREF(__pyx_t_2);
107523  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setInertiaXX, __pyx_t_2) < 0) __PYX_ERR(0, 869, __pyx_L1_error)
107524  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107525  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107526 
107527  /* "mbd/CouplingFSI.pyx":873
107528  * self.ChBody.SetInertiaXX(chvec)
107529  *
107530  * def setInertiaXY(self, np.ndarray inertia): # <<<<<<<<<<<<<<
107531  * chvec = chrono.ChVectorD(inertia[0], inertia[1], inertia[2])
107532  * self.ChBody.SetInertiaXY(chvec)
107533  */
107534  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_77setInertiaXY, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setInertiaXY, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error)
107535  __Pyx_GOTREF(__pyx_t_2);
107536  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setInertiaXY, __pyx_t_2) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
107537  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107538  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107539 
107540  /* "mbd/CouplingFSI.pyx":877
107541  * self.ChBody.SetInertiaXY(chvec)
107542  *
107543  * def getInertia(self): # <<<<<<<<<<<<<<
107544  * iner = pymat332array(self.ChBody.GetInertia())
107545  * return iner
107546  */
107547  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_79getInertia, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getInertia, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error)
107548  __Pyx_GOTREF(__pyx_t_2);
107549  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getInertia, __pyx_t_2) < 0) __PYX_ERR(0, 877, __pyx_L1_error)
107550  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107551  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107552 
107553  /* "mbd/CouplingFSI.pyx":881
107554  * return iner
107555  *
107556  * def getVelocity(self): # <<<<<<<<<<<<<<
107557  * chvel = self.ChBody.GetPos_dt()
107558  * return pyvec2array(chvel)
107559  */
107560  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_81getVelocity, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getVelocity, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 881, __pyx_L1_error)
107561  __Pyx_GOTREF(__pyx_t_2);
107562  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getVelocity, __pyx_t_2) < 0) __PYX_ERR(0, 881, __pyx_L1_error)
107563  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107564  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107565 
107566  /* "mbd/CouplingFSI.pyx":885
107567  * return pyvec2array(chvel)
107568  *
107569  * def setVelocity(self, np.ndarray vel): # <<<<<<<<<<<<<<
107570  * chvec = chrono.ChVectorD(vel[0], vel[1], vel[2])
107571  * self.ChBody.SetPos_dt(chvec)
107572  */
107573  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_83setVelocity, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setVelocity, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 885, __pyx_L1_error)
107574  __Pyx_GOTREF(__pyx_t_2);
107575  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setVelocity, __pyx_t_2) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
107576  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107577  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107578 
107579  /* "mbd/CouplingFSI.pyx":889
107580  * self.ChBody.SetPos_dt(chvec)
107581  *
107582  * def prediction(self): # <<<<<<<<<<<<<<
107583  * comm = Comm.get().comm.tompi4py()
107584  * cdef ch.ChVector h_body_vec
107585  */
107586  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_85prediction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_prediction, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
107587  __Pyx_GOTREF(__pyx_t_2);
107588  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_prediction, __pyx_t_2) < 0) __PYX_ERR(0, 889, __pyx_L1_error)
107589  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107590  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107591 
107592  /* "mbd/CouplingFSI.pyx":944
107593  * self.predicted = True
107594  *
107595  * def calculate_init(self): # <<<<<<<<<<<<<<
107596  * """Called from self.ProtChSystem.calculate_init()
107597  * before simulation starts
107598  */
107599  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_87calculate_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_calculate_init, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 944, __pyx_L1_error)
107600  __Pyx_GOTREF(__pyx_t_2);
107601  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_calculate_init, __pyx_t_2) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
107602  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107603  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107604 
107605  /* "mbd/CouplingFSI.pyx":975
107606  * self.thisptr.calculate_init()
107607  *
107608  * def calculate(self): # <<<<<<<<<<<<<<
107609  * pass
107610  *
107611  */
107612  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_89calculate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_calculate, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__72)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 975, __pyx_L1_error)
107613  __Pyx_GOTREF(__pyx_t_2);
107614  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_calculate, __pyx_t_2) < 0) __PYX_ERR(0, 975, __pyx_L1_error)
107615  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107616  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107617 
107618  /* "mbd/CouplingFSI.pyx":978
107619  * pass
107620  *
107621  * def setPrescribedMotionCustom(self, double[:] t, double[:] x=None, # <<<<<<<<<<<<<<
107622  * double[:] y=None, double[:] z=None,
107623  * double[:] ang=None, double[:] ang2=None,
107624  */
107625  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 978, __pyx_L1_error)
107626  __pyx_k__73 = __pyx_t_3;
107627  __pyx_t_3.memview = NULL;
107628  __pyx_t_3.data = NULL;
107629 
107630  /* "mbd/CouplingFSI.pyx":979
107631  *
107632  * def setPrescribedMotionCustom(self, double[:] t, double[:] x=None,
107633  * double[:] y=None, double[:] z=None, # <<<<<<<<<<<<<<
107634  * double[:] ang=None, double[:] ang2=None,
107635  * double[:] ang3=None, double t_max=0):
107636  */
107637  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 979, __pyx_L1_error)
107638  __pyx_k__74 = __pyx_t_3;
107639  __pyx_t_3.memview = NULL;
107640  __pyx_t_3.data = NULL;
107641  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 979, __pyx_L1_error)
107642  __pyx_k__75 = __pyx_t_3;
107643  __pyx_t_3.memview = NULL;
107644  __pyx_t_3.data = NULL;
107645 
107646  /* "mbd/CouplingFSI.pyx":980
107647  * def setPrescribedMotionCustom(self, double[:] t, double[:] x=None,
107648  * double[:] y=None, double[:] z=None,
107649  * double[:] ang=None, double[:] ang2=None, # <<<<<<<<<<<<<<
107650  * double[:] ang3=None, double t_max=0):
107651  * """Sets custom prescribed motion for body.
107652  */
107653  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 980, __pyx_L1_error)
107654  __pyx_k__76 = __pyx_t_3;
107655  __pyx_t_3.memview = NULL;
107656  __pyx_t_3.data = NULL;
107657  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 980, __pyx_L1_error)
107658  __pyx_k__77 = __pyx_t_3;
107659  __pyx_t_3.memview = NULL;
107660  __pyx_t_3.data = NULL;
107661 
107662  /* "mbd/CouplingFSI.pyx":981
107663  * double[:] y=None, double[:] z=None,
107664  * double[:] ang=None, double[:] ang2=None,
107665  * double[:] ang3=None, double t_max=0): # <<<<<<<<<<<<<<
107666  * """Sets custom prescribed motion for body.
107667  * Parameters must have the same length as the time array t
107668  */
107669  __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 981, __pyx_L1_error)
107670  __pyx_k__78 = __pyx_t_3;
107671  __pyx_t_3.memview = NULL;
107672  __pyx_t_3.data = NULL;
107673 
107674  /* "mbd/CouplingFSI.pyx":978
107675  * pass
107676  *
107677  * def setPrescribedMotionCustom(self, double[:] t, double[:] x=None, # <<<<<<<<<<<<<<
107678  * double[:] y=None, double[:] z=None,
107679  * double[:] ang=None, double[:] ang2=None,
107680  */
107681  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_91setPrescribedMotionCustom, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setPrescribedMotionCu, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error)
107682  __Pyx_GOTREF(__pyx_t_2);
107683  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setPrescribedMotionCustom, __pyx_t_2) < 0) __PYX_ERR(0, 978, __pyx_L1_error)
107684  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107685  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107686 
107687  /* "mbd/CouplingFSI.pyx":1042
107688  * t_max)
107689  *
107690  * def setPrescribedMotionSine(self, double a, double f): # <<<<<<<<<<<<<<
107691  * """Sets sinusoidal prescribed motion for body
107692  *
107693  */
107694  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_93setPrescribedMotionSine, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setPrescribedMotionSi, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error)
107695  __Pyx_GOTREF(__pyx_t_2);
107696  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setPrescribedMotionSine, __pyx_t_2) < 0) __PYX_ERR(0, 1042, __pyx_L1_error)
107697  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107698  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107699 
107700  /* "mbd/CouplingFSI.pyx":1054
107701  * self.thisptr.setPrescribedMotionSine(a, f)
107702  *
107703  * def setPrescribedMotionPoly(self, double coeff1): # <<<<<<<<<<<<<<
107704  * """Sets polynomial prescribed motion for body
107705  *
107706  */
107707  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_95setPrescribedMotionPoly, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setPrescribedMotionPo, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error)
107708  __Pyx_GOTREF(__pyx_t_2);
107709  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setPrescribedMotionPoly, __pyx_t_2) < 0) __PYX_ERR(0, 1054, __pyx_L1_error)
107710  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107711  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107712 
107713  /* "mbd/CouplingFSI.pyx":1064
107714  * self.thisptr.setPrescribedMotionPoly(coeff1)
107715  *
107716  * def setPrescribedMotion(self, function): # <<<<<<<<<<<<<<
107717  * """Sets custom prescribed motion function
107718  * (!) should be preferably set only if body is free and not
107719  */
107720  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_97setPrescribedMotion, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setPrescribedMotion, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
107721  __Pyx_GOTREF(__pyx_t_2);
107722  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setPrescribedMotion, __pyx_t_2) < 0) __PYX_ERR(0, 1064, __pyx_L1_error)
107723  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107724  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107725 
107726  /* "mbd/CouplingFSI.pyx":1086
107727  * return self.prescribed_motion_function(t)
107728  *
107729  * def storeValues(self): # <<<<<<<<<<<<<<
107730  * self.velocity_last = self.velocity
107731  * self.position_last = self.position
107732  */
107733  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_99storeValues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_storeValues, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
107734  __Pyx_GOTREF(__pyx_t_2);
107735  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_storeValues, __pyx_t_2) < 0) __PYX_ERR(0, 1086, __pyx_L1_error)
107736  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107737  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107738 
107739  /* "mbd/CouplingFSI.pyx":1105
107740  * self.M_Aij_last = np.array(self.M_Aij)
107741  *
107742  * def getValues(self): # <<<<<<<<<<<<<<
107743  * """Get values (pos, vel, acc, etc.) from C++ to python
107744  * """
107745  */
107746  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_101getValues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_getValues, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1105, __pyx_L1_error)
107747  __Pyx_GOTREF(__pyx_t_2);
107748  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_getValues, __pyx_t_2) < 0) __PYX_ERR(0, 1105, __pyx_L1_error)
107749  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107750  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107751 
107752  /* "mbd/CouplingFSI.pyx":1135
107753  *
107754  *
107755  * def setRecordValues(self, all_values=False, pos=False, # <<<<<<<<<<<<<<
107756  * rot=False, ang_disp=False, F=False, M=False,
107757  * inertia=False, vel=False, acc=False, ang_vel=False,
107758  */
107759  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_103setRecordValues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setRecordValues, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1135, __pyx_L1_error)
107760  __Pyx_GOTREF(__pyx_t_2);
107761  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setRecordValues, __pyx_t_2) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
107762  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107763  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107764 
107765  /* "mbd/CouplingFSI.pyx":1236
107766  * self.record_dict['hz'] = ['h_predict', 2]
107767  *
107768  * def _recordValues(self): # <<<<<<<<<<<<<<
107769  * """Records values of body attributes in a csv file.
107770  * """
107771  */
107772  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_105_recordValues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody__recordValues, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1236, __pyx_L1_error)
107773  __Pyx_GOTREF(__pyx_t_2);
107774  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_recordValues, __pyx_t_2) < 0) __PYX_ERR(0, 1236, __pyx_L1_error)
107775  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107776  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107777 
107778  /* "mbd/CouplingFSI.pyx":1287
107779  * Profiling.logEvent('finished recording values file of '+str(self.name))
107780  *
107781  * def _recordH5(self): # <<<<<<<<<<<<<<
107782  * Profiling.logEvent('recording h5 file of '+str(self.name))
107783  * tCount = self.ProtChSystem.tCount
107784  */
107785  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_107_recordH5, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody__recordH5, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1287, __pyx_L1_error)
107786  __Pyx_GOTREF(__pyx_t_2);
107787  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_recordH5, __pyx_t_2) < 0) __PYX_ERR(0, 1287, __pyx_L1_error)
107788  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107789  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107790 
107791  /* "mbd/CouplingFSI.pyx":1309
107792  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
107793  *
107794  * def _recordXML(self): # <<<<<<<<<<<<<<
107795  * Profiling.logEvent('recording xml file of '+str(self.name))
107796  * tCount = self.ProtChSystem.tCount
107797  */
107798  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_109_recordXML, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody__recordXML, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1309, __pyx_L1_error)
107799  __Pyx_GOTREF(__pyx_t_2);
107800  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_recordXML, __pyx_t_2) < 0) __PYX_ERR(0, 1309, __pyx_L1_error)
107801  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107802  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107803 
107804  /* "mbd/CouplingFSI.pyx":1385
107805  *
107806  *
107807  * def addPrismaticLinksWithSpring(self, np.ndarray pris1, # <<<<<<<<<<<<<<
107808  * np.ndarray pris2, double stiffness, double damping,
107809  * double rest_length):
107810  */
107811  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_111addPrismaticLinksWithSpring, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_addPrismaticLinksWith, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error)
107812  __Pyx_GOTREF(__pyx_t_2);
107813  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_addPrismaticLinksWithSpring, __pyx_t_2) < 0) __PYX_ERR(0, 1385, __pyx_L1_error)
107814  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107815  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107816 
107817  /* "mbd/CouplingFSI.pyx":1403
107818  * damping,
107819  * rest_length)
107820  * def addPrismaticLinkX(self, double[:] pris1): # <<<<<<<<<<<<<<
107821  * self.thisptr.addPrismaticLinkX(&pris1[0]);
107822  *
107823  */
107824  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_113addPrismaticLinkX, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_addPrismaticLinkX, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error)
107825  __Pyx_GOTREF(__pyx_t_2);
107826  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_addPrismaticLinkX, __pyx_t_2) < 0) __PYX_ERR(0, 1403, __pyx_L1_error)
107827  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107828  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107829 
107830  /* "mbd/CouplingFSI.pyx":1406
107831  * self.thisptr.addPrismaticLinkX(&pris1[0]);
107832  *
107833  * def setName(self, string name): # <<<<<<<<<<<<<<
107834  * """Sets name of body (used for csv file)
107835  *
107836  */
107837  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_115setName, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody_setName, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error)
107838  __Pyx_GOTREF(__pyx_t_2);
107839  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChBody->tp_dict, __pyx_n_s_setName, __pyx_t_2) < 0) __PYX_ERR(0, 1406, __pyx_L1_error)
107840  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107841  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChBody);
107842 
107843  /* "(tree fragment)":1
107844  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
107845  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
107846  * def __setstate_cython__(self, __pyx_state):
107847  */
107848  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_117__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody___reduce_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
107849  __Pyx_GOTREF(__pyx_t_2);
107850  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
107851  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107852 
107853  /* "(tree fragment)":3
107854  * def __reduce_cython__(self):
107855  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
107856  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
107857  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
107858  */
107859  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChBody_119__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChBody___setstate_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
107860  __Pyx_GOTREF(__pyx_t_2);
107861  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
107862  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107863 
107864  /* "mbd/CouplingFSI.pyx":1462
107865  * self.log_chrono_residuals = None
107866  *
107867  * def getChronoObject(self): # <<<<<<<<<<<<<<
107868  * return self.ChSystem
107869  *
107870  */
107871  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_3getChronoObject, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_getChronoObject, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L1_error)
107872  __Pyx_GOTREF(__pyx_t_2);
107873  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_getChronoObject, __pyx_t_2) < 0) __PYX_ERR(0, 1462, __pyx_L1_error)
107874  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107875  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107876 
107877  /* "mbd/CouplingFSI.pyx":1465
107878  * return self.ChSystem
107879  *
107880  * def setTimeStep(self, double dt): # <<<<<<<<<<<<<<
107881  * """Sets time step for Chrono solver.
107882  * Calculations in Chrono will use this time step within the
107883  */
107884  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_5setTimeStep, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_setTimeStep, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1465, __pyx_L1_error)
107885  __Pyx_GOTREF(__pyx_t_2);
107886  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_setTimeStep, __pyx_t_2) < 0) __PYX_ERR(0, 1465, __pyx_L1_error)
107887  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107888  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107889 
107890  /* "mbd/CouplingFSI.pyx":1477
107891  * self.thisptr.chrono_dt = dt
107892  *
107893  * def setSampleRate(self, sampleRate): # <<<<<<<<<<<<<<
107894  * self.sampleRate = sampleRate
107895  *
107896  */
107897  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_7setSampleRate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_setSampleRate, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1477, __pyx_L1_error)
107898  __Pyx_GOTREF(__pyx_t_2);
107899  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_setSampleRate, __pyx_t_2) < 0) __PYX_ERR(0, 1477, __pyx_L1_error)
107900  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107901  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107902 
107903  /* "mbd/CouplingFSI.pyx":1480
107904  * self.sampleRate = sampleRate
107905  *
107906  * def addProtChBody(self, ProtChBody body): # <<<<<<<<<<<<<<
107907  * # self.ChSystemSMC.Add(body.ChBody)
107908  * self.ChSystem.Add(body.ChBody)
107909  */
107910  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_9addProtChBody, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_addProtChBody, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1480, __pyx_L1_error)
107911  __Pyx_GOTREF(__pyx_t_2);
107912  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_addProtChBody, __pyx_t_2) < 0) __PYX_ERR(0, 1480, __pyx_L1_error)
107913  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107914  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107915 
107916  /* "mbd/CouplingFSI.pyx":1486
107917  * self.addSubcomponent(body) # add body to system (for pre and post steps)
107918  *
107919  * def addProtChMesh(self, ProtChMesh mesh): # <<<<<<<<<<<<<<
107920  * self.thisptr.addMesh(mesh.mesh)
107921  * mesh.ProtChSystem = self
107922  */
107923  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_11addProtChMesh, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_addProtChMesh, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1486, __pyx_L1_error)
107924  __Pyx_GOTREF(__pyx_t_2);
107925  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_addProtChMesh, __pyx_t_2) < 0) __PYX_ERR(0, 1486, __pyx_L1_error)
107926  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107927  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107928 
107929  /* "mbd/CouplingFSI.pyx":1490
107930  * mesh.ProtChSystem = self
107931  *
107932  * def setGravitationalAcceleration(self, g): # <<<<<<<<<<<<<<
107933  * chvec = chrono.ChVectorD(g[0], g[1], g[2])
107934  * self.ChSystem.Set_G_acc(chvec)
107935  */
107936  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_13setGravitationalAcceleration, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_setGravitationalAcc, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L1_error)
107937  __Pyx_GOTREF(__pyx_t_2);
107938  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_setGravitationalAcceleration, __pyx_t_2) < 0) __PYX_ERR(0, 1490, __pyx_L1_error)
107939  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107940  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107941 
107942  /* "mbd/CouplingFSI.pyx":1494
107943  * self.ChSystem.Set_G_acc(chvec)
107944  *
107945  * def getGravitationalAcceleration(self): # <<<<<<<<<<<<<<
107946  * return pyvec2array(self.ChSystem.Get_G_acc())
107947  *
107948  */
107949  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_15getGravitationalAcceleration, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_getGravitationalAcc, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1494, __pyx_L1_error)
107950  __Pyx_GOTREF(__pyx_t_2);
107951  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_getGravitationalAcceleration, __pyx_t_2) < 0) __PYX_ERR(0, 1494, __pyx_L1_error)
107952  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107953  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107954 
107955  /* "mbd/CouplingFSI.pyx":1497
107956  * return pyvec2array(self.ChSystem.Get_G_acc())
107957  *
107958  * def setCouplingScheme(self, string scheme, string prediction='backwardEuler'): # <<<<<<<<<<<<<<
107959  * assert scheme == "CSS" or scheme == "ISS", "Coupling scheme requested unknown"
107960  * assert prediction == "backwardEuler" or prediction == "forwardEuler" or prediction == "implicitOrder2", "Prediction requested unknown"
107961  */
107962  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_backwardEuler); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error)
107963  __pyx_k__106 = __pyx_t_5;
107964  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_17setCouplingScheme, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_setCouplingScheme, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __pyx_L1_error)
107965  __Pyx_GOTREF(__pyx_t_2);
107966  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_setCouplingScheme, __pyx_t_2) < 0) __PYX_ERR(0, 1497, __pyx_L1_error)
107967  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107968  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107969 
107970  /* "mbd/CouplingFSI.pyx":1503
107971  * self.prediction = prediction
107972  *
107973  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
107974  * """Attaches Proteus model to auxiliary variable
107975  * """
107976  */
107977  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_19attachModel, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_attachModel, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error)
107978  __Pyx_GOTREF(__pyx_t_2);
107979  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_attachModel, __pyx_t_2) < 0) __PYX_ERR(0, 1503, __pyx_L1_error)
107980  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107981  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107982 
107983  /* "mbd/CouplingFSI.pyx":1510
107984  * return self
107985  *
107986  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
107987  * pass
107988  *
107989  */
107990  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_21attachAuxiliaryVariables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_attachAuxiliaryVari, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1510, __pyx_L1_error)
107991  __Pyx_GOTREF(__pyx_t_2);
107992  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_attachAuxiliaryVariables, __pyx_t_2) < 0) __PYX_ERR(0, 1510, __pyx_L1_error)
107993  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
107994  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
107995 
107996  /* "mbd/CouplingFSI.pyx":1513
107997  * pass
107998  *
107999  * def setMinimumSubsteps(self, int nb): # <<<<<<<<<<<<<<
108000  * """Sets the minimum nb of chrono substeps per proteus step
108001  * if prot_dt=0.001 and ch_dt=0.002, there will be <nb>
108002  */
108003  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_23setMinimumSubsteps, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_setMinimumSubsteps, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
108004  __Pyx_GOTREF(__pyx_t_2);
108005  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_setMinimumSubsteps, __pyx_t_2) < 0) __PYX_ERR(0, 1513, __pyx_L1_error)
108006  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108007  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108008 
108009  /* "mbd/CouplingFSI.pyx":1525
108010  * self.min_nb_steps = nb
108011  *
108012  * def step(self, dt): # <<<<<<<<<<<<<<
108013  * self.dt_fluid_last = self.dt_fluid
108014  * self.dt_fluid = dt
108015  */
108016  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_25step, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_step, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error)
108017  __Pyx_GOTREF(__pyx_t_2);
108018  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_step, __pyx_t_2) < 0) __PYX_ERR(0, 1525, __pyx_L1_error)
108019  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108020  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108021 
108022  /* "mbd/CouplingFSI.pyx":1564
108023  * Profiling.logEvent('Chrono system to t='+str(t+self.dt_fluid_next/2.))
108024  *
108025  * def calculate(self, proteus_dt=None): # <<<<<<<<<<<<<<
108026  * """Does chrono system calculation for a Proteus time step
108027  * Calls prestep and poststep on all subcomponents (bodies,
108028  */
108029  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_27calculate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_calculate, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1564, __pyx_L1_error)
108030  __Pyx_GOTREF(__pyx_t_2);
108031  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_calculate, __pyx_t_2) < 0) __PYX_ERR(0, 1564, __pyx_L1_error)
108032  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108033  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108034 
108035  /* "mbd/CouplingFSI.pyx":1634
108036  * Profiling.logEvent("Chrono poststep finished")
108037  *
108038  * def calculate_init(self): # <<<<<<<<<<<<<<
108039  * """Does chrono system initialisation
108040  * (!) Must be called before the first calculate() call.
108041  */
108042  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_29calculate_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_calculate_init, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1634, __pyx_L1_error)
108043  __Pyx_GOTREF(__pyx_t_2);
108044  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_calculate_init, __pyx_t_2) < 0) __PYX_ERR(0, 1634, __pyx_L1_error)
108045  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108046  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108047 
108048  /* "mbd/CouplingFSI.pyx":1687
108049  * s.poststep()
108050  *
108051  * def setTimestepperType(self, string tstype, bool verbose=False): # <<<<<<<<<<<<<<
108052  * """Change timestepper (default: Euler)
108053  *
108054  */
108055  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_31setTimestepperType, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_setTimestepperType, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1687, __pyx_L1_error)
108056  __Pyx_GOTREF(__pyx_t_2);
108057  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_setTimestepperType, __pyx_t_2) < 0) __PYX_ERR(0, 1687, __pyx_L1_error)
108058  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108059  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108060 
108061  /* "mbd/CouplingFSI.pyx":1699
108062  * self.thisptr.setTimestepperType(tstype, verbose)
108063  *
108064  * def addSubcomponent(self, subcomponent): # <<<<<<<<<<<<<<
108065  * """Adds subcomponent to system
108066  * calculate_init() of subcomponent called before initial timestep
108067  */
108068  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_33addSubcomponent, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_addSubcomponent, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1699, __pyx_L1_error)
108069  __Pyx_GOTREF(__pyx_t_2);
108070  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_addSubcomponent, __pyx_t_2) < 0) __PYX_ERR(0, 1699, __pyx_L1_error)
108071  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108072  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108073 
108074  /* "mbd/CouplingFSI.pyx":1711
108075  * self.subcomponents += [subcomponent]
108076  *
108077  * def findElementContainingCoordsKD(self, coords): # <<<<<<<<<<<<<<
108078  * """
108079  * k-d tree search of nearest node, element containing coords, and owning
108080  */
108081  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_35findElementContainingCoordsKD, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_findElementContaini, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error)
108082  __Pyx_GOTREF(__pyx_t_2);
108083  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_findElementContainingCoordsKD, __pyx_t_2) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
108084  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108085  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108086 
108087  /* "mbd/CouplingFSI.pyx":1761
108088  *
108089  *
108090  * def findElementContainingCoordsDist(self, # <<<<<<<<<<<<<<
108091  * coords,
108092  * node_guess,
108093  */
108094  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_37findElementContainingCoordsDist, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_findElementContaini_2, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error)
108095  __Pyx_GOTREF(__pyx_t_2);
108096  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_findElementContainingCoordsDist, __pyx_t_2) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)
108097  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108098  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108099 
108100  /* "mbd/CouplingFSI.pyx":1862
108101  * return xi, node, eN, rank
108102  *
108103  * def getFluidVelocityLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
108104  * """
108105  * Parameters
108106  */
108107  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_39getFluidVelocityLocalCoords, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_getFluidVelocityLoc, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L1_error)
108108  __Pyx_GOTREF(__pyx_t_2);
108109  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_getFluidVelocityLocalCoords, __pyx_t_2) < 0) __PYX_ERR(0, 1862, __pyx_L1_error)
108110  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108111  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108112 
108113  /* "mbd/CouplingFSI.pyx":1891
108114  * return u, v, w
108115  *
108116  * def getFluidVelocityGradientLocalCoords(self, xi, element, rank): # <<<<<<<<<<<<<<
108117  * comm = Comm.get().comm.tompi4py()
108118  * if comm.rank == rank:
108119  */
108120  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_41getFluidVelocityGradientLocalCoords, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_getFluidVelocityGra, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1891, __pyx_L1_error)
108121  __Pyx_GOTREF(__pyx_t_2);
108122  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_getFluidVelocityGradientLocalCoo, __pyx_t_2) < 0) __PYX_ERR(0, 1891, __pyx_L1_error)
108123  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108124  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108125 
108126  /* "mbd/CouplingFSI.pyx":1906
108127  * return u_grad, v_grad, w_grad
108128  *
108129  * def setCollisionEnvelopeMargin(self, double envelope, double margin): # <<<<<<<<<<<<<<
108130  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
108131  *
108132  */
108133  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_43setCollisionEnvelopeMargin, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_setCollisionEnvelop, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1906, __pyx_L1_error)
108134  __Pyx_GOTREF(__pyx_t_2);
108135  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_setCollisionEnvelopeMargin, __pyx_t_2) < 0) __PYX_ERR(0, 1906, __pyx_L1_error)
108136  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108137  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108138 
108139  /* "mbd/CouplingFSI.pyx":1909
108140  * self.thisptr.setCollisionEnvelopeMargin(envelope, margin)
108141  *
108142  * def log_bodies_text(self, d_time, l_logging_info): # <<<<<<<<<<<<<<
108143  * """
108144  * Logs the chrono information into a text file at each timestep
108145  */
108146  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_45log_bodies_text, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_log_bodies_text, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1909, __pyx_L1_error)
108147  __Pyx_GOTREF(__pyx_t_2);
108148  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_log_bodies_text, __pyx_t_2) < 0) __PYX_ERR(0, 1909, __pyx_L1_error)
108149  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108150  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108151 
108152  /* "mbd/CouplingFSI.pyx":1972
108153  *
108154  *
108155  * def log_bodies_h5(self, l_logging_info): # <<<<<<<<<<<<<<
108156  * """
108157  * Logs the chrono information into a h5 file at each timestep
108158  */
108159  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_47log_bodies_h5, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_log_bodies_h5, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1972, __pyx_L1_error)
108160  __Pyx_GOTREF(__pyx_t_2);
108161  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_log_bodies_h5, __pyx_t_2) < 0) __PYX_ERR(0, 1972, __pyx_L1_error)
108162  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108163  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108164 
108165  /* "mbd/CouplingFSI.pyx":2113
108166  *
108167  *
108168  * def log_springs_text(self, d_time, l_springs): # <<<<<<<<<<<<<<
108169  * """
108170  * Logs the chrono information into a text file at each timestep
108171  */
108172  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_49log_springs_text, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_log_springs_text, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2113, __pyx_L1_error)
108173  __Pyx_GOTREF(__pyx_t_2);
108174  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_log_springs_text, __pyx_t_2) < 0) __PYX_ERR(0, 2113, __pyx_L1_error)
108175  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108176  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108177 
108178  /* "mbd/CouplingFSI.pyx":2148
108179  *
108180  *
108181  * def log_springs_h5(self, l_springs): # <<<<<<<<<<<<<<
108182  * """
108183  * Logs chrono spring information to an h5 file
108184  */
108185  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_51log_springs_h5, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_log_springs_h5, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2148, __pyx_L1_error)
108186  __Pyx_GOTREF(__pyx_t_2);
108187  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_log_springs_h5, __pyx_t_2) < 0) __PYX_ERR(0, 2148, __pyx_L1_error)
108188  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108189  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108190 
108191  /* "mbd/CouplingFSI.pyx":2201
108192  * o_file.close()
108193  *
108194  * def log_residuals_text(self, d_time, l_linklocks): # <<<<<<<<<<<<<<
108195  * """
108196  * Logs the chrono information into a text file at each timestep
108197  */
108198  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_53log_residuals_text, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_log_residuals_text, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2201, __pyx_L1_error)
108199  __Pyx_GOTREF(__pyx_t_2);
108200  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_log_residuals_text, __pyx_t_2) < 0) __PYX_ERR(0, 2201, __pyx_L1_error)
108201  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108202  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108203 
108204  /* "mbd/CouplingFSI.pyx":2248
108205  * o_file.close()
108206  *
108207  * def log_residuals_h5(self, l_linklocks): # <<<<<<<<<<<<<<
108208  * """
108209  * Logs chrono spring information to an h5 file
108210  */
108211  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_55log_residuals_h5, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_log_residuals_h5, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2248, __pyx_L1_error)
108212  __Pyx_GOTREF(__pyx_t_2);
108213  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_log_residuals_h5, __pyx_t_2) < 0) __PYX_ERR(0, 2248, __pyx_L1_error)
108214  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108215  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108216 
108217  /* "mbd/CouplingFSI.pyx":2306
108218  *
108219  *
108220  * def log_times_h5(self, d_time): # <<<<<<<<<<<<<<
108221  * """
108222  * Creates a log of the Proteus timestep within the h5 log file
108223  */
108224  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_57log_times_h5, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem_log_times_h5, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2306, __pyx_L1_error)
108225  __Pyx_GOTREF(__pyx_t_2);
108226  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem->tp_dict, __pyx_n_s_log_times_h5, __pyx_t_2) < 0) __PYX_ERR(0, 2306, __pyx_L1_error)
108227  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108228  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChSystem);
108229 
108230  /* "(tree fragment)":1
108231  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
108232  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108233  * def __setstate_cython__(self, __pyx_state):
108234  */
108235  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_59__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem___reduce_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
108236  __Pyx_GOTREF(__pyx_t_2);
108237  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
108238  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108239 
108240  /* "(tree fragment)":3
108241  * def __reduce_cython__(self):
108242  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108243  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
108244  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108245  */
108246  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_12ProtChSystem_61__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChSystem___setstate_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
108247  __Pyx_GOTREF(__pyx_t_2);
108248  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
108249  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108250 
108251  /* "mbd/CouplingFSI.pyx":2415
108252  * system.addProtChMesh(self)
108253  *
108254  * def getChronoObject(self): # <<<<<<<<<<<<<<
108255  * return self.ChMeshh
108256  *
108257  */
108258  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChMesh_3getChronoObject, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMesh_getChronoObject, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2415, __pyx_L1_error)
108259  __Pyx_GOTREF(__pyx_t_2);
108260  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMesh->tp_dict, __pyx_n_s_getChronoObject, __pyx_t_2) < 0) __PYX_ERR(0, 2415, __pyx_L1_error)
108261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108262  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMesh);
108263 
108264  /* "(tree fragment)":1
108265  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
108266  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108267  * def __setstate_cython__(self, __pyx_state):
108268  */
108269  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChMesh_5__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMesh___reduce_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
108270  __Pyx_GOTREF(__pyx_t_2);
108271  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
108272  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108273 
108274  /* "(tree fragment)":3
108275  * def __reduce_cython__(self):
108276  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108277  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
108278  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108279  */
108280  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_10ProtChMesh_7__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMesh___setstate_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
108281  __Pyx_GOTREF(__pyx_t_2);
108282  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
108283  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108284 
108285  /* "mbd/CouplingFSI.pyx":2473
108286  * double[:] rho,
108287  * double[:] E,
108288  * string beam_type="CableANCF"): # <<<<<<<<<<<<<<
108289  * check_arrays = [len(length), len(nb_elems), len(d), len(rho), len(E)]
108290  * assert all(v == len(length) for v in check_arrays), 'arrays are not of same length'
108291  */
108292  __pyx_t_5 = __pyx_convert_string_from_py_std__in_string(__pyx_n_b_CableANCF); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2473, __pyx_L1_error)
108293  __pyx_k__147 = __pyx_t_5;
108294 
108295  /* "mbd/CouplingFSI.pyx":2520
108296  * self.tCount = 0
108297  *
108298  * def setName(self, string name): # <<<<<<<<<<<<<<
108299  * """Sets name of cable, used for csv file
108300  *
108301  */
108302  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_3setName, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setName, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__148)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2520, __pyx_L1_error)
108303  __Pyx_GOTREF(__pyx_t_2);
108304  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setName, __pyx_t_2) < 0) __PYX_ERR(0, 2520, __pyx_L1_error)
108305  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108306  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108307 
108308  /* "mbd/CouplingFSI.pyx":2530
108309  * self.name = name
108310  *
108311  * def recordStrainEta(self, double[:] etas): # <<<<<<<<<<<<<<
108312  * self._record_etas = etas
108313  * self._record_etas_names = []
108314  */
108315  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_5recordStrainEta, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_recordStrainEta, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2530, __pyx_L1_error)
108316  __Pyx_GOTREF(__pyx_t_2);
108317  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_recordStrainEta, __pyx_t_2) < 0) __PYX_ERR(0, 2530, __pyx_L1_error)
108318  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108319  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108320 
108321  /* "mbd/CouplingFSI.pyx":2539
108322  * 'sz'+str(eta)]
108323  *
108324  * def _recordH5(self): # <<<<<<<<<<<<<<
108325  * Profiling.logEvent('recording h5 file of '+str(self.name))
108326  * tCount = self.tCount
108327  */
108328  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_7_recordH5, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings__recordH5, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__150)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2539, __pyx_L1_error)
108329  __Pyx_GOTREF(__pyx_t_2);
108330  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_recordH5, __pyx_t_2) < 0) __PYX_ERR(0, 2539, __pyx_L1_error)
108331  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108332  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108333 
108334  /* "mbd/CouplingFSI.pyx":2635
108335  * Profiling.logEvent('finished recording h5 file of '+str(self.name))
108336  *
108337  * def _recordXML(self): # <<<<<<<<<<<<<<
108338  * Profiling.logEvent('recording xml file of '+str(self.name))
108339  * tCount = self.tCount
108340  */
108341  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_9_recordXML, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings__recordXML, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2635, __pyx_L1_error)
108342  __Pyx_GOTREF(__pyx_t_2);
108343  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_recordXML, __pyx_t_2) < 0) __PYX_ERR(0, 2635, __pyx_L1_error)
108344  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108345  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108346 
108347  /* "mbd/CouplingFSI.pyx":2725
108348  * Profiling.logEvent('finished recording xmf file of '+str(self.name))
108349  *
108350  * def _recordValues(self): # <<<<<<<<<<<<<<
108351  * """Records values in csv files
108352  * """
108353  */
108354  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_11_recordValues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings__recordValues, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2725, __pyx_L1_error)
108355  __Pyx_GOTREF(__pyx_t_2);
108356  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_recordValues, __pyx_t_2) < 0) __PYX_ERR(0, 2725, __pyx_L1_error)
108357  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108358  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108359 
108360  /* "mbd/CouplingFSI.pyx":2825
108361  * Profiling.logEvent('finished recording values file of '+str(self.name))
108362  *
108363  * def getTensionBack(self): # <<<<<<<<<<<<<<
108364  * """
108365  * Get Tension at the back of the cable
108366  */
108367  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_13getTensionBack, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getTensionBack, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2825, __pyx_L1_error)
108368  __Pyx_GOTREF(__pyx_t_2);
108369  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getTensionBack, __pyx_t_2) < 0) __PYX_ERR(0, 2825, __pyx_L1_error)
108370  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108371  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108372 
108373  /* "mbd/CouplingFSI.pyx":2836
108374  * return np.zeros(3)
108375  *
108376  * def getTensionFront(self): # <<<<<<<<<<<<<<
108377  * """
108378  * Get Tension at the front of the cable
108379  */
108380  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_15getTensionFront, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getTensionFront, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2836, __pyx_L1_error)
108381  __Pyx_GOTREF(__pyx_t_2);
108382  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getTensionFront, __pyx_t_2) < 0) __PYX_ERR(0, 2836, __pyx_L1_error)
108383  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108384  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108385 
108386  /* "mbd/CouplingFSI.pyx":2847
108387  * return np.zeros(3)
108388  *
108389  * def calculate_init(self): # <<<<<<<<<<<<<<
108390  * # build position vector of nodes (for each segment)
108391  * # self.setNodesPosition()
108392  */
108393  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_17calculate_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_calculate_init, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2847, __pyx_L1_error)
108394  __Pyx_GOTREF(__pyx_t_2);
108395  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_calculate_init, __pyx_t_2) < 0) __PYX_ERR(0, 2847, __pyx_L1_error)
108396  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108397  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108398 
108399  /* "mbd/CouplingFSI.pyx":2867
108400  * self.owning_rank = np.zeros(nb_nodes, dtype=np.int32)
108401  *
108402  * def prestep(self): # <<<<<<<<<<<<<<
108403  * """Sets external forces on the cable (if any)
108404  * """
108405  */
108406  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_19prestep, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_prestep, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2867, __pyx_L1_error)
108407  __Pyx_GOTREF(__pyx_t_2);
108408  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_prestep, __pyx_t_2) < 0) __PYX_ERR(0, 2867, __pyx_L1_error)
108409  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108410  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108411 
108412  /* "mbd/CouplingFSI.pyx":2875
108413  * self.setExternalForces()
108414  *
108415  * def poststep(self): # <<<<<<<<<<<<<<
108416  * """Records values
108417  * """
108418  */
108419  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_21poststep, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_poststep, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__163)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2875, __pyx_L1_error)
108420  __Pyx_GOTREF(__pyx_t_2);
108421  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_poststep, __pyx_t_2) < 0) __PYX_ERR(0, 2875, __pyx_L1_error)
108422  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108423  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108424 
108425  /* "mbd/CouplingFSI.pyx":2887
108426  * self.tCount += 1
108427  *
108428  * def setApplyDrag(self, bool boolval): # <<<<<<<<<<<<<<
108429  * for i in range(self.thisptr.cables.size()):
108430  * deref(self.thisptr.cables[i]).applyDrag = boolval
108431  */
108432  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_23setApplyDrag, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setApplyDrag, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2887, __pyx_L1_error)
108433  __Pyx_GOTREF(__pyx_t_2);
108434  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setApplyDrag, __pyx_t_2) < 0) __PYX_ERR(0, 2887, __pyx_L1_error)
108435  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108436  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108437 
108438  /* "mbd/CouplingFSI.pyx":2891
108439  * deref(self.thisptr.cables[i]).applyDrag = boolval
108440  *
108441  * def setApplyAddedMass(self, bool boolval): # <<<<<<<<<<<<<<
108442  * for i in range(self.thisptr.cables.size()):
108443  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
108444  */
108445  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_25setApplyAddedMass, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setApplyAddedMass, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2891, __pyx_L1_error)
108446  __Pyx_GOTREF(__pyx_t_2);
108447  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setApplyAddedMass, __pyx_t_2) < 0) __PYX_ERR(0, 2891, __pyx_L1_error)
108448  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108449  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108450 
108451  /* "mbd/CouplingFSI.pyx":2895
108452  * deref(self.thisptr.cables[i]).applyAddedMass = boolval
108453  *
108454  * def setApplyBuoyancy(self, bool boolval): # <<<<<<<<<<<<<<
108455  * for i in range(self.thisptr.cables.size()):
108456  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
108457  */
108458  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_27setApplyBuoyancy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setApplyBuoyancy, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2895, __pyx_L1_error)
108459  __Pyx_GOTREF(__pyx_t_2);
108460  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setApplyBuoyancy, __pyx_t_2) < 0) __PYX_ERR(0, 2895, __pyx_L1_error)
108461  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108462  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108463 
108464  /* "mbd/CouplingFSI.pyx":2899
108465  * deref(self.thisptr.cables[i]).applyBuoyancy = boolval
108466  *
108467  * def setNodesPositionFunction(self, function_position, function_tangent=None): # <<<<<<<<<<<<<<
108468  * """Function to build nodes
108469  *
108470  */
108471  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_29setNodesPositionFunction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setNodesPositionF, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__167)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2899, __pyx_L1_error)
108472  __Pyx_GOTREF(__pyx_t_2);
108473  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setNodesPositionFunction, __pyx_t_2) < 0) __PYX_ERR(0, 2899, __pyx_L1_error)
108474  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108475  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108476 
108477  /* "mbd/CouplingFSI.pyx":2914
108478  * self.nodes_function_tangent = function_tangent
108479  *
108480  * def setFluidVelocityFunction(self, function): # <<<<<<<<<<<<<<
108481  * """Function to build nodes
108482  *
108483  */
108484  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_31setFluidVelocityFunction, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setFluidVelocityF, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2914, __pyx_L1_error)
108485  __Pyx_GOTREF(__pyx_t_2);
108486  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setFluidVelocityFunction, __pyx_t_2) < 0) __PYX_ERR(0, 2914, __pyx_L1_error)
108487  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108488  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108489 
108490  /* "mbd/CouplingFSI.pyx":2925
108491  * self.fluid_velocity_function = function
108492  *
108493  * def fixFrontNode(self, bool fixed): # <<<<<<<<<<<<<<
108494  * """Fix front node of cable
108495  *
108496  */
108497  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_33fixFrontNode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_fixFrontNode, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__169)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2925, __pyx_L1_error)
108498  __Pyx_GOTREF(__pyx_t_2);
108499  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_fixFrontNode, __pyx_t_2) < 0) __PYX_ERR(0, 2925, __pyx_L1_error)
108500  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108501  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108502 
108503  /* "mbd/CouplingFSI.pyx":2939
108504  * deref(self.thisptr.nodes.front()).SetFixed(fixed)
108505  *
108506  * def fixBackNode(self, bool fixed): # <<<<<<<<<<<<<<
108507  * """Fix back node of cable
108508  *
108509  */
108510  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_35fixBackNode, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_fixBackNode, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2939, __pyx_L1_error)
108511  __Pyx_GOTREF(__pyx_t_2);
108512  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_fixBackNode, __pyx_t_2) < 0) __PYX_ERR(0, 2939, __pyx_L1_error)
108513  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108514  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108515 
108516  /* "mbd/CouplingFSI.pyx":2953
108517  * deref(self.thisptr.nodes.back()).SetFixed(fixed)
108518  *
108519  * def attachBackNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
108520  * """Attaches back node to a body with ChLinkLockLock
108521  *
108522  */
108523  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_37attachBackNodeToBody, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_attachBackNodeToB, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__171)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2953, __pyx_L1_error)
108524  __Pyx_GOTREF(__pyx_t_2);
108525  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_attachBackNodeToBody, __pyx_t_2) < 0) __PYX_ERR(0, 2953, __pyx_L1_error)
108526  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108527  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108528 
108529  /* "mbd/CouplingFSI.pyx":2964
108530  * self.thisptr.attachBackNodeToBody(body.thisptr.body)
108531  *
108532  * def attachFrontNodeToBody(self, ProtChBody body): # <<<<<<<<<<<<<<
108533  * """Attaches front node to a body with ChLinkLockLock
108534  *
108535  */
108536  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_39attachFrontNodeToBody, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_attachFrontNodeTo, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2964, __pyx_L1_error)
108537  __Pyx_GOTREF(__pyx_t_2);
108538  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_attachFrontNodeToBody, __pyx_t_2) < 0) __PYX_ERR(0, 2964, __pyx_L1_error)
108539  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108540  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108541 
108542  /* "mbd/CouplingFSI.pyx":2975
108543  * self.thisptr.attachFrontNodeToBody(body.thisptr.body)
108544  *
108545  * def getTensionElement(self, int i=0, eta=0.): # <<<<<<<<<<<<<<
108546  * cdef ch.ChVector[double] F
108547  * F = self.thisptr.getTensionElement(i, eta)
108548  */
108549  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_41getTensionElement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getTensionElement, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__173)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2975, __pyx_L1_error)
108550  __Pyx_GOTREF(__pyx_t_2);
108551  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getTensionElement, __pyx_t_2) < 0) __PYX_ERR(0, 2975, __pyx_L1_error)
108552  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108553  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108554 
108555  /* "mbd/CouplingFSI.pyx":2980
108556  * return np.array([F.x(), F.y(), F.z()])
108557  *
108558  * def getNodesTension(self, eta=0.): # <<<<<<<<<<<<<<
108559  * cdef ch.ChVector[double] vec
108560  * if self.beam_type == 'BeamEuler':
108561  */
108562  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_43getNodesTension, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getNodesTension, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2980, __pyx_L1_error)
108563  __Pyx_GOTREF(__pyx_t_2);
108564  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getNodesTension, __pyx_t_2) < 0) __PYX_ERR(0, 2980, __pyx_L1_error)
108565  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108566  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108567 
108568  /* "mbd/CouplingFSI.pyx":2991
108569  * return T
108570  *
108571  * def setDragCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
108572  * """Sets drag coefficients of cable
108573  *
108574  */
108575  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_45setDragCoefficients, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setDragCoefficien, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__175)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2991, __pyx_L1_error)
108576  __Pyx_GOTREF(__pyx_t_2);
108577  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setDragCoefficients, __pyx_t_2) < 0) __PYX_ERR(0, 2991, __pyx_L1_error)
108578  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108579  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108580 
108581  /* "mbd/CouplingFSI.pyx":3005
108582  * deref(self.thisptr.cables[segment_nb]).setDragCoefficients(tangential, normal)
108583  *
108584  * def setAddedMassCoefficients(self, double tangential, double normal, int segment_nb): # <<<<<<<<<<<<<<
108585  * """Sets added mass coefficients of cable
108586  *
108587  */
108588  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_47setAddedMassCoefficients, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setAddedMassCoeff, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3005, __pyx_L1_error)
108589  __Pyx_GOTREF(__pyx_t_2);
108590  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setAddedMassCoefficients, __pyx_t_2) < 0) __PYX_ERR(0, 3005, __pyx_L1_error)
108591  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108592  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108593 
108594  /* "mbd/CouplingFSI.pyx":3019
108595  * deref(self.thisptr.cables[segment_nb]).setAddedMassCoefficients(tangential, normal)
108596  *
108597  * def setRestLengthPerElement(self, double[:] length_array, int segment_nb): # <<<<<<<<<<<<<<
108598  * """Sets rest length per element of cable
108599  *
108600  */
108601  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_49setRestLengthPerElement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setRestLengthPerE, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3019, __pyx_L1_error)
108602  __Pyx_GOTREF(__pyx_t_2);
108603  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setRestLengthPerElement, __pyx_t_2) < 0) __PYX_ERR(0, 3019, __pyx_L1_error)
108604  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108605  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108606 
108607  /* "mbd/CouplingFSI.pyx":3035
108608  * deref(self.thisptr.cables[segment_nb]).setRestLengthPerElement(vec)
108609  *
108610  * def setNodesPosition(self, double[:,:,:] positions=None, tangents=None): # <<<<<<<<<<<<<<
108611  * """Builds the nodes of the cable.
108612  *
108613  */
108614  __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(Py_None, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 3035, __pyx_L1_error)
108615  __pyx_k__178 = __pyx_t_6;
108616  __pyx_t_6.memview = NULL;
108617  __pyx_t_6.data = NULL;
108618  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_51setNodesPosition, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setNodesPosition, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3035, __pyx_L1_error)
108619  __Pyx_GOTREF(__pyx_t_2);
108620  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setNodesPosition, __pyx_t_2) < 0) __PYX_ERR(0, 3035, __pyx_L1_error)
108621  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108622  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108623 
108624  /* "mbd/CouplingFSI.pyx":3093
108625  * # self.buildNodes()
108626  *
108627  * def buildNodes(self): # <<<<<<<<<<<<<<
108628  * # build nodes
108629  * self.thisptr.buildNodes()
108630  */
108631  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_53buildNodes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_buildNodes, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__180)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3093, __pyx_L1_error)
108632  __Pyx_GOTREF(__pyx_t_2);
108633  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_buildNodes, __pyx_t_2) < 0) __PYX_ERR(0, 3093, __pyx_L1_error)
108634  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108635  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108636 
108637  /* "mbd/CouplingFSI.pyx":3138
108638  * sys.exit()
108639  *
108640  * def getNodesPosition(self): # <<<<<<<<<<<<<<
108641  * """Gives array of nodes position
108642  *
108643  */
108644  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_55getNodesPosition, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getNodesPosition, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__181)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3138, __pyx_L1_error)
108645  __Pyx_GOTREF(__pyx_t_2);
108646  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getNodesPosition, __pyx_t_2) < 0) __PYX_ERR(0, 3138, __pyx_L1_error)
108647  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108648  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108649 
108650  /* "mbd/CouplingFSI.pyx":3159
108651  * return pos
108652  *
108653  * def getNodesVelocity(self): # <<<<<<<<<<<<<<
108654  * """Gives array of nodes velocity
108655  *
108656  */
108657  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_57getNodesVelocity, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getNodesVelocity, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3159, __pyx_L1_error)
108658  __Pyx_GOTREF(__pyx_t_2);
108659  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getNodesVelocity, __pyx_t_2) < 0) __PYX_ERR(0, 3159, __pyx_L1_error)
108660  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108661  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108662 
108663  /* "mbd/CouplingFSI.pyx":3180
108664  * return pos
108665  *
108666  * def getNodesAcceleration(self): # <<<<<<<<<<<<<<
108667  * """Gives array of nodes acceleration
108668  *
108669  */
108670  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_59getNodesAcceleration, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getNodesAccelerat, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__183)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
108671  __Pyx_GOTREF(__pyx_t_2);
108672  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getNodesAcceleration, __pyx_t_2) < 0) __PYX_ERR(0, 3180, __pyx_L1_error)
108673  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108674  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108675 
108676  /* "mbd/CouplingFSI.pyx":3201
108677  * return pos
108678  *
108679  * def getDragForces(self): # <<<<<<<<<<<<<<
108680  * cdef ch.ChVector Fd
108681  * drag = np.zeros((self.nodes_nb,3 ))
108682  */
108683  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_61getDragForces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getDragForces, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3201, __pyx_L1_error)
108684  __Pyx_GOTREF(__pyx_t_2);
108685  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getDragForces, __pyx_t_2) < 0) __PYX_ERR(0, 3201, __pyx_L1_error)
108686  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108687  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108688 
108689  /* "mbd/CouplingFSI.pyx":3209
108690  * return drag
108691  *
108692  * def getAddedMassForces(self): # <<<<<<<<<<<<<<
108693  * cdef ch.ChVector Fd
108694  * drag = np.zeros((self.nodes_nb,3 ))
108695  */
108696  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_63getAddedMassForces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getAddedMassForce, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__185)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3209, __pyx_L1_error)
108697  __Pyx_GOTREF(__pyx_t_2);
108698  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getAddedMassForces, __pyx_t_2) < 0) __PYX_ERR(0, 3209, __pyx_L1_error)
108699  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108700  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108701 
108702  /* "mbd/CouplingFSI.pyx":3217
108703  * return drag
108704  *
108705  * def setIyy(self, double Iyy, int cable_nb): # <<<<<<<<<<<<<<
108706  * deref(self.thisptr.cables[cable_nb]).setIyy(Iyy)
108707  *
108708  */
108709  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_65setIyy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setIyy, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3217, __pyx_L1_error)
108710  __Pyx_GOTREF(__pyx_t_2);
108711  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setIyy, __pyx_t_2) < 0) __PYX_ERR(0, 3217, __pyx_L1_error)
108712  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108713  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108714 
108715  /* "mbd/CouplingFSI.pyx":3221
108716  *
108717  *
108718  * def getNodesD(self): # <<<<<<<<<<<<<<
108719  * """Gives direction of nodes
108720  *
108721  */
108722  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_67getNodesD, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_getNodesD, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__187)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3221, __pyx_L1_error)
108723  __Pyx_GOTREF(__pyx_t_2);
108724  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_getNodesD, __pyx_t_2) < 0) __PYX_ERR(0, 3221, __pyx_L1_error)
108725  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108726  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108727 
108728  /* "mbd/CouplingFSI.pyx":3235
108729  * return dire
108730  *
108731  * def setContactMaterial(self, mat): # <<<<<<<<<<<<<<
108732  * """Sets contact material of the cable
108733  *
108734  */
108735  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_69setContactMaterial, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setContactMateria, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3235, __pyx_L1_error)
108736  __Pyx_GOTREF(__pyx_t_2);
108737  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setContactMaterial, __pyx_t_2) < 0) __PYX_ERR(0, 3235, __pyx_L1_error)
108738  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108739  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108740 
108741  /* "mbd/CouplingFSI.pyx":3248
108742  * self.thisptr.setContactMaterial(matp)
108743  *
108744  * def setExternalForces(self, fluid_velocity_array=None, fluid_density_array=None, # <<<<<<<<<<<<<<
108745  * fluid_acceleration_array=None):
108746  * """
108747  */
108748  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_71setExternalForces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setExternalForces, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__189)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3248, __pyx_L1_error)
108749  __Pyx_GOTREF(__pyx_t_2);
108750  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setExternalForces, __pyx_t_2) < 0) __PYX_ERR(0, 3248, __pyx_L1_error)
108751  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108752  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108753 
108754  /* "mbd/CouplingFSI.pyx":3348
108755  * self.updateForces()
108756  *
108757  * def updateForces(self): # <<<<<<<<<<<<<<
108758  * # update drag forces
108759  * self.thisptr.updateDragForces()
108760  */
108761  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_73updateForces, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_updateForces, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__190)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3348, __pyx_L1_error)
108762  __Pyx_GOTREF(__pyx_t_2);
108763  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_updateForces, __pyx_t_2) < 0) __PYX_ERR(0, 3348, __pyx_L1_error)
108764  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108765  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108766 
108767  /* "mbd/CouplingFSI.pyx":3358
108768  * self.thisptr.applyForces()
108769  *
108770  * def setFluidDensityAtNodes(self, np.ndarray density_array): # <<<<<<<<<<<<<<
108771  * cdef vector[double] fluid_density
108772  * self.fluid_density_array = density_array
108773  */
108774  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_75setFluidDensityAtNodes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setFluidDensityAt, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3358, __pyx_L1_error)
108775  __Pyx_GOTREF(__pyx_t_2);
108776  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setFluidDensityAtNodes, __pyx_t_2) < 0) __PYX_ERR(0, 3358, __pyx_L1_error)
108777  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108778  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108779 
108780  /* "mbd/CouplingFSI.pyx":3366
108781  * self.thisptr.setFluidDensityAtNodes(fluid_density)
108782  *
108783  * def setFluidVelocityAtNodes(self, np.ndarray velocity_array): # <<<<<<<<<<<<<<
108784  * cdef vector[ch.ChVector[double]] fluid_velocity
108785  * cdef ch.ChVector[double] vel
108786  */
108787  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_77setFluidVelocityAtNodes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setFluidVelocityA, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__192)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __pyx_L1_error)
108788  __Pyx_GOTREF(__pyx_t_2);
108789  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setFluidVelocityAtNodes, __pyx_t_2) < 0) __PYX_ERR(0, 3366, __pyx_L1_error)
108790  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108791  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108792 
108793  /* "mbd/CouplingFSI.pyx":3375
108794  * self.thisptr.setFluidVelocityAtNodes(fluid_velocity)
108795  *
108796  * def setFluidAccelerationAtNodes(self, np.ndarray acceleration_array): # <<<<<<<<<<<<<<
108797  * cdef vector[ch.ChVector[double]] fluid_acceleration
108798  * cdef ch.ChVector[double] acc
108799  */
108800  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_79setFluidAccelerationAtNodes, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings_setFluidAccelerat, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3375, __pyx_L1_error)
108801  __Pyx_GOTREF(__pyx_t_2);
108802  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings->tp_dict, __pyx_n_s_setFluidAccelerationAtNodes, __pyx_t_2) < 0) __PYX_ERR(0, 3375, __pyx_L1_error)
108803  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108804  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChMoorings);
108805 
108806  /* "(tree fragment)":1
108807  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
108808  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108809  * def __setstate_cython__(self, __pyx_state):
108810  */
108811  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_81__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings___reduce_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__194)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
108812  __Pyx_GOTREF(__pyx_t_2);
108813  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
108814  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108815 
108816  /* "(tree fragment)":3
108817  * def __reduce_cython__(self):
108818  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108819  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
108820  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108821  */
108822  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_14ProtChMoorings_83__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChMoorings___setstate_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__196)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
108823  __Pyx_GOTREF(__pyx_t_2);
108824  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
108825  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108826 
108827  /* "mbd/CouplingFSI.pyx":3385
108828  *
108829  *
108830  * def getLocalNearestNode(coords, kdtree): # <<<<<<<<<<<<<<
108831  * """Finds nearest node to coordinates (local)
108832  * Parameters
108833  */
108834  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_1getLocalNearestNode, 0, __pyx_n_s_getLocalNearestNode, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__198)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3385, __pyx_L1_error)
108835  __Pyx_GOTREF(__pyx_t_2);
108836  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getLocalNearestNode, __pyx_t_2) < 0) __PYX_ERR(0, 3385, __pyx_L1_error)
108837  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108838 
108839  /* "mbd/CouplingFSI.pyx":3463
108840  *
108841  *
108842  * def getLocalElement(femSpace, coords, node): # <<<<<<<<<<<<<<
108843  * """Given coordinates and its nearest node, determine if it is on a
108844  * local element.
108845  */
108846  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_3getLocalElement, 0, __pyx_n_s_getLocalElement, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3463, __pyx_L1_error)
108847  __Pyx_GOTREF(__pyx_t_2);
108848  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getLocalElement, __pyx_t_2) < 0) __PYX_ERR(0, 3463, __pyx_L1_error)
108849  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108850 
108851  /* "mbd/CouplingFSI.pyx":3535
108852  * self.ProtChSystem = system
108853  *
108854  * def attachModel(self, model, ar): # <<<<<<<<<<<<<<
108855  * """Attaches Proteus model to auxiliary variable
108856  * """
108857  */
108858  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_3attachModel, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChAddedMass_attachModel, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__200)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3535, __pyx_L1_error)
108859  __Pyx_GOTREF(__pyx_t_2);
108860  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass->tp_dict, __pyx_n_s_attachModel, __pyx_t_2) < 0) __PYX_ERR(0, 3535, __pyx_L1_error)
108861  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108862  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass);
108863 
108864  /* "mbd/CouplingFSI.pyx":3543
108865  * return self
108866  *
108867  * def attachAuxiliaryVariables(self,avDict): # <<<<<<<<<<<<<<
108868  * pass
108869  *
108870  */
108871  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_5attachAuxiliaryVariables, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChAddedMass_attachAuxiliaryV, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3543, __pyx_L1_error)
108872  __Pyx_GOTREF(__pyx_t_2);
108873  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass->tp_dict, __pyx_n_s_attachAuxiliaryVariables, __pyx_t_2) < 0) __PYX_ERR(0, 3543, __pyx_L1_error)
108874  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108875  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass);
108876 
108877  /* "mbd/CouplingFSI.pyx":3546
108878  * pass
108879  *
108880  * def calculate_init(self): # <<<<<<<<<<<<<<
108881  * pass
108882  *
108883  */
108884  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_7calculate_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChAddedMass_calculate_init, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__202)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3546, __pyx_L1_error)
108885  __Pyx_GOTREF(__pyx_t_2);
108886  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass->tp_dict, __pyx_n_s_calculate_init, __pyx_t_2) < 0) __PYX_ERR(0, 3546, __pyx_L1_error)
108887  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108888  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass);
108889 
108890  /* "mbd/CouplingFSI.pyx":3549
108891  * pass
108892  *
108893  * def calculate(self): # <<<<<<<<<<<<<<
108894  * pass
108895  *
108896  */
108897  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_9calculate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChAddedMass_calculate, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3549, __pyx_L1_error)
108898  __Pyx_GOTREF(__pyx_t_2);
108899  if (PyDict_SetItem((PyObject *)__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass->tp_dict, __pyx_n_s_calculate, __pyx_t_2) < 0) __PYX_ERR(0, 3549, __pyx_L1_error)
108900  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108901  PyType_Modified(__pyx_ptype_3mbd_11CouplingFSI_ProtChAddedMass);
108902 
108903  /* "(tree fragment)":1
108904  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
108905  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108906  * def __setstate_cython__(self, __pyx_state):
108907  */
108908  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChAddedMass___reduce_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__204)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
108909  __Pyx_GOTREF(__pyx_t_2);
108910  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
108911  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108912 
108913  /* "(tree fragment)":3
108914  * def __reduce_cython__(self):
108915  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108916  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
108917  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108918  */
108919  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ProtChAddedMass_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProtChAddedMass___setstate_cytho, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__206)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
108920  __Pyx_GOTREF(__pyx_t_2);
108921  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
108922  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108923 
108924  /* "mbd/CouplingFSI.pyx":3553
108925  *
108926  *
108927  * cpdef void attachNodeToNode(ProtChMoorings cable1, int node1, ProtChMoorings cable2, int node2): # <<<<<<<<<<<<<<
108928  * if cable1.beam_type == "CableANCF":
108929  * cppAttachNodeToNodeFEAxyzD(cable1.thisptr, node1, cable2.thisptr, node2)
108930  */
108931  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_5attachNodeToNode, 0, __pyx_n_s_attachNodeToNode, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__208)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3553, __pyx_L1_error)
108932  __Pyx_GOTREF(__pyx_t_2);
108933  if (PyDict_SetItem(__pyx_d, __pyx_n_s_attachNodeToNode, __pyx_t_2) < 0) __PYX_ERR(0, 3553, __pyx_L1_error)
108934  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108935 
108936  /* "(tree fragment)":1
108937  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
108938  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108939  * def __setstate_cython__(self, __pyx_state):
108940  */
108941  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ChBodyAddedMass_3__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ChBodyAddedMass___reduce_cython, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
108942  __Pyx_GOTREF(__pyx_t_2);
108943  if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
108944  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108945 
108946  /* "(tree fragment)":3
108947  * def __reduce_cython__(self):
108948  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108949  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
108950  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
108951  */
108952  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15ChBodyAddedMass_5__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ChBodyAddedMass___setstate_cytho, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
108953  __Pyx_GOTREF(__pyx_t_2);
108954  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
108955  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108956 
108957  /* "mbd/CouplingFSI.pyx":3641
108958  *
108959  *
108960  * def vec2array(vec): # <<<<<<<<<<<<<<
108961  * return np.array([vec.x(), vec.y(), vec.z()])
108962  *
108963  */
108964  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_7vec2array, 0, __pyx_n_s_vec2array, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3641, __pyx_L1_error)
108965  __Pyx_GOTREF(__pyx_t_2);
108966  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec2array, __pyx_t_2) < 0) __PYX_ERR(0, 3641, __pyx_L1_error)
108967  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108968 
108969  /* "mbd/CouplingFSI.pyx":3644
108970  * return np.array([vec.x(), vec.y(), vec.z()])
108971  *
108972  * def pyvec2array(vec): # <<<<<<<<<<<<<<
108973  * return np.array([vec.x, vec.y, vec.z])
108974  *
108975  */
108976  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_9pyvec2array, 0, __pyx_n_s_pyvec2array, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__214)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3644, __pyx_L1_error)
108977  __Pyx_GOTREF(__pyx_t_2);
108978  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyvec2array, __pyx_t_2) < 0) __PYX_ERR(0, 3644, __pyx_L1_error)
108979  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108980 
108981  /* "mbd/CouplingFSI.pyx":3647
108982  * return np.array([vec.x, vec.y, vec.z])
108983  *
108984  * def mat332array(mat): # <<<<<<<<<<<<<<
108985  * return np.array([[mat.Get_A_Xaxis().x(), mat.Get_A_Xaxis().y(), mat.Get_A_Xaxis().z()],
108986  * [mat.Get_A_Yaxis().x(), mat.Get_A_Yaxis().y(), mat.Get_A_Yaxis().z()],
108987  */
108988  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_11mat332array, 0, __pyx_n_s_mat332array, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3647, __pyx_L1_error)
108989  __Pyx_GOTREF(__pyx_t_2);
108990  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat332array, __pyx_t_2) < 0) __PYX_ERR(0, 3647, __pyx_L1_error)
108991  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
108992 
108993  /* "mbd/CouplingFSI.pyx":3652
108994  * [mat.Get_A_Zaxis().x(), mat.Get_A_Zaxis().y(), mat.Get_A_Zaxis().z()]])
108995  *
108996  * def pymat332array(mat): # <<<<<<<<<<<<<<
108997  * return np.array([[mat.Get_A_Xaxis().x, mat.Get_A_Xaxis().y, mat.Get_A_Xaxis().z],
108998  * [mat.Get_A_Yaxis().x, mat.Get_A_Yaxis().y, mat.Get_A_Yaxis().z],
108999  */
109000  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_13pymat332array, 0, __pyx_n_s_pymat332array, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__216)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3652, __pyx_L1_error)
109001  __Pyx_GOTREF(__pyx_t_2);
109002  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pymat332array, __pyx_t_2) < 0) __PYX_ERR(0, 3652, __pyx_L1_error)
109003  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109004 
109005  /* "mbd/CouplingFSI.pyx":3657
109006  * [mat.Get_A_Zaxis().x, mat.Get_A_Zaxis().y, mat.Get_A_Zaxis().z]])
109007  *
109008  * def quat2array(quat): # <<<<<<<<<<<<<<
109009  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
109010  *
109011  */
109012  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_15quat2array, 0, __pyx_n_s_quat2array, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3657, __pyx_L1_error)
109013  __Pyx_GOTREF(__pyx_t_2);
109014  if (PyDict_SetItem(__pyx_d, __pyx_n_s_quat2array, __pyx_t_2) < 0) __PYX_ERR(0, 3657, __pyx_L1_error)
109015  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109016 
109017  /* "mbd/CouplingFSI.pyx":3660
109018  * return np.array([quat.e0(), quat.e1(), quat.e2(), quat.e3()])
109019  *
109020  * def pyquat2array(quat): # <<<<<<<<<<<<<<
109021  * return np.array([quat.e0, quat.e1, quat.e2, quat.e3])
109022  */
109023  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_3mbd_11CouplingFSI_17pyquat2array, 0, __pyx_n_s_pyquat2array, NULL, __pyx_n_s_mbd_CouplingFSI, __pyx_d, ((PyObject *)__pyx_codeobj__218)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3660, __pyx_L1_error)
109024  __Pyx_GOTREF(__pyx_t_2);
109025  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyquat2array, __pyx_t_2) < 0) __PYX_ERR(0, 3660, __pyx_L1_error)
109026  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109027 
109028  /* "mbd/CouplingFSI.pyx":1
109029  * #!python # <<<<<<<<<<<<<<
109030  * # distutils: language = c++
109031  * # cython: profile=True, binding=True, embedsignature=True
109032  */
109033  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
109034  __Pyx_GOTREF(__pyx_t_2);
109035  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
109036  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109037 
109038  /* "View.MemoryView":209
109039  * info.obj = self
109040  *
109041  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
109042  *
109043  * def __dealloc__(array self):
109044  */
109045  __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 209, __pyx_L1_error)
109046  __Pyx_GOTREF(__pyx_t_2);
109047  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(1, 209, __pyx_L1_error)
109048  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109049  PyType_Modified(__pyx_array_type);
109050 
109051  /* "View.MemoryView":286
109052  * return self.name
109053  *
109054  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
109055  * cdef strided = Enum("<strided and direct>") # default
109056  * cdef indirect = Enum("<strided and indirect>")
109057  */
109058  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__392, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 286, __pyx_L1_error)
109059  __Pyx_GOTREF(__pyx_t_2);
109060  __Pyx_XGOTREF(generic);
109061  __Pyx_DECREF_SET(generic, __pyx_t_2);
109062  __Pyx_GIVEREF(__pyx_t_2);
109063  __pyx_t_2 = 0;
109064 
109065  /* "View.MemoryView":287
109066  *
109067  * cdef generic = Enum("<strided and direct or indirect>")
109068  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
109069  * cdef indirect = Enum("<strided and indirect>")
109070  *
109071  */
109072  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__393, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 287, __pyx_L1_error)
109073  __Pyx_GOTREF(__pyx_t_2);
109074  __Pyx_XGOTREF(strided);
109075  __Pyx_DECREF_SET(strided, __pyx_t_2);
109076  __Pyx_GIVEREF(__pyx_t_2);
109077  __pyx_t_2 = 0;
109078 
109079  /* "View.MemoryView":288
109080  * cdef generic = Enum("<strided and direct or indirect>")
109081  * cdef strided = Enum("<strided and direct>") # default
109082  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
109083  *
109084  *
109085  */
109086  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__394, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 288, __pyx_L1_error)
109087  __Pyx_GOTREF(__pyx_t_2);
109088  __Pyx_XGOTREF(indirect);
109089  __Pyx_DECREF_SET(indirect, __pyx_t_2);
109090  __Pyx_GIVEREF(__pyx_t_2);
109091  __pyx_t_2 = 0;
109092 
109093  /* "View.MemoryView":291
109094  *
109095  *
109096  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
109097  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
109098  *
109099  */
109100  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__395, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 291, __pyx_L1_error)
109101  __Pyx_GOTREF(__pyx_t_2);
109102  __Pyx_XGOTREF(contiguous);
109103  __Pyx_DECREF_SET(contiguous, __pyx_t_2);
109104  __Pyx_GIVEREF(__pyx_t_2);
109105  __pyx_t_2 = 0;
109106 
109107  /* "View.MemoryView":292
109108  *
109109  * cdef contiguous = Enum("<contiguous and direct>")
109110  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
109111  *
109112  *
109113  */
109114  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__396, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 292, __pyx_L1_error)
109115  __Pyx_GOTREF(__pyx_t_2);
109116  __Pyx_XGOTREF(indirect_contiguous);
109117  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_2);
109118  __Pyx_GIVEREF(__pyx_t_2);
109119  __pyx_t_2 = 0;
109120 
109121  /* "View.MemoryView":316
109122  *
109123  * DEF THREAD_LOCKS_PREALLOCATED = 8
109124  * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
109125  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
109126  * PyThread_allocate_lock(),
109127  */
109128  __pyx_memoryview_thread_locks_used = 0;
109129 
109130  /* "View.MemoryView":317
109131  * DEF THREAD_LOCKS_PREALLOCATED = 8
109132  * cdef int __pyx_memoryview_thread_locks_used = 0
109133  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
109134  * PyThread_allocate_lock(),
109135  * PyThread_allocate_lock(),
109136  */
109137  __pyx_t_7[0] = PyThread_allocate_lock();
109138  __pyx_t_7[1] = PyThread_allocate_lock();
109139  __pyx_t_7[2] = PyThread_allocate_lock();
109140  __pyx_t_7[3] = PyThread_allocate_lock();
109141  __pyx_t_7[4] = PyThread_allocate_lock();
109142  __pyx_t_7[5] = PyThread_allocate_lock();
109143  __pyx_t_7[6] = PyThread_allocate_lock();
109144  __pyx_t_7[7] = PyThread_allocate_lock();
109145  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_7, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
109146 
109147  /* "View.MemoryView":549
109148  * info.obj = self
109149  *
109150  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
109151  *
109152  *
109153  */
109154  __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 549, __pyx_L1_error)
109155  __Pyx_GOTREF(__pyx_t_2);
109156  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(1, 549, __pyx_L1_error)
109157  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109158  PyType_Modified(__pyx_memoryview_type);
109159 
109160  /* "View.MemoryView":995
109161  * return self.from_object
109162  *
109163  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
109164  *
109165  *
109166  */
109167  __pyx_t_2 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 995, __pyx_L1_error)
109168  __Pyx_GOTREF(__pyx_t_2);
109169  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_2) < 0) __PYX_ERR(1, 995, __pyx_L1_error)
109170  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109171  PyType_Modified(__pyx_memoryviewslice_type);
109172 
109173  /* "(tree fragment)":1
109174  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
109175  * cdef object __pyx_PickleError
109176  * cdef object __pyx_result
109177  */
109178  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
109179  __Pyx_GOTREF(__pyx_t_2);
109180  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
109181  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
109182 
109183  /* "(tree fragment)":11
109184  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
109185  * return __pyx_result
109186  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
109187  * __pyx_result.name = __pyx_state[0]
109188  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
109189  */
109190  __Pyx_TraceReturn(Py_None, 0);
109191 
109192  /*--- Wrapped vars code ---*/
109193 
109194  goto __pyx_L0;
109195  __pyx_L1_error:;
109196  __Pyx_XDECREF(__pyx_t_1);
109197  __Pyx_XDECREF(__pyx_t_2);
109198  __PYX_XDEC_MEMVIEW(&__pyx_t_3, 1);
109199  __PYX_XDEC_MEMVIEW(&__pyx_t_4, 1);
109200  __PYX_XDEC_MEMVIEW(&__pyx_t_6, 1);
109201  if (__pyx_m) {
109202  if (__pyx_d) {
109203  __Pyx_AddTraceback("init mbd.CouplingFSI", __pyx_clineno, __pyx_lineno, __pyx_filename);
109204  }
109205  Py_CLEAR(__pyx_m);
109206  } else if (!PyErr_Occurred()) {
109207  PyErr_SetString(PyExc_ImportError, "init mbd.CouplingFSI");
109208  }
109209  __pyx_L0:;
109210  __Pyx_RefNannyFinishContext();
109211  #if CYTHON_PEP489_MULTI_PHASE_INIT
109212  return (__pyx_m != NULL) ? 0 : -1;
109213  #elif PY_MAJOR_VERSION >= 3
109214  return __pyx_m;
109215  #else
109216  return;
109217  #endif
109218 }
109219 
109220 /* --- Runtime support code --- */
109221 /* Refnanny */
109222 #if CYTHON_REFNANNY
109223 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
109224  PyObject *m = NULL, *p = NULL;
109225  void *r = NULL;
109226  m = PyImport_ImportModule(modname);
109227  if (!m) goto end;
109228  p = PyObject_GetAttrString(m, "RefNannyAPI");
109229  if (!p) goto end;
109230  r = PyLong_AsVoidPtr(p);
109231 end:
109232  Py_XDECREF(p);
109233  Py_XDECREF(m);
109234  return (__Pyx_RefNannyAPIStruct *)r;
109235 }
109236 #endif
109237 
109238 /* PyObjectGetAttrStr */
109239 #if CYTHON_USE_TYPE_SLOTS
109240 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
109241  PyTypeObject* tp = Py_TYPE(obj);
109242  if (likely(tp->tp_getattro))
109243  return tp->tp_getattro(obj, attr_name);
109244 #if PY_MAJOR_VERSION < 3
109245  if (likely(tp->tp_getattr))
109246  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
109247 #endif
109248  return PyObject_GetAttr(obj, attr_name);
109249 }
109250 #endif
109251 
109252 /* GetBuiltinName */
109253 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
109254  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
109255  if (unlikely(!result)) {
109256  PyErr_Format(PyExc_NameError,
109257 #if PY_MAJOR_VERSION >= 3
109258  "name '%U' is not defined", name);
109259 #else
109260  "name '%.200s' is not defined", PyString_AS_STRING(name));
109261 #endif
109262  }
109263  return result;
109264 }
109265 
109266 /* RaiseDoubleKeywords */
109267 static void __Pyx_RaiseDoubleKeywordsError(
109268  const char* func_name,
109269  PyObject* kw_name)
109270 {
109271  PyErr_Format(PyExc_TypeError,
109272  #if PY_MAJOR_VERSION >= 3
109273  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
109274  #else
109275  "%s() got multiple values for keyword argument '%s'", func_name,
109276  PyString_AsString(kw_name));
109277  #endif
109278 }
109279 
109280 /* ParseKeywords */
109281 static int __Pyx_ParseOptionalKeywords(
109282  PyObject *kwds,
109283  PyObject **argnames[],
109284  PyObject *kwds2,
109285  PyObject *values[],
109286  Py_ssize_t num_pos_args,
109287  const char* function_name)
109288 {
109289  PyObject *key = 0, *value = 0;
109290  Py_ssize_t pos = 0;
109291  PyObject*** name;
109292  PyObject*** first_kw_arg = argnames + num_pos_args;
109293  while (PyDict_Next(kwds, &pos, &key, &value)) {
109294  name = first_kw_arg;
109295  while (*name && (**name != key)) name++;
109296  if (*name) {
109297  values[name-argnames] = value;
109298  continue;
109299  }
109300  name = first_kw_arg;
109301  #if PY_MAJOR_VERSION < 3
109302  if (likely(PyString_Check(key))) {
109303  while (*name) {
109304  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
109305  && _PyString_Eq(**name, key)) {
109306  values[name-argnames] = value;
109307  break;
109308  }
109309  name++;
109310  }
109311  if (*name) continue;
109312  else {
109313  PyObject*** argname = argnames;
109314  while (argname != first_kw_arg) {
109315  if ((**argname == key) || (
109316  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
109317  && _PyString_Eq(**argname, key))) {
109318  goto arg_passed_twice;
109319  }
109320  argname++;
109321  }
109322  }
109323  } else
109324  #endif
109325  if (likely(PyUnicode_Check(key))) {
109326  while (*name) {
109327  int cmp = (**name == key) ? 0 :
109328  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
109329  (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
109330  #endif
109331  PyUnicode_Compare(**name, key);
109332  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
109333  if (cmp == 0) {
109334  values[name-argnames] = value;
109335  break;
109336  }
109337  name++;
109338  }
109339  if (*name) continue;
109340  else {
109341  PyObject*** argname = argnames;
109342  while (argname != first_kw_arg) {
109343  int cmp = (**argname == key) ? 0 :
109344  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
109345  (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
109346  #endif
109347  PyUnicode_Compare(**argname, key);
109348  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
109349  if (cmp == 0) goto arg_passed_twice;
109350  argname++;
109351  }
109352  }
109353  } else
109354  goto invalid_keyword_type;
109355  if (kwds2) {
109356  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
109357  } else {
109358  goto invalid_keyword;
109359  }
109360  }
109361  return 0;
109362 arg_passed_twice:
109363  __Pyx_RaiseDoubleKeywordsError(function_name, key);
109364  goto bad;
109365 invalid_keyword_type:
109366  PyErr_Format(PyExc_TypeError,
109367  "%.200s() keywords must be strings", function_name);
109368  goto bad;
109369 invalid_keyword:
109370  PyErr_Format(PyExc_TypeError,
109371  #if PY_MAJOR_VERSION < 3
109372  "%.200s() got an unexpected keyword argument '%.200s'",
109373  function_name, PyString_AsString(key));
109374  #else
109375  "%s() got an unexpected keyword argument '%U'",
109376  function_name, key);
109377  #endif
109378 bad:
109379  return -1;
109380 }
109381 
109382 /* RaiseArgTupleInvalid */
109383 static void __Pyx_RaiseArgtupleInvalid(
109384  const char* func_name,
109385  int exact,
109386  Py_ssize_t num_min,
109387  Py_ssize_t num_max,
109388  Py_ssize_t num_found)
109389 {
109390  Py_ssize_t num_expected;
109391  const char *more_or_less;
109392  if (num_found < num_min) {
109393  num_expected = num_min;
109394  more_or_less = "at least";
109395  } else {
109396  num_expected = num_max;
109397  more_or_less = "at most";
109398  }
109399  if (exact) {
109400  more_or_less = "exactly";
109401  }
109402  PyErr_Format(PyExc_TypeError,
109403  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
109404  func_name, more_or_less, num_expected,
109405  (num_expected == 1) ? "" : "s", num_found);
109406 }
109407 
109408 /* ArgTypeTest */
109409 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
109410 {
109411  if (unlikely(!type)) {
109412  PyErr_SetString(PyExc_SystemError, "Missing type object");
109413  return 0;
109414  }
109415  else if (exact) {
109416  #if PY_MAJOR_VERSION == 2
109417  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
109418  #endif
109419  }
109420  else {
109421  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
109422  }
109423  PyErr_Format(PyExc_TypeError,
109424  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
109425  name, type->tp_name, Py_TYPE(obj)->tp_name);
109426  return 0;
109427 }
109428 
109429 /* PyErrFetchRestore */
109430 #if CYTHON_FAST_THREAD_STATE
109431 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
109432  PyObject *tmp_type, *tmp_value, *tmp_tb;
109433  tmp_type = tstate->curexc_type;
109434  tmp_value = tstate->curexc_value;
109435  tmp_tb = tstate->curexc_traceback;
109436  tstate->curexc_type = type;
109437  tstate->curexc_value = value;
109438  tstate->curexc_traceback = tb;
109439  Py_XDECREF(tmp_type);
109440  Py_XDECREF(tmp_value);
109441  Py_XDECREF(tmp_tb);
109442 }
109443 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
109444  *type = tstate->curexc_type;
109445  *value = tstate->curexc_value;
109446  *tb = tstate->curexc_traceback;
109447  tstate->curexc_type = 0;
109448  tstate->curexc_value = 0;
109449  tstate->curexc_traceback = 0;
109450 }
109451 #endif
109452 
109453 /* Profile */
109454 #if CYTHON_PROFILE
109455 static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
109456  PyFrameObject** frame,
109457  PyThreadState* tstate,
109458  const char *funcname,
109459  const char *srcfile,
109460  int firstlineno) {
109461  PyObject *type, *value, *traceback;
109462  int retval;
109463  if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
109464  if (*code == NULL) {
109465  *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
109466  if (*code == NULL) return 0;
109467  }
109468  *frame = PyFrame_New(
109469  tstate, /*PyThreadState *tstate*/
109470  *code, /*PyCodeObject *code*/
109471  __pyx_d, /*PyObject *globals*/
109472  0 /*PyObject *locals*/
109473  );
109474  if (*frame == NULL) return 0;
109475  if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
109476  Py_INCREF(Py_None);
109477  (*frame)->f_trace = Py_None;
109478  }
109479 #if PY_VERSION_HEX < 0x030400B1
109480  } else {
109481  (*frame)->f_tstate = tstate;
109482 #endif
109483  }
109484  __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
109485  retval = 1;
109486  __Pyx_EnterTracing(tstate);
109487  __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
109488  #if CYTHON_TRACE
109489  if (tstate->c_tracefunc)
109490  retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
109491  if (retval && tstate->c_profilefunc)
109492  #endif
109493  retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
109494  __Pyx_LeaveTracing(tstate);
109495  if (retval) {
109496  __Pyx_ErrRestoreInState(tstate, type, value, traceback);
109497  return __Pyx_IsTracing(tstate, 0, 0) && retval;
109498  } else {
109499  Py_XDECREF(type);
109500  Py_XDECREF(value);
109501  Py_XDECREF(traceback);
109502  return -1;
109503  }
109504 }
109505 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
109506  PyCodeObject *py_code = 0;
109507 #if PY_MAJOR_VERSION >= 3
109508  py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
109509  if (likely(py_code)) {
109510  py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
109511  }
109512 #else
109513  PyObject *py_srcfile = 0;
109514  PyObject *py_funcname = 0;
109515  py_funcname = PyString_FromString(funcname);
109516  if (unlikely(!py_funcname)) goto bad;
109517  py_srcfile = PyString_FromString(srcfile);
109518  if (unlikely(!py_srcfile)) goto bad;
109519  py_code = PyCode_New(
109520  0,
109521  0,
109522  0,
109523  CO_OPTIMIZED | CO_NEWLOCALS,
109524  __pyx_empty_bytes, /*PyObject *code,*/
109525  __pyx_empty_tuple, /*PyObject *consts,*/
109526  __pyx_empty_tuple, /*PyObject *names,*/
109527  __pyx_empty_tuple, /*PyObject *varnames,*/
109528  __pyx_empty_tuple, /*PyObject *freevars,*/
109529  __pyx_empty_tuple, /*PyObject *cellvars,*/
109530  py_srcfile, /*PyObject *filename,*/
109531  py_funcname, /*PyObject *name,*/
109532  firstlineno,
109533  __pyx_empty_bytes /*PyObject *lnotab*/
109534  );
109535 bad:
109536  Py_XDECREF(py_srcfile);
109537  Py_XDECREF(py_funcname);
109538 #endif
109539  return py_code;
109540 }
109541 #endif
109542 
109543 /* PyFunctionFastCall */
109544 #if CYTHON_FAST_PYCALL
109545 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
109546  PyObject *globals) {
109547  PyFrameObject *f;
109548  PyThreadState *tstate = __Pyx_PyThreadState_Current;
109549  PyObject **fastlocals;
109550  Py_ssize_t i;
109551  PyObject *result;
109552  assert(globals != NULL);
109553  /* XXX Perhaps we should create a specialized
109554  PyFrame_New() that doesn't take locals, but does
109555  take builtins without sanity checking them.
109556  */
109557  assert(tstate != NULL);
109558  f = PyFrame_New(tstate, co, globals, NULL);
109559  if (f == NULL) {
109560  return NULL;
109561  }
109562  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
109563  for (i = 0; i < na; i++) {
109564  Py_INCREF(*args);
109565  fastlocals[i] = *args++;
109566  }
109567  result = PyEval_EvalFrameEx(f,0);
109568  ++tstate->recursion_depth;
109569  Py_DECREF(f);
109570  --tstate->recursion_depth;
109571  return result;
109572 }
109573 #if 1 || PY_VERSION_HEX < 0x030600B1
109574 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
109575  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
109576  PyObject *globals = PyFunction_GET_GLOBALS(func);
109577  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
109578  PyObject *closure;
109579 #if PY_MAJOR_VERSION >= 3
109580  PyObject *kwdefs;
109581 #endif
109582  PyObject *kwtuple, **k;
109583  PyObject **d;
109584  Py_ssize_t nd;
109585  Py_ssize_t nk;
109586  PyObject *result;
109587  assert(kwargs == NULL || PyDict_Check(kwargs));
109588  nk = kwargs ? PyDict_Size(kwargs) : 0;
109589  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
109590  return NULL;
109591  }
109592  if (
109593 #if PY_MAJOR_VERSION >= 3
109594  co->co_kwonlyargcount == 0 &&
109595 #endif
109596  likely(kwargs == NULL || nk == 0) &&
109597  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
109598  if (argdefs == NULL && co->co_argcount == nargs) {
109599  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
109600  goto done;
109601  }
109602  else if (nargs == 0 && argdefs != NULL
109603  && co->co_argcount == Py_SIZE(argdefs)) {
109604  /* function called with no arguments, but all parameters have
109605  a default value: use default values as arguments .*/
109606  args = &PyTuple_GET_ITEM(argdefs, 0);
109607  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
109608  goto done;
109609  }
109610  }
109611  if (kwargs != NULL) {
109612  Py_ssize_t pos, i;
109613  kwtuple = PyTuple_New(2 * nk);
109614  if (kwtuple == NULL) {
109615  result = NULL;
109616  goto done;
109617  }
109618  k = &PyTuple_GET_ITEM(kwtuple, 0);
109619  pos = i = 0;
109620  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
109621  Py_INCREF(k[i]);
109622  Py_INCREF(k[i+1]);
109623  i += 2;
109624  }
109625  nk = i / 2;
109626  }
109627  else {
109628  kwtuple = NULL;
109629  k = NULL;
109630  }
109631  closure = PyFunction_GET_CLOSURE(func);
109632 #if PY_MAJOR_VERSION >= 3
109633  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
109634 #endif
109635  if (argdefs != NULL) {
109636  d = &PyTuple_GET_ITEM(argdefs, 0);
109637  nd = Py_SIZE(argdefs);
109638  }
109639  else {
109640  d = NULL;
109641  nd = 0;
109642  }
109643 #if PY_MAJOR_VERSION >= 3
109644  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
109645  args, (int)nargs,
109646  k, (int)nk,
109647  d, (int)nd, kwdefs, closure);
109648 #else
109649  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
109650  args, (int)nargs,
109651  k, (int)nk,
109652  d, (int)nd, closure);
109653 #endif
109654  Py_XDECREF(kwtuple);
109655 done:
109656  Py_LeaveRecursiveCall();
109657  return result;
109658 }
109659 #endif
109660 #endif
109661 
109662 /* PyObjectCall */
109663 #if CYTHON_COMPILING_IN_CPYTHON
109664 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
109665  PyObject *result;
109666  ternaryfunc call = Py_TYPE(func)->tp_call;
109667  if (unlikely(!call))
109668  return PyObject_Call(func, arg, kw);
109669  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
109670  return NULL;
109671  result = (*call)(func, arg, kw);
109672  Py_LeaveRecursiveCall();
109673  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
109674  PyErr_SetString(
109675  PyExc_SystemError,
109676  "NULL result without error in PyObject_Call");
109677  }
109678  return result;
109679 }
109680 #endif
109681 
109682 /* PyObjectCallMethO */
109683 #if CYTHON_COMPILING_IN_CPYTHON
109684 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
109685  PyObject *self, *result;
109686  PyCFunction cfunc;
109687  cfunc = PyCFunction_GET_FUNCTION(func);
109688  self = PyCFunction_GET_SELF(func);
109689  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
109690  return NULL;
109691  result = cfunc(self, arg);
109692  Py_LeaveRecursiveCall();
109693  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
109694  PyErr_SetString(
109695  PyExc_SystemError,
109696  "NULL result without error in PyObject_Call");
109697  }
109698  return result;
109699 }
109700 #endif
109701 
109702 /* PyObjectCallNoArg */
109703 #if CYTHON_COMPILING_IN_CPYTHON
109704 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
109705 #if CYTHON_FAST_PYCALL
109706  if (PyFunction_Check(func)) {
109707  return __Pyx_PyFunction_FastCall(func, NULL, 0);
109708  }
109709 #endif
109710 #ifdef __Pyx_CyFunction_USED
109711  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
109712 #else
109713  if (likely(PyCFunction_Check(func)))
109714 #endif
109715  {
109716  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
109717  return __Pyx_PyObject_CallMethO(func, NULL);
109718  }
109719  }
109720  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
109721 }
109722 #endif
109723 
109724 /* PyCFunctionFastCall */
109725 #if CYTHON_FAST_PYCCALL
109726 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
109727  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
109728  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
109729  PyObject *self = PyCFunction_GET_SELF(func);
109730  int flags = PyCFunction_GET_FLAGS(func);
109731  assert(PyCFunction_Check(func));
109732  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
109733  assert(nargs >= 0);
109734  assert(nargs == 0 || args != NULL);
109735  /* _PyCFunction_FastCallDict() must not be called with an exception set,
109736  because it may clear it (directly or indirectly) and so the
109737  caller loses its exception */
109738  assert(!PyErr_Occurred());
109739  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
109740  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
109741  } else {
109742  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
109743  }
109744 }
109745 #endif
109746 
109747 /* PyObjectCall2Args */
109748 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
109749  PyObject *args, *result = NULL;
109750  #if CYTHON_FAST_PYCALL
109751  if (PyFunction_Check(function)) {
109752  PyObject *args[2] = {arg1, arg2};
109753  return __Pyx_PyFunction_FastCall(function, args, 2);
109754  }
109755  #endif
109756  #if CYTHON_FAST_PYCCALL
109757  if (__Pyx_PyFastCFunction_Check(function)) {
109758  PyObject *args[2] = {arg1, arg2};
109759  return __Pyx_PyCFunction_FastCall(function, args, 2);
109760  }
109761  #endif
109762  args = PyTuple_New(2);
109763  if (unlikely(!args)) goto done;
109764  Py_INCREF(arg1);
109765  PyTuple_SET_ITEM(args, 0, arg1);
109766  Py_INCREF(arg2);
109767  PyTuple_SET_ITEM(args, 1, arg2);
109768  Py_INCREF(function);
109769  result = __Pyx_PyObject_Call(function, args, NULL);
109770  Py_DECREF(args);
109771  Py_DECREF(function);
109772 done:
109773  return result;
109774 }
109775 
109776 /* PyObjectCallOneArg */
109777 #if CYTHON_COMPILING_IN_CPYTHON
109778 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
109779  PyObject *result;
109780  PyObject *args = PyTuple_New(1);
109781  if (unlikely(!args)) return NULL;
109782  Py_INCREF(arg);
109783  PyTuple_SET_ITEM(args, 0, arg);
109784  result = __Pyx_PyObject_Call(func, args, NULL);
109785  Py_DECREF(args);
109786  return result;
109787 }
109788 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
109789 #if CYTHON_FAST_PYCALL
109790  if (PyFunction_Check(func)) {
109791  return __Pyx_PyFunction_FastCall(func, &arg, 1);
109792  }
109793 #endif
109794  if (likely(PyCFunction_Check(func))) {
109795  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
109796  return __Pyx_PyObject_CallMethO(func, arg);
109797 #if CYTHON_FAST_PYCCALL
109798  } else if (__Pyx_PyFastCFunction_Check(func)) {
109799  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
109800 #endif
109801  }
109802  }
109803  return __Pyx__PyObject_CallOneArg(func, arg);
109804 }
109805 #else
109806 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
109807  PyObject *result;
109808  PyObject *args = PyTuple_Pack(1, arg);
109809  if (unlikely(!args)) return NULL;
109810  result = __Pyx_PyObject_Call(func, args, NULL);
109811  Py_DECREF(args);
109812  return result;
109813 }
109814 #endif
109815 
109816 /* PyDictVersioning */
109817 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
109818 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
109819  PyObject *dict = Py_TYPE(obj)->tp_dict;
109820  return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
109821 }
109822 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
109823  PyObject **dictptr = NULL;
109824  Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
109825  if (offset) {
109826 #if CYTHON_COMPILING_IN_CPYTHON
109827  dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
109828 #else
109829  dictptr = _PyObject_GetDictPtr(obj);
109830 #endif
109831  }
109832  return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
109833 }
109834 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
109835  PyObject *dict = Py_TYPE(obj)->tp_dict;
109836  if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
109837  return 0;
109838  return obj_dict_version == __Pyx_get_object_dict_version(obj);
109839 }
109840 #endif
109841 
109842 /* GetModuleGlobalName */
109843 #if CYTHON_USE_DICT_VERSIONS
109844 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
109845 #else
109846 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
109847 #endif
109848 {
109849  PyObject *result;
109850 #if !CYTHON_AVOID_BORROWED_REFS
109851 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
109852  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
109853  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
109854  if (likely(result)) {
109855  return __Pyx_NewRef(result);
109856  } else if (unlikely(PyErr_Occurred())) {
109857  return NULL;
109858  }
109859 #else
109860  result = PyDict_GetItem(__pyx_d, name);
109861  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
109862  if (likely(result)) {
109863  return __Pyx_NewRef(result);
109864  }
109865 #endif
109866 #else
109867  result = PyObject_GetItem(__pyx_d, name);
109868  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
109869  if (likely(result)) {
109870  return __Pyx_NewRef(result);
109871  }
109872  PyErr_Clear();
109873 #endif
109874  return __Pyx_GetBuiltinName(name);
109875 }
109876 
109877 /* ExtTypeTest */
109878 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
109879  if (unlikely(!type)) {
109880  PyErr_SetString(PyExc_SystemError, "Missing type object");
109881  return 0;
109882  }
109883  if (likely(__Pyx_TypeCheck(obj, type)))
109884  return 1;
109885  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
109886  Py_TYPE(obj)->tp_name, type->tp_name);
109887  return 0;
109888 }
109889 
109890 /* GetItemInt */
109891 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
109892  PyObject *r;
109893  if (!j) return NULL;
109894  r = PyObject_GetItem(o, j);
109895  Py_DECREF(j);
109896  return r;
109897 }
109898 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
109899  CYTHON_NCP_UNUSED int wraparound,
109900  CYTHON_NCP_UNUSED int boundscheck) {
109901 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
109902  Py_ssize_t wrapped_i = i;
109903  if (wraparound & unlikely(i < 0)) {
109904  wrapped_i += PyList_GET_SIZE(o);
109905  }
109906  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
109907  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
109908  Py_INCREF(r);
109909  return r;
109910  }
109911  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
109912 #else
109913  return PySequence_GetItem(o, i);
109914 #endif
109915 }
109916 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
109917  CYTHON_NCP_UNUSED int wraparound,
109918  CYTHON_NCP_UNUSED int boundscheck) {
109919 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
109920  Py_ssize_t wrapped_i = i;
109921  if (wraparound & unlikely(i < 0)) {
109922  wrapped_i += PyTuple_GET_SIZE(o);
109923  }
109924  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
109925  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
109926  Py_INCREF(r);
109927  return r;
109928  }
109929  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
109930 #else
109931  return PySequence_GetItem(o, i);
109932 #endif
109933 }
109934 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
109935  CYTHON_NCP_UNUSED int wraparound,
109936  CYTHON_NCP_UNUSED int boundscheck) {
109937 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
109938  if (is_list || PyList_CheckExact(o)) {
109939  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
109940  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
109941  PyObject *r = PyList_GET_ITEM(o, n);
109942  Py_INCREF(r);
109943  return r;
109944  }
109945  }
109946  else if (PyTuple_CheckExact(o)) {
109947  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
109948  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
109949  PyObject *r = PyTuple_GET_ITEM(o, n);
109950  Py_INCREF(r);
109951  return r;
109952  }
109953  } else {
109954  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
109955  if (likely(m && m->sq_item)) {
109956  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
109957  Py_ssize_t l = m->sq_length(o);
109958  if (likely(l >= 0)) {
109959  i += l;
109960  } else {
109961  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
109962  return NULL;
109963  PyErr_Clear();
109964  }
109965  }
109966  return m->sq_item(o, i);
109967  }
109968  }
109969 #else
109970  if (is_list || PySequence_Check(o)) {
109971  return PySequence_GetItem(o, i);
109972  }
109973 #endif
109974  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
109975 }
109976 
109977 /* MemviewSliceInit */
109978 static int
109979 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
109980  int ndim,
109981  __Pyx_memviewslice *memviewslice,
109982  int memview_is_new_reference)
109983 {
109984  __Pyx_RefNannyDeclarations
109985  int i, retval=-1;
109986  Py_buffer *buf = &memview->view;
109987  __Pyx_RefNannySetupContext("init_memviewslice", 0);
109988  if (unlikely(memviewslice->memview || memviewslice->data)) {
109989  PyErr_SetString(PyExc_ValueError,
109990  "memviewslice is already initialized!");
109991  goto fail;
109992  }
109993  if (buf->strides) {
109994  for (i = 0; i < ndim; i++) {
109995  memviewslice->strides[i] = buf->strides[i];
109996  }
109997  } else {
109998  Py_ssize_t stride = buf->itemsize;
109999  for (i = ndim - 1; i >= 0; i--) {
110000  memviewslice->strides[i] = stride;
110001  stride *= buf->shape[i];
110002  }
110003  }
110004  for (i = 0; i < ndim; i++) {
110005  memviewslice->shape[i] = buf->shape[i];
110006  if (buf->suboffsets) {
110007  memviewslice->suboffsets[i] = buf->suboffsets[i];
110008  } else {
110009  memviewslice->suboffsets[i] = -1;
110010  }
110011  }
110012  memviewslice->memview = memview;
110013  memviewslice->data = (char *)buf->buf;
110014  if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
110015  Py_INCREF(memview);
110016  }
110017  retval = 0;
110018  goto no_fail;
110019 fail:
110020  memviewslice->memview = 0;
110021  memviewslice->data = 0;
110022  retval = -1;
110023 no_fail:
110024  __Pyx_RefNannyFinishContext();
110025  return retval;
110026 }
110027 #ifndef Py_NO_RETURN
110028 #define Py_NO_RETURN
110029 #endif
110030 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
110031  va_list vargs;
110032  char msg[200];
110033 #ifdef HAVE_STDARG_PROTOTYPES
110034  va_start(vargs, fmt);
110035 #else
110036  va_start(vargs);
110037 #endif
110038  vsnprintf(msg, 200, fmt, vargs);
110039  va_end(vargs);
110040  Py_FatalError(msg);
110041 }
110042 static CYTHON_INLINE int
110043 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
110044  PyThread_type_lock lock)
110045 {
110046  int result;
110047  PyThread_acquire_lock(lock, 1);
110048  result = (*acquisition_count)++;
110049  PyThread_release_lock(lock);
110050  return result;
110051 }
110052 static CYTHON_INLINE int
110053 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
110054  PyThread_type_lock lock)
110055 {
110056  int result;
110057  PyThread_acquire_lock(lock, 1);
110058  result = (*acquisition_count)--;
110059  PyThread_release_lock(lock);
110060  return result;
110061 }
110062 static CYTHON_INLINE void
110063 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
110064 {
110065  int first_time;
110066  struct __pyx_memoryview_obj *memview = memslice->memview;
110067  if (unlikely(!memview || (PyObject *) memview == Py_None))
110068  return;
110069  if (unlikely(__pyx_get_slice_count(memview) < 0))
110070  __pyx_fatalerror("Acquisition count is %d (line %d)",
110071  __pyx_get_slice_count(memview), lineno);
110072  first_time = __pyx_add_acquisition_count(memview) == 0;
110073  if (unlikely(first_time)) {
110074  if (have_gil) {
110075  Py_INCREF((PyObject *) memview);
110076  } else {
110077  PyGILState_STATE _gilstate = PyGILState_Ensure();
110078  Py_INCREF((PyObject *) memview);
110079  PyGILState_Release(_gilstate);
110080  }
110081  }
110082 }
110083 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
110084  int have_gil, int lineno) {
110085  int last_time;
110086  struct __pyx_memoryview_obj *memview = memslice->memview;
110087  if (unlikely(!memview || (PyObject *) memview == Py_None)) {
110088  memslice->memview = NULL;
110089  return;
110090  }
110091  if (unlikely(__pyx_get_slice_count(memview) <= 0))
110092  __pyx_fatalerror("Acquisition count is %d (line %d)",
110093  __pyx_get_slice_count(memview), lineno);
110094  last_time = __pyx_sub_acquisition_count(memview) == 1;
110095  memslice->data = NULL;
110096  if (unlikely(last_time)) {
110097  if (have_gil) {
110098  Py_CLEAR(memslice->memview);
110099  } else {
110100  PyGILState_STATE _gilstate = PyGILState_Ensure();
110101  Py_CLEAR(memslice->memview);
110102  PyGILState_Release(_gilstate);
110103  }
110104  } else {
110105  memslice->memview = NULL;
110106  }
110107 }
110108 
110109 /* PyIntBinop */
110110 #if !CYTHON_COMPILING_IN_PYPY
110111 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
110112  (void)inplace;
110113  (void)zerodivision_check;
110114  #if PY_MAJOR_VERSION < 3
110115  if (likely(PyInt_CheckExact(op1))) {
110116  const long b = intval;
110117  long x;
110118  long a = PyInt_AS_LONG(op1);
110119  x = (long)((unsigned long)a + b);
110120  if (likely((x^a) >= 0 || (x^b) >= 0))
110121  return PyInt_FromLong(x);
110122  return PyLong_Type.tp_as_number->nb_add(op1, op2);
110123  }
110124  #endif
110125  #if CYTHON_USE_PYLONG_INTERNALS
110126  if (likely(PyLong_CheckExact(op1))) {
110127  const long b = intval;
110128  long a, x;
110129 #ifdef HAVE_LONG_LONG
110130  const PY_LONG_LONG llb = intval;
110131  PY_LONG_LONG lla, llx;
110132 #endif
110133  const digit* digits = ((PyLongObject*)op1)->ob_digit;
110134  const Py_ssize_t size = Py_SIZE(op1);
110135  if (likely(__Pyx_sst_abs(size) <= 1)) {
110136  a = likely(size) ? digits[0] : 0;
110137  if (size == -1) a = -a;
110138  } else {
110139  switch (size) {
110140  case -2:
110141  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
110142  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110143  break;
110144 #ifdef HAVE_LONG_LONG
110145  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
110146  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
110147  goto long_long;
110148 #endif
110149  }
110150  CYTHON_FALLTHROUGH;
110151  case 2:
110152  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
110153  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110154  break;
110155 #ifdef HAVE_LONG_LONG
110156  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
110157  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
110158  goto long_long;
110159 #endif
110160  }
110161  CYTHON_FALLTHROUGH;
110162  case -3:
110163  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
110164  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110165  break;
110166 #ifdef HAVE_LONG_LONG
110167  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
110168  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]));
110169  goto long_long;
110170 #endif
110171  }
110172  CYTHON_FALLTHROUGH;
110173  case 3:
110174  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
110175  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110176  break;
110177 #ifdef HAVE_LONG_LONG
110178  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
110179  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]));
110180  goto long_long;
110181 #endif
110182  }
110183  CYTHON_FALLTHROUGH;
110184  case -4:
110185  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
110186  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110187  break;
110188 #ifdef HAVE_LONG_LONG
110189  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
110190  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]));
110191  goto long_long;
110192 #endif
110193  }
110194  CYTHON_FALLTHROUGH;
110195  case 4:
110196  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
110197  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110198  break;
110199 #ifdef HAVE_LONG_LONG
110200  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
110201  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]));
110202  goto long_long;
110203 #endif
110204  }
110205  CYTHON_FALLTHROUGH;
110206  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
110207  }
110208  }
110209  x = a + b;
110210  return PyLong_FromLong(x);
110211 #ifdef HAVE_LONG_LONG
110212  long_long:
110213  llx = lla + llb;
110214  return PyLong_FromLongLong(llx);
110215 #endif
110216 
110217 
110218  }
110219  #endif
110220  if (PyFloat_CheckExact(op1)) {
110221  const long b = intval;
110222  double a = PyFloat_AS_DOUBLE(op1);
110223  double result;
110224  PyFPE_START_PROTECT("add", return NULL)
110225  result = ((double)a) + (double)b;
110226  PyFPE_END_PROTECT(result)
110227  return PyFloat_FromDouble(result);
110228  }
110229  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
110230 }
110231 #endif
110232 
110233 /* BufferIndexError */
110234 static void __Pyx_RaiseBufferIndexError(int axis) {
110235  PyErr_Format(PyExc_IndexError,
110236  "Out of bounds on buffer access (axis %d)", axis);
110237 }
110238 
110239 /* SliceObject */
110240 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
110241  Py_ssize_t cstart, Py_ssize_t cstop,
110242  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
110243  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
110244 #if CYTHON_USE_TYPE_SLOTS
110245  PyMappingMethods* mp;
110246 #if PY_MAJOR_VERSION < 3
110247  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
110248  if (likely(ms && ms->sq_slice)) {
110249  if (!has_cstart) {
110250  if (_py_start && (*_py_start != Py_None)) {
110251  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
110252  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
110253  } else
110254  cstart = 0;
110255  }
110256  if (!has_cstop) {
110257  if (_py_stop && (*_py_stop != Py_None)) {
110258  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
110259  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
110260  } else
110261  cstop = PY_SSIZE_T_MAX;
110262  }
110263  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
110264  Py_ssize_t l = ms->sq_length(obj);
110265  if (likely(l >= 0)) {
110266  if (cstop < 0) {
110267  cstop += l;
110268  if (cstop < 0) cstop = 0;
110269  }
110270  if (cstart < 0) {
110271  cstart += l;
110272  if (cstart < 0) cstart = 0;
110273  }
110274  } else {
110275  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
110276  goto bad;
110277  PyErr_Clear();
110278  }
110279  }
110280  return ms->sq_slice(obj, cstart, cstop);
110281  }
110282 #endif
110283  mp = Py_TYPE(obj)->tp_as_mapping;
110284  if (likely(mp && mp->mp_subscript))
110285 #endif
110286  {
110287  PyObject* result;
110288  PyObject *py_slice, *py_start, *py_stop;
110289  if (_py_slice) {
110290  py_slice = *_py_slice;
110291  } else {
110292  PyObject* owned_start = NULL;
110293  PyObject* owned_stop = NULL;
110294  if (_py_start) {
110295  py_start = *_py_start;
110296  } else {
110297  if (has_cstart) {
110298  owned_start = py_start = PyInt_FromSsize_t(cstart);
110299  if (unlikely(!py_start)) goto bad;
110300  } else
110301  py_start = Py_None;
110302  }
110303  if (_py_stop) {
110304  py_stop = *_py_stop;
110305  } else {
110306  if (has_cstop) {
110307  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
110308  if (unlikely(!py_stop)) {
110309  Py_XDECREF(owned_start);
110310  goto bad;
110311  }
110312  } else
110313  py_stop = Py_None;
110314  }
110315  py_slice = PySlice_New(py_start, py_stop, Py_None);
110316  Py_XDECREF(owned_start);
110317  Py_XDECREF(owned_stop);
110318  if (unlikely(!py_slice)) goto bad;
110319  }
110320 #if CYTHON_USE_TYPE_SLOTS
110321  result = mp->mp_subscript(obj, py_slice);
110322 #else
110323  result = PyObject_GetItem(obj, py_slice);
110324 #endif
110325  if (!_py_slice) {
110326  Py_DECREF(py_slice);
110327  }
110328  return result;
110329  }
110330  PyErr_Format(PyExc_TypeError,
110331  "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
110332 bad:
110333  return NULL;
110334 }
110335 
110336 /* SliceObject */
110337 static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value,
110338  Py_ssize_t cstart, Py_ssize_t cstop,
110339  PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
110340  int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
110341 #if CYTHON_USE_TYPE_SLOTS
110342  PyMappingMethods* mp;
110343 #if PY_MAJOR_VERSION < 3
110344  PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
110345  if (likely(ms && ms->sq_ass_slice)) {
110346  if (!has_cstart) {
110347  if (_py_start && (*_py_start != Py_None)) {
110348  cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
110349  if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
110350  } else
110351  cstart = 0;
110352  }
110353  if (!has_cstop) {
110354  if (_py_stop && (*_py_stop != Py_None)) {
110355  cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
110356  if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
110357  } else
110358  cstop = PY_SSIZE_T_MAX;
110359  }
110360  if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
110361  Py_ssize_t l = ms->sq_length(obj);
110362  if (likely(l >= 0)) {
110363  if (cstop < 0) {
110364  cstop += l;
110365  if (cstop < 0) cstop = 0;
110366  }
110367  if (cstart < 0) {
110368  cstart += l;
110369  if (cstart < 0) cstart = 0;
110370  }
110371  } else {
110372  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
110373  goto bad;
110374  PyErr_Clear();
110375  }
110376  }
110377  return ms->sq_ass_slice(obj, cstart, cstop, value);
110378  }
110379 #endif
110380  mp = Py_TYPE(obj)->tp_as_mapping;
110381  if (likely(mp && mp->mp_ass_subscript))
110382 #endif
110383  {
110384  int result;
110385  PyObject *py_slice, *py_start, *py_stop;
110386  if (_py_slice) {
110387  py_slice = *_py_slice;
110388  } else {
110389  PyObject* owned_start = NULL;
110390  PyObject* owned_stop = NULL;
110391  if (_py_start) {
110392  py_start = *_py_start;
110393  } else {
110394  if (has_cstart) {
110395  owned_start = py_start = PyInt_FromSsize_t(cstart);
110396  if (unlikely(!py_start)) goto bad;
110397  } else
110398  py_start = Py_None;
110399  }
110400  if (_py_stop) {
110401  py_stop = *_py_stop;
110402  } else {
110403  if (has_cstop) {
110404  owned_stop = py_stop = PyInt_FromSsize_t(cstop);
110405  if (unlikely(!py_stop)) {
110406  Py_XDECREF(owned_start);
110407  goto bad;
110408  }
110409  } else
110410  py_stop = Py_None;
110411  }
110412  py_slice = PySlice_New(py_start, py_stop, Py_None);
110413  Py_XDECREF(owned_start);
110414  Py_XDECREF(owned_stop);
110415  if (unlikely(!py_slice)) goto bad;
110416  }
110417 #if CYTHON_USE_TYPE_SLOTS
110418  result = mp->mp_ass_subscript(obj, py_slice, value);
110419 #else
110420  result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice);
110421 #endif
110422  if (!_py_slice) {
110423  Py_DECREF(py_slice);
110424  }
110425  return result;
110426  }
110427  PyErr_Format(PyExc_TypeError,
110428  "'%.200s' object does not support slice %.10s",
110429  Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion");
110430 bad:
110431  return -1;
110432 }
110433 
110434 /* PyIntBinop */
110435 #if !CYTHON_COMPILING_IN_PYPY
110436 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
110437  (void)inplace;
110438  (void)zerodivision_check;
110439  #if PY_MAJOR_VERSION < 3
110440  if (likely(PyInt_CheckExact(op1))) {
110441  const long b = intval;
110442  long x;
110443  long a = PyInt_AS_LONG(op1);
110444  x = (long)((unsigned long)a - b);
110445  if (likely((x^a) >= 0 || (x^~b) >= 0))
110446  return PyInt_FromLong(x);
110447  return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
110448  }
110449  #endif
110450  #if CYTHON_USE_PYLONG_INTERNALS
110451  if (likely(PyLong_CheckExact(op1))) {
110452  const long b = intval;
110453  long a, x;
110454 #ifdef HAVE_LONG_LONG
110455  const PY_LONG_LONG llb = intval;
110456  PY_LONG_LONG lla, llx;
110457 #endif
110458  const digit* digits = ((PyLongObject*)op1)->ob_digit;
110459  const Py_ssize_t size = Py_SIZE(op1);
110460  if (likely(__Pyx_sst_abs(size) <= 1)) {
110461  a = likely(size) ? digits[0] : 0;
110462  if (size == -1) a = -a;
110463  } else {
110464  switch (size) {
110465  case -2:
110466  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
110467  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110468  break;
110469 #ifdef HAVE_LONG_LONG
110470  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
110471  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
110472  goto long_long;
110473 #endif
110474  }
110475  CYTHON_FALLTHROUGH;
110476  case 2:
110477  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
110478  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110479  break;
110480 #ifdef HAVE_LONG_LONG
110481  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
110482  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
110483  goto long_long;
110484 #endif
110485  }
110486  CYTHON_FALLTHROUGH;
110487  case -3:
110488  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
110489  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110490  break;
110491 #ifdef HAVE_LONG_LONG
110492  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
110493  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]));
110494  goto long_long;
110495 #endif
110496  }
110497  CYTHON_FALLTHROUGH;
110498  case 3:
110499  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
110500  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110501  break;
110502 #ifdef HAVE_LONG_LONG
110503  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
110504  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]));
110505  goto long_long;
110506 #endif
110507  }
110508  CYTHON_FALLTHROUGH;
110509  case -4:
110510  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
110511  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110512  break;
110513 #ifdef HAVE_LONG_LONG
110514  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
110515  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]));
110516  goto long_long;
110517 #endif
110518  }
110519  CYTHON_FALLTHROUGH;
110520  case 4:
110521  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
110522  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110523  break;
110524 #ifdef HAVE_LONG_LONG
110525  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
110526  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]));
110527  goto long_long;
110528 #endif
110529  }
110530  CYTHON_FALLTHROUGH;
110531  default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
110532  }
110533  }
110534  x = a - b;
110535  return PyLong_FromLong(x);
110536 #ifdef HAVE_LONG_LONG
110537  long_long:
110538  llx = lla - llb;
110539  return PyLong_FromLongLong(llx);
110540 #endif
110541 
110542 
110543  }
110544  #endif
110545  if (PyFloat_CheckExact(op1)) {
110546  const long b = intval;
110547  double a = PyFloat_AS_DOUBLE(op1);
110548  double result;
110549  PyFPE_START_PROTECT("subtract", return NULL)
110550  result = ((double)a) - (double)b;
110551  PyFPE_END_PROTECT(result)
110552  return PyFloat_FromDouble(result);
110553  }
110554  return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
110555 }
110556 #endif
110557 
110558 /* ObjectGetItem */
110559 #if CYTHON_USE_TYPE_SLOTS
110560 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
110561  PyObject *runerr;
110562  Py_ssize_t key_value;
110563  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
110564  if (unlikely(!(m && m->sq_item))) {
110565  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
110566  return NULL;
110567  }
110568  key_value = __Pyx_PyIndex_AsSsize_t(index);
110569  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
110570  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
110571  }
110572  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
110573  PyErr_Clear();
110574  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
110575  }
110576  return NULL;
110577 }
110578 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
110579  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
110580  if (likely(m && m->mp_subscript)) {
110581  return m->mp_subscript(obj, key);
110582  }
110583  return __Pyx_PyObject_GetIndex(obj, key);
110584 }
110585 #endif
110586 
110587 /* RaiseTooManyValuesToUnpack */
110588 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
110589  PyErr_Format(PyExc_ValueError,
110590  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
110591 }
110592 
110593 /* RaiseNeedMoreValuesToUnpack */
110594 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
110595  PyErr_Format(PyExc_ValueError,
110596  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
110597  index, (index == 1) ? "" : "s");
110598 }
110599 
110600 /* IterFinish */
110601 static CYTHON_INLINE int __Pyx_IterFinish(void) {
110602 #if CYTHON_FAST_THREAD_STATE
110603  PyThreadState *tstate = __Pyx_PyThreadState_Current;
110604  PyObject* exc_type = tstate->curexc_type;
110605  if (unlikely(exc_type)) {
110606  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
110607  PyObject *exc_value, *exc_tb;
110608  exc_value = tstate->curexc_value;
110609  exc_tb = tstate->curexc_traceback;
110610  tstate->curexc_type = 0;
110611  tstate->curexc_value = 0;
110612  tstate->curexc_traceback = 0;
110613  Py_DECREF(exc_type);
110614  Py_XDECREF(exc_value);
110615  Py_XDECREF(exc_tb);
110616  return 0;
110617  } else {
110618  return -1;
110619  }
110620  }
110621  return 0;
110622 #else
110623  if (unlikely(PyErr_Occurred())) {
110624  if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
110625  PyErr_Clear();
110626  return 0;
110627  } else {
110628  return -1;
110629  }
110630  }
110631  return 0;
110632 #endif
110633 }
110634 
110635 /* UnpackItemEndCheck */
110636 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
110637  if (unlikely(retval)) {
110638  Py_DECREF(retval);
110639  __Pyx_RaiseTooManyValuesError(expected);
110640  return -1;
110641  } else {
110642  return __Pyx_IterFinish();
110643  }
110644  return 0;
110645 }
110646 
110647 /* PyFloatBinop */
110648 #if !CYTHON_COMPILING_IN_PYPY
110649 static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
110650  const double b = floatval;
110651  double a, result;
110652  (void)inplace;
110653  (void)zerodivision_check;
110654  if (likely(PyFloat_CheckExact(op1))) {
110655  a = PyFloat_AS_DOUBLE(op1);
110656 
110657  } else
110658  #if PY_MAJOR_VERSION < 3
110659  if (likely(PyInt_CheckExact(op1))) {
110660  a = (double) PyInt_AS_LONG(op1);
110661 
110662  } else
110663  #endif
110664  if (likely(PyLong_CheckExact(op1))) {
110665  #if CYTHON_USE_PYLONG_INTERNALS
110666  const digit* digits = ((PyLongObject*)op1)->ob_digit;
110667  const Py_ssize_t size = Py_SIZE(op1);
110668  switch (size) {
110669  case 0: a = 0.0; break;
110670  case -1: a = -(double) digits[0]; break;
110671  case 1: a = (double) digits[0]; break;
110672  case -2:
110673  case 2:
110674  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
110675  a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110676  if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
110677  if (size == -2)
110678  a = -a;
110679  break;
110680  }
110681  }
110682  CYTHON_FALLTHROUGH;
110683  case -3:
110684  case 3:
110685  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
110686  a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110687  if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
110688  if (size == -3)
110689  a = -a;
110690  break;
110691  }
110692  }
110693  CYTHON_FALLTHROUGH;
110694  case -4:
110695  case 4:
110696  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
110697  a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
110698  if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
110699  if (size == -4)
110700  a = -a;
110701  break;
110702  }
110703  }
110704  CYTHON_FALLTHROUGH;
110705  default:
110706  #else
110707  {
110708  #endif
110709  a = PyLong_AsDouble(op1);
110710  if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
110711 
110712  }
110713  } else {
110714  return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
110715  }
110716 
110717  PyFPE_START_PROTECT("divide", return NULL)
110718  result = a / b;
110719  PyFPE_END_PROTECT(result)
110720  return PyFloat_FromDouble(result);
110721 }
110722 #endif
110723 
110724 /* PyIntCompare */
110725  static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
110726  if (op1 == op2) {
110727  Py_RETURN_TRUE;
110728  }
110729  #if PY_MAJOR_VERSION < 3
110730  if (likely(PyInt_CheckExact(op1))) {
110731  const long b = intval;
110732  long a = PyInt_AS_LONG(op1);
110733  if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
110734  }
110735  #endif
110736  #if CYTHON_USE_PYLONG_INTERNALS
110737  if (likely(PyLong_CheckExact(op1))) {
110738  int unequal;
110739  unsigned long uintval;
110740  Py_ssize_t size = Py_SIZE(op1);
110741  const digit* digits = ((PyLongObject*)op1)->ob_digit;
110742  if (intval == 0) {
110743  if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
110744  } else if (intval < 0) {
110745  if (size >= 0)
110746  Py_RETURN_FALSE;
110747  intval = -intval;
110748  size = -size;
110749  } else {
110750  if (size <= 0)
110751  Py_RETURN_FALSE;
110752  }
110753  uintval = (unsigned long) intval;
110754 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
110755  if (uintval >> (PyLong_SHIFT * 4)) {
110756  unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
110757  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
110758  } else
110759 #endif
110760 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
110761  if (uintval >> (PyLong_SHIFT * 3)) {
110762  unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
110763  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
110764  } else
110765 #endif
110766 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
110767  if (uintval >> (PyLong_SHIFT * 2)) {
110768  unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
110769  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
110770  } else
110771 #endif
110772 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
110773  if (uintval >> (PyLong_SHIFT * 1)) {
110774  unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
110775  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
110776  } else
110777 #endif
110778  unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
110779  if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
110780  }
110781  #endif
110782  if (PyFloat_CheckExact(op1)) {
110783  const long b = intval;
110784  double a = PyFloat_AS_DOUBLE(op1);
110785  if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
110786  }
110787  return (
110788  PyObject_RichCompare(op1, op2, Py_EQ));
110789 }
110790 
110791 /* None */
110792  static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
110793  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
110794 }
110795 
110796 /* None */
110797  static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
110798  PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
110799 }
110800 
110801 /* FetchCommonType */
110802  static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
110803  PyObject* fake_module;
110804  PyTypeObject* cached_type = NULL;
110805  fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
110806  if (!fake_module) return NULL;
110807  Py_INCREF(fake_module);
110808  cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
110809  if (cached_type) {
110810  if (!PyType_Check((PyObject*)cached_type)) {
110811  PyErr_Format(PyExc_TypeError,
110812  "Shared Cython type %.200s is not a type object",
110813  type->tp_name);
110814  goto bad;
110815  }
110816  if (cached_type->tp_basicsize != type->tp_basicsize) {
110817  PyErr_Format(PyExc_TypeError,
110818  "Shared Cython type %.200s has the wrong size, try recompiling",
110819  type->tp_name);
110820  goto bad;
110821  }
110822  } else {
110823  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
110824  PyErr_Clear();
110825  if (PyType_Ready(type) < 0) goto bad;
110826  if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
110827  goto bad;
110828  Py_INCREF(type);
110829  cached_type = type;
110830  }
110831 done:
110832  Py_DECREF(fake_module);
110833  return cached_type;
110834 bad:
110835  Py_XDECREF(cached_type);
110836  cached_type = NULL;
110837  goto done;
110838 }
110839 
110840 /* CythonFunctionShared */
110841  #include <structmember.h>
110842 static PyObject *
110843 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
110844 {
110845  if (unlikely(op->func_doc == NULL)) {
110846  if (op->func.m_ml->ml_doc) {
110847 #if PY_MAJOR_VERSION >= 3
110848  op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
110849 #else
110850  op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
110851 #endif
110852  if (unlikely(op->func_doc == NULL))
110853  return NULL;
110854  } else {
110855  Py_INCREF(Py_None);
110856  return Py_None;
110857  }
110858  }
110859  Py_INCREF(op->func_doc);
110860  return op->func_doc;
110861 }
110862 static int
110863 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
110864 {
110865  PyObject *tmp = op->func_doc;
110866  if (value == NULL) {
110867  value = Py_None;
110868  }
110869  Py_INCREF(value);
110870  op->func_doc = value;
110871  Py_XDECREF(tmp);
110872  return 0;
110873 }
110874 static PyObject *
110875 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
110876 {
110877  if (unlikely(op->func_name == NULL)) {
110878 #if PY_MAJOR_VERSION >= 3
110879  op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
110880 #else
110881  op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
110882 #endif
110883  if (unlikely(op->func_name == NULL))
110884  return NULL;
110885  }
110886  Py_INCREF(op->func_name);
110887  return op->func_name;
110888 }
110889 static int
110890 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
110891 {
110892  PyObject *tmp;
110893 #if PY_MAJOR_VERSION >= 3
110894  if (unlikely(value == NULL || !PyUnicode_Check(value)))
110895 #else
110896  if (unlikely(value == NULL || !PyString_Check(value)))
110897 #endif
110898  {
110899  PyErr_SetString(PyExc_TypeError,
110900  "__name__ must be set to a string object");
110901  return -1;
110902  }
110903  tmp = op->func_name;
110904  Py_INCREF(value);
110905  op->func_name = value;
110906  Py_XDECREF(tmp);
110907  return 0;
110908 }
110909 static PyObject *
110910 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
110911 {
110912  Py_INCREF(op->func_qualname);
110913  return op->func_qualname;
110914 }
110915 static int
110916 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
110917 {
110918  PyObject *tmp;
110919 #if PY_MAJOR_VERSION >= 3
110920  if (unlikely(value == NULL || !PyUnicode_Check(value)))
110921 #else
110922  if (unlikely(value == NULL || !PyString_Check(value)))
110923 #endif
110924  {
110925  PyErr_SetString(PyExc_TypeError,
110926  "__qualname__ must be set to a string object");
110927  return -1;
110928  }
110929  tmp = op->func_qualname;
110930  Py_INCREF(value);
110931  op->func_qualname = value;
110932  Py_XDECREF(tmp);
110933  return 0;
110934 }
110935 static PyObject *
110936 __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
110937 {
110938  PyObject *self;
110939  self = m->func_closure;
110940  if (self == NULL)
110941  self = Py_None;
110942  Py_INCREF(self);
110943  return self;
110944 }
110945 static PyObject *
110946 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
110947 {
110948  if (unlikely(op->func_dict == NULL)) {
110949  op->func_dict = PyDict_New();
110950  if (unlikely(op->func_dict == NULL))
110951  return NULL;
110952  }
110953  Py_INCREF(op->func_dict);
110954  return op->func_dict;
110955 }
110956 static int
110957 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context)
110958 {
110959  PyObject *tmp;
110960  if (unlikely(value == NULL)) {
110961  PyErr_SetString(PyExc_TypeError,
110962  "function's dictionary may not be deleted");
110963  return -1;
110964  }
110965  if (unlikely(!PyDict_Check(value))) {
110966  PyErr_SetString(PyExc_TypeError,
110967  "setting function's dictionary to a non-dict");
110968  return -1;
110969  }
110970  tmp = op->func_dict;
110971  Py_INCREF(value);
110972  op->func_dict = value;
110973  Py_XDECREF(tmp);
110974  return 0;
110975 }
110976 static PyObject *
110977 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
110978 {
110979  Py_INCREF(op->func_globals);
110980  return op->func_globals;
110981 }
110982 static PyObject *
110983 __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
110984 {
110985  Py_INCREF(Py_None);
110986  return Py_None;
110987 }
110988 static PyObject *
110989 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context)
110990 {
110991  PyObject* result = (op->func_code) ? op->func_code : Py_None;
110992  Py_INCREF(result);
110993  return result;
110994 }
110995 static int
110996 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
110997  int result = 0;
110998  PyObject *res = op->defaults_getter((PyObject *) op);
110999  if (unlikely(!res))
111000  return -1;
111001  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
111002  op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
111003  Py_INCREF(op->defaults_tuple);
111004  op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
111005  Py_INCREF(op->defaults_kwdict);
111006  #else
111007  op->defaults_tuple = PySequence_ITEM(res, 0);
111008  if (unlikely(!op->defaults_tuple)) result = -1;
111009  else {
111010  op->defaults_kwdict = PySequence_ITEM(res, 1);
111011  if (unlikely(!op->defaults_kwdict)) result = -1;
111012  }
111013  #endif
111014  Py_DECREF(res);
111015  return result;
111016 }
111017 static int
111018 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
111019  PyObject* tmp;
111020  if (!value) {
111021  value = Py_None;
111022  } else if (value != Py_None && !PyTuple_Check(value)) {
111023  PyErr_SetString(PyExc_TypeError,
111024  "__defaults__ must be set to a tuple object");
111025  return -1;
111026  }
111027  Py_INCREF(value);
111028  tmp = op->defaults_tuple;
111029  op->defaults_tuple = value;
111030  Py_XDECREF(tmp);
111031  return 0;
111032 }
111033 static PyObject *
111034 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
111035  PyObject* result = op->defaults_tuple;
111036  if (unlikely(!result)) {
111037  if (op->defaults_getter) {
111038  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
111039  result = op->defaults_tuple;
111040  } else {
111041  result = Py_None;
111042  }
111043  }
111044  Py_INCREF(result);
111045  return result;
111046 }
111047 static int
111048 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
111049  PyObject* tmp;
111050  if (!value) {
111051  value = Py_None;
111052  } else if (value != Py_None && !PyDict_Check(value)) {
111053  PyErr_SetString(PyExc_TypeError,
111054  "__kwdefaults__ must be set to a dict object");
111055  return -1;
111056  }
111057  Py_INCREF(value);
111058  tmp = op->defaults_kwdict;
111059  op->defaults_kwdict = value;
111060  Py_XDECREF(tmp);
111061  return 0;
111062 }
111063 static PyObject *
111064 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
111065  PyObject* result = op->defaults_kwdict;
111066  if (unlikely(!result)) {
111067  if (op->defaults_getter) {
111068  if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
111069  result = op->defaults_kwdict;
111070  } else {
111071  result = Py_None;
111072  }
111073  }
111074  Py_INCREF(result);
111075  return result;
111076 }
111077 static int
111078 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) {
111079  PyObject* tmp;
111080  if (!value || value == Py_None) {
111081  value = NULL;
111082  } else if (!PyDict_Check(value)) {
111083  PyErr_SetString(PyExc_TypeError,
111084  "__annotations__ must be set to a dict object");
111085  return -1;
111086  }
111087  Py_XINCREF(value);
111088  tmp = op->func_annotations;
111089  op->func_annotations = value;
111090  Py_XDECREF(tmp);
111091  return 0;
111092 }
111093 static PyObject *
111094 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) {
111095  PyObject* result = op->func_annotations;
111096  if (unlikely(!result)) {
111097  result = PyDict_New();
111098  if (unlikely(!result)) return NULL;
111099  op->func_annotations = result;
111100  }
111101  Py_INCREF(result);
111102  return result;
111103 }
111104 static PyGetSetDef __pyx_CyFunction_getsets[] = {
111105  {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
111106  {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
111107  {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
111108  {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
111109  {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
111110  {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
111111  {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
111112  {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
111113  {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
111114  {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
111115  {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
111116  {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
111117  {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
111118  {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
111119  {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
111120  {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
111121  {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
111122  {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
111123  {0, 0, 0, 0, 0}
111124 };
111125 static PyMemberDef __pyx_CyFunction_members[] = {
111126  {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
111127  {0, 0, 0, 0, 0}
111128 };
111129 static PyObject *
111130 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
111131 {
111132 #if PY_MAJOR_VERSION >= 3
111133  Py_INCREF(m->func_qualname);
111134  return m->func_qualname;
111135 #else
111136  return PyString_FromString(m->func.m_ml->ml_name);
111137 #endif
111138 }
111139 static PyMethodDef __pyx_CyFunction_methods[] = {
111140  {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
111141  {0, 0, 0, 0}
111142 };
111143 #if PY_VERSION_HEX < 0x030500A0
111144 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
111145 #else
111146 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
111147 #endif
111148 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
111149  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
111150  if (unlikely(op == NULL))
111151  return NULL;
111152  op->flags = flags;
111153  __Pyx_CyFunction_weakreflist(op) = NULL;
111154  op->func.m_ml = ml;
111155  op->func.m_self = (PyObject *) op;
111156  Py_XINCREF(closure);
111157  op->func_closure = closure;
111158  Py_XINCREF(module);
111159  op->func.m_module = module;
111160  op->func_dict = NULL;
111161  op->func_name = NULL;
111162  Py_INCREF(qualname);
111163  op->func_qualname = qualname;
111164  op->func_doc = NULL;
111165  op->func_classobj = NULL;
111166  op->func_globals = globals;
111167  Py_INCREF(op->func_globals);
111168  Py_XINCREF(code);
111169  op->func_code = code;
111170  op->defaults_pyobjects = 0;
111171  op->defaults_size = 0;
111172  op->defaults = NULL;
111173  op->defaults_tuple = NULL;
111174  op->defaults_kwdict = NULL;
111175  op->defaults_getter = NULL;
111176  op->func_annotations = NULL;
111177  return (PyObject *) op;
111178 }
111179 static int
111180 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
111181 {
111182  Py_CLEAR(m->func_closure);
111183  Py_CLEAR(m->func.m_module);
111184  Py_CLEAR(m->func_dict);
111185  Py_CLEAR(m->func_name);
111186  Py_CLEAR(m->func_qualname);
111187  Py_CLEAR(m->func_doc);
111188  Py_CLEAR(m->func_globals);
111189  Py_CLEAR(m->func_code);
111190  Py_CLEAR(m->func_classobj);
111191  Py_CLEAR(m->defaults_tuple);
111192  Py_CLEAR(m->defaults_kwdict);
111193  Py_CLEAR(m->func_annotations);
111194  if (m->defaults) {
111195  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
111196  int i;
111197  for (i = 0; i < m->defaults_pyobjects; i++)
111198  Py_XDECREF(pydefaults[i]);
111199  PyObject_Free(m->defaults);
111200  m->defaults = NULL;
111201  }
111202  return 0;
111203 }
111204 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
111205 {
111206  if (__Pyx_CyFunction_weakreflist(m) != NULL)
111207  PyObject_ClearWeakRefs((PyObject *) m);
111208  __Pyx_CyFunction_clear(m);
111209  PyObject_GC_Del(m);
111210 }
111211 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
111212 {
111213  PyObject_GC_UnTrack(m);
111214  __Pyx__CyFunction_dealloc(m);
111215 }
111216 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
111217 {
111218  Py_VISIT(m->func_closure);
111219  Py_VISIT(m->func.m_module);
111220  Py_VISIT(m->func_dict);
111221  Py_VISIT(m->func_name);
111222  Py_VISIT(m->func_qualname);
111223  Py_VISIT(m->func_doc);
111224  Py_VISIT(m->func_globals);
111225  Py_VISIT(m->func_code);
111226  Py_VISIT(m->func_classobj);
111227  Py_VISIT(m->defaults_tuple);
111228  Py_VISIT(m->defaults_kwdict);
111229  if (m->defaults) {
111230  PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
111231  int i;
111232  for (i = 0; i < m->defaults_pyobjects; i++)
111233  Py_VISIT(pydefaults[i]);
111234  }
111235  return 0;
111236 }
111237 static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
111238 {
111239 #if PY_MAJOR_VERSION < 3
111240  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
111241  if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
111242  Py_INCREF(func);
111243  return func;
111244  }
111245  if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
111246  if (type == NULL)
111247  type = (PyObject *)(Py_TYPE(obj));
111248  return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
111249  }
111250  if (obj == Py_None)
111251  obj = NULL;
111252 #endif
111253  return __Pyx_PyMethod_New(func, obj, type);
111254 }
111255 static PyObject*
111256 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
111257 {
111258 #if PY_MAJOR_VERSION >= 3
111259  return PyUnicode_FromFormat("<cyfunction %U at %p>",
111260  op->func_qualname, (void *)op);
111261 #else
111262  return PyString_FromFormat("<cyfunction %s at %p>",
111263  PyString_AsString(op->func_qualname), (void *)op);
111264 #endif
111265 }
111266 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
111267  PyCFunctionObject* f = (PyCFunctionObject*)func;
111268  PyCFunction meth = f->m_ml->ml_meth;
111269  Py_ssize_t size;
111270  switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
111271  case METH_VARARGS:
111272  if (likely(kw == NULL || PyDict_Size(kw) == 0))
111273  return (*meth)(self, arg);
111274  break;
111275  case METH_VARARGS | METH_KEYWORDS:
111276  return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
111277  case METH_NOARGS:
111278  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
111279  size = PyTuple_GET_SIZE(arg);
111280  if (likely(size == 0))
111281  return (*meth)(self, NULL);
111282  PyErr_Format(PyExc_TypeError,
111283  "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
111284  f->m_ml->ml_name, size);
111285  return NULL;
111286  }
111287  break;
111288  case METH_O:
111289  if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
111290  size = PyTuple_GET_SIZE(arg);
111291  if (likely(size == 1)) {
111292  PyObject *result, *arg0;
111293  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
111294  arg0 = PyTuple_GET_ITEM(arg, 0);
111295  #else
111296  arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
111297  #endif
111298  result = (*meth)(self, arg0);
111299  #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
111300  Py_DECREF(arg0);
111301  #endif
111302  return result;
111303  }
111304  PyErr_Format(PyExc_TypeError,
111305  "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
111306  f->m_ml->ml_name, size);
111307  return NULL;
111308  }
111309  break;
111310  default:
111311  PyErr_SetString(PyExc_SystemError, "Bad call flags in "
111312  "__Pyx_CyFunction_Call. METH_OLDARGS is no "
111313  "longer supported!");
111314  return NULL;
111315  }
111316  PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
111317  f->m_ml->ml_name);
111318  return NULL;
111319 }
111320 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
111321  return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
111322 }
111323 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
111324  PyObject *result;
111325  __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
111326  if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
111327  Py_ssize_t argc;
111328  PyObject *new_args;
111329  PyObject *self;
111330  argc = PyTuple_GET_SIZE(args);
111331  new_args = PyTuple_GetSlice(args, 1, argc);
111332  if (unlikely(!new_args))
111333  return NULL;
111334  self = PyTuple_GetItem(args, 0);
111335  if (unlikely(!self)) {
111336  Py_DECREF(new_args);
111337  PyErr_Format(PyExc_TypeError,
111338  "unbound method %.200S() needs an argument",
111339  cyfunc->func_qualname);
111340  return NULL;
111341  }
111342  result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
111343  Py_DECREF(new_args);
111344  } else {
111345  result = __Pyx_CyFunction_Call(func, args, kw);
111346  }
111347  return result;
111348 }
111349 static PyTypeObject __pyx_CyFunctionType_type = {
111350  PyVarObject_HEAD_INIT(0, 0)
111351  "cython_function_or_method",
111352  sizeof(__pyx_CyFunctionObject),
111353  0,
111354  (destructor) __Pyx_CyFunction_dealloc,
111355  0,
111356  0,
111357  0,
111358 #if PY_MAJOR_VERSION < 3
111359  0,
111360 #else
111361  0,
111362 #endif
111363  (reprfunc) __Pyx_CyFunction_repr,
111364  0,
111365  0,
111366  0,
111367  0,
111368  __Pyx_CyFunction_CallAsMethod,
111369  0,
111370  0,
111371  0,
111372  0,
111373  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
111374  0,
111375  (traverseproc) __Pyx_CyFunction_traverse,
111376  (inquiry) __Pyx_CyFunction_clear,
111377  0,
111378 #if PY_VERSION_HEX < 0x030500A0
111379  offsetof(__pyx_CyFunctionObject, func_weakreflist),
111380 #else
111381  offsetof(PyCFunctionObject, m_weakreflist),
111382 #endif
111383  0,
111384  0,
111385  __pyx_CyFunction_methods,
111386  __pyx_CyFunction_members,
111387  __pyx_CyFunction_getsets,
111388  0,
111389  0,
111390  __Pyx_CyFunction_descr_get,
111391  0,
111392  offsetof(__pyx_CyFunctionObject, func_dict),
111393  0,
111394  0,
111395  0,
111396  0,
111397  0,
111398  0,
111399  0,
111400  0,
111401  0,
111402  0,
111403  0,
111404  0,
111405 #if PY_VERSION_HEX >= 0x030400a1
111406  0,
111407 #endif
111408 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
111409  0,
111410 #endif
111411 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
111412  0,
111413 #endif
111414 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
111415  0,
111416 #endif
111417 };
111418 static int __pyx_CyFunction_init(void) {
111419  __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
111420  if (unlikely(__pyx_CyFunctionType == NULL)) {
111421  return -1;
111422  }
111423  return 0;
111424 }
111425 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
111426  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
111427  m->defaults = PyObject_Malloc(size);
111428  if (unlikely(!m->defaults))
111429  return PyErr_NoMemory();
111430  memset(m->defaults, 0, size);
111431  m->defaults_pyobjects = pyobjects;
111432  m->defaults_size = size;
111433  return m->defaults;
111434 }
111435 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
111436  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
111437  m->defaults_tuple = tuple;
111438  Py_INCREF(tuple);
111439 }
111440 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
111441  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
111442  m->defaults_kwdict = dict;
111443  Py_INCREF(dict);
111444 }
111445 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
111446  __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
111447  m->func_annotations = dict;
111448  Py_INCREF(dict);
111449 }
111450 
111451 /* CythonFunction */
111452  static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
111453  PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
111454  PyObject *op = __Pyx_CyFunction_Init(
111455  PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
111456  ml, flags, qualname, closure, module, globals, code
111457  );
111458  if (likely(op)) {
111459  PyObject_GC_Track(op);
111460  }
111461  return op;
111462 }
111463 
111464 /* GetTopmostException */
111465  #if CYTHON_USE_EXC_INFO_STACK
111466 static _PyErr_StackItem *
111467 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
111468 {
111469  _PyErr_StackItem *exc_info = tstate->exc_info;
111470  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
111471  exc_info->previous_item != NULL)
111472  {
111473  exc_info = exc_info->previous_item;
111474  }
111475  return exc_info;
111476 }
111477 #endif
111478 
111479 /* SaveResetException */
111480  #if CYTHON_FAST_THREAD_STATE
111481 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
111482  #if CYTHON_USE_EXC_INFO_STACK
111483  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
111484  *type = exc_info->exc_type;
111485  *value = exc_info->exc_value;
111486  *tb = exc_info->exc_traceback;
111487  #else
111488  *type = tstate->exc_type;
111489  *value = tstate->exc_value;
111490  *tb = tstate->exc_traceback;
111491  #endif
111492  Py_XINCREF(*type);
111493  Py_XINCREF(*value);
111494  Py_XINCREF(*tb);
111495 }
111496 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
111497  PyObject *tmp_type, *tmp_value, *tmp_tb;
111498  #if CYTHON_USE_EXC_INFO_STACK
111499  _PyErr_StackItem *exc_info = tstate->exc_info;
111500  tmp_type = exc_info->exc_type;
111501  tmp_value = exc_info->exc_value;
111502  tmp_tb = exc_info->exc_traceback;
111503  exc_info->exc_type = type;
111504  exc_info->exc_value = value;
111505  exc_info->exc_traceback = tb;
111506  #else
111507  tmp_type = tstate->exc_type;
111508  tmp_value = tstate->exc_value;
111509  tmp_tb = tstate->exc_traceback;
111510  tstate->exc_type = type;
111511  tstate->exc_value = value;
111512  tstate->exc_traceback = tb;
111513  #endif
111514  Py_XDECREF(tmp_type);
111515  Py_XDECREF(tmp_value);
111516  Py_XDECREF(tmp_tb);
111517 }
111518 #endif
111519 
111520 /* GetException */
111521  #if CYTHON_FAST_THREAD_STATE
111522 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
111523 #else
111524 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
111525 #endif
111526 {
111527  PyObject *local_type, *local_value, *local_tb;
111528 #if CYTHON_FAST_THREAD_STATE
111529  PyObject *tmp_type, *tmp_value, *tmp_tb;
111530  local_type = tstate->curexc_type;
111531  local_value = tstate->curexc_value;
111532  local_tb = tstate->curexc_traceback;
111533  tstate->curexc_type = 0;
111534  tstate->curexc_value = 0;
111535  tstate->curexc_traceback = 0;
111536 #else
111537  PyErr_Fetch(&local_type, &local_value, &local_tb);
111538 #endif
111539  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
111540 #if CYTHON_FAST_THREAD_STATE
111541  if (unlikely(tstate->curexc_type))
111542 #else
111543  if (unlikely(PyErr_Occurred()))
111544 #endif
111545  goto bad;
111546  #if PY_MAJOR_VERSION >= 3
111547  if (local_tb) {
111548  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
111549  goto bad;
111550  }
111551  #endif
111552  Py_XINCREF(local_tb);
111553  Py_XINCREF(local_type);
111554  Py_XINCREF(local_value);
111555  *type = local_type;
111556  *value = local_value;
111557  *tb = local_tb;
111558 #if CYTHON_FAST_THREAD_STATE
111559  #if CYTHON_USE_EXC_INFO_STACK
111560  {
111561  _PyErr_StackItem *exc_info = tstate->exc_info;
111562  tmp_type = exc_info->exc_type;
111563  tmp_value = exc_info->exc_value;
111564  tmp_tb = exc_info->exc_traceback;
111565  exc_info->exc_type = local_type;
111566  exc_info->exc_value = local_value;
111567  exc_info->exc_traceback = local_tb;
111568  }
111569  #else
111570  tmp_type = tstate->exc_type;
111571  tmp_value = tstate->exc_value;
111572  tmp_tb = tstate->exc_traceback;
111573  tstate->exc_type = local_type;
111574  tstate->exc_value = local_value;
111575  tstate->exc_traceback = local_tb;
111576  #endif
111577  Py_XDECREF(tmp_type);
111578  Py_XDECREF(tmp_value);
111579  Py_XDECREF(tmp_tb);
111580 #else
111581  PyErr_SetExcInfo(local_type, local_value, local_tb);
111582 #endif
111583  return 0;
111584 bad:
111585  *type = 0;
111586  *value = 0;
111587  *tb = 0;
111588  Py_XDECREF(local_type);
111589  Py_XDECREF(local_value);
111590  Py_XDECREF(local_tb);
111591  return -1;
111592 }
111593 
111594 /* GetAttr */
111595  static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
111596 #if CYTHON_USE_TYPE_SLOTS
111597 #if PY_MAJOR_VERSION >= 3
111598  if (likely(PyUnicode_Check(n)))
111599 #else
111600  if (likely(PyString_Check(n)))
111601 #endif
111602  return __Pyx_PyObject_GetAttrStr(o, n);
111603 #endif
111604  return PyObject_GetAttr(o, n);
111605 }
111606 
111607 /* PyObjectSetAttrStr */
111608  #if CYTHON_USE_TYPE_SLOTS
111609 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
111610  PyTypeObject* tp = Py_TYPE(obj);
111611  if (likely(tp->tp_setattro))
111612  return tp->tp_setattro(obj, attr_name, value);
111613 #if PY_MAJOR_VERSION < 3
111614  if (likely(tp->tp_setattr))
111615  return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
111616 #endif
111617  return PyObject_SetAttr(obj, attr_name, value);
111618 }
111619 #endif
111620 
111621 /* SetItemInt */
111622  static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
111623  int r;
111624  if (!j) return -1;
111625  r = PyObject_SetItem(o, j, v);
111626  Py_DECREF(j);
111627  return r;
111628 }
111629 static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
111630  CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
111631 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
111632  if (is_list || PyList_CheckExact(o)) {
111633  Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
111634  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
111635  PyObject* old = PyList_GET_ITEM(o, n);
111636  Py_INCREF(v);
111637  PyList_SET_ITEM(o, n, v);
111638  Py_DECREF(old);
111639  return 1;
111640  }
111641  } else {
111642  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
111643  if (likely(m && m->sq_ass_item)) {
111644  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
111645  Py_ssize_t l = m->sq_length(o);
111646  if (likely(l >= 0)) {
111647  i += l;
111648  } else {
111649  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
111650  return -1;
111651  PyErr_Clear();
111652  }
111653  }
111654  return m->sq_ass_item(o, i, v);
111655  }
111656  }
111657 #else
111658 #if CYTHON_COMPILING_IN_PYPY
111659  if (is_list || (PySequence_Check(o) && !PyDict_Check(o)))
111660 #else
111661  if (is_list || PySequence_Check(o))
111662 #endif
111663  {
111664  return PySequence_SetItem(o, i, v);
111665  }
111666 #endif
111667  return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
111668 }
111669 
111670 /* RaiseException */
111671  #if PY_MAJOR_VERSION < 3
111672 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
111673  CYTHON_UNUSED PyObject *cause) {
111674  __Pyx_PyThreadState_declare
111675  Py_XINCREF(type);
111676  if (!value || value == Py_None)
111677  value = NULL;
111678  else
111679  Py_INCREF(value);
111680  if (!tb || tb == Py_None)
111681  tb = NULL;
111682  else {
111683  Py_INCREF(tb);
111684  if (!PyTraceBack_Check(tb)) {
111685  PyErr_SetString(PyExc_TypeError,
111686  "raise: arg 3 must be a traceback or None");
111687  goto raise_error;
111688  }
111689  }
111690  if (PyType_Check(type)) {
111691 #if CYTHON_COMPILING_IN_PYPY
111692  if (!value) {
111693  Py_INCREF(Py_None);
111694  value = Py_None;
111695  }
111696 #endif
111697  PyErr_NormalizeException(&type, &value, &tb);
111698  } else {
111699  if (value) {
111700  PyErr_SetString(PyExc_TypeError,
111701  "instance exception may not have a separate value");
111702  goto raise_error;
111703  }
111704  value = type;
111705  type = (PyObject*) Py_TYPE(type);
111706  Py_INCREF(type);
111707  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
111708  PyErr_SetString(PyExc_TypeError,
111709  "raise: exception class must be a subclass of BaseException");
111710  goto raise_error;
111711  }
111712  }
111713  __Pyx_PyThreadState_assign
111714  __Pyx_ErrRestore(type, value, tb);
111715  return;
111716 raise_error:
111717  Py_XDECREF(value);
111718  Py_XDECREF(type);
111719  Py_XDECREF(tb);
111720  return;
111721 }
111722 #else
111723 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
111724  PyObject* owned_instance = NULL;
111725  if (tb == Py_None) {
111726  tb = 0;
111727  } else if (tb && !PyTraceBack_Check(tb)) {
111728  PyErr_SetString(PyExc_TypeError,
111729  "raise: arg 3 must be a traceback or None");
111730  goto bad;
111731  }
111732  if (value == Py_None)
111733  value = 0;
111734  if (PyExceptionInstance_Check(type)) {
111735  if (value) {
111736  PyErr_SetString(PyExc_TypeError,
111737  "instance exception may not have a separate value");
111738  goto bad;
111739  }
111740  value = type;
111741  type = (PyObject*) Py_TYPE(value);
111742  } else if (PyExceptionClass_Check(type)) {
111743  PyObject *instance_class = NULL;
111744  if (value && PyExceptionInstance_Check(value)) {
111745  instance_class = (PyObject*) Py_TYPE(value);
111746  if (instance_class != type) {
111747  int is_subclass = PyObject_IsSubclass(instance_class, type);
111748  if (!is_subclass) {
111749  instance_class = NULL;
111750  } else if (unlikely(is_subclass == -1)) {
111751  goto bad;
111752  } else {
111753  type = instance_class;
111754  }
111755  }
111756  }
111757  if (!instance_class) {
111758  PyObject *args;
111759  if (!value)
111760  args = PyTuple_New(0);
111761  else if (PyTuple_Check(value)) {
111762  Py_INCREF(value);
111763  args = value;
111764  } else
111765  args = PyTuple_Pack(1, value);
111766  if (!args)
111767  goto bad;
111768  owned_instance = PyObject_Call(type, args, NULL);
111769  Py_DECREF(args);
111770  if (!owned_instance)
111771  goto bad;
111772  value = owned_instance;
111773  if (!PyExceptionInstance_Check(value)) {
111774  PyErr_Format(PyExc_TypeError,
111775  "calling %R should have returned an instance of "
111776  "BaseException, not %R",
111777  type, Py_TYPE(value));
111778  goto bad;
111779  }
111780  }
111781  } else {
111782  PyErr_SetString(PyExc_TypeError,
111783  "raise: exception class must be a subclass of BaseException");
111784  goto bad;
111785  }
111786  if (cause) {
111787  PyObject *fixed_cause;
111788  if (cause == Py_None) {
111789  fixed_cause = NULL;
111790  } else if (PyExceptionClass_Check(cause)) {
111791  fixed_cause = PyObject_CallObject(cause, NULL);
111792  if (fixed_cause == NULL)
111793  goto bad;
111794  } else if (PyExceptionInstance_Check(cause)) {
111795  fixed_cause = cause;
111796  Py_INCREF(fixed_cause);
111797  } else {
111798  PyErr_SetString(PyExc_TypeError,
111799  "exception causes must derive from "
111800  "BaseException");
111801  goto bad;
111802  }
111803  PyException_SetCause(value, fixed_cause);
111804  }
111805  PyErr_SetObject(type, value);
111806  if (tb) {
111807 #if CYTHON_COMPILING_IN_PYPY
111808  PyObject *tmp_type, *tmp_value, *tmp_tb;
111809  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
111810  Py_INCREF(tb);
111811  PyErr_Restore(tmp_type, tmp_value, tb);
111812  Py_XDECREF(tmp_tb);
111813 #else
111814  PyThreadState *tstate = __Pyx_PyThreadState_Current;
111815  PyObject* tmp_tb = tstate->curexc_traceback;
111816  if (tb != tmp_tb) {
111817  Py_INCREF(tb);
111818  tstate->curexc_traceback = tb;
111819  Py_XDECREF(tmp_tb);
111820  }
111821 #endif
111822  }
111823 bad:
111824  Py_XDECREF(owned_instance);
111825  return;
111826 }
111827 #endif
111828 
111829 /* Import */
111830  static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
111831  PyObject *empty_list = 0;
111832  PyObject *module = 0;
111833  PyObject *global_dict = 0;
111834  PyObject *empty_dict = 0;
111835  PyObject *list;
111836  #if PY_MAJOR_VERSION < 3
111837  PyObject *py_import;
111838  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
111839  if (!py_import)
111840  goto bad;
111841  #endif
111842  if (from_list)
111843  list = from_list;
111844  else {
111845  empty_list = PyList_New(0);
111846  if (!empty_list)
111847  goto bad;
111848  list = empty_list;
111849  }
111850  global_dict = PyModule_GetDict(__pyx_m);
111851  if (!global_dict)
111852  goto bad;
111853  empty_dict = PyDict_New();
111854  if (!empty_dict)
111855  goto bad;
111856  {
111857  #if PY_MAJOR_VERSION >= 3
111858  if (level == -1) {
111859  if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
111860  module = PyImport_ImportModuleLevelObject(
111861  name, global_dict, empty_dict, list, 1);
111862  if (!module) {
111863  if (!PyErr_ExceptionMatches(PyExc_ImportError))
111864  goto bad;
111865  PyErr_Clear();
111866  }
111867  }
111868  level = 0;
111869  }
111870  #endif
111871  if (!module) {
111872  #if PY_MAJOR_VERSION < 3
111873  PyObject *py_level = PyInt_FromLong(level);
111874  if (!py_level)
111875  goto bad;
111876  module = PyObject_CallFunctionObjArgs(py_import,
111877  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
111878  Py_DECREF(py_level);
111879  #else
111880  module = PyImport_ImportModuleLevelObject(
111881  name, global_dict, empty_dict, list, level);
111882  #endif
111883  }
111884  }
111885 bad:
111886  #if PY_MAJOR_VERSION < 3
111887  Py_XDECREF(py_import);
111888  #endif
111889  Py_XDECREF(empty_list);
111890  Py_XDECREF(empty_dict);
111891  return module;
111892 }
111893 
111894 /* BytesEquals */
111895  static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
111896 #if CYTHON_COMPILING_IN_PYPY
111897  return PyObject_RichCompareBool(s1, s2, equals);
111898 #else
111899  if (s1 == s2) {
111900  return (equals == Py_EQ);
111901  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
111902  const char *ps1, *ps2;
111903  Py_ssize_t length = PyBytes_GET_SIZE(s1);
111904  if (length != PyBytes_GET_SIZE(s2))
111905  return (equals == Py_NE);
111906  ps1 = PyBytes_AS_STRING(s1);
111907  ps2 = PyBytes_AS_STRING(s2);
111908  if (ps1[0] != ps2[0]) {
111909  return (equals == Py_NE);
111910  } else if (length == 1) {
111911  return (equals == Py_EQ);
111912  } else {
111913  int result;
111914 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
111915  Py_hash_t hash1, hash2;
111916  hash1 = ((PyBytesObject*)s1)->ob_shash;
111917  hash2 = ((PyBytesObject*)s2)->ob_shash;
111918  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
111919  return (equals == Py_NE);
111920  }
111921 #endif
111922  result = memcmp(ps1, ps2, (size_t)length);
111923  return (equals == Py_EQ) ? (result == 0) : (result != 0);
111924  }
111925  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
111926  return (equals == Py_NE);
111927  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
111928  return (equals == Py_NE);
111929  } else {
111930  int result;
111931  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
111932  if (!py_result)
111933  return -1;
111934  result = __Pyx_PyObject_IsTrue(py_result);
111935  Py_DECREF(py_result);
111936  return result;
111937  }
111938 #endif
111939 }
111940 
111941 /* UnicodeEquals */
111942  static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
111943 #if CYTHON_COMPILING_IN_PYPY
111944  return PyObject_RichCompareBool(s1, s2, equals);
111945 #else
111946 #if PY_MAJOR_VERSION < 3
111947  PyObject* owned_ref = NULL;
111948 #endif
111949  int s1_is_unicode, s2_is_unicode;
111950  if (s1 == s2) {
111951  goto return_eq;
111952  }
111953  s1_is_unicode = PyUnicode_CheckExact(s1);
111954  s2_is_unicode = PyUnicode_CheckExact(s2);
111955 #if PY_MAJOR_VERSION < 3
111956  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
111957  owned_ref = PyUnicode_FromObject(s2);
111958  if (unlikely(!owned_ref))
111959  return -1;
111960  s2 = owned_ref;
111961  s2_is_unicode = 1;
111962  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
111963  owned_ref = PyUnicode_FromObject(s1);
111964  if (unlikely(!owned_ref))
111965  return -1;
111966  s1 = owned_ref;
111967  s1_is_unicode = 1;
111968  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
111969  return __Pyx_PyBytes_Equals(s1, s2, equals);
111970  }
111971 #endif
111972  if (s1_is_unicode & s2_is_unicode) {
111973  Py_ssize_t length;
111974  int kind;
111975  void *data1, *data2;
111976  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
111977  return -1;
111978  length = __Pyx_PyUnicode_GET_LENGTH(s1);
111979  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
111980  goto return_ne;
111981  }
111982 #if CYTHON_USE_UNICODE_INTERNALS
111983  {
111984  Py_hash_t hash1, hash2;
111985  #if CYTHON_PEP393_ENABLED
111986  hash1 = ((PyASCIIObject*)s1)->hash;
111987  hash2 = ((PyASCIIObject*)s2)->hash;
111988  #else
111989  hash1 = ((PyUnicodeObject*)s1)->hash;
111990  hash2 = ((PyUnicodeObject*)s2)->hash;
111991  #endif
111992  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
111993  goto return_ne;
111994  }
111995  }
111996 #endif
111997  kind = __Pyx_PyUnicode_KIND(s1);
111998  if (kind != __Pyx_PyUnicode_KIND(s2)) {
111999  goto return_ne;
112000  }
112001  data1 = __Pyx_PyUnicode_DATA(s1);
112002  data2 = __Pyx_PyUnicode_DATA(s2);
112003  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
112004  goto return_ne;
112005  } else if (length == 1) {
112006  goto return_eq;
112007  } else {
112008  int result = memcmp(data1, data2, (size_t)(length * kind));
112009  #if PY_MAJOR_VERSION < 3
112010  Py_XDECREF(owned_ref);
112011  #endif
112012  return (equals == Py_EQ) ? (result == 0) : (result != 0);
112013  }
112014  } else if ((s1 == Py_None) & s2_is_unicode) {
112015  goto return_ne;
112016  } else if ((s2 == Py_None) & s1_is_unicode) {
112017  goto return_ne;
112018  } else {
112019  int result;
112020  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
112021  #if PY_MAJOR_VERSION < 3
112022  Py_XDECREF(owned_ref);
112023  #endif
112024  if (!py_result)
112025  return -1;
112026  result = __Pyx_PyObject_IsTrue(py_result);
112027  Py_DECREF(py_result);
112028  return result;
112029  }
112030 return_eq:
112031  #if PY_MAJOR_VERSION < 3
112032  Py_XDECREF(owned_ref);
112033  #endif
112034  return (equals == Py_EQ);
112035 return_ne:
112036  #if PY_MAJOR_VERSION < 3
112037  Py_XDECREF(owned_ref);
112038  #endif
112039  return (equals == Py_NE);
112040 #endif
112041 }
112042 
112043 /* DictGetItem */
112044  #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
112045 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
112046  PyObject *value;
112047  value = PyDict_GetItemWithError(d, key);
112048  if (unlikely(!value)) {
112049  if (!PyErr_Occurred()) {
112050  if (unlikely(PyTuple_Check(key))) {
112051  PyObject* args = PyTuple_Pack(1, key);
112052  if (likely(args)) {
112053  PyErr_SetObject(PyExc_KeyError, args);
112054  Py_DECREF(args);
112055  }
112056  } else {
112057  PyErr_SetObject(PyExc_KeyError, key);
112058  }
112059  }
112060  return NULL;
112061  }
112062  Py_INCREF(value);
112063  return value;
112064 }
112065 #endif
112066 
112067 /* set_iter */
112068  static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set,
112069  Py_ssize_t* p_orig_length, int* p_source_is_set) {
112070 #if CYTHON_COMPILING_IN_CPYTHON
112071  is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable));
112072  *p_source_is_set = is_set;
112073  if (likely(is_set)) {
112074  *p_orig_length = PySet_Size(iterable);
112075  Py_INCREF(iterable);
112076  return iterable;
112077  }
112078 #else
112079  (void)is_set;
112080  *p_source_is_set = 0;
112081 #endif
112082  *p_orig_length = 0;
112083  return PyObject_GetIter(iterable);
112084 }
112085 static CYTHON_INLINE int __Pyx_set_iter_next(
112086  PyObject* iter_obj, Py_ssize_t orig_length,
112087  Py_ssize_t* ppos, PyObject **value,
112088  int source_is_set) {
112089  if (!CYTHON_COMPILING_IN_CPYTHON || unlikely(!source_is_set)) {
112090  *value = PyIter_Next(iter_obj);
112091  if (unlikely(!*value)) {
112092  return __Pyx_IterFinish();
112093  }
112094  (void)orig_length;
112095  (void)ppos;
112096  return 1;
112097  }
112098 #if CYTHON_COMPILING_IN_CPYTHON
112099  if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) {
112100  PyErr_SetString(
112101  PyExc_RuntimeError,
112102  "set changed size during iteration");
112103  return -1;
112104  }
112105  {
112106  Py_hash_t hash;
112107  int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash);
112108  assert (ret != -1);
112109  if (likely(ret)) {
112110  Py_INCREF(*value);
112111  return 1;
112112  }
112113  }
112114 #endif
112115  return 0;
112116 }
112117 
112118 /* WriteUnraisableException */
112119  static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
112120  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
112121  int full_traceback, CYTHON_UNUSED int nogil) {
112122  PyObject *old_exc, *old_val, *old_tb;
112123  PyObject *ctx;
112124  __Pyx_PyThreadState_declare
112125 #ifdef WITH_THREAD
112126  PyGILState_STATE state;
112127  if (nogil)
112128  state = PyGILState_Ensure();
112129 #ifdef _MSC_VER
112130  else state = (PyGILState_STATE)-1;
112131 #endif
112132 #endif
112133  __Pyx_PyThreadState_assign
112134  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
112135  if (full_traceback) {
112136  Py_XINCREF(old_exc);
112137  Py_XINCREF(old_val);
112138  Py_XINCREF(old_tb);
112139  __Pyx_ErrRestore(old_exc, old_val, old_tb);
112140  PyErr_PrintEx(1);
112141  }
112142  #if PY_MAJOR_VERSION < 3
112143  ctx = PyString_FromString(name);
112144  #else
112145  ctx = PyUnicode_FromString(name);
112146  #endif
112147  __Pyx_ErrRestore(old_exc, old_val, old_tb);
112148  if (!ctx) {
112149  PyErr_WriteUnraisable(Py_None);
112150  } else {
112151  PyErr_WriteUnraisable(ctx);
112152  Py_DECREF(ctx);
112153  }
112154 #ifdef WITH_THREAD
112155  if (nogil)
112156  PyGILState_Release(state);
112157 #endif
112158 }
112159 
112160 /* KeywordStringCheck */
112161  static int __Pyx_CheckKeywordStrings(
112162  PyObject *kwdict,
112163  const char* function_name,
112164  int kw_allowed)
112165 {
112166  PyObject* key = 0;
112167  Py_ssize_t pos = 0;
112168 #if CYTHON_COMPILING_IN_PYPY
112169  if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
112170  goto invalid_keyword;
112171  return 1;
112172 #else
112173  while (PyDict_Next(kwdict, &pos, &key, 0)) {
112174  #if PY_MAJOR_VERSION < 3
112175  if (unlikely(!PyString_Check(key)))
112176  #endif
112177  if (unlikely(!PyUnicode_Check(key)))
112178  goto invalid_keyword_type;
112179  }
112180  if ((!kw_allowed) && unlikely(key))
112181  goto invalid_keyword;
112182  return 1;
112183 invalid_keyword_type:
112184  PyErr_Format(PyExc_TypeError,
112185  "%.200s() keywords must be strings", function_name);
112186  return 0;
112187 #endif
112188 invalid_keyword:
112189  PyErr_Format(PyExc_TypeError,
112190  #if PY_MAJOR_VERSION < 3
112191  "%.200s() got an unexpected keyword argument '%.200s'",
112192  function_name, PyString_AsString(key));
112193  #else
112194  "%s() got an unexpected keyword argument '%U'",
112195  function_name, key);
112196  #endif
112197  return 0;
112198 }
112199 
112200 /* PyErrExceptionMatches */
112201  #if CYTHON_FAST_THREAD_STATE
112202 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
112203  Py_ssize_t i, n;
112204  n = PyTuple_GET_SIZE(tuple);
112205 #if PY_MAJOR_VERSION >= 3
112206  for (i=0; i<n; i++) {
112207  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
112208  }
112209 #endif
112210  for (i=0; i<n; i++) {
112211  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
112212  }
112213  return 0;
112214 }
112215 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
112216  PyObject *exc_type = tstate->curexc_type;
112217  if (exc_type == err) return 1;
112218  if (unlikely(!exc_type)) return 0;
112219  if (unlikely(PyTuple_Check(err)))
112220  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
112221  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
112222 }
112223 #endif
112224 
112225 /* DivInt[Py_ssize_t] */
112226  static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
112227  Py_ssize_t q = a / b;
112228  Py_ssize_t r = a - q*b;
112229  q -= ((r != 0) & ((r ^ b) < 0));
112230  return q;
112231 }
112232 
112233 /* decode_c_string */
112234  static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
112235  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
112236  const char* encoding, const char* errors,
112237  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
112238  Py_ssize_t length;
112239  if (unlikely((start < 0) | (stop < 0))) {
112240  size_t slen = strlen(cstring);
112241  if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
112242  PyErr_SetString(PyExc_OverflowError,
112243  "c-string too long to convert to Python");
112244  return NULL;
112245  }
112246  length = (Py_ssize_t) slen;
112247  if (start < 0) {
112248  start += length;
112249  if (start < 0)
112250  start = 0;
112251  }
112252  if (stop < 0)
112253  stop += length;
112254  }
112255  if (unlikely(stop <= start))
112256  return __Pyx_NewRef(__pyx_empty_unicode);
112257  length = stop - start;
112258  cstring += start;
112259  if (decode_func) {
112260  return decode_func(cstring, length, errors);
112261  } else {
112262  return PyUnicode_Decode(cstring, length, encoding, errors);
112263  }
112264 }
112265 
112266 /* GetAttr3 */
112267  static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
112268  __Pyx_PyThreadState_declare
112269  __Pyx_PyThreadState_assign
112270  if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
112271  return NULL;
112272  __Pyx_PyErr_Clear();
112273  Py_INCREF(d);
112274  return d;
112275 }
112276 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
112277  PyObject *r = __Pyx_GetAttr(o, n);
112278  return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
112279 }
112280 
112281 /* RaiseNoneIterError */
112282  static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
112283  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
112284 }
112285 
112286 /* SwapException */
112287  #if CYTHON_FAST_THREAD_STATE
112288 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
112289  PyObject *tmp_type, *tmp_value, *tmp_tb;
112290  #if CYTHON_USE_EXC_INFO_STACK
112291  _PyErr_StackItem *exc_info = tstate->exc_info;
112292  tmp_type = exc_info->exc_type;
112293  tmp_value = exc_info->exc_value;
112294  tmp_tb = exc_info->exc_traceback;
112295  exc_info->exc_type = *type;
112296  exc_info->exc_value = *value;
112297  exc_info->exc_traceback = *tb;
112298  #else
112299  tmp_type = tstate->exc_type;
112300  tmp_value = tstate->exc_value;
112301  tmp_tb = tstate->exc_traceback;
112302  tstate->exc_type = *type;
112303  tstate->exc_value = *value;
112304  tstate->exc_traceback = *tb;
112305  #endif
112306  *type = tmp_type;
112307  *value = tmp_value;
112308  *tb = tmp_tb;
112309 }
112310 #else
112311 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
112312  PyObject *tmp_type, *tmp_value, *tmp_tb;
112313  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
112314  PyErr_SetExcInfo(*type, *value, *tb);
112315  *type = tmp_type;
112316  *value = tmp_value;
112317  *tb = tmp_tb;
112318 }
112319 #endif
112320 
112321 /* FastTypeChecks */
112322  #if CYTHON_COMPILING_IN_CPYTHON
112323 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
112324  while (a) {
112325  a = a->tp_base;
112326  if (a == b)
112327  return 1;
112328  }
112329  return b == &PyBaseObject_Type;
112330 }
112331 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
112332  PyObject *mro;
112333  if (a == b) return 1;
112334  mro = a->tp_mro;
112335  if (likely(mro)) {
112336  Py_ssize_t i, n;
112337  n = PyTuple_GET_SIZE(mro);
112338  for (i = 0; i < n; i++) {
112339  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
112340  return 1;
112341  }
112342  return 0;
112343  }
112344  return __Pyx_InBases(a, b);
112345 }
112346 #if PY_MAJOR_VERSION == 2
112347 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
112348  PyObject *exception, *value, *tb;
112349  int res;
112350  __Pyx_PyThreadState_declare
112351  __Pyx_PyThreadState_assign
112352  __Pyx_ErrFetch(&exception, &value, &tb);
112353  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
112354  if (unlikely(res == -1)) {
112355  PyErr_WriteUnraisable(err);
112356  res = 0;
112357  }
112358  if (!res) {
112359  res = PyObject_IsSubclass(err, exc_type2);
112360  if (unlikely(res == -1)) {
112361  PyErr_WriteUnraisable(err);
112362  res = 0;
112363  }
112364  }
112365  __Pyx_ErrRestore(exception, value, tb);
112366  return res;
112367 }
112368 #else
112369 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
112370  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
112371  if (!res) {
112372  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
112373  }
112374  return res;
112375 }
112376 #endif
112377 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
112378  Py_ssize_t i, n;
112379  assert(PyExceptionClass_Check(exc_type));
112380  n = PyTuple_GET_SIZE(tuple);
112381 #if PY_MAJOR_VERSION >= 3
112382  for (i=0; i<n; i++) {
112383  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
112384  }
112385 #endif
112386  for (i=0; i<n; i++) {
112387  PyObject *t = PyTuple_GET_ITEM(tuple, i);
112388  #if PY_MAJOR_VERSION < 3
112389  if (likely(exc_type == t)) return 1;
112390  #endif
112391  if (likely(PyExceptionClass_Check(t))) {
112392  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
112393  } else {
112394  }
112395  }
112396  return 0;
112397 }
112398 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
112399  if (likely(err == exc_type)) return 1;
112400  if (likely(PyExceptionClass_Check(err))) {
112401  if (likely(PyExceptionClass_Check(exc_type))) {
112402  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
112403  } else if (likely(PyTuple_Check(exc_type))) {
112404  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
112405  } else {
112406  }
112407  }
112408  return PyErr_GivenExceptionMatches(err, exc_type);
112409 }
112410 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
112411  assert(PyExceptionClass_Check(exc_type1));
112412  assert(PyExceptionClass_Check(exc_type2));
112413  if (likely(err == exc_type1 || err == exc_type2)) return 1;
112414  if (likely(PyExceptionClass_Check(err))) {
112415  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
112416  }
112417  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
112418 }
112419 #endif
112420 
112421 /* DivInt[long] */
112422  static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
112423  long q = a / b;
112424  long r = a - q*b;
112425  q -= ((r != 0) & ((r ^ b) < 0));
112426  return q;
112427 }
112428 
112429 /* ImportFrom */
112430  static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
112431  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
112432  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
112433  PyErr_Format(PyExc_ImportError,
112434  #if PY_MAJOR_VERSION < 3
112435  "cannot import name %.230s", PyString_AS_STRING(name));
112436  #else
112437  "cannot import name %S", name);
112438  #endif
112439  }
112440  return value;
112441 }
112442 
112443 /* HasAttr */
112444  static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
112445  PyObject *r;
112446  if (unlikely(!__Pyx_PyBaseString_Check(n))) {
112447  PyErr_SetString(PyExc_TypeError,
112448  "hasattr(): attribute name must be string");
112449  return -1;
112450  }
112451  r = __Pyx_GetAttr(o, n);
112452  if (unlikely(!r)) {
112453  PyErr_Clear();
112454  return 0;
112455  } else {
112456  Py_DECREF(r);
112457  return 1;
112458  }
112459 }
112460 
112461 /* PyObject_GenericGetAttrNoDict */
112462  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
112463 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
112464  PyErr_Format(PyExc_AttributeError,
112465 #if PY_MAJOR_VERSION >= 3
112466  "'%.50s' object has no attribute '%U'",
112467  tp->tp_name, attr_name);
112468 #else
112469  "'%.50s' object has no attribute '%.400s'",
112470  tp->tp_name, PyString_AS_STRING(attr_name));
112471 #endif
112472  return NULL;
112473 }
112474 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
112475  PyObject *descr;
112476  PyTypeObject *tp = Py_TYPE(obj);
112477  if (unlikely(!PyString_Check(attr_name))) {
112478  return PyObject_GenericGetAttr(obj, attr_name);
112479  }
112480  assert(!tp->tp_dictoffset);
112481  descr = _PyType_Lookup(tp, attr_name);
112482  if (unlikely(!descr)) {
112483  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
112484  }
112485  Py_INCREF(descr);
112486  #if PY_MAJOR_VERSION < 3
112487  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
112488  #endif
112489  {
112490  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
112491  if (unlikely(f)) {
112492  PyObject *res = f(descr, obj, (PyObject *)tp);
112493  Py_DECREF(descr);
112494  return res;
112495  }
112496  }
112497  return descr;
112498 }
112499 #endif
112500 
112501 /* PyObject_GenericGetAttr */
112502  #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
112503 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
112504  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
112505  return PyObject_GenericGetAttr(obj, attr_name);
112506  }
112507  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
112508 }
112509 #endif
112510 
112511 /* SetVTable */
112512  static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
112513 #if PY_VERSION_HEX >= 0x02070000
112514  PyObject *ob = PyCapsule_New(vtable, 0, 0);
112515 #else
112516  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
112517 #endif
112518  if (!ob)
112519  goto bad;
112520  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
112521  goto bad;
112522  Py_DECREF(ob);
112523  return 0;
112524 bad:
112525  Py_XDECREF(ob);
112526  return -1;
112527 }
112528 
112529 /* PyObjectGetAttrStrNoError */
112530  static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
112531  __Pyx_PyThreadState_declare
112532  __Pyx_PyThreadState_assign
112533  if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
112534  __Pyx_PyErr_Clear();
112535 }
112536 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
112537  PyObject *result;
112538 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
112539  PyTypeObject* tp = Py_TYPE(obj);
112540  if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
112541  return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
112542  }
112543 #endif
112544  result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
112545  if (unlikely(!result)) {
112546  __Pyx_PyObject_GetAttrStr_ClearAttributeError();
112547  }
112548  return result;
112549 }
112550 
112551 /* SetupReduce */
112552  static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
112553  int ret;
112554  PyObject *name_attr;
112555  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
112556  if (likely(name_attr)) {
112557  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
112558  } else {
112559  ret = -1;
112560  }
112561  if (unlikely(ret < 0)) {
112562  PyErr_Clear();
112563  ret = 0;
112564  }
112565  Py_XDECREF(name_attr);
112566  return ret;
112567 }
112568 static int __Pyx_setup_reduce(PyObject* type_obj) {
112569  int ret = 0;
112570  PyObject *object_reduce = NULL;
112571  PyObject *object_getstate = NULL;
112572  PyObject *object_reduce_ex = NULL;
112573  PyObject *reduce = NULL;
112574  PyObject *reduce_ex = NULL;
112575  PyObject *reduce_cython = NULL;
112576  PyObject *setstate = NULL;
112577  PyObject *setstate_cython = NULL;
112578  PyObject *getstate = NULL;
112579 #if CYTHON_USE_PYTYPE_LOOKUP
112580  getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
112581 #else
112582  getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
112583  if (!getstate && PyErr_Occurred()) {
112584  goto __PYX_BAD;
112585  }
112586 #endif
112587  if (getstate) {
112588 #if CYTHON_USE_PYTYPE_LOOKUP
112589  object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
112590 #else
112591  object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
112592  if (!object_getstate && PyErr_Occurred()) {
112593  goto __PYX_BAD;
112594  }
112595 #endif
112596  if (object_getstate != getstate) {
112597  goto __PYX_GOOD;
112598  }
112599  }
112600 #if CYTHON_USE_PYTYPE_LOOKUP
112601  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
112602 #else
112603  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
112604 #endif
112605  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
112606  if (reduce_ex == object_reduce_ex) {
112607 #if CYTHON_USE_PYTYPE_LOOKUP
112608  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
112609 #else
112610  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
112611 #endif
112612  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
112613  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
112614  reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
112615  if (likely(reduce_cython)) {
112616  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
112617  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
112618  } else if (reduce == object_reduce || PyErr_Occurred()) {
112619  goto __PYX_BAD;
112620  }
112621  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
112622  if (!setstate) PyErr_Clear();
112623  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
112624  setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
112625  if (likely(setstate_cython)) {
112626  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
112627  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
112628  } else if (!setstate || PyErr_Occurred()) {
112629  goto __PYX_BAD;
112630  }
112631  }
112632  PyType_Modified((PyTypeObject*)type_obj);
112633  }
112634  }
112635  goto __PYX_GOOD;
112636 __PYX_BAD:
112637  if (!PyErr_Occurred())
112638  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
112639  ret = -1;
112640 __PYX_GOOD:
112641 #if !CYTHON_USE_PYTYPE_LOOKUP
112642  Py_XDECREF(object_reduce);
112643  Py_XDECREF(object_reduce_ex);
112644  Py_XDECREF(object_getstate);
112645  Py_XDECREF(getstate);
112646 #endif
112647  Py_XDECREF(reduce);
112648  Py_XDECREF(reduce_ex);
112649  Py_XDECREF(reduce_cython);
112650  Py_XDECREF(setstate);
112651  Py_XDECREF(setstate_cython);
112652  return ret;
112653 }
112654 
112655 /* TypeImport */
112656  #ifndef __PYX_HAVE_RT_ImportType
112657 #define __PYX_HAVE_RT_ImportType
112658 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
112659  size_t size, enum __Pyx_ImportType_CheckSize check_size)
112660 {
112661  PyObject *result = 0;
112662  char warning[200];
112663  Py_ssize_t basicsize;
112664 #ifdef Py_LIMITED_API
112665  PyObject *py_basicsize;
112666 #endif
112667  result = PyObject_GetAttrString(module, class_name);
112668  if (!result)
112669  goto bad;
112670  if (!PyType_Check(result)) {
112671  PyErr_Format(PyExc_TypeError,
112672  "%.200s.%.200s is not a type object",
112673  module_name, class_name);
112674  goto bad;
112675  }
112676 #ifndef Py_LIMITED_API
112677  basicsize = ((PyTypeObject *)result)->tp_basicsize;
112678 #else
112679  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
112680  if (!py_basicsize)
112681  goto bad;
112682  basicsize = PyLong_AsSsize_t(py_basicsize);
112683  Py_DECREF(py_basicsize);
112684  py_basicsize = 0;
112685  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
112686  goto bad;
112687 #endif
112688  if ((size_t)basicsize < size) {
112689  PyErr_Format(PyExc_ValueError,
112690  "%.200s.%.200s size changed, may indicate binary incompatibility. "
112691  "Expected %zd from C header, got %zd from PyObject",
112692  module_name, class_name, size, basicsize);
112693  goto bad;
112694  }
112695  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
112696  PyErr_Format(PyExc_ValueError,
112697  "%.200s.%.200s size changed, may indicate binary incompatibility. "
112698  "Expected %zd from C header, got %zd from PyObject",
112699  module_name, class_name, size, basicsize);
112700  goto bad;
112701  }
112702  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
112703  PyOS_snprintf(warning, sizeof(warning),
112704  "%s.%s size changed, may indicate binary incompatibility. "
112705  "Expected %zd from C header, got %zd from PyObject",
112706  module_name, class_name, size, basicsize);
112707  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
112708  }
112709  return (PyTypeObject *)result;
112710 bad:
112711  Py_XDECREF(result);
112712  return NULL;
112713 }
112714 #endif
112715 
112716 /* CLineInTraceback */
112717  #ifndef CYTHON_CLINE_IN_TRACEBACK
112718 static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
112719  PyObject *use_cline;
112720  PyObject *ptype, *pvalue, *ptraceback;
112721 #if CYTHON_COMPILING_IN_CPYTHON
112722  PyObject **cython_runtime_dict;
112723 #endif
112724  if (unlikely(!__pyx_cython_runtime)) {
112725  return c_line;
112726  }
112727  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
112728 #if CYTHON_COMPILING_IN_CPYTHON
112729  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
112730  if (likely(cython_runtime_dict)) {
112731  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
112732  use_cline, *cython_runtime_dict,
112733  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
112734  } else
112735 #endif
112736  {
112737  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
112738  if (use_cline_obj) {
112739  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
112740  Py_DECREF(use_cline_obj);
112741  } else {
112742  PyErr_Clear();
112743  use_cline = NULL;
112744  }
112745  }
112746  if (!use_cline) {
112747  c_line = 0;
112748  (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
112749  }
112750  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
112751  c_line = 0;
112752  }
112753  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
112754  return c_line;
112755 }
112756 #endif
112757 
112758 /* CodeObjectCache */
112759  static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
112760  int start = 0, mid = 0, end = count - 1;
112761  if (end >= 0 && code_line > entries[end].code_line) {
112762  return count;
112763  }
112764  while (start < end) {
112765  mid = start + (end - start) / 2;
112766  if (code_line < entries[mid].code_line) {
112767  end = mid;
112768  } else if (code_line > entries[mid].code_line) {
112769  start = mid + 1;
112770  } else {
112771  return mid;
112772  }
112773  }
112774  if (code_line <= entries[mid].code_line) {
112775  return mid;
112776  } else {
112777  return mid + 1;
112778  }
112779 }
112780 static PyCodeObject *__pyx_find_code_object(int code_line) {
112781  PyCodeObject* code_object;
112782  int pos;
112783  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
112784  return NULL;
112785  }
112786  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
112787  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
112788  return NULL;
112789  }
112790  code_object = __pyx_code_cache.entries[pos].code_object;
112791  Py_INCREF(code_object);
112792  return code_object;
112793 }
112794 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
112795  int pos, i;
112796  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
112797  if (unlikely(!code_line)) {
112798  return;
112799  }
112800  if (unlikely(!entries)) {
112801  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
112802  if (likely(entries)) {
112803  __pyx_code_cache.entries = entries;
112804  __pyx_code_cache.max_count = 64;
112805  __pyx_code_cache.count = 1;
112806  entries[0].code_line = code_line;
112807  entries[0].code_object = code_object;
112808  Py_INCREF(code_object);
112809  }
112810  return;
112811  }
112812  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
112813  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
112814  PyCodeObject* tmp = entries[pos].code_object;
112815  entries[pos].code_object = code_object;
112816  Py_DECREF(tmp);
112817  return;
112818  }
112819  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
112820  int new_max = __pyx_code_cache.max_count + 64;
112821  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
112822  __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
112823  if (unlikely(!entries)) {
112824  return;
112825  }
112826  __pyx_code_cache.entries = entries;
112827  __pyx_code_cache.max_count = new_max;
112828  }
112829  for (i=__pyx_code_cache.count; i>pos; i--) {
112830  entries[i] = entries[i-1];
112831  }
112832  entries[pos].code_line = code_line;
112833  entries[pos].code_object = code_object;
112834  __pyx_code_cache.count++;
112835  Py_INCREF(code_object);
112836 }
112837 
112838 /* AddTraceback */
112839  #include "compile.h"
112840 #include "frameobject.h"
112841 #include "traceback.h"
112842 #if PY_VERSION_HEX >= 0x030b00a6
112843  #ifndef Py_BUILD_CORE
112844  #define Py_BUILD_CORE 1
112845  #endif
112846  #include "internal/pycore_frame.h"
112847 #endif
112848 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
112849  const char *funcname, int c_line,
112850  int py_line, const char *filename) {
112851  PyCodeObject *py_code = NULL;
112852  PyObject *py_funcname = NULL;
112853  #if PY_MAJOR_VERSION < 3
112854  PyObject *py_srcfile = NULL;
112855  py_srcfile = PyString_FromString(filename);
112856  if (!py_srcfile) goto bad;
112857  #endif
112858  if (c_line) {
112859  #if PY_MAJOR_VERSION < 3
112860  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
112861  if (!py_funcname) goto bad;
112862  #else
112863  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
112864  if (!py_funcname) goto bad;
112865  funcname = PyUnicode_AsUTF8(py_funcname);
112866  if (!funcname) goto bad;
112867  #endif
112868  }
112869  else {
112870  #if PY_MAJOR_VERSION < 3
112871  py_funcname = PyString_FromString(funcname);
112872  if (!py_funcname) goto bad;
112873  #endif
112874  }
112875  #if PY_MAJOR_VERSION < 3
112876  py_code = __Pyx_PyCode_New(
112877  0,
112878  0,
112879  0,
112880  0,
112881  0,
112882  __pyx_empty_bytes, /*PyObject *code,*/
112883  __pyx_empty_tuple, /*PyObject *consts,*/
112884  __pyx_empty_tuple, /*PyObject *names,*/
112885  __pyx_empty_tuple, /*PyObject *varnames,*/
112886  __pyx_empty_tuple, /*PyObject *freevars,*/
112887  __pyx_empty_tuple, /*PyObject *cellvars,*/
112888  py_srcfile, /*PyObject *filename,*/
112889  py_funcname, /*PyObject *name,*/
112890  py_line,
112891  __pyx_empty_bytes /*PyObject *lnotab*/
112892  );
112893  Py_DECREF(py_srcfile);
112894  #else
112895  py_code = PyCode_NewEmpty(filename, funcname, py_line);
112896  #endif
112897  Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline
112898  return py_code;
112899 bad:
112900  Py_XDECREF(py_funcname);
112901  #if PY_MAJOR_VERSION < 3
112902  Py_XDECREF(py_srcfile);
112903  #endif
112904  return NULL;
112905 }
112906 static void __Pyx_AddTraceback(const char *funcname, int c_line,
112907  int py_line, const char *filename) {
112908  PyCodeObject *py_code = 0;
112909  PyFrameObject *py_frame = 0;
112910  PyThreadState *tstate = __Pyx_PyThreadState_Current;
112911  PyObject *ptype, *pvalue, *ptraceback;
112912  if (c_line) {
112913  c_line = __Pyx_CLineForTraceback(tstate, c_line);
112914  }
112915  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
112916  if (!py_code) {
112917  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
112918  py_code = __Pyx_CreateCodeObjectForTraceback(
112919  funcname, c_line, py_line, filename);
112920  if (!py_code) {
112921  /* If the code object creation fails, then we should clear the
112922  fetched exception references and propagate the new exception */
112923  Py_XDECREF(ptype);
112924  Py_XDECREF(pvalue);
112925  Py_XDECREF(ptraceback);
112926  goto bad;
112927  }
112928  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
112929  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
112930  }
112931  py_frame = PyFrame_New(
112932  tstate, /*PyThreadState *tstate,*/
112933  py_code, /*PyCodeObject *code,*/
112934  __pyx_d, /*PyObject *globals,*/
112935  0 /*PyObject *locals*/
112936  );
112937  if (!py_frame) goto bad;
112938  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
112939  PyTraceBack_Here(py_frame);
112940 bad:
112941  Py_XDECREF(py_code);
112942  Py_XDECREF(py_frame);
112943 }
112944 
112945 #if PY_MAJOR_VERSION < 3
112946 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
112947  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
112948  if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
112949  if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
112950  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
112951  return -1;
112952 }
112953 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
112954  PyObject *obj = view->obj;
112955  if (!obj) return;
112956  if (PyObject_CheckBuffer(obj)) {
112957  PyBuffer_Release(view);
112958  return;
112959  }
112960  if ((0)) {}
112961  view->obj = NULL;
112962  Py_DECREF(obj);
112963 }
112964 #endif
112965 
112966 
112967  /* MemviewSliceIsContig */
112968  static int
112969 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
112970 {
112971  int i, index, step, start;
112972  Py_ssize_t itemsize = mvs.memview->view.itemsize;
112973  if (order == 'F') {
112974  step = 1;
112975  start = 0;
112976  } else {
112977  step = -1;
112978  start = ndim - 1;
112979  }
112980  for (i = 0; i < ndim; i++) {
112981  index = start + step * i;
112982  if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
112983  return 0;
112984  itemsize *= mvs.shape[index];
112985  }
112986  return 1;
112987 }
112988 
112989 /* OverlappingSlices */
112990  static void
112991 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
112992  void **out_start, void **out_end,
112993  int ndim, size_t itemsize)
112994 {
112995  char *start, *end;
112996  int i;
112997  start = end = slice->data;
112998  for (i = 0; i < ndim; i++) {
112999  Py_ssize_t stride = slice->strides[i];
113000  Py_ssize_t extent = slice->shape[i];
113001  if (extent == 0) {
113002  *out_start = *out_end = start;
113003  return;
113004  } else {
113005  if (stride > 0)
113006  end += stride * (extent - 1);
113007  else
113008  start += stride * (extent - 1);
113009  }
113010  }
113011  *out_start = start;
113012  *out_end = end + itemsize;
113013 }
113014 static int
113015 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
113016  __Pyx_memviewslice *slice2,
113017  int ndim, size_t itemsize)
113018 {
113019  void *start1, *end1, *start2, *end2;
113020  __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
113021  __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
113022  return (start1 < end2) && (start2 < end1);
113023 }
113024 
113025 /* Capsule */
113026  static CYTHON_INLINE PyObject *
113027 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
113028 {
113029  PyObject *cobj;
113030 #if PY_VERSION_HEX >= 0x02070000
113031  cobj = PyCapsule_New(p, sig, NULL);
113032 #else
113033  cobj = PyCObject_FromVoidPtr(p, NULL);
113034 #endif
113035  return cobj;
113036 }
113037 
113038 /* IsLittleEndian */
113039  static CYTHON_INLINE int __Pyx_Is_Little_Endian(void)
113040 {
113041  union {
113042  uint32_t u32;
113043  uint8_t u8[4];
113044  } S;
113045  S.u32 = 0x01020304;
113046  return S.u8[0] == 4;
113047 }
113048 
113049 /* BufferFormatCheck */
113050  static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
113051  __Pyx_BufFmt_StackElem* stack,
113052  __Pyx_TypeInfo* type) {
113053  stack[0].field = &ctx->root;
113054  stack[0].parent_offset = 0;
113055  ctx->root.type = type;
113056  ctx->root.name = "buffer dtype";
113057  ctx->root.offset = 0;
113058  ctx->head = stack;
113059  ctx->head->field = &ctx->root;
113060  ctx->fmt_offset = 0;
113061  ctx->head->parent_offset = 0;
113062  ctx->new_packmode = '@';
113063  ctx->enc_packmode = '@';
113064  ctx->new_count = 1;
113065  ctx->enc_count = 0;
113066  ctx->enc_type = 0;
113067  ctx->is_complex = 0;
113068  ctx->is_valid_array = 0;
113069  ctx->struct_alignment = 0;
113070  while (type->typegroup == 'S') {
113071  ++ctx->head;
113072  ctx->head->field = type->fields;
113073  ctx->head->parent_offset = 0;
113074  type = type->fields->type;
113075  }
113076 }
113077 static int __Pyx_BufFmt_ParseNumber(const char** ts) {
113078  int count;
113079  const char* t = *ts;
113080  if (*t < '0' || *t > '9') {
113081  return -1;
113082  } else {
113083  count = *t++ - '0';
113084  while (*t >= '0' && *t <= '9') {
113085  count *= 10;
113086  count += *t++ - '0';
113087  }
113088  }
113089  *ts = t;
113090  return count;
113091 }
113092 static int __Pyx_BufFmt_ExpectNumber(const char **ts) {
113093  int number = __Pyx_BufFmt_ParseNumber(ts);
113094  if (number == -1)
113095  PyErr_Format(PyExc_ValueError,\
113096  "Does not understand character buffer dtype format string ('%c')", **ts);
113097  return number;
113098 }
113099 static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) {
113100  PyErr_Format(PyExc_ValueError,
113101  "Unexpected format string character: '%c'", ch);
113102 }
113103 static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) {
113104  switch (ch) {
113105  case '?': return "'bool'";
113106  case 'c': return "'char'";
113107  case 'b': return "'signed char'";
113108  case 'B': return "'unsigned char'";
113109  case 'h': return "'short'";
113110  case 'H': return "'unsigned short'";
113111  case 'i': return "'int'";
113112  case 'I': return "'unsigned int'";
113113  case 'l': return "'long'";
113114  case 'L': return "'unsigned long'";
113115  case 'q': return "'long long'";
113116  case 'Q': return "'unsigned long long'";
113117  case 'f': return (is_complex ? "'complex float'" : "'float'");
113118  case 'd': return (is_complex ? "'complex double'" : "'double'");
113119  case 'g': return (is_complex ? "'complex long double'" : "'long double'");
113120  case 'T': return "a struct";
113121  case 'O': return "Python object";
113122  case 'P': return "a pointer";
113123  case 's': case 'p': return "a string";
113124  case 0: return "end";
113125  default: return "unparseable format string";
113126  }
113127 }
113128 static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) {
113129  switch (ch) {
113130  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
113131  case 'h': case 'H': return 2;
113132  case 'i': case 'I': case 'l': case 'L': return 4;
113133  case 'q': case 'Q': return 8;
113134  case 'f': return (is_complex ? 8 : 4);
113135  case 'd': return (is_complex ? 16 : 8);
113136  case 'g': {
113137  PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g')..");
113138  return 0;
113139  }
113140  case 'O': case 'P': return sizeof(void*);
113141  default:
113142  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
113143  return 0;
113144  }
113145 }
113146 static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) {
113147  switch (ch) {
113148  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
113149  case 'h': case 'H': return sizeof(short);
113150  case 'i': case 'I': return sizeof(int);
113151  case 'l': case 'L': return sizeof(long);
113152  #ifdef HAVE_LONG_LONG
113153  case 'q': case 'Q': return sizeof(PY_LONG_LONG);
113154  #endif
113155  case 'f': return sizeof(float) * (is_complex ? 2 : 1);
113156  case 'd': return sizeof(double) * (is_complex ? 2 : 1);
113157  case 'g': return sizeof(long double) * (is_complex ? 2 : 1);
113158  case 'O': case 'P': return sizeof(void*);
113159  default: {
113160  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
113161  return 0;
113162  }
113163  }
113164 }
113165 typedef struct { char c; short x; } __Pyx_st_short;
113166 typedef struct { char c; int x; } __Pyx_st_int;
113167 typedef struct { char c; long x; } __Pyx_st_long;
113168 typedef struct { char c; float x; } __Pyx_st_float;
113169 typedef struct { char c; double x; } __Pyx_st_double;
113170 typedef struct { char c; long double x; } __Pyx_st_longdouble;
113171 typedef struct { char c; void *x; } __Pyx_st_void_p;
113172 #ifdef HAVE_LONG_LONG
113173 typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong;
113174 #endif
113175 static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) {
113176  switch (ch) {
113177  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
113178  case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short);
113179  case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int);
113180  case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long);
113181 #ifdef HAVE_LONG_LONG
113182  case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG);
113183 #endif
113184  case 'f': return sizeof(__Pyx_st_float) - sizeof(float);
113185  case 'd': return sizeof(__Pyx_st_double) - sizeof(double);
113186  case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double);
113187  case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*);
113188  default:
113189  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
113190  return 0;
113191  }
113192 }
113193 /* These are for computing the padding at the end of the struct to align
113194  on the first member of the struct. This will probably the same as above,
113195  but we don't have any guarantees.
113196  */
113197 typedef struct { short x; char c; } __Pyx_pad_short;
113198 typedef struct { int x; char c; } __Pyx_pad_int;
113199 typedef struct { long x; char c; } __Pyx_pad_long;
113200 typedef struct { float x; char c; } __Pyx_pad_float;
113201 typedef struct { double x; char c; } __Pyx_pad_double;
113202 typedef struct { long double x; char c; } __Pyx_pad_longdouble;
113203 typedef struct { void *x; char c; } __Pyx_pad_void_p;
113204 #ifdef HAVE_LONG_LONG
113205 typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong;
113206 #endif
113207 static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) {
113208  switch (ch) {
113209  case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1;
113210  case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short);
113211  case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int);
113212  case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long);
113213 #ifdef HAVE_LONG_LONG
113214  case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG);
113215 #endif
113216  case 'f': return sizeof(__Pyx_pad_float) - sizeof(float);
113217  case 'd': return sizeof(__Pyx_pad_double) - sizeof(double);
113218  case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double);
113219  case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*);
113220  default:
113221  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
113222  return 0;
113223  }
113224 }
113225 static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
113226  switch (ch) {
113227  case 'c':
113228  return 'H';
113229  case 'b': case 'h': case 'i':
113230  case 'l': case 'q': case 's': case 'p':
113231  return 'I';
113232  case '?': case 'B': case 'H': case 'I': case 'L': case 'Q':
113233  return 'U';
113234  case 'f': case 'd': case 'g':
113235  return (is_complex ? 'C' : 'R');
113236  case 'O':
113237  return 'O';
113238  case 'P':
113239  return 'P';
113240  default: {
113241  __Pyx_BufFmt_RaiseUnexpectedChar(ch);
113242  return 0;
113243  }
113244  }
113245 }
113246 static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) {
113247  if (ctx->head == NULL || ctx->head->field == &ctx->root) {
113248  const char* expected;
113249  const char* quote;
113250  if (ctx->head == NULL) {
113251  expected = "end";
113252  quote = "";
113253  } else {
113254  expected = ctx->head->field->type->name;
113255  quote = "'";
113256  }
113257  PyErr_Format(PyExc_ValueError,
113258  "Buffer dtype mismatch, expected %s%s%s but got %s",
113259  quote, expected, quote,
113260  __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex));
113261  } else {
113262  __Pyx_StructField* field = ctx->head->field;
113263  __Pyx_StructField* parent = (ctx->head - 1)->field;
113264  PyErr_Format(PyExc_ValueError,
113265  "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'",
113266  field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex),
113267  parent->type->name, field->name);
113268  }
113269 }
113270 static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
113271  char group;
113272  size_t size, offset, arraysize = 1;
113273  if (ctx->enc_type == 0) return 0;
113274  if (ctx->head->field->type->arraysize[0]) {
113275  int i, ndim = 0;
113276  if (ctx->enc_type == 's' || ctx->enc_type == 'p') {
113277  ctx->is_valid_array = ctx->head->field->type->ndim == 1;
113278  ndim = 1;
113279  if (ctx->enc_count != ctx->head->field->type->arraysize[0]) {
113280  PyErr_Format(PyExc_ValueError,
113281  "Expected a dimension of size %zu, got %zu",
113282  ctx->head->field->type->arraysize[0], ctx->enc_count);
113283  return -1;
113284  }
113285  }
113286  if (!ctx->is_valid_array) {
113287  PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d",
113288  ctx->head->field->type->ndim, ndim);
113289  return -1;
113290  }
113291  for (i = 0; i < ctx->head->field->type->ndim; i++) {
113292  arraysize *= ctx->head->field->type->arraysize[i];
113293  }
113294  ctx->is_valid_array = 0;
113295  ctx->enc_count = 1;
113296  }
113297  group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex);
113298  do {
113299  __Pyx_StructField* field = ctx->head->field;
113300  __Pyx_TypeInfo* type = field->type;
113301  if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') {
113302  size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex);
113303  } else {
113304  size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex);
113305  }
113306  if (ctx->enc_packmode == '@') {
113307  size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex);
113308  size_t align_mod_offset;
113309  if (align_at == 0) return -1;
113310  align_mod_offset = ctx->fmt_offset % align_at;
113311  if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset;
113312  if (ctx->struct_alignment == 0)
113313  ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type,
113314  ctx->is_complex);
113315  }
113316  if (type->size != size || type->typegroup != group) {
113317  if (type->typegroup == 'C' && type->fields != NULL) {
113318  size_t parent_offset = ctx->head->parent_offset + field->offset;
113319  ++ctx->head;
113320  ctx->head->field = type->fields;
113321  ctx->head->parent_offset = parent_offset;
113322  continue;
113323  }
113324  if ((type->typegroup == 'H' || group == 'H') && type->size == size) {
113325  } else {
113326  __Pyx_BufFmt_RaiseExpected(ctx);
113327  return -1;
113328  }
113329  }
113330  offset = ctx->head->parent_offset + field->offset;
113331  if (ctx->fmt_offset != offset) {
113332  PyErr_Format(PyExc_ValueError,
113333  "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
113334  (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
113335  return -1;
113336  }
113337  ctx->fmt_offset += size;
113338  if (arraysize)
113339  ctx->fmt_offset += (arraysize - 1) * size;
113340  --ctx->enc_count;
113341  while (1) {
113342  if (field == &ctx->root) {
113343  ctx->head = NULL;
113344  if (ctx->enc_count != 0) {
113345  __Pyx_BufFmt_RaiseExpected(ctx);
113346  return -1;
113347  }
113348  break;
113349  }
113350  ctx->head->field = ++field;
113351  if (field->type == NULL) {
113352  --ctx->head;
113353  field = ctx->head->field;
113354  continue;
113355  } else if (field->type->typegroup == 'S') {
113356  size_t parent_offset = ctx->head->parent_offset + field->offset;
113357  if (field->type->fields->type == NULL) continue;
113358  field = field->type->fields;
113359  ++ctx->head;
113360  ctx->head->field = field;
113361  ctx->head->parent_offset = parent_offset;
113362  break;
113363  } else {
113364  break;
113365  }
113366  }
113367  } while (ctx->enc_count);
113368  ctx->enc_type = 0;
113369  ctx->is_complex = 0;
113370  return 0;
113371 }
113372 static PyObject *
113373 __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp)
113374 {
113375  const char *ts = *tsp;
113376  int i = 0, number, ndim;
113377  ++ts;
113378  if (ctx->new_count != 1) {
113379  PyErr_SetString(PyExc_ValueError,
113380  "Cannot handle repeated arrays in format string");
113381  return NULL;
113382  }
113383  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
113384  ndim = ctx->head->field->type->ndim;
113385  while (*ts && *ts != ')') {
113386  switch (*ts) {
113387  case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue;
113388  default: break;
113389  }
113390  number = __Pyx_BufFmt_ExpectNumber(&ts);
113391  if (number == -1) return NULL;
113392  if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i])
113393  return PyErr_Format(PyExc_ValueError,
113394  "Expected a dimension of size %zu, got %d",
113395  ctx->head->field->type->arraysize[i], number);
113396  if (*ts != ',' && *ts != ')')
113397  return PyErr_Format(PyExc_ValueError,
113398  "Expected a comma in format string, got '%c'", *ts);
113399  if (*ts == ',') ts++;
113400  i++;
113401  }
113402  if (i != ndim)
113403  return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d",
113404  ctx->head->field->type->ndim, i);
113405  if (!*ts) {
113406  PyErr_SetString(PyExc_ValueError,
113407  "Unexpected end of format string, expected ')'");
113408  return NULL;
113409  }
113410  ctx->is_valid_array = 1;
113411  ctx->new_count = 1;
113412  *tsp = ++ts;
113413  return Py_None;
113414 }
113415 static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) {
113416  int got_Z = 0;
113417  while (1) {
113418  switch(*ts) {
113419  case 0:
113420  if (ctx->enc_type != 0 && ctx->head == NULL) {
113421  __Pyx_BufFmt_RaiseExpected(ctx);
113422  return NULL;
113423  }
113424  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
113425  if (ctx->head != NULL) {
113426  __Pyx_BufFmt_RaiseExpected(ctx);
113427  return NULL;
113428  }
113429  return ts;
113430  case ' ':
113431  case '\r':
113432  case '\n':
113433  ++ts;
113434  break;
113435  case '<':
113436  if (!__Pyx_Is_Little_Endian()) {
113437  PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler");
113438  return NULL;
113439  }
113440  ctx->new_packmode = '=';
113441  ++ts;
113442  break;
113443  case '>':
113444  case '!':
113445  if (__Pyx_Is_Little_Endian()) {
113446  PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler");
113447  return NULL;
113448  }
113449  ctx->new_packmode = '=';
113450  ++ts;
113451  break;
113452  case '=':
113453  case '@':
113454  case '^':
113455  ctx->new_packmode = *ts++;
113456  break;
113457  case 'T':
113458  {
113459  const char* ts_after_sub;
113460  size_t i, struct_count = ctx->new_count;
113461  size_t struct_alignment = ctx->struct_alignment;
113462  ctx->new_count = 1;
113463  ++ts;
113464  if (*ts != '{') {
113465  PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'");
113466  return NULL;
113467  }
113468  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
113469  ctx->enc_type = 0;
113470  ctx->enc_count = 0;
113471  ctx->struct_alignment = 0;
113472  ++ts;
113473  ts_after_sub = ts;
113474  for (i = 0; i != struct_count; ++i) {
113475  ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts);
113476  if (!ts_after_sub) return NULL;
113477  }
113478  ts = ts_after_sub;
113479  if (struct_alignment) ctx->struct_alignment = struct_alignment;
113480  }
113481  break;
113482  case '}':
113483  {
113484  size_t alignment = ctx->struct_alignment;
113485  ++ts;
113486  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
113487  ctx->enc_type = 0;
113488  if (alignment && ctx->fmt_offset % alignment) {
113489  ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment);
113490  }
113491  }
113492  return ts;
113493  case 'x':
113494  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
113495  ctx->fmt_offset += ctx->new_count;
113496  ctx->new_count = 1;
113497  ctx->enc_count = 0;
113498  ctx->enc_type = 0;
113499  ctx->enc_packmode = ctx->new_packmode;
113500  ++ts;
113501  break;
113502  case 'Z':
113503  got_Z = 1;
113504  ++ts;
113505  if (*ts != 'f' && *ts != 'd' && *ts != 'g') {
113506  __Pyx_BufFmt_RaiseUnexpectedChar('Z');
113507  return NULL;
113508  }
113509  CYTHON_FALLTHROUGH;
113510  case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I':
113511  case 'l': case 'L': case 'q': case 'Q':
113512  case 'f': case 'd': case 'g':
113513  case 'O': case 'p':
113514  if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) &&
113515  (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) {
113516  ctx->enc_count += ctx->new_count;
113517  ctx->new_count = 1;
113518  got_Z = 0;
113519  ++ts;
113520  break;
113521  }
113522  CYTHON_FALLTHROUGH;
113523  case 's':
113524  if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL;
113525  ctx->enc_count = ctx->new_count;
113526  ctx->enc_packmode = ctx->new_packmode;
113527  ctx->enc_type = *ts;
113528  ctx->is_complex = got_Z;
113529  ++ts;
113530  ctx->new_count = 1;
113531  got_Z = 0;
113532  break;
113533  case ':':
113534  ++ts;
113535  while(*ts != ':') ++ts;
113536  ++ts;
113537  break;
113538  case '(':
113539  if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL;
113540  break;
113541  default:
113542  {
113543  int number = __Pyx_BufFmt_ExpectNumber(&ts);
113544  if (number == -1) return NULL;
113545  ctx->new_count = (size_t)number;
113546  }
113547  }
113548  }
113549 }
113550 
113551 /* TypeInfoCompare */
113552  static int
113553 __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b)
113554 {
113555  int i;
113556  if (!a || !b)
113557  return 0;
113558  if (a == b)
113559  return 1;
113560  if (a->size != b->size || a->typegroup != b->typegroup ||
113561  a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) {
113562  if (a->typegroup == 'H' || b->typegroup == 'H') {
113563  return a->size == b->size;
113564  } else {
113565  return 0;
113566  }
113567  }
113568  if (a->ndim) {
113569  for (i = 0; i < a->ndim; i++)
113570  if (a->arraysize[i] != b->arraysize[i])
113571  return 0;
113572  }
113573  if (a->typegroup == 'S') {
113574  if (a->flags != b->flags)
113575  return 0;
113576  if (a->fields || b->fields) {
113577  if (!(a->fields && b->fields))
113578  return 0;
113579  for (i = 0; a->fields[i].type && b->fields[i].type; i++) {
113580  __Pyx_StructField *field_a = a->fields + i;
113581  __Pyx_StructField *field_b = b->fields + i;
113582  if (field_a->offset != field_b->offset ||
113583  !__pyx_typeinfo_cmp(field_a->type, field_b->type))
113584  return 0;
113585  }
113586  return !a->fields[i].type && !b->fields[i].type;
113587  }
113588  }
113589  return 1;
113590 }
113591 
113592 /* MemviewSliceValidateAndInit */
113593  static int
113594 __pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec)
113595 {
113596  if (buf->shape[dim] <= 1)
113597  return 1;
113598  if (buf->strides) {
113599  if (spec & __Pyx_MEMVIEW_CONTIG) {
113600  if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) {
113601  if (unlikely(buf->strides[dim] != sizeof(void *))) {
113602  PyErr_Format(PyExc_ValueError,
113603  "Buffer is not indirectly contiguous "
113604  "in dimension %d.", dim);
113605  goto fail;
113606  }
113607  } else if (unlikely(buf->strides[dim] != buf->itemsize)) {
113608  PyErr_SetString(PyExc_ValueError,
113609  "Buffer and memoryview are not contiguous "
113610  "in the same dimension.");
113611  goto fail;
113612  }
113613  }
113614  if (spec & __Pyx_MEMVIEW_FOLLOW) {
113615  Py_ssize_t stride = buf->strides[dim];
113616  if (stride < 0)
113617  stride = -stride;
113618  if (unlikely(stride < buf->itemsize)) {
113619  PyErr_SetString(PyExc_ValueError,
113620  "Buffer and memoryview are not contiguous "
113621  "in the same dimension.");
113622  goto fail;
113623  }
113624  }
113625  } else {
113626  if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) {
113627  PyErr_Format(PyExc_ValueError,
113628  "C-contiguous buffer is not contiguous in "
113629  "dimension %d", dim);
113630  goto fail;
113631  } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) {
113632  PyErr_Format(PyExc_ValueError,
113633  "C-contiguous buffer is not indirect in "
113634  "dimension %d", dim);
113635  goto fail;
113636  } else if (unlikely(buf->suboffsets)) {
113637  PyErr_SetString(PyExc_ValueError,
113638  "Buffer exposes suboffsets but no strides");
113639  goto fail;
113640  }
113641  }
113642  return 1;
113643 fail:
113644  return 0;
113645 }
113646 static int
113647 __pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec)
113648 {
113649  if (spec & __Pyx_MEMVIEW_DIRECT) {
113650  if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) {
113651  PyErr_Format(PyExc_ValueError,
113652  "Buffer not compatible with direct access "
113653  "in dimension %d.", dim);
113654  goto fail;
113655  }
113656  }
113657  if (spec & __Pyx_MEMVIEW_PTR) {
113658  if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) {
113659  PyErr_Format(PyExc_ValueError,
113660  "Buffer is not indirectly accessible "
113661  "in dimension %d.", dim);
113662  goto fail;
113663  }
113664  }
113665  return 1;
113666 fail:
113667  return 0;
113668 }
113669 static int
113670 __pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag)
113671 {
113672  int i;
113673  if (c_or_f_flag & __Pyx_IS_F_CONTIG) {
113674  Py_ssize_t stride = 1;
113675  for (i = 0; i < ndim; i++) {
113676  if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
113677  PyErr_SetString(PyExc_ValueError,
113678  "Buffer not fortran contiguous.");
113679  goto fail;
113680  }
113681  stride = stride * buf->shape[i];
113682  }
113683  } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) {
113684  Py_ssize_t stride = 1;
113685  for (i = ndim - 1; i >- 1; i--) {
113686  if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) {
113687  PyErr_SetString(PyExc_ValueError,
113688  "Buffer not C contiguous.");
113689  goto fail;
113690  }
113691  stride = stride * buf->shape[i];
113692  }
113693  }
113694  return 1;
113695 fail:
113696  return 0;
113697 }
113698 static int __Pyx_ValidateAndInit_memviewslice(
113699  int *axes_specs,
113700  int c_or_f_flag,
113701  int buf_flags,
113702  int ndim,
113703  __Pyx_TypeInfo *dtype,
113704  __Pyx_BufFmt_StackElem stack[],
113705  __Pyx_memviewslice *memviewslice,
113706  PyObject *original_obj)
113707 {
113708  struct __pyx_memoryview_obj *memview, *new_memview;
113709  __Pyx_RefNannyDeclarations
113710  Py_buffer *buf;
113711  int i, spec = 0, retval = -1;
113712  __Pyx_BufFmt_Context ctx;
113713  int from_memoryview = __pyx_memoryview_check(original_obj);
113714  __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0);
113715  if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *)
113716  original_obj)->typeinfo)) {
113717  memview = (struct __pyx_memoryview_obj *) original_obj;
113718  new_memview = NULL;
113719  } else {
113720  memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
113721  original_obj, buf_flags, 0, dtype);
113722  new_memview = memview;
113723  if (unlikely(!memview))
113724  goto fail;
113725  }
113726  buf = &memview->view;
113727  if (unlikely(buf->ndim != ndim)) {
113728  PyErr_Format(PyExc_ValueError,
113729  "Buffer has wrong number of dimensions (expected %d, got %d)",
113730  ndim, buf->ndim);
113731  goto fail;
113732  }
113733  if (new_memview) {
113734  __Pyx_BufFmt_Init(&ctx, stack, dtype);
113735  if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail;
113736  }
113737  if (unlikely((unsigned) buf->itemsize != dtype->size)) {
113738  PyErr_Format(PyExc_ValueError,
113739  "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) "
113740  "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)",
113741  buf->itemsize,
113742  (buf->itemsize > 1) ? "s" : "",
113743  dtype->name,
113744  dtype->size,
113745  (dtype->size > 1) ? "s" : "");
113746  goto fail;
113747  }
113748  if (buf->len > 0) {
113749  for (i = 0; i < ndim; i++) {
113750  spec = axes_specs[i];
113751  if (unlikely(!__pyx_check_strides(buf, i, ndim, spec)))
113752  goto fail;
113753  if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec)))
113754  goto fail;
113755  }
113756  if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag)))
113757  goto fail;
113758  }
113759  if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice,
113760  new_memview != NULL) == -1)) {
113761  goto fail;
113762  }
113763  retval = 0;
113764  goto no_fail;
113765 fail:
113766  Py_XDECREF(new_memview);
113767  retval = -1;
113768 no_fail:
113769  __Pyx_RefNannyFinishContext();
113770  return retval;
113771 }
113772 
113773 /* ObjectToMemviewSlice */
113774  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_double(PyObject *obj, int writable_flag) {
113775  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
113776  __Pyx_BufFmt_StackElem stack[1];
113777  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
113778  int retcode;
113779  if (obj == Py_None) {
113780  result.memview = (struct __pyx_memoryview_obj *) Py_None;
113781  return result;
113782  }
113783  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
113784  PyBUF_RECORDS_RO | writable_flag, 1,
113785  &__Pyx_TypeInfo_double, stack,
113786  &result, obj);
113787  if (unlikely(retcode == -1))
113788  goto __pyx_fail;
113789  return result;
113790 __pyx_fail:
113791  result.memview = NULL;
113792  result.data = NULL;
113793  return result;
113794 }
113795 
113796 /* ObjectToMemviewSlice */
113797  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_double(PyObject *obj, int writable_flag) {
113798  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
113799  __Pyx_BufFmt_StackElem stack[1];
113800  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
113801  int retcode;
113802  if (obj == Py_None) {
113803  result.memview = (struct __pyx_memoryview_obj *) Py_None;
113804  return result;
113805  }
113806  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
113807  PyBUF_RECORDS_RO | writable_flag, 2,
113808  &__Pyx_TypeInfo_double, stack,
113809  &result, obj);
113810  if (unlikely(retcode == -1))
113811  goto __pyx_fail;
113812  return result;
113813 __pyx_fail:
113814  result.memview = NULL;
113815  result.data = NULL;
113816  return result;
113817 }
113818 
113819 /* CIntFromPyVerify */
113820  #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
113821  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
113822 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
113823  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
113824 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
113825  {\
113826  func_type value = func_value;\
113827  if (sizeof(target_type) < sizeof(func_type)) {\
113828  if (unlikely(value != (func_type) (target_type) value)) {\
113829  func_type zero = 0;\
113830  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
113831  return (target_type) -1;\
113832  if (is_unsigned && unlikely(value < zero))\
113833  goto raise_neg_overflow;\
113834  else\
113835  goto raise_overflow;\
113836  }\
113837  }\
113838  return (target_type) value;\
113839  }
113840 
113841 /* ObjectToMemviewSlice */
113842  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsdsds_double(PyObject *obj, int writable_flag) {
113843  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
113844  __Pyx_BufFmt_StackElem stack[1];
113845  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
113846  int retcode;
113847  if (obj == Py_None) {
113848  result.memview = (struct __pyx_memoryview_obj *) Py_None;
113849  return result;
113850  }
113851  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
113852  PyBUF_RECORDS_RO | writable_flag, 3,
113853  &__Pyx_TypeInfo_double, stack,
113854  &result, obj);
113855  if (unlikely(retcode == -1))
113856  goto __pyx_fail;
113857  return result;
113858 __pyx_fail:
113859  result.memview = NULL;
113860  result.data = NULL;
113861  return result;
113862 }
113863 
113864 /* MemviewDtypeToObject */
113865  static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
113866  return (PyObject *) PyFloat_FromDouble(*(double *) itemp);
113867 }
113868 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) {
113869  double value = __pyx_PyFloat_AsDouble(obj);
113870  if ((value == (double)-1) && PyErr_Occurred())
113871  return 0;
113872  *(double *) itemp = value;
113873  return 1;
113874 }
113875 
113876 /* ObjectToMemviewSlice */
113877  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_int(PyObject *obj, int writable_flag) {
113878  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
113879  __Pyx_BufFmt_StackElem stack[1];
113880  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED), (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
113881  int retcode;
113882  if (obj == Py_None) {
113883  result.memview = (struct __pyx_memoryview_obj *) Py_None;
113884  return result;
113885  }
113886  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
113887  PyBUF_RECORDS_RO | writable_flag, 2,
113888  &__Pyx_TypeInfo_int, stack,
113889  &result, obj);
113890  if (unlikely(retcode == -1))
113891  goto __pyx_fail;
113892  return result;
113893 __pyx_fail:
113894  result.memview = NULL;
113895  result.data = NULL;
113896  return result;
113897 }
113898 
113899 /* MemviewDtypeToObject */
113900  static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp) {
113901  return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp);
113902 }
113903 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj) {
113904  int value = __Pyx_PyInt_As_int(obj);
113905  if ((value == (int)-1) && PyErr_Occurred())
113906  return 0;
113907  *(int *) itemp = value;
113908  return 1;
113909 }
113910 
113911 /* Print */
113912  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
113913 static PyObject *__Pyx_GetStdout(void) {
113914  PyObject *f = PySys_GetObject((char *)"stdout");
113915  if (!f) {
113916  PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
113917  }
113918  return f;
113919 }
113920 static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
113921  int i;
113922  if (!f) {
113923  if (!(f = __Pyx_GetStdout()))
113924  return -1;
113925  }
113926  Py_INCREF(f);
113927  for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
113928  PyObject* v;
113929  if (PyFile_SoftSpace(f, 1)) {
113930  if (PyFile_WriteString(" ", f) < 0)
113931  goto error;
113932  }
113933  v = PyTuple_GET_ITEM(arg_tuple, i);
113934  if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
113935  goto error;
113936  if (PyString_Check(v)) {
113937  char *s = PyString_AsString(v);
113938  Py_ssize_t len = PyString_Size(v);
113939  if (len > 0) {
113940  switch (s[len-1]) {
113941  case ' ': break;
113942  case '\f': case '\r': case '\n': case '\t': case '\v':
113943  PyFile_SoftSpace(f, 0);
113944  break;
113945  default: break;
113946  }
113947  }
113948  }
113949  }
113950  if (newline) {
113951  if (PyFile_WriteString("\n", f) < 0)
113952  goto error;
113953  PyFile_SoftSpace(f, 0);
113954  }
113955  Py_DECREF(f);
113956  return 0;
113957 error:
113958  Py_DECREF(f);
113959  return -1;
113960 }
113961 #else
113962 static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
113963  PyObject* kwargs = 0;
113964  PyObject* result = 0;
113965  PyObject* end_string;
113966  if (unlikely(!__pyx_print)) {
113967  __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
113968  if (!__pyx_print)
113969  return -1;
113970  }
113971  if (stream) {
113972  kwargs = PyDict_New();
113973  if (unlikely(!kwargs))
113974  return -1;
113975  if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
113976  goto bad;
113977  if (!newline) {
113978  end_string = PyUnicode_FromStringAndSize(" ", 1);
113979  if (unlikely(!end_string))
113980  goto bad;
113981  if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
113982  Py_DECREF(end_string);
113983  goto bad;
113984  }
113985  Py_DECREF(end_string);
113986  }
113987  } else if (!newline) {
113988  if (unlikely(!__pyx_print_kwargs)) {
113989  __pyx_print_kwargs = PyDict_New();
113990  if (unlikely(!__pyx_print_kwargs))
113991  return -1;
113992  end_string = PyUnicode_FromStringAndSize(" ", 1);
113993  if (unlikely(!end_string))
113994  return -1;
113995  if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
113996  Py_DECREF(end_string);
113997  return -1;
113998  }
113999  Py_DECREF(end_string);
114000  }
114001  kwargs = __pyx_print_kwargs;
114002  }
114003  result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
114004  if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
114005  Py_DECREF(kwargs);
114006  if (!result)
114007  return -1;
114008  Py_DECREF(result);
114009  return 0;
114010 bad:
114011  if (kwargs != __pyx_print_kwargs)
114012  Py_XDECREF(kwargs);
114013  return -1;
114014 }
114015 #endif
114016 
114017 /* ObjectToMemviewSlice */
114018  static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_int(PyObject *obj, int writable_flag) {
114019  __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } };
114020  __Pyx_BufFmt_StackElem stack[1];
114021  int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) };
114022  int retcode;
114023  if (obj == Py_None) {
114024  result.memview = (struct __pyx_memoryview_obj *) Py_None;
114025  return result;
114026  }
114027  retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0,
114028  PyBUF_RECORDS_RO | writable_flag, 1,
114029  &__Pyx_TypeInfo_int, stack,
114030  &result, obj);
114031  if (unlikely(retcode == -1))
114032  goto __pyx_fail;
114033  return result;
114034 __pyx_fail:
114035  result.memview = NULL;
114036  result.data = NULL;
114037  return result;
114038 }
114039 
114040 /* Declarations */
114041  #if CYTHON_CCOMPLEX
114042  #ifdef __cplusplus
114043  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
114044  return ::std::complex< float >(x, y);
114045  }
114046  #else
114047  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
114048  return x + y*(__pyx_t_float_complex)_Complex_I;
114049  }
114050  #endif
114051 #else
114052  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
114053  __pyx_t_float_complex z;
114054  z.real = x;
114055  z.imag = y;
114056  return z;
114057  }
114058 #endif
114059 
114060 /* Arithmetic */
114061  #if CYTHON_CCOMPLEX
114062 #else
114063  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
114064  return (a.real == b.real) && (a.imag == b.imag);
114065  }
114066  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
114067  __pyx_t_float_complex z;
114068  z.real = a.real + b.real;
114069  z.imag = a.imag + b.imag;
114070  return z;
114071  }
114072  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
114073  __pyx_t_float_complex z;
114074  z.real = a.real - b.real;
114075  z.imag = a.imag - b.imag;
114076  return z;
114077  }
114078  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
114079  __pyx_t_float_complex z;
114080  z.real = a.real * b.real - a.imag * b.imag;
114081  z.imag = a.real * b.imag + a.imag * b.real;
114082  return z;
114083  }
114084  #if 1
114085  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
114086  if (b.imag == 0) {
114087  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
114088  } else if (fabsf(b.real) >= fabsf(b.imag)) {
114089  if (b.real == 0 && b.imag == 0) {
114090  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
114091  } else {
114092  float r = b.imag / b.real;
114093  float s = (float)(1.0) / (b.real + b.imag * r);
114094  return __pyx_t_float_complex_from_parts(
114095  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
114096  }
114097  } else {
114098  float r = b.real / b.imag;
114099  float s = (float)(1.0) / (b.imag + b.real * r);
114100  return __pyx_t_float_complex_from_parts(
114101  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
114102  }
114103  }
114104  #else
114105  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
114106  if (b.imag == 0) {
114107  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
114108  } else {
114109  float denom = b.real * b.real + b.imag * b.imag;
114110  return __pyx_t_float_complex_from_parts(
114111  (a.real * b.real + a.imag * b.imag) / denom,
114112  (a.imag * b.real - a.real * b.imag) / denom);
114113  }
114114  }
114115  #endif
114116  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
114117  __pyx_t_float_complex z;
114118  z.real = -a.real;
114119  z.imag = -a.imag;
114120  return z;
114121  }
114122  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
114123  return (a.real == 0) && (a.imag == 0);
114124  }
114125  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
114126  __pyx_t_float_complex z;
114127  z.real = a.real;
114128  z.imag = -a.imag;
114129  return z;
114130  }
114131  #if 1
114132  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
114133  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
114134  return sqrtf(z.real*z.real + z.imag*z.imag);
114135  #else
114136  return hypotf(z.real, z.imag);
114137  #endif
114138  }
114139  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
114140  __pyx_t_float_complex z;
114141  float r, lnr, theta, z_r, z_theta;
114142  if (b.imag == 0 && b.real == (int)b.real) {
114143  if (b.real < 0) {
114144  float denom = a.real * a.real + a.imag * a.imag;
114145  a.real = a.real / denom;
114146  a.imag = -a.imag / denom;
114147  b.real = -b.real;
114148  }
114149  switch ((int)b.real) {
114150  case 0:
114151  z.real = 1;
114152  z.imag = 0;
114153  return z;
114154  case 1:
114155  return a;
114156  case 2:
114157  return __Pyx_c_prod_float(a, a);
114158  case 3:
114159  z = __Pyx_c_prod_float(a, a);
114160  return __Pyx_c_prod_float(z, a);
114161  case 4:
114162  z = __Pyx_c_prod_float(a, a);
114163  return __Pyx_c_prod_float(z, z);
114164  }
114165  }
114166  if (a.imag == 0) {
114167  if (a.real == 0) {
114168  return a;
114169  } else if (b.imag == 0) {
114170  z.real = powf(a.real, b.real);
114171  z.imag = 0;
114172  return z;
114173  } else if (a.real > 0) {
114174  r = a.real;
114175  theta = 0;
114176  } else {
114177  r = -a.real;
114178  theta = atan2f(0.0, -1.0);
114179  }
114180  } else {
114181  r = __Pyx_c_abs_float(a);
114182  theta = atan2f(a.imag, a.real);
114183  }
114184  lnr = logf(r);
114185  z_r = expf(lnr * b.real - theta * b.imag);
114186  z_theta = theta * b.real + lnr * b.imag;
114187  z.real = z_r * cosf(z_theta);
114188  z.imag = z_r * sinf(z_theta);
114189  return z;
114190  }
114191  #endif
114192 #endif
114193 
114194 /* Declarations */
114195  #if CYTHON_CCOMPLEX
114196  #ifdef __cplusplus
114197  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
114198  return ::std::complex< double >(x, y);
114199  }
114200  #else
114201  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
114202  return x + y*(__pyx_t_double_complex)_Complex_I;
114203  }
114204  #endif
114205 #else
114206  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
114207  __pyx_t_double_complex z;
114208  z.real = x;
114209  z.imag = y;
114210  return z;
114211  }
114212 #endif
114213 
114214 /* Arithmetic */
114215  #if CYTHON_CCOMPLEX
114216 #else
114217  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
114218  return (a.real == b.real) && (a.imag == b.imag);
114219  }
114220  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
114221  __pyx_t_double_complex z;
114222  z.real = a.real + b.real;
114223  z.imag = a.imag + b.imag;
114224  return z;
114225  }
114226  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
114227  __pyx_t_double_complex z;
114228  z.real = a.real - b.real;
114229  z.imag = a.imag - b.imag;
114230  return z;
114231  }
114232  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
114233  __pyx_t_double_complex z;
114234  z.real = a.real * b.real - a.imag * b.imag;
114235  z.imag = a.real * b.imag + a.imag * b.real;
114236  return z;
114237  }
114238  #if 1
114239  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
114240  if (b.imag == 0) {
114241  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
114242  } else if (fabs(b.real) >= fabs(b.imag)) {
114243  if (b.real == 0 && b.imag == 0) {
114244  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
114245  } else {
114246  double r = b.imag / b.real;
114247  double s = (double)(1.0) / (b.real + b.imag * r);
114248  return __pyx_t_double_complex_from_parts(
114249  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
114250  }
114251  } else {
114252  double r = b.real / b.imag;
114253  double s = (double)(1.0) / (b.imag + b.real * r);
114254  return __pyx_t_double_complex_from_parts(
114255  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
114256  }
114257  }
114258  #else
114259  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
114260  if (b.imag == 0) {
114261  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
114262  } else {
114263  double denom = b.real * b.real + b.imag * b.imag;
114264  return __pyx_t_double_complex_from_parts(
114265  (a.real * b.real + a.imag * b.imag) / denom,
114266  (a.imag * b.real - a.real * b.imag) / denom);
114267  }
114268  }
114269  #endif
114270  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
114271  __pyx_t_double_complex z;
114272  z.real = -a.real;
114273  z.imag = -a.imag;
114274  return z;
114275  }
114276  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
114277  return (a.real == 0) && (a.imag == 0);
114278  }
114279  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
114280  __pyx_t_double_complex z;
114281  z.real = a.real;
114282  z.imag = -a.imag;
114283  return z;
114284  }
114285  #if 1
114286  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
114287  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
114288  return sqrt(z.real*z.real + z.imag*z.imag);
114289  #else
114290  return hypot(z.real, z.imag);
114291  #endif
114292  }
114293  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
114294  __pyx_t_double_complex z;
114295  double r, lnr, theta, z_r, z_theta;
114296  if (b.imag == 0 && b.real == (int)b.real) {
114297  if (b.real < 0) {
114298  double denom = a.real * a.real + a.imag * a.imag;
114299  a.real = a.real / denom;
114300  a.imag = -a.imag / denom;
114301  b.real = -b.real;
114302  }
114303  switch ((int)b.real) {
114304  case 0:
114305  z.real = 1;
114306  z.imag = 0;
114307  return z;
114308  case 1:
114309  return a;
114310  case 2:
114311  return __Pyx_c_prod_double(a, a);
114312  case 3:
114313  z = __Pyx_c_prod_double(a, a);
114314  return __Pyx_c_prod_double(z, a);
114315  case 4:
114316  z = __Pyx_c_prod_double(a, a);
114317  return __Pyx_c_prod_double(z, z);
114318  }
114319  }
114320  if (a.imag == 0) {
114321  if (a.real == 0) {
114322  return a;
114323  } else if (b.imag == 0) {
114324  z.real = pow(a.real, b.real);
114325  z.imag = 0;
114326  return z;
114327  } else if (a.real > 0) {
114328  r = a.real;
114329  theta = 0;
114330  } else {
114331  r = -a.real;
114332  theta = atan2(0.0, -1.0);
114333  }
114334  } else {
114335  r = __Pyx_c_abs_double(a);
114336  theta = atan2(a.imag, a.real);
114337  }
114338  lnr = log(r);
114339  z_r = exp(lnr * b.real - theta * b.imag);
114340  z_theta = theta * b.real + lnr * b.imag;
114341  z.real = z_r * cos(z_theta);
114342  z.imag = z_r * sin(z_theta);
114343  return z;
114344  }
114345  #endif
114346 #endif
114347 
114348 /* MemviewSliceCopyTemplate */
114349  static __Pyx_memviewslice
114350 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
114351  const char *mode, int ndim,
114352  size_t sizeof_dtype, int contig_flag,
114353  int dtype_is_object)
114354 {
114355  __Pyx_RefNannyDeclarations
114356  int i;
114357  __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
114358  struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
114359  Py_buffer *buf = &from_memview->view;
114360  PyObject *shape_tuple = NULL;
114361  PyObject *temp_int = NULL;
114362  struct __pyx_array_obj *array_obj = NULL;
114363  struct __pyx_memoryview_obj *memview_obj = NULL;
114364  __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
114365  for (i = 0; i < ndim; i++) {
114366  if (unlikely(from_mvs->suboffsets[i] >= 0)) {
114367  PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
114368  "indirect dimensions (axis %d)", i);
114369  goto fail;
114370  }
114371  }
114372  shape_tuple = PyTuple_New(ndim);
114373  if (unlikely(!shape_tuple)) {
114374  goto fail;
114375  }
114376  __Pyx_GOTREF(shape_tuple);
114377  for(i = 0; i < ndim; i++) {
114378  temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
114379  if(unlikely(!temp_int)) {
114380  goto fail;
114381  } else {
114382  PyTuple_SET_ITEM(shape_tuple, i, temp_int);
114383  temp_int = NULL;
114384  }
114385  }
114386  array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
114387  if (unlikely(!array_obj)) {
114388  goto fail;
114389  }
114390  __Pyx_GOTREF(array_obj);
114391  memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
114392  (PyObject *) array_obj, contig_flag,
114393  dtype_is_object,
114394  from_mvs->memview->typeinfo);
114395  if (unlikely(!memview_obj))
114396  goto fail;
114397  if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
114398  goto fail;
114399  if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
114400  dtype_is_object) < 0))
114401  goto fail;
114402  goto no_fail;
114403 fail:
114404  __Pyx_XDECREF(new_mvs.memview);
114405  new_mvs.memview = NULL;
114406  new_mvs.data = NULL;
114407 no_fail:
114408  __Pyx_XDECREF(shape_tuple);
114409  __Pyx_XDECREF(temp_int);
114410  __Pyx_XDECREF(array_obj);
114411  __Pyx_RefNannyFinishContext();
114412  return new_mvs;
114413 }
114414 
114415 /* CIntFromPy */
114416  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
114417 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114418 #pragma GCC diagnostic push
114419 #pragma GCC diagnostic ignored "-Wconversion"
114420 #endif
114421  const int neg_one = (int) -1, const_zero = (int) 0;
114422 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114423 #pragma GCC diagnostic pop
114424 #endif
114425  const int is_unsigned = neg_one > const_zero;
114426 #if PY_MAJOR_VERSION < 3
114427  if (likely(PyInt_Check(x))) {
114428  if (sizeof(int) < sizeof(long)) {
114429  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
114430  } else {
114431  long val = PyInt_AS_LONG(x);
114432  if (is_unsigned && unlikely(val < 0)) {
114433  goto raise_neg_overflow;
114434  }
114435  return (int) val;
114436  }
114437  } else
114438 #endif
114439  if (likely(PyLong_Check(x))) {
114440  if (is_unsigned) {
114441 #if CYTHON_USE_PYLONG_INTERNALS
114442  const digit* digits = ((PyLongObject*)x)->ob_digit;
114443  switch (Py_SIZE(x)) {
114444  case 0: return (int) 0;
114445  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
114446  case 2:
114447  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
114448  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114449  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114450  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
114451  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
114452  }
114453  }
114454  break;
114455  case 3:
114456  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
114457  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114458  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114459  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
114460  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
114461  }
114462  }
114463  break;
114464  case 4:
114465  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
114466  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
114467  __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])))
114468  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
114469  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
114470  }
114471  }
114472  break;
114473  }
114474 #endif
114475 #if CYTHON_COMPILING_IN_CPYTHON
114476  if (unlikely(Py_SIZE(x) < 0)) {
114477  goto raise_neg_overflow;
114478  }
114479 #else
114480  {
114481  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
114482  if (unlikely(result < 0))
114483  return (int) -1;
114484  if (unlikely(result == 1))
114485  goto raise_neg_overflow;
114486  }
114487 #endif
114488  if (sizeof(int) <= sizeof(unsigned long)) {
114489  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
114490 #ifdef HAVE_LONG_LONG
114491  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
114492  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
114493 #endif
114494  }
114495  } else {
114496 #if CYTHON_USE_PYLONG_INTERNALS
114497  const digit* digits = ((PyLongObject*)x)->ob_digit;
114498  switch (Py_SIZE(x)) {
114499  case 0: return (int) 0;
114500  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
114501  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
114502  case -2:
114503  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
114504  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114505  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114506  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
114507  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
114508  }
114509  }
114510  break;
114511  case 2:
114512  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
114513  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114514  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114515  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
114516  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
114517  }
114518  }
114519  break;
114520  case -3:
114521  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
114522  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114523  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114524  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
114525  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
114526  }
114527  }
114528  break;
114529  case 3:
114530  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
114531  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114532  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114533  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
114534  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
114535  }
114536  }
114537  break;
114538  case -4:
114539  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
114540  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
114541  __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])))
114542  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
114543  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
114544  }
114545  }
114546  break;
114547  case 4:
114548  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
114549  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
114550  __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])))
114551  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
114552  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
114553  }
114554  }
114555  break;
114556  }
114557 #endif
114558  if (sizeof(int) <= sizeof(long)) {
114559  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
114560 #ifdef HAVE_LONG_LONG
114561  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
114562  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
114563 #endif
114564  }
114565  }
114566  {
114567 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
114568  PyErr_SetString(PyExc_RuntimeError,
114569  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
114570 #else
114571  int val;
114572  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
114573  #if PY_MAJOR_VERSION < 3
114574  if (likely(v) && !PyLong_Check(v)) {
114575  PyObject *tmp = v;
114576  v = PyNumber_Long(tmp);
114577  Py_DECREF(tmp);
114578  }
114579  #endif
114580  if (likely(v)) {
114581  int one = 1; int is_little = (int)*(unsigned char *)&one;
114582  unsigned char *bytes = (unsigned char *)&val;
114583  int ret = _PyLong_AsByteArray((PyLongObject *)v,
114584  bytes, sizeof(val),
114585  is_little, !is_unsigned);
114586  Py_DECREF(v);
114587  if (likely(!ret))
114588  return val;
114589  }
114590 #endif
114591  return (int) -1;
114592  }
114593  } else {
114594  int val;
114595  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
114596  if (!tmp) return (int) -1;
114597  val = __Pyx_PyInt_As_int(tmp);
114598  Py_DECREF(tmp);
114599  return val;
114600  }
114601 raise_overflow:
114602  PyErr_SetString(PyExc_OverflowError,
114603  "value too large to convert to int");
114604  return (int) -1;
114605 raise_neg_overflow:
114606  PyErr_SetString(PyExc_OverflowError,
114607  "can't convert negative value to int");
114608  return (int) -1;
114609 }
114610 
114611 /* CIntToPy */
114612  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
114613 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114614 #pragma GCC diagnostic push
114615 #pragma GCC diagnostic ignored "-Wconversion"
114616 #endif
114617  const long neg_one = (long) -1, const_zero = (long) 0;
114618 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114619 #pragma GCC diagnostic pop
114620 #endif
114621  const int is_unsigned = neg_one > const_zero;
114622  if (is_unsigned) {
114623  if (sizeof(long) < sizeof(long)) {
114624  return PyInt_FromLong((long) value);
114625  } else if (sizeof(long) <= sizeof(unsigned long)) {
114626  return PyLong_FromUnsignedLong((unsigned long) value);
114627 #ifdef HAVE_LONG_LONG
114628  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
114629  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
114630 #endif
114631  }
114632  } else {
114633  if (sizeof(long) <= sizeof(long)) {
114634  return PyInt_FromLong((long) value);
114635 #ifdef HAVE_LONG_LONG
114636  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
114637  return PyLong_FromLongLong((PY_LONG_LONG) value);
114638 #endif
114639  }
114640  }
114641  {
114642  int one = 1; int little = (int)*(unsigned char *)&one;
114643  unsigned char *bytes = (unsigned char *)&value;
114644  return _PyLong_FromByteArray(bytes, sizeof(long),
114645  little, !is_unsigned);
114646  }
114647 }
114648 
114649 /* CIntFromPy */
114650  static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
114651 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114652 #pragma GCC diagnostic push
114653 #pragma GCC diagnostic ignored "-Wconversion"
114654 #endif
114655  const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
114656 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114657 #pragma GCC diagnostic pop
114658 #endif
114659  const int is_unsigned = neg_one > const_zero;
114660 #if PY_MAJOR_VERSION < 3
114661  if (likely(PyInt_Check(x))) {
114662  if (sizeof(size_t) < sizeof(long)) {
114663  __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
114664  } else {
114665  long val = PyInt_AS_LONG(x);
114666  if (is_unsigned && unlikely(val < 0)) {
114667  goto raise_neg_overflow;
114668  }
114669  return (size_t) val;
114670  }
114671  } else
114672 #endif
114673  if (likely(PyLong_Check(x))) {
114674  if (is_unsigned) {
114675 #if CYTHON_USE_PYLONG_INTERNALS
114676  const digit* digits = ((PyLongObject*)x)->ob_digit;
114677  switch (Py_SIZE(x)) {
114678  case 0: return (size_t) 0;
114679  case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
114680  case 2:
114681  if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
114682  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114683  __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114684  } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
114685  return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
114686  }
114687  }
114688  break;
114689  case 3:
114690  if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
114691  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114692  __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114693  } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
114694  return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
114695  }
114696  }
114697  break;
114698  case 4:
114699  if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
114700  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
114701  __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114702  } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
114703  return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
114704  }
114705  }
114706  break;
114707  }
114708 #endif
114709 #if CYTHON_COMPILING_IN_CPYTHON
114710  if (unlikely(Py_SIZE(x) < 0)) {
114711  goto raise_neg_overflow;
114712  }
114713 #else
114714  {
114715  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
114716  if (unlikely(result < 0))
114717  return (size_t) -1;
114718  if (unlikely(result == 1))
114719  goto raise_neg_overflow;
114720  }
114721 #endif
114722  if (sizeof(size_t) <= sizeof(unsigned long)) {
114723  __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
114724 #ifdef HAVE_LONG_LONG
114725  } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
114726  __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
114727 #endif
114728  }
114729  } else {
114730 #if CYTHON_USE_PYLONG_INTERNALS
114731  const digit* digits = ((PyLongObject*)x)->ob_digit;
114732  switch (Py_SIZE(x)) {
114733  case 0: return (size_t) 0;
114734  case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
114735  case 1: __PYX_VERIFY_RETURN_INT(size_t, digit, +digits[0])
114736  case -2:
114737  if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
114738  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114739  __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114740  } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
114741  return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
114742  }
114743  }
114744  break;
114745  case 2:
114746  if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
114747  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114748  __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114749  } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
114750  return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
114751  }
114752  }
114753  break;
114754  case -3:
114755  if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
114756  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114757  __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114758  } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
114759  return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
114760  }
114761  }
114762  break;
114763  case 3:
114764  if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
114765  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114766  __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114767  } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
114768  return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
114769  }
114770  }
114771  break;
114772  case -4:
114773  if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
114774  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
114775  __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114776  } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
114777  return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
114778  }
114779  }
114780  break;
114781  case 4:
114782  if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
114783  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
114784  __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114785  } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
114786  return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
114787  }
114788  }
114789  break;
114790  }
114791 #endif
114792  if (sizeof(size_t) <= sizeof(long)) {
114793  __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
114794 #ifdef HAVE_LONG_LONG
114795  } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
114796  __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
114797 #endif
114798  }
114799  }
114800  {
114801 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
114802  PyErr_SetString(PyExc_RuntimeError,
114803  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
114804 #else
114805  size_t val;
114806  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
114807  #if PY_MAJOR_VERSION < 3
114808  if (likely(v) && !PyLong_Check(v)) {
114809  PyObject *tmp = v;
114810  v = PyNumber_Long(tmp);
114811  Py_DECREF(tmp);
114812  }
114813  #endif
114814  if (likely(v)) {
114815  int one = 1; int is_little = (int)*(unsigned char *)&one;
114816  unsigned char *bytes = (unsigned char *)&val;
114817  int ret = _PyLong_AsByteArray((PyLongObject *)v,
114818  bytes, sizeof(val),
114819  is_little, !is_unsigned);
114820  Py_DECREF(v);
114821  if (likely(!ret))
114822  return val;
114823  }
114824 #endif
114825  return (size_t) -1;
114826  }
114827  } else {
114828  size_t val;
114829  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
114830  if (!tmp) return (size_t) -1;
114831  val = __Pyx_PyInt_As_size_t(tmp);
114832  Py_DECREF(tmp);
114833  return val;
114834  }
114835 raise_overflow:
114836  PyErr_SetString(PyExc_OverflowError,
114837  "value too large to convert to size_t");
114838  return (size_t) -1;
114839 raise_neg_overflow:
114840  PyErr_SetString(PyExc_OverflowError,
114841  "can't convert negative value to size_t");
114842  return (size_t) -1;
114843 }
114844 
114845 /* CIntToPy */
114846  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
114847 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114848 #pragma GCC diagnostic push
114849 #pragma GCC diagnostic ignored "-Wconversion"
114850 #endif
114851  const int neg_one = (int) -1, const_zero = (int) 0;
114852 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114853 #pragma GCC diagnostic pop
114854 #endif
114855  const int is_unsigned = neg_one > const_zero;
114856  if (is_unsigned) {
114857  if (sizeof(int) < sizeof(long)) {
114858  return PyInt_FromLong((long) value);
114859  } else if (sizeof(int) <= sizeof(unsigned long)) {
114860  return PyLong_FromUnsignedLong((unsigned long) value);
114861 #ifdef HAVE_LONG_LONG
114862  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
114863  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
114864 #endif
114865  }
114866  } else {
114867  if (sizeof(int) <= sizeof(long)) {
114868  return PyInt_FromLong((long) value);
114869 #ifdef HAVE_LONG_LONG
114870  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
114871  return PyLong_FromLongLong((PY_LONG_LONG) value);
114872 #endif
114873  }
114874  }
114875  {
114876  int one = 1; int little = (int)*(unsigned char *)&one;
114877  unsigned char *bytes = (unsigned char *)&value;
114878  return _PyLong_FromByteArray(bytes, sizeof(int),
114879  little, !is_unsigned);
114880  }
114881 }
114882 
114883 /* CIntFromPy */
114884  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
114885 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114886 #pragma GCC diagnostic push
114887 #pragma GCC diagnostic ignored "-Wconversion"
114888 #endif
114889  const long neg_one = (long) -1, const_zero = (long) 0;
114890 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
114891 #pragma GCC diagnostic pop
114892 #endif
114893  const int is_unsigned = neg_one > const_zero;
114894 #if PY_MAJOR_VERSION < 3
114895  if (likely(PyInt_Check(x))) {
114896  if (sizeof(long) < sizeof(long)) {
114897  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
114898  } else {
114899  long val = PyInt_AS_LONG(x);
114900  if (is_unsigned && unlikely(val < 0)) {
114901  goto raise_neg_overflow;
114902  }
114903  return (long) val;
114904  }
114905  } else
114906 #endif
114907  if (likely(PyLong_Check(x))) {
114908  if (is_unsigned) {
114909 #if CYTHON_USE_PYLONG_INTERNALS
114910  const digit* digits = ((PyLongObject*)x)->ob_digit;
114911  switch (Py_SIZE(x)) {
114912  case 0: return (long) 0;
114913  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
114914  case 2:
114915  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
114916  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114917  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114918  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
114919  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
114920  }
114921  }
114922  break;
114923  case 3:
114924  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
114925  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114926  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114927  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
114928  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
114929  }
114930  }
114931  break;
114932  case 4:
114933  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
114934  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
114935  __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])))
114936  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
114937  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
114938  }
114939  }
114940  break;
114941  }
114942 #endif
114943 #if CYTHON_COMPILING_IN_CPYTHON
114944  if (unlikely(Py_SIZE(x) < 0)) {
114945  goto raise_neg_overflow;
114946  }
114947 #else
114948  {
114949  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
114950  if (unlikely(result < 0))
114951  return (long) -1;
114952  if (unlikely(result == 1))
114953  goto raise_neg_overflow;
114954  }
114955 #endif
114956  if (sizeof(long) <= sizeof(unsigned long)) {
114957  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
114958 #ifdef HAVE_LONG_LONG
114959  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
114960  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
114961 #endif
114962  }
114963  } else {
114964 #if CYTHON_USE_PYLONG_INTERNALS
114965  const digit* digits = ((PyLongObject*)x)->ob_digit;
114966  switch (Py_SIZE(x)) {
114967  case 0: return (long) 0;
114968  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
114969  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
114970  case -2:
114971  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
114972  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114973  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114974  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
114975  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
114976  }
114977  }
114978  break;
114979  case 2:
114980  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
114981  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
114982  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114983  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
114984  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
114985  }
114986  }
114987  break;
114988  case -3:
114989  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
114990  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
114991  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
114992  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
114993  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
114994  }
114995  }
114996  break;
114997  case 3:
114998  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
114999  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
115000  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115001  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
115002  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
115003  }
115004  }
115005  break;
115006  case -4:
115007  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
115008  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
115009  __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])))
115010  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
115011  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
115012  }
115013  }
115014  break;
115015  case 4:
115016  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
115017  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
115018  __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])))
115019  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
115020  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
115021  }
115022  }
115023  break;
115024  }
115025 #endif
115026  if (sizeof(long) <= sizeof(long)) {
115027  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
115028 #ifdef HAVE_LONG_LONG
115029  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
115030  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
115031 #endif
115032  }
115033  }
115034  {
115035 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
115036  PyErr_SetString(PyExc_RuntimeError,
115037  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
115038 #else
115039  long val;
115040  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
115041  #if PY_MAJOR_VERSION < 3
115042  if (likely(v) && !PyLong_Check(v)) {
115043  PyObject *tmp = v;
115044  v = PyNumber_Long(tmp);
115045  Py_DECREF(tmp);
115046  }
115047  #endif
115048  if (likely(v)) {
115049  int one = 1; int is_little = (int)*(unsigned char *)&one;
115050  unsigned char *bytes = (unsigned char *)&val;
115051  int ret = _PyLong_AsByteArray((PyLongObject *)v,
115052  bytes, sizeof(val),
115053  is_little, !is_unsigned);
115054  Py_DECREF(v);
115055  if (likely(!ret))
115056  return val;
115057  }
115058 #endif
115059  return (long) -1;
115060  }
115061  } else {
115062  long val;
115063  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
115064  if (!tmp) return (long) -1;
115065  val = __Pyx_PyInt_As_long(tmp);
115066  Py_DECREF(tmp);
115067  return val;
115068  }
115069 raise_overflow:
115070  PyErr_SetString(PyExc_OverflowError,
115071  "value too large to convert to long");
115072  return (long) -1;
115073 raise_neg_overflow:
115074  PyErr_SetString(PyExc_OverflowError,
115075  "can't convert negative value to long");
115076  return (long) -1;
115077 }
115078 
115079 /* PrintOne */
115080  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
115081 static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
115082  if (!f) {
115083  if (!(f = __Pyx_GetStdout()))
115084  return -1;
115085  }
115086  Py_INCREF(f);
115087  if (PyFile_SoftSpace(f, 0)) {
115088  if (PyFile_WriteString(" ", f) < 0)
115089  goto error;
115090  }
115091  if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
115092  goto error;
115093  if (PyFile_WriteString("\n", f) < 0)
115094  goto error;
115095  Py_DECREF(f);
115096  return 0;
115097 error:
115098  Py_DECREF(f);
115099  return -1;
115100  /* the line below is just to avoid C compiler
115101  * warnings about unused functions */
115102  return __Pyx_Print(f, NULL, 0);
115103 }
115104 #else
115105 static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
115106  int res;
115107  PyObject* arg_tuple = PyTuple_Pack(1, o);
115108  if (unlikely(!arg_tuple))
115109  return -1;
115110  res = __Pyx_Print(stream, arg_tuple, 1);
115111  Py_DECREF(arg_tuple);
115112  return res;
115113 }
115114 #endif
115115 
115116 /* CIntFromPy */
115117  static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
115118 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
115119 #pragma GCC diagnostic push
115120 #pragma GCC diagnostic ignored "-Wconversion"
115121 #endif
115122  const char neg_one = (char) -1, const_zero = (char) 0;
115123 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
115124 #pragma GCC diagnostic pop
115125 #endif
115126  const int is_unsigned = neg_one > const_zero;
115127 #if PY_MAJOR_VERSION < 3
115128  if (likely(PyInt_Check(x))) {
115129  if (sizeof(char) < sizeof(long)) {
115130  __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
115131  } else {
115132  long val = PyInt_AS_LONG(x);
115133  if (is_unsigned && unlikely(val < 0)) {
115134  goto raise_neg_overflow;
115135  }
115136  return (char) val;
115137  }
115138  } else
115139 #endif
115140  if (likely(PyLong_Check(x))) {
115141  if (is_unsigned) {
115142 #if CYTHON_USE_PYLONG_INTERNALS
115143  const digit* digits = ((PyLongObject*)x)->ob_digit;
115144  switch (Py_SIZE(x)) {
115145  case 0: return (char) 0;
115146  case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
115147  case 2:
115148  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
115149  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
115150  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115151  } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
115152  return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
115153  }
115154  }
115155  break;
115156  case 3:
115157  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
115158  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
115159  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115160  } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
115161  return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
115162  }
115163  }
115164  break;
115165  case 4:
115166  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
115167  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
115168  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115169  } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
115170  return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
115171  }
115172  }
115173  break;
115174  }
115175 #endif
115176 #if CYTHON_COMPILING_IN_CPYTHON
115177  if (unlikely(Py_SIZE(x) < 0)) {
115178  goto raise_neg_overflow;
115179  }
115180 #else
115181  {
115182  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
115183  if (unlikely(result < 0))
115184  return (char) -1;
115185  if (unlikely(result == 1))
115186  goto raise_neg_overflow;
115187  }
115188 #endif
115189  if (sizeof(char) <= sizeof(unsigned long)) {
115190  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
115191 #ifdef HAVE_LONG_LONG
115192  } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
115193  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
115194 #endif
115195  }
115196  } else {
115197 #if CYTHON_USE_PYLONG_INTERNALS
115198  const digit* digits = ((PyLongObject*)x)->ob_digit;
115199  switch (Py_SIZE(x)) {
115200  case 0: return (char) 0;
115201  case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
115202  case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
115203  case -2:
115204  if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
115205  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
115206  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115207  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
115208  return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
115209  }
115210  }
115211  break;
115212  case 2:
115213  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
115214  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
115215  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115216  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
115217  return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
115218  }
115219  }
115220  break;
115221  case -3:
115222  if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
115223  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
115224  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115225  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
115226  return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
115227  }
115228  }
115229  break;
115230  case 3:
115231  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
115232  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
115233  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115234  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
115235  return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
115236  }
115237  }
115238  break;
115239  case -4:
115240  if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
115241  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
115242  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115243  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
115244  return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
115245  }
115246  }
115247  break;
115248  case 4:
115249  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
115250  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
115251  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
115252  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
115253  return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
115254  }
115255  }
115256  break;
115257  }
115258 #endif
115259  if (sizeof(char) <= sizeof(long)) {
115260  __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
115261 #ifdef HAVE_LONG_LONG
115262  } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
115263  __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
115264 #endif
115265  }
115266  }
115267  {
115268 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
115269  PyErr_SetString(PyExc_RuntimeError,
115270  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
115271 #else
115272  char val;
115273  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
115274  #if PY_MAJOR_VERSION < 3
115275  if (likely(v) && !PyLong_Check(v)) {
115276  PyObject *tmp = v;
115277  v = PyNumber_Long(tmp);
115278  Py_DECREF(tmp);
115279  }
115280  #endif
115281  if (likely(v)) {
115282  int one = 1; int is_little = (int)*(unsigned char *)&one;
115283  unsigned char *bytes = (unsigned char *)&val;
115284  int ret = _PyLong_AsByteArray((PyLongObject *)v,
115285  bytes, sizeof(val),
115286  is_little, !is_unsigned);
115287  Py_DECREF(v);
115288  if (likely(!ret))
115289  return val;
115290  }
115291 #endif
115292  return (char) -1;
115293  }
115294  } else {
115295  char val;
115296  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
115297  if (!tmp) return (char) -1;
115298  val = __Pyx_PyInt_As_char(tmp);
115299  Py_DECREF(tmp);
115300  return val;
115301  }
115302 raise_overflow:
115303  PyErr_SetString(PyExc_OverflowError,
115304  "value too large to convert to char");
115305  return (char) -1;
115306 raise_neg_overflow:
115307  PyErr_SetString(PyExc_OverflowError,
115308  "can't convert negative value to char");
115309  return (char) -1;
115310 }
115311 
115312 /* PyObjectGetMethod */
115313  static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
115314  PyObject *attr;
115315 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
115316  PyTypeObject *tp = Py_TYPE(obj);
115317  PyObject *descr;
115318  descrgetfunc f = NULL;
115319  PyObject **dictptr, *dict;
115320  int meth_found = 0;
115321  assert (*method == NULL);
115322  if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
115323  attr = __Pyx_PyObject_GetAttrStr(obj, name);
115324  goto try_unpack;
115325  }
115326  if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
115327  return 0;
115328  }
115329  descr = _PyType_Lookup(tp, name);
115330  if (likely(descr != NULL)) {
115331  Py_INCREF(descr);
115332 #if PY_MAJOR_VERSION >= 3
115333  #ifdef __Pyx_CyFunction_USED
115334  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
115335  #else
115336  if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type)))
115337  #endif
115338 #else
115339  #ifdef __Pyx_CyFunction_USED
115340  if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
115341  #else
115342  if (likely(PyFunction_Check(descr)))
115343  #endif
115344 #endif
115345  {
115346  meth_found = 1;
115347  } else {
115348  f = Py_TYPE(descr)->tp_descr_get;
115349  if (f != NULL && PyDescr_IsData(descr)) {
115350  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
115351  Py_DECREF(descr);
115352  goto try_unpack;
115353  }
115354  }
115355  }
115356  dictptr = _PyObject_GetDictPtr(obj);
115357  if (dictptr != NULL && (dict = *dictptr) != NULL) {
115358  Py_INCREF(dict);
115359  attr = __Pyx_PyDict_GetItemStr(dict, name);
115360  if (attr != NULL) {
115361  Py_INCREF(attr);
115362  Py_DECREF(dict);
115363  Py_XDECREF(descr);
115364  goto try_unpack;
115365  }
115366  Py_DECREF(dict);
115367  }
115368  if (meth_found) {
115369  *method = descr;
115370  return 1;
115371  }
115372  if (f != NULL) {
115373  attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
115374  Py_DECREF(descr);
115375  goto try_unpack;
115376  }
115377  if (descr != NULL) {
115378  *method = descr;
115379  return 0;
115380  }
115381  PyErr_Format(PyExc_AttributeError,
115382 #if PY_MAJOR_VERSION >= 3
115383  "'%.50s' object has no attribute '%U'",
115384  tp->tp_name, name);
115385 #else
115386  "'%.50s' object has no attribute '%.400s'",
115387  tp->tp_name, PyString_AS_STRING(name));
115388 #endif
115389  return 0;
115390 #else
115391  attr = __Pyx_PyObject_GetAttrStr(obj, name);
115392  goto try_unpack;
115393 #endif
115394 try_unpack:
115395 #if CYTHON_UNPACK_METHODS
115396  if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
115397  PyObject *function = PyMethod_GET_FUNCTION(attr);
115398  Py_INCREF(function);
115399  Py_DECREF(attr);
115400  *method = function;
115401  return 1;
115402  }
115403 #endif
115404  *method = attr;
115405  return 0;
115406 }
115407 
115408 /* PyObjectCallMethod1 */
115409  static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
115410  PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
115411  Py_DECREF(method);
115412  return result;
115413 }
115414 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
115415  PyObject *method = NULL, *result;
115416  int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
115417  if (likely(is_method)) {
115418  result = __Pyx_PyObject_Call2Args(method, obj, arg);
115419  Py_DECREF(method);
115420  return result;
115421  }
115422  if (unlikely(!method)) return NULL;
115423  return __Pyx__PyObject_CallMethod1(method, arg);
115424 }
115425 
115426 /* CoroutineBase */
115427  #include <structmember.h>
115428 #include <frameobject.h>
115429 #if PY_VERSION_HEX >= 0x030b00a6
115430  #ifndef Py_BUILD_CORE
115431  #define Py_BUILD_CORE 1
115432  #endif
115433  #include "internal/pycore_frame.h"
115434 #endif
115435 #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
115436 static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
115437  PyObject *et, *ev, *tb;
115438  PyObject *value = NULL;
115439  __Pyx_ErrFetch(&et, &ev, &tb);
115440  if (!et) {
115441  Py_XDECREF(tb);
115442  Py_XDECREF(ev);
115443  Py_INCREF(Py_None);
115444  *pvalue = Py_None;
115445  return 0;
115446  }
115447  if (likely(et == PyExc_StopIteration)) {
115448  if (!ev) {
115449  Py_INCREF(Py_None);
115450  value = Py_None;
115451  }
115452 #if PY_VERSION_HEX >= 0x030300A0
115453  else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
115454  value = ((PyStopIterationObject *)ev)->value;
115455  Py_INCREF(value);
115456  Py_DECREF(ev);
115457  }
115458 #endif
115459  else if (unlikely(PyTuple_Check(ev))) {
115460  if (PyTuple_GET_SIZE(ev) >= 1) {
115461 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
115462  value = PyTuple_GET_ITEM(ev, 0);
115463  Py_INCREF(value);
115464 #else
115465  value = PySequence_ITEM(ev, 0);
115466 #endif
115467  } else {
115468  Py_INCREF(Py_None);
115469  value = Py_None;
115470  }
115471  Py_DECREF(ev);
115472  }
115473  else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
115474  value = ev;
115475  }
115476  if (likely(value)) {
115477  Py_XDECREF(tb);
115478  Py_DECREF(et);
115479  *pvalue = value;
115480  return 0;
115481  }
115482  } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
115483  __Pyx_ErrRestore(et, ev, tb);
115484  return -1;
115485  }
115486  PyErr_NormalizeException(&et, &ev, &tb);
115487  if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
115488  __Pyx_ErrRestore(et, ev, tb);
115489  return -1;
115490  }
115491  Py_XDECREF(tb);
115492  Py_DECREF(et);
115493 #if PY_VERSION_HEX >= 0x030300A0
115494  value = ((PyStopIterationObject *)ev)->value;
115495  Py_INCREF(value);
115496  Py_DECREF(ev);
115497 #else
115498  {
115499  PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
115500  Py_DECREF(ev);
115501  if (likely(args)) {
115502  value = PySequence_GetItem(args, 0);
115503  Py_DECREF(args);
115504  }
115505  if (unlikely(!value)) {
115506  __Pyx_ErrRestore(NULL, NULL, NULL);
115507  Py_INCREF(Py_None);
115508  value = Py_None;
115509  }
115510  }
115511 #endif
115512  *pvalue = value;
115513  return 0;
115514 }
115515 static CYTHON_INLINE
115516 void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) {
115517  PyObject *t, *v, *tb;
115518  t = exc_state->exc_type;
115519  v = exc_state->exc_value;
115520  tb = exc_state->exc_traceback;
115521  exc_state->exc_type = NULL;
115522  exc_state->exc_value = NULL;
115523  exc_state->exc_traceback = NULL;
115524  Py_XDECREF(t);
115525  Py_XDECREF(v);
115526  Py_XDECREF(tb);
115527 }
115528 #define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
115529 static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
115530  const char *msg;
115531  if ((0)) {
115532  #ifdef __Pyx_Coroutine_USED
115533  } else if (__Pyx_Coroutine_Check((PyObject*)gen)) {
115534  msg = "coroutine already executing";
115535  #endif
115536  #ifdef __Pyx_AsyncGen_USED
115537  } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
115538  msg = "async generator already executing";
115539  #endif
115540  } else {
115541  msg = "generator already executing";
115542  }
115543  PyErr_SetString(PyExc_ValueError, msg);
115544 }
115545 #define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
115546 static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
115547  const char *msg;
115548  if ((0)) {
115549  #ifdef __Pyx_Coroutine_USED
115550  } else if (__Pyx_Coroutine_Check(gen)) {
115551  msg = "can't send non-None value to a just-started coroutine";
115552  #endif
115553  #ifdef __Pyx_AsyncGen_USED
115554  } else if (__Pyx_AsyncGen_CheckExact(gen)) {
115555  msg = "can't send non-None value to a just-started async generator";
115556  #endif
115557  } else {
115558  msg = "can't send non-None value to a just-started generator";
115559  }
115560  PyErr_SetString(PyExc_TypeError, msg);
115561 }
115562 #define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
115563 static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
115564  #ifdef __Pyx_Coroutine_USED
115565  if (!closing && __Pyx_Coroutine_Check(gen)) {
115566  PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
115567  } else
115568  #endif
115569  if (value) {
115570  #ifdef __Pyx_AsyncGen_USED
115571  if (__Pyx_AsyncGen_CheckExact(gen))
115572  PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
115573  else
115574  #endif
115575  PyErr_SetNone(PyExc_StopIteration);
115576  }
115577 }
115578 static
115579 PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
115580  __Pyx_PyThreadState_declare
115581  PyThreadState *tstate;
115582  __Pyx_ExcInfoStruct *exc_state;
115583  PyObject *retval;
115584  assert(!self->is_running);
115585  if (unlikely(self->resume_label == 0)) {
115586  if (unlikely(value && value != Py_None)) {
115587  return __Pyx_Coroutine_NotStartedError((PyObject*)self);
115588  }
115589  }
115590  if (unlikely(self->resume_label == -1)) {
115591  return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
115592  }
115593 #if CYTHON_FAST_THREAD_STATE
115594  __Pyx_PyThreadState_assign
115595  tstate = __pyx_tstate;
115596 #else
115597  tstate = __Pyx_PyThreadState_Current;
115598 #endif
115599  exc_state = &self->gi_exc_state;
115600  if (exc_state->exc_type) {
115601  #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
115602  #else
115603  if (exc_state->exc_traceback) {
115604  PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback;
115605  PyFrameObject *f = tb->tb_frame;
115606  assert(f->f_back == NULL);
115607  #if PY_VERSION_HEX >= 0x030B00A1
115608  f->f_back = PyThreadState_GetFrame(tstate);
115609  #else
115610  Py_XINCREF(tstate->frame);
115611  f->f_back = tstate->frame;
115612  #endif
115613  }
115614  #endif
115615  }
115616 #if CYTHON_USE_EXC_INFO_STACK
115617  exc_state->previous_item = tstate->exc_info;
115618  tstate->exc_info = exc_state;
115619 #else
115620  if (exc_state->exc_type) {
115621  __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
115622  } else {
115623  __Pyx_Coroutine_ExceptionClear(exc_state);
115624  __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback);
115625  }
115626 #endif
115627  self->is_running = 1;
115628  retval = self->body((PyObject *) self, tstate, value);
115629  self->is_running = 0;
115630 #if CYTHON_USE_EXC_INFO_STACK
115631  exc_state = &self->gi_exc_state;
115632  tstate->exc_info = exc_state->previous_item;
115633  exc_state->previous_item = NULL;
115634  __Pyx_Coroutine_ResetFrameBackpointer(exc_state);
115635 #endif
115636  return retval;
115637 }
115638 static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) {
115639  PyObject *exc_tb = exc_state->exc_traceback;
115640  if (likely(exc_tb)) {
115641 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
115642 #else
115643  PyTracebackObject *tb = (PyTracebackObject *) exc_tb;
115644  PyFrameObject *f = tb->tb_frame;
115645  Py_CLEAR(f->f_back);
115646 #endif
115647  }
115648 }
115649 static CYTHON_INLINE
115650 PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
115651  if (unlikely(!retval)) {
115652  __Pyx_PyThreadState_declare
115653  __Pyx_PyThreadState_assign
115654  if (!__Pyx_PyErr_Occurred()) {
115655  PyObject *exc = PyExc_StopIteration;
115656  #ifdef __Pyx_AsyncGen_USED
115657  if (__Pyx_AsyncGen_CheckExact(gen))
115658  exc = __Pyx_PyExc_StopAsyncIteration;
115659  #endif
115660  __Pyx_PyErr_SetNone(exc);
115661  }
115662  }
115663  return retval;
115664 }
115665 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
115666 static CYTHON_INLINE
115667 PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) {
115668 #if PY_VERSION_HEX <= 0x030A00A1
115669  return _PyGen_Send(gen, arg);
115670 #else
115671  PyObject *result;
115672  if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) {
115673  if (PyAsyncGen_CheckExact(gen)) {
115674  assert(result == Py_None);
115675  PyErr_SetNone(PyExc_StopAsyncIteration);
115676  }
115677  else if (result == Py_None) {
115678  PyErr_SetNone(PyExc_StopIteration);
115679  }
115680  else {
115681  _PyGen_SetStopIterationValue(result);
115682  }
115683  Py_CLEAR(result);
115684  }
115685  return result;
115686 #endif
115687 }
115688 #endif
115689 static CYTHON_INLINE
115690 PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
115691  PyObject *ret;
115692  PyObject *val = NULL;
115693  __Pyx_Coroutine_Undelegate(gen);
115694  __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
115695  ret = __Pyx_Coroutine_SendEx(gen, val, 0);
115696  Py_XDECREF(val);
115697  return ret;
115698 }
115699 static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
115700  PyObject *retval;
115701  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
115702  PyObject *yf = gen->yieldfrom;
115703  if (unlikely(gen->is_running))
115704  return __Pyx_Coroutine_AlreadyRunningError(gen);
115705  if (yf) {
115706  PyObject *ret;
115707  gen->is_running = 1;
115708  #ifdef __Pyx_Generator_USED
115709  if (__Pyx_Generator_CheckExact(yf)) {
115710  ret = __Pyx_Coroutine_Send(yf, value);
115711  } else
115712  #endif
115713  #ifdef __Pyx_Coroutine_USED
115714  if (__Pyx_Coroutine_Check(yf)) {
115715  ret = __Pyx_Coroutine_Send(yf, value);
115716  } else
115717  #endif
115718  #ifdef __Pyx_AsyncGen_USED
115719  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
115720  ret = __Pyx_async_gen_asend_send(yf, value);
115721  } else
115722  #endif
115723  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
115724  if (PyGen_CheckExact(yf)) {
115725  ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
115726  } else
115727  #endif
115728  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
115729  if (PyCoro_CheckExact(yf)) {
115730  ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
115731  } else
115732  #endif
115733  {
115734  if (value == Py_None)
115735  ret = Py_TYPE(yf)->tp_iternext(yf);
115736  else
115737  ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
115738  }
115739  gen->is_running = 0;
115740  if (likely(ret)) {
115741  return ret;
115742  }
115743  retval = __Pyx_Coroutine_FinishDelegation(gen);
115744  } else {
115745  retval = __Pyx_Coroutine_SendEx(gen, value, 0);
115746  }
115747  return __Pyx_Coroutine_MethodReturn(self, retval);
115748 }
115749 static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
115750  PyObject *retval = NULL;
115751  int err = 0;
115752  #ifdef __Pyx_Generator_USED
115753  if (__Pyx_Generator_CheckExact(yf)) {
115754  retval = __Pyx_Coroutine_Close(yf);
115755  if (!retval)
115756  return -1;
115757  } else
115758  #endif
115759  #ifdef __Pyx_Coroutine_USED
115760  if (__Pyx_Coroutine_Check(yf)) {
115761  retval = __Pyx_Coroutine_Close(yf);
115762  if (!retval)
115763  return -1;
115764  } else
115765  if (__Pyx_CoroutineAwait_CheckExact(yf)) {
115766  retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL);
115767  if (!retval)
115768  return -1;
115769  } else
115770  #endif
115771  #ifdef __Pyx_AsyncGen_USED
115772  if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
115773  retval = __Pyx_async_gen_asend_close(yf, NULL);
115774  } else
115775  if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
115776  retval = __Pyx_async_gen_athrow_close(yf, NULL);
115777  } else
115778  #endif
115779  {
115780  PyObject *meth;
115781  gen->is_running = 1;
115782  meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
115783  if (unlikely(!meth)) {
115784  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
115785  PyErr_WriteUnraisable(yf);
115786  }
115787  PyErr_Clear();
115788  } else {
115789  retval = PyObject_CallFunction(meth, NULL);
115790  Py_DECREF(meth);
115791  if (!retval)
115792  err = -1;
115793  }
115794  gen->is_running = 0;
115795  }
115796  Py_XDECREF(retval);
115797  return err;
115798 }
115799 static PyObject *__Pyx_Generator_Next(PyObject *self) {
115800  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
115801  PyObject *yf = gen->yieldfrom;
115802  if (unlikely(gen->is_running))
115803  return __Pyx_Coroutine_AlreadyRunningError(gen);
115804  if (yf) {
115805  PyObject *ret;
115806  gen->is_running = 1;
115807  #ifdef __Pyx_Generator_USED
115808  if (__Pyx_Generator_CheckExact(yf)) {
115809  ret = __Pyx_Generator_Next(yf);
115810  } else
115811  #endif
115812  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
115813  if (PyGen_CheckExact(yf)) {
115814  ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL);
115815  } else
115816  #endif
115817  #ifdef __Pyx_Coroutine_USED
115818  if (__Pyx_Coroutine_Check(yf)) {
115819  ret = __Pyx_Coroutine_Send(yf, Py_None);
115820  } else
115821  #endif
115822  ret = Py_TYPE(yf)->tp_iternext(yf);
115823  gen->is_running = 0;
115824  if (likely(ret)) {
115825  return ret;
115826  }
115827  return __Pyx_Coroutine_FinishDelegation(gen);
115828  }
115829  return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
115830 }
115831 static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) {
115832  return __Pyx_Coroutine_Close(self);
115833 }
115834 static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
115835  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
115836  PyObject *retval, *raised_exception;
115837  PyObject *yf = gen->yieldfrom;
115838  int err = 0;
115839  if (unlikely(gen->is_running))
115840  return __Pyx_Coroutine_AlreadyRunningError(gen);
115841  if (yf) {
115842  Py_INCREF(yf);
115843  err = __Pyx_Coroutine_CloseIter(gen, yf);
115844  __Pyx_Coroutine_Undelegate(gen);
115845  Py_DECREF(yf);
115846  }
115847  if (err == 0)
115848  PyErr_SetNone(PyExc_GeneratorExit);
115849  retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
115850  if (unlikely(retval)) {
115851  const char *msg;
115852  Py_DECREF(retval);
115853  if ((0)) {
115854  #ifdef __Pyx_Coroutine_USED
115855  } else if (__Pyx_Coroutine_Check(self)) {
115856  msg = "coroutine ignored GeneratorExit";
115857  #endif
115858  #ifdef __Pyx_AsyncGen_USED
115859  } else if (__Pyx_AsyncGen_CheckExact(self)) {
115860 #if PY_VERSION_HEX < 0x03060000
115861  msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
115862 #else
115863  msg = "async generator ignored GeneratorExit";
115864 #endif
115865  #endif
115866  } else {
115867  msg = "generator ignored GeneratorExit";
115868  }
115869  PyErr_SetString(PyExc_RuntimeError, msg);
115870  return NULL;
115871  }
115872  raised_exception = PyErr_Occurred();
115873  if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
115874  if (raised_exception) PyErr_Clear();
115875  Py_INCREF(Py_None);
115876  return Py_None;
115877  }
115878  return NULL;
115879 }
115880 static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
115881  PyObject *args, int close_on_genexit) {
115882  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
115883  PyObject *yf = gen->yieldfrom;
115884  if (unlikely(gen->is_running))
115885  return __Pyx_Coroutine_AlreadyRunningError(gen);
115886  if (yf) {
115887  PyObject *ret;
115888  Py_INCREF(yf);
115889  if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
115890  int err = __Pyx_Coroutine_CloseIter(gen, yf);
115891  Py_DECREF(yf);
115892  __Pyx_Coroutine_Undelegate(gen);
115893  if (err < 0)
115894  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
115895  goto throw_here;
115896  }
115897  gen->is_running = 1;
115898  if (0
115899  #ifdef __Pyx_Generator_USED
115900  || __Pyx_Generator_CheckExact(yf)
115901  #endif
115902  #ifdef __Pyx_Coroutine_USED
115903  || __Pyx_Coroutine_Check(yf)
115904  #endif
115905  ) {
115906  ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
115907  #ifdef __Pyx_Coroutine_USED
115908  } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
115909  ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
115910  #endif
115911  } else {
115912  PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
115913  if (unlikely(!meth)) {
115914  Py_DECREF(yf);
115915  if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
115916  gen->is_running = 0;
115917  return NULL;
115918  }
115919  PyErr_Clear();
115920  __Pyx_Coroutine_Undelegate(gen);
115921  gen->is_running = 0;
115922  goto throw_here;
115923  }
115924  if (likely(args)) {
115925  ret = PyObject_CallObject(meth, args);
115926  } else {
115927  ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
115928  }
115929  Py_DECREF(meth);
115930  }
115931  gen->is_running = 0;
115932  Py_DECREF(yf);
115933  if (!ret) {
115934  ret = __Pyx_Coroutine_FinishDelegation(gen);
115935  }
115936  return __Pyx_Coroutine_MethodReturn(self, ret);
115937  }
115938 throw_here:
115939  __Pyx_Raise(typ, val, tb, NULL);
115940  return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
115941 }
115942 static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
115943  PyObject *typ;
115944  PyObject *val = NULL;
115945  PyObject *tb = NULL;
115946  if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
115947  return NULL;
115948  return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
115949 }
115950 static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) {
115951  Py_VISIT(exc_state->exc_type);
115952  Py_VISIT(exc_state->exc_value);
115953  Py_VISIT(exc_state->exc_traceback);
115954  return 0;
115955 }
115956 static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
115957  Py_VISIT(gen->closure);
115958  Py_VISIT(gen->classobj);
115959  Py_VISIT(gen->yieldfrom);
115960  return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg);
115961 }
115962 static int __Pyx_Coroutine_clear(PyObject *self) {
115963  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
115964  Py_CLEAR(gen->closure);
115965  Py_CLEAR(gen->classobj);
115966  Py_CLEAR(gen->yieldfrom);
115967  __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state);
115968 #ifdef __Pyx_AsyncGen_USED
115969  if (__Pyx_AsyncGen_CheckExact(self)) {
115970  Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
115971  }
115972 #endif
115973  Py_CLEAR(gen->gi_code);
115974  Py_CLEAR(gen->gi_frame);
115975  Py_CLEAR(gen->gi_name);
115976  Py_CLEAR(gen->gi_qualname);
115977  Py_CLEAR(gen->gi_modulename);
115978  return 0;
115979 }
115980 static void __Pyx_Coroutine_dealloc(PyObject *self) {
115981  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
115982  PyObject_GC_UnTrack(gen);
115983  if (gen->gi_weakreflist != NULL)
115984  PyObject_ClearWeakRefs(self);
115985  if (gen->resume_label >= 0) {
115986  PyObject_GC_Track(self);
115987 #if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
115988  if (PyObject_CallFinalizerFromDealloc(self))
115989 #else
115990  Py_TYPE(gen)->tp_del(self);
115991  if (Py_REFCNT(self) > 0)
115992 #endif
115993  {
115994  return;
115995  }
115996  PyObject_GC_UnTrack(self);
115997  }
115998 #ifdef __Pyx_AsyncGen_USED
115999  if (__Pyx_AsyncGen_CheckExact(self)) {
116000  /* We have to handle this case for asynchronous generators
116001  right here, because this code has to be between UNTRACK
116002  and GC_Del. */
116003  Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
116004  }
116005 #endif
116006  __Pyx_Coroutine_clear(self);
116007  PyObject_GC_Del(gen);
116008 }
116009 static void __Pyx_Coroutine_del(PyObject *self) {
116010  PyObject *error_type, *error_value, *error_traceback;
116011  __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
116012  __Pyx_PyThreadState_declare
116013  if (gen->resume_label < 0) {
116014  return;
116015  }
116016 #if !CYTHON_USE_TP_FINALIZE
116017  assert(self->ob_refcnt == 0);
116018  __Pyx_SET_REFCNT(self, 1);
116019 #endif
116020  __Pyx_PyThreadState_assign
116021  __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
116022 #ifdef __Pyx_AsyncGen_USED
116023  if (__Pyx_AsyncGen_CheckExact(self)) {
116024  __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
116025  PyObject *finalizer = agen->ag_finalizer;
116026  if (finalizer && !agen->ag_closed) {
116027  PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
116028  if (unlikely(!res)) {
116029  PyErr_WriteUnraisable(self);
116030  } else {
116031  Py_DECREF(res);
116032  }
116033  __Pyx_ErrRestore(error_type, error_value, error_traceback);
116034  return;
116035  }
116036  }
116037 #endif
116038  if (unlikely(gen->resume_label == 0 && !error_value)) {
116039 #ifdef __Pyx_Coroutine_USED
116040 #ifdef __Pyx_Generator_USED
116041  if (!__Pyx_Generator_CheckExact(self))
116042 #endif
116043  {
116044  PyObject_GC_UnTrack(self);
116045 #if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
116046  if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
116047  PyErr_WriteUnraisable(self);
116048 #else
116049  {PyObject *msg;
116050  char *cmsg;
116051  #if CYTHON_COMPILING_IN_PYPY
116052  msg = NULL;
116053  cmsg = (char*) "coroutine was never awaited";
116054  #else
116055  char *cname;
116056  PyObject *qualname;
116057  qualname = gen->gi_qualname;
116058  cname = PyString_AS_STRING(qualname);
116059  msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
116060  if (unlikely(!msg)) {
116061  PyErr_Clear();
116062  cmsg = (char*) "coroutine was never awaited";
116063  } else {
116064  cmsg = PyString_AS_STRING(msg);
116065  }
116066  #endif
116067  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
116068  PyErr_WriteUnraisable(self);
116069  Py_XDECREF(msg);}
116070 #endif
116071  PyObject_GC_Track(self);
116072  }
116073 #endif
116074  } else {
116075  PyObject *res = __Pyx_Coroutine_Close(self);
116076  if (unlikely(!res)) {
116077  if (PyErr_Occurred())
116078  PyErr_WriteUnraisable(self);
116079  } else {
116080  Py_DECREF(res);
116081  }
116082  }
116083  __Pyx_ErrRestore(error_type, error_value, error_traceback);
116084 #if !CYTHON_USE_TP_FINALIZE
116085  assert(Py_REFCNT(self) > 0);
116086  if (--self->ob_refcnt == 0) {
116087  return;
116088  }
116089  {
116090  Py_ssize_t refcnt = Py_REFCNT(self);
116091  _Py_NewReference(self);
116092  __Pyx_SET_REFCNT(self, refcnt);
116093  }
116094 #if CYTHON_COMPILING_IN_CPYTHON
116095  assert(PyType_IS_GC(Py_TYPE(self)) &&
116096  _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
116097  _Py_DEC_REFTOTAL;
116098 #endif
116099 #ifdef COUNT_ALLOCS
116100  --Py_TYPE(self)->tp_frees;
116101  --Py_TYPE(self)->tp_allocs;
116102 #endif
116103 #endif
116104 }
116105 static PyObject *
116106 __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
116107 {
116108  PyObject *name = self->gi_name;
116109  if (unlikely(!name)) name = Py_None;
116110  Py_INCREF(name);
116111  return name;
116112 }
116113 static int
116114 __Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
116115 {
116116  PyObject *tmp;
116117 #if PY_MAJOR_VERSION >= 3
116118  if (unlikely(value == NULL || !PyUnicode_Check(value)))
116119 #else
116120  if (unlikely(value == NULL || !PyString_Check(value)))
116121 #endif
116122  {
116123  PyErr_SetString(PyExc_TypeError,
116124  "__name__ must be set to a string object");
116125  return -1;
116126  }
116127  tmp = self->gi_name;
116128  Py_INCREF(value);
116129  self->gi_name = value;
116130  Py_XDECREF(tmp);
116131  return 0;
116132 }
116133 static PyObject *
116134 __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
116135 {
116136  PyObject *name = self->gi_qualname;
116137  if (unlikely(!name)) name = Py_None;
116138  Py_INCREF(name);
116139  return name;
116140 }
116141 static int
116142 __Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context)
116143 {
116144  PyObject *tmp;
116145 #if PY_MAJOR_VERSION >= 3
116146  if (unlikely(value == NULL || !PyUnicode_Check(value)))
116147 #else
116148  if (unlikely(value == NULL || !PyString_Check(value)))
116149 #endif
116150  {
116151  PyErr_SetString(PyExc_TypeError,
116152  "__qualname__ must be set to a string object");
116153  return -1;
116154  }
116155  tmp = self->gi_qualname;
116156  Py_INCREF(value);
116157  self->gi_qualname = value;
116158  Py_XDECREF(tmp);
116159  return 0;
116160 }
116161 static PyObject *
116162 __Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context)
116163 {
116164  PyObject *frame = self->gi_frame;
116165  if (!frame) {
116166  if (unlikely(!self->gi_code)) {
116167  Py_RETURN_NONE;
116168  }
116169  frame = (PyObject *) PyFrame_New(
116170  PyThreadState_Get(), /*PyThreadState *tstate,*/
116171  (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/
116172  __pyx_d, /*PyObject *globals,*/
116173  0 /*PyObject *locals*/
116174  );
116175  if (unlikely(!frame))
116176  return NULL;
116177  self->gi_frame = frame;
116178  }
116179  Py_INCREF(frame);
116180  return frame;
116181 }
116182 static __pyx_CoroutineObject *__Pyx__Coroutine_New(
116183  PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
116184  PyObject *name, PyObject *qualname, PyObject *module_name) {
116185  __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
116186  if (unlikely(!gen))
116187  return NULL;
116188  return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name);
116189 }
116190 static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
116191  __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure,
116192  PyObject *name, PyObject *qualname, PyObject *module_name) {
116193  gen->body = body;
116194  gen->closure = closure;
116195  Py_XINCREF(closure);
116196  gen->is_running = 0;
116197  gen->resume_label = 0;
116198  gen->classobj = NULL;
116199  gen->yieldfrom = NULL;
116200  gen->gi_exc_state.exc_type = NULL;
116201  gen->gi_exc_state.exc_value = NULL;
116202  gen->gi_exc_state.exc_traceback = NULL;
116203 #if CYTHON_USE_EXC_INFO_STACK
116204  gen->gi_exc_state.previous_item = NULL;
116205 #endif
116206  gen->gi_weakreflist = NULL;
116207  Py_XINCREF(qualname);
116208  gen->gi_qualname = qualname;
116209  Py_XINCREF(name);
116210  gen->gi_name = name;
116211  Py_XINCREF(module_name);
116212  gen->gi_modulename = module_name;
116213  Py_XINCREF(code);
116214  gen->gi_code = code;
116215  gen->gi_frame = NULL;
116216  PyObject_GC_Track(gen);
116217  return gen;
116218 }
116219 
116220 /* PatchModuleWithCoroutine */
116221  static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
116222 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
116223  int result;
116224  PyObject *globals, *result_obj;
116225  globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
116226  result = PyDict_SetItemString(globals, "_cython_coroutine_type",
116227  #ifdef __Pyx_Coroutine_USED
116228  (PyObject*)__pyx_CoroutineType);
116229  #else
116230  Py_None);
116231  #endif
116232  if (unlikely(result < 0)) goto ignore;
116233  result = PyDict_SetItemString(globals, "_cython_generator_type",
116234  #ifdef __Pyx_Generator_USED
116235  (PyObject*)__pyx_GeneratorType);
116236  #else
116237  Py_None);
116238  #endif
116239  if (unlikely(result < 0)) goto ignore;
116240  if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
116241  if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
116242  result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
116243  if (unlikely(!result_obj)) goto ignore;
116244  Py_DECREF(result_obj);
116245  Py_DECREF(globals);
116246  return module;
116247 ignore:
116248  Py_XDECREF(globals);
116249  PyErr_WriteUnraisable(module);
116250  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
116251  Py_DECREF(module);
116252  module = NULL;
116253  }
116254 #else
116255  py_code++;
116256 #endif
116257  return module;
116258 }
116259 
116260 /* PatchGeneratorABC */
116261  #ifndef CYTHON_REGISTER_ABCS
116262 #define CYTHON_REGISTER_ABCS 1
116263 #endif
116264 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
116265 static PyObject* __Pyx_patch_abc_module(PyObject *module);
116266 static PyObject* __Pyx_patch_abc_module(PyObject *module) {
116267  module = __Pyx_Coroutine_patch_module(
116268  module, ""
116269 "if _cython_generator_type is not None:\n"
116270 " try: Generator = _module.Generator\n"
116271 " except AttributeError: pass\n"
116272 " else: Generator.register(_cython_generator_type)\n"
116273 "if _cython_coroutine_type is not None:\n"
116274 " try: Coroutine = _module.Coroutine\n"
116275 " except AttributeError: pass\n"
116276 " else: Coroutine.register(_cython_coroutine_type)\n"
116277  );
116278  return module;
116279 }
116280 #endif
116281 static int __Pyx_patch_abc(void) {
116282 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
116283  static int abc_patched = 0;
116284  if (CYTHON_REGISTER_ABCS && !abc_patched) {
116285  PyObject *module;
116286  module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
116287  if (!module) {
116288  PyErr_WriteUnraisable(NULL);
116289  if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
116290  ((PY_MAJOR_VERSION >= 3) ?
116291  "Cython module failed to register with collections.abc module" :
116292  "Cython module failed to register with collections module"), 1) < 0)) {
116293  return -1;
116294  }
116295  } else {
116296  module = __Pyx_patch_abc_module(module);
116297  abc_patched = 1;
116298  if (unlikely(!module))
116299  return -1;
116300  Py_DECREF(module);
116301  }
116302  module = PyImport_ImportModule("backports_abc");
116303  if (module) {
116304  module = __Pyx_patch_abc_module(module);
116305  Py_XDECREF(module);
116306  }
116307  if (!module) {
116308  PyErr_Clear();
116309  }
116310  }
116311 #else
116312  if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
116313 #endif
116314  return 0;
116315 }
116316 
116317 /* Generator */
116318  static PyMethodDef __pyx_Generator_methods[] = {
116319  {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
116320  (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
116321  {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
116322  (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
116323  {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS,
116324  (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
116325  {0, 0, 0, 0}
116326 };
116327 static PyMemberDef __pyx_Generator_memberlist[] = {
116328  {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
116329  {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
116330  (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
116331  {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL},
116332  {0, 0, 0, 0, 0}
116333 };
116334 static PyGetSetDef __pyx_Generator_getsets[] = {
116335  {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
116336  (char*) PyDoc_STR("name of the generator"), 0},
116337  {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
116338  (char*) PyDoc_STR("qualified name of the generator"), 0},
116339  {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
116340  (char*) PyDoc_STR("Frame of the generator"), 0},
116341  {0, 0, 0, 0, 0}
116342 };
116343 static PyTypeObject __pyx_GeneratorType_type = {
116344  PyVarObject_HEAD_INIT(0, 0)
116345  "generator",
116346  sizeof(__pyx_CoroutineObject),
116347  0,
116348  (destructor) __Pyx_Coroutine_dealloc,
116349  0,
116350  0,
116351  0,
116352  0,
116353  0,
116354  0,
116355  0,
116356  0,
116357  0,
116358  0,
116359  0,
116360  0,
116361  0,
116362  0,
116363  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
116364  0,
116365  (traverseproc) __Pyx_Coroutine_traverse,
116366  0,
116367  0,
116368  offsetof(__pyx_CoroutineObject, gi_weakreflist),
116369  0,
116370  (iternextfunc) __Pyx_Generator_Next,
116371  __pyx_Generator_methods,
116372  __pyx_Generator_memberlist,
116373  __pyx_Generator_getsets,
116374  0,
116375  0,
116376  0,
116377  0,
116378  0,
116379  0,
116380  0,
116381  0,
116382  0,
116383  0,
116384  0,
116385  0,
116386  0,
116387  0,
116388  0,
116389 #if CYTHON_USE_TP_FINALIZE
116390  0,
116391 #else
116392  __Pyx_Coroutine_del,
116393 #endif
116394  0,
116395 #if CYTHON_USE_TP_FINALIZE
116396  __Pyx_Coroutine_del,
116397 #elif PY_VERSION_HEX >= 0x030400a1
116398  0,
116399 #endif
116400 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
116401  0,
116402 #endif
116403 #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
116404  0,
116405 #endif
116406 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
116407  0,
116408 #endif
116409 };
116410 static int __pyx_Generator_init(void) {
116411  __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
116412  __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
116413  __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
116414  if (unlikely(!__pyx_GeneratorType)) {
116415  return -1;
116416  }
116417  return 0;
116418 }
116419 
116420 /* CheckBinaryVersion */
116421  static int __Pyx_check_binary_version(void) {
116422  char ctversion[5];
116423  int same=1, i, found_dot;
116424  const char* rt_from_call = Py_GetVersion();
116425  PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
116426  found_dot = 0;
116427  for (i = 0; i < 4; i++) {
116428  if (!ctversion[i]) {
116429  same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
116430  break;
116431  }
116432  if (rt_from_call[i] != ctversion[i]) {
116433  same = 0;
116434  break;
116435  }
116436  }
116437  if (!same) {
116438  char rtversion[5] = {'\0'};
116439  char message[200];
116440  for (i=0; i<4; ++i) {
116441  if (rt_from_call[i] == '.') {
116442  if (found_dot) break;
116443  found_dot = 1;
116444  } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
116445  break;
116446  }
116447  rtversion[i] = rt_from_call[i];
116448  }
116449  PyOS_snprintf(message, sizeof(message),
116450  "compiletime version %s of module '%.100s' "
116451  "does not match runtime version %s",
116452  ctversion, __Pyx_MODULE_NAME, rtversion);
116453  return PyErr_WarnEx(NULL, message, 1);
116454  }
116455  return 0;
116456 }
116457 
116458 /* InitStrings */
116459  static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
116460  while (t->p) {
116461  #if PY_MAJOR_VERSION < 3
116462  if (t->is_unicode) {
116463  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
116464  } else if (t->intern) {
116465  *t->p = PyString_InternFromString(t->s);
116466  } else {
116467  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
116468  }
116469  #else
116470  if (t->is_unicode | t->is_str) {
116471  if (t->intern) {
116472  *t->p = PyUnicode_InternFromString(t->s);
116473  } else if (t->encoding) {
116474  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
116475  } else {
116476  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
116477  }
116478  } else {
116479  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
116480  }
116481  #endif
116482  if (!*t->p)
116483  return -1;
116484  if (PyObject_Hash(*t->p) == -1)
116485  return -1;
116486  ++t;
116487  }
116488  return 0;
116489 }
116490 
116491 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
116492  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
116493 }
116494 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
116495  Py_ssize_t ignore;
116496  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
116497 }
116498 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
116499 #if !CYTHON_PEP393_ENABLED
116500 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
116501  char* defenc_c;
116502  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
116503  if (!defenc) return NULL;
116504  defenc_c = PyBytes_AS_STRING(defenc);
116505 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
116506  {
116507  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
116508  char* c;
116509  for (c = defenc_c; c < end; c++) {
116510  if ((unsigned char) (*c) >= 128) {
116511  PyUnicode_AsASCIIString(o);
116512  return NULL;
116513  }
116514  }
116515  }
116516 #endif
116517  *length = PyBytes_GET_SIZE(defenc);
116518  return defenc_c;
116519 }
116520 #else
116521 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
116522  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
116523 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
116524  if (likely(PyUnicode_IS_ASCII(o))) {
116525  *length = PyUnicode_GET_LENGTH(o);
116526  return PyUnicode_AsUTF8(o);
116527  } else {
116528  PyUnicode_AsASCIIString(o);
116529  return NULL;
116530  }
116531 #else
116532  return PyUnicode_AsUTF8AndSize(o, length);
116533 #endif
116534 }
116535 #endif
116536 #endif
116537 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
116538 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
116539  if (
116540 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
116541  __Pyx_sys_getdefaultencoding_not_ascii &&
116542 #endif
116543  PyUnicode_Check(o)) {
116544  return __Pyx_PyUnicode_AsStringAndSize(o, length);
116545  } else
116546 #endif
116547 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
116548  if (PyByteArray_Check(o)) {
116549  *length = PyByteArray_GET_SIZE(o);
116550  return PyByteArray_AS_STRING(o);
116551  } else
116552 #endif
116553  {
116554  char* result;
116555  int r = PyBytes_AsStringAndSize(o, &result, length);
116556  if (unlikely(r < 0)) {
116557  return NULL;
116558  } else {
116559  return result;
116560  }
116561  }
116562 }
116563 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
116564  int is_true = x == Py_True;
116565  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
116566  else return PyObject_IsTrue(x);
116567 }
116568 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
116569  int retval;
116570  if (unlikely(!x)) return -1;
116571  retval = __Pyx_PyObject_IsTrue(x);
116572  Py_DECREF(x);
116573  return retval;
116574 }
116575 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
116576 #if PY_MAJOR_VERSION >= 3
116577  if (PyLong_Check(result)) {
116578  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
116579  "__int__ returned non-int (type %.200s). "
116580  "The ability to return an instance of a strict subclass of int "
116581  "is deprecated, and may be removed in a future version of Python.",
116582  Py_TYPE(result)->tp_name)) {
116583  Py_DECREF(result);
116584  return NULL;
116585  }
116586  return result;
116587  }
116588 #endif
116589  PyErr_Format(PyExc_TypeError,
116590  "__%.4s__ returned non-%.4s (type %.200s)",
116591  type_name, type_name, Py_TYPE(result)->tp_name);
116592  Py_DECREF(result);
116593  return NULL;
116594 }
116595 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
116596 #if CYTHON_USE_TYPE_SLOTS
116597  PyNumberMethods *m;
116598 #endif
116599  const char *name = NULL;
116600  PyObject *res = NULL;
116601 #if PY_MAJOR_VERSION < 3
116602  if (likely(PyInt_Check(x) || PyLong_Check(x)))
116603 #else
116604  if (likely(PyLong_Check(x)))
116605 #endif
116606  return __Pyx_NewRef(x);
116607 #if CYTHON_USE_TYPE_SLOTS
116608  m = Py_TYPE(x)->tp_as_number;
116609  #if PY_MAJOR_VERSION < 3
116610  if (m && m->nb_int) {
116611  name = "int";
116612  res = m->nb_int(x);
116613  }
116614  else if (m && m->nb_long) {
116615  name = "long";
116616  res = m->nb_long(x);
116617  }
116618  #else
116619  if (likely(m && m->nb_int)) {
116620  name = "int";
116621  res = m->nb_int(x);
116622  }
116623  #endif
116624 #else
116625  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
116626  res = PyNumber_Int(x);
116627  }
116628 #endif
116629  if (likely(res)) {
116630 #if PY_MAJOR_VERSION < 3
116631  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
116632 #else
116633  if (unlikely(!PyLong_CheckExact(res))) {
116634 #endif
116635  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
116636  }
116637  }
116638  else if (!PyErr_Occurred()) {
116639  PyErr_SetString(PyExc_TypeError,
116640  "an integer is required");
116641  }
116642  return res;
116643 }
116644 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
116645  Py_ssize_t ival;
116646  PyObject *x;
116647 #if PY_MAJOR_VERSION < 3
116648  if (likely(PyInt_CheckExact(b))) {
116649  if (sizeof(Py_ssize_t) >= sizeof(long))
116650  return PyInt_AS_LONG(b);
116651  else
116652  return PyInt_AsSsize_t(b);
116653  }
116654 #endif
116655  if (likely(PyLong_CheckExact(b))) {
116656  #if CYTHON_USE_PYLONG_INTERNALS
116657  const digit* digits = ((PyLongObject*)b)->ob_digit;
116658  const Py_ssize_t size = Py_SIZE(b);
116659  if (likely(__Pyx_sst_abs(size) <= 1)) {
116660  ival = likely(size) ? digits[0] : 0;
116661  if (size == -1) ival = -ival;
116662  return ival;
116663  } else {
116664  switch (size) {
116665  case 2:
116666  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
116667  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
116668  }
116669  break;
116670  case -2:
116671  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
116672  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
116673  }
116674  break;
116675  case 3:
116676  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
116677  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
116678  }
116679  break;
116680  case -3:
116681  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
116682  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
116683  }
116684  break;
116685  case 4:
116686  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
116687  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]));
116688  }
116689  break;
116690  case -4:
116691  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
116692  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]));
116693  }
116694  break;
116695  }
116696  }
116697  #endif
116698  return PyLong_AsSsize_t(b);
116699  }
116700  x = PyNumber_Index(b);
116701  if (!x) return -1;
116702  ival = PyInt_AsSsize_t(x);
116703  Py_DECREF(x);
116704  return ival;
116705 }
116706 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
116707  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
116708  return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
116709 #if PY_MAJOR_VERSION < 3
116710  } else if (likely(PyInt_CheckExact(o))) {
116711  return PyInt_AS_LONG(o);
116712 #endif
116713  } else {
116714  Py_ssize_t ival;
116715  PyObject *x;
116716  x = PyNumber_Index(o);
116717  if (!x) return -1;
116718  ival = PyInt_AsLong(x);
116719  Py_DECREF(x);
116720  return ival;
116721  }
116722 }
116723 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
116724  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
116725 }
116726 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
116727  return PyInt_FromSize_t(ival);
116728 }
116729 
116730 
116731 #endif /* Py_PYTHON_H */
SwigPyObject::ptr
PyObject_HEAD void * ptr
Definition: swigpyobject.h:5
Mesh
Definition: mesh.h:28
f
Double f
Definition: Headers.h:64
number
Int number
Definition: Headers.h:33
s
Double s
Definition: Headers.h:84
L
Double L
Definition: Headers.h:72
n
Int n
Definition: Headers.h:28
q
Double q
Definition: Headers.h:81
ProtChBody.h
ProtChMoorings.h
U
Double U
Definition: Headers.h:88
v
Double v
Definition: Headers.h:95
cppAttachNodeToNodeFEAxyzrot
void cppAttachNodeToNodeFEAxyzrot(cppMultiSegmentedCable *cable1, int node1, cppMultiSegmentedCable *cable2, int node2)
Definition: ProtChMoorings.h:1022
cppMultiSegmentedCable
Definition: ProtChMoorings.h:194
T
Double T
Definition: Headers.h:87
SwigPyObject
Definition: swigpyobject.h:3
z
Double * z
Definition: Headers.h:49
u
Double u
Definition: Headers.h:89
c
Double c
Definition: Headers.h:54
ChBodyAddedMass.h
swigpyobject.h
newSystem
cppSystem * newSystem()
Definition: ProtChBody.h:579
cppRigidBody
Definition: ProtChBody.h:32
cppAttachNodeToNodeFEAxyzD
void cppAttachNodeToNodeFEAxyzD(cppMultiSegmentedCable *cable1, int node1, cppMultiSegmentedCable *cable2, int node2)
Definition: ProtChMoorings.h:1011
vector
float * vector(long nl, long nh)
newMoorings
cppMultiSegmentedCable * newMoorings(std::shared_ptr< ChSystem > system, std::shared_ptr< ChMesh > mesh, std::vector< double > length, std::vector< int > nb_elems, std::vector< double > d, std::vector< double > rho, std::vector< double > E, std::string beam_type)
Definition: ProtChMoorings.h:991
r
Double r
Definition: Headers.h:83
pos
double pos(double a)
Definition: testFMMandFSW.cpp:8
cppSystem
Definition: ProtChBody.h:17
newRigidBody
cppRigidBody * newRigidBody(cppSystem *system)
Definition: ProtChBody.h:586