Generated by Cython 0.29.32
Yellow lines hint at Python interaction.
Click on a line that starts with a "+
" to see the C code that Cython generated for it.
Raw output: fil_result.c
001: """
002: Class for the Fil results
003: """
+004: import re
__pyx_t_1 = __Pyx_Import(__pyx_n_s_re, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
005: import cython
006:
+007: import numpy as np
__pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 7, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+008: from tqdm import tqdm
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_tqdm); __Pyx_GIVEREF(__pyx_n_s_tqdm); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_tqdm); __pyx_t_2 = __Pyx_Import(__pyx_n_s_tqdm, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_tqdm, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
009:
+010: from .model import Model
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_Model); __Pyx_GIVEREF(__pyx_n_s_Model); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Model); __pyx_t_1 = __Pyx_Import(__pyx_n_s_model, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Model); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Model, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+011: from .nodes import Node2D, Node3D
__pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_Node2D); __Pyx_GIVEREF(__pyx_n_s_Node2D); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Node2D); __Pyx_INCREF(__pyx_n_s_Node3D); __Pyx_GIVEREF(__pyx_n_s_Node3D); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Node3D); __pyx_t_2 = __Pyx_Import(__pyx_n_s_nodes, __pyx_t_1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Node2D); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Node2D, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Node3D); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_Node3D, __pyx_t_1) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+012: from .elements import ELEMENTS, N_INT_PNTS
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_ELEMENTS); __Pyx_GIVEREF(__pyx_n_s_ELEMENTS); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ELEMENTS); __Pyx_INCREF(__pyx_n_s_N_INT_PNTS); __Pyx_GIVEREF(__pyx_n_s_N_INT_PNTS); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_N_INT_PNTS); __pyx_t_1 = __Pyx_Import(__pyx_n_s_elements, __pyx_t_2, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ELEMENTS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_ELEMENTS, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_N_INT_PNTS); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_d, __pyx_n_s_N_INT_PNTS, __pyx_t_2) < 0) __PYX_ERR(0, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
013:
+014: if cython.compiled:
__pyx_t_3 = (1 != 0); if (__pyx_t_3) { /* … */ goto __pyx_L2; }
+015: print("Cython compiled")
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* … */ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_u_Cython_compiled); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13);
016: else:
+017: print("Cython not compiled!")
/*else*/ { __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L2:;
018:
019:
020: @cython.final
021: @cython.cclass
022: class FilParser:
023: """
024: Parse and store the data from a *.fil file.
025:
026: Parameters
027: ----------
028: records : list(str)
029: List of the imported records of the *.fil file
030:
031: Attributes
032: ----------
033: _elem_out_list : list
034: List of element/node numbers that correspond to the following output records
035:
036: """
037:
038: PARSE_MAP = {
+039: 1: ("_parse_elem_header", []),
__pyx_t_1 = __Pyx_PyDict_NewPresized(28); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_elem_header); __Pyx_GIVEREF(__pyx_n_u_parse_elem_header); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_elem_header); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+040: 8: ("_parse_elem_output", ["COORD"]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_COORD); __Pyx_GIVEREF(__pyx_n_u_COORD); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_COORD); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_n_u_parse_elem_output); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_8, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+041: 11: ("_parse_elem_output", ["S"]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_S); __Pyx_GIVEREF(__pyx_n_u_S); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_S); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_n_u_parse_elem_output); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_11, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+042: 21: ("_parse_elem_output", ["E"]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_E); __Pyx_GIVEREF(__pyx_n_u_E); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_E); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_n_u_parse_elem_output); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_21, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+043: 5: ("_parse_elem_output", ["SDV"]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_SDV); __Pyx_GIVEREF(__pyx_n_u_SDV); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_SDV); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 43, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_n_u_parse_elem_output); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_elem_output); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_5, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+044: 101: ("_parse_nodal_output", ["U"]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_U); __Pyx_GIVEREF(__pyx_n_u_U); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_U); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_n_u_parse_nodal_output); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_101, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+045: 104: ("_parse_nodal_output", ["RF"]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_RF); __Pyx_GIVEREF(__pyx_n_u_RF); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_RF); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 45, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_n_u_parse_nodal_output); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_104, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+046: 106: ("_parse_nodal_output", ["CF"]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_CF); __Pyx_GIVEREF(__pyx_n_u_CF); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_CF); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_n_u_parse_nodal_output); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_106, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+047: 107: ("_parse_nodal_output", ["COORD"]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_COORD); __Pyx_GIVEREF(__pyx_n_u_COORD); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_COORD); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 47, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_n_u_parse_nodal_output); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_107, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+048: 146: ("_parse_nodal_output", ["TF"]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_TF); __Pyx_GIVEREF(__pyx_n_u_TF); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_TF); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_n_u_parse_nodal_output); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_nodal_output); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_146, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+049: 1501: ("_parse_surface", [False]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyList_SET_ITEM(__pyx_t_2, 0, Py_False); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 49, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_surface); __Pyx_GIVEREF(__pyx_n_u_parse_surface); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_surface); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1501, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+050: 1502: ("_parse_surface", [True]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyList_SET_ITEM(__pyx_t_4, 0, Py_True); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_surface); __Pyx_GIVEREF(__pyx_n_u_parse_surface); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_surface); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1502, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+051: 1503: ("_parse_contact_output_request", []),
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_contact_output_request); __Pyx_GIVEREF(__pyx_n_u_parse_contact_output_request); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_contact_output_request); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1503, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+052: 1504: ("_parse_curr_contact_node", []),
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_curr_contact_node); __Pyx_GIVEREF(__pyx_n_u_parse_curr_contact_node); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_curr_contact_node); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1504, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+053: 1511: ("_parse_surface_output", ["CSTRESS"]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_CSTRESS); __Pyx_GIVEREF(__pyx_n_u_CSTRESS); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_CSTRESS); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_surface_output); __Pyx_GIVEREF(__pyx_n_u_parse_surface_output); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_surface_output); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1511, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+054: 1900: ("_parse_element", []),
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_element); __Pyx_GIVEREF(__pyx_n_u_parse_element); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_element); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1900, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+055: 1901: ("_parse_node", []),
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_node); __Pyx_GIVEREF(__pyx_n_u_parse_node); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_node); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1901, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+056: 1902: ("_parse_active_dof", []),
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_active_dof); __Pyx_GIVEREF(__pyx_n_u_parse_active_dof); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_active_dof); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1902, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+057: 1911: ("_parse_output_request", []),
__pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 57, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_output_request); __Pyx_GIVEREF(__pyx_n_u_parse_output_request); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_output_request); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1911, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+058: 1921: ("_parse_not_implemented", ["Abaqus release, etc."]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_kp_u_Abaqus_release_etc); __Pyx_GIVEREF(__pyx_kp_u_Abaqus_release_etc); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Abaqus_release_etc); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_not_implemented); __Pyx_GIVEREF(__pyx_n_u_parse_not_implemented); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_not_implemented); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1921, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+059: 1922: ("_parse_not_implemented", ["Heading"]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_Heading); __Pyx_GIVEREF(__pyx_n_u_Heading); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_Heading); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 59, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_not_implemented); __Pyx_GIVEREF(__pyx_n_u_parse_not_implemented); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_not_implemented); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1922, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+060: 1931: ("_parse_set", [False, "node"]),
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyList_SET_ITEM(__pyx_t_4, 0, Py_False); __Pyx_INCREF(__pyx_n_u_node); __Pyx_GIVEREF(__pyx_n_u_node); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_node); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_n_u_parse_set); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1931, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+061: 1932: ("_parse_set", [True, "node"]),
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyList_SET_ITEM(__pyx_t_2, 0, Py_True); __Pyx_INCREF(__pyx_n_u_node); __Pyx_GIVEREF(__pyx_n_u_node); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_node); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 61, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_n_u_parse_set); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1932, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+062: 1933: ("_parse_set", [False, "element"]),
__pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyList_SET_ITEM(__pyx_t_4, 0, Py_False); __Pyx_INCREF(__pyx_n_u_element); __Pyx_GIVEREF(__pyx_n_u_element); PyList_SET_ITEM(__pyx_t_4, 1, __pyx_n_u_element); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_n_u_parse_set); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1933, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+063: 1934: ("_parse_set", [True, "element"]),
__pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyList_SET_ITEM(__pyx_t_2, 0, Py_True); __Pyx_INCREF(__pyx_n_u_element); __Pyx_GIVEREF(__pyx_n_u_element); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_element); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 63, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_n_u_parse_set); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_set); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1934, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+064: 1940: ("_parse_label_cross_ref", []),
__pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_label_cross_ref); __Pyx_GIVEREF(__pyx_n_u_parse_label_cross_ref); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_label_cross_ref); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_1940, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+065: 2000: ("_parse_step", ["start"]),
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_start); __Pyx_GIVEREF(__pyx_n_u_start); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_start); __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_parse_step); __Pyx_GIVEREF(__pyx_n_u_parse_step); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_parse_step); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_2000, __pyx_t_4) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+066: 2001: ("_parse_step", ["end"]),
__pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_n_u_end); __Pyx_GIVEREF(__pyx_n_u_end); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_n_u_end); __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_parse_step); __Pyx_GIVEREF(__pyx_n_u_parse_step); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_parse_step); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_int_2001, __pyx_t_2) < 0) __PYX_ERR(0, 39, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_7pybaqus_10fil_result_FilParser->tp_dict, __pyx_n_s_PARSE_MAP, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_7pybaqus_10fil_result_FilParser);
067: }
068:
069: CONTACT_OUT = {
+070: "CSTRESS": ["CPRESS", "CSHEAR1", "CSHEAR2"],
__pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_CPRESS); __Pyx_GIVEREF(__pyx_n_u_CPRESS); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_CPRESS); __Pyx_INCREF(__pyx_n_u_CSHEAR1); __Pyx_GIVEREF(__pyx_n_u_CSHEAR1); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_CSHEAR1); __Pyx_INCREF(__pyx_n_u_CSHEAR2); __Pyx_GIVEREF(__pyx_n_u_CSHEAR2); PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_CSHEAR2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_CSTRESS, __pyx_t_2) < 0) __PYX_ERR(0, 70, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (PyDict_SetItem((PyObject *)__pyx_ptype_7pybaqus_10fil_result_FilParser->tp_dict, __pyx_n_s_CONTACT_OUT, __pyx_t_1) < 0) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_7pybaqus_10fil_result_FilParser);
071: }
072:
073: _records: list
074: _model: Model
075: _curr_elem_out: cython.int
076: _curr_step: cython.int
077: _curr_inc: cython.int
078: _curr_loc_id: cython.int
079: _curr_n_int_point: cython.int
080: _flag_output: cython.int
081: _curr_output_node: cython.int
082: _output_request_set: cython.str
083: _output_elem_type: cython.str
084: _dof_map: dict
085: _model_dimension: cython.int
086: _node_records: list
087: _curr_set: cython.int
088: _tmp_sets: dict
089: _label_cross_ref: dict
090: _curr_surface: cython.int
091: _tmp_surf: dict
092: _tmp_faces: dict
093: _node_elems: dict
094:
+095: def __cinit__(self, records: list, progress: bool):
/* Python wrapper */ static int __pyx_pw_7pybaqus_10fil_result_9FilParser_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_7pybaqus_10fil_result_9FilParser_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_records = 0; PyObject *__pyx_v_progress = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_records,&__pyx_n_s_progress,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_records)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_progress)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, 1); __PYX_ERR(0, 95, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 95, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_records = ((PyObject*)values[0]); __pyx_v_progress = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 95, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_records), (&PyList_Type), 1, "records", 1))) __PYX_ERR(0, 95, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser___cinit__(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_records, __pyx_v_progress); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static int __pyx_pf_7pybaqus_10fil_result_9FilParser___cinit__(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_records, PyObject *__pyx_v_progress) { int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__", 0); /* … */ /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pybaqus.fil_result.FilParser.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; }
+096: self._records = records
__Pyx_INCREF(__pyx_v_records); __Pyx_GIVEREF(__pyx_v_records); __Pyx_GOTREF(__pyx_v_self->_records); __Pyx_DECREF(__pyx_v_self->_records); __pyx_v_self->_records = __pyx_v_records;
+097: self._model = Model()
__Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Model); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_model); __Pyx_DECREF(__pyx_v_self->_model); __pyx_v_self->_model = __pyx_t_1; __pyx_t_1 = 0;
098:
+099: self._curr_elem_out= -1
__pyx_v_self->_curr_elem_out = -1;
+100: self._curr_n_int_point = -1
__pyx_v_self->_curr_n_int_point = -1;
+101: self._curr_step = -1
__pyx_v_self->_curr_step = -1;
+102: self._curr_inc = -1
__pyx_v_self->_curr_inc = -1;
+103: self._curr_loc_id = -1
__pyx_v_self->_curr_loc_id = -1;
+104: self._flag_output = -1
__pyx_v_self->_flag_output = -1;
+105: self._curr_output_node = -1
__pyx_v_self->_curr_output_node = -1;
+106: self._output_request_set = ""
__Pyx_INCREF(__pyx_kp_u_); __Pyx_GIVEREF(__pyx_kp_u_); __Pyx_GOTREF(__pyx_v_self->_output_request_set); __Pyx_DECREF(__pyx_v_self->_output_request_set); __pyx_v_self->_output_request_set = __pyx_kp_u_;
+107: self._output_elem_type = ""
__Pyx_INCREF(__pyx_kp_u_); __Pyx_GIVEREF(__pyx_kp_u_); __Pyx_GOTREF(__pyx_v_self->_output_elem_type); __Pyx_DECREF(__pyx_v_self->_output_elem_type); __pyx_v_self->_output_elem_type = __pyx_kp_u_;
+108: self._dof_map = dict()
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_dof_map); __Pyx_DECREF(__pyx_v_self->_dof_map); __pyx_v_self->_dof_map = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+109: self._model_dimension = -1
__pyx_v_self->_model_dimension = -1;
+110: self._node_records = list()
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_node_records); __Pyx_DECREF(__pyx_v_self->_node_records); __pyx_v_self->_node_records = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
111:
+112: self._curr_set = -1
__pyx_v_self->_curr_set = -1;
+113: self._tmp_sets = {"element": dict(), "node": dict()}
__pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_element, __pyx_t_2) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_node, __pyx_t_2) < 0) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_tmp_sets); __Pyx_DECREF(__pyx_v_self->_tmp_sets); __pyx_v_self->_tmp_sets = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+114: self._label_cross_ref = dict()
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_label_cross_ref); __Pyx_DECREF(__pyx_v_self->_label_cross_ref); __pyx_v_self->_label_cross_ref = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+115: self._curr_surface = -1
__pyx_v_self->_curr_surface = -1;
+116: self._tmp_surf = dict()
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_tmp_surf); __Pyx_DECREF(__pyx_v_self->_tmp_surf); __pyx_v_self->_tmp_surf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+117: self._tmp_faces = dict()
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_tmp_faces); __Pyx_DECREF(__pyx_v_self->_tmp_faces); __pyx_v_self->_tmp_faces = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+118: self._node_elems = dict()
__pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_node_elems); __Pyx_DECREF(__pyx_v_self->_node_elems); __pyx_v_self->_node_elems = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
119:
+120: self._parse_records(progress)
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_records); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_progress) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_progress); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
121:
122: @cython.nonecheck(False)
123: @cython.boundscheck(False)
+124: def _parse_records(self, progress: bool):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_3_parse_records(PyObject *__pyx_v_self, PyObject *__pyx_v_progress); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_2_parse_records[] = "Parse the imported records."; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_3_parse_records(PyObject *__pyx_v_self, PyObject *__pyx_v_progress) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_records (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_2_parse_records(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject *)__pyx_v_progress)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_2_parse_records(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_progress) { PyObject *__pyx_v_records = 0; PyObject *__pyx_v_vars_i = 0; PyObject *__pyx_v_r_i = 0; int __pyx_v_key; int __pyx_v_ix; int __pyx_v_n_records; PyObject *__pyx_v_pattern = NULL; PyObject *__pyx_v_m_rec = NULL; PyObject *__pyx_v_args = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_records", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_records", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_records); __Pyx_XDECREF(__pyx_v_vars_i); __Pyx_XDECREF(__pyx_v_r_i); __Pyx_XDECREF(__pyx_v_pattern); __Pyx_XDECREF(__pyx_v_m_rec); __Pyx_XDECREF(__pyx_v_args); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
125: """Parse the imported records."""
126: records: list
127: vars_i: list
128: r_i: cython.str
129: key: cython.int
+130: ix: cython.int = 0
__pyx_v_ix = 0;
131:
+132: records = self._records
__pyx_t_1 = __pyx_v_self->_records;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_records = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
+133: n_records: cython.int = len(records)
if (unlikely(__pyx_v_records == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 133, __pyx_L1_error) } __pyx_t_2 = PyList_GET_SIZE(__pyx_v_records); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 133, __pyx_L1_error) __pyx_v_n_records = __pyx_t_2;
134:
+135: print("Test 2")
__pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* … */ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_Test_2); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 135, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__2); __Pyx_GIVEREF(__pyx_tuple__2);
136:
137: pattern = (
138: r"[ADEI](?: \d(\d+)|" # ints
139: + r"((?: |-)\d+\.\d+(?:E|D)(?:\+|-)\d+)|" # floats
+140: + r"(.{8}))" # strings
__Pyx_INCREF(__pyx_kp_u_ADEI_d_d_d_d_E_D_d_8);
__pyx_v_pattern = __pyx_kp_u_ADEI_d_d_d_d_E_D_d_8;
141: )
142:
143: # Parse each record
+144: while ix < n_records:
while (1) { __pyx_t_3 = ((__pyx_v_ix < __pyx_v_n_records) != 0); if (!__pyx_t_3) break;
+145: r_i = records[ix]
if (unlikely(__pyx_v_records == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 145, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_records, __pyx_v_ix, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 145, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_r_i, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0;
+146: m_rec = re.findall(pattern, r_i)
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_re); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_findall); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_pattern, __pyx_v_r_i}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_pattern, __pyx_v_r_i}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); __pyx_t_4 = NULL; } __Pyx_INCREF(__pyx_v_pattern); __Pyx_GIVEREF(__pyx_v_pattern); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_pattern); __Pyx_INCREF(__pyx_v_r_i); __Pyx_GIVEREF(__pyx_v_r_i); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_r_i); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_m_rec, __pyx_t_1); __pyx_t_1 = 0;
147:
148: # Get each variable
+149: vars_i = list(map(self._convert_record, m_rec))
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_convert_record); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_INCREF(__pyx_v_m_rec); __Pyx_GIVEREF(__pyx_v_m_rec); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_m_rec); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_vars_i, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0;
150:
151: # Process record
+152: key = vars_i[1]
__pyx_t_6 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_vars_i, 1)); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 152, __pyx_L1_error) __pyx_v_key = __pyx_t_6;
153: # Lookup the key in dictionary and execute the respective functions
+154: if key in self.PARSE_MAP:
__pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_key); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_PARSE_MAP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (__pyx_t_3 != 0); if (__pyx_t_8) { /* … */ goto __pyx_L5; }
+155: args = self.PARSE_MAP[key][1]
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_PARSE_MAP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_key, int, 1, __Pyx_PyInt_From_int, 0, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_args, __pyx_t_1); __pyx_t_1 = 0;
+156: getattr(self, self.PARSE_MAP[key][0])(vars_i, *args)
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_PARSE_MAP); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_1, __pyx_v_key, int, 1, __Pyx_PyInt_From_int, 0, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_GetAttr(((PyObject *)__pyx_v_self), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_vars_i); __Pyx_GIVEREF(__pyx_v_vars_i); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_vars_i); __pyx_t_7 = __Pyx_PySequence_Tuple(__pyx_v_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
157: else:
+158: print(f"Key {key} not defined!")
/*else*/ { __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_2 = 0; __pyx_t_9 = 127; __Pyx_INCREF(__pyx_kp_u_Key); __pyx_t_2 += 4; __Pyx_GIVEREF(__pyx_kp_u_Key); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Key); __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_key, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4); __pyx_t_4 = 0; __Pyx_INCREF(__pyx_kp_u_not_defined); __pyx_t_2 += 13; __Pyx_GIVEREF(__pyx_kp_u_not_defined); PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_not_defined); __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_7, 3, __pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L5:;
+159: ix += 1
__pyx_v_ix = (__pyx_v_ix + 1); }
160:
161: # Execute post-read actions on the model
+162: self._post_parse_all_surfaces()
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_post_parse_all_surfaces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+163: self._reference_elems_in_nodes()
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_reference_elems_in_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+164: self._model.post_import_actions()
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_post_import_actions); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
165:
+166: def _convert_record(self, record: tuple):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_5_convert_record(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_4_convert_record[] = "Convert one record to a list of numbers and strings."; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_5_convert_record(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_convert_record (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), (&PyTuple_Type), 1, "record", 1))) __PYX_ERR(0, 166, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_4_convert_record(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject*)__pyx_v_record)); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_4_convert_record(CYTHON_UNUSED struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_convert_record", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._convert_record", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
167: """Convert one record to a list of numbers and strings."""
168: # For each variable three matches are made (why?), so we need to
169: # take the one with the data (the only one which is not am empty
170: # string)
+171: if record[0] != "":
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 171, __pyx_L1_error) } __pyx_t_1 = (__Pyx_PyUnicode_Equals(PyTuple_GET_ITEM(__pyx_v_record, 0), __pyx_kp_u_, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 171, __pyx_L1_error) if (__pyx_t_1) { /* … */ }
+172: return int(record[0])
__Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 172, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyNumber_Int(PyTuple_GET_ITEM(__pyx_v_record, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0;
+173: elif record[1] != "":
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 173, __pyx_L1_error) } __pyx_t_1 = (__Pyx_PyUnicode_Equals(PyTuple_GET_ITEM(__pyx_v_record, 1), __pyx_kp_u_, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 173, __pyx_L1_error) if (__pyx_t_1) { /* … */ }
+174: return float(record[1].replace("D", "E"))
__Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 174, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyTuple_GET_ITEM(__pyx_v_record, 1), __pyx_n_s_replace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyNumber_Float(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; /* … */ __pyx_tuple__3 = PyTuple_Pack(2, __pyx_n_u_D, __pyx_n_u_E); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__3); __Pyx_GIVEREF(__pyx_tuple__3);
175: else:
+176: return record[2]
/*else*/ { __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 176, __pyx_L1_error) } __Pyx_INCREF(PyTuple_GET_ITEM(__pyx_v_record, 2)); __pyx_r = PyTuple_GET_ITEM(__pyx_v_record, 2); goto __pyx_L0; }
177:
178: @cython.nonecheck(False)
+179: def _parse_element(self, record: list):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_7_parse_element(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_6_parse_element[] = "Parse the data of an element\n\n Parameters\n ----------\n record : list\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_7_parse_element(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_element (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), (&PyList_Type), 1, "record", 1))) __PYX_ERR(0, 179, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_6_parse_element(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject*)__pyx_v_record)); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_6_parse_element(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_v_e_type = 0; int __pyx_v_e_number; PyObject *__pyx_v_nodes = 0; int __pyx_v_n; int __pyx_v_ix; int __pyx_v_nnodes; PyObject *__pyx_v_ElementClass = NULL; PyObject *__pyx_v_element = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_element", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_element", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_e_type); __Pyx_XDECREF(__pyx_v_nodes); __Pyx_XDECREF(__pyx_v_ElementClass); __Pyx_XDECREF(__pyx_v_element); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
180: """Parse the data of an element
181:
182: Parameters
183: ----------
184: record : list
185:
186: """
187: # Element type
+188: e_type: cython.str = record[3].strip()
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 188, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyObject_GetAttrStr(PyList_GET_ITEM(__pyx_v_record, 3), __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 188, __pyx_L1_error) __pyx_v_e_type = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+189: e_number: cython.int = record[2]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 189, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 2)); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error) __pyx_v_e_number = __pyx_t_4;
+190: nodes: list = record[4:]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 190, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_record, 4, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_nodes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
191: n: cython.int
+192: ix: cython.int = 0
__pyx_v_ix = 0;
+193: nnodes: cython.int = len(nodes)
__pyx_t_5 = PyList_GET_SIZE(__pyx_v_nodes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 193, __pyx_L1_error) __pyx_v_nnodes = __pyx_t_5;
194:
195: # Add a reference to the node poinitng at the element
+196: while ix < nnodes:
while (1) { __pyx_t_6 = ((__pyx_v_ix < __pyx_v_nnodes) != 0); if (!__pyx_t_6) break;
+197: n = nodes[ix]
__pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_nodes, __pyx_v_ix, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_n = __pyx_t_4;
+198: if n in self._node_elems.keys():
__pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->_node_elems == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(0, 198, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_self->_node_elems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { /* … */ goto __pyx_L5; }
+199: self._node_elems[n].append(e_number)
if (unlikely(__pyx_v_self->_node_elems == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 199, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->_node_elems, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_t_2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
200: else:
+201: self._node_elems[n] = [e_number]
/*else*/ { __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_e_number); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_self->_node_elems == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 201, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(PyDict_SetItem(__pyx_v_self->_node_elems, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:;
+202: ix += 1
__pyx_v_ix = (__pyx_v_ix + 1); }
203:
+204: ElementClass = ELEMENTS[e_type]
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ELEMENTS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_v_e_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ElementClass = __pyx_t_2; __pyx_t_2 = 0;
205:
+206: element = ElementClass(*nodes, num=e_number, model=self._model, code=e_type)
__pyx_t_2 = PySequence_Tuple(__pyx_v_nodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_e_number); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_num, __pyx_t_3) < 0) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_model, __pyx_v_self->_model) < 0) __PYX_ERR(0, 206, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_code, __pyx_v_e_type) < 0) __PYX_ERR(0, 206, __pyx_L1_error) __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_ElementClass, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_element = __pyx_t_3; __pyx_t_3 = 0;
+207: element.n_integ_points: cython.int = N_INT_PNTS[e_type]
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_N_INT_PNTS); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_v_e_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_v_element, __pyx_n_s_n_integ_points, __pyx_t_1) < 0) __PYX_ERR(0, 207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+208: self._model.add_element(element)
__pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_element); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
209:
+210: def _parse_node(self, record: list):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_9_parse_node(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_8_parse_node[] = "Parse the data of a node\n\n Parameters\n ----------\n record : list\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_9_parse_node(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_node (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), (&PyList_Type), 1, "record", 1))) __PYX_ERR(0, 210, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_8_parse_node(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject*)__pyx_v_record)); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_8_parse_node(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_v_n_number = NULL; PyObject *__pyx_v_dofs = NULL; PyObject *__pyx_v_dof_map = NULL; PyObject *__pyx_v_node = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_node", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_node", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_n_number); __Pyx_XDECREF(__pyx_v_dofs); __Pyx_XDECREF(__pyx_v_dof_map); __Pyx_XDECREF(__pyx_v_node); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
211: """Parse the data of a node
212:
213: Parameters
214: ----------
215: record : list
216:
217: """
218: # Wait until the 'Active degree of freedom' key has been processed
+219: if self._model_dimension < 0:
__pyx_t_1 = ((__pyx_v_self->_model_dimension < 0) != 0); if (__pyx_t_1) { /* … */ goto __pyx_L3; }
+220: self._node_records.append(record)
if (unlikely(__pyx_v_self->_node_records == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); __PYX_ERR(0, 220, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_Append(__pyx_v_self->_node_records, __pyx_v_record); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 220, __pyx_L1_error)
221: else:
+222: n_number = record[2]
/*else*/ { if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 222, __pyx_L1_error) } __pyx_t_3 = PyList_GET_ITEM(__pyx_v_record, 2); __Pyx_INCREF(__pyx_t_3); __pyx_v_n_number = __pyx_t_3; __pyx_t_3 = 0;
+223: dofs = record[3:]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 223, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyList_GetSlice(__pyx_v_record, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 223, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_dofs = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0;
+224: dof_map = self._dof_map
__pyx_t_3 = __pyx_v_self->_dof_map;
__Pyx_INCREF(__pyx_t_3);
__pyx_v_dof_map = ((PyObject*)__pyx_t_3);
__pyx_t_3 = 0;
225:
+226: if self._model_dimension == 2:
__pyx_t_1 = ((__pyx_v_self->_model_dimension == 2) != 0); if (__pyx_t_1) { /* … */ goto __pyx_L4; }
+227: node = Node2D(n_number, dof_map, self._model, *dofs)
__Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Node2D); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_n_number); __Pyx_GIVEREF(__pyx_v_n_number); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_n_number); __Pyx_INCREF(__pyx_v_dof_map); __Pyx_GIVEREF(__pyx_v_dof_map); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_dof_map); __Pyx_INCREF(__pyx_v_self->_model); __Pyx_GIVEREF(__pyx_v_self->_model); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_self->_model); __pyx_t_5 = PySequence_Tuple(__pyx_v_dofs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_node = __pyx_t_5; __pyx_t_5 = 0;
228: else:
+229: node = Node3D(n_number, dof_map, self._model, *dofs)
/*else*/ { __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_Node3D); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_n_number); __Pyx_GIVEREF(__pyx_v_n_number); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_n_number); __Pyx_INCREF(__pyx_v_dof_map); __Pyx_GIVEREF(__pyx_v_dof_map); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_dof_map); __Pyx_INCREF(__pyx_v_self->_model); __Pyx_GIVEREF(__pyx_v_self->_model); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_self->_model); __pyx_t_3 = PySequence_Tuple(__pyx_v_dofs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_node = __pyx_t_3; __pyx_t_3 = 0; } __pyx_L4:;
230:
+231: self._model.add_node(node)
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_node) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_node); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:;
232:
+233: def _parse_all_nodes(self):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_11_parse_all_nodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_10_parse_all_nodes[] = "Parse all nodes.\n\n This has to be executed after the active degree of freedom\n are specified.\n\n Parameters\n ----------\n records : list\n A list of all the records with nodes\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_11_parse_all_nodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_all_nodes (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_10_parse_all_nodes(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_10_parse_all_nodes(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self) { PyObject *__pyx_v_records = 0; PyObject *__pyx_v_record = 0; int __pyx_v_ix; int __pyx_v_n_records; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_all_nodes", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_all_nodes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_records); __Pyx_XDECREF(__pyx_v_record); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
234: """Parse all nodes.
235:
236: This has to be executed after the active degree of freedom
237: are specified.
238:
239: Parameters
240: ----------
241: records : list
242: A list of all the records with nodes
243:
244: Returns
245: -------
246: TODO
247:
248: """
+249: records: list = self._node_records
__pyx_t_1 = __pyx_v_self->_node_records;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_records = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
250: record: list
+251: ix: cython.int = 0
__pyx_v_ix = 0;
+252: n_records: cython.int = len(records)
if (unlikely(__pyx_v_records == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 252, __pyx_L1_error) } __pyx_t_2 = PyList_GET_SIZE(__pyx_v_records); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 252, __pyx_L1_error) __pyx_v_n_records = __pyx_t_2;
253:
+254: while ix < n_records:
while (1) { __pyx_t_3 = ((__pyx_v_ix < __pyx_v_n_records) != 0); if (!__pyx_t_3) break;
+255: record = records[ix]
if (unlikely(__pyx_v_records == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 255, __pyx_L1_error) } __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_records, __pyx_v_ix, int, 1, __Pyx_PyInt_From_int, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 255, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_record, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0;
+256: self._parse_node(record)
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_record) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_record); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+257: ix += 1
__pyx_v_ix = (__pyx_v_ix + 1); }
258:
+259: self._node_records = list()
__pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_node_records); __Pyx_DECREF(__pyx_v_self->_node_records); __pyx_v_self->_node_records = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
260:
+261: def _parse_elem_output(self, record: list, var: str):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_13_parse_elem_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_12_parse_elem_output[] = "Parse output data for elements.\n\n Parameters\n ----------\n record : list\n var : str\n Name of the variable\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_13_parse_elem_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_record = 0; PyObject *__pyx_v_var = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_elem_output (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,&__pyx_n_s_var,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_elem_output", 1, 2, 2, 1); __PYX_ERR(0, 261, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_elem_output") < 0)) __PYX_ERR(0, 261, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_record = ((PyObject*)values[0]); __pyx_v_var = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_parse_elem_output", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 261, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_elem_output", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), (&PyList_Type), 1, "record", 1))) __PYX_ERR(0, 261, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), (&PyUnicode_Type), 1, "var", 1))) __PYX_ERR(0, 261, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_12_parse_elem_output(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_record, __pyx_v_var); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_12_parse_elem_output(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record, PyObject *__pyx_v_var) { int __pyx_v_step; int __pyx_v_inc; int __pyx_v_ix; double __pyx_v_data; int __pyx_v_n_records; int __pyx_v_flag_out; int __pyx_v_n_elem; int __pyx_v_int_point; int __pyx_v_n_node; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_elem_output", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_elem_output", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
262: """Parse output data for elements.
263:
264: Parameters
265: ----------
266: record : list
267: var : str
268: Name of the variable
269:
270: Returns
271: -------
272: TODO
273:
274: """
+275: step = self._curr_step
__pyx_t_1 = __pyx_v_self->_curr_step; __pyx_v_step = __pyx_t_1;
+276: inc = self._curr_inc
__pyx_t_1 = __pyx_v_self->_curr_inc; __pyx_v_inc = __pyx_t_1;
+277: ix: cython.int = 1
__pyx_v_ix = 1;
278: data: cython.double
279: n_records: cython.int
280:
281: # This flags the type of output: element (0), nodal (1), modal
282: # (2), or element set energy (3)
+283: flag_out = self._flag_output
__pyx_t_1 = __pyx_v_self->_flag_output; __pyx_v_flag_out = __pyx_t_1;
284:
+285: if flag_out == 0:
switch (__pyx_v_flag_out) { case 0: /* … */ break; case 1:
+286: n_elem = self._curr_elem_out
__pyx_t_1 = __pyx_v_self->_curr_elem_out; __pyx_v_n_elem = __pyx_t_1;
287: # Get number of integration points
+288: int_point = self._curr_n_int_point
__pyx_t_1 = __pyx_v_self->_curr_n_int_point; __pyx_v_int_point = __pyx_t_1;
289:
290: # Append all the records
+291: n_records = len(record[2:])
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 291, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_record, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n_records = __pyx_t_3;
+292: while ix < n_records:
while (1) { __pyx_t_4 = ((__pyx_v_ix < __pyx_v_n_records) != 0); if (!__pyx_t_4) break;
+293: data = record[1 + ix]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 293, __pyx_L1_error) } __pyx_t_5 = (1 + __pyx_v_ix); __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_record, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_data = __pyx_t_6;
+294: self._model.add_elem_output(n_elem, f"{var}{ix}", data, step, inc, int_point)
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_elem_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_n_elem); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_var); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyUnicode_From_int(__pyx_v_ix, 0, ' ', 'd'); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = __Pyx_PyUnicode_Concat(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyFloat_FromDouble(__pyx_v_data); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_inc); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_int_point); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_14 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_14)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_14, __pyx_t_8, __pyx_t_11, __pyx_t_10, __pyx_t_9, __pyx_t_12, __pyx_t_13}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 6+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_14, __pyx_t_8, __pyx_t_11, __pyx_t_10, __pyx_t_9, __pyx_t_12, __pyx_t_13}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 6+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else #endif { __pyx_t_15 = PyTuple_New(6+__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_14) { __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL; } __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_15, 0+__pyx_t_1, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_15, 1+__pyx_t_1, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_1, __pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_15, 3+__pyx_t_1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_15, 4+__pyx_t_1, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 5+__pyx_t_1, __pyx_t_13); __pyx_t_8 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+295: ix += 1
__pyx_v_ix = (__pyx_v_ix + 1); }
296:
+297: elif flag_out == 1:
break; case 2:
+298: n_node = self._curr_elem_out
__pyx_t_1 = __pyx_v_self->_curr_elem_out; __pyx_v_n_node = __pyx_t_1;
299:
+300: n_records = len(record[2:])
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 300, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_record, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n_records = __pyx_t_3;
+301: while ix < n_records:
while (1) { __pyx_t_4 = ((__pyx_v_ix < __pyx_v_n_records) != 0); if (!__pyx_t_4) break;
+302: data = record[1 + ix]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 302, __pyx_L1_error) } __pyx_t_5 = (1 + __pyx_v_ix); __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_record, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_data = __pyx_t_6;
+303: self._model.add_nodal_output(n_node, f"{var}{ix}", data, step, inc)
__pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_nodal_output); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_15 = __Pyx_PyInt_From_int(__pyx_v_n_node); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_13 = __Pyx_PyUnicode_Unicode(__pyx_v_var); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_12 = __Pyx_PyUnicode_From_int(__pyx_v_ix, 0, ' ', 'd'); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = PyFloat_FromDouble(__pyx_v_data); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_step); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_inc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_11 = NULL; __pyx_t_1 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_11)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); __pyx_t_1 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[6] = {__pyx_t_11, __pyx_t_15, __pyx_t_9, __pyx_t_12, __pyx_t_13, __pyx_t_10}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 5+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[6] = {__pyx_t_11, __pyx_t_15, __pyx_t_9, __pyx_t_12, __pyx_t_13, __pyx_t_10}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_1, 5+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } else #endif { __pyx_t_8 = PyTuple_New(5+__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __pyx_t_11 = NULL; } __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_1, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_1, __pyx_t_9); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_1, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_1, __pyx_t_13); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_1, __pyx_t_10); __pyx_t_15 = 0; __pyx_t_9 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; __pyx_t_10 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+304: ix += 1
__pyx_v_ix = (__pyx_v_ix + 1); }
305:
+306: elif flag_out == 2:
break; default: break; }
307: # TODO: implement modal output
308: pass
309:
310: # flag_out == 3:
311: else:
312: # TODO: implement set energy output
313: pass
314:
+315: def _parse_elem_header(self, record: list):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_15_parse_elem_header(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_14_parse_elem_header[] = "Parse the element record\n\n Parameters\n ----------\n record : TODO\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_15_parse_elem_header(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_elem_header (wrapper)", 0); if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), (&PyList_Type), 1, "record", 1))) __PYX_ERR(0, 315, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_14_parse_elem_header(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject*)__pyx_v_record)); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_14_parse_elem_header(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { int __pyx_v_num; int __pyx_v_n_int_point; CYTHON_UNUSED int __pyx_v_n_sec_point; int __pyx_v_loc_id; CYTHON_UNUSED PyObject *__pyx_v_name_rebar = 0; CYTHON_UNUSED int __pyx_v_n_direct_stresses; CYTHON_UNUSED int __pyx_v_n_shear_stresses; CYTHON_UNUSED int __pyx_v_n_diretions; CYTHON_UNUSED int __pyx_v_n_sec_force_comp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_elem_header", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_elem_header", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_name_rebar); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
316: """Parse the element record
317:
318: Parameters
319: ----------
320: record : TODO
321:
322: Returns
323: -------
324: TODO
325:
326: """
+327: num: cython.int = record[2]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 327, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 2)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 327, __pyx_L1_error) __pyx_v_num = __pyx_t_1;
+328: n_int_point: cython.int = record[3]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 328, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 3)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 328, __pyx_L1_error) __pyx_v_n_int_point = __pyx_t_1;
+329: n_sec_point: cython.int = record[4]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 329, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 4)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) __pyx_v_n_sec_point = __pyx_t_1;
330: # loc_id:
331: # - 0 if the subsequent records contain data at an integration point;
332: # - 1 if the subsequent records contain values at the centroid of the element;
333: # - 2 if the subsequent records contain data at the nodes of the element;
334: # - 3 if the subsequent records contain data associated with rebar within an element;
335: # - 4 if the subsequent records contain nodal averaged values;
336: # - 5 if the subsequent records contain values associated with the whole element
+337: loc_id: cython.int = record[5]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 337, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 5)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L1_error) __pyx_v_loc_id = __pyx_t_1;
+338: name_rebar: cython.str = record[6]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 338, __pyx_L1_error) } if (!(likely(PyUnicode_CheckExact(PyList_GET_ITEM(__pyx_v_record, 6)))||((PyList_GET_ITEM(__pyx_v_record, 6)) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(PyList_GET_ITEM(__pyx_v_record, 6))->tp_name), 0))) __PYX_ERR(0, 338, __pyx_L1_error) __pyx_t_2 = PyList_GET_ITEM(__pyx_v_record, 6); __Pyx_INCREF(__pyx_t_2); __pyx_v_name_rebar = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0;
+339: n_direct_stresses: cython.int = record[7]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 339, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 7)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) __pyx_v_n_direct_stresses = __pyx_t_1;
+340: n_shear_stresses: cython.int = record[8]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 340, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 8)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L1_error) __pyx_v_n_shear_stresses = __pyx_t_1;
+341: n_diretions: cython.int = record[9]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 341, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 9)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 341, __pyx_L1_error) __pyx_v_n_diretions = __pyx_t_1;
+342: n_sec_force_comp: cython.int = record[10]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 342, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_As_int(PyList_GET_ITEM(__pyx_v_record, 10)); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 342, __pyx_L1_error) __pyx_v_n_sec_force_comp = __pyx_t_1;
343:
344: # Append the element/node number to the list of elements/nodes which
345: # data is going to be read next
+346: self._curr_elem_out: cython.int = num
__pyx_v_self->_curr_elem_out = __pyx_v_num;
+347: self._curr_n_int_point: cython.int = n_int_point
__pyx_v_self->_curr_n_int_point = __pyx_v_n_int_point;
+348: self._curr_loc_id: cython.int = loc_id
__pyx_v_self->_curr_loc_id = __pyx_v_loc_id;
349: # self._curr_int_point_data = dict()
350:
+351: def _parse_nodal_output(self, record: list, var: str):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_17_parse_nodal_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_16_parse_nodal_output[] = "Parse the nodal record\n\n Parameters\n ----------\n record : TODO\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_17_parse_nodal_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_record = 0; PyObject *__pyx_v_var = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_nodal_output (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,&__pyx_n_s_var,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_nodal_output", 1, 2, 2, 1); __PYX_ERR(0, 351, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_nodal_output") < 0)) __PYX_ERR(0, 351, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_record = ((PyObject*)values[0]); __pyx_v_var = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_parse_nodal_output", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 351, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_nodal_output", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), (&PyList_Type), 1, "record", 1))) __PYX_ERR(0, 351, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), (&PyUnicode_Type), 1, "var", 1))) __PYX_ERR(0, 351, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_16_parse_nodal_output(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_record, __pyx_v_var); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_16_parse_nodal_output(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record, PyObject *__pyx_v_var) { int __pyx_v_step; int __pyx_v_inc; int __pyx_v_ix; double __pyx_v_r_i; int __pyx_v_n_outputs; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_nodal_output", 0); /* … */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_nodal_output", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
352: """Parse the nodal record
353:
354: Parameters
355: ----------
356: record : TODO
357:
358: Returns
359: -------
360: TODO
361:
362: """
+363: step = self._curr_step
__pyx_t_1 = __pyx_v_self->_curr_step; __pyx_v_step = __pyx_t_1;
+364: inc = self._curr_inc
__pyx_t_1 = __pyx_v_self->_curr_inc; __pyx_v_inc = __pyx_t_1;
+365: ix: cython.int = 1
__pyx_v_ix = 1;
366: r_i: cython.double
+367: n_outputs: cython.int = len(record[3:])
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 367, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_record, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n_outputs = __pyx_t_3;
368:
+369: if len(record) > 2:
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); __PYX_ERR(0, 369, __pyx_L1_error) } __pyx_t_3 = PyList_GET_SIZE(__pyx_v_record); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 369, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { /* … */ goto __pyx_L3; }
+370: while ix < n_outputs:
while (1) { __pyx_t_4 = ((__pyx_v_ix < __pyx_v_n_outputs) != 0); if (!__pyx_t_4) break;
+371: r_i = record[2 + ix]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 371, __pyx_L1_error) } __pyx_t_5 = (2 + __pyx_v_ix); __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_record, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_r_i = __pyx_t_6;
+372: self._model.add_nodal_output(node=record[2], var=f"{var}{ix}", data=r_i,
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_nodal_output); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 372, __pyx_L1_error) } if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_node, PyList_GET_ITEM(__pyx_v_record, 2)) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_var); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyUnicode_From_int(__pyx_v_ix, 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_var, __pyx_t_10) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = PyFloat_FromDouble(__pyx_v_r_i); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_data, __pyx_t_10) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; /* … */ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+373: step=step, inc=inc)
__pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_step); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_step, __pyx_t_10) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_inc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_inc, __pyx_t_10) < 0) __PYX_ERR(0, 372, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+374: ix += 1
__pyx_v_ix = (__pyx_v_ix + 1); }
375: else:
+376: self._model.add_nodal_output(node=record[0], var=var, data=record[1], step=step,
/*else*/ { __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_nodal_output); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 376, __pyx_L1_error) } if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_node, PyList_GET_ITEM(__pyx_v_record, 0)) < 0) __PYX_ERR(0, 376, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_var, __pyx_v_var) < 0) __PYX_ERR(0, 376, __pyx_L1_error) if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 376, __pyx_L1_error) } if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_data, PyList_GET_ITEM(__pyx_v_record, 1)) < 0) __PYX_ERR(0, 376, __pyx_L1_error) __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_step); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_step, __pyx_t_2) < 0) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* … */ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:;
+377: inc=inc)
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_inc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_inc, __pyx_t_2) < 0) __PYX_ERR(0, 376, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
378:
+379: return 1
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_int_1); __pyx_r = __pyx_int_1; goto __pyx_L0;
380:
+381: def _parse_surface_output(self, record: list, var: str):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_19_parse_surface_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_18_parse_surface_output[] = "Parse results from surfaces.\n\n Parameters\n ----------\n record : TODO\n var : str\n Name of the variable to be processed, e.g.: \"CSTRESS\"\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_19_parse_surface_output(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_record = 0; PyObject *__pyx_v_var = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_surface_output (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,&__pyx_n_s_var,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_var)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_surface_output", 1, 2, 2, 1); __PYX_ERR(0, 381, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_surface_output") < 0)) __PYX_ERR(0, 381, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_record = ((PyObject*)values[0]); __pyx_v_var = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_parse_surface_output", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 381, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_surface_output", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_record), (&PyList_Type), 1, "record", 1))) __PYX_ERR(0, 381, __pyx_L1_error) if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_var), (&PyUnicode_Type), 1, "var", 1))) __PYX_ERR(0, 381, __pyx_L1_error) __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_18_parse_surface_output(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_record, __pyx_v_var); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_18_parse_surface_output(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record, PyObject *__pyx_v_var) { int __pyx_v_step; int __pyx_v_inc; int __pyx_v_node; int __pyx_v_ix; double __pyx_v_comp_i; int __pyx_v_n_comp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_surface_output", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_surface_output", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
382: """Parse results from surfaces.
383:
384: Parameters
385: ----------
386: record : TODO
387: var : str
388: Name of the variable to be processed, e.g.: "CSTRESS"
389:
390: Returns
391: -------
392: TODO
393:
394: """
+395: step = self._curr_step
__pyx_t_1 = __pyx_v_self->_curr_step; __pyx_v_step = __pyx_t_1;
+396: inc = self._curr_inc
__pyx_t_1 = __pyx_v_self->_curr_inc; __pyx_v_inc = __pyx_t_1;
+397: node = self._curr_output_node
__pyx_t_1 = __pyx_v_self->_curr_output_node; __pyx_v_node = __pyx_t_1;
+398: ix: cython.int = 0
__pyx_v_ix = 0;
399: comp_i: cython.double
+400: n_comp: cython.int = len(record[2:])
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 400, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_v_record, 2, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n_comp = __pyx_t_3;
401:
+402: while ix < n_comp:
while (1) { __pyx_t_4 = ((__pyx_v_ix < __pyx_v_n_comp) != 0); if (!__pyx_t_4) break;
+403: comp_i = record[2 + ix]
if (unlikely(__pyx_v_record == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 403, __pyx_L1_error) } __pyx_t_5 = (2 + __pyx_v_ix); __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_record, __pyx_t_5, long, 1, __Pyx_PyInt_From_long, 1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_6 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_comp_i = __pyx_t_6;
+404: self._model.add_nodal_output(node=node, var=self.CONTACT_OUT[var][ix],
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_nodal_output); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_node); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_node, __pyx_t_8) < 0) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_CONTACT_OUT); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_t_8, __pyx_v_var); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, __pyx_v_ix, int, 1, __Pyx_PyInt_From_int, 0, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_var, __pyx_t_8) < 0) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; /* … */ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+405: data=comp_i, step=step, inc=inc)
__pyx_t_8 = PyFloat_FromDouble(__pyx_v_comp_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_data, __pyx_t_8) < 0) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_step); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_step, __pyx_t_8) < 0) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_inc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_inc, __pyx_t_8) < 0) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+406: ix += 1
__pyx_v_ix = (__pyx_v_ix + 1); }
407:
+408: def _parse_contact_output_request(self, record):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_21_parse_contact_output_request(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_20_parse_contact_output_request[] = "Parse surfaces and nodes associated to contact pair.\n\n Parameters\n ----------\n record : TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_21_parse_contact_output_request(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_contact_output_request (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_20_parse_contact_output_request(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject *)__pyx_v_record)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_20_parse_contact_output_request(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_v_id_slave = NULL; PyObject *__pyx_v_id_master = NULL; PyObject *__pyx_v_name_slave = NULL; PyObject *__pyx_v_name_master = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_contact_output_request", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_contact_output_request", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_id_slave); __Pyx_XDECREF(__pyx_v_id_master); __Pyx_XDECREF(__pyx_v_name_slave); __Pyx_XDECREF(__pyx_v_name_master); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
409: """Parse surfaces and nodes associated to contact pair.
410:
411: Parameters
412: ----------
413: record : TODO
414:
415: """
+416: id_slave = int(record[3].strip())
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_record, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_id_slave = __pyx_t_3; __pyx_t_3 = 0;
+417: id_master = int(record[4].strip())
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_id_master = __pyx_t_2; __pyx_t_2 = 0;
+418: name_slave = self._label_cross_ref[id_slave]
if (unlikely(__pyx_v_self->_label_cross_ref == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 418, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_label_cross_ref, __pyx_v_id_slave); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_name_slave = __pyx_t_2; __pyx_t_2 = 0;
+419: name_master = self._label_cross_ref[id_master]
if (unlikely(__pyx_v_self->_label_cross_ref == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 419, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->_label_cross_ref, __pyx_v_id_master); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_name_master = __pyx_t_2; __pyx_t_2 = 0;
+420: self._model.add_contact_pair(master=name_master, slave=name_slave)
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_contact_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_master, __pyx_v_name_master) < 0) __PYX_ERR(0, 420, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_slave, __pyx_v_name_slave) < 0) __PYX_ERR(0, 420, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
421:
+422: def _parse_curr_contact_node(self, record):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_23_parse_curr_contact_node(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_22_parse_curr_contact_node[] = "Parse the current node associated to the surface output.\n\n Parameters\n ----------\n record : TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_23_parse_curr_contact_node(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_curr_contact_node (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_22_parse_curr_contact_node(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject *)__pyx_v_record)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_22_parse_curr_contact_node(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_curr_contact_node", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_curr_contact_node", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
423: """Parse the current node associated to the surface output.
424:
425: Parameters
426: ----------
427: record : TODO
428:
429: """
+430: self._curr_output_node = record[2]
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_curr_output_node = __pyx_t_2;
+431: self._no_of_components = record[3]
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_no_of_components, __pyx_t_1) < 0) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
432:
+433: def _parse_output_request(self, record):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_25_parse_output_request(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_24_parse_output_request[] = "Parse the output request\n\n Parameters\n ----------\n record : TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_25_parse_output_request(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_output_request (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_24_parse_output_request(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject *)__pyx_v_record)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_24_parse_output_request(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_output_request", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_output_request", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
434: """Parse the output request
435:
436: Parameters
437: ----------
438: record : TODO
439:
440: """
+441: self._flag_output = record[2]
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->_flag_output = __pyx_t_2;
+442: self._output_request_set = record[3]
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_output_request_set); __Pyx_DECREF(__pyx_v_self->_output_request_set); __pyx_v_self->_output_request_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
+443: if self._flag_output == 0:
__pyx_t_3 = ((__pyx_v_self->_flag_output == 0) != 0); if (__pyx_t_3) { /* … */ }
+444: self._output_elem_type = record[4]
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 444, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_output_elem_type); __Pyx_DECREF(__pyx_v_self->_output_elem_type); __pyx_v_self->_output_elem_type = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0;
445:
+446: def _parse_step(self, record, flag):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_27_parse_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_26_parse_step[] = "Parse the current step\n\n Parameters\n ----------\n record : TODO\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_27_parse_step(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_record = 0; PyObject *__pyx_v_flag = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_step (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,&__pyx_n_s_flag,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flag)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_step", 1, 2, 2, 1); __PYX_ERR(0, 446, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_step") < 0)) __PYX_ERR(0, 446, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_record = values[0]; __pyx_v_flag = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_parse_step", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 446, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_step", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_26_parse_step(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_record, __pyx_v_flag); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_26_parse_step(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record, PyObject *__pyx_v_flag) { int __pyx_v_n_step; int __pyx_v_n_inc; PyObject *__pyx_v_data = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_step", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_step", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_data); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
447: """Parse the current step
448:
449: Parameters
450: ----------
451: record : TODO
452:
453: Returns
454: -------
455: TODO
456:
457: """
458: n_step: cython.int
459: n_inc: cython.int
460:
+461: if flag == "start":
__pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_flag, __pyx_n_u_start, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 461, __pyx_L1_error) if (__pyx_t_1) { /* … */ goto __pyx_L3; }
+462: n_step = record[7]
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_record, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n_step = __pyx_t_3;
+463: n_inc = record[8]
__pyx_t_2 = __Pyx_GetItemInt(__pyx_v_record, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_n_inc = __pyx_t_3;
464:
465: data = {
+466: "total time": record[2],
__pyx_t_2 = __Pyx_PyDict_NewPresized(12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_total_time, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+467: "step time": record[3],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_step_time, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+468: "max creep": record[4],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_max_creep, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+469: "solution amplitude": record[5],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_solution_amplitude, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+470: "procedure type": record[6],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_procedure_type, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+471: "step number": record[7],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_step_number, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+472: "increment number": record[8],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_increment_number, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+473: "linear perturbation": record[9],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_linear_perturbation, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+474: "load proportionality": record[10],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_load_proportionality, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+475: "frequency": record[11],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_frequency, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+476: "time increment": record[12],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_time_increment, __pyx_t_4) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+477: "subheading": "".join(record[13:]),
__pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_record, 13, 0, NULL, NULL, &__pyx_slice__4, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyUnicode_Join(__pyx_kp_u_, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (PyDict_SetItem(__pyx_t_2, __pyx_n_u_subheading, __pyx_t_5) < 0) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_data = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; /* … */ __pyx_slice__4 = PySlice_New(__pyx_int_13, Py_None, Py_None); if (unlikely(!__pyx_slice__4)) __PYX_ERR(0, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__4); __Pyx_GIVEREF(__pyx_slice__4);
478: }
479:
+480: self._model.add_step(n_step, data)
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_step); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_n_step); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_3 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_3 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_data}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_data}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_3, 2+__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { __pyx_t_7 = PyTuple_New(2+__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; } __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_v_data); __Pyx_GIVEREF(__pyx_v_data); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_3, __pyx_v_data); __pyx_t_4 = 0; __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
481:
+482: self._curr_step = n_step
__pyx_v_self->_curr_step = __pyx_v_n_step;
+483: self._curr_inc = n_inc
__pyx_v_self->_curr_inc = __pyx_v_n_inc;
484: else:
+485: self._curr_step = -1
/*else*/ { __pyx_v_self->_curr_step = -1;
+486: self._curr_inc = -1
__pyx_v_self->_curr_inc = -1; } __pyx_L3:;
487:
+488: def _parse_active_dof(self, record):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_29_parse_active_dof(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_28_parse_active_dof[] = "Parse the active degrees of freedom.\n\n Parameters\n ----------\n record : TODO\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_29_parse_active_dof(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_active_dof (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_28_parse_active_dof(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject *)__pyx_v_record)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_28_parse_active_dof(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_v_active_dof = NULL; PyObject *__pyx_v_dimension = NULL; PyObject *__pyx_7genexpr__pyx_v_k = NULL; PyObject *__pyx_7genexpr__pyx_v_val = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_active_dof", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_active_dof", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_active_dof); __Pyx_XDECREF(__pyx_v_dimension); __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __Pyx_XDECREF(__pyx_7genexpr__pyx_v_val); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
489: """Parse the active degrees of freedom.
490:
491: Parameters
492: ----------
493: record : TODO
494:
495: Returns
496: -------
497: TODO
498:
499: """
+500: active_dof = np.array(record[2:], dtype=int)
__Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_record, 2, 0, NULL, NULL, &__pyx_slice__5, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 500, __pyx_L1_error) __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_active_dof = __pyx_t_4; __pyx_t_4 = 0; /* … */ __pyx_slice__5 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__5); __Pyx_GIVEREF(__pyx_slice__5);
+501: dimension = np.sum(np.not_equal(active_dof[:3], np.zeros(3)), dtype=int)
__Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_not_equal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_active_dof, 0, 3, NULL, NULL, &__pyx_slice__6, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_int_3) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_int_3); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; __pyx_t_8 = 0; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_8 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5}; __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_3, __pyx_t_5}; __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_t_5); __pyx_t_3 = 0; __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 501, __pyx_L1_error) __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_dimension = __pyx_t_6; __pyx_t_6 = 0; /* … */ __pyx_slice__6 = PySlice_New(Py_None, __pyx_int_3, Py_None); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__6); __Pyx_GIVEREF(__pyx_slice__6);
+502: self._model_dimension = dimension
__pyx_t_8 = __Pyx_PyInt_As_int(__pyx_v_dimension); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error) __pyx_v_self->_model_dimension = __pyx_t_8;
+503: self._model._dimension = dimension
if (__Pyx_PyObject_SetAttrStr(__pyx_v_self->_model, __pyx_n_s_dimension, __pyx_v_dimension) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
504:
505: # (k + 1): because the dof's start at 1
506: # (val - 1): because they will reference to a list, which is 0-indexed
+507: self._dof_map = {(k + 1): (val - 1) if val != 0 else 0
{ /* enter inner scope */ __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 507, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_0); __pyx_t_4 = __pyx_int_0; /* … */ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_7genexpr__pyx_v_k, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = __Pyx_PyInt_NeObjC(__pyx_7genexpr__pyx_v_val, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 507, __pyx_L5_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_11) { __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_7genexpr__pyx_v_val, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 507, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; } else { __Pyx_INCREF(__pyx_int_0); __pyx_t_5 = __pyx_int_0; } if (unlikely(PyDict_SetItem(__pyx_t_6, (PyObject*)__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 507, __pyx_L5_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* … */ __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_dof_map); __Pyx_DECREF(__pyx_v_self->_dof_map); __pyx_v_self->_dof_map = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0;
+508: for k, val in enumerate(active_dof)}
if (likely(PyList_CheckExact(__pyx_v_active_dof)) || PyTuple_CheckExact(__pyx_v_active_dof)) { __pyx_t_2 = __pyx_v_active_dof; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_active_dof); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 508, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_10)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 508, __pyx_L5_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 508, __pyx_L5_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { __pyx_t_1 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 508, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_1); } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_val, __pyx_t_1); __pyx_t_1 = 0; __Pyx_INCREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_k, __pyx_t_4); __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = __pyx_t_1; __pyx_t_1 = 0; /* … */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_val); __pyx_7genexpr__pyx_v_val = 0; goto __pyx_L8_exit_scope; __pyx_L5_error:; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_k); __pyx_7genexpr__pyx_v_k = 0; __Pyx_XDECREF(__pyx_7genexpr__pyx_v_val); __pyx_7genexpr__pyx_v_val = 0; goto __pyx_L1_error; __pyx_L8_exit_scope:; } /* exit inner scope */
509:
510: # Process all nodes
+511: self._parse_all_nodes()
__pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_all_nodes); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_2)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_6 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
512:
+513: def _parse_set(self, record, add, s_type):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_31_parse_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_30_parse_set[] = "Parse the element sets\n\n Parameters\n ----------\n record : TODO\n add : bool\n Flags whether records are added to an existing set a new set has to be\n created.\n s_type : str\n Type of set (\"element\", \"node\")\n\n Returns\n -------\n TODO\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_31_parse_set(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_record = 0; PyObject *__pyx_v_add = 0; PyObject *__pyx_v_s_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_set (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,&__pyx_n_s_add,&__pyx_n_s_s_type,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); CYTHON_FALLTHROUGH; case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_add)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_set", 1, 3, 3, 1); __PYX_ERR(0, 513, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_s_type)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_set", 1, 3, 3, 2); __PYX_ERR(0, 513, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_set") < 0)) __PYX_ERR(0, 513, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_record = values[0]; __pyx_v_add = values[1]; __pyx_v_s_type = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_parse_set", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 513, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_30_parse_set(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_record, __pyx_v_add, __pyx_v_s_type); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_30_parse_set(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record, PyObject *__pyx_v_add, PyObject *__pyx_v_s_type) { PyObject *__pyx_v_elements = NULL; PyObject *__pyx_v_ref = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_set", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_elements); __Pyx_XDECREF(__pyx_v_ref); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
514: """Parse the element sets
515:
516: Parameters
517: ----------
518: record : TODO
519: add : bool
520: Flags whether records are added to an existing set a new set has to be
521: created.
522: s_type : str
523: Type of set ("element", "node")
524:
525: Returns
526: -------
527: TODO
528:
529: """
530:
+531: if add:
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_add); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 531, __pyx_L1_error) if (__pyx_t_1) { /* … */ goto __pyx_L3; }
+532: elements = record[2:]
__pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_record, 2, 0, NULL, NULL, &__pyx_slice__5, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_elements = __pyx_t_2; __pyx_t_2 = 0;
+533: ref = self._curr_set
__pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_curr_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ref = __pyx_t_2; __pyx_t_2 = 0;
+534: self._tmp_sets[s_type][ref].extend(elements)
if (unlikely(__pyx_v_self->_tmp_sets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 534, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->_tmp_sets, __pyx_v_s_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_ref); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_3, function); } } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_elements) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_elements); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
535: else:
+536: elements = record[3:]
/*else*/ { __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_record, 3, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_elements = __pyx_t_2; __pyx_t_2 = 0; /* … */ __pyx_slice__7 = PySlice_New(__pyx_int_3, Py_None, Py_None); if (unlikely(!__pyx_slice__7)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__7); __Pyx_GIVEREF(__pyx_slice__7);
+537: ref = int(record[2].strip())
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_record, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_ref = __pyx_t_4; __pyx_t_4 = 0;
+538: self._curr_set = ref
__pyx_t_5 = __Pyx_PyInt_As_int(__pyx_v_ref); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 538, __pyx_L1_error) __pyx_v_self->_curr_set = __pyx_t_5;
+539: self._tmp_sets[s_type][ref] = elements
if (unlikely(__pyx_v_self->_tmp_sets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 539, __pyx_L1_error) } __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->_tmp_sets, __pyx_v_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_ref, __pyx_v_elements) < 0)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L3:;
540:
+541: def _parse_surface(self, record, add_face):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_33_parse_surface(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_32_parse_surface[] = "Parse the surface records.\n\n Parameters\n ----------\n record : list\n Record entry from the *.fil file.\n add_face : bool\n Flag to determine whether a face has to be added to an existing surface\n (True), or whether a new surfaces has to be created (False)\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_33_parse_surface(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_record = 0; PyObject *__pyx_v_add_face = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_surface (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,&__pyx_n_s_add_face,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_add_face)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_surface", 1, 2, 2, 1); __PYX_ERR(0, 541, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_surface") < 0)) __PYX_ERR(0, 541, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_record = values[0]; __pyx_v_add_face = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_parse_surface", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 541, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_32_parse_surface(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_record, __pyx_v_add_face); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_32_parse_surface(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record, PyObject *__pyx_v_add_face) { int __pyx_v_label; PyObject *__pyx_v_face_info = NULL; PyObject *__pyx_v_s_type = NULL; PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_dim = NULL; CYTHON_UNUSED PyObject *__pyx_v_n_faces = NULL; PyObject *__pyx_v_n_slaves = NULL; PyObject *__pyx_v_master_names = NULL; PyObject *__pyx_v_ref_label = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_surface", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_surface", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_face_info); __Pyx_XDECREF(__pyx_v_s_type); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_dim); __Pyx_XDECREF(__pyx_v_n_faces); __Pyx_XDECREF(__pyx_v_n_slaves); __Pyx_XDECREF(__pyx_v_master_names); __Pyx_XDECREF(__pyx_v_ref_label); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
542: """Parse the surface records.
543:
544: Parameters
545: ----------
546: record : list
547: Record entry from the *.fil file.
548: add_face : bool
549: Flag to determine whether a face has to be added to an existing surface
550: (True), or whether a new surfaces has to be created (False)
551:
552: """
+553: if add_face:
__pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_add_face); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 553, __pyx_L1_error) if (__pyx_t_1) { /* … */ goto __pyx_L3; }
554: # Add faces to existing surface
+555: label = self._curr_surface
__pyx_t_2 = __pyx_v_self->_curr_surface; __pyx_v_label = __pyx_t_2;
556:
557: face_info = {
+558: "element": record[2],
__pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_element, __pyx_t_4) < 0) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+559: "face": record[3],
__pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_face, __pyx_t_4) < 0) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+560: "nodes": record[5:],
__pyx_t_4 = __Pyx_PyObject_GetSlice(__pyx_v_record, 5, 0, NULL, NULL, &__pyx_slice__8, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (PyDict_SetItem(__pyx_t_3, __pyx_n_u_nodes, __pyx_t_4) < 0) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_face_info = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; /* … */ __pyx_slice__8 = PySlice_New(__pyx_int_5, Py_None, Py_None); if (unlikely(!__pyx_slice__8)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__8); __Pyx_GIVEREF(__pyx_slice__8);
561: }
+562: self._tmp_faces[label].append(face_info)
if (unlikely(__pyx_v_self->_tmp_faces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 562, __pyx_L1_error) } __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_label); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->_tmp_faces, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_face_info); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
563:
564: else:
565: # Create new surface container
+566: s_type = record[4]
/*else*/ { __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_s_type = __pyx_t_4; __pyx_t_4 = 0;
+567: name = int(record[2].strip())
__pyx_t_3 = __Pyx_GetItemInt(__pyx_v_record, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_name = __pyx_t_6; __pyx_t_6 = 0;
+568: dim = record[3]
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_record, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_dim = __pyx_t_6; __pyx_t_6 = 0;
+569: n_faces = record[5]
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_record, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_n_faces = __pyx_t_6; __pyx_t_6 = 0;
570:
571: # Set temporary variable
+572: self._curr_surface = name
__pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_name); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 572, __pyx_L1_error) __pyx_v_self->_curr_surface = __pyx_t_2;
573: # Start corresponding container for the surface
+574: self._tmp_faces[name] = list()
__pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (unlikely(__pyx_v_self->_tmp_faces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 574, __pyx_L1_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_tmp_faces, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
575:
+576: if s_type == 1:
__pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_s_type, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* … */ goto __pyx_L4; }
577: # Deformable surface
+578: n_slaves = record[6]
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_record, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_n_slaves = __pyx_t_6; __pyx_t_6 = 0;
+579: if n_slaves > 0:
__pyx_t_6 = PyObject_RichCompare(__pyx_v_n_slaves, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 579, __pyx_L1_error) __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* … */ goto __pyx_L5; }
+580: master_names = record[7:]
__pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_v_record, 7, 0, NULL, NULL, &__pyx_slice__9, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_master_names = __pyx_t_6; __pyx_t_6 = 0; /* … */ __pyx_slice__9 = PySlice_New(__pyx_int_7, Py_None, Py_None); if (unlikely(!__pyx_slice__9)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__9); __Pyx_GIVEREF(__pyx_slice__9);
581: else:
+582: master_names = []
/*else*/ { __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_master_names = __pyx_t_6; __pyx_t_6 = 0; } __pyx_L5:;
583:
+584: self._tmp_surf[name] = {
if (unlikely(__pyx_v_self->_tmp_surf == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 584, __pyx_L1_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_tmp_surf, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+585: "dimension": dim,
__pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_dimension_2, __pyx_v_dim) < 0) __PYX_ERR(0, 585, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_type, __pyx_n_u_deformable) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
586: "type": "deformable",
+587: "master names": master_names,
if (PyDict_SetItem(__pyx_t_6, __pyx_kp_u_master_names, __pyx_v_master_names) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
588: }
589:
+590: elif s_type == 2:
__pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_s_type, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_1) { /* … */ } __pyx_L4:; } __pyx_L3:;
591: # Rigid surface
+592: ref_label = record[6]
__pyx_t_6 = __Pyx_GetItemInt(__pyx_v_record, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_ref_label = __pyx_t_6; __pyx_t_6 = 0;
+593: self._tmp_surf[name] = {
if (unlikely(__pyx_v_self->_tmp_surf == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 593, __pyx_L1_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_tmp_surf, __pyx_v_name, __pyx_t_6) < 0)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+594: "dimension": dim,
__pyx_t_6 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_dimension_2, __pyx_v_dim) < 0) __PYX_ERR(0, 594, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_6, __pyx_n_u_type, __pyx_n_u_rigid) < 0) __PYX_ERR(0, 594, __pyx_L1_error)
595: "type": "rigid",
+596: "reference point": ref_label,
if (PyDict_SetItem(__pyx_t_6, __pyx_kp_u_reference_point, __pyx_v_ref_label) < 0) __PYX_ERR(0, 594, __pyx_L1_error)
597: }
598:
+599: def _post_parse_all_surfaces(self):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_35_post_parse_all_surfaces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_34_post_parse_all_surfaces[] = "Process all the surfaces after reading all records."; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_35_post_parse_all_surfaces(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_post_parse_all_surfaces (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_34_post_parse_all_surfaces(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_34_post_parse_all_surfaces(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self) { PyObject *__pyx_v_surfaces = NULL; PyObject *__pyx_v_faces = NULL; PyObject *__pyx_v_model = NULL; int __pyx_v_ix; PyObject *__pyx_v_surf = NULL; PyObject *__pyx_v_name = NULL; PyObject *__pyx_v_dim = NULL; PyObject *__pyx_v_ref = NULL; PyObject *__pyx_v_face_i = NULL; PyObject *__pyx_v_master = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_post_parse_all_surfaces", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._post_parse_all_surfaces", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_surfaces); __Pyx_XDECREF(__pyx_v_faces); __Pyx_XDECREF(__pyx_v_model); __Pyx_XDECREF(__pyx_v_surf); __Pyx_XDECREF(__pyx_v_name); __Pyx_XDECREF(__pyx_v_dim); __Pyx_XDECREF(__pyx_v_ref); __Pyx_XDECREF(__pyx_v_face_i); __Pyx_XDECREF(__pyx_v_master); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
600: """Process all the surfaces after reading all records."""
+601: surfaces = self._tmp_surf
__pyx_t_1 = __pyx_v_self->_tmp_surf;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_surfaces = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
+602: faces = self._tmp_faces
__pyx_t_1 = __pyx_v_self->_tmp_faces;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_faces = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
+603: model = self._model
__pyx_t_1 = __pyx_v_self->_model;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_model = __pyx_t_1;
__pyx_t_1 = 0;
604: ix: cython.int
605:
+606: for ix, surf in surfaces.items():
__pyx_t_2 = 0; if (unlikely(__pyx_v_surfaces == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); __PYX_ERR(0, 606, __pyx_L1_error) } __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_surfaces, 1, __pyx_n_s_items, (&__pyx_t_3), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; while (1) { __pyx_t_7 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_3, &__pyx_t_2, &__pyx_t_5, &__pyx_t_6, NULL, __pyx_t_4); if (unlikely(__pyx_t_7 == 0)) break; if (unlikely(__pyx_t_7 == -1)) __PYX_ERR(0, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_ix = __pyx_t_7; __Pyx_XDECREF_SET(__pyx_v_surf, __pyx_t_6); __pyx_t_6 = 0;
+607: if surf["type"] == "rigid":
__pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_surf, __pyx_n_u_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_rigid, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { /* … */ goto __pyx_L5; }
608: # Get name
+609: name = self._label_cross_ref[ix]
if (unlikely(__pyx_v_self->_label_cross_ref == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 609, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->_label_cross_ref, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); __pyx_t_5 = 0;
+610: dim = surf["dimension"]
__pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_surf, __pyx_n_u_dimension_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_5); __pyx_t_5 = 0;
+611: ref = surf["reference point"]
__pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_surf, __pyx_kp_u_reference_point); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_ref, __pyx_t_5); __pyx_t_5 = 0;
+612: model.add_rigid_surface(name, dim, ref)
__pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_add_rigid_surface); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_9 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_name, __pyx_v_dim, __pyx_v_ref}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_9, __pyx_v_name, __pyx_v_dim, __pyx_v_ref}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_10 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_v_name); __Pyx_INCREF(__pyx_v_dim); __Pyx_GIVEREF(__pyx_v_dim); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_v_dim); __Pyx_INCREF(__pyx_v_ref); __Pyx_GIVEREF(__pyx_v_ref); PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_7, __pyx_v_ref); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
613:
+614: for face_i in faces[ix]:
if (unlikely(__pyx_v_faces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 614, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_faces, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_5 = __pyx_t_6; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 614, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 614, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_6); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 614, __pyx_L1_error) #else __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } } else { __pyx_t_6 = __pyx_t_12(__pyx_t_5); if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 614, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_6); } __Pyx_XDECREF_SET(__pyx_v_face_i, __pyx_t_6); __pyx_t_6 = 0; /* … */ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+615: model.add_face_to_surface(name, face_i)
__pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_add_face_to_surface); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_9 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_10, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_name, __pyx_v_face_i}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_name, __pyx_v_face_i}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_13 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_9); __pyx_t_9 = NULL; } __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_v_name); __Pyx_INCREF(__pyx_v_face_i); __Pyx_GIVEREF(__pyx_v_face_i); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_v_face_i); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
616:
+617: elif surf["type"] == "deformable":
__pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_surf, __pyx_n_u_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_deformable, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 617, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { /* … */ } __pyx_L5:; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
618: # Get name
+619: name = self._label_cross_ref[ix]
if (unlikely(__pyx_v_self->_label_cross_ref == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 619, __pyx_L1_error) } __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ix); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_self->_label_cross_ref, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_6); __pyx_t_6 = 0;
+620: dim = surf["dimension"]
__pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_surf, __pyx_n_u_dimension_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_dim, __pyx_t_6); __pyx_t_6 = 0;
+621: master = surf["master names"]
__pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_surf, __pyx_kp_u_master_names); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_XDECREF_SET(__pyx_v_master, __pyx_t_6); __pyx_t_6 = 0;
+622: self._model.add_deformable_surface(name, dim, master)
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_deformable_surface); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_name, __pyx_v_dim, __pyx_v_master}; __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_10, __pyx_v_name, __pyx_v_dim, __pyx_v_master}; __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_6); } else #endif { __pyx_t_13 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_7, __pyx_v_name); __Pyx_INCREF(__pyx_v_dim); __Pyx_GIVEREF(__pyx_v_dim); PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_7, __pyx_v_dim); __Pyx_INCREF(__pyx_v_master); __Pyx_GIVEREF(__pyx_v_master); PyTuple_SET_ITEM(__pyx_t_13, 2+__pyx_t_7, __pyx_v_master); __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_13, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
623:
+624: for face_i in faces[ix]:
if (unlikely(__pyx_v_faces == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 624, __pyx_L1_error) } __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_ix); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_faces, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { __pyx_t_11 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 624, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 624, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 624, __pyx_L1_error) #else __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } } else { __pyx_t_5 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else __PYX_ERR(0, 624, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } __Pyx_XDECREF_SET(__pyx_v_face_i, __pyx_t_5); __pyx_t_5 = 0; /* … */ } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+625: model.add_face_to_surface(name, face_i)
__pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_add_face_to_surface); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_10 = NULL; __pyx_t_7 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_13))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_13); if (likely(__pyx_t_10)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13); __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_13, function); __pyx_t_7 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_name, __pyx_v_face_i}; __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_name, __pyx_v_face_i}; __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL; } __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_v_name); __Pyx_INCREF(__pyx_v_face_i); __Pyx_GIVEREF(__pyx_v_face_i); PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_v_face_i); __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
626:
+627: def _parse_label_cross_ref(self, record):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_37_parse_label_cross_ref(PyObject *__pyx_v_self, PyObject *__pyx_v_record); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_36_parse_label_cross_ref[] = "Parse label cross-references\n\n Parameters\n ----------\n record : list\n Records parsed from the *.fil file\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_37_parse_label_cross_ref(PyObject *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_label_cross_ref (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_36_parse_label_cross_ref(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), ((PyObject *)__pyx_v_record)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_36_parse_label_cross_ref(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record) { PyObject *__pyx_v_ref = NULL; PyObject *__pyx_v_label = NULL; PyObject *__pyx_v_tmp_sets = NULL; PyObject *__pyx_v_elements = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_label_cross_ref", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_label_cross_ref", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_ref); __Pyx_XDECREF(__pyx_v_label); __Pyx_XDECREF(__pyx_v_tmp_sets); __Pyx_XDECREF(__pyx_v_elements); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
628: """Parse label cross-references
629:
630: Parameters
631: ----------
632: record : list
633: Records parsed from the *.fil file
634:
635: """
+636: ref = record[2]
__pyx_t_1 = __Pyx_GetItemInt(__pyx_v_record, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ref = __pyx_t_1; __pyx_t_1 = 0;
+637: label = "".join(record[3:]).strip()
__pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_record, 3, 0, NULL, NULL, &__pyx_slice__7, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyUnicode_Join(__pyx_kp_u_, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_label = __pyx_t_1; __pyx_t_1 = 0;
638:
+639: self._label_cross_ref[ref] = label
if (unlikely(__pyx_v_self->_label_cross_ref == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 639, __pyx_L1_error) } if (unlikely(PyDict_SetItem(__pyx_v_self->_label_cross_ref, __pyx_v_ref, __pyx_v_label) < 0)) __PYX_ERR(0, 639, __pyx_L1_error)
640:
+641: tmp_sets = self._tmp_sets
__pyx_t_1 = __pyx_v_self->_tmp_sets;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_tmp_sets = ((PyObject*)__pyx_t_1);
__pyx_t_1 = 0;
642:
+643: if ref in tmp_sets["element"]:
if (unlikely(__pyx_v_tmp_sets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 643, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_tmp_sets, __pyx_n_u_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_ref, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* … */ goto __pyx_L3; }
+644: elements = tmp_sets["element"][ref]
if (unlikely(__pyx_v_tmp_sets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 644, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_tmp_sets, __pyx_n_u_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_elements = __pyx_t_2; __pyx_t_2 = 0;
+645: self._model.add_set(label, elements, "element")
__pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_label, __pyx_v_elements, __pyx_n_u_element}; __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_label, __pyx_v_elements, __pyx_n_u_element}; __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; } __Pyx_INCREF(__pyx_v_label); __Pyx_GIVEREF(__pyx_v_label); PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_label); __Pyx_INCREF(__pyx_v_elements); __Pyx_GIVEREF(__pyx_v_elements); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_elements); __Pyx_INCREF(__pyx_n_u_element); __Pyx_GIVEREF(__pyx_n_u_element); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_n_u_element); __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+646: elif ref in tmp_sets["node"]:
if (unlikely(__pyx_v_tmp_sets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 646, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_tmp_sets, __pyx_n_u_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_ref, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { /* … */ } __pyx_L3:;
+647: elements = tmp_sets["node"][ref]
if (unlikely(__pyx_v_tmp_sets == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 647, __pyx_L1_error) } __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_tmp_sets, __pyx_n_u_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_ref); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_elements = __pyx_t_1; __pyx_t_1 = 0;
+648: self._model.add_set(label, elements, "node")
__pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_model, __pyx_n_s_add_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; __pyx_t_6 = 0; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2); if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); __pyx_t_6 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_label, __pyx_v_elements, __pyx_n_u_node}; __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_label, __pyx_v_elements, __pyx_n_u_node}; __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL; } __Pyx_INCREF(__pyx_v_label); __Pyx_GIVEREF(__pyx_v_label); PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, __pyx_v_label); __Pyx_INCREF(__pyx_v_elements); __Pyx_GIVEREF(__pyx_v_elements); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_v_elements); __Pyx_INCREF(__pyx_n_u_node); __Pyx_GIVEREF(__pyx_n_u_node); PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, __pyx_n_u_node); __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
649:
+650: def _parse_not_implemented(self, record, r_type):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_39_parse_not_implemented(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_38_parse_not_implemented[] = "Helper function to deal with the not yet implemented parsers.\n\n Parameters\n ----------\n record : TODO\n r_type : str\n\n "; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_39_parse_not_implemented(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_record = 0; PyObject *__pyx_v_r_type = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_not_implemented (wrapper)", 0); { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_record,&__pyx_n_s_r_type,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); CYTHON_FALLTHROUGH; case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_record)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r_type)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("_parse_not_implemented", 1, 2, 2, 1); __PYX_ERR(0, 650, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_parse_not_implemented") < 0)) __PYX_ERR(0, 650, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; } else { values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_record = values[0]; __pyx_v_r_type = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("_parse_not_implemented", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 650, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_not_implemented", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_38_parse_not_implemented(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self), __pyx_v_record, __pyx_v_r_type); int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_38_parse_not_implemented(CYTHON_UNUSED struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self, PyObject *__pyx_v_record, PyObject *__pyx_v_r_type) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_parse_not_implemented", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._parse_not_implemented", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
651: """Helper function to deal with the not yet implemented parsers.
652:
653: Parameters
654: ----------
655: record : TODO
656: r_type : str
657:
658: """
659: # tqdm.write(f"Record key {record[1]} ({r_type}) not yet implemented!")
+660: print(f"Record key {record[1]} ({r_type}) not yet implemented!")
__pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; __Pyx_INCREF(__pyx_kp_u_Record_key); __pyx_t_2 += 11; __Pyx_GIVEREF(__pyx_kp_u_Record_key); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Record_key); __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_record, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_kp_u__10); __pyx_t_2 += 2; __Pyx_GIVEREF(__pyx_kp_u__10); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__10); __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_r_type, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_kp_u_not_yet_implemented); __pyx_t_2 += 22; __Pyx_GIVEREF(__pyx_kp_u_not_yet_implemented); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_not_yet_implemented); __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
661:
+662: def _reference_elems_in_nodes(self):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_41_reference_elems_in_nodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static char __pyx_doc_7pybaqus_10fil_result_9FilParser_40_reference_elems_in_nodes[] = "Add a list to each node with the elements using the node."; static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_41_reference_elems_in_nodes(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_reference_elems_in_nodes (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_40_reference_elems_in_nodes(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_40_reference_elems_in_nodes(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self) { PyObject *__pyx_v_model = NULL; int __pyx_v_ni; PyObject *__pyx_v_nodes = 0; PyObject *__pyx_v_elems = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_reference_elems_in_nodes", 0); /* … */ /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("pybaqus.fil_result.FilParser._reference_elems_in_nodes", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_model); __Pyx_XDECREF(__pyx_v_nodes); __Pyx_XDECREF(__pyx_v_elems); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
663: """Add a list to each node with the elements using the node."""
+664: model = self._model
__pyx_t_1 = __pyx_v_self->_model;
__Pyx_INCREF(__pyx_t_1);
__pyx_v_model = __pyx_t_1;
__pyx_t_1 = 0;
665: ni: cython.int
+666: nodes: list = list(self._node_elems.keys())
if (unlikely(__pyx_v_self->_node_elems == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); __PYX_ERR(0, 666, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_self->_node_elems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_nodes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0;
667:
+668: for ni in nodes:
__pyx_t_2 = __pyx_v_nodes; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 668, __pyx_L1_error) #else __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_ni = __pyx_t_4; /* … */ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+669: elems = self._node_elems[ni]
if (unlikely(__pyx_v_self->_node_elems == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 669, __pyx_L1_error) } __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_ni); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->_node_elems, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_v_elems, __pyx_t_5); __pyx_t_5 = 0;
+670: model.nodes[ni].in_elements = elems
__pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_model, __pyx_n_s_nodes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_5, __pyx_v_ni, int, 1, __Pyx_PyInt_From_int, 0, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_in_elements, __pyx_v_elems) < 0) __PYX_ERR(0, 670, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
671:
672: # grant access to myCppMember thanks to myMember
673: @property
+674: def model(self):
/* Python wrapper */ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_5model_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_7pybaqus_10fil_result_9FilParser_5model_1__get__(PyObject *__pyx_v_self) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_7pybaqus_10fil_result_9FilParser_5model___get__(((struct __pyx_obj_7pybaqus_10fil_result_FilParser *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_pf_7pybaqus_10fil_result_9FilParser_5model___get__(struct __pyx_obj_7pybaqus_10fil_result_FilParser *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); /* … */ /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }
+675: return self._model
__Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_model); __pyx_r = __pyx_v_self->_model; goto __pyx_L0;