diff --git a/src/resipy/Project.py b/src/resipy/Project.py index 1410da6c8c52d2140a8b2b055f9a1daf39328639..82bcf26bec01b2032da00034bdaefb165bcd9f79 100644 --- a/src/resipy/Project.py +++ b/src/resipy/Project.py @@ -8,7 +8,7 @@ The 'Project' class wraps all main interactions between R* executables and other filtering or meshing part of the code. It's the entry point for the user. """ -ResIPy_version = '3.5.4' # ResIPy version (semantic versionning in use) +ResIPy_version = '3.5.5' # ResIPy version (semantic versionning in use) #import relevant modules import os, sys, shutil, platform, warnings, time, glob # python standard libs @@ -34,7 +34,7 @@ OS = platform.system() sys.path.append(os.path.relpath('..')) #import ResIPy resipy packages -from resipy.Survey import Survey +from resipy.Survey import Survey, polyfit from resipy.parsers import geomParser from resipy.r2in import write2in import resipy.meshTools as mt @@ -43,6 +43,7 @@ from resipy.protocol import (dpdp1, dpdp2, wenner_alpha, wenner_beta, wenner, wenner_gamma, schlum1, schlum2, multigrad) from resipy.SelectPoints import SelectPoints from resipy.saveData import (write2Res2DInv, write2csv, writeSrv) +from resipy.interpolation import rotGridData, invRotGridData apiPath = os.path.abspath(os.path.join(os.path.abspath(__file__), '../')) print('API path = ', apiPath) @@ -104,7 +105,6 @@ try: except Exception as e: pass - # little class for managing multiple processes (for parallel inversion) class ProcsManagement(object): # little class to handle the kill def __init__(self, r2object): @@ -168,7 +168,7 @@ def systemCheck(dump=print): Parameters ---------- dump : function - stdout pointer + stdout dump Returns ------- @@ -282,11 +282,11 @@ a compatiblity layer between unix like OS systems (ie macOS and linux) and windo 'wineCheck':wineCheck, 'GPU':mt.gpuinfo} -def pointer(x): +def donothing(x): pass -sysinfo = systemCheck(dump=pointer) +sysinfo = systemCheck(dump=donothing) -#%% useful functions +#%% useful functions for directory management class cd: """Context manager for changing the current working directory""" def __init__(self, newPath): @@ -304,7 +304,39 @@ def cdist(a): z = np.array([complex(x[0], x[1]) for x in a]) return np.abs(z[...,np.newaxis]-z) - +#%% geometrical functions +def bearing(dx,dy): + if dx == 0 and dy == 0: + raise ValueError('both dx and dy equal 0 - check no 2 electrodes occupy same xy coordinates') + elif dx == 0 and dy > 0: + return 0 + elif dx == 0 and dy < 0: + return 180 + elif dx > 0 and dy == 0: + return 90 + elif dx < 0 and dy == 0: + return 270 + elif dx > 0 and dy > 0: + return np.rad2deg(np.arctan(dx/dy)) + elif dx > 0 and dy < 0: + return 180 + np.rad2deg(np.arctan(dx/dy)) + elif dx < 0 and dy < 0: + return 180 + np.rad2deg(np.arctan(dx/dy)) + elif dx < 0 and dy > 0: + return 360 + np.rad2deg(np.arctan(dx/dy)) + +# fit an angle to a line in the XY plane +def fitXYangle(x,y): + m,c = polyfit(x,y,1) + xmdl = np.array([np.min(x),np.max(x)]) + ymdl = (m*xmdl) + c + dx = xmdl[0] - xmdl[1] + dy = ymdl[0] - ymdl[1] + a = bearing(dx,dy) + 90 + if a > 360: + a -= 360 + return a + #%% main Project class (called 'R2' in previous versions) class Project(object): # Project master class instanciated by the GUI @@ -330,10 +362,13 @@ class Project(object): # Project master class instanciated by the GUI self.elec = None # will be assigned when creating a survey self.surveys = [] # list of survey object self.surveysInfo = [] # info about surveys (date) + self.bigSurvey = None # big combined survey created in the case of timelapse mode self.mesh = None # mesh object (one per Project instance) self.meshParams = {} # mesh parameters passed to mesh creation scheme self.wholespace = False # flag for whole space problem self.topo = pd.DataFrame(columns=['x','y','z']) # store additional topo points + self.coordLocal = False # flag is local coordinate conversion required + self.coordParam = {'x0':None, 'y0':None, 'a':None} # coordinate conversion parameters self.param = {} # dict configuration variables for inversion self.configFile = '' self.invLog = '' # to save inversion output - all R2.out files @@ -410,6 +445,7 @@ class Project(object): # Project master class instanciated by the GUI text += '\n' return text + def __str__(self): return self.summary() @@ -467,7 +503,6 @@ class Project(object): # Project master class instanciated by the GUI return elec - def _findRemote(self, elec): """Flag remote electrodes. @@ -490,10 +525,110 @@ class Project(object): # Project master class instanciated by the GUI print('Detected {:d} remote electrode.'.format(np.sum(iremote))) return elec + + def setCoordConv(self,flag=False,x0=None,y0=None,a=None): + """ + Set that the project should be imported and exported according to a + coordinate conversion system. Generally UTM coordinates will cause + stability issues with mesh generation and the finite element solutions + used in the R* codes, hence the we use a local coordinate system. + Call this function before creating the mesh. + Parameters + ---------- + flag : bool, optional + Flag if coordinate conversion system is required. + The default is False. If flag is false but Project.coordLocal is + True then the function can be used to rvert electrode coordinates + back to their initial position. + x0 : float, optional + Reference X coordinate in UTM system. The default is None. If left + as none, then the minimum X coordinate of the electrodes will be + used. + y0 : float, optional + Reference Y coordinate in UTM system. The default is None. If left + as none, then the minimum Y coordinate of the electrodes will be + used. + a : float, optional + Rotation angle in degrees. The default is 0. + """ + if flag and self.coordLocal: + warnings.warn('Coordinate conversion has already been set! Are you sure want to try this again?') + return + revert = False + if not flag and self.coordLocal: + warnings.warn('reverting coordinates back to their original positions') + revert = True + + self.coordLocal = flag + + #check coordParam is in the right format / data type + if self.coordParam is None: + self.coordParam = {'x0':None, 'y0':None, 'a':None} + if len(self.coordParam.keys()) < 3: + self.coordParam = {'x0':None, 'y0':None, 'a':None} + + # update coordParam if conversion parameters are given + if x0 is not None: + self.coordParam['x0'] = x0 + if y0 is not None: + self.coordParam['y0'] = y0 + if a is not None: + self.coordParam['a'] = a + + # if electrodes assigned to project, check if they need moving + if self.elec is not None: + # get some default conversion parameters if not provided + if self.coordParam['x0'] is None and x0 is None: + x0 = np.min(self.elec.x.values) + self.coordParam['x0'] = x0 + # print('Auto setting x0') + elif self.coordParam['x0'] is not None: + x0 = self.coordParam['x0'] + + if self.coordParam['y0'] is None and y0 is None: + y0 = np.min(self.elec.y.values) + self.coordParam['y0'] = y0 + # print('Auto setting y0') + elif self.coordParam['y0'] is not None: + y0 = self.coordParam['y0'] + + if self.coordParam['a'] is None and a is None: + # print('Auto fitting A') + if '2' in self.typ and any(self.elec.y != self.elec.y[0]): + a = fitXYangle(self.elec.x.values, self.elec.y.values) + else: + a = 0 + self.coordParam['a'] = a + elif self.coordParam['a'] is not None: + a = self.coordParam['a'] + + if self.coordLocal: # move electrodes is local coordinates required + localx, localy = rotGridData(self.elec.x.values, self.elec.y.values, x0, y0, a) + elec = self.elec.copy() + elec.loc[:,'x'] = localx + elec.loc[:,'y'] = localy + self.elec = elec + for s in self.surveys: + localx, localy = rotGridData(s.elec.x.values, s.elec.y.values, x0, y0, a) + s.elec.loc[:,'x'] = localx + s.elec.loc[:,'y'] = localy + s.computeK() + elif revert: # revert coordinates back using inverse rotation + utmx, utmy = invRotGridData(self.elec.x.values, self.elec.y.values, x0, y0, a) + elec = self.elec.copy() + elec.loc[:,'x'] = utmx + elec.loc[:,'y'] = utmy + self.elec = elec + for s in self.surveys: + utmx, utmy = invRotGridData(s.elec.x.values, s.elec.y.values, x0, y0, a) + s.elec.loc[:,'x'] = utmx + s.elec.loc[:,'y'] = utmy + # s.computeK() # doubt there would be a need to recompute k + - def setElec(self, elec, elecList=None): + def setElec(self, elec, elecList=None, _uiOverideCoordLocal=False): """Set electrodes. Automatically identified remote electrode. Parameters @@ -506,6 +641,9 @@ class Project(object): # Project master class instanciated by the GUI is to be used in the advanced use case where electrodes move which each survey. Each entry of the list is a numpy array the same format of 'elec', which is then assigned to each survey class. + _uiOverideCoordLocal: bool, optional + UI command only, set to to True when updating the project electrodes + in the UI. """ if elecList is None: # same electrode set shared by all surveys (most common case) ok = False @@ -515,8 +653,13 @@ class Project(object): # Project master class instanciated by the GUI ok = True else: # check intersection of labels if len(self.surveys) > 0: - s1 = np.unique(elec['label'].values) - s2 = np.unique(self.surveys[0].df[['a','b','m','n']].values.flatten()) + s = self.surveys[0] + if s.hasLineNumbers(): + s1 = np.unique(elec['label'].values) + s2 = np.unique(s.df[['a','b','m','n']].values.flatten()) + else: + s1 = np.unique(elec['label'].astype(float).astype(int).values) + s2 = np.unique(s.df[['a','b','m','n']].astype(float).astype(int).values) x = np.intersect1d(s1, s2) if len(x) == len(s2): ok = True @@ -563,6 +706,12 @@ class Project(object): # Project master class instanciated by the GUI for i, survey in enumerate(self.surveys): survey.elec = self._findRemote(self._num2elec(elecList[i])) # plus identification of remote electrode + # do coordinate conversion if local grid required + if not _uiOverideCoordLocal: + if self.coordLocal and self.elec is not None: + self.coordLocal = False # will be reset to true in the following function + self.setCoordConv(True) + if len(self.surveys) > 0: self.computeFineMeshDepth() for s in self.surveys: @@ -675,7 +824,6 @@ class Project(object): # Project master class instanciated by the GUI self.elec = self.elec.replace(to_replace=dico) for survey in self.surveys: - survey.ndata = len(survey.df) survey.setSeqIds() @@ -746,17 +894,18 @@ class Project(object): # Project master class instanciated by the GUI return True - def detectStrings(self, tolerance=5, max_itr=None): - """Automatically detect electrode strings + def detectStrings(self, tolerance=15, max_itr=None): + """Automatically detect electrode strings. If all electrodes lie on the same + Y plane then the function assumes the problem is a borehole problem. Parameters ---------- tolerance : float, optional Maximum (+/-) bearing (ie directional angle) tolerance each subsiquent - electrode may have. The default is 5. + electrode may have. The default is 15. max_itr : int, optional Maximum number of searches that can be performed to find colinear - nieghbouring electrodes. The default is None. + nieghbouring electrodes. The default is number of electrodes plus 10. Raises ------ @@ -774,41 +923,22 @@ class Project(object): # Project master class instanciated by the GUI a list of integers which are the indices of the respective electrodes in self.elec """ - # compute bearing - def bearing(dx,dy): - if dx == 0 and dy == 0: - raise ValueError('both dx and dy equal 0 - check no 2 electrodes occupy same xy coordinates') - elif dx == 0 and dy > 0: - return 0 - elif dx == 0 and dy < 0: - return 180 - elif dx > 0 and dy == 0: - return 90 - elif dx < 0 and dy == 0: - return 270 - elif dx > 0 and dy > 0: - return np.rad2deg(np.arctan(dx/dy)) - elif dx > 0 and dy < 0: - return 180 + np.rad2deg(np.arctan(dx/dy)) - elif dx < 0 and dy < 0: - return 180 + np.rad2deg(np.arctan(dx/dy)) - elif dx < 0 and dy > 0: - return 360 + np.rad2deg(np.arctan(dx/dy)) - iremote = self.elec['remote'].values x = self.elec['x'].values[~iremote] y = self.elec['y'].values[~iremote] + + # deal with borehole case + if all(y[0] == y): + print('Detecting strings for a borehole problem!') + y = self.elec['z'].values[~iremote] + + # decide maximum number of iterations if max_itr is None: max_itr = len(x)+10 - # init - nb couple of commented lines are in here for displaying the selected electrode strings - # fig, ax = plt.subplots() - # ax.scatter(x,y,c='k') - # ax.set_aspect('equal') # mid point of survey xm = np.mean(x) ym = np.mean(y) - # ax.scatter(xm,ym,c='b',s=2) dist = np.sqrt((x-xm)**2 + (y-ym)**2) # distance to all other points in survey # find neighbours @@ -891,7 +1021,8 @@ class Project(object): # Project master class instanciated by the GUI def convertLocalGrid(self): """ - Converts UTM grid to local grid for mesh stability + Converts UTM grid to local grid for stability in mesh generation and + the finite element solution. Parameters ---------- @@ -983,6 +1114,8 @@ class Project(object): # Project master class instanciated by the GUI settings = {'surveysInfo': self.surveysInfo, 'topo': self.topo.to_dict(), + 'coordLocal':self.coordLocal, + 'coordParam':self.coordParam, 'typ': self.typ, 'err': self.err, 'iBorehole': self.iBorehole, @@ -1110,7 +1243,6 @@ class Project(object): # Project master class instanciated by the GUI self.bigSurvey = Survey(df=self.surveys[0].df, elec=self.surveys[0].elec) self.bigSurvey.df = df.copy() self.bigSurvey.dfOrigin = df.copy() - self.bigSurvey.ndata = df.shape[0] self.elec = pd.read_csv(os.path.join(savedir, 'elec.csv')) self.elec['label'] = self.elec['label'].astype(str) @@ -1150,6 +1282,16 @@ class Project(object): # Project master class instanciated by the GUI self.custSeq = settings['custSeq'] self.errTyp = settings['errTyp'] self.surfaceIdx = settings['surfaceIdx'] + # check if local coordinate flag in keys (need to do this for backward compatibility) + if 'coordLocal' in settings.keys(): + self.coordLocal = settings['coordLocal'] + else: + self.coordLocal = False + + if 'coordParam' in settings.keys(): + self.coordParam = settings['coordParam'] + else: + self.coordParam = {'x0':None,'y0':None,'a':0} # read parameters with open(os.path.join(savedir, 'params.json'), 'r') as f: @@ -1225,6 +1367,7 @@ class Project(object): # Project master class instanciated by the GUI If true, estimate the amount of RAM required to do the inversion. Default is True. **kwargs: Keyword arguments to be passed to Survey() + """ self.surveys.append(Survey(fname, ftype, spacing=spacing, parser=parser, debug=debug, **kwargs)) self.surveysInfo.append(info) @@ -1255,7 +1398,7 @@ class Project(object): # Project master class instanciated by the GUI self.pinfo['Number of Surveys'] = 1 if estMemory: - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) def addData(self,index=0, **kwargs): @@ -1280,7 +1423,8 @@ class Project(object): # Project master class instanciated by the GUI dirname : str Directory with files to be parsed. ftype : str, optional - Type of file to be parsed. Either 'Syscal' or 'Protocol'. + Type of file to be parsed. Either 'Syscal','ProtocolDC','ResInv', + 'BGS Prime', 'ProtocolIP', 'Sting', 'ABEM-Lund', 'Lippmann' or 'ARES'. info : dict, optional Dictionnary of info about the survey. spacing : float, optional @@ -1315,7 +1459,8 @@ class Project(object): # Project master class instanciated by the GUI dirname : str or list of str Directory with files to be parsed or list of file to be parsed. ftype : str, optional - Type of file to be parsed. Either 'Syscal' or 'Protocol'. + Type of file to be parsed. Either 'Syscal','ProtocolDC','ResInv', + 'BGS Prime', 'ProtocolIP', 'Sting', 'ABEM-Lund', 'Lippmann' or 'ARES'. info : dict, optional Dictionnary of info about the survey. Put inverse_type = 1 to allow for a changing number of measurements between surveys. @@ -1383,13 +1528,12 @@ class Project(object): # Project master class instanciated by the GUI c = c + df2.shape[0] self.bigSurvey.df = df.copy() # override it self.bigSurvey.dfOrigin = df.copy() - self.bigSurvey.ndata = df.shape[0] # flag that data has been added self.pinfo['Data'] = True self.pinfo['Number of Surveys'] = len(self.surveys) - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) def create3DSurvey(self, fname, lineSpacing=1, zigzag=False, ftype='Syscal', @@ -1411,7 +1555,8 @@ class Project(object): # Project master class instanciated by the GUI If `True` then one survey out of two will be flipped. #TODO not implemented yet ftype : str, optional - Type of the survey to choose which parser to use. + Type of file to be parsed. Either 'Syscal','ProtocolDC','ResInv', + 'BGS Prime', 'ProtocolIP', 'Sting', 'ABEM-Lund', 'Lippmann' or 'ARES'. name : str, optional Name of the merged 3D survey. """ @@ -1459,7 +1604,6 @@ class Project(object): # Project master class instanciated by the GUI survey0.debug = True survey0.elec = elec survey0.df = dfm - survey0.ndata = len(dfm) survey0.dfOrigin = dfm # for raw phase plot survey0.dfReset = dfm # for reseting filters on res survey0.dfPhaseReset = dfm # for reseting filters on IP @@ -1475,7 +1619,7 @@ class Project(object): # Project master class instanciated by the GUI # flag that data has been added self.pinfo['Data'] = True self.pinfo['Number of Surveys'] = 1 - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) def createMergedSurveys(self, fname, ftype='Protocol DC', delimiter=',', @@ -1487,12 +1631,12 @@ class Project(object): # Project master class instanciated by the GUI Parameters ---------- fname : str - file path to .csv file. - ftype: str, reccomended - file type, see ResIPy docs for types of file type avialable. Will be + File path to .csv file. + ftype: str, optional + File type, see ResIPy docs for types of file type avialable. Will be overwritten if specified in the survey details file. - delimiter: str - delimiter used in merge + delimiter: str, optional + Delimiter used in merge file. Defaults to ','. Notes ----- @@ -1506,7 +1650,9 @@ class Project(object): # Project master class instanciated by the GUI File type, should correspond to the file 'ftype' for each file (they might be different for some reason, though best avoided). If not passed the file type can be set be the variable at the top of this - function. + function. Type of files avialable are: Either 'Syscal','ProtocolDC', + 'ResInv','BGS Prime', 'ProtocolIP', 'Sting', 'ABEM-Lund', + 'Lippmann' or 'ARES'. sid: int, optional Survey index, used for making timelapse surveys from multiple files @@ -1516,7 +1662,7 @@ class Project(object): # Project master class instanciated by the GUI finfo = pd.read_csv(fname,sep=delimiter) # file info dataframe if 'fpath' not in finfo.columns: - raise Exception('file paths are not defined in survey') + raise Exception('file paths are not defined in survey merge file') if 'ftype' not in finfo.columns: finfo['ftype'] = ftype @@ -1533,18 +1679,45 @@ class Project(object): # Project master class instanciated by the GUI if len(sid) > 1: self.iTimeLapse = True - c = 0 for i in uidx: self.createSurvey(finfo.fpath[i], ftype=finfo.ftype[i], debug=debug, estMemory=False) - sidx = np.argwhere(finfo.sid.values == i).tolist() # survey index + sidx = np.argwhere(finfo.sid.values == i).flatten().tolist() # survey index _ = sidx.pop(0) - for j in sidx: self.addData(index=c, fname=finfo.fpath[j], ftype=finfo.ftype[j]) # add data for each survey + if c == 0: + self.bigSurvey = Survey(finfo.fpath[i], ftype=finfo.ftype[i]) + for j in sidx: + self.bigSurvey.addData(fname=finfo.fpath[j], ftype=finfo.ftype[j]) c += 1 + + elecids = [] + for s in self.surveys: + elecids += s.df[['a','b','m','n']].values.flatten().tolist() + + uelecids = sorted(np.unique(elecids)) # is this efficient enough for strings ? + + if self.elec is None or len(uelecids) != len(self.elec): + xplaceholder = np.arange(len(uelecids),dtype=float) + yplaceholder = np.zeros_like(xplaceholder) + zplaceholder = np.zeros_like(xplaceholder) + placeholder = [False]*len(uelecids) + elec = { + 'label':uelecids, + 'x':xplaceholder, + 'y':yplaceholder, + 'z':zplaceholder, + 'buried':placeholder, + 'remote':placeholder, + } + elec = pd.DataFrame(elec) + self.elec = elec + for s in self.surveys: + s.elec = elec.copy() + if self.iTimeLapse: # bit of clean up regarding timelapse case self.iTimeLapseReciprocal = np.array([False]*len(self.surveys)) # true if survey has reciprocal @@ -1554,7 +1727,6 @@ class Project(object): # Project master class instanciated by the GUI # create bigSurvey (useful if we want to fit a single error model # based on the combined data of all the surveys) - self.bigSurvey = self.surveys[0] df = self.bigSurvey.df.copy() for i in range(1,len(self.surveys)): df2 = self.surveys[i].df @@ -1567,12 +1739,14 @@ class Project(object): # Project master class instanciated by the GUI self.bigSurvey.df = df.copy() # override it self.bigSurvey.dfOrigin = df.copy() self.bigSurvey.ndata = df.shape[0] + else: + self.bigSurvey = None # flag that data has been added self.pinfo['Data'] = True self.pinfo['Number of Surveys'] = len(self.surveys) - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) def createPseudo3DSurvey(self, dirname, lineSpacing=1, ftype='Syscal', parser=None, **kwargs): @@ -1626,7 +1800,7 @@ class Project(object): # Project master class instanciated by the GUI # flag that data has been added self.pinfo['Data'] = True self.pinfo['Number of Surveys'] = len(self.surveys) - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) @@ -1805,7 +1979,7 @@ class Project(object): # Project master class instanciated by the GUI self.pseudo3Dfmd = kwargs['fmd'] # check ram requirements - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) @@ -2018,7 +2192,7 @@ class Project(object): # Project master class instanciated by the GUI ncores = sysinfo['physicalCpuCount'] # get memory estimates - memInv = self._estimateMemory(dump=pointer) + memInv = self._estimateMemory(dump=donothing) memTot = sysinfo['totalMemory'] #use the total memory (its more conversative) # check if static inversion possible @@ -3068,6 +3242,27 @@ class Project(object): # Project master class instanciated by the GUI self.topo = pd.DataFrame(surface, columns=['x','z']) else: self.topo = pd.DataFrame(surface, columns=['x','y','z']) + + if self.coordLocal: + # need to convert surface to local coordinates + surface = surface.copy() + if surface.shape[1] == 2: + utmy = np.zeros(surface.shape[0]) + else: + utmy = surface[:,1] + utmx = surface[:,0] + x0 = self.coordParam['x0'] + y0 = self.coordParam['y0'] + a = self.coordParam['a'] + localx, localy = rotGridData(utmx, utmy, x0, y0, a) + surface[:,0] = localx + if surface.shape[1] == 3: + surface[:,1] = localy + # reassign topo + self.topo = pd.DataFrame(surface, columns=['x','y','z']) + else: + self.topo = pd.DataFrame(surface, columns=['x','z']) + # estimate depth of fine mesh if fmd is None: @@ -3423,7 +3618,7 @@ class Project(object): # Project master class instanciated by the GUI self.pinfo['Number of Nodes']=self.mesh.numnp self.pinfo['Mesh Type'] = meshtypename - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) @@ -3534,6 +3729,10 @@ class Project(object): # Project master class instanciated by the GUI param['inverse_type'] = 0 # normal regularisation param['zmin'] = np.min(self.mesh.node[:,2]) - 10 # we want to keep the whole mesh for background regularisation param['zmax'] = np.max(self.mesh.node[:,2]) + 10 + + if 'baseline_target_decrease' in param.keys(): + param['target_decrease'] = param['baseline_target_decrease'] + self.configFile = write2in(param, refdir, typ=typ) # background survey # now prepare the actual timelapse settings @@ -3660,8 +3859,8 @@ class Project(object): # Project master class instanciated by the GUI # a bit simplistic but assign error to all based on Transfer resistance # let's assume it's False all the time for now content = '' - df0 = self.surveys[0].df[['a','b','m','n','resist','recipMean']] - df0 = df0.rename(columns={'resist':'resist0', 'recipMean':'recipMean0'}) + df0 = self.surveys[0].df[['a','b','m','n','resist','recipMean','resError']] + df0 = df0.rename(columns={'resist':'resist0', 'recipMean':'recipMean0','resError':'resError0'}) for i, s in enumerate(self.surveys): if 'resist0' in s.df.columns: s.df = s.df.drop('resist0', axis=1) @@ -3697,6 +3896,14 @@ class Project(object): # Project master class instanciated by the GUI ip=False, # no IP timelapse possible for now isubset=indexes[i][1], threed=threed, fm0=fm00) + + # need to do a guassian propogration of errors if the case we have + # errors and difference inversion + if err and self.param['reg_mode'] == 2 and errTyp!='global': + resError0 = df0['resError0'][indexes[i][0]].values + resError = protocol['resError'].values + protocol.loc[:,'resError'] = np.sqrt(resError**2 + resError0**2) + if i == 0: refdir = os.path.join(self.dirname, 'ref') if os.path.exists(refdir) == False: @@ -3986,6 +4193,7 @@ class Project(object): # Project master class instanciated by the GUI # create essential attribute self.irunParallel2 = True self.procs = [] + ts = [] # kill management self.proc = ProcsManagement(self) @@ -4001,23 +4209,23 @@ class Project(object): # Project master class instanciated by the GUI while self.irunParallel2: while wds and len(self.procs) < ncores: wd = wds.pop() - #print('------task', wd) + # NOTE: we need to PIPE stdout and sterr to avoid being + # flooded by R2 output. 'All ok' is only printed in stderr if OS == 'Windows': - p = Popen(cmd, cwd=wd, shell=False, universal_newlines=True, startupinfo=startupinfo) + p = Popen(cmd, cwd=wd, shell=False, universal_newlines=True, startupinfo=startupinfo, stdout=PIPE, stderr=PIPE) else: - p = Popen(cmd, cwd=wd, shell=False, universal_newlines=True) + p = Popen(cmd, cwd=wd, shell=False, universal_newlines=True, stdout=PIPE, stderr=PIPE) self.procs.append(p) -# t = Thread(target=dumpOutput, args=(p.stdout,)) -# t.daemon = True # thread dies with the program -# t.start() -# ts.append(t) + # t = Thread(target=dumpOutput, args=(p.stdout,)) + # t.daemon = True # thread dies with the program + # t.start() + # ts.append(t) for p in self.procs: if done(p): #print('------done!!', p) self.procs.remove(p) c = c+1 - # TODO get RMS and iteration number here ? dump('\r{:.0f}/{:.0f} inversions completed'.format(c, len(wds2))) if not self.procs and not wds: @@ -4807,8 +5015,12 @@ class Project(object): # Project master class instanciated by the GUI Dataframe with the dataset name, and the RMS decrease for each iteration. """ fname = os.path.join(self.dirname, self.typ + '.out') + lines = [] + if self.iTimeLapse: + with open(os.path.join(self.dirname, 'ref', self.typ + '.out'), 'r') as f: + lines += f.readlines() with open(fname, 'r') as f: - lines = f.readlines() + lines += f.readlines() name = '' idataset = 0 iiter = 0 @@ -4839,7 +5051,7 @@ class Project(object): # Project master class instanciated by the GUI iiter = 0 idataset += 1 if idataset <= len(self.surveys): - name = self.surveys[idataset-1].name + name = self.surveys[idataset - 1].name else: name = 'dataset{:03.0f}'.format(idataset) elif line[0] == 'End' and self.typ != 'R3t': @@ -5612,40 +5824,43 @@ class Project(object): # Project master class instanciated by the GUI dump('Writing protocol.dat... ') seq = self.sequence - # let's check if IP that we have a positive geometric factor - if self.typ[0] == 'c': # NOTE this doesn't work for borehole - lookupDict = dict(zip(self.elec['label'], np.arange(self.elec.shape[0]))) - seqdf = pd.DataFrame(seq).rename(columns = {0:'a', 1:'b', 2:'m', 3:'n'}) - array = seqdf[['a','b','m','n']].astype(str).replace(lookupDict).values.astype(int) - elec = self.elec[['x','y','z']].values.copy() + ## let's check if IP that we have a positive geometric factor + ## EH? Why do this - Jimmy + ## commented out for now as not a generalised solution and did not work + ## for 3D problems. + # if self.typ[0] == 'c': # NOTE this doesn't work for borehole + # lookupDict = dict(zip(self.elec['label'], np.arange(self.elec.shape[0]))) + # seqdf = pd.DataFrame(seq).rename(columns = {0:'a', 1:'b', 2:'m', 3:'n'}) + # array = seqdf[['a','b','m','n']].astype(str).replace(lookupDict).values.astype(int) + # elec = self.elec[['x','y','z']].values.copy() - aposx = elec[:,0][array[:,0]] - aposy = elec[:,1][array[:,0]] - aposz = elec[:,2][array[:,0]] + # aposx = elec[:,0][array[:,0]] + # aposy = elec[:,1][array[:,0]] + # aposz = elec[:,2][array[:,0]] - bposx = elec[:,0][array[:,1]] - bposy = elec[:,1][array[:,1]] - bposz = elec[:,2][array[:,1]] + # bposx = elec[:,0][array[:,1]] + # bposy = elec[:,1][array[:,1]] + # bposz = elec[:,2][array[:,1]] - mposx = elec[:,0][array[:,2]] - mposy = elec[:,1][array[:,2]] - mposz = elec[:,2][array[:,2]] + # mposx = elec[:,0][array[:,2]] + # mposy = elec[:,1][array[:,2]] + # mposz = elec[:,2][array[:,2]] - nposx = elec[:,0][array[:,3]] - nposy = elec[:,1][array[:,3]] - nposz = elec[:,2][array[:,3]] + # nposx = elec[:,0][array[:,3]] + # nposy = elec[:,1][array[:,3]] + # nposz = elec[:,2][array[:,3]] - AM = np.sqrt((aposx-mposx)**2 + (aposy-mposy)**2 + (aposz-mposz)**2) - BM = np.sqrt((bposx-mposx)**2 + (bposy-mposy)**2 + (bposz-mposz)**2) - AN = np.sqrt((aposx-nposx)**2 + (aposy-nposy)**2 + (aposz-nposz)**2) - BN = np.sqrt((bposx-nposx)**2 + (bposy-nposy)**2 + (bposz-nposz)**2) + # AM = np.sqrt((aposx-mposx)**2 + (aposy-mposy)**2 + (aposz-mposz)**2) + # BM = np.sqrt((bposx-mposx)**2 + (bposy-mposy)**2 + (bposz-mposz)**2) + # AN = np.sqrt((aposx-nposx)**2 + (aposy-nposy)**2 + (aposz-nposz)**2) + # BN = np.sqrt((bposx-nposx)**2 + (bposy-nposy)**2 + (bposz-nposz)**2) - K = 2*np.pi/((1/AM)-(1/BM)-(1/AN)+(1/BN)) # geometric factor + # K = 2*np.pi/((1/AM)-(1/BM)-(1/AN)+(1/BN)) # geometric factor - ie = K < 0 - seq2 = seq.copy() - seq[ie,2] = seq2[ie,3] # swap if K is < 0 - seq[ie,3] = seq2[ie,2] + # ie = K < 0 + # seq2 = seq.copy() + # seq[ie,2] = seq2[ie,3] # swap if K is < 0 + # seq[ie,3] = seq2[ie,2] protocol = pd.DataFrame(np.c_[1+np.arange(seq.shape[0]),seq], columns=['index','a','b','m','n']) @@ -5660,7 +5875,7 @@ class Project(object): # Project master class instanciated by the GUI with open(outputname, 'w') as f: f.write(str(len(protocol)) + '\n') with open(outputname, 'a') as f: - protocol.to_csv(f, sep='\t', header=False, index=False) + protocol.to_csv(f, sep='\t', header=False, index=False,lineterminator='\n') dump('done\n') # fun the inversion @@ -5721,7 +5936,7 @@ class Project(object): # Project master class instanciated by the GUI else: self.surveys[0].write2protocol(outputname) - _ = self._estimateMemory(dump=pointer) + _ = self._estimateMemory(dump=donothing) dump('Forward modelling done.') @@ -5759,15 +5974,6 @@ class Project(object): # Project master class instanciated by the GUI kwargs['model_err'] = True # force model_err argument to be true - # create FLAT homogeneous mesh - # if '2' in self.typ: # normalise to flat surface if 2D - # idx = (self.elec['remote'].values == False) & (self.elec['buried'].values == False) - # ez = self.elec['z'].values[idx] - # ex = self.elec['x'].values[idx] - # ez_tmp = self.elec['z'].values - np.interp(self.elec['x'].values,ex,ez) - # self.elec['z'] = ez_tmp - - # self.elec['z'] = 0 self.createMesh(**kwargs) self.modErrMesh = self.mesh.copy() self.modErrMeshNE = self.param['node_elec'].copy() @@ -6295,8 +6501,92 @@ class Project(object): # Project master class instanciated by the GUI self.mesh.dat(outputname) else: raise ValueError('mesh export format not recognized. Try either .vtk, .node or .dat.') + + + def exportMesh(self, outputname=None, voxel=False, _forceLocal=False): + """Export mesh as a different file format, with coordinate conversion + if Project.coordLocal set to True. + Parameters + ---------- + outputname : str, optional + Output path with extension. Available mesh format are: + - .vtk (Paraview) + - .node (Tetgen) + - .dat (R* codes) + If not provided the mesh is saved in the working directory + as mesh.vtk. + voxel: bool, optional + If True, mesh will be converted to voxel format. + _forceLocal: bool, optional + Forces outputs in the local grid format is self.coordLocal == True. + """ + if outputname is None: + outputname = 'mesh.vtk' + + if isinstance(outputname,str): + # check for extension + if len(outputname.split('.'))<2: + outputname = outputname + '.vtk' + + # force local grid output in the UI + if _forceLocal and self.coordLocal: + self.mesh.exportMesh(outputname,False,self.coordParam, voxel) + return + + self.mesh.exportMesh(outputname, None, self.coordLocal,self.coordParam, voxel) + + def exportElec(self, outputname=None, _forceLocal=False): + """Export electrodes as a different file format, with coordinate conversion + if Project.coordLocal set to True. + Parameters + ---------- + outputname : str, optional + Output path with extension. Available mesh format are: + - .vtk (Paraview) + - .dat (R* codes) + - .csv (general) + If not provided the electrode coordinates are saved in the working directory + as electrodes.vtk. + _forceLocal: bool, optional + Forces outputs in the local grid format is self.coordLocal == True. + """ + if self.elec is None: # cant run function with electrodes object being populated + warnings.warn('No electrode dataframe has been set, cannot export electrodes!') + return # so return + + if outputname is None: #' set default file name for output + outputname = 'electrodes.vtk' + + if not isinstance(outputname, str): + raise Exception('Output name must be a string!') + + if len(outputname.split('.')) == 1: + outputname += '.vtk' + + eleccopy = self.elec.copy() + + # force local grid output in the UI + if not _forceLocal and self.coordLocal: + localx = eleccopy.x.values + localy = eleccopy.y.values + eleccopy['x'], eleccopy['y'] = invRotGridData( + localx, localy, + self.coordParam['x0'], + self.coordParam['y0'], + self.coordParam['a'] + ) + + if outputname.endswith('.csv'): + eleccopy.to_csv(outputname,index=False) + elif outputname.endswith('.dat'): + eleccopy.to_csv(outputname,index=False,sep='\t') + elif outputname.endswith('.vtk'): + mt.points2vtk(eleccopy.x, eleccopy.y, eleccopy.z, outputname, 'Electrodes') + else: + raise Exception('Unrecognised output extension type') + def _toParaview(self, fname, paraview_loc=None): # pragma: no cover """Open file in paraview (might not work if paraview is not in the PATH, @@ -6694,10 +6984,163 @@ class Project(object): # Project master class instanciated by the GUI fh.write('def end_cue(self): pass\n') fh.close() + def exportMeshResults(self, dirname=None, ftype='.vtk', voxel=False, + _forceLocal=False): + """Save mesh files of inversion results to a specified directory. If + results are in a local grid, they will be converted back into thier + respective utm or nationa grid coordinates. + Parameters + ---------- + dirname: str + Directory in which results will be saved. Default is the working directory. + ftype: str + Type of file extension. + voxel: bool, optional + Force export to be in a voxel format. + _forceLocal: bool, optional + Force output to be in a local grid if self.coordLocal is True. Meant + for use with the UI. + """ + + if dirname is None: + dirname = self.dirname + if not os.path.isdir(dirname): + os.mkdir(dirname) + amtContent = '' + if len(self.meshResults) == 0: + self.getResults() + count=0 + ext = '.vtk' + if 'vtk' in ftype.lower(): + ext = '.vtk' + elif 'dat' in ftype.lower(): + ext = '.dat' + elif 'node' in ftype.lower(): + ext = '.node' + elif 'xyz' in ftype.lower(): + ext = '.xyz' + elif 'csv' in ftype.lower(): + ext = '.csv' + # add file types as appropiate! + + # force local grid output in the UI + coordLocalFlipped = False + if _forceLocal and self.coordLocal: + self.coordLocal = False + coordLocalFlipped = True + + + # check param for truncation variables + for key in ['num_xz_poly','num_xy_poly']: + if key not in self.param.keys(): + self.param[key] = 0 + for key in ['zmin','zmax']: + if key not in self.param.keys(): + self.param[key] = None + + # loop through and export meshes as vtk files + for mesh, s in zip(self.meshResults, self.surveys): + count+=1 + meshcopy = mesh.copy() + + if self.iTimeLapse and voxel: + fname = 'time_step{:0>4}'.format(count) + '_voxel' + ext + elif self.iTimeLapse: + fname = 'time_step{:0>4}'.format(count) + ext + elif voxel: + fname = mesh.mesh_title + '_voxel' + ext + else: + fname = mesh.mesh_title + ext + file_path = os.path.join(dirname, fname) + if self.trapeziod is not None and self.pseudo3DMeshResult is None: + meshcopy = meshcopy.crop(self.trapeziod) + elif '3' in self.typ and self.param['num_xy_poly'] > 2: + meshcopy = meshcopy.crop(self.param['xy_poly_table']) + meshcopy.elec = None + if self.param['zmin'] is None or self.param['zmax'] is None: + pass # cant truncate mesh with out z limits + else: + meshcopy = meshcopy.truncateMesh(zlim=[self.param['zmin'], + self.param['zmax']]) + elif self.pseudo3DMeshResult is not None and self.projs[count-1].trapeziod is not None: + meshcopy = meshcopy.crop(self.projs[count-1].trapeziod) + + # convert to utm if needed (not for psuedo3d, that'll be handled differently) + if self.coordLocal and self.pseudo3DMeshResult is None: + coordLocal = True + else: + coordLocal = False + + # add electrode types + meshcopy.elec = s.elec[['x','y','z']].values + elec_type =['surface']*len(s.elec) + for i in range(len(s.elec)): + if s.elec['buried'][i]: + elec_type[i] = 'buried' + elif s.elec['remote'][i]: + elec_type[i] = 'remote' + meshcopy.elec_type = elec_type + + meshcopy.exportMesh(file_path, ftype.replace('.',''), + coordLocal, self.coordParam, + voxel, self.meshParams) # save to vtk + amtContent += "\tannotations.append('%s')\n"%mesh.mesh_title + if self.pseudo3DMeshResultList is not None: + file_path = os.path.join(dirname, mesh.mesh_title + '_3D' + ext) + self.pseudo3DMeshResultList[count-1].exportMesh(file_path, + ftype.replace('.',''), + self.coordLocal, + self.coordParam, + False) + + if self.pseudo3DMeshResult is not None: + self.pseudo3DMeshResult.mesh_title = 'Pseudo_3D_result' + self.pseudo3DMeshResult.elec = self.pseudo3DSurvey.elec[['x','y','z']].values + elec_type =['surface']*len(self.pseudo3DSurvey.elec) + for i in range(len(self.pseudo3DSurvey.elec)): + if self.pseudo3DSurvey.elec['buried'][i]: + elec_type[i] = 'buried' + elif self.pseudo3DSurvey.elec['remote'][i]: + elec_type[i] = 'remote' + self.pseudo3DMeshResult.elec_type = elec_type + file_path = os.path.join(dirname, self.pseudo3DMeshResult.mesh_title + ext) + self.pseudo3DMeshResult.exportMesh(file_path, ftype.replace('.',''), + self.coordLocal, self.coordParam, + voxel) + amtContent += "\tannotations.append('%s')\n"%self.pseudo3DMeshResult.mesh_title - def saveData(self, outputdir): - """Save all data (_res.dat, .vtk, ...) from the working directory + if ext =='.vtk': + # write out paraview animation track + fh = open(os.path.join(dirname,'amt_track.py'),'w') + fh.write('from paraview.simple import *\n') + fh.write('def start_cue(self):\n') + fh.write('\tglobal annotations\n') + fh.write('\tglobal maxIndex\n') + fh.write("\ttextSource = paraview.simple.FindSource('Text1')\n") + fh.write("\tif textSource is None:\n") + fh.write("\t\tText()\n") + fh.write("\tannotations = []\n") + fh.write(amtContent) + fh.write('\tmaxIndex=len(annotations)\n') + fh.write('def tick(self):\n') + fh.write('\tglobal annotations\n') + fh.write('\tglobal maxIndex\n') + fh.write('\tindex = int( self.GetClockTime() )\n') + fh.write('\tif index >= maxIndex :\n') + fh.write('\t\tindex = maxIndex - 1\n') + fh.write("\ttextSource = paraview.simple.FindSource('Text1')\n") + fh.write('\ttextSource.Text = annotations[index]\n') + fh.write('def end_cue(self): pass\n') + fh.close() + + # force local grid output in the UI + if _forceLocal and coordLocalFlipped: + self.coordLocal = True + + + def saveCwd(self, outputdir): + """Save all ouputs (_res.dat, .vtk, ...) from the working directory generated during inversion to the designated directory. Parameters @@ -6709,7 +7152,98 @@ class Project(object): # Project master class instanciated by the GUI if os.path.exists(wd): shutil.rmtree(wd) shutil.copytree(self.dirname, wd) + + def saveData(self, outputdir): + """ + Saves all data generated by ResIPy in the current working directory + to a specified folder. Serves same function as Project.saveCwd() + but retained for backwards compability. + + Parameters + ---------- + outputdir : str + Path to the directory to save the files. + """ + self.saveCwd(outputdir) + + def exportData(self, outputname=None, ftype='protocol', err=False, + recip=False): + """ + Export preconditioned data used by ResIPy into another format ( + different to project.saveData). + + Parameters + ---------- + outputname : str, optional + Outputname. The default is None. If not given then the function falls + back on the survey name. If set then a number will be appended to the + file name in the case of time-lapse (or batch) surveys. + ftype : str, optional + Export File type, choose from either protocol, srv, csv, ResInv. + The default is 'protocol'. + err : bool, optional + Flag to include errors. The default is False. + recip : bool, optional + Flag to include reciprocals. The default is False. + """ + + # check the ftype + ext = '.dat' + if ftype == 'protocol': + ext == '.dat' + elif ftype == 'ResInv': + ext = '.dat' + elif ftype == 'srv': + ext = '.srv' + elif ftype == 'csv': + ext == '.csv' + else: + raise Exception('unknown file type') + + flag3d = False + if '3' in self.typ: + flag3d = True + + for i,s in enumerate(self.surveys): + if recip: + isubset = [True]*len(s.df) + else: + isubset = None + + protocol = s.write2protocol(err=err, isubset=isubset, threed=flag3d) + + # decide on file outputname + if outputname is None: + fout = s.name + if fout == '': + fout = 'SurveyData' + if len(self.surveys) > 1: + fout = 'SurveyData_{:0>3d}'.format(i) + else: + fout = outputname + if fout.endswith(ext): + fout = fout.replace(ext,'') + if len(self.surveys) > 1: + fout += '_{:0>3d}'.format(i) + + if not fout.endswith(ext): + fout += ext + + # write to file + if ftype == 'protocol': + protocol.to_csv(fout, index=False, sep='\t', lineterminator='\n') + elif ftype == 'ResInv': + param = {'lineTitle':s.name} + write2Res2DInv(param, fout, protocol, + self.elec[['x','y','z']].values) + elif ftype =='srv': + writeSrv(fout, protocol, self.elec[['x','y','z']].values) + elif ftype =='csv': + protocol.to_csv(fout, index=False, sep=',', lineterminator='\n') + + return + def showParam(self): """Print parameters in `R2.param` dictionary. diff --git a/src/resipy/Survey.py b/src/resipy/Survey.py index 8bc2e7d44e0375c020abe2f83412f3c92f8ba3aa..a59fca841d2b4cc72150e26022a827e1841b353e 100755 --- a/src/resipy/Survey.py +++ b/src/resipy/Survey.py @@ -254,7 +254,6 @@ class Survey(object): # assign dataframe and check the types of a,b,m,n (all labels must be string) self.df = data.astype({'a':str, 'b':str, 'm':str, 'n':str}) - self.ndata = self.df.shape[0] # set sequence according to if electrode labels present or not self.setSeqIds() @@ -288,7 +287,6 @@ class Survey(object): # we provide df and elec dataframes elif df is not None and elec is not None: self.df = df # assuming dataframe is already well formatted - self.ndata = self.df.shape[0] # check elec dataframe if 'remote' not in elec.columns: @@ -356,7 +354,6 @@ class Survey(object): # if 'label' not in dfelec.columns: # dfelec['label'] = np.arange(dfelec.shape[0]).astype(str) # survey.elec = dfelec -# survey.ndata = df.shape[0] # survey.computeReciprocal() # survey.filterDefault() # survey.dfReset = survey.df.copy() @@ -406,19 +403,20 @@ class Survey(object): l = int(t[0]) n = int(t[1]) return l,n - - if self.ndata == 0: + + ndata = self.df.shape[0] + if ndata == 0: self.sequence = None self.isequence = None return if self.hasLineNumbers(): - an = np.zeros((self.ndata,4),dtype=int) # array of electrode numbers - al = np.zeros((self.ndata,4),dtype=int) # array of electrode lines - aa = np.zeros((self.ndata,4),dtype=int) # array of additonal numbers + an = np.zeros((ndata, 4),dtype=int) # array of electrode numbers + al = np.zeros((ndata, 4),dtype=int) # array of electrode lines + aa = np.zeros((ndata, 4),dtype=int) # array of additonal numbers cache = {} for a,char in enumerate(['a','b','m','n']): - for i in range(self.ndata): + for i in range(ndata): l,n = labeltoint(self.df[char].values[i]) if l not in cache.keys(): cache[l] = 0 @@ -437,9 +435,9 @@ class Survey(object): self.sequence = an + aa else: - self.sequence = np.zeros((self.ndata,4),dtype=int) + self.sequence = np.zeros((ndata,4),dtype=int) for a,char in enumerate(['a','b','m','n']): - for i in range(self.ndata): + for i in range(ndata): self.sequence[i,a] = int(self.df[char].values[i]) # now need a sequence which is ordered normally with no gaps @@ -537,7 +535,6 @@ class Survey(object): # we need to redo the reciprocal analysis if we've removed duplicates and ... if ndup > 0 or np.sum(ie) > 0: - self.ndata = len(self.df) self.setSeqIds() if recompute_recip: if self.debug: @@ -610,7 +607,6 @@ class Survey(object): data = data.astype({'a':str, 'b':str, 'm':str, 'n':str}) self.df = pd.concat([self.df, data]).reset_index(drop = True) # for being similar to import one df with reciprocals (as new df will have its own indices!) - self.ndata = len(self.df) self.setSeqIds() # need to recompute sequence self.dfOrigin = self.df.copy() @@ -644,7 +640,6 @@ class Survey(object): 'Reset the filters and redo the filterings, first reciprocity then phase.') return else: - # self.ndata = len(i2keep) if 'irecip' in self.df.columns: # get a list of measurement that would be affected by the removal recip2reset = self.df[~i2keep]['irecip'].values*-1 @@ -653,7 +648,6 @@ class Survey(object): self.df.reset_index(drop=True, inplace=True) else: self.df.reset_index(inplace=True) - self.ndata = len(self.df) self.setSeqIds() # not super efficient, but works # self.sequence = self.sequence.copy()[i2keep,:] # self.isequence = self.isequence.copy()[i2keep,:] @@ -731,7 +725,7 @@ class Survey(object): """ resist = self.df['resist'].values phase = -self.kFactor*self.df['ip'].values #converting chargeability to phase shift - ndata = self.ndata + ndata = self.df.shape[0] array = self.isequence - 1 R = np.copy(resist) @@ -846,7 +840,7 @@ class Survey(object): """ resist = self.df['resist'].values phase = -self.kFactor*self.df['ip'].values #converting chargeability to phase shift - ndata = self.ndata + ndata = self.df.shape[0] array = self.isequence - 1 R = np.copy(resist) @@ -946,7 +940,7 @@ class Survey(object): """ resist = np.asarray(self.df['resist'].values,dtype=float) phase = np.asarray(-self.kFactor*self.df['ip'].values,dtype=float) #converting chargeability to phase shift - ndata = self.ndata + ndata = self.df.shape[0] array = np.asarray(self.isequence - 1, dtype=int) # print(type(phase)) @@ -1145,7 +1139,6 @@ class Survey(object): merged when called this method. """ self.df = pd.merge(self.df, self.filterDataIP[['a','b','m','n']].copy(), how='inner', on=['a','b','m','n']) - self.ndata = len(self.df) self.setSeqIds() @staticmethod @@ -1833,6 +1826,8 @@ class Survey(object): Geometric factors for each measurement in Survey.df (dataframe) """ + if self.isequence.shape[0] != len(self.df): + self.setSeqIds() if 'buried' in self.elec.columns and any(self.elec['buried']): if self.debug: print('Computing geometric factors for buried electrodes!') @@ -2522,7 +2517,7 @@ class Survey(object): with open(outputname, 'w') as f: f.write(str(len(protocol)) + '\n') with open(outputname, 'a') as f: - to_csv(protocol, f, sep='\t', header=False, index=False) + to_csv(protocol, f, sep='\t', header=False, index=False, lineterminator='\n') return protocol @@ -2574,10 +2569,13 @@ class Survey(object): flag3d: bool, optional If true, function exits before """ + # self.ndata = len(self.df) - # self.setSeqIds() + if len(self.df) != self.isequence.shape[0]: + self.setSeqIds() + array = self.isequence - 1 - if self.ndata == 0: + if self.df.shape[0] == 0: raise ValueError('Unable to plot! Dataset is empty - can be due to filtering out all datapoints') percFact = 1 diff --git a/src/resipy/cext/fastRecip.c b/src/resipy/cext/fastRecip.c index 06faa95c398c600e3da0ae8e357a6c3f24328854..fb3dede5b124f2acfdcd9819d9a4615c4537fa6c 100644 --- a/src/resipy/cext/fastRecip.c +++ b/src/resipy/cext/fastRecip.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.8 */ +/* Generated by Cython 3.0.6 */ /* BEGIN: Cython Metadata { @@ -54,10 +54,10 @@ END: Cython Metadata */ #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_8" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_6" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030008F0 +#define CYTHON_HEX_VERSION 0x030006F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -599,14 +599,14 @@ END: Cython Metadata */ PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 - PyObject *version_info; + PyObject *version_info; // borrowed PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 - minor_version = 11; + minor_version = 11; // we don't yet need to distinguish between versions > 11 #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; @@ -664,7 +664,7 @@ END: Cython Metadata */ PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; - PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); + PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); // we don't have access to __pyx_empty_bytes here if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 @@ -1383,7 +1383,7 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; - #else + #else // Py < 3.12 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) @@ -1677,7 +1677,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":730 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1686,7 +1686,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":731 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1695,7 +1695,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":732 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1704,7 +1704,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":733 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1713,7 +1713,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":737 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1722,7 +1722,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":738 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1731,7 +1731,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":739 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1740,7 +1740,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":740 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1749,7 +1749,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":744 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1758,7 +1758,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":745 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1767,7 +1767,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":754 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -1776,7 +1776,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":755 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1785,7 +1785,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":757 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -1794,7 +1794,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":758 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1803,7 +1803,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":760 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1812,7 +1812,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":761 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1821,7 +1821,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":763 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1830,7 +1830,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":764 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1839,7 +1839,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":765 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1911,7 +1911,7 @@ struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { PyObject *default_value; }; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":767 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1920,7 +1920,7 @@ struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default { */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":768 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1929,7 +1929,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":769 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1938,7 +1938,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -2257,8 +2257,8 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else - #define __Pyx_Arg_NewRef_VARARGS(arg) arg - #define __Pyx_Arg_XDECREF_VARARGS(arg) + #define __Pyx_Arg_NewRef_VARARGS(arg) arg // no-op + #define __Pyx_Arg_XDECREF_VARARGS(arg) // no-op - arg is borrowed #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL @@ -2274,9 +2274,8 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif - #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs - to have the same reference counting */ - #define __Pyx_Arg_XDECREF_FASTCALL(arg) + #define __Pyx_Arg_NewRef_FASTCALL(arg) arg // no-op, __Pyx_Arg_FASTCALL is direct and this needs + #define __Pyx_Arg_XDECREF_FASTCALL(arg) // no-op - arg was returned from array #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS @@ -2405,7 +2404,7 @@ typedef struct { #endif void *defaults; int defaults_pyobjects; - size_t defaults_size; + size_t defaults_size; // used by FusedFunction for copying defaults int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; @@ -2899,22 +2898,22 @@ static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_8 -#define __PYX_HAVE_RT_ImportType_proto_3_0_8 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_6 +#define __PYX_HAVE_RT_ImportType_proto_3_0_6 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_8(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_8(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_0_8 { - __Pyx_ImportType_CheckSize_Error_3_0_8 = 0, - __Pyx_ImportType_CheckSize_Warn_3_0_8 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_0_8 = 2 +enum __Pyx_ImportType_CheckSize_3_0_6 { + __Pyx_ImportType_CheckSize_Error_3_0_6 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_6 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_6 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size); +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size); #endif /* CLineInTraceback.proto */ @@ -18907,7 +18906,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -18918,7 +18917,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":248 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -18928,7 +18927,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -18941,7 +18940,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18955,7 +18954,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":254 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -18968,7 +18967,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -18983,7 +18982,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -18994,7 +18993,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":260 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -19004,7 +19003,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -19017,7 +19016,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -19028,7 +19027,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":268 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -19038,7 +19037,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -19051,7 +19050,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -19062,7 +19061,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":275 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -19072,7 +19071,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -19085,7 +19084,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -19096,7 +19095,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":281 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -19106,7 +19105,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -19119,7 +19118,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -19130,7 +19129,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":290 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -19140,7 +19139,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -19153,7 +19152,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -19170,7 +19169,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":774 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -19184,7 +19183,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -19203,7 +19202,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19220,7 +19219,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":777 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -19234,7 +19233,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -19253,7 +19252,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -19270,7 +19269,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":780 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -19284,7 +19283,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -19303,7 +19302,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -19320,7 +19319,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":783 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -19334,7 +19333,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -19353,7 +19352,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -19370,7 +19369,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":786 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -19384,7 +19383,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -19403,7 +19402,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -19417,7 +19416,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19427,7 +19426,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":790 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -19439,7 +19438,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -19448,7 +19447,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":792 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -19462,7 +19461,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -19477,7 +19476,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -19491,7 +19490,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":969 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -19500,7 +19499,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":970 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -19509,7 +19508,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 970, __pyx_L1_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -19524,7 +19523,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19539,7 +19538,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":973 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -19548,7 +19547,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -19558,7 +19557,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":975 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -19569,7 +19568,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -19578,7 +19577,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":976 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -19590,7 +19589,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -19605,7 +19604,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19629,7 +19628,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19645,7 +19644,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":982 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< @@ -19654,7 +19653,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19668,7 +19667,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":983 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -19683,7 +19682,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -19698,7 +19697,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { } goto __pyx_L5_except_error; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -19714,7 +19713,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -19737,7 +19736,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -19761,7 +19760,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19777,7 +19776,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":988 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -19786,7 +19785,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19800,7 +19799,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":989 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -19815,7 +19814,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -19830,7 +19829,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { } goto __pyx_L5_except_error; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -19846,7 +19845,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -19869,7 +19868,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -19893,7 +19892,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19909,7 +19908,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":994 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -19918,7 +19917,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19932,7 +19931,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":995 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -19947,7 +19946,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":996 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -19962,7 +19961,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { } goto __pyx_L5_except_error; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -19978,7 +19977,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -20001,7 +20000,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -20012,7 +20011,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1011 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -20022,7 +20021,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -20035,7 +20034,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -20046,7 +20045,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1026 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -20056,7 +20055,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -20069,7 +20068,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20080,7 +20079,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1036 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -20090,7 +20089,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20103,7 +20102,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20114,7 +20113,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1043 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -20124,7 +20123,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20137,7 +20136,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -20148,7 +20147,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1050 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -20156,7 +20155,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -26127,7 +26126,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -26138,7 +26137,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -26583,45 +26582,45 @@ static int __Pyx_modinit_type_import_code(void) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_8(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_6(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyTypeObject), #else - sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyHeapTypeObject), + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyHeapTypeObject), #endif - __Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_8(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(6, 8, __pyx_L1_error) + __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_6(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(6, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_8(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(7, 15, __pyx_L1_error) + __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_6(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(7, 15, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 202, __pyx_L1_error) - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 225, __pyx_L1_error) - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 229, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 238, __pyx_L1_error) - __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 809, __pyx_L1_error) - __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 811, __pyx_L1_error) - __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 813, __pyx_L1_error) - __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 815, __pyx_L1_error) - __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 817, __pyx_L1_error) - __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 819, __pyx_L1_error) - __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 821, __pyx_L1_error) - __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 823, __pyx_L1_error) - __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 825, __pyx_L1_error) - __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 827, __pyx_L1_error) - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 866, __pyx_L1_error) + __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 202, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 225, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 229, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 238, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 809, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 811, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 813, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 815, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 817, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 819, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 821, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 823, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 825, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 827, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_5array_array = __Pyx_ImportType_3_0_8(__pyx_t_1, "array", "array", sizeof(arrayobject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(arrayobject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(4, 69, __pyx_L1_error) + __pyx_ptype_7cpython_5array_array = __Pyx_ImportType_3_0_6(__pyx_t_1, "array", "array", sizeof(arrayobject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(arrayobject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(4, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -26841,7 +26840,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_fastRecip(PyObject *__pyx_pyinit_m __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); - __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "fastRecip" pseudovariable */ + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to fastRecip pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } @@ -27933,11 +27932,11 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { - if (unlikely(eq < 0)) return NULL; + if (unlikely(eq < 0)) return NULL; // error return kwvalues[i]; } } - return NULL; + return NULL; // not found (no exception set) } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { @@ -28024,7 +28023,7 @@ static int __Pyx_ParseOptionalKeywords( if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS - Py_INCREF(value); + Py_INCREF(value); // transfer ownership of value to values Py_DECREF(key); #endif key = NULL; @@ -28043,7 +28042,7 @@ static int __Pyx_ParseOptionalKeywords( && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS - value = NULL; + value = NULL; // ownership transferred to values #endif break; } @@ -28075,7 +28074,7 @@ static int __Pyx_ParseOptionalKeywords( if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS - value = NULL; + value = NULL; // ownership transferred to values #endif break; } @@ -32360,10 +32359,10 @@ __PYX_GOOD: #endif /* TypeImport */ - #ifndef __PYX_HAVE_RT_ImportType_3_0_8 -#define __PYX_HAVE_RT_ImportType_3_0_8 -static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size) + #ifndef __PYX_HAVE_RT_ImportType_3_0_6 +#define __PYX_HAVE_RT_ImportType_3_0_6 +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size) { PyObject *result = 0; char warning[200]; @@ -32417,7 +32416,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_8 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_6 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -32425,7 +32424,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_8 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_6 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -32707,7 +32706,7 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif - Py_XDECREF(py_funcname); + Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline return py_code; bad: Py_XDECREF(py_funcname); diff --git a/src/resipy/cext/fastRecip.cp36-win_amd64.pyd b/src/resipy/cext/fastRecip.cp36-win_amd64.pyd deleted file mode 100644 index 3b8ff1365d539d5cf588d50ea8439dcf7e4fc3fa..0000000000000000000000000000000000000000 Binary files a/src/resipy/cext/fastRecip.cp36-win_amd64.pyd and /dev/null differ diff --git a/src/resipy/cext/fastRecip.cpython-310-x86_64-linux-gnu.so b/src/resipy/cext/fastRecip.cpython-310-x86_64-linux-gnu.so index 870e960b5d88c28aa76f67fe2dc4ef37db30310c..bac05e3cd5dded9b89b10ea87da6ae2d347f512c 100755 Binary files a/src/resipy/cext/fastRecip.cpython-310-x86_64-linux-gnu.so and b/src/resipy/cext/fastRecip.cpython-310-x86_64-linux-gnu.so differ diff --git a/src/resipy/cext/fastRecip.cpython-36m-x86_64-linux-gnu.so b/src/resipy/cext/fastRecip.cpython-36m-x86_64-linux-gnu.so deleted file mode 100755 index 4b9787d0b10b9bf752534aa596d24193e4dbe21b..0000000000000000000000000000000000000000 Binary files a/src/resipy/cext/fastRecip.cpython-36m-x86_64-linux-gnu.so and /dev/null differ diff --git a/src/resipy/cext/meshCalc.cp36-win_amd64.pyd b/src/resipy/cext/meshCalc.cp36-win_amd64.pyd deleted file mode 100644 index 46171ae2f3867adf59fe282a6a8631a373d028db..0000000000000000000000000000000000000000 Binary files a/src/resipy/cext/meshCalc.cp36-win_amd64.pyd and /dev/null differ diff --git a/src/resipy/cext/meshCalc.cpython-310-x86_64-linux-gnu.so b/src/resipy/cext/meshCalc.cpython-310-x86_64-linux-gnu.so index 813b998bb4459e483a0eff808a3994de43f15441..81b05ffbaf162687ce34f57d7b7ba5b50151398f 100755 Binary files a/src/resipy/cext/meshCalc.cpython-310-x86_64-linux-gnu.so and b/src/resipy/cext/meshCalc.cpython-310-x86_64-linux-gnu.so differ diff --git a/src/resipy/cext/meshCalc.cpython-311-x86_64-linux-gnu.so b/src/resipy/cext/meshCalc.cpython-311-x86_64-linux-gnu.so index 58496063ac029a115a8c2bdeec31a330220eacf0..c5b0b08db6289cf1928070b4ec8e06d3fdf4f2ae 100755 Binary files a/src/resipy/cext/meshCalc.cpython-311-x86_64-linux-gnu.so and b/src/resipy/cext/meshCalc.cpython-311-x86_64-linux-gnu.so differ diff --git a/src/resipy/cext/meshCalc.cpython-312-x86_64-linux-gnu.so b/src/resipy/cext/meshCalc.cpython-312-x86_64-linux-gnu.so index d2c31dadced3f6fdcf1d93f3cbfeb024f47fd60c..3ea91f1c7120f0e3b9458ac0d5d5d995f95bf521 100755 Binary files a/src/resipy/cext/meshCalc.cpython-312-x86_64-linux-gnu.so and b/src/resipy/cext/meshCalc.cpython-312-x86_64-linux-gnu.so differ diff --git a/src/resipy/cext/meshCalc.cpython-36m-x86_64-linux-gnu.so b/src/resipy/cext/meshCalc.cpython-36m-x86_64-linux-gnu.so deleted file mode 100755 index 61ca597f0c9f5eb86e0428d8766017d35d150d30..0000000000000000000000000000000000000000 Binary files a/src/resipy/cext/meshCalc.cpython-36m-x86_64-linux-gnu.so and /dev/null differ diff --git a/src/resipy/cext/meshCalc.cpython-37m-x86_64-linux-gnu.so b/src/resipy/cext/meshCalc.cpython-37m-x86_64-linux-gnu.so index b9b30a4d6a9878990fa6d924b69dba1093a596c7..f34edd244ede833dadc2867399263cb5d9883690 100755 Binary files a/src/resipy/cext/meshCalc.cpython-37m-x86_64-linux-gnu.so and b/src/resipy/cext/meshCalc.cpython-37m-x86_64-linux-gnu.so differ diff --git a/src/resipy/cext/meshCalc.cpython-38-x86_64-linux-gnu.so b/src/resipy/cext/meshCalc.cpython-38-x86_64-linux-gnu.so index 7112863469b2a4d91b1cc73fe421691cc332bb68..21665d92ce7fb12f17aa43d1a89701ae2460e45a 100755 Binary files a/src/resipy/cext/meshCalc.cpython-38-x86_64-linux-gnu.so and b/src/resipy/cext/meshCalc.cpython-38-x86_64-linux-gnu.so differ diff --git a/src/resipy/cext/meshCalc.cpython-39-x86_64-linux-gnu.so b/src/resipy/cext/meshCalc.cpython-39-x86_64-linux-gnu.so index 99fba1e0e040d3ae402b6b0f9c6fd1b139d9556c..1e666c030fb4a16e51964c6ad30a61cce46a3b96 100755 Binary files a/src/resipy/cext/meshCalc.cpython-39-x86_64-linux-gnu.so and b/src/resipy/cext/meshCalc.cpython-39-x86_64-linux-gnu.so differ diff --git a/src/resipy/cext/meshCalc.pyx b/src/resipy/cext/meshCalc.pyx index 42248c040f3b89ae0f9fe76472cc31d38b27c3da..0ae22668627eda35bbf5c89850e05706c01e549e 100644 --- a/src/resipy/cext/meshCalc.pyx +++ b/src/resipy/cext/meshCalc.pyx @@ -644,11 +644,13 @@ def facesPrism(long[:,:] connection, double[:,:] node, long[:,:] neigh): @cython.boundscheck(False) @cython.wraparound(False) -def sortNeigh(np.ndarray[long, ndim=2] neigh): +def sortNeigh(np.ndarray[long, ndim=2] neigh, long[:] zone): """Sort neighbour matrix for input into R3t. ----------- neigh: nd array M by N describing element neighbours + zone: nd array + N rows which corresponds to the zone number of elements. Returns ----------- @@ -656,6 +658,7 @@ def sortNeigh(np.ndarray[long, ndim=2] neigh): neigh: nd array Prepared neighbour matrix """ + cdef int i,j cdef int numel = neigh.shape[0] cdef int npere = neigh.shape[1] cdef long[:,:] neighv = neigh @@ -666,6 +669,8 @@ def sortNeigh(np.ndarray[long, ndim=2] neigh): for j in range(npere): if neighv[i,j] == -1: #check if outside element neighv[i,j] = like_inf # if outside assign big number + elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone + neighv[i,j] = like_inf sortInt(neigh[i,:],npere) # sort in that part of the row for j in range(npere): @@ -1261,8 +1266,7 @@ def conductanceCall(long[:,:] connection, int numnp, int typ=0, numnp: int Number of nodes typ: vtk cell type - DESCRIPTION. The default is 0. Will raise an error if takes an - unexpected value. + The default is 0. Will raise an error if takes an unexpected value. num_threads: int (not currently in use) diff --git a/src/resipy/cext/meshCalcUnix.c b/src/resipy/cext/meshCalcUnix.c index 4997e93c874bcfd5f817438364e5a70f13b2f767..9228e5f9d7599d1bc1c092257c22c1bbc2c9e900 100644 --- a/src/resipy/cext/meshCalcUnix.c +++ b/src/resipy/cext/meshCalcUnix.c @@ -1,4 +1,4 @@ -/* Generated by Cython 3.0.8 */ +/* Generated by Cython 3.0.6 */ /* BEGIN: Cython Metadata { @@ -43,10 +43,10 @@ END: Cython Metadata */ #else #define __PYX_EXTRA_ABI_MODULE_NAME "" #endif -#define CYTHON_ABI "3_0_8" __PYX_EXTRA_ABI_MODULE_NAME +#define CYTHON_ABI "3_0_6" __PYX_EXTRA_ABI_MODULE_NAME #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "." -#define CYTHON_HEX_VERSION 0x030008F0 +#define CYTHON_HEX_VERSION 0x030006F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -588,14 +588,14 @@ END: Cython Metadata */ PyObject *exception_table = NULL; PyObject *types_module=NULL, *code_type=NULL, *result=NULL; #if __PYX_LIMITED_VERSION_HEX < 0x030B0000 - PyObject *version_info; + PyObject *version_info; // borrowed PyObject *py_minor_version = NULL; #endif long minor_version = 0; PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback); #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000 - minor_version = 11; + minor_version = 11; // we don't yet need to distinguish between versions > 11 #else if (!(version_info = PySys_GetObject("version_info"))) goto end; if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end; @@ -653,7 +653,7 @@ END: Cython Metadata */ PyObject *fv, PyObject *cell, PyObject* fn, PyObject *name, int fline, PyObject *lnos) { PyCodeObject *result; - PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); + PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0); // we don't have access to __pyx_empty_bytes here if (!empty_bytes) return NULL; result = #if PY_VERSION_HEX >= 0x030C0000 @@ -1363,7 +1363,7 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); #endif typedef Py_ssize_t __Pyx_compact_pylong; typedef size_t __Pyx_compact_upylong; - #else + #else // Py < 3.12 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0) #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0) #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0) @@ -1653,7 +1653,7 @@ typedef struct { /* #### Code section: numeric_typedefs ### */ -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":730 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":730 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -1662,7 +1662,7 @@ typedef struct { */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":731 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":731 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -1671,7 +1671,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":732 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":732 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -1680,7 +1680,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":733 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":733 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -1689,7 +1689,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":737 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":737 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -1698,7 +1698,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":738 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":738 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -1707,7 +1707,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":739 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":739 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -1716,7 +1716,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":740 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":740 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -1725,7 +1725,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":744 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":744 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -1734,7 +1734,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":745 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":745 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -1743,7 +1743,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":754 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":754 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -1752,7 +1752,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; */ typedef npy_long __pyx_t_5numpy_int_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":755 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":755 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -1761,7 +1761,7 @@ typedef npy_long __pyx_t_5numpy_int_t; */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":757 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":757 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -1770,7 +1770,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":758 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":758 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -1779,7 +1779,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":760 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":760 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -1788,7 +1788,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":761 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":761 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -1797,7 +1797,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":763 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":763 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1806,7 +1806,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":764 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":764 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1815,7 +1815,7 @@ typedef npy_double __pyx_t_5numpy_float_t; */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":765 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":765 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1857,7 +1857,7 @@ struct __pyx_MemviewEnum_obj; struct __pyx_memoryview_obj; struct __pyx_memoryviewslice_obj; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":767 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":767 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1866,7 +1866,7 @@ struct __pyx_memoryviewslice_obj; */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":768 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":768 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1875,7 +1875,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":769 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":769 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1884,7 +1884,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":771 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":771 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -2203,8 +2203,8 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg) #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg) #else - #define __Pyx_Arg_NewRef_VARARGS(arg) arg - #define __Pyx_Arg_XDECREF_VARARGS(arg) + #define __Pyx_Arg_NewRef_VARARGS(arg) arg // no-op + #define __Pyx_Arg_XDECREF_VARARGS(arg) // no-op - arg is borrowed #endif #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds) #define __Pyx_KwValues_VARARGS(args, nargs) NULL @@ -2220,9 +2220,8 @@ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int #else #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw) #endif - #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs - to have the same reference counting */ - #define __Pyx_Arg_XDECREF_FASTCALL(arg) + #define __Pyx_Arg_NewRef_FASTCALL(arg) arg // no-op, __Pyx_Arg_FASTCALL is direct and this needs + #define __Pyx_Arg_XDECREF_FASTCALL(arg) // no-op - arg was returned from array #else #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS @@ -2351,7 +2350,7 @@ typedef struct { #endif void *defaults; int defaults_pyobjects; - size_t defaults_size; + size_t defaults_size; // used by FusedFunction for copying defaults int flags; PyObject *defaults_tuple; PyObject *defaults_kwdict; @@ -2912,22 +2911,22 @@ static int __Pyx_setup_reduce(PyObject* type_obj); #endif /* TypeImport.proto */ -#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_8 -#define __PYX_HAVE_RT_ImportType_proto_3_0_8 +#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_6 +#define __PYX_HAVE_RT_ImportType_proto_3_0_6 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L #include #endif #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_8(s) alignof(s) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) alignof(s) #else -#define __PYX_GET_STRUCT_ALIGNMENT_3_0_8(s) sizeof(void*) +#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) sizeof(void*) #endif -enum __Pyx_ImportType_CheckSize_3_0_8 { - __Pyx_ImportType_CheckSize_Error_3_0_8 = 0, - __Pyx_ImportType_CheckSize_Warn_3_0_8 = 1, - __Pyx_ImportType_CheckSize_Ignore_3_0_8 = 2 +enum __Pyx_ImportType_CheckSize_3_0_6 { + __Pyx_ImportType_CheckSize_Error_3_0_6 = 0, + __Pyx_ImportType_CheckSize_Warn_3_0_6 = 1, + __Pyx_ImportType_CheckSize_Ignore_3_0_6 = 2 }; -static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size); +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size); #endif /* CLineInTraceback.proto */ @@ -3012,6 +3011,9 @@ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_l /* ObjectToMemviewSlice.proto */ static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_dsds_double(PyObject *, int writable_flag); +/* ObjectToMemviewSlice.proto */ +static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long(PyObject *, int writable_flag); + /* MemviewDtypeToObject.proto */ static CYTHON_INLINE PyObject *__pyx_memview_get_PY_LONG_LONG(const char *itemp); static CYTHON_INLINE int __pyx_memview_set_PY_LONG_LONG(const char *itemp, PyObject *obj); @@ -3474,6 +3476,7 @@ static const char __pyx_k_wrap[] = "wrap"; static const char __pyx_k_xinf[] = "xinf"; static const char __pyx_k_xtmp[] = "xtmp"; static const char __pyx_k_zinf[] = "zinf"; +static const char __pyx_k_zone[] = "zone"; static const char __pyx_k_ztmp[] = "ztmp"; static const char __pyx_k_ASCII[] = "ASCII"; static const char __pyx_k_array[] = "array"; @@ -3774,7 +3777,7 @@ static PyObject *__pyx_pf_8meshCalc_8faces3d(CYTHON_UNUSED PyObject *__pyx_self, static PyObject *__pyx_pf_8meshCalc_10neigh2d(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_connection, int __pyx_v_return_tri_combo, CYTHON_UNUSED int __pyx_v_num_threads); /* proto */ static PyObject *__pyx_pf_8meshCalc_12neighPrism(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_connection, int __pyx_v_return_tri_combo, CYTHON_UNUSED int __pyx_v_num_threads); /* proto */ static PyObject *__pyx_pf_8meshCalc_14facesPrism(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_connection, __Pyx_memviewslice __pyx_v_node, __Pyx_memviewslice __pyx_v_neigh); /* proto */ -static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_neigh); /* proto */ +static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_neigh, __Pyx_memviewslice __pyx_v_zone); /* proto */ static PyObject *__pyx_pf_8meshCalc_18splitTri(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_connection, __Pyx_memviewslice __pyx_v_node); /* proto */ static PyObject *__pyx_pf_8meshCalc_20splitTetra(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_connection, __Pyx_memviewslice __pyx_v_node); /* proto */ static PyObject *__pyx_pf_8meshCalc_22orderTetra(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_memviewslice __pyx_v_connection, __Pyx_memviewslice __pyx_v_node, CYTHON_UNUSED int __pyx_v_num_threads); /* proto */ @@ -4263,6 +4266,7 @@ typedef struct { PyObject *__pyx_n_s_zinf; PyObject *__pyx_n_s_zm; PyObject *__pyx_n_s_zmf; + PyObject *__pyx_n_s_zone; PyObject *__pyx_n_s_ztmp; PyObject *__pyx_int_0; PyObject *__pyx_int_1; @@ -4804,6 +4808,7 @@ static int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_n_s_zinf); Py_CLEAR(clear_module_state->__pyx_n_s_zm); Py_CLEAR(clear_module_state->__pyx_n_s_zmf); + Py_CLEAR(clear_module_state->__pyx_n_s_zone); Py_CLEAR(clear_module_state->__pyx_n_s_ztmp); Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1); @@ -5323,6 +5328,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { Py_VISIT(traverse_module_state->__pyx_n_s_zinf); Py_VISIT(traverse_module_state->__pyx_n_s_zm); Py_VISIT(traverse_module_state->__pyx_n_s_zmf); + Py_VISIT(traverse_module_state->__pyx_n_s_zone); Py_VISIT(traverse_module_state->__pyx_n_s_ztmp); Py_VISIT(traverse_module_state->__pyx_int_0); Py_VISIT(traverse_module_state->__pyx_int_1); @@ -5878,6 +5884,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) { #define __pyx_n_s_zinf __pyx_mstate_global->__pyx_n_s_zinf #define __pyx_n_s_zm __pyx_mstate_global->__pyx_n_s_zm #define __pyx_n_s_zmf __pyx_mstate_global->__pyx_n_s_zmf +#define __pyx_n_s_zone __pyx_mstate_global->__pyx_n_s_zone #define __pyx_n_s_ztmp __pyx_mstate_global->__pyx_n_s_ztmp #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1 @@ -19814,7 +19821,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -19825,7 +19832,7 @@ static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject *__pyx_v_self) { PyObject *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":248 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":248 * """Returns a borrowed reference to the object owning the data/memory. * """ * return PyArray_BASE(self) # <<<<<<<<<<<<<< @@ -19835,7 +19842,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject __pyx_r = PyArray_BASE(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":245 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":245 * * @property * cdef inline PyObject* base(self) nogil: # <<<<<<<<<<<<<< @@ -19848,7 +19855,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_7ndarray_4base_base(PyArrayObject return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -19862,7 +19869,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray PyArray_Descr *__pyx_t_1; __Pyx_RefNannySetupContext("descr", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":254 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":254 * """Returns an owned reference to the dtype of the array. * """ * return PyArray_DESCR(self) # <<<<<<<<<<<<<< @@ -19875,7 +19882,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray __pyx_r = ((PyArray_Descr *)__pyx_t_1); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":251 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":251 * * @property * cdef inline dtype descr(self): # <<<<<<<<<<<<<< @@ -19890,7 +19897,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -19901,7 +19908,7 @@ static CYTHON_INLINE PyArray_Descr *__pyx_f_5numpy_7ndarray_5descr_descr(PyArray static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx_v_self) { int __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":260 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":260 * """Returns the number of dimensions in the array. * """ * return PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -19911,7 +19918,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx __pyx_r = PyArray_NDIM(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":257 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":257 * * @property * cdef inline int ndim(self) nogil: # <<<<<<<<<<<<<< @@ -19924,7 +19931,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -19935,7 +19942,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_7ndarray_4ndim_ndim(PyArrayObject *__pyx static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":268 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":268 * Can return NULL for 0-dimensional arrays. * """ * return PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -19945,7 +19952,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec __pyx_r = PyArray_DIMS(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":263 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":263 * * @property * cdef inline npy_intp *shape(self) nogil: # <<<<<<<<<<<<<< @@ -19958,7 +19965,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -19969,7 +19976,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_5shape_shape(PyArrayObjec static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayObject *__pyx_v_self) { npy_intp *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":275 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":275 * The number of elements matches the number of dimensions of the array (ndim). * """ * return PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -19979,7 +19986,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO __pyx_r = PyArray_STRIDES(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":271 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":271 * * @property * cdef inline npy_intp *strides(self) nogil: # <<<<<<<<<<<<<< @@ -19992,7 +19999,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -20003,7 +20010,7 @@ static CYTHON_INLINE npy_intp *__pyx_f_5numpy_7ndarray_7strides_strides(PyArrayO static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject *__pyx_v_self) { npy_intp __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":281 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":281 * """Returns the total size (in number of elements) of the array. * """ * return PyArray_SIZE(self) # <<<<<<<<<<<<<< @@ -20013,7 +20020,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * __pyx_r = PyArray_SIZE(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":278 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":278 * * @property * cdef inline npy_intp size(self) nogil: # <<<<<<<<<<<<<< @@ -20026,7 +20033,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -20037,7 +20044,7 @@ static CYTHON_INLINE npy_intp __pyx_f_5numpy_7ndarray_4size_size(PyArrayObject * static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__pyx_v_self) { char *__pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":290 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":290 * of `PyArray_DATA()` instead, which returns a 'void*'. * """ * return PyArray_BYTES(self) # <<<<<<<<<<<<<< @@ -20047,7 +20054,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p __pyx_r = PyArray_BYTES(__pyx_v_self); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":284 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":284 * * @property * cdef inline char* data(self) nogil: # <<<<<<<<<<<<<< @@ -20060,7 +20067,7 @@ static CYTHON_INLINE char *__pyx_f_5numpy_7ndarray_4data_data(PyArrayObject *__p return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -20077,7 +20084,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":774 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":774 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -20091,7 +20098,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":773 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":773 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -20110,7 +20117,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -20127,7 +20134,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":777 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":777 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -20141,7 +20148,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":776 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":776 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -20160,7 +20167,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -20177,7 +20184,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":780 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":780 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -20191,7 +20198,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":779 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":779 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -20210,7 +20217,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -20227,7 +20234,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":783 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":783 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -20241,7 +20248,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":782 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":782 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -20260,7 +20267,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -20277,7 +20284,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":786 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":786 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -20291,7 +20298,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":785 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":785 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -20310,7 +20317,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -20324,7 +20331,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -20334,7 +20341,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_t_1 = PyDataType_HASSUBARRAY(__pyx_v_d); if (__pyx_t_1) { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":790 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":790 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -20346,7 +20353,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":789 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":789 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -20355,7 +20362,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ */ } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":792 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":792 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -20369,7 +20376,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ goto __pyx_L0; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":788 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":788 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -20384,7 +20391,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -20398,7 +20405,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a const char *__pyx_filename = NULL; int __pyx_clineno = 0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":969 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":969 * * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< @@ -20407,7 +20414,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ Py_INCREF(__pyx_v_base); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":970 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":970 * cdef inline void set_array_base(ndarray arr, object base): * Py_INCREF(base) # important to do this before stealing the reference below! * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< @@ -20416,7 +20423,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a */ __pyx_t_1 = PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 970, __pyx_L1_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":968 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":968 * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< @@ -20431,7 +20438,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a __pyx_L0:; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -20446,7 +20453,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":973 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":973 * * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< @@ -20455,7 +20462,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -20465,7 +20472,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_t_1 = (__pyx_v_base == NULL); if (__pyx_t_1) { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":975 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":975 * base = PyArray_BASE(arr) * if base is NULL: * return None # <<<<<<<<<<<<<< @@ -20476,7 +20483,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":974 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":974 * cdef inline object get_array_base(ndarray arr): * base = PyArray_BASE(arr) * if base is NULL: # <<<<<<<<<<<<<< @@ -20485,7 +20492,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py */ } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":976 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":976 * if base is NULL: * return None * return base # <<<<<<<<<<<<<< @@ -20497,7 +20504,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py __pyx_r = ((PyObject *)__pyx_v_base); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":972 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":972 * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< @@ -20512,7 +20519,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -20536,7 +20543,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_array", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -20552,7 +20559,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":982 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":982 * cdef inline int import_array() except -1: * try: * __pyx_import_array() # <<<<<<<<<<<<<< @@ -20561,7 +20568,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { */ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 982, __pyx_L3_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -20575,7 +20582,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":983 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":983 * try: * __pyx_import_array() * except Exception: # <<<<<<<<<<<<<< @@ -20590,7 +20597,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -20605,7 +20612,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { } goto __pyx_L5_except_error; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":981 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":981 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -20621,7 +20628,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { __pyx_L8_try_end:; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":980 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":980 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -20644,7 +20651,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -20668,7 +20675,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_umath", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -20684,7 +20691,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":988 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":988 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -20693,7 +20700,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 988, __pyx_L3_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -20707,7 +20714,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":989 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":989 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -20722,7 +20729,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -20737,7 +20744,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { } goto __pyx_L5_except_error; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":987 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":987 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -20753,7 +20760,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { __pyx_L8_try_end:; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":986 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":986 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -20776,7 +20783,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -20800,7 +20807,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_ufunc", 1); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -20816,7 +20823,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":994 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":994 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< @@ -20825,7 +20832,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { */ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 994, __pyx_L3_error) - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -20839,7 +20846,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":995 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":995 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -20854,7 +20861,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __Pyx_XGOTREF(__pyx_t_6); __Pyx_XGOTREF(__pyx_t_7); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":996 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":996 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -20869,7 +20876,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { } goto __pyx_L5_except_error; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":993 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":993 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -20885,7 +20892,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { __pyx_L8_try_end:; } - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":992 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":992 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -20908,7 +20915,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -20919,7 +20926,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1011 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1011 * bool * """ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< @@ -20929,7 +20936,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":999 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":999 * * * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< @@ -20942,7 +20949,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -20953,7 +20960,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { int __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1026 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1026 * bool * """ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< @@ -20963,7 +20970,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1014 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1014 * * * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< @@ -20976,7 +20983,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -20987,7 +20994,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { npy_datetime __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1036 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1036 * also needed. That can be found using `get_datetime64_unit`. * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -20997,7 +21004,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1029 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1029 * * * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -21010,7 +21017,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -21021,7 +21028,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { npy_timedelta __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1043 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1043 * returns the int64 value underlying scalar numpy timedelta64 object * """ * return (obj).obval # <<<<<<<<<<<<<< @@ -21031,7 +21038,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1039 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1039 * * * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< @@ -21044,7 +21051,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject return __pyx_r; } -/* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 +/* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -21055,7 +21062,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { NPY_DATETIMEUNIT __pyx_r; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1050 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1050 * returns the unit part of the dtype for a numpy datetime64 object. * """ * return (obj).obmeta.base # <<<<<<<<<<<<<< @@ -21063,7 +21070,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); goto __pyx_L0; - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":1046 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":1046 * * * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< @@ -30286,7 +30293,7 @@ static PyObject *__pyx_pf_8meshCalc_14facesPrism(CYTHON_UNUSED PyObject *__pyx_s * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) - * def sortNeigh(np.ndarray[long long, ndim=2] neigh): + * def sortNeigh(np.ndarray[long long, ndim=2] neigh, long[:] zone): */ /* Python wrapper */ @@ -30307,11 +30314,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyArrayObject *__pyx_v_neigh = 0; + __Pyx_memviewslice __pyx_v_zone = { 0, 0, { 0 }, { 0 }, { 0 } }; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; + PyObject* values[2] = {0,0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -30327,10 +30335,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { - PyObject **__pyx_pyargnames[] = {&__pyx_n_s_neigh,0}; + PyObject **__pyx_pyargnames[] = {&__pyx_n_s_neigh,&__pyx_n_s_zone,0}; if (__pyx_kwds) { Py_ssize_t kw_args; switch (__pyx_nargs) { + case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); + CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); CYTHON_FALLTHROUGH; case 0: break; @@ -30345,21 +30355,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 645, __pyx_L3_error) else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_zone)) != 0)) { + (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); + kw_args--; + } + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 645, __pyx_L3_error) + else { + __Pyx_RaiseArgtupleInvalid("sortNeigh", 1, 2, 2, 1); __PYX_ERR(0, 645, __pyx_L3_error) + } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "sortNeigh") < 0)) __PYX_ERR(0, 645, __pyx_L3_error) } - } else if (unlikely(__pyx_nargs != 1)) { + } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); + values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } __pyx_v_neigh = ((PyArrayObject *)values[0]); + __pyx_v_zone = __Pyx_PyObject_to_MemoryviewSlice_ds_long(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_zone.memview)) __PYX_ERR(0, 647, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("sortNeigh", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 645, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("sortNeigh", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 645, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30369,18 +30391,20 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]); } } + __PYX_XCLEAR_MEMVIEW(&__pyx_v_zone, 1); __Pyx_AddTraceback("meshCalc.sortNeigh", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_neigh), __pyx_ptype_5numpy_ndarray, 1, "neigh", 0))) __PYX_ERR(0, 647, __pyx_L1_error) - __pyx_r = __pyx_pf_8meshCalc_16sortNeigh(__pyx_self, __pyx_v_neigh); + __pyx_r = __pyx_pf_8meshCalc_16sortNeigh(__pyx_self, __pyx_v_neigh, __pyx_v_zone); /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = NULL; __pyx_L0:; + __PYX_XCLEAR_MEMVIEW(&__pyx_v_zone, 1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -30391,13 +30415,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_neigh) { +static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_neigh, __Pyx_memviewslice __pyx_v_zone) { + int __pyx_v_i; + int __pyx_v_j; int __pyx_v_numel; int __pyx_v_npere; __Pyx_memviewslice __pyx_v_neighv = { 0, 0, { 0 }, { 0 }, { 0 } }; long __pyx_v_like_inf; - int __pyx_v_i; - int __pyx_v_j; __Pyx_LocalBuf_ND __pyx_pybuffernd_neigh; __Pyx_Buffer __pyx_pybuffer_neigh; PyObject *__pyx_r = NULL; @@ -30413,9 +30437,11 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; int __pyx_t_11; - PyObject *__pyx_t_12 = NULL; - PyObject *__pyx_t_13 = NULL; - __Pyx_memviewslice __pyx_t_14 = { 0, 0, { 0 }, { 0 }, { 0 } }; + Py_ssize_t __pyx_t_12; + PY_LONG_LONG __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + PyObject *__pyx_t_15 = NULL; + __Pyx_memviewslice __pyx_t_16 = { 0, 0, { 0 }, { 0 }, { 0 } }; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -30430,39 +30456,39 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se } __pyx_pybuffernd_neigh.diminfo[0].strides = __pyx_pybuffernd_neigh.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_neigh.diminfo[0].shape = __pyx_pybuffernd_neigh.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_neigh.diminfo[1].strides = __pyx_pybuffernd_neigh.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_neigh.diminfo[1].shape = __pyx_pybuffernd_neigh.rcbuffer->pybuffer.shape[1]; - /* "meshCalcUnix.pyx":659 - * Prepared neighbour matrix + /* "meshCalcUnix.pyx":660 * """ + * cdef int i,j * cdef int numel = neigh.shape[0] # <<<<<<<<<<<<<< * cdef int npere = neigh.shape[1] * cdef long long[:,:] neighv = neigh */ - __pyx_t_1 = __pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_neigh)); if (unlikely(__pyx_t_1 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_neigh)); if (unlikely(__pyx_t_1 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L1_error) __pyx_v_numel = (__pyx_t_1[0]); - /* "meshCalcUnix.pyx":660 - * """ + /* "meshCalcUnix.pyx":661 + * cdef int i,j * cdef int numel = neigh.shape[0] * cdef int npere = neigh.shape[1] # <<<<<<<<<<<<<< * cdef long long[:,:] neighv = neigh * */ - __pyx_t_1 = __pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_neigh)); if (unlikely(__pyx_t_1 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5numpy_7ndarray_5shape_shape(((PyArrayObject *)__pyx_v_neigh)); if (unlikely(__pyx_t_1 == ((npy_intp *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 661, __pyx_L1_error) __pyx_v_npere = (__pyx_t_1[1]); - /* "meshCalcUnix.pyx":661 + /* "meshCalcUnix.pyx":662 * cdef int numel = neigh.shape[0] * cdef int npere = neigh.shape[1] * cdef long long[:,:] neighv = neigh # <<<<<<<<<<<<<< * * #reorder each row (acsending but outside elements at end of row) */ - __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_neigh), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 661, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_neigh), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 662, __pyx_L1_error) __pyx_v_neighv = __pyx_t_2; __pyx_t_2.memview = NULL; __pyx_t_2.data = NULL; - /* "meshCalcUnix.pyx":664 + /* "meshCalcUnix.pyx":665 * * #reorder each row (acsending but outside elements at end of row) * cdef long like_inf = numel*2 #make a big number # <<<<<<<<<<<<<< @@ -30471,7 +30497,7 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_like_inf = (__pyx_v_numel * 2); - /* "meshCalcUnix.pyx":665 + /* "meshCalcUnix.pyx":666 * #reorder each row (acsending but outside elements at end of row) * cdef long like_inf = numel*2 #make a big number * for i in range(numel): # <<<<<<<<<<<<<< @@ -30483,7 +30509,7 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "meshCalcUnix.pyx":666 + /* "meshCalcUnix.pyx":667 * cdef long like_inf = numel*2 #make a big number * for i in range(numel): * for j in range(npere): # <<<<<<<<<<<<<< @@ -30495,66 +30521,102 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_j = __pyx_t_8; - /* "meshCalcUnix.pyx":667 + /* "meshCalcUnix.pyx":668 * for i in range(numel): * for j in range(npere): * if neighv[i,j] == -1: #check if outside element # <<<<<<<<<<<<<< * neighv[i,j] = like_inf # if outside assign big number - * + * elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone */ __pyx_t_9 = __pyx_v_i; __pyx_t_10 = __pyx_v_j; __pyx_t_11 = ((*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_9 * __pyx_v_neighv.strides[0]) ) + __pyx_t_10 * __pyx_v_neighv.strides[1]) ))) == -1LL); if (__pyx_t_11) { - /* "meshCalcUnix.pyx":668 + /* "meshCalcUnix.pyx":669 * for j in range(npere): * if neighv[i,j] == -1: #check if outside element * neighv[i,j] = like_inf # if outside assign big number # <<<<<<<<<<<<<< - * - * sortInt(neigh[i,:],npere) # sort in that part of the row + * elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone + * neighv[i,j] = like_inf */ __pyx_t_10 = __pyx_v_i; __pyx_t_9 = __pyx_v_j; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_10 * __pyx_v_neighv.strides[0]) ) + __pyx_t_9 * __pyx_v_neighv.strides[1]) )) = __pyx_v_like_inf; - /* "meshCalcUnix.pyx":667 + /* "meshCalcUnix.pyx":668 * for i in range(numel): * for j in range(npere): * if neighv[i,j] == -1: #check if outside element # <<<<<<<<<<<<<< * neighv[i,j] = like_inf # if outside assign big number + * elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone + */ + goto __pyx_L7; + } + + /* "meshCalcUnix.pyx":670 + * if neighv[i,j] == -1: #check if outside element + * neighv[i,j] = like_inf # if outside assign big number + * elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone # <<<<<<<<<<<<<< + * neighv[i,j] = like_inf + * + */ + __pyx_t_9 = __pyx_v_i; + __pyx_t_10 = __pyx_v_i; + __pyx_t_12 = __pyx_v_j; + __pyx_t_13 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_10 * __pyx_v_neighv.strides[0]) ) + __pyx_t_12 * __pyx_v_neighv.strides[1]) ))); + __pyx_t_11 = ((*((long *) ( /* dim=0 */ (__pyx_v_zone.data + __pyx_t_9 * __pyx_v_zone.strides[0]) ))) != (*((long *) ( /* dim=0 */ (__pyx_v_zone.data + __pyx_t_13 * __pyx_v_zone.strides[0]) )))); + if (__pyx_t_11) { + + /* "meshCalcUnix.pyx":671 + * neighv[i,j] = like_inf # if outside assign big number + * elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone + * neighv[i,j] = like_inf # <<<<<<<<<<<<<< + * + * sortInt(neigh[i,:],npere) # sort in that part of the row + */ + __pyx_t_12 = __pyx_v_i; + __pyx_t_10 = __pyx_v_j; + *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_12 * __pyx_v_neighv.strides[0]) ) + __pyx_t_10 * __pyx_v_neighv.strides[1]) )) = __pyx_v_like_inf; + + /* "meshCalcUnix.pyx":670 + * if neighv[i,j] == -1: #check if outside element + * neighv[i,j] = like_inf # if outside assign big number + * elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone # <<<<<<<<<<<<<< + * neighv[i,j] = like_inf * */ } + __pyx_L7:; } - /* "meshCalcUnix.pyx":670 - * neighv[i,j] = like_inf # if outside assign big number + /* "meshCalcUnix.pyx":673 + * neighv[i,j] = like_inf * * sortInt(neigh[i,:],npere) # sort in that part of the row # <<<<<<<<<<<<<< * for j in range(npere): * if neighv[i,j] == like_inf: # replace outside values with -1 */ - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_13); - __Pyx_GIVEREF(__pyx_t_12); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12)) __PYX_ERR(0, 670, __pyx_L1_error); + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_15); + __Pyx_GIVEREF(__pyx_t_14); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14)) __PYX_ERR(0, 673, __pyx_L1_error); __Pyx_INCREF(__pyx_slice__7); __Pyx_GIVEREF(__pyx_slice__7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_slice__7)) __PYX_ERR(0, 670, __pyx_L1_error); - __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_neigh), __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 670, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_12, PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 670, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_f_8meshCalc_sortInt(__pyx_t_14, __pyx_v_npere); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 670, __pyx_L1_error) - __PYX_XCLEAR_MEMVIEW(&__pyx_t_14, 1); - __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - - /* "meshCalcUnix.pyx":671 + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_slice__7)) __PYX_ERR(0, 673, __pyx_L1_error); + __pyx_t_14 = 0; + __pyx_t_14 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_neigh), __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __pyx_t_16 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_14, PyBUF_WRITABLE); if (unlikely(!__pyx_t_16.memview)) __PYX_ERR(0, 673, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_f_8meshCalc_sortInt(__pyx_t_16, __pyx_v_npere); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 673, __pyx_L1_error) + __PYX_XCLEAR_MEMVIEW(&__pyx_t_16, 1); + __pyx_t_16.memview = NULL; __pyx_t_16.data = NULL; + + /* "meshCalcUnix.pyx":674 * * sortInt(neigh[i,:],npere) # sort in that part of the row * for j in range(npere): # <<<<<<<<<<<<<< @@ -30566,30 +30628,30 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { __pyx_v_j = __pyx_t_8; - /* "meshCalcUnix.pyx":672 + /* "meshCalcUnix.pyx":675 * sortInt(neigh[i,:],npere) # sort in that part of the row * for j in range(npere): * if neighv[i,j] == like_inf: # replace outside values with -1 # <<<<<<<<<<<<<< * neighv[i,j] = -1 * return neigh */ - __pyx_t_9 = __pyx_v_i; - __pyx_t_10 = __pyx_v_j; - __pyx_t_11 = ((*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_9 * __pyx_v_neighv.strides[0]) ) + __pyx_t_10 * __pyx_v_neighv.strides[1]) ))) == __pyx_v_like_inf); + __pyx_t_10 = __pyx_v_i; + __pyx_t_12 = __pyx_v_j; + __pyx_t_11 = ((*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_10 * __pyx_v_neighv.strides[0]) ) + __pyx_t_12 * __pyx_v_neighv.strides[1]) ))) == __pyx_v_like_inf); if (__pyx_t_11) { - /* "meshCalcUnix.pyx":673 + /* "meshCalcUnix.pyx":676 * for j in range(npere): * if neighv[i,j] == like_inf: # replace outside values with -1 * neighv[i,j] = -1 # <<<<<<<<<<<<<< * return neigh * */ - __pyx_t_10 = __pyx_v_i; - __pyx_t_9 = __pyx_v_j; - *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_10 * __pyx_v_neighv.strides[0]) ) + __pyx_t_9 * __pyx_v_neighv.strides[1]) )) = -1LL; + __pyx_t_12 = __pyx_v_i; + __pyx_t_10 = __pyx_v_j; + *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neighv.data + __pyx_t_12 * __pyx_v_neighv.strides[0]) ) + __pyx_t_10 * __pyx_v_neighv.strides[1]) )) = -1LL; - /* "meshCalcUnix.pyx":672 + /* "meshCalcUnix.pyx":675 * sortInt(neigh[i,:],npere) # sort in that part of the row * for j in range(npere): * if neighv[i,j] == like_inf: # replace outside values with -1 # <<<<<<<<<<<<<< @@ -30600,7 +30662,7 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se } } - /* "meshCalcUnix.pyx":674 + /* "meshCalcUnix.pyx":677 * if neighv[i,j] == like_inf: # replace outside values with -1 * neighv[i,j] = -1 * return neigh # <<<<<<<<<<<<<< @@ -30617,15 +30679,15 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) - * def sortNeigh(np.ndarray[long long, ndim=2] neigh): + * def sortNeigh(np.ndarray[long long, ndim=2] neigh, long[:] zone): */ /* function exit code */ __pyx_L1_error:; __PYX_XCLEAR_MEMVIEW(&__pyx_t_2, 1); - __Pyx_XDECREF(__pyx_t_12); - __Pyx_XDECREF(__pyx_t_13); - __PYX_XCLEAR_MEMVIEW(&__pyx_t_14, 1); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_15); + __PYX_XCLEAR_MEMVIEW(&__pyx_t_16, 1); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -30644,7 +30706,7 @@ static PyObject *__pyx_pf_8meshCalc_16sortNeigh(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "meshCalcUnix.pyx":677 +/* "meshCalcUnix.pyx":680 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -30709,7 +30771,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -30717,14 +30779,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("splitTri", 1, 2, 2, 1); __PYX_ERR(0, 677, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("splitTri", 1, 2, 2, 1); __PYX_ERR(0, 680, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "splitTri") < 0)) __PYX_ERR(0, 677, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "splitTri") < 0)) __PYX_ERR(0, 680, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -30732,12 +30794,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 679, __pyx_L3_error) - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 679, __pyx_L3_error) + __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 682, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 682, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("splitTri", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 677, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("splitTri", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 680, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -30886,16 +30948,16 @@ static PyObject *__pyx_pf_8meshCalc_18splitTri(CYTHON_UNUSED PyObject *__pyx_sel __pyx_pybuffernd_node_out.data = NULL; __pyx_pybuffernd_node_out.rcbuffer = &__pyx_pybuffer_node_out; - /* "meshCalcUnix.pyx":696 + /* "meshCalcUnix.pyx":699 * """ * #define variables * cdef double[:] node_x = np.asarray(node[:,0], dtype=float) # <<<<<<<<<<<<<< * cdef double[:] node_y = np.asarray(node[:,1], dtype=float) * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -30911,39 +30973,39 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) +__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 696, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_node_x = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":697 + /* "meshCalcUnix.pyx":700 * #define variables * cdef double[:] node_x = np.asarray(node[:,0], dtype=float) * cdef double[:] node_y = np.asarray(node[:,1], dtype=float) # <<<<<<<<<<<<<< * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -30959,39 +31021,39 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) +__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 697, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 700, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_node_y = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":698 + /* "meshCalcUnix.pyx":701 * cdef double[:] node_x = np.asarray(node[:,0], dtype=float) * cdef double[:] node_y = np.asarray(node[:,1], dtype=float) * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) # <<<<<<<<<<<<<< * * #loop variables */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -31007,167 +31069,167 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) +__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 698, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 698, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_node_z = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":701 + /* "meshCalcUnix.pyx":704 * * #loop variables * cdef double[:] x = np.zeros(3,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] y = np.zeros(3,dtype=float) * cdef double[:] z = np.zeros(3,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 701, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_x = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":702 + /* "meshCalcUnix.pyx":705 * #loop variables * cdef double[:] x = np.zeros(3,dtype=float) * cdef double[:] y = np.zeros(3,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] z = np.zeros(3,dtype=float) * cdef long long[:] n = np.zeros(6,dtype=np.int64) # new node numbers */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 702, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__13, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_y = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":703 + /* "meshCalcUnix.pyx":706 * cdef double[:] x = np.zeros(3,dtype=float) * cdef double[:] y = np.zeros(3,dtype=float) * cdef double[:] z = np.zeros(3,dtype=float) # <<<<<<<<<<<<<< * cdef long long[:] n = np.zeros(6,dtype=np.int64) # new node numbers * cdef float mx, my, mz */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 703, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 703, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__13, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 703, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_z = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":704 + /* "meshCalcUnix.pyx":707 * cdef double[:] y = np.zeros(3,dtype=float) * cdef double[:] z = np.zeros(3,dtype=float) * cdef long long[:] n = np.zeros(6,dtype=np.int64) # new node numbers # <<<<<<<<<<<<<< * cdef float mx, my, mz * cdef long long[:] nodes = np.zeros(2,dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 704, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 704, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__16, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__16, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":706 + /* "meshCalcUnix.pyx":709 * cdef long long[:] n = np.zeros(6,dtype=np.int64) # new node numbers * cdef float mx, my, mz * cdef long long[:] nodes = np.zeros(2,dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long mn * cdef int i, j, nno, tmpi, search */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 706, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 709, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nodes = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":711 + /* "meshCalcUnix.pyx":714 * * #node handling * cdef int num_nodes = len(node_x) # number of nodes # <<<<<<<<<<<<<< @@ -31177,7 +31239,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_node_x); __pyx_v_num_nodes = __pyx_t_7; - /* "meshCalcUnix.pyx":712 + /* "meshCalcUnix.pyx":715 * #node handling * cdef int num_nodes = len(node_x) # number of nodes * cdef int numel = connection.shape[0] # number of elements # <<<<<<<<<<<<<< @@ -31186,48 +31248,48 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_numel = (__pyx_v_connection.shape[0]); - /* "meshCalcUnix.pyx":715 + /* "meshCalcUnix.pyx":718 * * #matrices * cdef np.ndarray[long long, ndim=2] new_connection = np.zeros((numel*4,3),dtype = int) # new connection matrix # <<<<<<<<<<<<<< * cdef long long[:,:] new_connectionv = new_connection # memory view * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_long((__pyx_v_numel * 4)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_long((__pyx_v_numel * 4)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_3)) __PYX_ERR(0, 715, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_3)) __PYX_ERR(0, 718, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __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, 715, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 715, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 718, __pyx_L1_error) __pyx_t_8 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_connection.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_new_connection = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 715, __pyx_L1_error) + __PYX_ERR(0, 718, __pyx_L1_error) } else {__pyx_pybuffernd_new_connection.diminfo[0].strides = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_connection.diminfo[0].shape = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_new_connection.diminfo[1].strides = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_new_connection.diminfo[1].shape = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.shape[1]; } } @@ -31235,60 +31297,60 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_new_connection = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":716 + /* "meshCalcUnix.pyx":719 * #matrices * cdef np.ndarray[long long, ndim=2] new_connection = np.zeros((numel*4,3),dtype = int) # new connection matrix * cdef long long[:,:] new_connectionv = new_connection # memory view # <<<<<<<<<<<<<< * * cdef np.ndarray[double, ndim=2] new_node = np.zeros((numel*3,3), dtype=float) */ - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_new_connection), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 716, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_new_connection), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 719, __pyx_L1_error) __pyx_v_new_connectionv = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":718 + /* "meshCalcUnix.pyx":721 * cdef long long[:,:] new_connectionv = new_connection # memory view * * cdef np.ndarray[double, ndim=2] new_node = np.zeros((numel*3,3), dtype=float) # <<<<<<<<<<<<<< * cdef np.ndarray[long long, ndim=1] new_node_idx = np.zeros(numel*3, dtype=np.int64) * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*3,dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_numel * 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_numel * 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 721, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 718, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 718, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 718, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __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; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 718, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 721, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_node.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_new_node = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_new_node.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 718, __pyx_L1_error) + __PYX_ERR(0, 721, __pyx_L1_error) } else {__pyx_pybuffernd_new_node.diminfo[0].strides = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_node.diminfo[0].shape = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_new_node.diminfo[1].strides = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_new_node.diminfo[1].shape = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.shape[1]; } } @@ -31296,46 +31358,46 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_new_node = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":719 + /* "meshCalcUnix.pyx":722 * * cdef np.ndarray[double, ndim=2] new_node = np.zeros((numel*3,3), dtype=float) * cdef np.ndarray[long long, ndim=1] new_node_idx = np.zeros(numel*3, dtype=np.int64) # <<<<<<<<<<<<<< * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*3,dtype=np.int64) * cdef double[:,:] new_nodev = new_node */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_v_numel * 3)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_v_numel * 3)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 719, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 719, __pyx_L1_error) + if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 722, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_new_node_idx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 719, __pyx_L1_error) + __PYX_ERR(0, 722, __pyx_L1_error) } else {__pyx_pybuffernd_new_node_idx.diminfo[0].strides = __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_node_idx.diminfo[0].shape = __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.shape[0]; } } @@ -31343,46 +31405,46 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_new_node_idx = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; - /* "meshCalcUnix.pyx":720 + /* "meshCalcUnix.pyx":723 * cdef np.ndarray[double, ndim=2] new_node = np.zeros((numel*3,3), dtype=float) * cdef np.ndarray[long long, ndim=1] new_node_idx = np.zeros(numel*3, dtype=np.int64) * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*3,dtype=np.int64) # <<<<<<<<<<<<<< * cdef double[:,:] new_nodev = new_node * cdef long long[:] og_el_idv = og_el_id */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_numel * 3)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_numel * 3)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11)) __PYX_ERR(0, 720, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11)) __PYX_ERR(0, 723, __pyx_L1_error); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 720, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 720, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 720, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 723, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_og_el_id.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_og_el_id = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_og_el_id.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 720, __pyx_L1_error) + __PYX_ERR(0, 723, __pyx_L1_error) } else {__pyx_pybuffernd_og_el_id.diminfo[0].strides = __pyx_pybuffernd_og_el_id.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_og_el_id.diminfo[0].shape = __pyx_pybuffernd_og_el_id.rcbuffer->pybuffer.shape[0]; } } @@ -31390,235 +31452,235 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_og_el_id = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":721 + /* "meshCalcUnix.pyx":724 * cdef np.ndarray[long long, ndim=1] new_node_idx = np.zeros(numel*3, dtype=np.int64) * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*3,dtype=np.int64) * cdef double[:,:] new_nodev = new_node # <<<<<<<<<<<<<< * cdef long long[:] og_el_idv = og_el_id * */ - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_new_node), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_new_node), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 724, __pyx_L1_error) __pyx_v_new_nodev = __pyx_t_14; __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - /* "meshCalcUnix.pyx":722 + /* "meshCalcUnix.pyx":725 * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*3,dtype=np.int64) * cdef double[:,:] new_nodev = new_node * cdef long long[:] og_el_idv = og_el_id # <<<<<<<<<<<<<< * * cdef int pad = len(str(num_nodes))+1 */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_og_el_id), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 722, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_og_el_id), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 725, __pyx_L1_error) __pyx_v_og_el_idv = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":724 + /* "meshCalcUnix.pyx":727 * cdef long long[:] og_el_idv = og_el_id * * cdef int pad = len(str(num_nodes))+1 # <<<<<<<<<<<<<< * * cdef long long[:] a = np.array([0,1,2],dtype=np.int64) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 724, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_t_11); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_v_pad = (__pyx_t_7 + 1); - /* "meshCalcUnix.pyx":726 + /* "meshCalcUnix.pyx":729 * cdef int pad = len(str(num_nodes))+1 * * cdef long long[:] a = np.array([0,1,2],dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long[:] b = np.array([1,2,0],dtype=np.int64) * */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 726, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0)) __PYX_ERR(0, 726, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_0)) __PYX_ERR(0, 729, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 1, __pyx_int_1)) __PYX_ERR(0, 726, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 1, __pyx_int_1)) __PYX_ERR(0, 729, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 2, __pyx_int_2)) __PYX_ERR(0, 726, __pyx_L1_error); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 2, __pyx_int_2)) __PYX_ERR(0, 729, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11)) __PYX_ERR(0, 726, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11)) __PYX_ERR(0, 729, __pyx_L1_error); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 726, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 726, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 729, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_a = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":727 + /* "meshCalcUnix.pyx":730 * * cdef long long[:] a = np.array([0,1,2],dtype=np.int64) * cdef long long[:] b = np.array([1,2,0],dtype=np.int64) # <<<<<<<<<<<<<< * * #remap the element nodes with this matrix */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 727, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 730, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 727, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 730, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_0)) __PYX_ERR(0, 727, __pyx_L1_error); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_0)) __PYX_ERR(0, 730, __pyx_L1_error); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 727, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_b = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":730 + /* "meshCalcUnix.pyx":733 * * #remap the element nodes with this matrix * cdef list remap = [[0, 5, 3], # <<<<<<<<<<<<<< * [1, 4, 3], * [2, 5, 4], */ - __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error) + __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 730, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 733, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_5)) __PYX_ERR(0, 730, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_5)) __PYX_ERR(0, 733, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_3)) __PYX_ERR(0, 730, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_3)) __PYX_ERR(0, 733, __pyx_L1_error); - /* "meshCalcUnix.pyx":731 + /* "meshCalcUnix.pyx":734 * #remap the element nodes with this matrix * cdef list remap = [[0, 5, 3], * [1, 4, 3], # <<<<<<<<<<<<<< * [2, 5, 4], * [3, 4, 5]] */ - __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 731, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 734, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_4)) __PYX_ERR(0, 731, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_4)) __PYX_ERR(0, 734, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_3)) __PYX_ERR(0, 731, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_3)) __PYX_ERR(0, 734, __pyx_L1_error); - /* "meshCalcUnix.pyx":732 + /* "meshCalcUnix.pyx":735 * cdef list remap = [[0, 5, 3], * [1, 4, 3], * [2, 5, 4], # <<<<<<<<<<<<<< * [3, 4, 5]] * cdef long long[:,:] remapv = np.asarray(remap,dtype=np.int64) */ - __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 732, __pyx_L1_error) + __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2)) __PYX_ERR(0, 732, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_2)) __PYX_ERR(0, 735, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_5)) __PYX_ERR(0, 732, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_5)) __PYX_ERR(0, 735, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_4)) __PYX_ERR(0, 732, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_4)) __PYX_ERR(0, 735, __pyx_L1_error); - /* "meshCalcUnix.pyx":733 + /* "meshCalcUnix.pyx":736 * [1, 4, 3], * [2, 5, 4], * [3, 4, 5]] # <<<<<<<<<<<<<< * cdef long long[:,:] remapv = np.asarray(remap,dtype=np.int64) * */ - __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 733, __pyx_L1_error) + __pyx_t_11 = PyList_New(3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_3)) __PYX_ERR(0, 733, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 0, __pyx_int_3)) __PYX_ERR(0, 736, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 1, __pyx_int_4)) __PYX_ERR(0, 733, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 1, __pyx_int_4)) __PYX_ERR(0, 736, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 2, __pyx_int_5)) __PYX_ERR(0, 733, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_11, 2, __pyx_int_5)) __PYX_ERR(0, 736, __pyx_L1_error); - /* "meshCalcUnix.pyx":730 + /* "meshCalcUnix.pyx":733 * * #remap the element nodes with this matrix * cdef list remap = [[0, 5, 3], # <<<<<<<<<<<<<< * [1, 4, 3], * [2, 5, 4], */ - __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error) + __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 730, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 733, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_4)) __PYX_ERR(0, 730, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_t_4)) __PYX_ERR(0, 733, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_11)) __PYX_ERR(0, 730, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_t_11)) __PYX_ERR(0, 733, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_2 = 0; @@ -31626,44 +31688,44 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_remap = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":734 + /* "meshCalcUnix.pyx":737 * [2, 5, 4], * [3, 4, 5]] * cdef long long[:,:] remapv = np.asarray(remap,dtype=np.int64) # <<<<<<<<<<<<<< * * ### loop through the elements ### all possible node configurations */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_remap); __Pyx_GIVEREF(__pyx_v_remap); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_remap)) __PYX_ERR(0, 734, __pyx_L1_error); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_remap)) __PYX_ERR(0, 737, __pyx_L1_error); + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 734, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 737, __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_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 734, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_remapv = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":737 + /* "meshCalcUnix.pyx":740 * * ### loop through the elements ### all possible node configurations * for i in range(numel): # <<<<<<<<<<<<<< @@ -31675,7 +31737,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; - /* "meshCalcUnix.pyx":738 + /* "meshCalcUnix.pyx":741 * ### loop through the elements ### all possible node configurations * for i in range(numel): * for j in range(3): # <<<<<<<<<<<<<< @@ -31685,7 +31747,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 3; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":739 + /* "meshCalcUnix.pyx":742 * for i in range(numel): * for j in range(3): * nno = connection[i,j] # node number # <<<<<<<<<<<<<< @@ -31696,7 +31758,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = __pyx_v_j; __pyx_v_nno = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_19 * __pyx_v_connection.strides[0]) ) + __pyx_t_20 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":740 + /* "meshCalcUnix.pyx":743 * for j in range(3): * nno = connection[i,j] # node number * x[j] = node_x[nno] # <<<<<<<<<<<<<< @@ -31707,7 +31769,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_19 * __pyx_v_x.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_x.data + __pyx_t_20 * __pyx_v_node_x.strides[0]) ))); - /* "meshCalcUnix.pyx":741 + /* "meshCalcUnix.pyx":744 * nno = connection[i,j] # node number * x[j] = node_x[nno] * y[j] = node_y[nno] # <<<<<<<<<<<<<< @@ -31718,7 +31780,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_19 * __pyx_v_y.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_y.data + __pyx_t_20 * __pyx_v_node_y.strides[0]) ))); - /* "meshCalcUnix.pyx":742 + /* "meshCalcUnix.pyx":745 * x[j] = node_x[nno] * y[j] = node_y[nno] * z[j] = node_z[nno] # <<<<<<<<<<<<<< @@ -31729,7 +31791,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_19 * __pyx_v_z.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_z.data + __pyx_t_20 * __pyx_v_node_z.strides[0]) ))); - /* "meshCalcUnix.pyx":743 + /* "meshCalcUnix.pyx":746 * y[j] = node_y[nno] * z[j] = node_z[nno] * n[j] = nno # <<<<<<<<<<<<<< @@ -31740,7 +31802,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_20 * __pyx_v_n.strides[0]) )) = __pyx_v_nno; } - /* "meshCalcUnix.pyx":745 + /* "meshCalcUnix.pyx":748 * n[j] = nno * * tmpi = 3*i # <<<<<<<<<<<<<< @@ -31749,7 +31811,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_tmpi = (3 * __pyx_v_i); - /* "meshCalcUnix.pyx":746 + /* "meshCalcUnix.pyx":749 * * tmpi = 3*i * for j in range(3): # <<<<<<<<<<<<<< @@ -31759,7 +31821,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 3; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":747 + /* "meshCalcUnix.pyx":750 * tmpi = 3*i * for j in range(3): * mx = (x[a[j]]+x[b[j]])/2 # <<<<<<<<<<<<<< @@ -31772,7 +31834,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_22 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_19 * __pyx_v_b.strides[0]) ))); __pyx_v_mx = (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) )))) / 2.0); - /* "meshCalcUnix.pyx":748 + /* "meshCalcUnix.pyx":751 * for j in range(3): * mx = (x[a[j]]+x[b[j]])/2 * my = (y[a[j]]+y[b[j]])/2 # <<<<<<<<<<<<<< @@ -31785,7 +31847,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_21 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_20 * __pyx_v_b.strides[0]) ))); __pyx_v_my = (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_22 * __pyx_v_y.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) )))) / 2.0); - /* "meshCalcUnix.pyx":749 + /* "meshCalcUnix.pyx":752 * mx = (x[a[j]]+x[b[j]])/2 * my = (y[a[j]]+y[b[j]])/2 * mz = (z[a[j]]+z[b[j]])/2 # <<<<<<<<<<<<<< @@ -31798,7 +31860,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_22 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_19 * __pyx_v_b.strides[0]) ))); __pyx_v_mz = (((*((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_21 * __pyx_v_z.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_22 * __pyx_v_z.strides[0]) )))) / 2.0); - /* "meshCalcUnix.pyx":751 + /* "meshCalcUnix.pyx":754 * mz = (z[a[j]]+z[b[j]])/2 * * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] # <<<<<<<<<<<<<< @@ -31814,16 +31876,16 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = 1; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_20 * __pyx_v_nodes.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_22 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":752 + /* "meshCalcUnix.pyx":755 * * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) # <<<<<<<<<<<<<< * mn = mergeInt(nodes[0],nodes[1],pad) * */ - __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 755, __pyx_L1_error) - /* "meshCalcUnix.pyx":753 + /* "meshCalcUnix.pyx":756 * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) * mn = mergeInt(nodes[0],nodes[1],pad) # <<<<<<<<<<<<<< @@ -31832,10 +31894,10 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_t_19 = 0; __pyx_t_20 = 1; - __pyx_t_22 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_19 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_20 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_22 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 753, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_19 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_20 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_22 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L1_error) __pyx_v_mn = __pyx_t_22; - /* "meshCalcUnix.pyx":755 + /* "meshCalcUnix.pyx":758 * mn = mergeInt(nodes[0],nodes[1],pad) * * new_nodev[tmpi+j,0] = mx # mid point of 2 respective nodes # <<<<<<<<<<<<<< @@ -31846,7 +31908,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_20 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_19 * __pyx_v_new_nodev.strides[1]) )) = __pyx_v_mx; - /* "meshCalcUnix.pyx":756 + /* "meshCalcUnix.pyx":759 * * new_nodev[tmpi+j,0] = mx # mid point of 2 respective nodes * new_nodev[tmpi+j,1] = my # <<<<<<<<<<<<<< @@ -31857,7 +31919,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_19 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_20 * __pyx_v_new_nodev.strides[1]) )) = __pyx_v_my; - /* "meshCalcUnix.pyx":757 + /* "meshCalcUnix.pyx":760 * new_nodev[tmpi+j,0] = mx # mid point of 2 respective nodes * new_nodev[tmpi+j,1] = my * new_nodev[tmpi+j,2] = mz # <<<<<<<<<<<<<< @@ -31868,7 +31930,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 2; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_20 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_19 * __pyx_v_new_nodev.strides[1]) )) = __pyx_v_mz; - /* "meshCalcUnix.pyx":758 + /* "meshCalcUnix.pyx":761 * new_nodev[tmpi+j,1] = my * new_nodev[tmpi+j,2] = mz * new_node_idx[tmpi+j] = mn # node combination # <<<<<<<<<<<<<< @@ -31878,7 +31940,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = (__pyx_v_tmpi + __pyx_v_j); *__Pyx_BufPtrStrided1d(PY_LONG_LONG *, __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_new_node_idx.diminfo[0].strides) = __pyx_v_mn; - /* "meshCalcUnix.pyx":759 + /* "meshCalcUnix.pyx":762 * new_nodev[tmpi+j,2] = mz * new_node_idx[tmpi+j] = mn # node combination * og_el_idv[tmpi+j] = i # <<<<<<<<<<<<<< @@ -31890,27 +31952,27 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":767 + /* "meshCalcUnix.pyx":770 * # cdef long long[:] uniclv = np.asarray(unicl,dtype=np.int64) * cdef np.ndarray[long long, ndim=1] idxa, unicl * unicl, idxa = np.unique(new_node_idx, return_index=True) # unique and ordered node configs # <<<<<<<<<<<<<< * cdef long long[:] node_id = np.arange(len(unicl)) + num_nodes * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unique); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_unique); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF((PyObject *)__pyx_v_new_node_idx); __Pyx_GIVEREF((PyObject *)__pyx_v_new_node_idx); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_new_node_idx))) __PYX_ERR(0, 767, __pyx_L1_error); - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_new_node_idx))) __PYX_ERR(0, 770, __pyx_L1_error); + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 767, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 767, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -31921,7 +31983,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 767, __pyx_L1_error) + __PYX_ERR(0, 770, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -31934,15 +31996,15 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { Py_ssize_t index = -1; - __pyx_t_2 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_23 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); @@ -31950,7 +32012,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_5 = __pyx_t_23(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_23(__pyx_t_2), 2) < 0) __PYX_ERR(0, 767, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_23(__pyx_t_2), 2) < 0) __PYX_ERR(0, 770, __pyx_L1_error) __pyx_t_23 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L10_unpacking_done; @@ -31958,11 +32020,11 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_23 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 767, __pyx_L1_error) + __PYX_ERR(0, 770, __pyx_L1_error) __pyx_L10_unpacking_done:; } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 767, __pyx_L1_error) - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 767, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 770, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 770, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -31979,7 +32041,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_25 = __pyx_t_26 = __pyx_t_27 = 0; } __pyx_pybuffernd_unicl.diminfo[0].strides = __pyx_pybuffernd_unicl.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_unicl.diminfo[0].shape = __pyx_pybuffernd_unicl.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 767, __pyx_L1_error) + if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 770, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_unicl = ((PyArrayObject *)__pyx_t_1); @@ -32000,26 +32062,26 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_27 = __pyx_t_26 = __pyx_t_25 = 0; } __pyx_pybuffernd_idxa.diminfo[0].strides = __pyx_pybuffernd_idxa.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idxa.diminfo[0].shape = __pyx_pybuffernd_idxa.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 767, __pyx_L1_error) + if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 770, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_idxa = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":768 + /* "meshCalcUnix.pyx":771 * cdef np.ndarray[long long, ndim=1] idxa, unicl * unicl, idxa = np.unique(new_node_idx, return_index=True) # unique and ordered node configs * cdef long long[:] node_id = np.arange(len(unicl)) + num_nodes # <<<<<<<<<<<<<< * * ### map back to elements #### */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_arange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_arange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_unicl)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 768, __pyx_L1_error) - __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_unicl)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; __pyx_t_15 = 0; @@ -32040,23 +32102,23 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 768, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyNumber_Add(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_node_id = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":771 + /* "meshCalcUnix.pyx":774 * * ### map back to elements #### * for i in range(numel): # <<<<<<<<<<<<<< @@ -32068,7 +32130,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; - /* "meshCalcUnix.pyx":772 + /* "meshCalcUnix.pyx":775 * ### map back to elements #### * for i in range(numel): * for j in range(3): # <<<<<<<<<<<<<< @@ -32078,7 +32140,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 3; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":773 + /* "meshCalcUnix.pyx":776 * for i in range(numel): * for j in range(3): * nno = connection[i,j] # node number # <<<<<<<<<<<<<< @@ -32089,7 +32151,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = __pyx_v_j; __pyx_v_nno = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_19 * __pyx_v_connection.strides[0]) ) + __pyx_t_20 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":774 + /* "meshCalcUnix.pyx":777 * for j in range(3): * nno = connection[i,j] # node number * n[j] = nno # <<<<<<<<<<<<<< @@ -32100,7 +32162,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_20 * __pyx_v_n.strides[0]) )) = __pyx_v_nno; } - /* "meshCalcUnix.pyx":776 + /* "meshCalcUnix.pyx":779 * n[j] = nno * * for j in range(3): # <<<<<<<<<<<<<< @@ -32110,7 +32172,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 3; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":777 + /* "meshCalcUnix.pyx":780 * * for j in range(3): * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] # <<<<<<<<<<<<<< @@ -32126,16 +32188,16 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 1; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_19 * __pyx_v_nodes.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_22 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":778 + /* "meshCalcUnix.pyx":781 * for j in range(3): * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) # <<<<<<<<<<<<<< * mn = mergeInt(nodes[0],nodes[1],pad) * search = bisection_search(unicl,mn) */ - __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L1_error) + __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 781, __pyx_L1_error) - /* "meshCalcUnix.pyx":779 + /* "meshCalcUnix.pyx":782 * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) * mn = mergeInt(nodes[0],nodes[1],pad) # <<<<<<<<<<<<<< @@ -32144,23 +32206,23 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_t_20 = 0; __pyx_t_19 = 1; - __pyx_t_22 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_20 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_19 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_22 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_20 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_19 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_22 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error) __pyx_v_mn = __pyx_t_22; - /* "meshCalcUnix.pyx":780 + /* "meshCalcUnix.pyx":783 * sortInt(nodes,2) * mn = mergeInt(nodes[0],nodes[1],pad) * search = bisection_search(unicl,mn) # <<<<<<<<<<<<<< * * n[j+3] = node_id[search]#reference index */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_unicl), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 780, __pyx_L1_error) - __pyx_t_28 = __pyx_f_8meshCalc_bisection_search(__pyx_t_6, __pyx_v_mn); if (unlikely(__pyx_t_28 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_unicl), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 783, __pyx_L1_error) + __pyx_t_28 = __pyx_f_8meshCalc_bisection_search(__pyx_t_6, __pyx_v_mn); if (unlikely(__pyx_t_28 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 783, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; __pyx_v_search = __pyx_t_28; - /* "meshCalcUnix.pyx":782 + /* "meshCalcUnix.pyx":785 * search = bisection_search(unicl,mn) * * n[j+3] = node_id[search]#reference index # <<<<<<<<<<<<<< @@ -32172,7 +32234,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_20 * __pyx_v_n.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_node_id.data + __pyx_t_19 * __pyx_v_node_id.strides[0]) ))); } - /* "meshCalcUnix.pyx":784 + /* "meshCalcUnix.pyx":787 * n[j+3] = node_id[search]#reference index * * tmpi = i*4 # temporary index for indexing new connection matrix # <<<<<<<<<<<<<< @@ -32181,7 +32243,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_tmpi = (__pyx_v_i * 4); - /* "meshCalcUnix.pyx":785 + /* "meshCalcUnix.pyx":788 * * tmpi = i*4 # temporary index for indexing new connection matrix * for j in range(4): # <<<<<<<<<<<<<< @@ -32191,7 +32253,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 4; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":786 + /* "meshCalcUnix.pyx":789 * tmpi = i*4 # temporary index for indexing new connection matrix * for j in range(4): * new_connectionv[tmpi+j,0] = n[remapv[j,0]] # <<<<<<<<<<<<<< @@ -32205,7 +32267,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_30 = 0; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_connectionv.data + __pyx_t_29 * __pyx_v_new_connectionv.strides[0]) ) + __pyx_t_30 * __pyx_v_new_connectionv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_22 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":787 + /* "meshCalcUnix.pyx":790 * for j in range(4): * new_connectionv[tmpi+j,0] = n[remapv[j,0]] * new_connectionv[tmpi+j,1] = n[remapv[j,1]] # <<<<<<<<<<<<<< @@ -32219,7 +32281,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_29 = 1; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_connectionv.data + __pyx_t_30 * __pyx_v_new_connectionv.strides[0]) ) + __pyx_t_29 * __pyx_v_new_connectionv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_22 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":788 + /* "meshCalcUnix.pyx":791 * new_connectionv[tmpi+j,0] = n[remapv[j,0]] * new_connectionv[tmpi+j,1] = n[remapv[j,1]] * new_connectionv[tmpi+j,2] = n[remapv[j,2]] # <<<<<<<<<<<<<< @@ -32235,58 +32297,58 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":791 + /* "meshCalcUnix.pyx":794 * * ### make new node matrix ### * cdef int added_nodes = len(idxa) # <<<<<<<<<<<<<< * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) * cdef double[:,:] node_outv = node_out */ - __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_idxa)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 791, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_idxa)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 794, __pyx_L1_error) __pyx_v_added_nodes = __pyx_t_7; - /* "meshCalcUnix.pyx":792 + /* "meshCalcUnix.pyx":795 * ### make new node matrix ### * cdef int added_nodes = len(idxa) * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) # <<<<<<<<<<<<<< * cdef double[:,:] node_outv = node_out * for i in range(num_nodes): */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 792, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(0, 792, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_3)) __PYX_ERR(0, 792, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_int_3)) __PYX_ERR(0, 795, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11)) __PYX_ERR(0, 792, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11)) __PYX_ERR(0, 795, __pyx_L1_error); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 792, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 792, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 795, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 792, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 795, __pyx_L1_error) __pyx_t_31 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_31, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_node_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_out.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 792, __pyx_L1_error) + __PYX_ERR(0, 795, __pyx_L1_error) } else {__pyx_pybuffernd_node_out.diminfo[0].strides = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_out.diminfo[0].shape = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_node_out.diminfo[1].strides = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_node_out.diminfo[1].shape = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.shape[1]; } } @@ -32294,19 +32356,19 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_node_out = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":793 + /* "meshCalcUnix.pyx":796 * cdef int added_nodes = len(idxa) * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) * cdef double[:,:] node_outv = node_out # <<<<<<<<<<<<<< * for i in range(num_nodes): * node_outv[i,0] = node_x[i] */ - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_node_out), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 793, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_node_out), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 796, __pyx_L1_error) __pyx_v_node_outv = __pyx_t_14; __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - /* "meshCalcUnix.pyx":794 + /* "meshCalcUnix.pyx":797 * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) * cdef double[:,:] node_outv = node_out * for i in range(num_nodes): # <<<<<<<<<<<<<< @@ -32318,7 +32380,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; - /* "meshCalcUnix.pyx":795 + /* "meshCalcUnix.pyx":798 * cdef double[:,:] node_outv = node_out * for i in range(num_nodes): * node_outv[i,0] = node_x[i] # <<<<<<<<<<<<<< @@ -32330,7 +32392,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_30 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_19 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_30 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_x.data + __pyx_t_20 * __pyx_v_node_x.strides[0]) ))); - /* "meshCalcUnix.pyx":796 + /* "meshCalcUnix.pyx":799 * for i in range(num_nodes): * node_outv[i,0] = node_x[i] * node_outv[i,1] = node_y[i] # <<<<<<<<<<<<<< @@ -32342,7 +32404,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_30 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_19 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_y.data + __pyx_t_20 * __pyx_v_node_y.strides[0]) ))); - /* "meshCalcUnix.pyx":797 + /* "meshCalcUnix.pyx":800 * node_outv[i,0] = node_x[i] * node_outv[i,1] = node_y[i] * node_outv[i,2] = node_z[i] # <<<<<<<<<<<<<< @@ -32355,7 +32417,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_19 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_30 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_z.data + __pyx_t_20 * __pyx_v_node_z.strides[0]) ))); } - /* "meshCalcUnix.pyx":798 + /* "meshCalcUnix.pyx":801 * node_outv[i,1] = node_y[i] * node_outv[i,2] = node_z[i] * for i in range(added_nodes): # <<<<<<<<<<<<<< @@ -32367,7 +32429,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; - /* "meshCalcUnix.pyx":799 + /* "meshCalcUnix.pyx":802 * node_outv[i,2] = node_z[i] * for i in range(added_nodes): * j = i + num_nodes # <<<<<<<<<<<<<< @@ -32376,7 +32438,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_j = (__pyx_v_i + __pyx_v_num_nodes); - /* "meshCalcUnix.pyx":800 + /* "meshCalcUnix.pyx":803 * for i in range(added_nodes): * j = i + num_nodes * node_outv[j,0] = new_nodev[idxa[i],0] # <<<<<<<<<<<<<< @@ -32390,7 +32452,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_29 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_19 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_29 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_22 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_30 * __pyx_v_new_nodev.strides[1]) ))); - /* "meshCalcUnix.pyx":801 + /* "meshCalcUnix.pyx":804 * j = i + num_nodes * node_outv[j,0] = new_nodev[idxa[i],0] * node_outv[j,1] = new_nodev[idxa[i],1] # <<<<<<<<<<<<<< @@ -32404,7 +32466,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_29 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_19 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_22 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_30 * __pyx_v_new_nodev.strides[1]) ))); - /* "meshCalcUnix.pyx":802 + /* "meshCalcUnix.pyx":805 * node_outv[j,0] = new_nodev[idxa[i],0] * node_outv[j,1] = new_nodev[idxa[i],1] * node_outv[j,2] = new_nodev[idxa[i],2] # <<<<<<<<<<<<<< @@ -32419,7 +32481,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_19 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_29 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_22 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_30 * __pyx_v_new_nodev.strides[1]) ))); } - /* "meshCalcUnix.pyx":804 + /* "meshCalcUnix.pyx":807 * node_outv[j,2] = new_nodev[idxa[i],2] * * return new_connection, node_out, numel*4, num_nodes + added_nodes # <<<<<<<<<<<<<< @@ -32427,29 +32489,29 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_numel * 4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_numel * 4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF((PyObject *)__pyx_v_new_connection); __Pyx_GIVEREF((PyObject *)__pyx_v_new_connection); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_new_connection))) __PYX_ERR(0, 804, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_new_connection))) __PYX_ERR(0, 807, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_node_out); __Pyx_GIVEREF((PyObject *)__pyx_v_node_out); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_node_out))) __PYX_ERR(0, 804, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_node_out))) __PYX_ERR(0, 807, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_11); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_11)) __PYX_ERR(0, 804, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_11)) __PYX_ERR(0, 807, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_11 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":677 + /* "meshCalcUnix.pyx":680 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -32521,7 +32583,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p return __pyx_r; } -/* "meshCalcUnix.pyx":806 +/* "meshCalcUnix.pyx":809 * return new_connection, node_out, numel*4, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -32586,7 +32648,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -32594,14 +32656,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 806, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("splitTetra", 1, 2, 2, 1); __PYX_ERR(0, 806, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("splitTetra", 1, 2, 2, 1); __PYX_ERR(0, 809, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "splitTetra") < 0)) __PYX_ERR(0, 806, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "splitTetra") < 0)) __PYX_ERR(0, 809, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -32609,12 +32671,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 808, __pyx_L3_error) - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 808, __pyx_L3_error) + __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 811, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 811, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("splitTetra", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 806, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("splitTetra", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 809, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -32767,16 +32829,16 @@ static PyObject *__pyx_pf_8meshCalc_20splitTetra(CYTHON_UNUSED PyObject *__pyx_s __pyx_pybuffernd_node_out.data = NULL; __pyx_pybuffernd_node_out.rcbuffer = &__pyx_pybuffer_node_out; - /* "meshCalcUnix.pyx":825 + /* "meshCalcUnix.pyx":828 * """ * #define vars * cdef double[:] node_x = np.asarray(node[:,0], dtype=float) # <<<<<<<<<<<<<< * cdef double[:] node_y = np.asarray(node[:,1], dtype=float) * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -32792,39 +32854,39 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) +__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 825, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 825, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_node_x = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":826 + /* "meshCalcUnix.pyx":829 * #define vars * cdef double[:] node_x = np.asarray(node[:,0], dtype=float) * cdef double[:] node_y = np.asarray(node[:,1], dtype=float) # <<<<<<<<<<<<<< * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) * cdef double[:] x = np.zeros(4,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -32840,39 +32902,39 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error) +__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 826, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_node_y = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":827 + /* "meshCalcUnix.pyx":830 * cdef double[:] node_x = np.asarray(node[:,0], dtype=float) * cdef double[:] node_y = np.asarray(node[:,1], dtype=float) * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) # <<<<<<<<<<<<<< * cdef double[:] x = np.zeros(4,dtype=float) * cdef double[:] y = np.zeros(4,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -32888,167 +32950,167 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error) +__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 827, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_node_z = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":828 + /* "meshCalcUnix.pyx":831 * cdef double[:] node_y = np.asarray(node[:,1], dtype=float) * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) * cdef double[:] x = np.zeros(4,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] y = np.zeros(4,dtype=float) * cdef double[:] z = np.zeros(4,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 828, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__15, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__15, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 831, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_x = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":829 + /* "meshCalcUnix.pyx":832 * cdef double[:] node_z = np.asarray(node[:,2], dtype=float) * cdef double[:] x = np.zeros(4,dtype=float) * cdef double[:] y = np.zeros(4,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] z = np.zeros(4,dtype=float) * cdef long long[:] n = np.zeros(10,dtype=np.int64) # new node numbers */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 829, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 832, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__15, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 829, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_y = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":830 + /* "meshCalcUnix.pyx":833 * cdef double[:] x = np.zeros(4,dtype=float) * cdef double[:] y = np.zeros(4,dtype=float) * cdef double[:] z = np.zeros(4,dtype=float) # <<<<<<<<<<<<<< * cdef long long[:] n = np.zeros(10,dtype=np.int64) # new node numbers * cdef double mx, my, mz */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 830, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_z = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":831 + /* "meshCalcUnix.pyx":834 * cdef double[:] y = np.zeros(4,dtype=float) * cdef double[:] z = np.zeros(4,dtype=float) * cdef long long[:] n = np.zeros(10,dtype=np.int64) # new node numbers # <<<<<<<<<<<<<< * cdef double mx, my, mz * cdef long long[:] nodes = np.zeros(2,dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 831, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 831, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__17, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__17, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_n = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":833 + /* "meshCalcUnix.pyx":836 * cdef long long[:] n = np.zeros(10,dtype=np.int64) # new node numbers * cdef double mx, my, mz * cdef long long[:] nodes = np.zeros(2,dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long mn * cdef int i, j, nno, tmpi, search #loop variables */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 833, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nodes = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":837 + /* "meshCalcUnix.pyx":840 * cdef int i, j, nno, tmpi, search #loop variables * * cdef int num_nodes = len(node_x) # <<<<<<<<<<<<<< @@ -33058,7 +33120,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_7 = __Pyx_MemoryView_Len(__pyx_v_node_x); __pyx_v_num_nodes = __pyx_t_7; - /* "meshCalcUnix.pyx":838 + /* "meshCalcUnix.pyx":841 * * cdef int num_nodes = len(node_x) * cdef int numel = connection.shape[0] # <<<<<<<<<<<<<< @@ -33067,54 +33129,54 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_numel = (__pyx_v_connection.shape[0]); - /* "meshCalcUnix.pyx":840 + /* "meshCalcUnix.pyx":843 * cdef int numel = connection.shape[0] * * cdef np.ndarray[long long, ndim=2] new_connection = np.zeros((numel*8,4),dtype=np.int64) # new connection matrix # <<<<<<<<<<<<<< * cdef long long[:,:] new_connectionv = new_connection * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_long((__pyx_v_numel * 8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_long((__pyx_v_numel * 8)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_4)) __PYX_ERR(0, 840, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_4)) __PYX_ERR(0, 843, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 840, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 840, __pyx_L1_error) + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 843, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_connection.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_new_connection = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 840, __pyx_L1_error) + __PYX_ERR(0, 843, __pyx_L1_error) } else {__pyx_pybuffernd_new_connection.diminfo[0].strides = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_connection.diminfo[0].shape = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_new_connection.diminfo[1].strides = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_new_connection.diminfo[1].shape = __pyx_pybuffernd_new_connection.rcbuffer->pybuffer.shape[1]; } } @@ -33122,60 +33184,60 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_new_connection = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; - /* "meshCalcUnix.pyx":841 + /* "meshCalcUnix.pyx":844 * * cdef np.ndarray[long long, ndim=2] new_connection = np.zeros((numel*8,4),dtype=np.int64) # new connection matrix * cdef long long[:,:] new_connectionv = new_connection # <<<<<<<<<<<<<< * * cdef np.ndarray[double, ndim=2] new_node = np.zeros((numel*6,3),dtype=float) # used to reference already computed node centres */ - __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_new_connection), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_new_connection), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 844, __pyx_L1_error) __pyx_v_new_connectionv = __pyx_t_10; __pyx_t_10.memview = NULL; __pyx_t_10.data = NULL; - /* "meshCalcUnix.pyx":843 + /* "meshCalcUnix.pyx":846 * cdef long long[:,:] new_connectionv = new_connection * * cdef np.ndarray[double, ndim=2] new_node = np.zeros((numel*6,3),dtype=float) # used to reference already computed node centres # <<<<<<<<<<<<<< * cdef np.ndarray[long long, ndim=1] new_node_idx = np.zeros(numel*6,dtype=np.int64) * */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_numel * 6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_long((__pyx_v_numel * 6)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 843, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 846, __pyx_L1_error); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 843, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 843, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 843, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 846, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_node.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_new_node = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_new_node.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 843, __pyx_L1_error) + __PYX_ERR(0, 846, __pyx_L1_error) } else {__pyx_pybuffernd_new_node.diminfo[0].strides = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_node.diminfo[0].shape = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_new_node.diminfo[1].strides = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_new_node.diminfo[1].shape = __pyx_pybuffernd_new_node.rcbuffer->pybuffer.shape[1]; } } @@ -33183,46 +33245,46 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_new_node = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":844 + /* "meshCalcUnix.pyx":847 * * cdef np.ndarray[double, ndim=2] new_node = np.zeros((numel*6,3),dtype=float) # used to reference already computed node centres * cdef np.ndarray[long long, ndim=1] new_node_idx = np.zeros(numel*6,dtype=np.int64) # <<<<<<<<<<<<<< * * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*6,dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_v_numel * 6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_long((__pyx_v_numel * 6)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 844, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 844, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 847, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_new_node_idx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 844, __pyx_L1_error) + __PYX_ERR(0, 847, __pyx_L1_error) } else {__pyx_pybuffernd_new_node_idx.diminfo[0].strides = __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_new_node_idx.diminfo[0].shape = __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.shape[0]; } } @@ -33230,46 +33292,46 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_new_node_idx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":846 + /* "meshCalcUnix.pyx":849 * cdef np.ndarray[long long, ndim=1] new_node_idx = np.zeros(numel*6,dtype=np.int64) * * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*6,dtype=np.int64) # <<<<<<<<<<<<<< * cdef double[:,:] new_nodev = new_node * cdef long long[:] og_el_idv = og_el_id */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_numel * 6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long((__pyx_v_numel * 6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 846, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 846, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 849, __pyx_L1_error) __pyx_t_13 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_og_el_id.rcbuffer->pybuffer, (PyObject*)__pyx_t_13, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_og_el_id = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_og_el_id.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 846, __pyx_L1_error) + __PYX_ERR(0, 849, __pyx_L1_error) } else {__pyx_pybuffernd_og_el_id.diminfo[0].strides = __pyx_pybuffernd_og_el_id.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_og_el_id.diminfo[0].shape = __pyx_pybuffernd_og_el_id.rcbuffer->pybuffer.shape[0]; } } @@ -33277,361 +33339,361 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_og_el_id = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":847 + /* "meshCalcUnix.pyx":850 * * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*6,dtype=np.int64) * cdef double[:,:] new_nodev = new_node # <<<<<<<<<<<<<< * cdef long long[:] og_el_idv = og_el_id * */ - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_new_node), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_new_node), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 850, __pyx_L1_error) __pyx_v_new_nodev = __pyx_t_14; __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - /* "meshCalcUnix.pyx":848 + /* "meshCalcUnix.pyx":851 * cdef np.ndarray[long long, ndim=1] og_el_id = np.zeros(numel*6,dtype=np.int64) * cdef double[:,:] new_nodev = new_node * cdef long long[:] og_el_idv = og_el_id # <<<<<<<<<<<<<< * * cdef int pad = len(str(num_nodes)) */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_og_el_id), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_og_el_id), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 851, __pyx_L1_error) __pyx_v_og_el_idv = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":850 + /* "meshCalcUnix.pyx":853 * cdef long long[:] og_el_idv = og_el_id * * cdef int pad = len(str(num_nodes)) # <<<<<<<<<<<<<< * * cdef long long[:] a = np.array([0,1,2,3,3,3],dtype=np.int64) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_pad = __pyx_t_7; - /* "meshCalcUnix.pyx":852 + /* "meshCalcUnix.pyx":855 * cdef int pad = len(str(num_nodes)) * * cdef long long[:] a = np.array([0,1,2,3,3,3],dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long[:] b = np.array([1,2,0,0,1,2],dtype=np.int64) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 852, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 855, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 852, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 855, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_2)) __PYX_ERR(0, 852, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_2)) __PYX_ERR(0, 855, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_3)) __PYX_ERR(0, 852, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_3)) __PYX_ERR(0, 855, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_3)) __PYX_ERR(0, 852, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_3)) __PYX_ERR(0, 855, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_3)) __PYX_ERR(0, 852, __pyx_L1_error); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 852, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_3)) __PYX_ERR(0, 855, __pyx_L1_error); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 852, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 852, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 852, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_a = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":853 + /* "meshCalcUnix.pyx":856 * * cdef long long[:] a = np.array([0,1,2,3,3,3],dtype=np.int64) * cdef long long[:] b = np.array([1,2,0,0,1,2],dtype=np.int64) # <<<<<<<<<<<<<< * * #remap the element nodes with this matrix */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_4 = PyList_New(6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 853, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_1)) __PYX_ERR(0, 856, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 853, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_2)) __PYX_ERR(0, 856, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_0)) __PYX_ERR(0, 853, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_0)) __PYX_ERR(0, 856, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_0)) __PYX_ERR(0, 853, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_0)) __PYX_ERR(0, 856, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_int_1)) __PYX_ERR(0, 853, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 4, __pyx_int_1)) __PYX_ERR(0, 856, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 5, __pyx_int_2)) __PYX_ERR(0, 853, __pyx_L1_error); - __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 853, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 5, __pyx_int_2)) __PYX_ERR(0, 856, __pyx_L1_error); + __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 853, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_b = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":856 + /* "meshCalcUnix.pyx":859 * * #remap the element nodes with this matrix * cdef list remap = [[4, 7, 6, 0], # <<<<<<<<<<<<<< * [5, 9, 6, 2], * [8, 9, 7, 3], */ - __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error) + __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_4)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_4)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_INCREF(__pyx_int_7); __Pyx_GIVEREF(__pyx_int_7); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_7)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_7)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_INCREF(__pyx_int_6); __Pyx_GIVEREF(__pyx_int_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_6)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_6)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_0)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_0)) __PYX_ERR(0, 859, __pyx_L1_error); - /* "meshCalcUnix.pyx":857 + /* "meshCalcUnix.pyx":860 * #remap the element nodes with this matrix * cdef list remap = [[4, 7, 6, 0], * [5, 9, 6, 2], # <<<<<<<<<<<<<< * [8, 9, 7, 3], * [8, 9, 7, 6], */ - __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 857, __pyx_L1_error) + __pyx_t_4 = PyList_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_5)) __PYX_ERR(0, 857, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 0, __pyx_int_5)) __PYX_ERR(0, 860, __pyx_L1_error); __Pyx_INCREF(__pyx_int_9); __Pyx_GIVEREF(__pyx_int_9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_9)) __PYX_ERR(0, 857, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 1, __pyx_int_9)) __PYX_ERR(0, 860, __pyx_L1_error); __Pyx_INCREF(__pyx_int_6); __Pyx_GIVEREF(__pyx_int_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_6)) __PYX_ERR(0, 857, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 2, __pyx_int_6)) __PYX_ERR(0, 860, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_2)) __PYX_ERR(0, 857, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_4, 3, __pyx_int_2)) __PYX_ERR(0, 860, __pyx_L1_error); - /* "meshCalcUnix.pyx":858 + /* "meshCalcUnix.pyx":861 * cdef list remap = [[4, 7, 6, 0], * [5, 9, 6, 2], * [8, 9, 7, 3], # <<<<<<<<<<<<<< * [8, 9, 7, 6], * [8, 4, 7, 6], */ - __pyx_t_8 = PyList_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_t_8 = PyList_New(4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_8); __Pyx_GIVEREF(__pyx_int_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_8)) __PYX_ERR(0, 858, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 0, __pyx_int_8)) __PYX_ERR(0, 861, __pyx_L1_error); __Pyx_INCREF(__pyx_int_9); __Pyx_GIVEREF(__pyx_int_9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_9)) __PYX_ERR(0, 858, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 1, __pyx_int_9)) __PYX_ERR(0, 861, __pyx_L1_error); __Pyx_INCREF(__pyx_int_7); __Pyx_GIVEREF(__pyx_int_7); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_int_7)) __PYX_ERR(0, 858, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 2, __pyx_int_7)) __PYX_ERR(0, 861, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 3, __pyx_int_3)) __PYX_ERR(0, 858, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_8, 3, __pyx_int_3)) __PYX_ERR(0, 861, __pyx_L1_error); - /* "meshCalcUnix.pyx":859 + /* "meshCalcUnix.pyx":862 * [5, 9, 6, 2], * [8, 9, 7, 3], * [8, 9, 7, 6], # <<<<<<<<<<<<<< * [8, 4, 7, 6], * [8, 5, 9, 6], */ - __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error) + __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_8); __Pyx_GIVEREF(__pyx_int_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_8)) __PYX_ERR(0, 859, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_8)) __PYX_ERR(0, 862, __pyx_L1_error); __Pyx_INCREF(__pyx_int_9); __Pyx_GIVEREF(__pyx_int_9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_9)) __PYX_ERR(0, 859, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_9)) __PYX_ERR(0, 862, __pyx_L1_error); __Pyx_INCREF(__pyx_int_7); __Pyx_GIVEREF(__pyx_int_7); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_7)) __PYX_ERR(0, 859, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_7)) __PYX_ERR(0, 862, __pyx_L1_error); __Pyx_INCREF(__pyx_int_6); __Pyx_GIVEREF(__pyx_int_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_6)) __PYX_ERR(0, 859, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_6)) __PYX_ERR(0, 862, __pyx_L1_error); - /* "meshCalcUnix.pyx":860 + /* "meshCalcUnix.pyx":863 * [8, 9, 7, 3], * [8, 9, 7, 6], * [8, 4, 7, 6], # <<<<<<<<<<<<<< * [8, 5, 9, 6], * [4, 5, 6, 8], */ - __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_1 = PyList_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_8); __Pyx_GIVEREF(__pyx_int_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_8)) __PYX_ERR(0, 860, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_8)) __PYX_ERR(0, 863, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_4)) __PYX_ERR(0, 860, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_4)) __PYX_ERR(0, 863, __pyx_L1_error); __Pyx_INCREF(__pyx_int_7); __Pyx_GIVEREF(__pyx_int_7); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_7)) __PYX_ERR(0, 860, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_7)) __PYX_ERR(0, 863, __pyx_L1_error); __Pyx_INCREF(__pyx_int_6); __Pyx_GIVEREF(__pyx_int_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_6)) __PYX_ERR(0, 860, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_6)) __PYX_ERR(0, 863, __pyx_L1_error); - /* "meshCalcUnix.pyx":861 + /* "meshCalcUnix.pyx":864 * [8, 9, 7, 6], * [8, 4, 7, 6], * [8, 5, 9, 6], # <<<<<<<<<<<<<< * [4, 5, 6, 8], * [4, 1, 5, 8]] */ - __pyx_t_15 = PyList_New(4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 861, __pyx_L1_error) + __pyx_t_15 = PyList_New(4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_INCREF(__pyx_int_8); __Pyx_GIVEREF(__pyx_int_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_int_8)) __PYX_ERR(0, 861, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 0, __pyx_int_8)) __PYX_ERR(0, 864, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 1, __pyx_int_5)) __PYX_ERR(0, 861, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 1, __pyx_int_5)) __PYX_ERR(0, 864, __pyx_L1_error); __Pyx_INCREF(__pyx_int_9); __Pyx_GIVEREF(__pyx_int_9); - if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 2, __pyx_int_9)) __PYX_ERR(0, 861, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 2, __pyx_int_9)) __PYX_ERR(0, 864, __pyx_L1_error); __Pyx_INCREF(__pyx_int_6); __Pyx_GIVEREF(__pyx_int_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 3, __pyx_int_6)) __PYX_ERR(0, 861, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_15, 3, __pyx_int_6)) __PYX_ERR(0, 864, __pyx_L1_error); - /* "meshCalcUnix.pyx":862 + /* "meshCalcUnix.pyx":865 * [8, 4, 7, 6], * [8, 5, 9, 6], * [4, 5, 6, 8], # <<<<<<<<<<<<<< * [4, 1, 5, 8]] * cdef long long[:,:] remapv = np.asarray(remap,dtype=np.int64) */ - __pyx_t_16 = PyList_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_16 = PyList_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 0, __pyx_int_4)) __PYX_ERR(0, 862, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 0, __pyx_int_4)) __PYX_ERR(0, 865, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 1, __pyx_int_5)) __PYX_ERR(0, 862, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 1, __pyx_int_5)) __PYX_ERR(0, 865, __pyx_L1_error); __Pyx_INCREF(__pyx_int_6); __Pyx_GIVEREF(__pyx_int_6); - if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 2, __pyx_int_6)) __PYX_ERR(0, 862, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 2, __pyx_int_6)) __PYX_ERR(0, 865, __pyx_L1_error); __Pyx_INCREF(__pyx_int_8); __Pyx_GIVEREF(__pyx_int_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 3, __pyx_int_8)) __PYX_ERR(0, 862, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_16, 3, __pyx_int_8)) __PYX_ERR(0, 865, __pyx_L1_error); - /* "meshCalcUnix.pyx":863 + /* "meshCalcUnix.pyx":866 * [8, 5, 9, 6], * [4, 5, 6, 8], * [4, 1, 5, 8]] # <<<<<<<<<<<<<< * cdef long long[:,:] remapv = np.asarray(remap,dtype=np.int64) * */ - __pyx_t_17 = PyList_New(4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_t_17 = PyList_New(4); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 0, __pyx_int_4)) __PYX_ERR(0, 863, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 0, __pyx_int_4)) __PYX_ERR(0, 866, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 1, __pyx_int_1)) __PYX_ERR(0, 863, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 1, __pyx_int_1)) __PYX_ERR(0, 866, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 2, __pyx_int_5)) __PYX_ERR(0, 863, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 2, __pyx_int_5)) __PYX_ERR(0, 866, __pyx_L1_error); __Pyx_INCREF(__pyx_int_8); __Pyx_GIVEREF(__pyx_int_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 3, __pyx_int_8)) __PYX_ERR(0, 863, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_17, 3, __pyx_int_8)) __PYX_ERR(0, 866, __pyx_L1_error); - /* "meshCalcUnix.pyx":856 + /* "meshCalcUnix.pyx":859 * * #remap the element nodes with this matrix * cdef list remap = [[4, 7, 6, 0], # <<<<<<<<<<<<<< * [5, 9, 6, 2], * [8, 9, 7, 3], */ - __pyx_t_18 = PyList_New(8); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 856, __pyx_L1_error) + __pyx_t_18 = PyList_New(8); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_5)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 0, __pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 1, __pyx_t_4)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 1, __pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_8); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 2, __pyx_t_8)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 2, __pyx_t_8)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 3, __pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 3, __pyx_t_2)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 4, __pyx_t_1)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 4, __pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_15); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 5, __pyx_t_15)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 5, __pyx_t_15)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_16); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 6, __pyx_t_16)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 6, __pyx_t_16)) __PYX_ERR(0, 859, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_17); - if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 7, __pyx_t_17)) __PYX_ERR(0, 856, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_18, 7, __pyx_t_17)) __PYX_ERR(0, 859, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_4 = 0; __pyx_t_8 = 0; @@ -33643,44 +33705,44 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_remap = ((PyObject*)__pyx_t_18); __pyx_t_18 = 0; - /* "meshCalcUnix.pyx":864 + /* "meshCalcUnix.pyx":867 * [4, 5, 6, 8], * [4, 1, 5, 8]] * cdef long long[:,:] remapv = np.asarray(remap,dtype=np.int64) # <<<<<<<<<<<<<< * * ### loop through the elements ### all possible node configurations */ - __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_np); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_18, __pyx_n_s_np); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_asarray); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_asarray); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_18 = PyTuple_New(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_remap); __Pyx_GIVEREF(__pyx_v_remap); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_remap)) __PYX_ERR(0, 864, __pyx_L1_error); - __pyx_t_16 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 864, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_remap)) __PYX_ERR(0, 867, __pyx_L1_error); + __pyx_t_16 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 864, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_np); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 864, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_17, __pyx_t_18, __pyx_t_16); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; - __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_remapv = __pyx_t_10; __pyx_t_10.memview = NULL; __pyx_t_10.data = NULL; - /* "meshCalcUnix.pyx":867 + /* "meshCalcUnix.pyx":870 * * ### loop through the elements ### all possible node configurations * for i in range(numel): # <<<<<<<<<<<<<< @@ -33692,7 +33754,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; - /* "meshCalcUnix.pyx":868 + /* "meshCalcUnix.pyx":871 * ### loop through the elements ### all possible node configurations * for i in range(numel): * for j in range(4): # <<<<<<<<<<<<<< @@ -33702,7 +33764,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_22 = 0; __pyx_t_22 < 4; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; - /* "meshCalcUnix.pyx":869 + /* "meshCalcUnix.pyx":872 * for i in range(numel): * for j in range(4): * nno = connection[i,j] # node number # <<<<<<<<<<<<<< @@ -33713,7 +33775,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = __pyx_v_j; __pyx_v_nno = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_23 * __pyx_v_connection.strides[0]) ) + __pyx_t_24 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":870 + /* "meshCalcUnix.pyx":873 * for j in range(4): * nno = connection[i,j] # node number * x[j] = node_x[nno] # <<<<<<<<<<<<<< @@ -33724,7 +33786,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_23 * __pyx_v_x.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_x.data + __pyx_t_24 * __pyx_v_node_x.strides[0]) ))); - /* "meshCalcUnix.pyx":871 + /* "meshCalcUnix.pyx":874 * nno = connection[i,j] # node number * x[j] = node_x[nno] * y[j] = node_y[nno] # <<<<<<<<<<<<<< @@ -33735,7 +33797,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_23 * __pyx_v_y.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_y.data + __pyx_t_24 * __pyx_v_node_y.strides[0]) ))); - /* "meshCalcUnix.pyx":872 + /* "meshCalcUnix.pyx":875 * x[j] = node_x[nno] * y[j] = node_y[nno] * z[j] = node_z[nno] # <<<<<<<<<<<<<< @@ -33746,7 +33808,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_23 * __pyx_v_z.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_z.data + __pyx_t_24 * __pyx_v_node_z.strides[0]) ))); - /* "meshCalcUnix.pyx":873 + /* "meshCalcUnix.pyx":876 * y[j] = node_y[nno] * z[j] = node_z[nno] * n[j] = nno # <<<<<<<<<<<<<< @@ -33757,7 +33819,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_24 * __pyx_v_n.strides[0]) )) = __pyx_v_nno; } - /* "meshCalcUnix.pyx":875 + /* "meshCalcUnix.pyx":878 * n[j] = nno * * tmpi = 6*i # <<<<<<<<<<<<<< @@ -33766,7 +33828,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_tmpi = (6 * __pyx_v_i); - /* "meshCalcUnix.pyx":876 + /* "meshCalcUnix.pyx":879 * * tmpi = 6*i * for j in range(6): # <<<<<<<<<<<<<< @@ -33776,7 +33838,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_22 = 0; __pyx_t_22 < 6; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; - /* "meshCalcUnix.pyx":877 + /* "meshCalcUnix.pyx":880 * tmpi = 6*i * for j in range(6): * mx = (x[a[j]]+x[b[j]])/2 # <<<<<<<<<<<<<< @@ -33789,7 +33851,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_26 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_23 * __pyx_v_b.strides[0]) ))); __pyx_v_mx = (((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_25 * __pyx_v_x.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_26 * __pyx_v_x.strides[0]) )))) / 2.0); - /* "meshCalcUnix.pyx":878 + /* "meshCalcUnix.pyx":881 * for j in range(6): * mx = (x[a[j]]+x[b[j]])/2 * my = (y[a[j]]+y[b[j]])/2 # <<<<<<<<<<<<<< @@ -33802,7 +33864,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_25 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_24 * __pyx_v_b.strides[0]) ))); __pyx_v_my = (((*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_26 * __pyx_v_y.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_25 * __pyx_v_y.strides[0]) )))) / 2.0); - /* "meshCalcUnix.pyx":879 + /* "meshCalcUnix.pyx":882 * mx = (x[a[j]]+x[b[j]])/2 * my = (y[a[j]]+y[b[j]])/2 * mz = (z[a[j]]+z[b[j]])/2 # <<<<<<<<<<<<<< @@ -33815,7 +33877,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_26 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_23 * __pyx_v_b.strides[0]) ))); __pyx_v_mz = (((*((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_25 * __pyx_v_z.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_26 * __pyx_v_z.strides[0]) )))) / 2.0); - /* "meshCalcUnix.pyx":880 + /* "meshCalcUnix.pyx":883 * my = (y[a[j]]+y[b[j]])/2 * mz = (z[a[j]]+z[b[j]])/2 * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] # <<<<<<<<<<<<<< @@ -33831,16 +33893,16 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = 1; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_24 * __pyx_v_nodes.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_26 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":881 + /* "meshCalcUnix.pyx":884 * mz = (z[a[j]]+z[b[j]])/2 * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) # <<<<<<<<<<<<<< * mn = mergeInt(nodes[0],nodes[1],pad) * */ - __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L1_error) - /* "meshCalcUnix.pyx":882 + /* "meshCalcUnix.pyx":885 * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) * mn = mergeInt(nodes[0],nodes[1],pad) # <<<<<<<<<<<<<< @@ -33849,10 +33911,10 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_t_23 = 0; __pyx_t_24 = 1; - __pyx_t_26 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_23 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_24 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_26 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_26 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_23 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_24 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_26 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L1_error) __pyx_v_mn = __pyx_t_26; - /* "meshCalcUnix.pyx":884 + /* "meshCalcUnix.pyx":887 * mn = mergeInt(nodes[0],nodes[1],pad) * * new_nodev[tmpi+j,0] = mx # <<<<<<<<<<<<<< @@ -33863,7 +33925,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_24 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_23 * __pyx_v_new_nodev.strides[1]) )) = __pyx_v_mx; - /* "meshCalcUnix.pyx":885 + /* "meshCalcUnix.pyx":888 * * new_nodev[tmpi+j,0] = mx * new_nodev[tmpi+j,1] = my # <<<<<<<<<<<<<< @@ -33874,7 +33936,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_23 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_24 * __pyx_v_new_nodev.strides[1]) )) = __pyx_v_my; - /* "meshCalcUnix.pyx":886 + /* "meshCalcUnix.pyx":889 * new_nodev[tmpi+j,0] = mx * new_nodev[tmpi+j,1] = my * new_nodev[tmpi+j,2] = mz # <<<<<<<<<<<<<< @@ -33885,7 +33947,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = 2; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_24 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_23 * __pyx_v_new_nodev.strides[1]) )) = __pyx_v_mz; - /* "meshCalcUnix.pyx":887 + /* "meshCalcUnix.pyx":890 * new_nodev[tmpi+j,1] = my * new_nodev[tmpi+j,2] = mz * new_node_idx[tmpi+j] = mn # <<<<<<<<<<<<<< @@ -33895,7 +33957,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = (__pyx_v_tmpi + __pyx_v_j); *__Pyx_BufPtrStrided1d(PY_LONG_LONG *, __pyx_pybuffernd_new_node_idx.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_new_node_idx.diminfo[0].strides) = __pyx_v_mn; - /* "meshCalcUnix.pyx":888 + /* "meshCalcUnix.pyx":891 * new_nodev[tmpi+j,2] = mz * new_node_idx[tmpi+j] = mn * og_el_idv[tmpi+j] = i # <<<<<<<<<<<<<< @@ -33907,27 +33969,27 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":892 + /* "meshCalcUnix.pyx":895 * ### find unique node configs # ### * cdef np.ndarray[long long, ndim=1] idxa, unicl * unicl, idxa = np.unique(new_node_idx, return_index=True) # unique and ordered node configs # <<<<<<<<<<<<<< * cdef long long[:] node_id = np.arange(len(unicl)) + num_nodes * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unique); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_unique); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_new_node_idx); __Pyx_GIVEREF((PyObject *)__pyx_v_new_node_idx); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_new_node_idx))) __PYX_ERR(0, 892, __pyx_L1_error); - __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 892, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_new_node_idx))) __PYX_ERR(0, 895, __pyx_L1_error); + __pyx_t_18 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); - if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 892, __pyx_L1_error) - __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_1, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 892, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_18, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_t_1, __pyx_t_18); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -33938,7 +34000,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 892, __pyx_L1_error) + __PYX_ERR(0, 895, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -33951,15 +34013,15 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(__pyx_t_1); #else - __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_18 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); - __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; } else { Py_ssize_t index = -1; - __pyx_t_16 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_t_27 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_16); @@ -33967,7 +34029,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __Pyx_GOTREF(__pyx_t_18); index = 1; __pyx_t_1 = __pyx_t_27(__pyx_t_16); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_16), 2) < 0) __PYX_ERR(0, 892, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_27(__pyx_t_16), 2) < 0) __PYX_ERR(0, 895, __pyx_L1_error) __pyx_t_27 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L10_unpacking_done; @@ -33975,11 +34037,11 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_27 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 892, __pyx_L1_error) + __PYX_ERR(0, 895, __pyx_L1_error) __pyx_L10_unpacking_done:; } - if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 892, __pyx_L1_error) - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 892, __pyx_L1_error) + if (!(likely(((__pyx_t_18) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_18, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 895, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 895, __pyx_L1_error) __pyx_t_28 = ((PyArrayObject *)__pyx_t_18); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -33996,7 +34058,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_29 = __pyx_t_30 = __pyx_t_31 = 0; } __pyx_pybuffernd_unicl.diminfo[0].strides = __pyx_pybuffernd_unicl.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_unicl.diminfo[0].shape = __pyx_pybuffernd_unicl.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 892, __pyx_L1_error) + if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 895, __pyx_L1_error) } __pyx_t_28 = 0; __pyx_v_unicl = ((PyArrayObject *)__pyx_t_18); @@ -34017,26 +34079,26 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_31 = __pyx_t_30 = __pyx_t_29 = 0; } __pyx_pybuffernd_idxa.diminfo[0].strides = __pyx_pybuffernd_idxa.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idxa.diminfo[0].shape = __pyx_pybuffernd_idxa.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 892, __pyx_L1_error) + if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 895, __pyx_L1_error) } __pyx_t_28 = 0; __pyx_v_idxa = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":893 + /* "meshCalcUnix.pyx":896 * cdef np.ndarray[long long, ndim=1] idxa, unicl * unicl, idxa = np.unique(new_node_idx, return_index=True) # unique and ordered node configs * cdef long long[:] node_id = np.arange(len(unicl)) + num_nodes # <<<<<<<<<<<<<< * * ### map back to elements #### */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_arange); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_unicl)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 893, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_unicl)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_16 = NULL; __pyx_t_19 = 0; @@ -34057,23 +34119,23 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_17 = __Pyx_PyObject_FastCall(__pyx_t_18, __pyx_callargs+1-__pyx_t_19, 1+__pyx_t_19); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 893, __pyx_L1_error) + if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; } - __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_From_int(__pyx_v_num_nodes); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); - __pyx_t_1 = PyNumber_Add(__pyx_t_17, __pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_17, __pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_node_id = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":896 + /* "meshCalcUnix.pyx":899 * * ### map back to elements #### * for i in range(numel): # <<<<<<<<<<<<<< @@ -34085,7 +34147,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; - /* "meshCalcUnix.pyx":897 + /* "meshCalcUnix.pyx":900 * ### map back to elements #### * for i in range(numel): * for j in range(4): # <<<<<<<<<<<<<< @@ -34095,7 +34157,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_22 = 0; __pyx_t_22 < 4; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; - /* "meshCalcUnix.pyx":898 + /* "meshCalcUnix.pyx":901 * for i in range(numel): * for j in range(4): * nno = connection[i,j] # node number # <<<<<<<<<<<<<< @@ -34106,7 +34168,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = __pyx_v_j; __pyx_v_nno = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_23 * __pyx_v_connection.strides[0]) ) + __pyx_t_24 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":899 + /* "meshCalcUnix.pyx":902 * for j in range(4): * nno = connection[i,j] # node number * n[j] = nno # <<<<<<<<<<<<<< @@ -34117,7 +34179,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_24 * __pyx_v_n.strides[0]) )) = __pyx_v_nno; } - /* "meshCalcUnix.pyx":901 + /* "meshCalcUnix.pyx":904 * n[j] = nno * * for j in range(6): # <<<<<<<<<<<<<< @@ -34127,7 +34189,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_22 = 0; __pyx_t_22 < 6; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; - /* "meshCalcUnix.pyx":902 + /* "meshCalcUnix.pyx":905 * * for j in range(6): * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] # <<<<<<<<<<<<<< @@ -34143,16 +34205,16 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = 1; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_23 * __pyx_v_nodes.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_26 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":903 + /* "meshCalcUnix.pyx":906 * for j in range(6): * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) # <<<<<<<<<<<<<< * mn = mergeInt(nodes[0],nodes[1],pad) * search = bisection_search(unicl,mn) */ - __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_f_8meshCalc_sortInt(__pyx_v_nodes, 2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L1_error) - /* "meshCalcUnix.pyx":904 + /* "meshCalcUnix.pyx":907 * nodes[0] = n[a[j]]; nodes[1] = n[b[j]] * sortInt(nodes,2) * mn = mergeInt(nodes[0],nodes[1],pad) # <<<<<<<<<<<<<< @@ -34161,23 +34223,23 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_t_24 = 0; __pyx_t_23 = 1; - __pyx_t_26 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_24 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_23 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_26 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_26 = __pyx_f_8meshCalc_mergeInt((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_24 * __pyx_v_nodes.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_nodes.data + __pyx_t_23 * __pyx_v_nodes.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_26 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L1_error) __pyx_v_mn = __pyx_t_26; - /* "meshCalcUnix.pyx":905 + /* "meshCalcUnix.pyx":908 * sortInt(nodes,2) * mn = mergeInt(nodes[0],nodes[1],pad) * search = bisection_search(unicl,mn) # <<<<<<<<<<<<<< * n[j+4] = node_id[search]#reference index * */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_unicl), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 905, __pyx_L1_error) - __pyx_t_32 = __pyx_f_8meshCalc_bisection_search(__pyx_t_6, __pyx_v_mn); if (unlikely(__pyx_t_32 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 905, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_unicl), PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_32 = __pyx_f_8meshCalc_bisection_search(__pyx_t_6, __pyx_v_mn); if (unlikely(__pyx_t_32 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 908, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_6, 1); __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; __pyx_v_search = __pyx_t_32; - /* "meshCalcUnix.pyx":906 + /* "meshCalcUnix.pyx":909 * mn = mergeInt(nodes[0],nodes[1],pad) * search = bisection_search(unicl,mn) * n[j+4] = node_id[search]#reference index # <<<<<<<<<<<<<< @@ -34189,7 +34251,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_24 * __pyx_v_n.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_node_id.data + __pyx_t_23 * __pyx_v_node_id.strides[0]) ))); } - /* "meshCalcUnix.pyx":908 + /* "meshCalcUnix.pyx":911 * n[j+4] = node_id[search]#reference index * * tmpi = i*8 # temporary index for indexing new connection matrix # <<<<<<<<<<<<<< @@ -34198,7 +34260,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_tmpi = (__pyx_v_i * 8); - /* "meshCalcUnix.pyx":909 + /* "meshCalcUnix.pyx":912 * * tmpi = i*8 # temporary index for indexing new connection matrix * for j in range(8): # <<<<<<<<<<<<<< @@ -34208,7 +34270,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_22 = 0; __pyx_t_22 < 8; __pyx_t_22+=1) { __pyx_v_j = __pyx_t_22; - /* "meshCalcUnix.pyx":910 + /* "meshCalcUnix.pyx":913 * tmpi = i*8 # temporary index for indexing new connection matrix * for j in range(8): * new_connectionv[tmpi+j,0] = n[remapv[j,0]] # <<<<<<<<<<<<<< @@ -34222,7 +34284,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_34 = 0; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_connectionv.data + __pyx_t_33 * __pyx_v_new_connectionv.strides[0]) ) + __pyx_t_34 * __pyx_v_new_connectionv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_26 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":911 + /* "meshCalcUnix.pyx":914 * for j in range(8): * new_connectionv[tmpi+j,0] = n[remapv[j,0]] * new_connectionv[tmpi+j,1] = n[remapv[j,1]] # <<<<<<<<<<<<<< @@ -34236,7 +34298,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_33 = 1; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_connectionv.data + __pyx_t_34 * __pyx_v_new_connectionv.strides[0]) ) + __pyx_t_33 * __pyx_v_new_connectionv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_26 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":912 + /* "meshCalcUnix.pyx":915 * new_connectionv[tmpi+j,0] = n[remapv[j,0]] * new_connectionv[tmpi+j,1] = n[remapv[j,1]] * new_connectionv[tmpi+j,2] = n[remapv[j,2]] # <<<<<<<<<<<<<< @@ -34250,7 +34312,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_34 = 2; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_connectionv.data + __pyx_t_33 * __pyx_v_new_connectionv.strides[0]) ) + __pyx_t_34 * __pyx_v_new_connectionv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_n.data + __pyx_t_26 * __pyx_v_n.strides[0]) ))); - /* "meshCalcUnix.pyx":913 + /* "meshCalcUnix.pyx":916 * new_connectionv[tmpi+j,1] = n[remapv[j,1]] * new_connectionv[tmpi+j,2] = n[remapv[j,2]] * new_connectionv[tmpi+j,3] = n[remapv[j,3]] # <<<<<<<<<<<<<< @@ -34266,58 +34328,58 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":916 + /* "meshCalcUnix.pyx":919 * * ### make new node matrix ### * cdef int added_nodes = len(idxa) # number of new nodes added to mesh # <<<<<<<<<<<<<< * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) * cdef double[:,:] node_outv = node_out */ - __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_idxa)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 916, __pyx_L1_error) + __pyx_t_7 = PyObject_Length(((PyObject *)__pyx_v_idxa)); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 919, __pyx_L1_error) __pyx_v_added_nodes = __pyx_t_7; - /* "meshCalcUnix.pyx":917 + /* "meshCalcUnix.pyx":920 * ### make new node matrix ### * cdef int added_nodes = len(idxa) # number of new nodes added to mesh * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) # <<<<<<<<<<<<<< * cdef double[:,:] node_outv = node_out * for i in range(num_nodes): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_int_3)) __PYX_ERR(0, 917, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_int_3)) __PYX_ERR(0, 920, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_17); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_17)) __PYX_ERR(0, 917, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_17)) __PYX_ERR(0, 920, __pyx_L1_error); __pyx_t_17 = 0; - __pyx_t_17 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); - if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 917, __pyx_L1_error) - __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_1, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_17, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 920, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_18, __pyx_t_1, __pyx_t_17); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 917, __pyx_L1_error) + if (!(likely(((__pyx_t_16) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_16, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 920, __pyx_L1_error) __pyx_t_35 = ((PyArrayObject *)__pyx_t_16); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_out.rcbuffer->pybuffer, (PyObject*)__pyx_t_35, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_node_out = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_out.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 917, __pyx_L1_error) + __PYX_ERR(0, 920, __pyx_L1_error) } else {__pyx_pybuffernd_node_out.diminfo[0].strides = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_out.diminfo[0].shape = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_node_out.diminfo[1].strides = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_node_out.diminfo[1].shape = __pyx_pybuffernd_node_out.rcbuffer->pybuffer.shape[1]; } } @@ -34325,19 +34387,19 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_node_out = ((PyArrayObject *)__pyx_t_16); __pyx_t_16 = 0; - /* "meshCalcUnix.pyx":918 + /* "meshCalcUnix.pyx":921 * cdef int added_nodes = len(idxa) # number of new nodes added to mesh * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) * cdef double[:,:] node_outv = node_out # <<<<<<<<<<<<<< * for i in range(num_nodes): * node_outv[i,0] = node_x[i] */ - __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_node_out), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 918, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_node_out), PyBUF_WRITABLE); if (unlikely(!__pyx_t_14.memview)) __PYX_ERR(0, 921, __pyx_L1_error) __pyx_v_node_outv = __pyx_t_14; __pyx_t_14.memview = NULL; __pyx_t_14.data = NULL; - /* "meshCalcUnix.pyx":919 + /* "meshCalcUnix.pyx":922 * cdef np.ndarray[double, ndim=2] node_out = np.zeros((num_nodes+added_nodes,3),dtype=float) * cdef double[:,:] node_outv = node_out * for i in range(num_nodes): # <<<<<<<<<<<<<< @@ -34349,7 +34411,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; - /* "meshCalcUnix.pyx":920 + /* "meshCalcUnix.pyx":923 * cdef double[:,:] node_outv = node_out * for i in range(num_nodes): * node_outv[i,0] = node_x[i] # <<<<<<<<<<<<<< @@ -34361,7 +34423,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_33 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_24 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_33 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_x.data + __pyx_t_23 * __pyx_v_node_x.strides[0]) ))); - /* "meshCalcUnix.pyx":921 + /* "meshCalcUnix.pyx":924 * for i in range(num_nodes): * node_outv[i,0] = node_x[i] * node_outv[i,1] = node_y[i] # <<<<<<<<<<<<<< @@ -34373,7 +34435,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_33 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_24 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_y.data + __pyx_t_23 * __pyx_v_node_y.strides[0]) ))); - /* "meshCalcUnix.pyx":922 + /* "meshCalcUnix.pyx":925 * node_outv[i,0] = node_x[i] * node_outv[i,1] = node_y[i] * node_outv[i,2] = node_z[i] # <<<<<<<<<<<<<< @@ -34386,7 +34448,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_24 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_33 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_z.data + __pyx_t_23 * __pyx_v_node_z.strides[0]) ))); } - /* "meshCalcUnix.pyx":923 + /* "meshCalcUnix.pyx":926 * node_outv[i,1] = node_y[i] * node_outv[i,2] = node_z[i] * for i in range(added_nodes): # <<<<<<<<<<<<<< @@ -34398,7 +34460,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_21 = 0; __pyx_t_21 < __pyx_t_20; __pyx_t_21+=1) { __pyx_v_i = __pyx_t_21; - /* "meshCalcUnix.pyx":924 + /* "meshCalcUnix.pyx":927 * node_outv[i,2] = node_z[i] * for i in range(added_nodes): * j = i + num_nodes # <<<<<<<<<<<<<< @@ -34407,7 +34469,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_j = (__pyx_v_i + __pyx_v_num_nodes); - /* "meshCalcUnix.pyx":925 + /* "meshCalcUnix.pyx":928 * for i in range(added_nodes): * j = i + num_nodes * node_outv[j,0] = new_nodev[idxa[i],0] # <<<<<<<<<<<<<< @@ -34421,7 +34483,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_34 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_24 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_34 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_26 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_33 * __pyx_v_new_nodev.strides[1]) ))); - /* "meshCalcUnix.pyx":926 + /* "meshCalcUnix.pyx":929 * j = i + num_nodes * node_outv[j,0] = new_nodev[idxa[i],0] * node_outv[j,1] = new_nodev[idxa[i],1] # <<<<<<<<<<<<<< @@ -34435,7 +34497,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_34 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_24 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_26 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_33 * __pyx_v_new_nodev.strides[1]) ))); - /* "meshCalcUnix.pyx":927 + /* "meshCalcUnix.pyx":930 * node_outv[j,0] = new_nodev[idxa[i],0] * node_outv[j,1] = new_nodev[idxa[i],1] * node_outv[j,2] = new_nodev[idxa[i],2] # <<<<<<<<<<<<<< @@ -34450,7 +34512,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node_outv.data + __pyx_t_24 * __pyx_v_node_outv.strides[0]) ) + __pyx_t_34 * __pyx_v_node_outv.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_new_nodev.data + __pyx_t_26 * __pyx_v_new_nodev.strides[0]) ) + __pyx_t_33 * __pyx_v_new_nodev.strides[1]) ))); } - /* "meshCalcUnix.pyx":929 + /* "meshCalcUnix.pyx":932 * node_outv[j,2] = new_nodev[idxa[i],2] * * return new_connection, node_out, numel*8, num_nodes + added_nodes # <<<<<<<<<<<<<< @@ -34458,29 +34520,29 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_16 = __Pyx_PyInt_From_long((__pyx_v_numel * 8)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_From_long((__pyx_v_numel * 8)); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_17 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_From_int((__pyx_v_num_nodes + __pyx_v_added_nodes)); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_new_connection); __Pyx_GIVEREF((PyObject *)__pyx_v_new_connection); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_new_connection))) __PYX_ERR(0, 929, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_new_connection))) __PYX_ERR(0, 932, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_node_out); __Pyx_GIVEREF((PyObject *)__pyx_v_node_out); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_node_out))) __PYX_ERR(0, 929, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_node_out))) __PYX_ERR(0, 932, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_16); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_16)) __PYX_ERR(0, 929, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_16)) __PYX_ERR(0, 932, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_17); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_17)) __PYX_ERR(0, 929, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_17)) __PYX_ERR(0, 932, __pyx_L1_error); __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":806 + /* "meshCalcUnix.pyx":809 * return new_connection, node_out, numel*4, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -34556,7 +34618,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p return __pyx_r; } -/* "meshCalcUnix.pyx":931 +/* "meshCalcUnix.pyx":934 * return new_connection, node_out, numel*8, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -34624,7 +34686,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -34632,21 +34694,21 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("orderTetra", 0, 2, 3, 1); __PYX_ERR(0, 931, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("orderTetra", 0, 2, 3, 1); __PYX_ERR(0, 934, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_threads); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 931, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 934, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "orderTetra") < 0)) __PYX_ERR(0, 931, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "orderTetra") < 0)) __PYX_ERR(0, 934, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -34658,17 +34720,17 @@ PyObject *__pyx_args, PyObject *__pyx_kwds default: goto __pyx_L5_argtuple_error; } } - __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 933, __pyx_L3_error) - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 933, __pyx_L3_error) + __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 936, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 936, __pyx_L3_error) if (values[2]) { - __pyx_v_num_threads = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 933, __pyx_L3_error) + __pyx_v_num_threads = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 936, __pyx_L3_error) } else { __pyx_v_num_threads = ((int)((int)2)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("orderTetra", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 931, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("orderTetra", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 934, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -34798,7 +34860,7 @@ static PyObject *__pyx_pf_8meshCalc_22orderTetra(CYTHON_UNUSED PyObject *__pyx_s __pyx_pybuffernd_count.data = NULL; __pyx_pybuffernd_count.rcbuffer = &__pyx_pybuffer_count; - /* "meshCalcUnix.pyx":958 + /* "meshCalcUnix.pyx":961 * """ * #get the number of nodes and elements etc * cdef int numel = connection.shape[0] # <<<<<<<<<<<<<< @@ -34807,7 +34869,7 @@ static PyObject *__pyx_pf_8meshCalc_22orderTetra(CYTHON_UNUSED PyObject *__pyx_s */ __pyx_v_numel = (__pyx_v_connection.shape[0]); - /* "meshCalcUnix.pyx":959 + /* "meshCalcUnix.pyx":962 * #get the number of nodes and elements etc * cdef int numel = connection.shape[0] * cdef int npere = connection.shape[1] # <<<<<<<<<<<<<< @@ -34816,56 +34878,56 @@ static PyObject *__pyx_pf_8meshCalc_22orderTetra(CYTHON_UNUSED PyObject *__pyx_s */ __pyx_v_npere = (__pyx_v_connection.shape[1]); - /* "meshCalcUnix.pyx":961 + /* "meshCalcUnix.pyx":964 * cdef int npere = connection.shape[1] * * cdef np.ndarray[long long,ndim=2] con = np.zeros((numel,npere), dtype=np.int64)# new connection matrix # <<<<<<<<<<<<<< * cdef long long[:,:] conv = con # connection memeory view * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 964, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 961, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 961, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 961, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 964, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_con.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_con = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_con.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 961, __pyx_L1_error) + __PYX_ERR(0, 964, __pyx_L1_error) } else {__pyx_pybuffernd_con.diminfo[0].strides = __pyx_pybuffernd_con.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_con.diminfo[0].shape = __pyx_pybuffernd_con.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_con.diminfo[1].strides = __pyx_pybuffernd_con.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_con.diminfo[1].shape = __pyx_pybuffernd_con.rcbuffer->pybuffer.shape[1]; } } @@ -34873,28 +34935,28 @@ static PyObject *__pyx_pf_8meshCalc_22orderTetra(CYTHON_UNUSED PyObject *__pyx_s __pyx_v_con = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":962 + /* "meshCalcUnix.pyx":965 * * cdef np.ndarray[long long,ndim=2] con = np.zeros((numel,npere), dtype=np.int64)# new connection matrix * cdef long long[:,:] conv = con # connection memeory view # <<<<<<<<<<<<<< * * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_con), PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_con), PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 965, __pyx_L1_error) __pyx_v_conv = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":964 + /* "meshCalcUnix.pyx":967 * cdef long long[:,:] conv = con # connection memeory view * * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates # <<<<<<<<<<<<<< * cdef np.ndarray[double, ndim=1] node_y = np.asarray(node[:,1],dtype=float) * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -34910,30 +34972,30 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) +__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 964, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 964, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 967, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_x.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_node_x = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_x.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 964, __pyx_L1_error) + __PYX_ERR(0, 967, __pyx_L1_error) } else {__pyx_pybuffernd_node_x.diminfo[0].strides = __pyx_pybuffernd_node_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_x.diminfo[0].shape = __pyx_pybuffernd_node_x.rcbuffer->pybuffer.shape[0]; } } @@ -34941,16 +35003,16 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_v_node_x = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":965 + /* "meshCalcUnix.pyx":968 * * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef np.ndarray[double, ndim=1] node_y = np.asarray(node[:,1],dtype=float) # <<<<<<<<<<<<<< * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) * cdef double[:] nodex = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -34966,30 +35028,30 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __pyx_L1_error) +__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 965, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 965, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 965, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 965, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 968, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_y.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_node_y = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_y.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 965, __pyx_L1_error) + __PYX_ERR(0, 968, __pyx_L1_error) } else {__pyx_pybuffernd_node_y.diminfo[0].strides = __pyx_pybuffernd_node_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_y.diminfo[0].shape = __pyx_pybuffernd_node_y.rcbuffer->pybuffer.shape[0]; } } @@ -34997,16 +35059,16 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_v_node_y = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; - /* "meshCalcUnix.pyx":966 + /* "meshCalcUnix.pyx":969 * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef np.ndarray[double, ndim=1] node_y = np.asarray(node[:,1],dtype=float) * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) # <<<<<<<<<<<<<< * cdef double[:] nodex = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef double[:] nodey = np.asarray(node[:,1],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -35022,30 +35084,30 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L1_error) +__pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 966, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 966, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 966, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 966, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 969, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_z.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_node_z = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_z.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 966, __pyx_L1_error) + __PYX_ERR(0, 969, __pyx_L1_error) } else {__pyx_pybuffernd_node_z.diminfo[0].strides = __pyx_pybuffernd_node_z.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_z.diminfo[0].shape = __pyx_pybuffernd_node_z.rcbuffer->pybuffer.shape[0]; } } @@ -35053,16 +35115,16 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_v_node_z = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":967 + /* "meshCalcUnix.pyx":970 * cdef np.ndarray[double, ndim=1] node_y = np.asarray(node[:,1],dtype=float) * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) * cdef double[:] nodex = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates # <<<<<<<<<<<<<< * cdef double[:] nodey = np.asarray(node[:,1],dtype=float) * cdef double[:] nodez = np.asarray(node[:,2],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -35078,39 +35140,39 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) +__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 970, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 967, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 967, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 970, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 970, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_nodex = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":968 + /* "meshCalcUnix.pyx":971 * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) * cdef double[:] nodex = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef double[:] nodey = np.asarray(node[:,1],dtype=float) # <<<<<<<<<<<<<< * cdef double[:] nodez = np.asarray(node[:,2],dtype=float) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -35126,39 +35188,39 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) +__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 968, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 968, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_nodey = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":969 + /* "meshCalcUnix.pyx":972 * cdef double[:] nodex = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef double[:] nodey = np.asarray(node[:,1],dtype=float) * cdef double[:] nodez = np.asarray(node[:,2],dtype=float) # <<<<<<<<<<<<<< * * #looping variables */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -35174,69 +35236,69 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) +__pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 969, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 969, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_nodez = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":974 + /* "meshCalcUnix.pyx":977 * cdef double v00,v01,v02,v10,v11,v12,v20,v21,v22,s0,s1,s2, N * * cdef np.ndarray[long long, ndim=1] ccw = np.zeros(numel,dtype=np.int64) # clockwise array # <<<<<<<<<<<<<< * cdef long long[:] ccwv = ccw #clockwise view * cdef Py_ssize_t i */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 977, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 974, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 974, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 977, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ccw.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_ccw = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ccw.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 974, __pyx_L1_error) + __PYX_ERR(0, 977, __pyx_L1_error) } else {__pyx_pybuffernd_ccw.diminfo[0].strides = __pyx_pybuffernd_ccw.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ccw.diminfo[0].shape = __pyx_pybuffernd_ccw.rcbuffer->pybuffer.shape[0]; } } @@ -35244,58 +35306,58 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_v_ccw = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":975 + /* "meshCalcUnix.pyx":978 * * cdef np.ndarray[long long, ndim=1] ccw = np.zeros(numel,dtype=np.int64) # clockwise array * cdef long long[:] ccwv = ccw #clockwise view # <<<<<<<<<<<<<< * cdef Py_ssize_t i * cdef int k, ei, tid # loop integers */ - __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_ccw), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 975, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_ccw), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 978, __pyx_L1_error) __pyx_v_ccwv = __pyx_t_13; __pyx_t_13.memview = NULL; __pyx_t_13.data = NULL; - /* "meshCalcUnix.pyx":978 + /* "meshCalcUnix.pyx":981 * cdef Py_ssize_t i * cdef int k, ei, tid # loop integers * cdef np.ndarray[long long, ndim=1] count = np.zeros(numel,dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long[:] countv = count * cdef int count_out #rolling total for the number of corrected elements */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 978, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 978, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 978, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 981, __pyx_L1_error) __pyx_t_14 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_14, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_count.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 978, __pyx_L1_error) + __PYX_ERR(0, 981, __pyx_L1_error) } else {__pyx_pybuffernd_count.diminfo[0].strides = __pyx_pybuffernd_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_count.diminfo[0].shape = __pyx_pybuffernd_count.rcbuffer->pybuffer.shape[0]; } } @@ -35303,19 +35365,19 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_v_count = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":979 + /* "meshCalcUnix.pyx":982 * cdef int k, ei, tid # loop integers * cdef np.ndarray[long long, ndim=1] count = np.zeros(numel,dtype=np.int64) * cdef long long[:] countv = count # <<<<<<<<<<<<<< * cdef int count_out #rolling total for the number of corrected elements * */ - __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_count), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_count), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 982, __pyx_L1_error) __pyx_v_countv = __pyx_t_13; __pyx_t_13.memview = NULL; __pyx_t_13.data = NULL; - /* "meshCalcUnix.pyx":983 + /* "meshCalcUnix.pyx":986 * * #with nogil, parallel(num_threads=num_threads): * for i in prange(numel,nogil=True,num_threads=num_threads,schedule='static'): # <<<<<<<<<<<<<< @@ -35367,7 +35429,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_v_v21 = ((double)__PYX_NAN()); __pyx_v_v22 = ((double)__PYX_NAN()); - /* "meshCalcUnix.pyx":984 + /* "meshCalcUnix.pyx":987 * #with nogil, parallel(num_threads=num_threads): * for i in prange(numel,nogil=True,num_threads=num_threads,schedule='static'): * v00 = nodex[connection[i,1]] - nodex[connection[i,0]] # <<<<<<<<<<<<<< @@ -35382,7 +35444,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_21 * __pyx_v_connection.strides[0]) ) + __pyx_t_22 * __pyx_v_connection.strides[1]) ))); __pyx_v_v00 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodex.data + __pyx_t_20 * __pyx_v_nodex.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodex.data + __pyx_t_23 * __pyx_v_nodex.strides[0]) )))); - /* "meshCalcUnix.pyx":985 + /* "meshCalcUnix.pyx":988 * for i in prange(numel,nogil=True,num_threads=num_threads,schedule='static'): * v00 = nodex[connection[i,1]] - nodex[connection[i,0]] * v01 = nodex[connection[i,2]] - nodex[connection[i,0]] # <<<<<<<<<<<<<< @@ -35397,7 +35459,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_19 * __pyx_v_connection.strides[0]) ) + __pyx_t_18 * __pyx_v_connection.strides[1]) ))); __pyx_v_v01 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodex.data + __pyx_t_23 * __pyx_v_nodex.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodex.data + __pyx_t_20 * __pyx_v_nodex.strides[0]) )))); - /* "meshCalcUnix.pyx":986 + /* "meshCalcUnix.pyx":989 * v00 = nodex[connection[i,1]] - nodex[connection[i,0]] * v01 = nodex[connection[i,2]] - nodex[connection[i,0]] * v02 = nodex[connection[i,3]] - nodex[connection[i,0]] # <<<<<<<<<<<<<< @@ -35412,7 +35474,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_21 * __pyx_v_connection.strides[0]) ) + __pyx_t_22 * __pyx_v_connection.strides[1]) ))); __pyx_v_v02 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodex.data + __pyx_t_20 * __pyx_v_nodex.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodex.data + __pyx_t_23 * __pyx_v_nodex.strides[0]) )))); - /* "meshCalcUnix.pyx":987 + /* "meshCalcUnix.pyx":990 * v01 = nodex[connection[i,2]] - nodex[connection[i,0]] * v02 = nodex[connection[i,3]] - nodex[connection[i,0]] * v10 = nodey[connection[i,1]] - nodey[connection[i,0]] # <<<<<<<<<<<<<< @@ -35427,7 +35489,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_19 * __pyx_v_connection.strides[0]) ) + __pyx_t_18 * __pyx_v_connection.strides[1]) ))); __pyx_v_v10 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodey.data + __pyx_t_23 * __pyx_v_nodey.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodey.data + __pyx_t_20 * __pyx_v_nodey.strides[0]) )))); - /* "meshCalcUnix.pyx":988 + /* "meshCalcUnix.pyx":991 * v02 = nodex[connection[i,3]] - nodex[connection[i,0]] * v10 = nodey[connection[i,1]] - nodey[connection[i,0]] * v11 = nodey[connection[i,2]] - nodey[connection[i,0]] # <<<<<<<<<<<<<< @@ -35442,7 +35504,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_21 * __pyx_v_connection.strides[0]) ) + __pyx_t_22 * __pyx_v_connection.strides[1]) ))); __pyx_v_v11 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodey.data + __pyx_t_20 * __pyx_v_nodey.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodey.data + __pyx_t_23 * __pyx_v_nodey.strides[0]) )))); - /* "meshCalcUnix.pyx":989 + /* "meshCalcUnix.pyx":992 * v10 = nodey[connection[i,1]] - nodey[connection[i,0]] * v11 = nodey[connection[i,2]] - nodey[connection[i,0]] * v12 = nodey[connection[i,3]] - nodey[connection[i,0]] # <<<<<<<<<<<<<< @@ -35457,7 +35519,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_19 * __pyx_v_connection.strides[0]) ) + __pyx_t_18 * __pyx_v_connection.strides[1]) ))); __pyx_v_v12 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodey.data + __pyx_t_23 * __pyx_v_nodey.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodey.data + __pyx_t_20 * __pyx_v_nodey.strides[0]) )))); - /* "meshCalcUnix.pyx":990 + /* "meshCalcUnix.pyx":993 * v11 = nodey[connection[i,2]] - nodey[connection[i,0]] * v12 = nodey[connection[i,3]] - nodey[connection[i,0]] * v20 = nodez[connection[i,0]] - nodez[connection[i,1]] # <<<<<<<<<<<<<< @@ -35472,7 +35534,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_21 * __pyx_v_connection.strides[0]) ) + __pyx_t_22 * __pyx_v_connection.strides[1]) ))); __pyx_v_v20 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodez.data + __pyx_t_20 * __pyx_v_nodez.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodez.data + __pyx_t_23 * __pyx_v_nodez.strides[0]) )))); - /* "meshCalcUnix.pyx":991 + /* "meshCalcUnix.pyx":994 * v12 = nodey[connection[i,3]] - nodey[connection[i,0]] * v20 = nodez[connection[i,0]] - nodez[connection[i,1]] * v21 = nodez[connection[i,0]] - nodez[connection[i,2]] # <<<<<<<<<<<<<< @@ -35487,7 +35549,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_19 * __pyx_v_connection.strides[0]) ) + __pyx_t_18 * __pyx_v_connection.strides[1]) ))); __pyx_v_v21 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodez.data + __pyx_t_23 * __pyx_v_nodez.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodez.data + __pyx_t_20 * __pyx_v_nodez.strides[0]) )))); - /* "meshCalcUnix.pyx":992 + /* "meshCalcUnix.pyx":995 * v20 = nodez[connection[i,0]] - nodez[connection[i,1]] * v21 = nodez[connection[i,0]] - nodez[connection[i,2]] * v22 = nodez[connection[i,0]] - nodez[connection[i,3]] # <<<<<<<<<<<<<< @@ -35502,7 +35564,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_23 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_21 * __pyx_v_connection.strides[0]) ) + __pyx_t_22 * __pyx_v_connection.strides[1]) ))); __pyx_v_v22 = ((*((double *) ( /* dim=0 */ (__pyx_v_nodez.data + __pyx_t_20 * __pyx_v_nodez.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_nodez.data + __pyx_t_23 * __pyx_v_nodez.strides[0]) )))); - /* "meshCalcUnix.pyx":995 + /* "meshCalcUnix.pyx":998 * * #compute cross product * s0 = v01*v12 - v02*v11 # <<<<<<<<<<<<<< @@ -35511,7 +35573,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p */ __pyx_v_s0 = ((__pyx_v_v01 * __pyx_v_v12) - (__pyx_v_v02 * __pyx_v_v11)); - /* "meshCalcUnix.pyx":996 + /* "meshCalcUnix.pyx":999 * #compute cross product * s0 = v01*v12 - v02*v11 * s1 = v02*v10 - v00*v12 # <<<<<<<<<<<<<< @@ -35520,7 +35582,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p */ __pyx_v_s1 = ((__pyx_v_v02 * __pyx_v_v10) - (__pyx_v_v00 * __pyx_v_v12)); - /* "meshCalcUnix.pyx":997 + /* "meshCalcUnix.pyx":1000 * s0 = v01*v12 - v02*v11 * s1 = v02*v10 - v00*v12 * s2 = v00*v11 - v01*v10 # <<<<<<<<<<<<<< @@ -35529,7 +35591,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p */ __pyx_v_s2 = ((__pyx_v_v00 * __pyx_v_v11) - (__pyx_v_v01 * __pyx_v_v10)); - /* "meshCalcUnix.pyx":1000 + /* "meshCalcUnix.pyx":1003 * * #compute dot product (gives orientation) * N = s0*v20 + s1*v21 + s2*v22 # <<<<<<<<<<<<<< @@ -35538,7 +35600,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p */ __pyx_v_N = (((__pyx_v_s0 * __pyx_v_v20) + (__pyx_v_s1 * __pyx_v_v21)) + (__pyx_v_s2 * __pyx_v_v22)); - /* "meshCalcUnix.pyx":1002 + /* "meshCalcUnix.pyx":1005 * N = s0*v20 + s1*v21 + s2*v22 * * if N>0: # then tetrahedra is clockwise # <<<<<<<<<<<<<< @@ -35548,7 +35610,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = (__pyx_v_N > 0.0); if (__pyx_t_24) { - /* "meshCalcUnix.pyx":1003 + /* "meshCalcUnix.pyx":1006 * * if N>0: # then tetrahedra is clockwise * countv[i] = 1 # <<<<<<<<<<<<<< @@ -35558,7 +35620,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_22 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_countv.data + __pyx_t_22 * __pyx_v_countv.strides[0]) )) = 1; - /* "meshCalcUnix.pyx":1004 + /* "meshCalcUnix.pyx":1007 * if N>0: # then tetrahedra is clockwise * countv[i] = 1 * conv[i,1] = connection[i,0] # <<<<<<<<<<<<<< @@ -35571,7 +35633,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 1; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_conv.data + __pyx_t_19 * __pyx_v_conv.strides[0]) ) + __pyx_t_18 * __pyx_v_conv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_22 * __pyx_v_connection.strides[0]) ) + __pyx_t_21 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1005 + /* "meshCalcUnix.pyx":1008 * countv[i] = 1 * conv[i,1] = connection[i,0] * conv[i,0] = connection[i,1] # <<<<<<<<<<<<<< @@ -35584,7 +35646,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 0; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_conv.data + __pyx_t_18 * __pyx_v_conv.strides[0]) ) + __pyx_t_19 * __pyx_v_conv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_21 * __pyx_v_connection.strides[0]) ) + __pyx_t_22 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1006 + /* "meshCalcUnix.pyx":1009 * conv[i,1] = connection[i,0] * conv[i,0] = connection[i,1] * ccwv[i] = 1 # <<<<<<<<<<<<<< @@ -35594,7 +35656,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_22 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_ccwv.data + __pyx_t_22 * __pyx_v_ccwv.strides[0]) )) = 1; - /* "meshCalcUnix.pyx":1002 + /* "meshCalcUnix.pyx":1005 * N = s0*v20 + s1*v21 + s2*v22 * * if N>0: # then tetrahedra is clockwise # <<<<<<<<<<<<<< @@ -35604,7 +35666,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p goto __pyx_L10; } - /* "meshCalcUnix.pyx":1007 + /* "meshCalcUnix.pyx":1010 * conv[i,0] = connection[i,1] * ccwv[i] = 1 * elif N<0: # then its counter clockwise # <<<<<<<<<<<<<< @@ -35614,7 +35676,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = (__pyx_v_N < 0.0); if (__pyx_t_24) { - /* "meshCalcUnix.pyx":1008 + /* "meshCalcUnix.pyx":1011 * ccwv[i] = 1 * elif N<0: # then its counter clockwise * conv[i,0] = connection[i,0] # <<<<<<<<<<<<<< @@ -35627,7 +35689,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 0; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_conv.data + __pyx_t_19 * __pyx_v_conv.strides[0]) ) + __pyx_t_18 * __pyx_v_conv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_22 * __pyx_v_connection.strides[0]) ) + __pyx_t_21 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1009 + /* "meshCalcUnix.pyx":1012 * elif N<0: # then its counter clockwise * conv[i,0] = connection[i,0] * conv[i,1] = connection[i,1] # <<<<<<<<<<<<<< @@ -35640,7 +35702,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 1; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_conv.data + __pyx_t_18 * __pyx_v_conv.strides[0]) ) + __pyx_t_19 * __pyx_v_conv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_21 * __pyx_v_connection.strides[0]) ) + __pyx_t_22 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1010 + /* "meshCalcUnix.pyx":1013 * conv[i,0] = connection[i,0] * conv[i,1] = connection[i,1] * ccwv[i] = 2 # <<<<<<<<<<<<<< @@ -35650,7 +35712,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_22 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_ccwv.data + __pyx_t_22 * __pyx_v_ccwv.strides[0]) )) = 2; - /* "meshCalcUnix.pyx":1007 + /* "meshCalcUnix.pyx":1010 * conv[i,0] = connection[i,1] * ccwv[i] = 1 * elif N<0: # then its counter clockwise # <<<<<<<<<<<<<< @@ -35660,7 +35722,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p goto __pyx_L10; } - /* "meshCalcUnix.pyx":1012 + /* "meshCalcUnix.pyx":1015 * ccwv[i] = 2 * else: # shouldn't be possible * ccwv[i] = 0 # <<<<<<<<<<<<<< @@ -35671,7 +35733,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_22 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_ccwv.data + __pyx_t_22 * __pyx_v_ccwv.strides[0]) )) = 0; - /* "meshCalcUnix.pyx":1013 + /* "meshCalcUnix.pyx":1016 * else: # shouldn't be possible * ccwv[i] = 0 * ei = i #problem index # <<<<<<<<<<<<<< @@ -35682,7 +35744,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p } __pyx_L10:; - /* "meshCalcUnix.pyx":1015 + /* "meshCalcUnix.pyx":1018 * ei = i #problem index * * conv[i,2] = connection[i,2] # <<<<<<<<<<<<<< @@ -35695,7 +35757,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 2; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_conv.data + __pyx_t_19 * __pyx_v_conv.strides[0]) ) + __pyx_t_18 * __pyx_v_conv.strides[1]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_22 * __pyx_v_connection.strides[0]) ) + __pyx_t_21 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1016 + /* "meshCalcUnix.pyx":1019 * * conv[i,2] = connection[i,2] * conv[i,3] = connection[i,3] # <<<<<<<<<<<<<< @@ -35720,7 +35782,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p #endif } - /* "meshCalcUnix.pyx":983 + /* "meshCalcUnix.pyx":986 * * #with nogil, parallel(num_threads=num_threads): * for i in prange(numel,nogil=True,num_threads=num_threads,schedule='static'): # <<<<<<<<<<<<<< @@ -35739,7 +35801,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":1018 + /* "meshCalcUnix.pyx":1021 * conv[i,3] = connection[i,3] * * for i in range(numel): # <<<<<<<<<<<<<< @@ -35751,7 +35813,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_25; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; - /* "meshCalcUnix.pyx":1019 + /* "meshCalcUnix.pyx":1022 * * for i in range(numel): * if ccwv[i]==0: # <<<<<<<<<<<<<< @@ -35762,26 +35824,26 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p __pyx_t_24 = ((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_ccwv.data + __pyx_t_22 * __pyx_v_ccwv.strides[0]) ))) == 0); if (unlikely(__pyx_t_24)) { - /* "meshCalcUnix.pyx":1020 + /* "meshCalcUnix.pyx":1023 * for i in range(numel): * if ccwv[i]==0: * raise ValueError('Element %i has all colinear nodes, thus is poorly formed and can not be ordered'%ei) # <<<<<<<<<<<<<< * count_out = sum(count) * */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ei); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_ei); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Element_i_has_all_colinear_nodes, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Element_i_has_all_colinear_nodes, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1020, __pyx_L1_error) + __PYX_ERR(0, 1023, __pyx_L1_error) - /* "meshCalcUnix.pyx":1019 + /* "meshCalcUnix.pyx":1022 * * for i in range(numel): * if ccwv[i]==0: # <<<<<<<<<<<<<< @@ -35791,20 +35853,20 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":1021 + /* "meshCalcUnix.pyx":1024 * if ccwv[i]==0: * raise ValueError('Element %i has all colinear nodes, thus is poorly formed and can not be ordered'%ei) * count_out = sum(count) # <<<<<<<<<<<<<< * * return con, count_out, ccw */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, ((PyObject *)__pyx_v_count)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, ((PyObject *)__pyx_v_count)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_count_out = __pyx_t_15; - /* "meshCalcUnix.pyx":1023 + /* "meshCalcUnix.pyx":1026 * count_out = sum(count) * * return con, count_out, ccw # <<<<<<<<<<<<<< @@ -35812,24 +35874,24 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_count_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_count_out); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_con); __Pyx_GIVEREF((PyObject *)__pyx_v_con); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_con))) __PYX_ERR(0, 1023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_con))) __PYX_ERR(0, 1026, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_ccw); __Pyx_GIVEREF((PyObject *)__pyx_v_ccw); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_ccw))) __PYX_ERR(0, 1023, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_v_ccw))) __PYX_ERR(0, 1026, __pyx_L1_error); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":931 + /* "meshCalcUnix.pyx":934 * return new_connection, node_out, numel*8, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -35886,7 +35948,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p return __pyx_r; } -/* "meshCalcUnix.pyx":1025 +/* "meshCalcUnix.pyx":1028 * return con, count_out, ccw * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -35951,7 +36013,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1028, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -35959,14 +36021,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1028, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("orderQuad", 1, 2, 2, 1); __PYX_ERR(0, 1025, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("orderQuad", 1, 2, 2, 1); __PYX_ERR(0, 1028, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "orderQuad") < 0)) __PYX_ERR(0, 1025, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "orderQuad") < 0)) __PYX_ERR(0, 1028, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -35974,12 +36036,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1027, __pyx_L3_error) - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1027, __pyx_L3_error) + __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1030, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1030, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("orderQuad", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1025, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("orderQuad", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1028, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -36100,7 +36162,7 @@ static PyObject *__pyx_pf_8meshCalc_24orderQuad(CYTHON_UNUSED PyObject *__pyx_se __pyx_pybuffernd_count.data = NULL; __pyx_pybuffernd_count.rcbuffer = &__pyx_pybuffer_count; - /* "meshCalcUnix.pyx":1046 + /* "meshCalcUnix.pyx":1049 * """ * #get the number of nodes and elements etc * cdef int numel = connection.shape[0] # <<<<<<<<<<<<<< @@ -36109,7 +36171,7 @@ static PyObject *__pyx_pf_8meshCalc_24orderQuad(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_numel = (__pyx_v_connection.shape[0]); - /* "meshCalcUnix.pyx":1047 + /* "meshCalcUnix.pyx":1050 * #get the number of nodes and elements etc * cdef int numel = connection.shape[0] * cdef int npere = connection.shape[1] # <<<<<<<<<<<<<< @@ -36118,7 +36180,7 @@ static PyObject *__pyx_pf_8meshCalc_24orderQuad(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_npere = (__pyx_v_connection.shape[1]); - /* "meshCalcUnix.pyx":1049 + /* "meshCalcUnix.pyx":1052 * cdef int npere = connection.shape[1] * * if npere!=4: # <<<<<<<<<<<<<< @@ -36128,20 +36190,20 @@ static PyObject *__pyx_pf_8meshCalc_24orderQuad(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_1 = (__pyx_v_npere != 4); if (unlikely(__pyx_t_1)) { - /* "meshCalcUnix.pyx":1050 + /* "meshCalcUnix.pyx":1053 * * if npere!=4: * raise ValueError('Got the wrong number of nodes per element when ordering mesh nodes') # <<<<<<<<<<<<<< * * con = np.zeros((numel,npere), dtype=DINT)# new connection matrix */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1050, __pyx_L1_error) + __PYX_ERR(0, 1053, __pyx_L1_error) - /* "meshCalcUnix.pyx":1049 + /* "meshCalcUnix.pyx":1052 * cdef int npere = connection.shape[1] * * if npere!=4: # <<<<<<<<<<<<<< @@ -36150,42 +36212,42 @@ static PyObject *__pyx_pf_8meshCalc_24orderQuad(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "meshCalcUnix.pyx":1052 + /* "meshCalcUnix.pyx":1055 * raise ValueError('Got the wrong number of nodes per element when ordering mesh nodes') * * con = np.zeros((numel,npere), dtype=DINT)# new connection matrix # <<<<<<<<<<<<<< * cdef int[:,:] conv = con # connection view * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1052, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1052, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -36193,28 +36255,28 @@ static PyObject *__pyx_pf_8meshCalc_24orderQuad(CYTHON_UNUSED PyObject *__pyx_se __pyx_v_con = __pyx_t_2; __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":1053 + /* "meshCalcUnix.pyx":1056 * * con = np.zeros((numel,npere), dtype=DINT)# new connection matrix * cdef int[:,:] conv = con # connection view # <<<<<<<<<<<<<< * * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) */ - __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_v_con, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1053, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_to_MemoryviewSlice_dsds_int(__pyx_v_con, PyBUF_WRITABLE); if (unlikely(!__pyx_t_6.memview)) __PYX_ERR(0, 1056, __pyx_L1_error) __pyx_v_conv = __pyx_t_6; __pyx_t_6.memview = NULL; __pyx_t_6.data = NULL; - /* "meshCalcUnix.pyx":1055 + /* "meshCalcUnix.pyx":1058 * cdef int[:,:] conv = con # connection view * * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) # <<<<<<<<<<<<<< * cdef np.ndarray[double, ndim=1] node_y = np.asarray(node[:,1],dtype=float) * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7.data = __pyx_v_node.data; @@ -36230,30 +36292,30 @@ __pyx_t_7.strides[0] = __pyx_v_node.strides[0]; __pyx_t_7.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) +__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1055, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1058, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __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_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1055, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1058, __pyx_L1_error) __pyx_t_8 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_x.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_node_x = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_x.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1055, __pyx_L1_error) + __PYX_ERR(0, 1058, __pyx_L1_error) } else {__pyx_pybuffernd_node_x.diminfo[0].strides = __pyx_pybuffernd_node_x.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_x.diminfo[0].shape = __pyx_pybuffernd_node_x.rcbuffer->pybuffer.shape[0]; } } @@ -36261,16 +36323,16 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_v_node_x = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1056 + /* "meshCalcUnix.pyx":1059 * * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) * cdef np.ndarray[double, ndim=1] node_y = np.asarray(node[:,1],dtype=float) # <<<<<<<<<<<<<< * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7.data = __pyx_v_node.data; @@ -36286,30 +36348,30 @@ __pyx_t_7.strides[0] = __pyx_v_node.strides[0]; __pyx_t_7.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1056, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1056, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1059, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1056, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1059, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_y.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_node_y = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_y.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1056, __pyx_L1_error) + __PYX_ERR(0, 1059, __pyx_L1_error) } else {__pyx_pybuffernd_node_y.diminfo[0].strides = __pyx_pybuffernd_node_y.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_y.diminfo[0].shape = __pyx_pybuffernd_node_y.rcbuffer->pybuffer.shape[0]; } } @@ -36317,16 +36379,16 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_v_node_y = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1057 + /* "meshCalcUnix.pyx":1060 * cdef np.ndarray[double, ndim=1] node_x = np.asarray(node[:,0],dtype=float) * cdef np.ndarray[double, ndim=1] node_y = np.asarray(node[:,1],dtype=float) * cdef np.ndarray[double, ndim=1] node_z = np.asarray(node[:,2],dtype=float) # <<<<<<<<<<<<<< * * #loop varaibles */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1057, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7.data = __pyx_v_node.data; @@ -36342,30 +36404,30 @@ __pyx_t_7.strides[0] = __pyx_v_node.strides[0]; __pyx_t_7.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1057, __pyx_L1_error) +__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __PYX_XCLEAR_MEMVIEW(&__pyx_t_7, 1); __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1057, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1057, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1057, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1060, __pyx_L1_error) __pyx_t_10 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_z.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_node_z = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_z.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1057, __pyx_L1_error) + __PYX_ERR(0, 1060, __pyx_L1_error) } else {__pyx_pybuffernd_node_z.diminfo[0].strides = __pyx_pybuffernd_node_z.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_z.diminfo[0].shape = __pyx_pybuffernd_node_z.rcbuffer->pybuffer.shape[0]; } } @@ -36373,146 +36435,146 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_v_node_z = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":1060 + /* "meshCalcUnix.pyx":1063 * * #loop varaibles * cdef double[:] x = np.zeros(4,dtype=float) # x array # <<<<<<<<<<<<<< * cdef double[:] z = np.zeros(4,dtype=float) # z array * cdef double[:] xtmp = np.zeros(4,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1060, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__15, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1063, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__15, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_x = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1061 + /* "meshCalcUnix.pyx":1064 * #loop varaibles * cdef double[:] x = np.zeros(4,dtype=float) # x array * cdef double[:] z = np.zeros(4,dtype=float) # z array # <<<<<<<<<<<<<< * cdef double[:] xtmp = np.zeros(4,dtype=float) * cdef double[:] ztmp = np.zeros(4,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1061, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1061, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__15, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1061, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__15, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1061, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1064, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_z = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1062 + /* "meshCalcUnix.pyx":1065 * cdef double[:] x = np.zeros(4,dtype=float) # x array * cdef double[:] z = np.zeros(4,dtype=float) # z array * cdef double[:] xtmp = np.zeros(4,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] ztmp = np.zeros(4,dtype=float) * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1062, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1062, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_xtmp = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1063 + /* "meshCalcUnix.pyx":1066 * cdef double[:] z = np.zeros(4,dtype=float) # z array * cdef double[:] xtmp = np.zeros(4,dtype=float) * cdef double[:] ztmp = np.zeros(4,dtype=float) # <<<<<<<<<<<<<< * * cdef np.ndarray[long long, ndim=1] count = np.zeros(numel,dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1063, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1063, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__15, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1063, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1066, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__15, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1063, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_ztmp = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1065 + /* "meshCalcUnix.pyx":1068 * cdef double[:] ztmp = np.zeros(4,dtype=float) * * cdef np.ndarray[long long, ndim=1] count = np.zeros(numel,dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long[:] countv = count * cdef int count_out */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1065, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 1065, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_11) < 0) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1065, __pyx_L1_error) + if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1068, __pyx_L1_error) __pyx_t_12 = ((PyArrayObject *)__pyx_t_11); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_count.rcbuffer->pybuffer, (PyObject*)__pyx_t_12, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_count = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_count.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1065, __pyx_L1_error) + __PYX_ERR(0, 1068, __pyx_L1_error) } else {__pyx_pybuffernd_count.diminfo[0].strides = __pyx_pybuffernd_count.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_count.diminfo[0].shape = __pyx_pybuffernd_count.rcbuffer->pybuffer.shape[0]; } } @@ -36520,91 +36582,91 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_v_count = ((PyArrayObject *)__pyx_t_11); __pyx_t_11 = 0; - /* "meshCalcUnix.pyx":1066 + /* "meshCalcUnix.pyx":1069 * * cdef np.ndarray[long long, ndim=1] count = np.zeros(numel,dtype=np.int64) * cdef long long[:] countv = count # <<<<<<<<<<<<<< * cdef int count_out * */ - __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_count), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 1066, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_count), PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 1069, __pyx_L1_error) __pyx_v_countv = __pyx_t_13; __pyx_t_13.memview = NULL; __pyx_t_13.data = NULL; - /* "meshCalcUnix.pyx":1069 + /* "meshCalcUnix.pyx":1072 * cdef int count_out * * cdef double[:] theta = np.zeros(4,dtype=float) # theta array # <<<<<<<<<<<<<< * * cdef long long[:] order = np.zeros(4,dtype=np.int64) #ordering array */ - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1069, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1069, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1069, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1072, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_theta = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1071 + /* "meshCalcUnix.pyx":1074 * cdef double[:] theta = np.zeros(4,dtype=float) # theta array * * cdef long long[:] order = np.zeros(4,dtype=np.int64) #ordering array # <<<<<<<<<<<<<< * * cdef double pi = np.pi */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1071, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1071, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__15, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__15, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 1071, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_13.memview)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_order = __pyx_t_13; __pyx_t_13.memview = NULL; __pyx_t_13.data = NULL; - /* "meshCalcUnix.pyx":1073 + /* "meshCalcUnix.pyx":1076 * cdef long long[:] order = np.zeros(4,dtype=np.int64) #ordering array * * cdef double pi = np.pi # <<<<<<<<<<<<<< * cdef int i, k, c, j * cdef int eflag = 0 # error flag */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_pi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L1_error) + __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_pi = __pyx_t_14; - /* "meshCalcUnix.pyx":1075 + /* "meshCalcUnix.pyx":1078 * cdef double pi = np.pi * cdef int i, k, c, j * cdef int eflag = 0 # error flag # <<<<<<<<<<<<<< @@ -36613,7 +36675,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ __pyx_v_eflag = 0; - /* "meshCalcUnix.pyx":1077 + /* "meshCalcUnix.pyx":1080 * cdef int eflag = 0 # error flag * cdef int ei # error number * cdef int num_threads = 1 # <<<<<<<<<<<<<< @@ -36622,39 +36684,39 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ __pyx_v_num_threads = 1; - /* "meshCalcUnix.pyx":1079 + /* "meshCalcUnix.pyx":1082 * cdef int num_threads = 1 * cdef double minx, minz * cdef double xinf = 10*max(node_x) # infinite like x # <<<<<<<<<<<<<< * cdef double zinf = 10*max(node_z) # infinite like z * cdef double tinf = 314 #infinite like theta */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_node_x)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_node_x)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyInt_MultiplyCObj(__pyx_int_10, __pyx_t_5, 10, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_MultiplyCObj(__pyx_int_10, __pyx_t_5, 10, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_2); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_xinf = __pyx_t_14; - /* "meshCalcUnix.pyx":1080 + /* "meshCalcUnix.pyx":1083 * cdef double minx, minz * cdef double xinf = 10*max(node_x) # infinite like x * cdef double zinf = 10*max(node_z) # infinite like z # <<<<<<<<<<<<<< * cdef double tinf = 314 #infinite like theta * cdef double mtheta */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_node_z)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_node_z)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_MultiplyCObj(__pyx_int_10, __pyx_t_2, 10, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_MultiplyCObj(__pyx_int_10, __pyx_t_2, 10, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_t_14 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_14 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_zinf = __pyx_t_14; - /* "meshCalcUnix.pyx":1081 + /* "meshCalcUnix.pyx":1084 * cdef double xinf = 10*max(node_x) # infinite like x * cdef double zinf = 10*max(node_z) # infinite like z * cdef double tinf = 314 #infinite like theta # <<<<<<<<<<<<<< @@ -36663,7 +36725,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ __pyx_v_tinf = 314.0; - /* "meshCalcUnix.pyx":1089 + /* "meshCalcUnix.pyx":1092 * #max angle >>> upper left most point * * for i in range(numel): # <<<<<<<<<<<<<< @@ -36675,7 +36737,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_17 = 0; __pyx_t_17 < __pyx_t_16; __pyx_t_17+=1) { __pyx_v_i = __pyx_t_17; - /* "meshCalcUnix.pyx":1091 + /* "meshCalcUnix.pyx":1094 * for i in range(numel): * #could make loop parallel in future? * for j in range(4): # <<<<<<<<<<<<<< @@ -36685,7 +36747,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 4; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":1092 + /* "meshCalcUnix.pyx":1095 * #could make loop parallel in future? * for j in range(4): * x[j] = node_x[connection[i,j]] # <<<<<<<<<<<<<< @@ -36698,7 +36760,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_22 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_22 * __pyx_v_x.strides[0]) )) = (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_node_x.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_node_x.diminfo[0].strides)); - /* "meshCalcUnix.pyx":1093 + /* "meshCalcUnix.pyx":1096 * for j in range(4): * x[j] = node_x[connection[i,j]] * z[j] = node_z[connection[i,j]] # <<<<<<<<<<<<<< @@ -36712,17 +36774,17 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p *((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_22 * __pyx_v_z.strides[0]) )) = (*__Pyx_BufPtrStrided1d(double *, __pyx_pybuffernd_node_z.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_node_z.diminfo[0].strides)); } - /* "meshCalcUnix.pyx":1096 + /* "meshCalcUnix.pyx":1099 * * #find starting x coordinate * minx = fmin(x) # <<<<<<<<<<<<<< * c = 0 # rolling count * #protect against colinear points on left hand side of quad */ - __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_x); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_x); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1099, __pyx_L1_error) __pyx_v_minx = __pyx_t_14; - /* "meshCalcUnix.pyx":1097 + /* "meshCalcUnix.pyx":1100 * #find starting x coordinate * minx = fmin(x) * c = 0 # rolling count # <<<<<<<<<<<<<< @@ -36731,7 +36793,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ __pyx_v_c = 0; - /* "meshCalcUnix.pyx":1099 + /* "meshCalcUnix.pyx":1102 * c = 0 # rolling count * #protect against colinear points on left hand side of quad * for j in range(4): # <<<<<<<<<<<<<< @@ -36741,7 +36803,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 4; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":1100 + /* "meshCalcUnix.pyx":1103 * #protect against colinear points on left hand side of quad * for j in range(4): * if x[j] == minx: # <<<<<<<<<<<<<< @@ -36752,7 +36814,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_1 = ((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_19 * __pyx_v_x.strides[0]) ))) == __pyx_v_minx); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1101 + /* "meshCalcUnix.pyx":1104 * for j in range(4): * if x[j] == minx: * ztmp[j] = z[j] # <<<<<<<<<<<<<< @@ -36763,7 +36825,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_ztmp.data + __pyx_t_20 * __pyx_v_ztmp.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_19 * __pyx_v_z.strides[0]) ))); - /* "meshCalcUnix.pyx":1102 + /* "meshCalcUnix.pyx":1105 * if x[j] == minx: * ztmp[j] = z[j] * xtmp[j] = x[j] # put in array where x == min(x) # <<<<<<<<<<<<<< @@ -36774,7 +36836,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_xtmp.data + __pyx_t_20 * __pyx_v_xtmp.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_19 * __pyx_v_x.strides[0]) ))); - /* "meshCalcUnix.pyx":1103 + /* "meshCalcUnix.pyx":1106 * ztmp[j] = z[j] * xtmp[j] = x[j] # put in array where x == min(x) * c = c + 1 # <<<<<<<<<<<<<< @@ -36783,7 +36845,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ __pyx_v_c = (__pyx_v_c + 1); - /* "meshCalcUnix.pyx":1100 + /* "meshCalcUnix.pyx":1103 * #protect against colinear points on left hand side of quad * for j in range(4): * if x[j] == minx: # <<<<<<<<<<<<<< @@ -36793,7 +36855,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p goto __pyx_L10; } - /* "meshCalcUnix.pyx":1105 + /* "meshCalcUnix.pyx":1108 * c = c + 1 * else: * ztmp[j] = zinf # <<<<<<<<<<<<<< @@ -36804,7 +36866,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_ztmp.data + __pyx_t_19 * __pyx_v_ztmp.strides[0]) )) = __pyx_v_zinf; - /* "meshCalcUnix.pyx":1106 + /* "meshCalcUnix.pyx":1109 * else: * ztmp[j] = zinf * xtmp[j] = xinf # <<<<<<<<<<<<<< @@ -36817,17 +36879,17 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_L10:; } - /* "meshCalcUnix.pyx":1109 + /* "meshCalcUnix.pyx":1112 * * #min z coordinate * minz = fmin(ztmp) # <<<<<<<<<<<<<< * if c>2: # then there is more than one min x coordinate (presumably 2 at most) * eflag = 1 */ - __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_ztmp); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_ztmp); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1112, __pyx_L1_error) __pyx_v_minz = __pyx_t_14; - /* "meshCalcUnix.pyx":1110 + /* "meshCalcUnix.pyx":1113 * #min z coordinate * minz = fmin(ztmp) * if c>2: # then there is more than one min x coordinate (presumably 2 at most) # <<<<<<<<<<<<<< @@ -36837,7 +36899,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_1 = (__pyx_v_c > 2); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1111 + /* "meshCalcUnix.pyx":1114 * minz = fmin(ztmp) * if c>2: # then there is more than one min x coordinate (presumably 2 at most) * eflag = 1 # <<<<<<<<<<<<<< @@ -36846,7 +36908,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ __pyx_v_eflag = 1; - /* "meshCalcUnix.pyx":1112 + /* "meshCalcUnix.pyx":1115 * if c>2: # then there is more than one min x coordinate (presumably 2 at most) * eflag = 1 * ei = i # <<<<<<<<<<<<<< @@ -36855,7 +36917,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ __pyx_v_ei = __pyx_v_i; - /* "meshCalcUnix.pyx":1110 + /* "meshCalcUnix.pyx":1113 * #min z coordinate * minz = fmin(ztmp) * if c>2: # then there is more than one min x coordinate (presumably 2 at most) # <<<<<<<<<<<<<< @@ -36864,7 +36926,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ } - /* "meshCalcUnix.pyx":1115 + /* "meshCalcUnix.pyx":1118 * * #create order angle * for j in range(4): # <<<<<<<<<<<<<< @@ -36874,7 +36936,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 4; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":1116 + /* "meshCalcUnix.pyx":1119 * #create order angle * for j in range(4): * if x[j] == minx and z[j] == minz:#baseline point # <<<<<<<<<<<<<< @@ -36894,7 +36956,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_L15_bool_binop_done:; if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1117 + /* "meshCalcUnix.pyx":1120 * for j in range(4): * if x[j] == minx and z[j] == minz:#baseline point * theta[j] = 0 # <<<<<<<<<<<<<< @@ -36904,7 +36966,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_theta.data + __pyx_t_19 * __pyx_v_theta.strides[0]) )) = 0.0; - /* "meshCalcUnix.pyx":1116 + /* "meshCalcUnix.pyx":1119 * #create order angle * for j in range(4): * if x[j] == minx and z[j] == minz:#baseline point # <<<<<<<<<<<<<< @@ -36914,7 +36976,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p goto __pyx_L14; } - /* "meshCalcUnix.pyx":1118 + /* "meshCalcUnix.pyx":1121 * if x[j] == minx and z[j] == minz:#baseline point * theta[j] = 0 * elif x[j] == minx and z[j] != minz: # colinear point # <<<<<<<<<<<<<< @@ -36934,7 +36996,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_L17_bool_binop_done:; if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1119 + /* "meshCalcUnix.pyx":1122 * theta[j] = 0 * elif x[j] == minx and z[j] != minz: # colinear point * theta[j] = pi # <<<<<<<<<<<<<< @@ -36944,7 +37006,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_theta.data + __pyx_t_19 * __pyx_v_theta.strides[0]) )) = __pyx_v_pi; - /* "meshCalcUnix.pyx":1118 + /* "meshCalcUnix.pyx":1121 * if x[j] == minx and z[j] == minz:#baseline point * theta[j] = 0 * elif x[j] == minx and z[j] != minz: # colinear point # <<<<<<<<<<<<<< @@ -36954,7 +37016,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p goto __pyx_L14; } - /* "meshCalcUnix.pyx":1120 + /* "meshCalcUnix.pyx":1123 * elif x[j] == minx and z[j] != minz: # colinear point * theta[j] = pi * elif x[j] != minx and z[j] == minz: #colinear on z axis # <<<<<<<<<<<<<< @@ -36974,7 +37036,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_L19_bool_binop_done:; if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1121 + /* "meshCalcUnix.pyx":1124 * theta[j] = pi * elif x[j] != minx and z[j] == minz: #colinear on z axis * theta[j] = pi/2 # <<<<<<<<<<<<<< @@ -36984,7 +37046,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_theta.data + __pyx_t_19 * __pyx_v_theta.strides[0]) )) = (__pyx_v_pi / 2.0); - /* "meshCalcUnix.pyx":1120 + /* "meshCalcUnix.pyx":1123 * elif x[j] == minx and z[j] != minz: # colinear point * theta[j] = pi * elif x[j] != minx and z[j] == minz: #colinear on z axis # <<<<<<<<<<<<<< @@ -36994,7 +37056,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p goto __pyx_L14; } - /* "meshCalcUnix.pyx":1123 + /* "meshCalcUnix.pyx":1126 * theta[j] = pi/2 * else: * dx = x[j] - minx # <<<<<<<<<<<<<< @@ -37005,7 +37067,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; __pyx_v_dx = ((*((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_19 * __pyx_v_x.strides[0]) ))) - __pyx_v_minx); - /* "meshCalcUnix.pyx":1124 + /* "meshCalcUnix.pyx":1127 * else: * dx = x[j] - minx * dz = z[j] - minz # <<<<<<<<<<<<<< @@ -37015,7 +37077,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; __pyx_v_dz = ((*((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_19 * __pyx_v_z.strides[0]) ))) - __pyx_v_minz); - /* "meshCalcUnix.pyx":1125 + /* "meshCalcUnix.pyx":1128 * dx = x[j] - minx * dz = z[j] - minz * a = atan(dz/dx) # <<<<<<<<<<<<<< @@ -37024,11 +37086,11 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ if (unlikely(__pyx_v_dx == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1125, __pyx_L1_error) + __PYX_ERR(0, 1128, __pyx_L1_error) } __pyx_v_a = atan((__pyx_v_dz / __pyx_v_dx)); - /* "meshCalcUnix.pyx":1126 + /* "meshCalcUnix.pyx":1129 * dz = z[j] - minz * a = atan(dz/dx) * theta[j] = (pi/2) + a # <<<<<<<<<<<<<< @@ -37041,17 +37103,17 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_L14:; } - /* "meshCalcUnix.pyx":1128 + /* "meshCalcUnix.pyx":1131 * theta[j] = (pi/2) + a * * mtheta = fmin(theta) # min theta # <<<<<<<<<<<<<< * for j in range(4): * for k in range(4): */ - __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_theta); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1128, __pyx_L1_error) + __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_theta); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L1_error) __pyx_v_mtheta = __pyx_t_14; - /* "meshCalcUnix.pyx":1129 + /* "meshCalcUnix.pyx":1132 * * mtheta = fmin(theta) # min theta * for j in range(4): # <<<<<<<<<<<<<< @@ -37061,7 +37123,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 4; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":1130 + /* "meshCalcUnix.pyx":1133 * mtheta = fmin(theta) # min theta * for j in range(4): * for k in range(4): # <<<<<<<<<<<<<< @@ -37071,7 +37133,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_24 = 0; __pyx_t_24 < 4; __pyx_t_24+=1) { __pyx_v_k = __pyx_t_24; - /* "meshCalcUnix.pyx":1131 + /* "meshCalcUnix.pyx":1134 * for j in range(4): * for k in range(4): * if theta[k] == mtheta: # <<<<<<<<<<<<<< @@ -37082,7 +37144,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_1 = ((*((double *) ( /* dim=0 */ (__pyx_v_theta.data + __pyx_t_19 * __pyx_v_theta.strides[0]) ))) == __pyx_v_mtheta); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1132 + /* "meshCalcUnix.pyx":1135 * for k in range(4): * if theta[k] == mtheta: * theta[k] = tinf # <<<<<<<<<<<<<< @@ -37092,7 +37154,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_k; *((double *) ( /* dim=0 */ (__pyx_v_theta.data + __pyx_t_19 * __pyx_v_theta.strides[0]) )) = __pyx_v_tinf; - /* "meshCalcUnix.pyx":1133 + /* "meshCalcUnix.pyx":1136 * if theta[k] == mtheta: * theta[k] = tinf * order[j] = k # <<<<<<<<<<<<<< @@ -37102,17 +37164,17 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_j; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_order.data + __pyx_t_19 * __pyx_v_order.strides[0]) )) = __pyx_v_k; - /* "meshCalcUnix.pyx":1134 + /* "meshCalcUnix.pyx":1137 * theta[k] = tinf * order[j] = k * mtheta = fmin(theta) # <<<<<<<<<<<<<< * break * */ - __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_theta); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1134, __pyx_L1_error) + __pyx_t_14 = __pyx_f_8meshCalc_fmin(__pyx_v_theta); if (unlikely(__pyx_t_14 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1137, __pyx_L1_error) __pyx_v_mtheta = __pyx_t_14; - /* "meshCalcUnix.pyx":1135 + /* "meshCalcUnix.pyx":1138 * order[j] = k * mtheta = fmin(theta) * break # <<<<<<<<<<<<<< @@ -37121,7 +37183,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ goto __pyx_L24_break; - /* "meshCalcUnix.pyx":1131 + /* "meshCalcUnix.pyx":1134 * for j in range(4): * for k in range(4): * if theta[k] == mtheta: # <<<<<<<<<<<<<< @@ -37133,7 +37195,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_L24_break:; } - /* "meshCalcUnix.pyx":1137 + /* "meshCalcUnix.pyx":1140 * break * * for j in range(4):# flag if order changes >>> count as ordered element # <<<<<<<<<<<<<< @@ -37143,7 +37205,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 4; __pyx_t_18+=1) { __pyx_v_j = __pyx_t_18; - /* "meshCalcUnix.pyx":1138 + /* "meshCalcUnix.pyx":1141 * * for j in range(4):# flag if order changes >>> count as ordered element * if order[j] != j:#order has been changed # <<<<<<<<<<<<<< @@ -37154,7 +37216,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_1 = ((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_order.data + __pyx_t_19 * __pyx_v_order.strides[0]) ))) != __pyx_v_j); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1139 + /* "meshCalcUnix.pyx":1142 * for j in range(4):# flag if order changes >>> count as ordered element * if order[j] != j:#order has been changed * countv[i] = 1 # <<<<<<<<<<<<<< @@ -37164,7 +37226,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_countv.data + __pyx_t_19 * __pyx_v_countv.strides[0]) )) = 1; - /* "meshCalcUnix.pyx":1140 + /* "meshCalcUnix.pyx":1143 * if order[j] != j:#order has been changed * countv[i] = 1 * break # <<<<<<<<<<<<<< @@ -37173,7 +37235,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ goto __pyx_L27_break; - /* "meshCalcUnix.pyx":1138 + /* "meshCalcUnix.pyx":1141 * * for j in range(4):# flag if order changes >>> count as ordered element * if order[j] != j:#order has been changed # <<<<<<<<<<<<<< @@ -37184,7 +37246,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p } __pyx_L27_break:; - /* "meshCalcUnix.pyx":1142 + /* "meshCalcUnix.pyx":1145 * break * * for k in range(4): # <<<<<<<<<<<<<< @@ -37194,7 +37256,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p for (__pyx_t_18 = 0; __pyx_t_18 < 4; __pyx_t_18+=1) { __pyx_v_k = __pyx_t_18; - /* "meshCalcUnix.pyx":1143 + /* "meshCalcUnix.pyx":1146 * * for k in range(4): * conv[i,k] = connection[i,order[k]] # <<<<<<<<<<<<<< @@ -37210,7 +37272,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":1145 + /* "meshCalcUnix.pyx":1148 * conv[i,k] = connection[i,order[k]] * * if eflag == 1: # <<<<<<<<<<<<<< @@ -37220,26 +37282,26 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p __pyx_t_1 = (__pyx_v_eflag == 1); if (unlikely(__pyx_t_1)) { - /* "meshCalcUnix.pyx":1146 + /* "meshCalcUnix.pyx":1149 * * if eflag == 1: * raise ValueError('Element %i has more than 2 colinear points and therefore not a quad'%ei) # <<<<<<<<<<<<<< * * count_out = sum(count) */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ei); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_ei); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Element_i_has_more_than_2_coline, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Element_i_has_more_than_2_coline, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1149, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 1146, __pyx_L1_error) + __PYX_ERR(0, 1149, __pyx_L1_error) - /* "meshCalcUnix.pyx":1145 + /* "meshCalcUnix.pyx":1148 * conv[i,k] = connection[i,order[k]] * * if eflag == 1: # <<<<<<<<<<<<<< @@ -37248,20 +37310,20 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p */ } - /* "meshCalcUnix.pyx":1148 + /* "meshCalcUnix.pyx":1151 * raise ValueError('Element %i has more than 2 colinear points and therefore not a quad'%ei) * * count_out = sum(count) # <<<<<<<<<<<<<< * * return con, count_out */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, ((PyObject *)__pyx_v_count)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, ((PyObject *)__pyx_v_count)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_count_out = __pyx_t_15; - /* "meshCalcUnix.pyx":1150 + /* "meshCalcUnix.pyx":1153 * count_out = sum(count) * * return con, count_out # <<<<<<<<<<<<<< @@ -37269,21 +37331,21 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_count_out); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_count_out); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_con); __Pyx_GIVEREF(__pyx_v_con); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_con)) __PYX_ERR(0, 1150, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_con)) __PYX_ERR(0, 1153, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5)) __PYX_ERR(0, 1150, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5)) __PYX_ERR(0, 1153, __pyx_L1_error); __pyx_t_5 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":1025 + /* "meshCalcUnix.pyx":1028 * return con, count_out, ccw * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -37337,7 +37399,7 @@ __pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_7, 1, (PyObject *(*)(char *)) __p return __pyx_r; } -/* "meshCalcUnix.pyx":1152 +/* "meshCalcUnix.pyx":1155 * return con, count_out * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -37408,7 +37470,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1152, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -37416,9 +37478,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1152, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("surfaceCall", 0, 3, 4, 1); __PYX_ERR(0, 1152, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("surfaceCall", 0, 3, 4, 1); __PYX_ERR(0, 1155, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -37426,21 +37488,21 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1152, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("surfaceCall", 0, 3, 4, 2); __PYX_ERR(0, 1152, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("surfaceCall", 0, 3, 4, 2); __PYX_ERR(0, 1155, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_threads); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1152, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "surfaceCall") < 0)) __PYX_ERR(0, 1152, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "surfaceCall") < 0)) __PYX_ERR(0, 1155, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -37453,18 +37515,18 @@ PyObject *__pyx_args, PyObject *__pyx_kwds default: goto __pyx_L5_argtuple_error; } } - __pyx_v_fconnection = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection.memview)) __PYX_ERR(0, 1154, __pyx_L3_error) - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1154, __pyx_L3_error) - __pyx_v_cellcentres = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_cellcentres.memview)) __PYX_ERR(0, 1154, __pyx_L3_error) + __pyx_v_fconnection = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection.memview)) __PYX_ERR(0, 1157, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1157, __pyx_L3_error) + __pyx_v_cellcentres = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_cellcentres.memview)) __PYX_ERR(0, 1157, __pyx_L3_error) if (values[3]) { - __pyx_v_num_threads = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L3_error) + __pyx_v_num_threads = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1158, __pyx_L3_error) } else { __pyx_v_num_threads = ((int)((int)2)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("surfaceCall", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1152, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("surfaceCall", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 1155, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -37569,7 +37631,7 @@ static PyObject *__pyx_pf_8meshCalc_26surfaceCall(CYTHON_UNUSED PyObject *__pyx_ __pyx_pybuffernd_ocheck.data = NULL; __pyx_pybuffernd_ocheck.rcbuffer = &__pyx_pybuffer_ocheck; - /* "meshCalcUnix.pyx":1181 + /* "meshCalcUnix.pyx":1184 * """ * #pull out important arrays / info * cdef int nfaces = fconnection.shape[0] # <<<<<<<<<<<<<< @@ -37578,16 +37640,16 @@ static PyObject *__pyx_pf_8meshCalc_26surfaceCall(CYTHON_UNUSED PyObject *__pyx_ */ __pyx_v_nfaces = (__pyx_v_fconnection.shape[0]); - /* "meshCalcUnix.pyx":1182 + /* "meshCalcUnix.pyx":1185 * #pull out important arrays / info * cdef int nfaces = fconnection.shape[0] * cdef double[:] node_xv = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates # <<<<<<<<<<<<<< * cdef double[:] node_yv = np.asarray(node[:,1],dtype=float) * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -37603,39 +37665,39 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error) +__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1182, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_node_xv = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":1183 + /* "meshCalcUnix.pyx":1186 * cdef int nfaces = fconnection.shape[0] * cdef double[:] node_xv = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef double[:] node_yv = np.asarray(node[:,1],dtype=float) # <<<<<<<<<<<<<< * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) * cdef np.ndarray[double,ndim=1] nodez = np.asarray(node[:,2],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -37651,39 +37713,39 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error) +__pyx_t_5 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1183, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1183, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_node_yv = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":1184 + /* "meshCalcUnix.pyx":1187 * cdef double[:] node_xv = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef double[:] node_yv = np.asarray(node[:,1],dtype=float) * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) # <<<<<<<<<<<<<< * cdef np.ndarray[double,ndim=1] nodez = np.asarray(node[:,2],dtype=float) * cdef double tqz = (max(nodez) - min(nodez)) + max(nodez) # query point in z axis */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -37699,39 +37761,39 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error) +__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1184, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_3.memview)) __PYX_ERR(0, 1187, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_node_zv = __pyx_t_3; __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - /* "meshCalcUnix.pyx":1185 + /* "meshCalcUnix.pyx":1188 * cdef double[:] node_yv = np.asarray(node[:,1],dtype=float) * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) * cdef np.ndarray[double,ndim=1] nodez = np.asarray(node[:,2],dtype=float) # <<<<<<<<<<<<<< * cdef double tqz = (max(nodez) - min(nodez)) + max(nodez) # query point in z axis * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3.data = __pyx_v_node.data; @@ -37747,30 +37809,30 @@ __pyx_t_3.strides[0] = __pyx_v_node.strides[0]; __pyx_t_3.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) +__pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 1); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1185, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1185, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1185, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1188, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nodez.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_nodez = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_nodez.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1185, __pyx_L1_error) + __PYX_ERR(0, 1188, __pyx_L1_error) } else {__pyx_pybuffernd_nodez.diminfo[0].strides = __pyx_pybuffernd_nodez.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nodez.diminfo[0].shape = __pyx_pybuffernd_nodez.rcbuffer->pybuffer.shape[0]; } } @@ -37778,71 +37840,71 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_nodez = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1186 + /* "meshCalcUnix.pyx":1189 * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) * cdef np.ndarray[double,ndim=1] nodez = np.asarray(node[:,2],dtype=float) * cdef double tqz = (max(nodez) - min(nodez)) + max(nodez) # query point in z axis # <<<<<<<<<<<<<< * * cdef np.ndarray[long long,ndim=1] ocheck = np.zeros(nfaces,dtype=np.int64) */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_nodez)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_nodez)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_nodez)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, ((PyObject *)__pyx_v_nodez)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_4 = PyNumber_Subtract(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_nodez)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_nodez)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_7 = __pyx_PyFloat_AsDouble(__pyx_t_5); if (unlikely((__pyx_t_7 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_tqz = __pyx_t_7; - /* "meshCalcUnix.pyx":1188 + /* "meshCalcUnix.pyx":1191 * cdef double tqz = (max(nodez) - min(nodez)) + max(nodez) # query point in z axis * * cdef np.ndarray[long long,ndim=1] ocheck = np.zeros(nfaces,dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long[:] ocheckv = ocheck * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1188, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1188, __pyx_L1_error) + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1191, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_8); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_ocheck.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_ocheck = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_ocheck.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1188, __pyx_L1_error) + __PYX_ERR(0, 1191, __pyx_L1_error) } else {__pyx_pybuffernd_ocheck.diminfo[0].strides = __pyx_pybuffernd_ocheck.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_ocheck.diminfo[0].shape = __pyx_pybuffernd_ocheck.rcbuffer->pybuffer.shape[0]; } } @@ -37850,39 +37912,39 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_ocheck = ((PyArrayObject *)__pyx_t_8); __pyx_t_8 = 0; - /* "meshCalcUnix.pyx":1189 + /* "meshCalcUnix.pyx":1192 * * cdef np.ndarray[long long,ndim=1] ocheck = np.zeros(nfaces,dtype=np.int64) * cdef long long[:] ocheckv = ocheck # <<<<<<<<<<<<<< * * #looping variables */ - __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_ocheck), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_ocheck), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1192, __pyx_L1_error) __pyx_v_ocheckv = __pyx_t_10; __pyx_t_10.memview = NULL; __pyx_t_10.data = NULL; - /* "meshCalcUnix.pyx":1195 + /* "meshCalcUnix.pyx":1198 * cdef double bqz, xx, yy, xm, ym * * cdef double[:,:] q0 = np.zeros((nfaces,3))#query points # <<<<<<<<<<<<<< * cdef double[:,:] q1 = np.zeros((nfaces,3)) * cdef double[:,:] p0 = np.zeros((nfaces,3)) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_3)) __PYX_ERR(0, 1195, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_3)) __PYX_ERR(0, 1198, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -37903,37 +37965,37 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1195, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_q0 = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "meshCalcUnix.pyx":1196 + /* "meshCalcUnix.pyx":1199 * * cdef double[:,:] q0 = np.zeros((nfaces,3))#query points * cdef double[:,:] q1 = np.zeros((nfaces,3)) # <<<<<<<<<<<<<< * cdef double[:,:] p0 = np.zeros((nfaces,3)) * cdef double[:,:] p1 = np.zeros((nfaces,3)) */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1196, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 1196, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3)) __PYX_ERR(0, 1196, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3)) __PYX_ERR(0, 1199, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -37954,37 +38016,37 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1196, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_q1 = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "meshCalcUnix.pyx":1197 + /* "meshCalcUnix.pyx":1200 * cdef double[:,:] q0 = np.zeros((nfaces,3))#query points * cdef double[:,:] q1 = np.zeros((nfaces,3)) * cdef double[:,:] p0 = np.zeros((nfaces,3)) # <<<<<<<<<<<<<< * cdef double[:,:] p1 = np.zeros((nfaces,3)) * cdef double[:,:] p2 = np.zeros((nfaces,3)) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 1197, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 1200, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_1 = NULL; __pyx_t_11 = 0; @@ -38005,37 +38067,37 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1197, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1200, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_p0 = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "meshCalcUnix.pyx":1198 + /* "meshCalcUnix.pyx":1201 * cdef double[:,:] q1 = np.zeros((nfaces,3)) * cdef double[:,:] p0 = np.zeros((nfaces,3)) * cdef double[:,:] p1 = np.zeros((nfaces,3)) # <<<<<<<<<<<<<< * cdef double[:,:] p2 = np.zeros((nfaces,3)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_3)) __PYX_ERR(0, 1198, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_3)) __PYX_ERR(0, 1201, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -38056,37 +38118,37 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1198, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_p1 = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "meshCalcUnix.pyx":1199 + /* "meshCalcUnix.pyx":1202 * cdef double[:,:] p0 = np.zeros((nfaces,3)) * cdef double[:,:] p1 = np.zeros((nfaces,3)) * cdef double[:,:] p2 = np.zeros((nfaces,3)) # <<<<<<<<<<<<<< * * cdef long s1,s2,s3,s4,s5 */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nfaces); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3)) __PYX_ERR(0, 1199, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_3)) __PYX_ERR(0, 1202, __pyx_L1_error); __pyx_t_4 = 0; __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -38107,17 +38169,17 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1199, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_p2 = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "meshCalcUnix.pyx":1204 + /* "meshCalcUnix.pyx":1207 * * #construct query arrays for each element and extract surface cells * with nogil, parallel(num_threads=num_threads): # <<<<<<<<<<<<<< @@ -38154,7 +38216,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p Py_BEGIN_ALLOW_THREADS #endif /* _OPENMP */ - /* "meshCalcUnix.pyx":1205 + /* "meshCalcUnix.pyx":1208 * #construct query arrays for each element and extract surface cells * with nogil, parallel(num_threads=num_threads): * for i in prange(nfaces,schedule='dynamic', chunksize=1): # <<<<<<<<<<<<<< @@ -38203,7 +38265,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_ym = ((double)__PYX_NAN()); __pyx_v_yy = ((double)__PYX_NAN()); - /* "meshCalcUnix.pyx":1206 + /* "meshCalcUnix.pyx":1209 * with nogil, parallel(num_threads=num_threads): * for i in prange(nfaces,schedule='dynamic', chunksize=1): * xx = 0 # <<<<<<<<<<<<<< @@ -38212,7 +38274,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_xx = 0.0; - /* "meshCalcUnix.pyx":1207 + /* "meshCalcUnix.pyx":1210 * for i in prange(nfaces,schedule='dynamic', chunksize=1): * xx = 0 * yy = 0 # <<<<<<<<<<<<<< @@ -38221,7 +38283,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_yy = 0.0; - /* "meshCalcUnix.pyx":1208 + /* "meshCalcUnix.pyx":1211 * xx = 0 * yy = 0 * for j in range(3): # <<<<<<<<<<<<<< @@ -38231,7 +38293,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p for (__pyx_t_16 = 0; __pyx_t_16 < 3; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "meshCalcUnix.pyx":1209 + /* "meshCalcUnix.pyx":1212 * yy = 0 * for j in range(3): * xx = xx + node_xv[fconnection[i,j]] # <<<<<<<<<<<<<< @@ -38243,7 +38305,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = (*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection.data + __pyx_t_17 * __pyx_v_fconnection.strides[0]) ) + __pyx_t_18 * __pyx_v_fconnection.strides[1]) ))); __pyx_v_xx = (__pyx_v_xx + (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_19 * __pyx_v_node_xv.strides[0]) )))); - /* "meshCalcUnix.pyx":1210 + /* "meshCalcUnix.pyx":1213 * for j in range(3): * xx = xx + node_xv[fconnection[i,j]] * yy = yy + node_yv[fconnection[i,j]] # <<<<<<<<<<<<<< @@ -38256,7 +38318,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_v_yy = (__pyx_v_yy + (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_19 * __pyx_v_node_yv.strides[0]) )))); } - /* "meshCalcUnix.pyx":1212 + /* "meshCalcUnix.pyx":1215 * yy = yy + node_yv[fconnection[i,j]] * * xm = xx/3 # x mid # <<<<<<<<<<<<<< @@ -38265,7 +38327,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_xm = (__pyx_v_xx / 3.0); - /* "meshCalcUnix.pyx":1213 + /* "meshCalcUnix.pyx":1216 * * xm = xx/3 # x mid * ym = yy/3 # y mid # <<<<<<<<<<<<<< @@ -38274,7 +38336,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p */ __pyx_v_ym = (__pyx_v_yy / 3.0); - /* "meshCalcUnix.pyx":1214 + /* "meshCalcUnix.pyx":1217 * xm = xx/3 # x mid * ym = yy/3 # y mid * bqz = cellcentres[i,2] # zmid # <<<<<<<<<<<<<< @@ -38285,7 +38347,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 2; __pyx_v_bqz = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_cellcentres.data + __pyx_t_17 * __pyx_v_cellcentres.strides[0]) ) + __pyx_t_18 * __pyx_v_cellcentres.strides[1]) ))); - /* "meshCalcUnix.pyx":1216 + /* "meshCalcUnix.pyx":1219 * bqz = cellcentres[i,2] # zmid * * q0[i,0] = xm # <<<<<<<<<<<<<< @@ -38296,7 +38358,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_17 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q0.data + __pyx_t_18 * __pyx_v_q0.strides[0]) ) + __pyx_t_17 * __pyx_v_q0.strides[1]) )) = __pyx_v_xm; - /* "meshCalcUnix.pyx":1217 + /* "meshCalcUnix.pyx":1220 * * q0[i,0] = xm * q0[i,1] = ym # <<<<<<<<<<<<<< @@ -38307,7 +38369,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q0.data + __pyx_t_17 * __pyx_v_q0.strides[0]) ) + __pyx_t_18 * __pyx_v_q0.strides[1]) )) = __pyx_v_ym; - /* "meshCalcUnix.pyx":1218 + /* "meshCalcUnix.pyx":1221 * q0[i,0] = xm * q0[i,1] = ym * q0[i,2] = tqz # top query point # <<<<<<<<<<<<<< @@ -38318,7 +38380,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_17 = 2; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q0.data + __pyx_t_18 * __pyx_v_q0.strides[0]) ) + __pyx_t_17 * __pyx_v_q0.strides[1]) )) = __pyx_v_tqz; - /* "meshCalcUnix.pyx":1220 + /* "meshCalcUnix.pyx":1223 * q0[i,2] = tqz # top query point * * q1[i,0] = xm # <<<<<<<<<<<<<< @@ -38329,7 +38391,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q1.data + __pyx_t_17 * __pyx_v_q1.strides[0]) ) + __pyx_t_18 * __pyx_v_q1.strides[1]) )) = __pyx_v_xm; - /* "meshCalcUnix.pyx":1221 + /* "meshCalcUnix.pyx":1224 * * q1[i,0] = xm * q1[i,1] = ym # <<<<<<<<<<<<<< @@ -38340,7 +38402,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_17 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q1.data + __pyx_t_18 * __pyx_v_q1.strides[0]) ) + __pyx_t_17 * __pyx_v_q1.strides[1]) )) = __pyx_v_ym; - /* "meshCalcUnix.pyx":1222 + /* "meshCalcUnix.pyx":1225 * q1[i,0] = xm * q1[i,1] = ym * q1[i,2] = bqz #bottom query point # <<<<<<<<<<<<<< @@ -38351,7 +38413,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 2; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_q1.data + __pyx_t_17 * __pyx_v_q1.strides[0]) ) + __pyx_t_18 * __pyx_v_q1.strides[1]) )) = __pyx_v_bqz; - /* "meshCalcUnix.pyx":1224 + /* "meshCalcUnix.pyx":1227 * q1[i,2] = bqz #bottom query point * * p0[i,0] = node_xv[fconnection[i,0]] # corner 1 # <<<<<<<<<<<<<< @@ -38365,7 +38427,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_21 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_20 * __pyx_v_p0.strides[0]) ) + __pyx_t_21 * __pyx_v_p0.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_19 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1225 + /* "meshCalcUnix.pyx":1228 * * p0[i,0] = node_xv[fconnection[i,0]] # corner 1 * p0[i,1] = node_yv[fconnection[i,0]] # <<<<<<<<<<<<<< @@ -38379,7 +38441,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_21 * __pyx_v_p0.strides[0]) ) + __pyx_t_20 * __pyx_v_p0.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_19 * __pyx_v_node_yv.strides[0]) ))); - /* "meshCalcUnix.pyx":1226 + /* "meshCalcUnix.pyx":1229 * p0[i,0] = node_xv[fconnection[i,0]] # corner 1 * p0[i,1] = node_yv[fconnection[i,0]] * p0[i,2] = node_zv[fconnection[i,0]] # <<<<<<<<<<<<<< @@ -38393,7 +38455,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_21 = 2; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_20 * __pyx_v_p0.strides[0]) ) + __pyx_t_21 * __pyx_v_p0.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_19 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1228 + /* "meshCalcUnix.pyx":1231 * p0[i,2] = node_zv[fconnection[i,0]] * * p1[i,0] = node_xv[fconnection[i,1]] # corner 2 # <<<<<<<<<<<<<< @@ -38407,7 +38469,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_21 * __pyx_v_p1.strides[0]) ) + __pyx_t_20 * __pyx_v_p1.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_19 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1229 + /* "meshCalcUnix.pyx":1232 * * p1[i,0] = node_xv[fconnection[i,1]] # corner 2 * p1[i,1] = node_yv[fconnection[i,1]] # <<<<<<<<<<<<<< @@ -38421,7 +38483,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_21 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_20 * __pyx_v_p1.strides[0]) ) + __pyx_t_21 * __pyx_v_p1.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_19 * __pyx_v_node_yv.strides[0]) ))); - /* "meshCalcUnix.pyx":1230 + /* "meshCalcUnix.pyx":1233 * p1[i,0] = node_xv[fconnection[i,1]] # corner 2 * p1[i,1] = node_yv[fconnection[i,1]] * p1[i,2] = node_zv[fconnection[i,1]] # <<<<<<<<<<<<<< @@ -38435,7 +38497,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = 2; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_21 * __pyx_v_p1.strides[0]) ) + __pyx_t_20 * __pyx_v_p1.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_19 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1232 + /* "meshCalcUnix.pyx":1235 * p1[i,2] = node_zv[fconnection[i,1]] * * p2[i,0] = node_xv[fconnection[i,2]] # corner 3 # <<<<<<<<<<<<<< @@ -38449,7 +38511,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_21 = 0; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_20 * __pyx_v_p2.strides[0]) ) + __pyx_t_21 * __pyx_v_p2.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_19 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1233 + /* "meshCalcUnix.pyx":1236 * * p2[i,0] = node_xv[fconnection[i,2]] # corner 3 * p2[i,1] = node_yv[fconnection[i,2]] # <<<<<<<<<<<<<< @@ -38463,7 +38525,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_20 = 1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_21 * __pyx_v_p2.strides[0]) ) + __pyx_t_20 * __pyx_v_p2.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_19 * __pyx_v_node_yv.strides[0]) ))); - /* "meshCalcUnix.pyx":1234 + /* "meshCalcUnix.pyx":1237 * p2[i,0] = node_xv[fconnection[i,2]] # corner 3 * p2[i,1] = node_yv[fconnection[i,2]] * p2[i,2] = node_zv[fconnection[i,2]] # <<<<<<<<<<<<<< @@ -38477,7 +38539,7 @@ __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_t_3, 1, (PyObject *(*)(char *)) __p __pyx_t_21 = 2; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_20 * __pyx_v_p2.strides[0]) ) + __pyx_t_21 * __pyx_v_p2.strides[1]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_19 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1236 + /* "meshCalcUnix.pyx":1239 * p2[i,2] = node_zv[fconnection[i,2]] * * s1 = tetra_signp(q0[i,:],p0[i,:],p1[i,:],p2[i,:]) # <<<<<<<<<<<<<< @@ -38536,7 +38598,7 @@ __pyx_t_24.shape[0] = __pyx_v_p2.shape[1]; __pyx_t_24.strides[0] = __pyx_v_p2.strides[1]; __pyx_t_24.suboffsets[0] = -1; -__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __pyx_t_24); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1236, __pyx_L12_error) +__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __pyx_t_24); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1239, __pyx_L12_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 0); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_22, 0); @@ -38547,7 +38609,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ __pyx_t_24.memview = NULL; __pyx_t_24.data = NULL; __pyx_v_s1 = __pyx_t_25; - /* "meshCalcUnix.pyx":1237 + /* "meshCalcUnix.pyx":1240 * * s1 = tetra_signp(q0[i,:],p0[i,:],p1[i,:],p2[i,:]) * s2 = tetra_signp(q1[i,:],p0[i,:],p1[i,:],p2[i,:]) # <<<<<<<<<<<<<< @@ -38606,7 +38668,7 @@ __pyx_t_3.shape[0] = __pyx_v_p2.shape[1]; __pyx_t_3.strides[0] = __pyx_v_p2.strides[1]; __pyx_t_3.suboffsets[0] = -1; -__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_24, __pyx_t_23, __pyx_t_22, __pyx_t_3); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1237, __pyx_L12_error) +__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_24, __pyx_t_23, __pyx_t_22, __pyx_t_3); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1240, __pyx_L12_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_24, 0); __pyx_t_24.memview = NULL; __pyx_t_24.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_23, 0); @@ -38617,7 +38679,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_24, __pyx_t_23, __pyx_t_22, _ __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; __pyx_v_s2 = __pyx_t_25; - /* "meshCalcUnix.pyx":1239 + /* "meshCalcUnix.pyx":1242 * s2 = tetra_signp(q1[i,:],p0[i,:],p1[i,:],p2[i,:]) * * if s1 != s2: # then query point is either side of the triangle so probe # <<<<<<<<<<<<<< @@ -38627,7 +38689,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_24, __pyx_t_23, __pyx_t_22, _ __pyx_t_26 = (__pyx_v_s1 != __pyx_v_s2); if (__pyx_t_26) { - /* "meshCalcUnix.pyx":1240 + /* "meshCalcUnix.pyx":1243 * * if s1 != s2: # then query point is either side of the triangle so probe * s3 = tetra_signp(q0[i,:],q1[i,:],p0[i,:],p1[i,:]) # <<<<<<<<<<<<<< @@ -38686,7 +38748,7 @@ __pyx_t_24.shape[0] = __pyx_v_p1.shape[1]; __pyx_t_24.strides[0] = __pyx_v_p1.strides[1]; __pyx_t_24.suboffsets[0] = -1; -__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __pyx_t_24); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1240, __pyx_L12_error) +__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __pyx_t_24); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1243, __pyx_L12_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 0); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_22, 0); @@ -38697,7 +38759,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ __pyx_t_24.memview = NULL; __pyx_t_24.data = NULL; __pyx_v_s3 = __pyx_t_25; - /* "meshCalcUnix.pyx":1241 + /* "meshCalcUnix.pyx":1244 * if s1 != s2: # then query point is either side of the triangle so probe * s3 = tetra_signp(q0[i,:],q1[i,:],p0[i,:],p1[i,:]) * s4 = tetra_signp(q0[i,:],q1[i,:],p1[i,:],p2[i,:]) # <<<<<<<<<<<<<< @@ -38756,7 +38818,7 @@ __pyx_t_3.shape[0] = __pyx_v_p2.shape[1]; __pyx_t_3.strides[0] = __pyx_v_p2.strides[1]; __pyx_t_3.suboffsets[0] = -1; -__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_24, __pyx_t_23, __pyx_t_22, __pyx_t_3); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1241, __pyx_L12_error) +__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_24, __pyx_t_23, __pyx_t_22, __pyx_t_3); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1244, __pyx_L12_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_24, 0); __pyx_t_24.memview = NULL; __pyx_t_24.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_23, 0); @@ -38767,7 +38829,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_24, __pyx_t_23, __pyx_t_22, _ __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; __pyx_v_s4 = __pyx_t_25; - /* "meshCalcUnix.pyx":1242 + /* "meshCalcUnix.pyx":1245 * s3 = tetra_signp(q0[i,:],q1[i,:],p0[i,:],p1[i,:]) * s4 = tetra_signp(q0[i,:],q1[i,:],p1[i,:],p2[i,:]) * s5 = tetra_signp(q0[i,:],q1[i,:],p2[i,:],p0[i,:]) # <<<<<<<<<<<<<< @@ -38826,7 +38888,7 @@ __pyx_t_24.shape[0] = __pyx_v_p0.shape[1]; __pyx_t_24.strides[0] = __pyx_v_p0.strides[1]; __pyx_t_24.suboffsets[0] = -1; -__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __pyx_t_24); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1242, __pyx_L12_error) +__pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __pyx_t_24); if (unlikely(__pyx_t_25 == ((long)-1) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1245, __pyx_L12_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_3, 0); __pyx_t_3.memview = NULL; __pyx_t_3.data = NULL; __PYX_XCLEAR_MEMVIEW(&__pyx_t_22, 0); @@ -38837,7 +38899,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ __pyx_t_24.memview = NULL; __pyx_t_24.data = NULL; __pyx_v_s5 = __pyx_t_25; - /* "meshCalcUnix.pyx":1244 + /* "meshCalcUnix.pyx":1247 * s5 = tetra_signp(q0[i,:],q1[i,:],p2[i,:],p0[i,:]) * * if s3 == s4 and s4 == s5: # <<<<<<<<<<<<<< @@ -38855,7 +38917,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ __pyx_L18_bool_binop_done:; if (__pyx_t_26) { - /* "meshCalcUnix.pyx":1245 + /* "meshCalcUnix.pyx":1248 * * if s3 == s4 and s4 == s5: * ocheckv[i] = 1 # <<<<<<<<<<<<<< @@ -38865,7 +38927,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ __pyx_t_17 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_ocheckv.data + __pyx_t_17 * __pyx_v_ocheckv.strides[0]) )) = 1; - /* "meshCalcUnix.pyx":1244 + /* "meshCalcUnix.pyx":1247 * s5 = tetra_signp(q0[i,:],q1[i,:],p2[i,:],p0[i,:]) * * if s3 == s4 and s4 == s5: # <<<<<<<<<<<<<< @@ -38874,7 +38936,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ */ } - /* "meshCalcUnix.pyx":1239 + /* "meshCalcUnix.pyx":1242 * s2 = tetra_signp(q1[i,:],p0[i,:],p1[i,:],p2[i,:]) * * if s1 != s2: # then query point is either side of the triangle so probe # <<<<<<<<<<<<<< @@ -39036,7 +39098,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ #endif } - /* "meshCalcUnix.pyx":1204 + /* "meshCalcUnix.pyx":1207 * * #construct query arrays for each element and extract surface cells * with nogil, parallel(num_threads=num_threads): # <<<<<<<<<<<<<< @@ -39062,7 +39124,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ } } - /* "meshCalcUnix.pyx":1247 + /* "meshCalcUnix.pyx":1250 * ocheckv[i] = 1 * * return ocheck # <<<<<<<<<<<<<< @@ -39074,7 +39136,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ __pyx_r = ((PyObject *)__pyx_v_ocheck); goto __pyx_L0; - /* "meshCalcUnix.pyx":1152 + /* "meshCalcUnix.pyx":1155 * return con, count_out * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -39125,7 +39187,7 @@ __pyx_t_25 = __pyx_f_8meshCalc_tetra_signp(__pyx_t_3, __pyx_t_22, __pyx_t_23, __ return __pyx_r; } -/* "meshCalcUnix.pyx":1250 +/* "meshCalcUnix.pyx":1253 * * #nsizeA and finite element conductance calculation * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -39196,7 +39258,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -39204,28 +39266,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("conductanceCall", 0, 2, 4, 1); __PYX_ERR(0, 1250, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("conductanceCall", 0, 2, 4, 1); __PYX_ERR(0, 1253, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_typ); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_threads); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "conductanceCall") < 0)) __PYX_ERR(0, 1250, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "conductanceCall") < 0)) __PYX_ERR(0, 1253, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -39239,22 +39301,22 @@ PyObject *__pyx_args, PyObject *__pyx_kwds default: goto __pyx_L5_argtuple_error; } } - __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1252, __pyx_L3_error) - __pyx_v_numnp = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_numnp == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L3_error) + __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1255, __pyx_L3_error) + __pyx_v_numnp = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_numnp == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1255, __pyx_L3_error) if (values[2]) { - __pyx_v_typ = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_typ == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L3_error) + __pyx_v_typ = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_typ == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1255, __pyx_L3_error) } else { __pyx_v_typ = ((int)((int)0)); } if (values[3]) { - __pyx_v_num_threads = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L3_error) + __pyx_v_num_threads = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1256, __pyx_L3_error) } else { __pyx_v_num_threads = ((int)((int)1)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("conductanceCall", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1250, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("conductanceCall", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1253, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -39371,7 +39433,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_pybuffernd_Nconnec.data = NULL; __pyx_pybuffernd_Nconnec.rcbuffer = &__pyx_pybuffer_Nconnec; - /* "meshCalcUnix.pyx":1279 + /* "meshCalcUnix.pyx":1282 * a prism. * """ * cdef int nmax = 60 # <<<<<<<<<<<<<< @@ -39380,7 +39442,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ __pyx_v_nmax = 60; - /* "meshCalcUnix.pyx":1280 + /* "meshCalcUnix.pyx":1283 * """ * cdef int nmax = 60 * cdef int numel = connection.shape[0] # <<<<<<<<<<<<<< @@ -39389,75 +39451,75 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ __pyx_v_numel = (__pyx_v_connection.shape[0]); - /* "meshCalcUnix.pyx":1282 + /* "meshCalcUnix.pyx":1285 * cdef int numel = connection.shape[0] * cdef int nedges * cdef int pad = len(str(numnp)) # <<<<<<<<<<<<<< * cdef long long[:] a, b * cdef np.ndarray[long long, ndim=1] idx, counts, # unique counts and indices */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Str(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_pad = __pyx_t_3; - /* "meshCalcUnix.pyx":1286 + /* "meshCalcUnix.pyx":1289 * cdef np.ndarray[long long, ndim=1] idx, counts, # unique counts and indices * cdef np.ndarray[long long, ndim=1] uni, combof # uni segment combinations * cdef np.ndarray[long long, ndim=2] Nconnec = np.zeros((numnp,nmax),dtype=np.int64) - 1 # <<<<<<<<<<<<<< * cdef long long[:,:] Nconnecv = Nconnec * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __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_numnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nmax); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nmax); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1286, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1286, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1286, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1286, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1289, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_Nconnec.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_Nconnec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_Nconnec.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1286, __pyx_L1_error) + __PYX_ERR(0, 1289, __pyx_L1_error) } else {__pyx_pybuffernd_Nconnec.diminfo[0].strides = __pyx_pybuffernd_Nconnec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_Nconnec.diminfo[0].shape = __pyx_pybuffernd_Nconnec.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_Nconnec.diminfo[1].strides = __pyx_pybuffernd_Nconnec.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_Nconnec.diminfo[1].shape = __pyx_pybuffernd_Nconnec.rcbuffer->pybuffer.shape[1]; } } @@ -39465,19 +39527,19 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_v_Nconnec = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1287 + /* "meshCalcUnix.pyx":1290 * cdef np.ndarray[long long, ndim=1] uni, combof # uni segment combinations * cdef np.ndarray[long long, ndim=2] Nconnec = np.zeros((numnp,nmax),dtype=np.int64) - 1 * cdef long long[:,:] Nconnecv = Nconnec # <<<<<<<<<<<<<< * * #determine number of edges */ - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_Nconnec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_Nconnec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1290, __pyx_L1_error) __pyx_v_Nconnecv = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1290 + /* "meshCalcUnix.pyx":1293 * * #determine number of edges * if typ==5:#then elements are triangles # <<<<<<<<<<<<<< @@ -39487,7 +39549,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ switch (__pyx_v_typ) { case 5: - /* "meshCalcUnix.pyx":1291 + /* "meshCalcUnix.pyx":1294 * #determine number of edges * if typ==5:#then elements are triangles * nedges = 3 # <<<<<<<<<<<<<< @@ -39496,103 +39558,103 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ __pyx_v_nedges = 3; - /* "meshCalcUnix.pyx":1292 + /* "meshCalcUnix.pyx":1295 * if typ==5:#then elements are triangles * nedges = 3 * a = np.asarray([0,1,2], dtype=np.int64) # <<<<<<<<<<<<<< * b = np.asarray([1,2,0], dtype=np.int64) * elif typ==8 or typ==9:#elements are quads */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_5 = PyList_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 1292, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 1295, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1292, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1295, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_2)) __PYX_ERR(0, 1292, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1292, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_2)) __PYX_ERR(0, 1295, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1292, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1293 + /* "meshCalcUnix.pyx":1296 * nedges = 3 * a = np.asarray([0,1,2], dtype=np.int64) * b = np.asarray([1,2,0], dtype=np.int64) # <<<<<<<<<<<<<< * elif typ==8 or typ==9:#elements are quads * nedges = 6 */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1)) __PYX_ERR(0, 1293, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1)) __PYX_ERR(0, 1296, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1293, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1296, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(0, 1293, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(0, 1296, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1293, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_b = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1290 + /* "meshCalcUnix.pyx":1293 * * #determine number of edges * if typ==5:#then elements are triangles # <<<<<<<<<<<<<< @@ -39602,7 +39664,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ break; case 8: - /* "meshCalcUnix.pyx":1294 + /* "meshCalcUnix.pyx":1297 * a = np.asarray([0,1,2], dtype=np.int64) * b = np.asarray([1,2,0], dtype=np.int64) * elif typ==8 or typ==9:#elements are quads # <<<<<<<<<<<<<< @@ -39611,7 +39673,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ case 9: - /* "meshCalcUnix.pyx":1295 + /* "meshCalcUnix.pyx":1298 * b = np.asarray([1,2,0], dtype=np.int64) * elif typ==8 or typ==9:#elements are quads * nedges = 6 # <<<<<<<<<<<<<< @@ -39620,121 +39682,121 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ __pyx_v_nedges = 6; - /* "meshCalcUnix.pyx":1296 + /* "meshCalcUnix.pyx":1299 * elif typ==8 or typ==9:#elements are quads * nedges = 6 * a = np.asarray([0,1,2,3,0,1], dtype=np.int64) # <<<<<<<<<<<<<< * b = np.asarray([1,2,3,0,2,3], dtype=np.int64) * elif typ == 10:# elements are tetrahedra */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 1296, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 1299, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1)) __PYX_ERR(0, 1296, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1)) __PYX_ERR(0, 1299, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 1296, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 1299, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_3)) __PYX_ERR(0, 1296, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_3)) __PYX_ERR(0, 1299, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_int_0)) __PYX_ERR(0, 1296, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_int_0)) __PYX_ERR(0, 1299, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_int_1)) __PYX_ERR(0, 1296, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1296, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_int_1)) __PYX_ERR(0, 1299, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1296, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1296, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1297 + /* "meshCalcUnix.pyx":1300 * nedges = 6 * a = np.asarray([0,1,2,3,0,1], dtype=np.int64) * b = np.asarray([1,2,3,0,2,3], dtype=np.int64) # <<<<<<<<<<<<<< * elif typ == 10:# elements are tetrahedra * nedges = 6 */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyList_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_6 = PyList_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 1297, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 1300, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_2)) __PYX_ERR(0, 1297, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_2)) __PYX_ERR(0, 1300, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_3)) __PYX_ERR(0, 1297, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_3)) __PYX_ERR(0, 1300, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_int_0)) __PYX_ERR(0, 1297, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_int_0)) __PYX_ERR(0, 1300, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_int_2)) __PYX_ERR(0, 1297, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_int_2)) __PYX_ERR(0, 1300, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 5, __pyx_int_3)) __PYX_ERR(0, 1297, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1297, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 5, __pyx_int_3)) __PYX_ERR(0, 1300, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1297, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_b = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1294 + /* "meshCalcUnix.pyx":1297 * a = np.asarray([0,1,2], dtype=np.int64) * b = np.asarray([1,2,0], dtype=np.int64) * elif typ==8 or typ==9:#elements are quads # <<<<<<<<<<<<<< @@ -39744,7 +39806,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ break; case 10: - /* "meshCalcUnix.pyx":1299 + /* "meshCalcUnix.pyx":1302 * b = np.asarray([1,2,3,0,2,3], dtype=np.int64) * elif typ == 10:# elements are tetrahedra * nedges = 6 # <<<<<<<<<<<<<< @@ -39753,121 +39815,121 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ __pyx_v_nedges = 6; - /* "meshCalcUnix.pyx":1300 + /* "meshCalcUnix.pyx":1303 * elif typ == 10:# elements are tetrahedra * nedges = 6 * a = np.asarray([0,1,2,3,3,3], dtype=np.int64) # <<<<<<<<<<<<<< * b = np.asarray([1,2,0,0,1,2], dtype=np.int64) * elif typ == 13: # elements are 3d wedges */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyList_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_t_5 = PyList_New(6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 1300, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_0)) __PYX_ERR(0, 1303, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1300, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_1)) __PYX_ERR(0, 1303, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_2)) __PYX_ERR(0, 1300, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_2)) __PYX_ERR(0, 1303, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_3)) __PYX_ERR(0, 1300, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_3)) __PYX_ERR(0, 1303, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 4, __pyx_int_3)) __PYX_ERR(0, 1300, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 4, __pyx_int_3)) __PYX_ERR(0, 1303, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 5, __pyx_int_3)) __PYX_ERR(0, 1300, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 5, __pyx_int_3)) __PYX_ERR(0, 1303, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1300, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1301 + /* "meshCalcUnix.pyx":1304 * nedges = 6 * a = np.asarray([0,1,2,3,3,3], dtype=np.int64) * b = np.asarray([1,2,0,0,1,2], dtype=np.int64) # <<<<<<<<<<<<<< * elif typ == 13: # elements are 3d wedges * a = np.asarray([0,1,2, 3,4,5, 0,1,2, 0,0, 1,1, 2,2], dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_1)) __PYX_ERR(0, 1304, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1304, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_0)) __PYX_ERR(0, 1304, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_0)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_0)) __PYX_ERR(0, 1304, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_1)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_int_1)) __PYX_ERR(0, 1304, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_2)) __PYX_ERR(0, 1301, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_int_2)) __PYX_ERR(0, 1304, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1301, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1301, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1301, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_b = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1298 + /* "meshCalcUnix.pyx":1301 * a = np.asarray([0,1,2,3,0,1], dtype=np.int64) * b = np.asarray([1,2,3,0,2,3], dtype=np.int64) * elif typ == 10:# elements are tetrahedra # <<<<<<<<<<<<<< @@ -39877,175 +39939,175 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ break; case 13: - /* "meshCalcUnix.pyx":1303 + /* "meshCalcUnix.pyx":1306 * b = np.asarray([1,2,0,0,1,2], dtype=np.int64) * elif typ == 13: # elements are 3d wedges * a = np.asarray([0,1,2, 3,4,5, 0,1,2, 0,0, 1,1, 2,2], dtype=np.int64) # <<<<<<<<<<<<<< * b = np.asarray([1,2,0, 4,5,3, 3,4,5, 5,4, 3,5, 3,4], dtype=np.int64) * nedges = len(a) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_1 = PyList_New(15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 2, __pyx_int_2)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_3)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 3, __pyx_int_3)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_int_4)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 4, __pyx_int_4)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_int_5)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 5, __pyx_int_5)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_int_0)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 6, __pyx_int_0)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_int_1)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 7, __pyx_int_1)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_int_2)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 8, __pyx_int_2)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_int_0)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 9, __pyx_int_0)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_int_0)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 10, __pyx_int_0)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_int_1)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 11, __pyx_int_1)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_int_1)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 12, __pyx_int_1)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_int_2)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 13, __pyx_int_2)) __PYX_ERR(0, 1306, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_int_2)) __PYX_ERR(0, 1303, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 14, __pyx_int_2)) __PYX_ERR(0, 1306, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1303, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1303, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1304 + /* "meshCalcUnix.pyx":1307 * elif typ == 13: # elements are 3d wedges * a = np.asarray([0,1,2, 3,4,5, 0,1,2, 0,0, 1,1, 2,2], dtype=np.int64) * b = np.asarray([1,2,0, 4,5,3, 3,4,5, 5,4, 3,5, 3,4], dtype=np.int64) # <<<<<<<<<<<<<< * nedges = len(a) * else: */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyList_New(15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_6 = PyList_New(15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_2)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_2)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_0)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_0)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_int_4)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_int_4)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_int_5)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_int_5)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 5, __pyx_int_3)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 5, __pyx_int_3)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 6, __pyx_int_3)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 6, __pyx_int_3)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 7, __pyx_int_4)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 7, __pyx_int_4)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 8, __pyx_int_5)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 8, __pyx_int_5)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 9, __pyx_int_5)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 9, __pyx_int_5)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 10, __pyx_int_4)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 10, __pyx_int_4)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 11, __pyx_int_3)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 11, __pyx_int_3)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 12, __pyx_int_5)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 12, __pyx_int_5)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 13, __pyx_int_3)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 13, __pyx_int_3)) __PYX_ERR(0, 1307, __pyx_L1_error); __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 14, __pyx_int_4)) __PYX_ERR(0, 1304, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1304, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 14, __pyx_int_4)) __PYX_ERR(0, 1307, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1304, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_b = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1305 + /* "meshCalcUnix.pyx":1308 * a = np.asarray([0,1,2, 3,4,5, 0,1,2, 0,0, 1,1, 2,2], dtype=np.int64) * b = np.asarray([1,2,0, 4,5,3, 3,4,5, 5,4, 3,5, 3,4], dtype=np.int64) * nedges = len(a) # <<<<<<<<<<<<<< @@ -40055,7 +40117,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_3 = __Pyx_MemoryView_Len(__pyx_v_a); __pyx_v_nedges = __pyx_t_3; - /* "meshCalcUnix.pyx":1302 + /* "meshCalcUnix.pyx":1305 * a = np.asarray([0,1,2,3,3,3], dtype=np.int64) * b = np.asarray([1,2,0,0,1,2], dtype=np.int64) * elif typ == 13: # elements are 3d wedges # <<<<<<<<<<<<<< @@ -40065,71 +40127,71 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ break; default: - /* "meshCalcUnix.pyx":1307 + /* "meshCalcUnix.pyx":1310 * nedges = len(a) * else: * raise ValueError('Cell type argument does not match vtk cell types,', # <<<<<<<<<<<<<< * 'used with meshTools must be one of the following:', * '5, 8, 9, 10 or 13') */ - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_t_5, 0, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 1307, __pyx_L1_error) + __PYX_ERR(0, 1310, __pyx_L1_error) break; } - /* "meshCalcUnix.pyx":1312 + /* "meshCalcUnix.pyx":1315 * * #looping variables * cdef long long[:,:] combo = np.zeros((numel,nedges),dtype=np.int64) # <<<<<<<<<<<<<< * # cdef long long[:] nodes = np.zeros(2,dtype=np.int64) * cdef int i,j,k */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nedges); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nedges); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4)) __PYX_ERR(0, 1315, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1312, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1312, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_combo = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1319 + /* "meshCalcUnix.pyx":1322 * * #find unique node combinations * for i in range(numel): # <<<<<<<<<<<<<< @@ -40141,7 +40203,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "meshCalcUnix.pyx":1320 + /* "meshCalcUnix.pyx":1323 * #find unique node combinations * for i in range(numel): * for j in range(nedges): # <<<<<<<<<<<<<< @@ -40153,7 +40215,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; - /* "meshCalcUnix.pyx":1321 + /* "meshCalcUnix.pyx":1324 * for i in range(numel): * for j in range(nedges): * na = connection[i,a[j]] # <<<<<<<<<<<<<< @@ -40165,7 +40227,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_18 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_16 * __pyx_v_a.strides[0]) ))); __pyx_v_na = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_17 * __pyx_v_connection.strides[0]) ) + __pyx_t_18 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1322 + /* "meshCalcUnix.pyx":1325 * for j in range(nedges): * na = connection[i,a[j]] * nb = connection[i,b[j]] # <<<<<<<<<<<<<< @@ -40177,7 +40239,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_18 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_16 * __pyx_v_b.strides[0]) ))); __pyx_v_nb = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_17 * __pyx_v_connection.strides[0]) ) + __pyx_t_18 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1323 + /* "meshCalcUnix.pyx":1326 * na = connection[i,a[j]] * nb = connection[i,b[j]] * if na < nb: # <<<<<<<<<<<<<< @@ -40187,17 +40249,17 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_19 = (__pyx_v_na < __pyx_v_nb); if (__pyx_t_19) { - /* "meshCalcUnix.pyx":1324 + /* "meshCalcUnix.pyx":1327 * nb = connection[i,b[j]] * if na < nb: * merged = mergeInt(na,nb,pad) # merge # <<<<<<<<<<<<<< * else: * merged = mergeInt(nb,na,pad) # merge */ - __pyx_t_18 = __pyx_f_8meshCalc_mergeInt(__pyx_v_na, __pyx_v_nb, __pyx_v_pad); if (unlikely(__pyx_t_18 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1324, __pyx_L1_error) + __pyx_t_18 = __pyx_f_8meshCalc_mergeInt(__pyx_v_na, __pyx_v_nb, __pyx_v_pad); if (unlikely(__pyx_t_18 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L1_error) __pyx_v_merged = __pyx_t_18; - /* "meshCalcUnix.pyx":1323 + /* "meshCalcUnix.pyx":1326 * na = connection[i,a[j]] * nb = connection[i,b[j]] * if na < nb: # <<<<<<<<<<<<<< @@ -40207,7 +40269,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ goto __pyx_L7; } - /* "meshCalcUnix.pyx":1326 + /* "meshCalcUnix.pyx":1329 * merged = mergeInt(na,nb,pad) # merge * else: * merged = mergeInt(nb,na,pad) # merge # <<<<<<<<<<<<<< @@ -40215,12 +40277,12 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ * */ /*else*/ { - __pyx_t_18 = __pyx_f_8meshCalc_mergeInt(__pyx_v_nb, __pyx_v_na, __pyx_v_pad); if (unlikely(__pyx_t_18 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_18 = __pyx_f_8meshCalc_mergeInt(__pyx_v_nb, __pyx_v_na, __pyx_v_pad); if (unlikely(__pyx_t_18 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1329, __pyx_L1_error) __pyx_v_merged = __pyx_t_18; } __pyx_L7:; - /* "meshCalcUnix.pyx":1327 + /* "meshCalcUnix.pyx":1330 * else: * merged = mergeInt(nb,na,pad) # merge * combo[i,j] = merged # <<<<<<<<<<<<<< @@ -40231,7 +40293,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_17 = __pyx_v_j; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_combo.data + __pyx_t_16 * __pyx_v_combo.strides[0]) ) + __pyx_t_17 * __pyx_v_combo.strides[1]) )) = __pyx_v_merged; - /* "meshCalcUnix.pyx":1330 + /* "meshCalcUnix.pyx":1333 * * #create the conductance matrix * for k in range(nmax): # <<<<<<<<<<<<<< @@ -40243,7 +40305,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_k = __pyx_t_22; - /* "meshCalcUnix.pyx":1331 + /* "meshCalcUnix.pyx":1334 * #create the conductance matrix * for k in range(nmax): * nid = Nconnecv[na,k] # <<<<<<<<<<<<<< @@ -40254,7 +40316,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_16 = __pyx_v_k; __pyx_v_nid = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_Nconnecv.data + __pyx_t_17 * __pyx_v_Nconnecv.strides[0]) ) + __pyx_t_16 * __pyx_v_Nconnecv.strides[1]) ))); - /* "meshCalcUnix.pyx":1332 + /* "meshCalcUnix.pyx":1335 * for k in range(nmax): * nid = Nconnecv[na,k] * if nid == -1: # then its not been assigned as a pair # <<<<<<<<<<<<<< @@ -40264,7 +40326,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_19 = (__pyx_v_nid == -1L); if (__pyx_t_19) { - /* "meshCalcUnix.pyx":1333 + /* "meshCalcUnix.pyx":1336 * nid = Nconnecv[na,k] * if nid == -1: # then its not been assigned as a pair * Nconnecv[na,k] = nb # <<<<<<<<<<<<<< @@ -40275,7 +40337,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_17 = __pyx_v_k; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_Nconnecv.data + __pyx_t_16 * __pyx_v_Nconnecv.strides[0]) ) + __pyx_t_17 * __pyx_v_Nconnecv.strides[1]) )) = __pyx_v_nb; - /* "meshCalcUnix.pyx":1334 + /* "meshCalcUnix.pyx":1337 * if nid == -1: # then its not been assigned as a pair * Nconnecv[na,k] = nb * break # break out the loop # <<<<<<<<<<<<<< @@ -40284,7 +40346,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ goto __pyx_L9_break; - /* "meshCalcUnix.pyx":1332 + /* "meshCalcUnix.pyx":1335 * for k in range(nmax): * nid = Nconnecv[na,k] * if nid == -1: # then its not been assigned as a pair # <<<<<<<<<<<<<< @@ -40293,7 +40355,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ } - /* "meshCalcUnix.pyx":1335 + /* "meshCalcUnix.pyx":1338 * Nconnecv[na,k] = nb * break # break out the loop * elif nid == nb: #its already been assigned # <<<<<<<<<<<<<< @@ -40303,7 +40365,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_19 = (__pyx_v_nid == __pyx_v_nb); if (__pyx_t_19) { - /* "meshCalcUnix.pyx":1336 + /* "meshCalcUnix.pyx":1339 * break # break out the loop * elif nid == nb: #its already been assigned * break # so break out # <<<<<<<<<<<<<< @@ -40312,7 +40374,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ goto __pyx_L9_break; - /* "meshCalcUnix.pyx":1335 + /* "meshCalcUnix.pyx":1338 * Nconnecv[na,k] = nb * break # break out the loop * elif nid == nb: #its already been assigned # <<<<<<<<<<<<<< @@ -40323,7 +40385,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ } __pyx_L9_break:; - /* "meshCalcUnix.pyx":1338 + /* "meshCalcUnix.pyx":1341 * break # so break out * * for k in range(nmax):#same as above but for the inverse # <<<<<<<<<<<<<< @@ -40335,7 +40397,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) { __pyx_v_k = __pyx_t_22; - /* "meshCalcUnix.pyx":1339 + /* "meshCalcUnix.pyx":1342 * * for k in range(nmax):#same as above but for the inverse * nid = Nconnecv[nb,k] # <<<<<<<<<<<<<< @@ -40346,7 +40408,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_16 = __pyx_v_k; __pyx_v_nid = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_Nconnecv.data + __pyx_t_17 * __pyx_v_Nconnecv.strides[0]) ) + __pyx_t_16 * __pyx_v_Nconnecv.strides[1]) ))); - /* "meshCalcUnix.pyx":1340 + /* "meshCalcUnix.pyx":1343 * for k in range(nmax):#same as above but for the inverse * nid = Nconnecv[nb,k] * if nid == -1: # <<<<<<<<<<<<<< @@ -40356,7 +40418,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_19 = (__pyx_v_nid == -1L); if (__pyx_t_19) { - /* "meshCalcUnix.pyx":1341 + /* "meshCalcUnix.pyx":1344 * nid = Nconnecv[nb,k] * if nid == -1: * Nconnecv[nb,k] = na # <<<<<<<<<<<<<< @@ -40367,7 +40429,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_17 = __pyx_v_k; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_Nconnecv.data + __pyx_t_16 * __pyx_v_Nconnecv.strides[0]) ) + __pyx_t_17 * __pyx_v_Nconnecv.strides[1]) )) = __pyx_v_na; - /* "meshCalcUnix.pyx":1342 + /* "meshCalcUnix.pyx":1345 * if nid == -1: * Nconnecv[nb,k] = na * break # <<<<<<<<<<<<<< @@ -40376,7 +40438,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ goto __pyx_L12_break; - /* "meshCalcUnix.pyx":1340 + /* "meshCalcUnix.pyx":1343 * for k in range(nmax):#same as above but for the inverse * nid = Nconnecv[nb,k] * if nid == -1: # <<<<<<<<<<<<<< @@ -40385,7 +40447,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ } - /* "meshCalcUnix.pyx":1343 + /* "meshCalcUnix.pyx":1346 * Nconnecv[nb,k] = na * break * elif nid == na: # <<<<<<<<<<<<<< @@ -40395,7 +40457,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_19 = (__pyx_v_nid == __pyx_v_na); if (__pyx_t_19) { - /* "meshCalcUnix.pyx":1344 + /* "meshCalcUnix.pyx":1347 * break * elif nid == na: * break # <<<<<<<<<<<<<< @@ -40404,7 +40466,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ goto __pyx_L12_break; - /* "meshCalcUnix.pyx":1343 + /* "meshCalcUnix.pyx":1346 * Nconnecv[nb,k] = na * break * elif nid == na: # <<<<<<<<<<<<<< @@ -40417,40 +40479,40 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ } } - /* "meshCalcUnix.pyx":1347 + /* "meshCalcUnix.pyx":1350 * * #pure python code * combof = np.asarray(combo,dtype=np.int64).flatten() # <<<<<<<<<<<<<< * uni, idx, counts = np.unique(combof, * return_index=True, */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_combo, 2, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_1 = __pyx_memoryview_fromslice(__pyx_v_combo, 2, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1347, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_23) < 0) __PYX_ERR(0, 1347, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_23) < 0) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; - __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_23, __pyx_n_s_flatten); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; __pyx_t_23 = NULL; @@ -40471,11 +40533,11 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ PyObject *__pyx_callargs[2] = {__pyx_t_23, NULL}; __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10); __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1347, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1347, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1350, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -40492,58 +40554,58 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_25 = __pyx_t_26 = __pyx_t_27 = 0; } __pyx_pybuffernd_combof.diminfo[0].strides = __pyx_pybuffernd_combof.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_combof.diminfo[0].shape = __pyx_pybuffernd_combof.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1347, __pyx_L1_error) + if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1350, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_combof = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":1348 + /* "meshCalcUnix.pyx":1351 * #pure python code * combof = np.asarray(combo,dtype=np.int64).flatten() * uni, idx, counts = np.unique(combof, # <<<<<<<<<<<<<< * return_index=True, * return_counts=True) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1348, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unique); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_unique); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_v_combof); __Pyx_GIVEREF((PyObject *)__pyx_v_combof); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_combof))) __PYX_ERR(0, 1348, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_combof))) __PYX_ERR(0, 1351, __pyx_L1_error); - /* "meshCalcUnix.pyx":1349 + /* "meshCalcUnix.pyx":1352 * combof = np.asarray(combo,dtype=np.int64).flatten() * uni, idx, counts = np.unique(combof, * return_index=True, # <<<<<<<<<<<<<< * return_counts=True) * */ - __pyx_t_23 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); - if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 1349, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) - /* "meshCalcUnix.pyx":1350 + /* "meshCalcUnix.pyx":1353 * uni, idx, counts = np.unique(combof, * return_index=True, * return_counts=True) # <<<<<<<<<<<<<< * * #reorder Nconnec so that each row is ordered */ - if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_return_counts, Py_True) < 0) __PYX_ERR(0, 1349, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_23, __pyx_n_s_return_counts, Py_True) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) - /* "meshCalcUnix.pyx":1348 + /* "meshCalcUnix.pyx":1351 * #pure python code * combof = np.asarray(combo,dtype=np.int64).flatten() * uni, idx, counts = np.unique(combof, # <<<<<<<<<<<<<< * return_index=True, * return_counts=True) */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_23); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_23); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1351, __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; @@ -40554,7 +40616,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1348, __pyx_L1_error) + __PYX_ERR(0, 1351, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -40570,17 +40632,17 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); #else - __pyx_t_23 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_23 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1348, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_28 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); @@ -40590,7 +40652,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __Pyx_GOTREF(__pyx_t_2); index = 2; __pyx_t_1 = __pyx_t_28(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_28(__pyx_t_4), 3) < 0) __PYX_ERR(0, 1348, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_28(__pyx_t_4), 3) < 0) __PYX_ERR(0, 1351, __pyx_L1_error) __pyx_t_28 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L15_unpacking_done; @@ -40598,12 +40660,12 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_28 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1348, __pyx_L1_error) + __PYX_ERR(0, 1351, __pyx_L1_error) __pyx_L15_unpacking_done:; } - if (!(likely(((__pyx_t_23) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_23, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1348, __pyx_L1_error) - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1348, __pyx_L1_error) - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1348, __pyx_L1_error) + if (!(likely(((__pyx_t_23) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_23, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1351, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1351, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1351, __pyx_L1_error) __pyx_t_24 = ((PyArrayObject *)__pyx_t_23); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -40620,7 +40682,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_27 = __pyx_t_26 = __pyx_t_25 = 0; } __pyx_pybuffernd_uni.diminfo[0].strides = __pyx_pybuffernd_uni.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_uni.diminfo[0].shape = __pyx_pybuffernd_uni.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1348, __pyx_L1_error) + if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1351, __pyx_L1_error) } __pyx_t_24 = 0; __pyx_v_uni = ((PyArrayObject *)__pyx_t_23); @@ -40641,7 +40703,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_25 = __pyx_t_26 = __pyx_t_27 = 0; } __pyx_pybuffernd_idx.diminfo[0].strides = __pyx_pybuffernd_idx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx.diminfo[0].shape = __pyx_pybuffernd_idx.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1348, __pyx_L1_error) + if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1351, __pyx_L1_error) } __pyx_t_29 = 0; __pyx_v_idx = ((PyArrayObject *)__pyx_t_2); @@ -40662,13 +40724,13 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_27 = __pyx_t_26 = __pyx_t_25 = 0; } __pyx_pybuffernd_counts.diminfo[0].strides = __pyx_pybuffernd_counts.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_counts.diminfo[0].shape = __pyx_pybuffernd_counts.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1348, __pyx_L1_error) + if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1351, __pyx_L1_error) } __pyx_t_29 = 0; __pyx_v_counts = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":1353 + /* "meshCalcUnix.pyx":1356 * * #reorder Nconnec so that each row is ordered * for i in range(numnp): # <<<<<<<<<<<<<< @@ -40680,7 +40742,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "meshCalcUnix.pyx":1354 + /* "meshCalcUnix.pyx":1357 * #reorder Nconnec so that each row is ordered * for i in range(numnp): * for j in range(nmax): # <<<<<<<<<<<<<< @@ -40692,7 +40754,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; - /* "meshCalcUnix.pyx":1355 + /* "meshCalcUnix.pyx":1358 * for i in range(numnp): * for j in range(nmax): * if Nconnecv[i,j] == -1: #find up to point that actually values # <<<<<<<<<<<<<< @@ -40704,7 +40766,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ __pyx_t_19 = ((*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_Nconnecv.data + __pyx_t_17 * __pyx_v_Nconnecv.strides[0]) ) + __pyx_t_16 * __pyx_v_Nconnecv.strides[1]) ))) == -1LL); if (__pyx_t_19) { - /* "meshCalcUnix.pyx":1356 + /* "meshCalcUnix.pyx":1359 * for j in range(nmax): * if Nconnecv[i,j] == -1: #find up to point that actually values * k = j # <<<<<<<<<<<<<< @@ -40713,7 +40775,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ __pyx_v_k = __pyx_v_j; - /* "meshCalcUnix.pyx":1357 + /* "meshCalcUnix.pyx":1360 * if Nconnecv[i,j] == -1: #find up to point that actually values * k = j * break # break once -1 is found # <<<<<<<<<<<<<< @@ -40722,7 +40784,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ goto __pyx_L19_break; - /* "meshCalcUnix.pyx":1355 + /* "meshCalcUnix.pyx":1358 * for i in range(numnp): * for j in range(nmax): * if Nconnecv[i,j] == -1: #find up to point that actually values # <<<<<<<<<<<<<< @@ -40733,68 +40795,68 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ } __pyx_L19_break:; - /* "meshCalcUnix.pyx":1358 + /* "meshCalcUnix.pyx":1361 * k = j * break # break once -1 is found * sortInt(Nconnec[i,:],k) # sort in that part of the row # <<<<<<<<<<<<<< * * if max(counts) > 60: */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6)) __PYX_ERR(0, 1358, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L1_error); __Pyx_INCREF(__pyx_slice__7); __Pyx_GIVEREF(__pyx_slice__7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice__7)) __PYX_ERR(0, 1358, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_slice__7)) __PYX_ERR(0, 1361, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_Nconnec), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_Nconnec), __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_f_8meshCalc_sortInt(__pyx_t_9, __pyx_v_k); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_f_8meshCalc_sortInt(__pyx_t_9, __pyx_v_k); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1361, __pyx_L1_error) __PYX_XCLEAR_MEMVIEW(&__pyx_t_9, 1); __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; } - /* "meshCalcUnix.pyx":1360 + /* "meshCalcUnix.pyx":1363 * sortInt(Nconnec[i,:],k) # sort in that part of the row * * if max(counts) > 60: # <<<<<<<<<<<<<< * raise Exception('Too many connected nodes (>%i) check that mesh is not poorly formed.'%nmax) * */ - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_counts)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, ((PyObject *)__pyx_v_counts)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_int_60, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_6, __pyx_int_60, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_19 < 0))) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_19)) { - /* "meshCalcUnix.pyx":1361 + /* "meshCalcUnix.pyx":1364 * * if max(counts) > 60: * raise Exception('Too many connected nodes (>%i) check that mesh is not poorly formed.'%nmax) # <<<<<<<<<<<<<< * * cdef int nsizeA = len(uni) + numnp # nsizeA can now be computed */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nmax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nmax); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Too_many_connected_nodes_i_check, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Too_many_connected_nodes_i_check, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1361, __pyx_L1_error) + __PYX_ERR(0, 1364, __pyx_L1_error) - /* "meshCalcUnix.pyx":1360 + /* "meshCalcUnix.pyx":1363 * sortInt(Nconnec[i,:],k) # sort in that part of the row * * if max(counts) > 60: # <<<<<<<<<<<<<< @@ -40803,17 +40865,17 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ */ } - /* "meshCalcUnix.pyx":1363 + /* "meshCalcUnix.pyx":1366 * raise Exception('Too many connected nodes (>%i) check that mesh is not poorly formed.'%nmax) * * cdef int nsizeA = len(uni) + numnp # nsizeA can now be computed # <<<<<<<<<<<<<< * * return nsizeA, Nconnec */ - __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_uni)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1363, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(((PyObject *)__pyx_v_uni)); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1366, __pyx_L1_error) __pyx_v_nsizeA = (__pyx_t_3 + __pyx_v_numnp); - /* "meshCalcUnix.pyx":1365 + /* "meshCalcUnix.pyx":1368 * cdef int nsizeA = len(uni) + numnp # nsizeA can now be computed * * return nsizeA, Nconnec # <<<<<<<<<<<<<< @@ -40821,21 +40883,21 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nsizeA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_nsizeA); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_Nconnec); __Pyx_GIVEREF((PyObject *)__pyx_v_Nconnec); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_Nconnec))) __PYX_ERR(0, 1365, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_Nconnec))) __PYX_ERR(0, 1368, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":1250 + /* "meshCalcUnix.pyx":1253 * * #nsizeA and finite element conductance calculation * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -40887,7 +40949,7 @@ static PyObject *__pyx_pf_8meshCalc_28conductanceCall(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "meshCalcUnix.pyx":1368 +/* "meshCalcUnix.pyx":1371 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -40955,7 +41017,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1371, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -40963,9 +41025,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1371, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("externalN", 1, 3, 3, 1); __PYX_ERR(0, 1368, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("externalN", 1, 3, 3, 1); __PYX_ERR(0, 1371, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -40973,14 +41035,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1371, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("externalN", 1, 3, 3, 2); __PYX_ERR(0, 1368, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("externalN", 1, 3, 3, 2); __PYX_ERR(0, 1371, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "externalN") < 0)) __PYX_ERR(0, 1368, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "externalN") < 0)) __PYX_ERR(0, 1371, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -40989,13 +41051,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } - __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1370, __pyx_L3_error) - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1370, __pyx_L3_error) - __pyx_v_neigh = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_neigh.memview)) __PYX_ERR(0, 1370, __pyx_L3_error) + __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1373, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1373, __pyx_L3_error) + __pyx_v_neigh = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_neigh.memview)) __PYX_ERR(0, 1373, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("externalN", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1368, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("externalN", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1371, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -41139,7 +41201,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se __pyx_pybuffernd_surfaceflag.data = NULL; __pyx_pybuffernd_surfaceflag.rcbuffer = &__pyx_pybuffer_surfaceflag; - /* "meshCalcUnix.pyx":1391 + /* "meshCalcUnix.pyx":1394 * """ * # generic variables for function * cdef int flag3d = 0 # <<<<<<<<<<<<<< @@ -41148,7 +41210,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_flag3d = 0; - /* "meshCalcUnix.pyx":1393 + /* "meshCalcUnix.pyx":1396 * cdef int flag3d = 0 * cdef int i, j, k * cdef int numel = connection.shape[0] # <<<<<<<<<<<<<< @@ -41157,7 +41219,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_numel = (__pyx_v_connection.shape[0]); - /* "meshCalcUnix.pyx":1394 + /* "meshCalcUnix.pyx":1397 * cdef int i, j, k * cdef int numel = connection.shape[0] * cdef int numnp = node.shape[0] # <<<<<<<<<<<<<< @@ -41166,7 +41228,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_numnp = (__pyx_v_node.shape[0]); - /* "meshCalcUnix.pyx":1395 + /* "meshCalcUnix.pyx":1398 * cdef int numel = connection.shape[0] * cdef int numnp = node.shape[0] * cdef int nn = neigh.shape[1] # number of possible neighbours # <<<<<<<<<<<<<< @@ -41175,7 +41237,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_nn = (__pyx_v_neigh.shape[1]); - /* "meshCalcUnix.pyx":1396 + /* "meshCalcUnix.pyx":1399 * cdef int numnp = node.shape[0] * cdef int nn = neigh.shape[1] # number of possible neighbours * cdef int nvert = connection.shape[1] # number of element vertices # <<<<<<<<<<<<<< @@ -41184,7 +41246,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_nvert = (__pyx_v_connection.shape[1]); - /* "meshCalcUnix.pyx":1399 + /* "meshCalcUnix.pyx":1402 * cdef double xa, ya, za, xm, ym, zm, xmf, ymf, zmf * * if connection.shape[1] == 3: # <<<<<<<<<<<<<< @@ -41194,7 +41256,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_1 = ((__pyx_v_connection.shape[1]) == 3); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1400 + /* "meshCalcUnix.pyx":1403 * * if connection.shape[1] == 3: * flag3d = 0 # <<<<<<<<<<<<<< @@ -41203,7 +41265,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_flag3d = 0; - /* "meshCalcUnix.pyx":1399 + /* "meshCalcUnix.pyx":1402 * cdef double xa, ya, za, xm, ym, zm, xmf, ymf, zmf * * if connection.shape[1] == 3: # <<<<<<<<<<<<<< @@ -41213,7 +41275,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L3; } - /* "meshCalcUnix.pyx":1401 + /* "meshCalcUnix.pyx":1404 * if connection.shape[1] == 3: * flag3d = 0 * elif connection.shape[1] == 4: # <<<<<<<<<<<<<< @@ -41223,7 +41285,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_1 = ((__pyx_v_connection.shape[1]) == 4); if (likely(__pyx_t_1)) { - /* "meshCalcUnix.pyx":1402 + /* "meshCalcUnix.pyx":1405 * flag3d = 0 * elif connection.shape[1] == 4: * flag3d = 1 # <<<<<<<<<<<<<< @@ -41232,7 +41294,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_flag3d = 1; - /* "meshCalcUnix.pyx":1401 + /* "meshCalcUnix.pyx":1404 * if connection.shape[1] == 3: * flag3d = 0 * elif connection.shape[1] == 4: # <<<<<<<<<<<<<< @@ -41242,7 +41304,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L3; } - /* "meshCalcUnix.pyx":1404 + /* "meshCalcUnix.pyx":1407 * flag3d = 1 * else: * raise Exception('Unsupported mesh type for computing external nodes') # <<<<<<<<<<<<<< @@ -41250,15 +41312,15 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se * cdef long long[:] a, b, c */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1404, __pyx_L1_error) + __PYX_ERR(0, 1407, __pyx_L1_error) } __pyx_L3:; - /* "meshCalcUnix.pyx":1407 + /* "meshCalcUnix.pyx":1410 * * cdef long long[:] a, b, c * if flag3d == 0: # <<<<<<<<<<<<<< @@ -41268,103 +41330,103 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_1 = (__pyx_v_flag3d == 0); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1408 + /* "meshCalcUnix.pyx":1411 * cdef long long[:] a, b, c * if flag3d == 0: * a = np.asarray([0,1,2], dtype=np.int64) # <<<<<<<<<<<<<< * b = np.asarray([1,2,0], dtype=np.int64) * else: */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 1408, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_0)) __PYX_ERR(0, 1411, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 1408, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_1)) __PYX_ERR(0, 1411, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_2)) __PYX_ERR(0, 1408, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1408, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_2)) __PYX_ERR(0, 1411, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1408, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1408, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1409 + /* "meshCalcUnix.pyx":1412 * if flag3d == 0: * a = np.asarray([0,1,2], dtype=np.int64) * b = np.asarray([1,2,0], dtype=np.int64) # <<<<<<<<<<<<<< * else: * a = np.asarray([1,0,0,0], dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_6 = PyList_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 1409, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_int_1)) __PYX_ERR(0, 1412, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_2)) __PYX_ERR(0, 1409, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_int_2)) __PYX_ERR(0, 1412, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_0)) __PYX_ERR(0, 1409, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1409, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_int_0)) __PYX_ERR(0, 1412, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1412, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1409, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1409, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1412, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_b = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1407 + /* "meshCalcUnix.pyx":1410 * * cdef long long[:] a, b, c * if flag3d == 0: # <<<<<<<<<<<<<< @@ -41374,7 +41436,7 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L4; } - /* "meshCalcUnix.pyx":1411 + /* "meshCalcUnix.pyx":1414 * b = np.asarray([1,2,0], dtype=np.int64) * else: * a = np.asarray([1,0,0,0], dtype=np.int64) # <<<<<<<<<<<<<< @@ -41382,147 +41444,147 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se * c = np.asarray([3,2,3,2], dtype=np.int64) */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_5 = PyList_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1)) __PYX_ERR(0, 1411, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 0, __pyx_int_1)) __PYX_ERR(0, 1414, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_0)) __PYX_ERR(0, 1411, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 1, __pyx_int_0)) __PYX_ERR(0, 1414, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_0)) __PYX_ERR(0, 1411, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 2, __pyx_int_0)) __PYX_ERR(0, 1414, __pyx_L1_error); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); - if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_0)) __PYX_ERR(0, 1411, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_5, 3, __pyx_int_0)) __PYX_ERR(0, 1414, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 1411, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1414, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_a = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1412 + /* "meshCalcUnix.pyx":1415 * else: * a = np.asarray([1,0,0,0], dtype=np.int64) * b = np.asarray([2,3,1,1], dtype=np.int64) # <<<<<<<<<<<<<< * c = np.asarray([3,2,3,2], dtype=np.int64) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_3 = PyList_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_2)) __PYX_ERR(0, 1412, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_int_2)) __PYX_ERR(0, 1415, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_3)) __PYX_ERR(0, 1412, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_3)) __PYX_ERR(0, 1415, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_1)) __PYX_ERR(0, 1412, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_int_1)) __PYX_ERR(0, 1415, __pyx_L1_error); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); - if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_int_1)) __PYX_ERR(0, 1412, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1412, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_int_1)) __PYX_ERR(0, 1415, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1415, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1415, __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, 1412, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1412, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1415, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_b = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1413 + /* "meshCalcUnix.pyx":1416 * a = np.asarray([1,0,0,0], dtype=np.int64) * b = np.asarray([2,3,1,1], dtype=np.int64) * c = np.asarray([3,2,3,2], dtype=np.int64) # <<<<<<<<<<<<<< * * cdef list enodesl = [] # will be used to store all found face nodes */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_2 = PyList_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3)) __PYX_ERR(0, 1413, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_int_3)) __PYX_ERR(0, 1416, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1413, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_2)) __PYX_ERR(0, 1416, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_3)) __PYX_ERR(0, 1413, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_int_3)) __PYX_ERR(0, 1416, __pyx_L1_error); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); - if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_2)) __PYX_ERR(0, 1413, __pyx_L1_error); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error) + if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_int_2)) __PYX_ERR(0, 1416, __pyx_L1_error); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1413, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1413, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_c = __pyx_t_7; __pyx_t_7.memview = NULL; @@ -41530,40 +41592,40 @@ static PyObject *__pyx_pf_8meshCalc_30externalN(CYTHON_UNUSED PyObject *__pyx_se } __pyx_L4:; - /* "meshCalcUnix.pyx":1415 + /* "meshCalcUnix.pyx":1418 * c = np.asarray([3,2,3,2], dtype=np.int64) * * cdef list enodesl = [] # will be used to store all found face nodes # <<<<<<<<<<<<<< * cdef list surfaceflagl = [] # will be used to store if node is at the surface * cdef int enode0, enode1, enode2 # external nodes */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_enodesl = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "meshCalcUnix.pyx":1416 + /* "meshCalcUnix.pyx":1419 * * cdef list enodesl = [] # will be used to store all found face nodes * cdef list surfaceflagl = [] # will be used to store if node is at the surface # <<<<<<<<<<<<<< * cdef int enode0, enode1, enode2 # external nodes * */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_surfaceflagl = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "meshCalcUnix.pyx":1419 + /* "meshCalcUnix.pyx":1422 * cdef int enode0, enode1, enode2 # external nodes * * cdef double[:] node_xv = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates # <<<<<<<<<<<<<< * cdef double[:] node_yv = np.asarray(node[:,1],dtype=float) * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -41579,39 +41641,39 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_6 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error) +__pyx_t_6 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1419, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1419, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_3, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_node_xv = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1420 + /* "meshCalcUnix.pyx":1423 * * cdef double[:] node_xv = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef double[:] node_yv = np.asarray(node[:,1],dtype=float) # <<<<<<<<<<<<<< * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) * # cdef np.ndarray[double,ndim=1] nodez = np.asarray(node[:,2],dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -41627,39 +41689,39 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1420, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_node_yv = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1421 + /* "meshCalcUnix.pyx":1424 * cdef double[:] node_xv = np.asarray(node[:,0],dtype=float) # extract 1D arrays of node coordinates * cdef double[:] node_yv = np.asarray(node[:,1],dtype=float) * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) # <<<<<<<<<<<<<< * # cdef np.ndarray[double,ndim=1] nodez = np.asarray(node[:,2],dtype=float) * cdef double tqz = (max(node_zv) - min(node_zv)) + max(node_zv) # query point in z axis */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8.data = __pyx_v_node.data; @@ -41675,73 +41737,73 @@ __pyx_t_8.strides[0] = __pyx_v_node.strides[0]; __pyx_t_8.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error) +__pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __PYX_XCLEAR_MEMVIEW(&__pyx_t_8, 1); __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1421, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1421, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_6, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_node_zv = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1423 + /* "meshCalcUnix.pyx":1426 * cdef double[:] node_zv = np.asarray(node[:,2],dtype=float) * # cdef np.ndarray[double,ndim=1] nodez = np.asarray(node[:,2],dtype=float) * cdef double tqz = (max(node_zv) - min(node_zv)) + max(node_zv) # query point in z axis # <<<<<<<<<<<<<< * * cdef double[:] q0 = np.zeros(3)#query points */ - __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_node_zv, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_node_zv, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_node_zv, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_node_zv, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_node_zv, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_node_zv, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __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_9 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsDouble(__pyx_t_4); if (unlikely((__pyx_t_9 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_tqz = __pyx_t_9; - /* "meshCalcUnix.pyx":1425 + /* "meshCalcUnix.pyx":1428 * cdef double tqz = (max(node_zv) - min(node_zv)) + max(node_zv) # query point in z axis * * cdef double[:] q0 = np.zeros(3)#query points # <<<<<<<<<<<<<< * cdef double[:] q1 = np.zeros(3) * cdef double[:] p0 = np.zeros(3) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -41762,26 +41824,26 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_3}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_q0 = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1426 + /* "meshCalcUnix.pyx":1429 * * cdef double[:] q0 = np.zeros(3)#query points * cdef double[:] q1 = np.zeros(3) # <<<<<<<<<<<<<< * cdef double[:] p0 = np.zeros(3) * cdef double[:] p1 = np.zeros(3) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1426, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -41802,26 +41864,26 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_int_3}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1426, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_q1 = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1427 + /* "meshCalcUnix.pyx":1430 * cdef double[:] q0 = np.zeros(3)#query points * cdef double[:] q1 = np.zeros(3) * cdef double[:] p0 = np.zeros(3) # <<<<<<<<<<<<<< * cdef double[:] p1 = np.zeros(3) * cdef double[:] p2 = np.zeros(3) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1427, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -41842,26 +41904,26 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_3}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1427, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1427, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_p0 = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1428 + /* "meshCalcUnix.pyx":1431 * cdef double[:] q1 = np.zeros(3) * cdef double[:] p0 = np.zeros(3) * cdef double[:] p1 = np.zeros(3) # <<<<<<<<<<<<<< * cdef double[:] p2 = np.zeros(3) * */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1428, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -41882,26 +41944,26 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_int_3}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1428, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_p1 = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1429 + /* "meshCalcUnix.pyx":1432 * cdef double[:] p0 = np.zeros(3) * cdef double[:] p1 = np.zeros(3) * cdef double[:] p2 = np.zeros(3) # <<<<<<<<<<<<<< * * cdef long s1,s2,s3,s4,s5 */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -41922,17 +41984,17 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_3}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_8.memview)) __PYX_ERR(0, 1432, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_p2 = __pyx_t_8; __pyx_t_8.memview = NULL; __pyx_t_8.data = NULL; - /* "meshCalcUnix.pyx":1433 + /* "meshCalcUnix.pyx":1436 * cdef long s1,s2,s3,s4,s5 * * for i in range(numel): # <<<<<<<<<<<<<< @@ -41944,7 +42006,7 @@ __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_t_8, 1, (PyObject *(*)(char *)) __p for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "meshCalcUnix.pyx":1435 + /* "meshCalcUnix.pyx":1438 * for i in range(numel): * # skip if not an edge element * if min(neigh[i,:]) > -1: # <<<<<<<<<<<<<< @@ -41964,20 +42026,20 @@ __pyx_t_13.shape[0] = __pyx_v_neigh.shape[1]; __pyx_t_13.strides[0] = __pyx_v_neigh.strides[1]; __pyx_t_13.suboffsets[0] = -1; -__pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1435, __pyx_L1_error) +__pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __pyx_memview_get_long, (int (*)(char *, PyObject *)) __pyx_memview_set_long, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __PYX_XCLEAR_MEMVIEW(&__pyx_t_13, 1); __pyx_t_13.memview = NULL; __pyx_t_13.data = NULL; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_min, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_int_neg_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1438, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1436 + /* "meshCalcUnix.pyx":1439 * # skip if not an edge element * if min(neigh[i,:]) > -1: * continue # <<<<<<<<<<<<<< @@ -41986,7 +42048,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ goto __pyx_L5_continue; - /* "meshCalcUnix.pyx":1435 + /* "meshCalcUnix.pyx":1438 * for i in range(numel): * # skip if not an edge element * if min(neigh[i,:]) > -1: # <<<<<<<<<<<<<< @@ -41995,7 +42057,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ } - /* "meshCalcUnix.pyx":1439 + /* "meshCalcUnix.pyx":1442 * * # compute cell centre * xa = 0 # <<<<<<<<<<<<<< @@ -42004,7 +42066,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ __pyx_v_xa = 0.0; - /* "meshCalcUnix.pyx":1440 + /* "meshCalcUnix.pyx":1443 * # compute cell centre * xa = 0 * ya = 0 # <<<<<<<<<<<<<< @@ -42013,7 +42075,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ __pyx_v_ya = 0.0; - /* "meshCalcUnix.pyx":1441 + /* "meshCalcUnix.pyx":1444 * xa = 0 * ya = 0 * za = 0 # <<<<<<<<<<<<<< @@ -42022,7 +42084,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ __pyx_v_za = 0.0; - /* "meshCalcUnix.pyx":1442 + /* "meshCalcUnix.pyx":1445 * ya = 0 * za = 0 * for j in range(nvert): # <<<<<<<<<<<<<< @@ -42034,7 +42096,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "meshCalcUnix.pyx":1443 + /* "meshCalcUnix.pyx":1446 * za = 0 * for j in range(nvert): * xa += node_xv[connection[i,j]] # <<<<<<<<<<<<<< @@ -42046,7 +42108,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_19 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_17 * __pyx_v_connection.strides[0]) ) + __pyx_t_18 * __pyx_v_connection.strides[1]) ))); __pyx_v_xa = (__pyx_v_xa + (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_19 * __pyx_v_node_xv.strides[0]) )))); - /* "meshCalcUnix.pyx":1444 + /* "meshCalcUnix.pyx":1447 * for j in range(nvert): * xa += node_xv[connection[i,j]] * ya += node_yv[connection[i,j]] # <<<<<<<<<<<<<< @@ -42058,7 +42120,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_19 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_18 * __pyx_v_connection.strides[0]) ) + __pyx_t_17 * __pyx_v_connection.strides[1]) ))); __pyx_v_ya = (__pyx_v_ya + (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_19 * __pyx_v_node_yv.strides[0]) )))); - /* "meshCalcUnix.pyx":1445 + /* "meshCalcUnix.pyx":1448 * xa += node_xv[connection[i,j]] * ya += node_yv[connection[i,j]] * za += node_zv[connection[i,j]] # <<<<<<<<<<<<<< @@ -42071,7 +42133,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_v_za = (__pyx_v_za + (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_19 * __pyx_v_node_zv.strides[0]) )))); } - /* "meshCalcUnix.pyx":1447 + /* "meshCalcUnix.pyx":1450 * za += node_zv[connection[i,j]] * * xm = xa/nvert # <<<<<<<<<<<<<< @@ -42080,11 +42142,11 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ if (unlikely(__pyx_v_nvert == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1447, __pyx_L1_error) + __PYX_ERR(0, 1450, __pyx_L1_error) } __pyx_v_xm = (__pyx_v_xa / ((double)__pyx_v_nvert)); - /* "meshCalcUnix.pyx":1448 + /* "meshCalcUnix.pyx":1451 * * xm = xa/nvert * ym = ya/nvert # <<<<<<<<<<<<<< @@ -42093,11 +42155,11 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ if (unlikely(__pyx_v_nvert == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1448, __pyx_L1_error) + __PYX_ERR(0, 1451, __pyx_L1_error) } __pyx_v_ym = (__pyx_v_ya / ((double)__pyx_v_nvert)); - /* "meshCalcUnix.pyx":1449 + /* "meshCalcUnix.pyx":1452 * xm = xa/nvert * ym = ya/nvert * zm = za/nvert # <<<<<<<<<<<<<< @@ -42106,11 +42168,11 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ if (unlikely(__pyx_v_nvert == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 1449, __pyx_L1_error) + __PYX_ERR(0, 1452, __pyx_L1_error) } __pyx_v_zm = (__pyx_v_za / ((double)__pyx_v_nvert)); - /* "meshCalcUnix.pyx":1451 + /* "meshCalcUnix.pyx":1454 * zm = za/nvert * * for j in range(nn): # <<<<<<<<<<<<<< @@ -42122,7 +42184,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "meshCalcUnix.pyx":1452 + /* "meshCalcUnix.pyx":1455 * * for j in range(nn): * if neigh[i,j] == -1: # <<<<<<<<<<<<<< @@ -42134,7 +42196,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_1 = ((*((long *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_neigh.data + __pyx_t_18 * __pyx_v_neigh.strides[0]) ) + __pyx_t_17 * __pyx_v_neigh.strides[1]) ))) == -1L); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1453 + /* "meshCalcUnix.pyx":1456 * for j in range(nn): * if neigh[i,j] == -1: * enode0 = connection[i][a[j]] # <<<<<<<<<<<<<< @@ -42146,7 +42208,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_19 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_a.data + __pyx_t_17 * __pyx_v_a.strides[0]) ))); __pyx_v_enode0 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_18 * __pyx_v_connection.strides[0]) ) + __pyx_t_19 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1454 + /* "meshCalcUnix.pyx":1457 * if neigh[i,j] == -1: * enode0 = connection[i][a[j]] * enode1 = connection[i][b[j]] # <<<<<<<<<<<<<< @@ -42158,31 +42220,31 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_19 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_b.data + __pyx_t_17 * __pyx_v_b.strides[0]) ))); __pyx_v_enode1 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_18 * __pyx_v_connection.strides[0]) ) + __pyx_t_19 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1455 + /* "meshCalcUnix.pyx":1458 * enode0 = connection[i][a[j]] * enode1 = connection[i][b[j]] * enodesl.append(enode0) # <<<<<<<<<<<<<< * enodesl.append(enode1) * if flag3d == 1: */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_enode0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_enode0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_enodesl, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_enodesl, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "meshCalcUnix.pyx":1456 + /* "meshCalcUnix.pyx":1459 * enode1 = connection[i][b[j]] * enodesl.append(enode0) * enodesl.append(enode1) # <<<<<<<<<<<<<< * if flag3d == 1: * enode2 = connection[i][c[j]] */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_enode1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_enode1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_enodesl, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1456, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_enodesl, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "meshCalcUnix.pyx":1457 + /* "meshCalcUnix.pyx":1460 * enodesl.append(enode0) * enodesl.append(enode1) * if flag3d == 1: # <<<<<<<<<<<<<< @@ -42192,32 +42254,32 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_1 = (__pyx_v_flag3d == 1); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1458 + /* "meshCalcUnix.pyx":1461 * enodesl.append(enode1) * if flag3d == 1: * enode2 = connection[i][c[j]] # <<<<<<<<<<<<<< * enodesl.append(enode2) * */ - if (unlikely(!__pyx_v_c.memview)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 1458, __pyx_L1_error) } + if (unlikely(!__pyx_v_c.memview)) { __Pyx_RaiseUnboundLocalError("c"); __PYX_ERR(0, 1461, __pyx_L1_error) } __pyx_t_17 = __pyx_v_j; __pyx_t_18 = __pyx_v_i; __pyx_t_19 = (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_c.data + __pyx_t_17 * __pyx_v_c.strides[0]) ))); __pyx_v_enode2 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_connection.data + __pyx_t_18 * __pyx_v_connection.strides[0]) ) + __pyx_t_19 * __pyx_v_connection.strides[1]) ))); - /* "meshCalcUnix.pyx":1459 + /* "meshCalcUnix.pyx":1462 * if flag3d == 1: * enode2 = connection[i][c[j]] * enodesl.append(enode2) # <<<<<<<<<<<<<< * * p0[0] = node_xv[enode0]# corner 1 */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_enode2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_enode2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_enodesl, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1459, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_enodesl, __pyx_t_4); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "meshCalcUnix.pyx":1461 + /* "meshCalcUnix.pyx":1464 * enodesl.append(enode2) * * p0[0] = node_xv[enode0]# corner 1 # <<<<<<<<<<<<<< @@ -42228,7 +42290,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 0; *((double *) ( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_18 * __pyx_v_p0.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_17 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1462 + /* "meshCalcUnix.pyx":1465 * * p0[0] = node_xv[enode0]# corner 1 * p0[1] = node_yv[enode0] # <<<<<<<<<<<<<< @@ -42239,7 +42301,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 1; *((double *) ( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_18 * __pyx_v_p0.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_17 * __pyx_v_node_yv.strides[0]) ))); - /* "meshCalcUnix.pyx":1463 + /* "meshCalcUnix.pyx":1466 * p0[0] = node_xv[enode0]# corner 1 * p0[1] = node_yv[enode0] * p0[2] = node_zv[enode0] # <<<<<<<<<<<<<< @@ -42250,7 +42312,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 2; *((double *) ( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_18 * __pyx_v_p0.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_17 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1465 + /* "meshCalcUnix.pyx":1468 * p0[2] = node_zv[enode0] * * p1[0] = node_xv[enode1] # corner 2 # <<<<<<<<<<<<<< @@ -42261,7 +42323,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 0; *((double *) ( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_18 * __pyx_v_p1.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_17 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1466 + /* "meshCalcUnix.pyx":1469 * * p1[0] = node_xv[enode1] # corner 2 * p1[1] = node_yv[enode1] # <<<<<<<<<<<<<< @@ -42272,7 +42334,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 1; *((double *) ( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_18 * __pyx_v_p1.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_17 * __pyx_v_node_yv.strides[0]) ))); - /* "meshCalcUnix.pyx":1467 + /* "meshCalcUnix.pyx":1470 * p1[0] = node_xv[enode1] # corner 2 * p1[1] = node_yv[enode1] * p1[2] = node_zv[enode1] # <<<<<<<<<<<<<< @@ -42283,7 +42345,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 2; *((double *) ( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_18 * __pyx_v_p1.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_17 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1469 + /* "meshCalcUnix.pyx":1472 * p1[2] = node_zv[enode1] * * p2[0] = node_xv[enode2] # corner 3 # <<<<<<<<<<<<<< @@ -42294,7 +42356,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 0; *((double *) ( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_18 * __pyx_v_p2.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_17 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1470 + /* "meshCalcUnix.pyx":1473 * * p2[0] = node_xv[enode2] # corner 3 * p2[1] = node_yv[enode2] # <<<<<<<<<<<<<< @@ -42305,7 +42367,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 1; *((double *) ( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_18 * __pyx_v_p2.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_yv.data + __pyx_t_17 * __pyx_v_node_yv.strides[0]) ))); - /* "meshCalcUnix.pyx":1471 + /* "meshCalcUnix.pyx":1474 * p2[0] = node_xv[enode2] # corner 3 * p2[1] = node_yv[enode2] * p2[2] = node_zv[enode2] # <<<<<<<<<<<<<< @@ -42316,7 +42378,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 2; *((double *) ( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_18 * __pyx_v_p2.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_17 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1474 + /* "meshCalcUnix.pyx":1477 * * # work out mid point of external face * xmf = (p0[0] + p1[0] + p2[0])/3 # <<<<<<<<<<<<<< @@ -42328,7 +42390,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_21 = 0; __pyx_v_xmf = ((((*((double *) ( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_17 * __pyx_v_p0.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_18 * __pyx_v_p1.strides[0]) )))) + (*((double *) ( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_21 * __pyx_v_p2.strides[0]) )))) / 3.0); - /* "meshCalcUnix.pyx":1475 + /* "meshCalcUnix.pyx":1478 * # work out mid point of external face * xmf = (p0[0] + p1[0] + p2[0])/3 * ymf = (p0[1] + p1[1] + p2[1])/3 # <<<<<<<<<<<<<< @@ -42340,7 +42402,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 1; __pyx_v_ymf = ((((*((double *) ( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_21 * __pyx_v_p0.strides[0]) ))) + (*((double *) ( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_18 * __pyx_v_p1.strides[0]) )))) + (*((double *) ( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_17 * __pyx_v_p2.strides[0]) )))) / 3.0); - /* "meshCalcUnix.pyx":1477 + /* "meshCalcUnix.pyx":1480 * ymf = (p0[1] + p1[1] + p2[1])/3 * * q0[0] = xmf # <<<<<<<<<<<<<< @@ -42350,7 +42412,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 0; *((double *) ( /* dim=0 */ (__pyx_v_q0.data + __pyx_t_17 * __pyx_v_q0.strides[0]) )) = __pyx_v_xmf; - /* "meshCalcUnix.pyx":1478 + /* "meshCalcUnix.pyx":1481 * * q0[0] = xmf * q0[1] = ymf # <<<<<<<<<<<<<< @@ -42360,7 +42422,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 1; *((double *) ( /* dim=0 */ (__pyx_v_q0.data + __pyx_t_17 * __pyx_v_q0.strides[0]) )) = __pyx_v_ymf; - /* "meshCalcUnix.pyx":1479 + /* "meshCalcUnix.pyx":1482 * q0[0] = xmf * q0[1] = ymf * q0[2] = tqz # top query point # <<<<<<<<<<<<<< @@ -42370,7 +42432,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 2; *((double *) ( /* dim=0 */ (__pyx_v_q0.data + __pyx_t_17 * __pyx_v_q0.strides[0]) )) = __pyx_v_tqz; - /* "meshCalcUnix.pyx":1481 + /* "meshCalcUnix.pyx":1484 * q0[2] = tqz # top query point * * q1[0] = xmf # <<<<<<<<<<<<<< @@ -42380,7 +42442,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 0; *((double *) ( /* dim=0 */ (__pyx_v_q1.data + __pyx_t_17 * __pyx_v_q1.strides[0]) )) = __pyx_v_xmf; - /* "meshCalcUnix.pyx":1482 + /* "meshCalcUnix.pyx":1485 * * q1[0] = xmf * q1[1] = ymf # <<<<<<<<<<<<<< @@ -42390,7 +42452,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 1; *((double *) ( /* dim=0 */ (__pyx_v_q1.data + __pyx_t_17 * __pyx_v_q1.strides[0]) )) = __pyx_v_ymf; - /* "meshCalcUnix.pyx":1483 + /* "meshCalcUnix.pyx":1486 * q1[0] = xmf * q1[1] = ymf * q1[2] = zm #bottom query point # <<<<<<<<<<<<<< @@ -42400,27 +42462,27 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 2; *((double *) ( /* dim=0 */ (__pyx_v_q1.data + __pyx_t_17 * __pyx_v_q1.strides[0]) )) = __pyx_v_zm; - /* "meshCalcUnix.pyx":1485 + /* "meshCalcUnix.pyx":1488 * q1[2] = zm #bottom query point * * s1 = tetra_signp(q0,p0,p1,p2) # <<<<<<<<<<<<<< * s2 = tetra_signp(q1,p0,p1,p2) * */ - __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_p0, __pyx_v_p1, __pyx_v_p2); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1485, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_p0, __pyx_v_p1, __pyx_v_p2); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1488, __pyx_L1_error) __pyx_v_s1 = __pyx_t_22; - /* "meshCalcUnix.pyx":1486 + /* "meshCalcUnix.pyx":1489 * * s1 = tetra_signp(q0,p0,p1,p2) * s2 = tetra_signp(q1,p0,p1,p2) # <<<<<<<<<<<<<< * * if s1 != s2: # then query point is either side of the triangle so probe */ - __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q1, __pyx_v_p0, __pyx_v_p1, __pyx_v_p2); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q1, __pyx_v_p0, __pyx_v_p1, __pyx_v_p2); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error) __pyx_v_s2 = __pyx_t_22; - /* "meshCalcUnix.pyx":1488 + /* "meshCalcUnix.pyx":1491 * s2 = tetra_signp(q1,p0,p1,p2) * * if s1 != s2: # then query point is either side of the triangle so probe # <<<<<<<<<<<<<< @@ -42430,37 +42492,37 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_1 = (__pyx_v_s1 != __pyx_v_s2); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1489 + /* "meshCalcUnix.pyx":1492 * * if s1 != s2: # then query point is either side of the triangle so probe * s3 = tetra_signp(q0,q1,p0,p1) # <<<<<<<<<<<<<< * s4 = tetra_signp(q0,q1,p1,p2) * s5 = tetra_signp(q0,q1,p2,p0) */ - __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_q1, __pyx_v_p0, __pyx_v_p1); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1489, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_q1, __pyx_v_p0, __pyx_v_p1); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1492, __pyx_L1_error) __pyx_v_s3 = __pyx_t_22; - /* "meshCalcUnix.pyx":1490 + /* "meshCalcUnix.pyx":1493 * if s1 != s2: # then query point is either side of the triangle so probe * s3 = tetra_signp(q0,q1,p0,p1) * s4 = tetra_signp(q0,q1,p1,p2) # <<<<<<<<<<<<<< * s5 = tetra_signp(q0,q1,p2,p0) * */ - __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_q1, __pyx_v_p1, __pyx_v_p2); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_q1, __pyx_v_p1, __pyx_v_p2); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1493, __pyx_L1_error) __pyx_v_s4 = __pyx_t_22; - /* "meshCalcUnix.pyx":1491 + /* "meshCalcUnix.pyx":1494 * s3 = tetra_signp(q0,q1,p0,p1) * s4 = tetra_signp(q0,q1,p1,p2) * s5 = tetra_signp(q0,q1,p2,p0) # <<<<<<<<<<<<<< * * if s3 == s4 and s4 == s5: */ - __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_q1, __pyx_v_p2, __pyx_v_p0); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1491, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_tetra_signp(__pyx_v_q0, __pyx_v_q1, __pyx_v_p2, __pyx_v_p0); if (unlikely(__pyx_t_22 == ((long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1494, __pyx_L1_error) __pyx_v_s5 = __pyx_t_22; - /* "meshCalcUnix.pyx":1493 + /* "meshCalcUnix.pyx":1496 * s5 = tetra_signp(q0,q1,p2,p0) * * if s3 == s4 and s4 == s5: # <<<<<<<<<<<<<< @@ -42478,7 +42540,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_L16_bool_binop_done:; if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1494 + /* "meshCalcUnix.pyx":1497 * * if s3 == s4 and s4 == s5: * for k in range(3): # <<<<<<<<<<<<<< @@ -42488,17 +42550,17 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ for (__pyx_t_24 = 0; __pyx_t_24 < 3; __pyx_t_24+=1) { __pyx_v_k = __pyx_t_24; - /* "meshCalcUnix.pyx":1495 + /* "meshCalcUnix.pyx":1498 * if s3 == s4 and s4 == s5: * for k in range(3): * surfaceflagl.append(1) # <<<<<<<<<<<<<< * else: * for k in range(3): */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_1); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_1); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1498, __pyx_L1_error) } - /* "meshCalcUnix.pyx":1493 + /* "meshCalcUnix.pyx":1496 * s5 = tetra_signp(q0,q1,p2,p0) * * if s3 == s4 and s4 == s5: # <<<<<<<<<<<<<< @@ -42508,7 +42570,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ goto __pyx_L15; } - /* "meshCalcUnix.pyx":1497 + /* "meshCalcUnix.pyx":1500 * surfaceflagl.append(1) * else: * for k in range(3): # <<<<<<<<<<<<<< @@ -42519,19 +42581,19 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ for (__pyx_t_24 = 0; __pyx_t_24 < 3; __pyx_t_24+=1) { __pyx_v_k = __pyx_t_24; - /* "meshCalcUnix.pyx":1498 + /* "meshCalcUnix.pyx":1501 * else: * for k in range(3): * surfaceflagl.append(0) # <<<<<<<<<<<<<< * else: * for k in range(3): */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1501, __pyx_L1_error) } } __pyx_L15:; - /* "meshCalcUnix.pyx":1488 + /* "meshCalcUnix.pyx":1491 * s2 = tetra_signp(q1,p0,p1,p2) * * if s1 != s2: # then query point is either side of the triangle so probe # <<<<<<<<<<<<<< @@ -42541,7 +42603,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ goto __pyx_L14; } - /* "meshCalcUnix.pyx":1500 + /* "meshCalcUnix.pyx":1503 * surfaceflagl.append(0) * else: * for k in range(3): # <<<<<<<<<<<<<< @@ -42552,19 +42614,19 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ for (__pyx_t_24 = 0; __pyx_t_24 < 3; __pyx_t_24+=1) { __pyx_v_k = __pyx_t_24; - /* "meshCalcUnix.pyx":1501 + /* "meshCalcUnix.pyx":1504 * else: * for k in range(3): * surfaceflagl.append(0) # <<<<<<<<<<<<<< * else: * #now to compute if face boundary condition */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1501, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1504, __pyx_L1_error) } } __pyx_L14:; - /* "meshCalcUnix.pyx":1457 + /* "meshCalcUnix.pyx":1460 * enodesl.append(enode0) * enodesl.append(enode1) * if flag3d == 1: # <<<<<<<<<<<<<< @@ -42574,7 +42636,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ goto __pyx_L13; } - /* "meshCalcUnix.pyx":1504 + /* "meshCalcUnix.pyx":1507 * else: * #now to compute if face boundary condition * dx = abs(node_xv[enode0] - node_xv[enode1]) # work out approx edge dimensions # <<<<<<<<<<<<<< @@ -42586,7 +42648,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = __pyx_v_enode1; __pyx_v_dx = fabs(((*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_17 * __pyx_v_node_xv.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_18 * __pyx_v_node_xv.strides[0]) ))))); - /* "meshCalcUnix.pyx":1505 + /* "meshCalcUnix.pyx":1508 * #now to compute if face boundary condition * dx = abs(node_xv[enode0] - node_xv[enode1]) # work out approx edge dimensions * dz = abs(node_zv[enode0] - node_zv[enode1]) # work out approx edge dimensions # <<<<<<<<<<<<<< @@ -42597,7 +42659,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = __pyx_v_enode1; __pyx_v_dz = fabs(((*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_18 * __pyx_v_node_zv.strides[0]) ))) - (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_17 * __pyx_v_node_zv.strides[0]) ))))); - /* "meshCalcUnix.pyx":1507 + /* "meshCalcUnix.pyx":1510 * dz = abs(node_zv[enode0] - node_zv[enode1]) # work out approx edge dimensions * * if dx < 1e-16: # element on side of mesh # <<<<<<<<<<<<<< @@ -42607,25 +42669,25 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_1 = (__pyx_v_dx < 1e-16); if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1508 + /* "meshCalcUnix.pyx":1511 * * if dx < 1e-16: # element on side of mesh * surfaceflagl.append(0) # <<<<<<<<<<<<<< * surfaceflagl.append(0) * else: */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1508, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1511, __pyx_L1_error) - /* "meshCalcUnix.pyx":1509 + /* "meshCalcUnix.pyx":1512 * if dx < 1e-16: # element on side of mesh * surfaceflagl.append(0) * surfaceflagl.append(0) # <<<<<<<<<<<<<< * else: * p0[0] = node_xv[enode0] */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1509, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1512, __pyx_L1_error) - /* "meshCalcUnix.pyx":1507 + /* "meshCalcUnix.pyx":1510 * dz = abs(node_zv[enode0] - node_zv[enode1]) # work out approx edge dimensions * * if dx < 1e-16: # element on side of mesh # <<<<<<<<<<<<<< @@ -42635,7 +42697,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ goto __pyx_L24; } - /* "meshCalcUnix.pyx":1511 + /* "meshCalcUnix.pyx":1514 * surfaceflagl.append(0) * else: * p0[0] = node_xv[enode0] # <<<<<<<<<<<<<< @@ -42647,7 +42709,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 0; *((double *) ( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_18 * __pyx_v_p0.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_17 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1512 + /* "meshCalcUnix.pyx":1515 * else: * p0[0] = node_xv[enode0] * p0[1] = node_zv[enode0] # <<<<<<<<<<<<<< @@ -42658,7 +42720,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 1; *((double *) ( /* dim=0 */ (__pyx_v_p0.data + __pyx_t_18 * __pyx_v_p0.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_17 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1513 + /* "meshCalcUnix.pyx":1516 * p0[0] = node_xv[enode0] * p0[1] = node_zv[enode0] * p1[0] = node_xv[enode1] # <<<<<<<<<<<<<< @@ -42669,7 +42731,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 0; *((double *) ( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_18 * __pyx_v_p1.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_xv.data + __pyx_t_17 * __pyx_v_node_xv.strides[0]) ))); - /* "meshCalcUnix.pyx":1514 + /* "meshCalcUnix.pyx":1517 * p0[1] = node_zv[enode0] * p1[0] = node_xv[enode1] * p1[1] = node_zv[enode1] # <<<<<<<<<<<<<< @@ -42680,7 +42742,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_18 = 1; *((double *) ( /* dim=0 */ (__pyx_v_p1.data + __pyx_t_18 * __pyx_v_p1.strides[0]) )) = (*((double *) ( /* dim=0 */ (__pyx_v_node_zv.data + __pyx_t_17 * __pyx_v_node_zv.strides[0]) ))); - /* "meshCalcUnix.pyx":1515 + /* "meshCalcUnix.pyx":1518 * p1[0] = node_xv[enode1] * p1[1] = node_zv[enode1] * p2[0] = xm # <<<<<<<<<<<<<< @@ -42690,7 +42752,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 0; *((double *) ( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_17 * __pyx_v_p2.strides[0]) )) = __pyx_v_xm; - /* "meshCalcUnix.pyx":1516 + /* "meshCalcUnix.pyx":1519 * p1[1] = node_zv[enode1] * p2[0] = xm * p2[1] = zm+dx+dz # <<<<<<<<<<<<<< @@ -42700,20 +42762,20 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_17 = 1; *((double *) ( /* dim=0 */ (__pyx_v_p2.data + __pyx_t_17 * __pyx_v_p2.strides[0]) )) = ((__pyx_v_zm + __pyx_v_dx) + __pyx_v_dz); - /* "meshCalcUnix.pyx":1517 + /* "meshCalcUnix.pyx":1520 * p2[0] = xm * p2[1] = zm+dx+dz * o = ccw(p0,p1,p2) # <<<<<<<<<<<<<< * * if o == 1: */ - __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_p0, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_v_p0, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_p1, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_6 = __pyx_memoryview_fromslice(__pyx_v_p1, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_p2, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_2 = __pyx_memoryview_fromslice(__pyx_v_p2, 1, (PyObject *(*)(char *)) __pyx_memview_get_double, (int (*)(char *, PyObject *)) __pyx_memview_set_double, 0);; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __pyx_f_8meshCalc_ccw(__pyx_t_4, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1517, __pyx_L1_error) + __pyx_t_3 = __pyx_f_8meshCalc_ccw(__pyx_t_4, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -42721,35 +42783,35 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __Pyx_XDECREF_SET(__pyx_v_o, __pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1519 + /* "meshCalcUnix.pyx":1522 * o = ccw(p0,p1,p2) * * if o == 1: # <<<<<<<<<<<<<< * surfaceflagl.append(1) * surfaceflagl.append(1) */ - __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_o, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_o, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1522, __pyx_L1_error) if (__pyx_t_1) { - /* "meshCalcUnix.pyx":1520 + /* "meshCalcUnix.pyx":1523 * * if o == 1: * surfaceflagl.append(1) # <<<<<<<<<<<<<< * surfaceflagl.append(1) * else: */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_1); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_1); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1523, __pyx_L1_error) - /* "meshCalcUnix.pyx":1521 + /* "meshCalcUnix.pyx":1524 * if o == 1: * surfaceflagl.append(1) * surfaceflagl.append(1) # <<<<<<<<<<<<<< * else: * surfaceflagl.append(0) */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_1); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1521, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_1); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1524, __pyx_L1_error) - /* "meshCalcUnix.pyx":1519 + /* "meshCalcUnix.pyx":1522 * o = ccw(p0,p1,p2) * * if o == 1: # <<<<<<<<<<<<<< @@ -42759,7 +42821,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ goto __pyx_L25; } - /* "meshCalcUnix.pyx":1523 + /* "meshCalcUnix.pyx":1526 * surfaceflagl.append(1) * else: * surfaceflagl.append(0) # <<<<<<<<<<<<<< @@ -42767,16 +42829,16 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ * */ /*else*/ { - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1526, __pyx_L1_error) - /* "meshCalcUnix.pyx":1524 + /* "meshCalcUnix.pyx":1527 * else: * surfaceflagl.append(0) * surfaceflagl.append(0) # <<<<<<<<<<<<<< * * */ - __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyList_Append(__pyx_v_surfaceflagl, __pyx_int_0); if (unlikely(__pyx_t_20 == ((int)-1))) __PYX_ERR(0, 1527, __pyx_L1_error) } __pyx_L25:; } @@ -42784,7 +42846,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ } __pyx_L13:; - /* "meshCalcUnix.pyx":1452 + /* "meshCalcUnix.pyx":1455 * * for j in range(nn): * if neigh[i,j] == -1: # <<<<<<<<<<<<<< @@ -42796,27 +42858,27 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_L5_continue:; } - /* "meshCalcUnix.pyx":1528 + /* "meshCalcUnix.pyx":1531 * * cdef np.ndarray[long long, ndim=1] enodeu, enodeidx * enodeu, enodeidx = np.unique(enodesl,return_index=True) # get unique nodes # <<<<<<<<<<<<<< * * cdef np.ndarray[long long, ndim=1] enodes = np.zeros(len(enodeu),dtype=np.int64) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_unique); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_unique); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_enodesl); __Pyx_GIVEREF(__pyx_v_enodesl); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_enodesl)) __PYX_ERR(0, 1528, __pyx_L1_error); - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_enodesl)) __PYX_ERR(0, 1531, __pyx_L1_error); + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 1528, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return_index, Py_True) < 0) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __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; @@ -42827,7 +42889,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1528, __pyx_L1_error) + __PYX_ERR(0, 1531, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -42840,15 +42902,15 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_25 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); @@ -42856,7 +42918,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_3 = __pyx_t_25(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_25(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1528, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_25(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1531, __pyx_L1_error) __pyx_t_25 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L27_unpacking_done; @@ -42864,11 +42926,11 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_25 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1528, __pyx_L1_error) + __PYX_ERR(0, 1531, __pyx_L1_error) __pyx_L27_unpacking_done:; } - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1528, __pyx_L1_error) - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1528, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1531, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1531, __pyx_L1_error) __pyx_t_26 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -42885,7 +42947,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_27 = __pyx_t_28 = __pyx_t_29 = 0; } __pyx_pybuffernd_enodeu.diminfo[0].strides = __pyx_pybuffernd_enodeu.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_enodeu.diminfo[0].shape = __pyx_pybuffernd_enodeu.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1528, __pyx_L1_error) + if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1531, __pyx_L1_error) } __pyx_t_26 = 0; __pyx_v_enodeu = ((PyArrayObject *)__pyx_t_6); @@ -42906,53 +42968,53 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_t_29 = __pyx_t_28 = __pyx_t_27 = 0; } __pyx_pybuffernd_enodeidx.diminfo[0].strides = __pyx_pybuffernd_enodeidx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_enodeidx.diminfo[0].shape = __pyx_pybuffernd_enodeidx.rcbuffer->pybuffer.shape[0]; - if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1528, __pyx_L1_error) + if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1531, __pyx_L1_error) } __pyx_t_26 = 0; __pyx_v_enodeidx = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1530 + /* "meshCalcUnix.pyx":1533 * enodeu, enodeidx = np.unique(enodesl,return_index=True) # get unique nodes * * cdef np.ndarray[long long, ndim=1] enodes = np.zeros(len(enodeu),dtype=np.int64) # <<<<<<<<<<<<<< * cdef np.ndarray[long long, ndim=1] surfaceflag = np.zeros(len(enodeu),dtype=np.int64) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_30 = PyObject_Length(((PyObject *)__pyx_v_enodeu)); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1530, __pyx_L1_error) - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_30); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_30 = PyObject_Length(((PyObject *)__pyx_v_enodeu)); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1533, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_30); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1530, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1533, __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_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1530, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1533, __pyx_L1_error) __pyx_t_31 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_enodes.rcbuffer->pybuffer, (PyObject*)__pyx_t_31, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_enodes = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_enodes.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1530, __pyx_L1_error) + __PYX_ERR(0, 1533, __pyx_L1_error) } else {__pyx_pybuffernd_enodes.diminfo[0].strides = __pyx_pybuffernd_enodes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_enodes.diminfo[0].shape = __pyx_pybuffernd_enodes.rcbuffer->pybuffer.shape[0]; } } @@ -42960,47 +43022,47 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_v_enodes = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1531 + /* "meshCalcUnix.pyx":1534 * * cdef np.ndarray[long long, ndim=1] enodes = np.zeros(len(enodeu),dtype=np.int64) * cdef np.ndarray[long long, ndim=1] surfaceflag = np.zeros(len(enodeu),dtype=np.int64) # <<<<<<<<<<<<<< * * for i in range(len(enodeu)): */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_30 = PyObject_Length(((PyObject *)__pyx_v_enodeu)); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1531, __pyx_L1_error) - __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_30 = PyObject_Length(((PyObject *)__pyx_v_enodeu)); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_30); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5)) __PYX_ERR(0, 1534, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1531, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1531, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1531, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1534, __pyx_L1_error) __pyx_t_32 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_surfaceflag.rcbuffer->pybuffer, (PyObject*)__pyx_t_32, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_surfaceflag = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_surfaceflag.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1531, __pyx_L1_error) + __PYX_ERR(0, 1534, __pyx_L1_error) } else {__pyx_pybuffernd_surfaceflag.diminfo[0].strides = __pyx_pybuffernd_surfaceflag.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_surfaceflag.diminfo[0].shape = __pyx_pybuffernd_surfaceflag.rcbuffer->pybuffer.shape[0]; } } @@ -43008,19 +43070,19 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ __pyx_v_surfaceflag = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":1533 + /* "meshCalcUnix.pyx":1536 * cdef np.ndarray[long long, ndim=1] surfaceflag = np.zeros(len(enodeu),dtype=np.int64) * * for i in range(len(enodeu)): # <<<<<<<<<<<<<< * enodes[i] = enodesl[enodeidx[i]] * surfaceflag[i] = surfaceflagl[enodeidx[i]] */ - __pyx_t_30 = PyObject_Length(((PyObject *)__pyx_v_enodeu)); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1533, __pyx_L1_error) + __pyx_t_30 = PyObject_Length(((PyObject *)__pyx_v_enodeu)); if (unlikely(__pyx_t_30 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1536, __pyx_L1_error) __pyx_t_33 = __pyx_t_30; for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_33; __pyx_t_10+=1) { __pyx_v_i = __pyx_t_10; - /* "meshCalcUnix.pyx":1534 + /* "meshCalcUnix.pyx":1537 * * for i in range(len(enodeu)): * enodes[i] = enodesl[enodeidx[i]] # <<<<<<<<<<<<<< @@ -43029,11 +43091,11 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ __pyx_t_17 = __pyx_v_i; __pyx_t_19 = (*__Pyx_BufPtrStrided1d(PY_LONG_LONG *, __pyx_pybuffernd_enodeidx.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_enodeidx.diminfo[0].strides)); - __pyx_t_34 = __Pyx_PyInt_As_PY_LONG_LONG(PyList_GET_ITEM(__pyx_v_enodesl, __pyx_t_19)); if (unlikely((__pyx_t_34 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_34 = __Pyx_PyInt_As_PY_LONG_LONG(PyList_GET_ITEM(__pyx_v_enodesl, __pyx_t_19)); if (unlikely((__pyx_t_34 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1537, __pyx_L1_error) __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(PY_LONG_LONG *, __pyx_pybuffernd_enodes.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_enodes.diminfo[0].strides) = __pyx_t_34; - /* "meshCalcUnix.pyx":1535 + /* "meshCalcUnix.pyx":1538 * for i in range(len(enodeu)): * enodes[i] = enodesl[enodeidx[i]] * surfaceflag[i] = surfaceflagl[enodeidx[i]] # <<<<<<<<<<<<<< @@ -43042,12 +43104,12 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ */ __pyx_t_17 = __pyx_v_i; __pyx_t_34 = (*__Pyx_BufPtrStrided1d(PY_LONG_LONG *, __pyx_pybuffernd_enodeidx.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_enodeidx.diminfo[0].strides)); - __pyx_t_19 = __Pyx_PyInt_As_PY_LONG_LONG(PyList_GET_ITEM(__pyx_v_surfaceflagl, __pyx_t_34)); if (unlikely((__pyx_t_19 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1535, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyInt_As_PY_LONG_LONG(PyList_GET_ITEM(__pyx_v_surfaceflagl, __pyx_t_34)); if (unlikely((__pyx_t_19 == (PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1538, __pyx_L1_error) __pyx_t_17 = __pyx_v_i; *__Pyx_BufPtrStrided1d(PY_LONG_LONG *, __pyx_pybuffernd_surfaceflag.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_surfaceflag.diminfo[0].strides) = __pyx_t_19; } - /* "meshCalcUnix.pyx":1537 + /* "meshCalcUnix.pyx":1540 * surfaceflag[i] = surfaceflagl[enodeidx[i]] * * return enodes, surfaceflag # <<<<<<<<<<<<<< @@ -43055,19 +43117,19 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1537, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF((PyObject *)__pyx_v_enodes); __Pyx_GIVEREF((PyObject *)__pyx_v_enodes); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_enodes))) __PYX_ERR(0, 1537, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_enodes))) __PYX_ERR(0, 1540, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_surfaceflag); __Pyx_GIVEREF((PyObject *)__pyx_v_surfaceflag); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_surfaceflag))) __PYX_ERR(0, 1537, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_surfaceflag))) __PYX_ERR(0, 1540, __pyx_L1_error); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":1368 + /* "meshCalcUnix.pyx":1371 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -43126,7 +43188,7 @@ __pyx_t_4 = __pyx_memoryview_fromslice(__pyx_t_13, 1, (PyObject *(*)(char *)) __ return __pyx_r; } -/* "meshCalcUnix.pyx":1540 +/* "meshCalcUnix.pyx":1543 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -43191,7 +43253,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1540, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -43199,14 +43261,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1540, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("fcrosscheck", 1, 2, 2, 1); __PYX_ERR(0, 1540, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fcrosscheck", 1, 2, 2, 1); __PYX_ERR(0, 1543, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fcrosscheck") < 0)) __PYX_ERR(0, 1540, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fcrosscheck") < 0)) __PYX_ERR(0, 1543, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -43214,12 +43276,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0); values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); } - __pyx_v_fconnection1 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection1.memview)) __PYX_ERR(0, 1542, __pyx_L3_error) - __pyx_v_fconnection2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection2.memview)) __PYX_ERR(0, 1542, __pyx_L3_error) + __pyx_v_fconnection1 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection1.memview)) __PYX_ERR(0, 1545, __pyx_L3_error) + __pyx_v_fconnection2 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection2.memview)) __PYX_ERR(0, 1545, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fcrosscheck", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1540, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fcrosscheck", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1543, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -43328,7 +43390,7 @@ static PyObject *__pyx_pf_8meshCalc_32fcrosscheck(CYTHON_UNUSED PyObject *__pyx_ __pyx_pybuffernd_repeats.data = NULL; __pyx_pybuffernd_repeats.rcbuffer = &__pyx_pybuffer_repeats; - /* "meshCalcUnix.pyx":1561 + /* "meshCalcUnix.pyx":1564 * * cdef int i * cdef int numel1 = fconnection1.shape[0] # <<<<<<<<<<<<<< @@ -43337,7 +43399,7 @@ static PyObject *__pyx_pf_8meshCalc_32fcrosscheck(CYTHON_UNUSED PyObject *__pyx_ */ __pyx_v_numel1 = (__pyx_v_fconnection1.shape[0]); - /* "meshCalcUnix.pyx":1562 + /* "meshCalcUnix.pyx":1565 * cdef int i * cdef int numel1 = fconnection1.shape[0] * cdef int numel2 = fconnection2.shape[0] # <<<<<<<<<<<<<< @@ -43346,83 +43408,83 @@ static PyObject *__pyx_pf_8meshCalc_32fcrosscheck(CYTHON_UNUSED PyObject *__pyx_ */ __pyx_v_numel2 = (__pyx_v_fconnection2.shape[0]); - /* "meshCalcUnix.pyx":1565 + /* "meshCalcUnix.pyx":1568 * * #face arrays * cdef long long[:] face = np.zeros(3,dtype=np.int64) # <<<<<<<<<<<<<< * * #combination arrays */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1565, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 1565, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__13, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_face = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1568 + /* "meshCalcUnix.pyx":1571 * * #combination arrays * cdef np.ndarray[long long, ndim=1] combo1 = np.zeros((numel1,),dtype=np.int64 ,order='C') # allocate space for combination matrix # <<<<<<<<<<<<<< * cdef long long[:] combov1 = combo1 * cdef np.ndarray[long long, ndim=1] combo2 = np.zeros((numel2,),dtype=np.int64 ,order='C') # allocate space for combination matrix */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_numel1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_numel1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1568, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1568, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1568, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1568, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1571, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_combo1.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_combo1 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_combo1.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1568, __pyx_L1_error) + __PYX_ERR(0, 1571, __pyx_L1_error) } else {__pyx_pybuffernd_combo1.diminfo[0].strides = __pyx_pybuffernd_combo1.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_combo1.diminfo[0].shape = __pyx_pybuffernd_combo1.rcbuffer->pybuffer.shape[0]; } } @@ -43430,64 +43492,64 @@ static PyObject *__pyx_pf_8meshCalc_32fcrosscheck(CYTHON_UNUSED PyObject *__pyx_ __pyx_v_combo1 = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "meshCalcUnix.pyx":1569 + /* "meshCalcUnix.pyx":1572 * #combination arrays * cdef np.ndarray[long long, ndim=1] combo1 = np.zeros((numel1,),dtype=np.int64 ,order='C') # allocate space for combination matrix * cdef long long[:] combov1 = combo1 # <<<<<<<<<<<<<< * cdef np.ndarray[long long, ndim=1] combo2 = np.zeros((numel2,),dtype=np.int64 ,order='C') # allocate space for combination matrix * cdef long long[:] combov2 = combo2 */ - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_combo1), PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1569, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_combo1), PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1572, __pyx_L1_error) __pyx_v_combov1 = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1570 + /* "meshCalcUnix.pyx":1573 * cdef np.ndarray[long long, ndim=1] combo1 = np.zeros((numel1,),dtype=np.int64 ,order='C') # allocate space for combination matrix * cdef long long[:] combov1 = combo1 * cdef np.ndarray[long long, ndim=1] combo2 = np.zeros((numel2,),dtype=np.int64 ,order='C') # allocate space for combination matrix # <<<<<<<<<<<<<< * cdef long long[:] combov2 = combo2 * #maximum number of node digits */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1570, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_numel2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_numel2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1570, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6)) __PYX_ERR(0, 1573, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1570, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 1570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1570, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1570, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1570, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1573, __pyx_L1_error) __pyx_t_8 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_combo2.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_combo2 = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_combo2.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1570, __pyx_L1_error) + __PYX_ERR(0, 1573, __pyx_L1_error) } else {__pyx_pybuffernd_combo2.diminfo[0].strides = __pyx_pybuffernd_combo2.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_combo2.diminfo[0].shape = __pyx_pybuffernd_combo2.rcbuffer->pybuffer.shape[0]; } } @@ -43495,19 +43557,19 @@ static PyObject *__pyx_pf_8meshCalc_32fcrosscheck(CYTHON_UNUSED PyObject *__pyx_ __pyx_v_combo2 = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1571 + /* "meshCalcUnix.pyx":1574 * cdef long long[:] combov1 = combo1 * cdef np.ndarray[long long, ndim=1] combo2 = np.zeros((numel2,),dtype=np.int64 ,order='C') # allocate space for combination matrix * cdef long long[:] combov2 = combo2 # <<<<<<<<<<<<<< * #maximum number of node digits * cdef int num_node = max([max(fconnection1[:,0]),max(fconnection1[:,1]), */ - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_combo2), PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_combo2), PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1574, __pyx_L1_error) __pyx_v_combov2 = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1573 + /* "meshCalcUnix.pyx":1576 * cdef long long[:] combov2 = combo2 * #maximum number of node digits * cdef int num_node = max([max(fconnection1[:,0]),max(fconnection1[:,1]), # <<<<<<<<<<<<<< @@ -43527,15 +43589,15 @@ __pyx_t_5.strides[0] = __pyx_v_fconnection1.strides[0]; __pyx_t_5.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1); __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1574 + /* "meshCalcUnix.pyx":1577 * #maximum number of node digits * cdef int num_node = max([max(fconnection1[:,0]),max(fconnection1[:,1]), * max(fconnection1[:,2]),max(fconnection2[:,0]), # <<<<<<<<<<<<<< @@ -43555,11 +43617,11 @@ __pyx_t_5.strides[0] = __pyx_v_fconnection1.strides[0]; __pyx_t_5.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1); __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5.data = __pyx_v_fconnection2.data; @@ -43575,15 +43637,15 @@ __pyx_t_5.strides[0] = __pyx_v_fconnection2.strides[0]; __pyx_t_5.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1574, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1); __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1575 + /* "meshCalcUnix.pyx":1578 * cdef int num_node = max([max(fconnection1[:,0]),max(fconnection1[:,1]), * max(fconnection1[:,2]),max(fconnection2[:,0]), * max(fconnection2[:,1]),max(fconnection2[:,2])]) # <<<<<<<<<<<<<< @@ -43603,11 +43665,11 @@ __pyx_t_5.strides[0] = __pyx_v_fconnection2.strides[0]; __pyx_t_5.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1); __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5.data = __pyx_v_fconnection2.data; @@ -43623,15 +43685,15 @@ __pyx_t_5.strides[0] = __pyx_v_fconnection2.strides[0]; __pyx_t_5.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1); __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1573 + /* "meshCalcUnix.pyx":1576 * cdef long long[:] combov2 = combo2 * #maximum number of node digits * cdef int num_node = max([max(fconnection1[:,0]),max(fconnection1[:,1]), # <<<<<<<<<<<<<< @@ -43651,15 +43713,15 @@ __pyx_t_5.strides[0] = __pyx_v_fconnection1.strides[0]; __pyx_t_5.data += __pyx_tmp_idx * __pyx_tmp_stride; } -__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) +__pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __pyx_memview_get_PY_LONG_LONG, (int (*)(char *, PyObject *)) __pyx_memview_set_PY_LONG_LONG, 0);; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __PYX_XCLEAR_MEMVIEW(&__pyx_t_5, 1); __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_max, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = PyObject_RichCompare(__pyx_t_4, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1573, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_t_4, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1576, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_4); @@ -43673,15 +43735,15 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_10 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1574 + /* "meshCalcUnix.pyx":1577 * #maximum number of node digits * cdef int num_node = max([max(fconnection1[:,0]),max(fconnection1[:,1]), * max(fconnection1[:,2]),max(fconnection2[:,0]), # <<<<<<<<<<<<<< * max(fconnection2[:,1]),max(fconnection2[:,2])]) * cdef int pad = len(str(num_node)) */ - __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1574, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_6); @@ -43694,8 +43756,8 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1574, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_2); @@ -43709,15 +43771,15 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_10 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1575 + /* "meshCalcUnix.pyx":1578 * cdef int num_node = max([max(fconnection1[:,0]),max(fconnection1[:,1]), * max(fconnection1[:,2]),max(fconnection2[:,0]), * max(fconnection2[:,1]),max(fconnection2[:,2])]) # <<<<<<<<<<<<<< * cdef int pad = len(str(num_node)) * */ - __pyx_t_11 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1575, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_1); @@ -43730,8 +43792,8 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __Pyx_INCREF(__pyx_t_3); __pyx_t_10 = __pyx_t_3; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_11 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1575, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_11 = PyObject_RichCompare(__pyx_t_9, __pyx_t_10, Py_GT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_9); @@ -43746,27 +43808,27 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_num_node = __pyx_t_13; - /* "meshCalcUnix.pyx":1576 + /* "meshCalcUnix.pyx":1579 * max(fconnection1[:,2]),max(fconnection2[:,0]), * max(fconnection2[:,1]),max(fconnection2[:,2])]) * cdef int pad = len(str(num_node)) # <<<<<<<<<<<<<< * * #assign unique node combinations to each face */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_num_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1576, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_num_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Str(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1576, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Str(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1576, __pyx_L1_error) + __pyx_t_14 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1579, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_pad = __pyx_t_14; - /* "meshCalcUnix.pyx":1579 + /* "meshCalcUnix.pyx":1582 * * #assign unique node combinations to each face * for i in range(numel1): # <<<<<<<<<<<<<< @@ -43778,7 +43840,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; - /* "meshCalcUnix.pyx":1581 + /* "meshCalcUnix.pyx":1584 * for i in range(numel1): * #setup nodes which are part of face * face[0] = fconnection1[i,0] # <<<<<<<<<<<<<< @@ -43790,7 +43852,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 0; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_19 * __pyx_v_face.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection1.data + __pyx_t_17 * __pyx_v_fconnection1.strides[0]) ) + __pyx_t_18 * __pyx_v_fconnection1.strides[1]) ))); - /* "meshCalcUnix.pyx":1582 + /* "meshCalcUnix.pyx":1585 * #setup nodes which are part of face * face[0] = fconnection1[i,0] * face[1] = fconnection1[i,1] # <<<<<<<<<<<<<< @@ -43802,7 +43864,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 1; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_19 * __pyx_v_face.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection1.data + __pyx_t_18 * __pyx_v_fconnection1.strides[0]) ) + __pyx_t_17 * __pyx_v_fconnection1.strides[1]) ))); - /* "meshCalcUnix.pyx":1583 + /* "meshCalcUnix.pyx":1586 * face[0] = fconnection1[i,0] * face[1] = fconnection1[i,1] * face[2] = fconnection1[i,2] # <<<<<<<<<<<<<< @@ -43814,16 +43876,16 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_19 = 2; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_19 * __pyx_v_face.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection1.data + __pyx_t_17 * __pyx_v_fconnection1.strides[0]) ) + __pyx_t_18 * __pyx_v_fconnection1.strides[1]) ))); - /* "meshCalcUnix.pyx":1585 + /* "meshCalcUnix.pyx":1588 * face[2] = fconnection1[i,2] * # sort face indexes * sortInt(face,3) # <<<<<<<<<<<<<< * # assign each face an organised and unique code * combov1[i] = mergeInts(face[0],face[1],face[2],pad) */ - __pyx_f_8meshCalc_sortInt(__pyx_v_face, 3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1585, __pyx_L1_error) + __pyx_f_8meshCalc_sortInt(__pyx_v_face, 3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1588, __pyx_L1_error) - /* "meshCalcUnix.pyx":1587 + /* "meshCalcUnix.pyx":1590 * sortInt(face,3) * # assign each face an organised and unique code * combov1[i] = mergeInts(face[0],face[1],face[2],pad) # <<<<<<<<<<<<<< @@ -43833,12 +43895,12 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 0; __pyx_t_17 = 1; __pyx_t_19 = 2; - __pyx_t_20 = __pyx_f_8meshCalc_mergeInts((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_18 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_17 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_19 * __pyx_v_face.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1587, __pyx_L1_error) + __pyx_t_20 = __pyx_f_8meshCalc_mergeInts((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_18 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_17 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_19 * __pyx_v_face.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1590, __pyx_L1_error) __pyx_t_19 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_combov1.data + __pyx_t_19 * __pyx_v_combov1.strides[0]) )) = __pyx_t_20; } - /* "meshCalcUnix.pyx":1588 + /* "meshCalcUnix.pyx":1591 * # assign each face an organised and unique code * combov1[i] = mergeInts(face[0],face[1],face[2],pad) * for i in range(numel2): # <<<<<<<<<<<<<< @@ -43850,7 +43912,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; - /* "meshCalcUnix.pyx":1590 + /* "meshCalcUnix.pyx":1593 * for i in range(numel2): * #setup nodes which are part of face * face[0] = fconnection2[i,0] # <<<<<<<<<<<<<< @@ -43862,7 +43924,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 0; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_18 * __pyx_v_face.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection2.data + __pyx_t_19 * __pyx_v_fconnection2.strides[0]) ) + __pyx_t_17 * __pyx_v_fconnection2.strides[1]) ))); - /* "meshCalcUnix.pyx":1591 + /* "meshCalcUnix.pyx":1594 * #setup nodes which are part of face * face[0] = fconnection2[i,0] * face[1] = fconnection2[i,1] # <<<<<<<<<<<<<< @@ -43874,7 +43936,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 1; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_18 * __pyx_v_face.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection2.data + __pyx_t_17 * __pyx_v_fconnection2.strides[0]) ) + __pyx_t_19 * __pyx_v_fconnection2.strides[1]) ))); - /* "meshCalcUnix.pyx":1592 + /* "meshCalcUnix.pyx":1595 * face[0] = fconnection2[i,0] * face[1] = fconnection2[i,1] * face[2] = fconnection2[i,2] # <<<<<<<<<<<<<< @@ -43886,16 +43948,16 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = 2; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_18 * __pyx_v_face.strides[0]) )) = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection2.data + __pyx_t_19 * __pyx_v_fconnection2.strides[0]) ) + __pyx_t_17 * __pyx_v_fconnection2.strides[1]) ))); - /* "meshCalcUnix.pyx":1594 + /* "meshCalcUnix.pyx":1597 * face[2] = fconnection2[i,2] * # sort face indexes * sortInt(face,3) # <<<<<<<<<<<<<< * # assign each face an organised and unique code * combov2[i] = mergeInts(face[0],face[1],face[2],pad) */ - __pyx_f_8meshCalc_sortInt(__pyx_v_face, 3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1594, __pyx_L1_error) + __pyx_f_8meshCalc_sortInt(__pyx_v_face, 3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L1_error) - /* "meshCalcUnix.pyx":1596 + /* "meshCalcUnix.pyx":1599 * sortInt(face,3) * # assign each face an organised and unique code * combov2[i] = mergeInts(face[0],face[1],face[2],pad) # <<<<<<<<<<<<<< @@ -43905,19 +43967,19 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_17 = 0; __pyx_t_19 = 1; __pyx_t_18 = 2; - __pyx_t_20 = __pyx_f_8meshCalc_mergeInts((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_17 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_19 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_18 * __pyx_v_face.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1596, __pyx_L1_error) + __pyx_t_20 = __pyx_f_8meshCalc_mergeInts((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_17 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_19 * __pyx_v_face.strides[0]) ))), (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face.data + __pyx_t_18 * __pyx_v_face.strides[0]) ))), __pyx_v_pad); if (unlikely(__pyx_t_20 == ((PY_LONG_LONG)-1) && PyErr_Occurred())) __PYX_ERR(0, 1599, __pyx_L1_error) __pyx_t_18 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_combov2.data + __pyx_t_18 * __pyx_v_combov2.strides[0]) )) = __pyx_t_20; } - /* "meshCalcUnix.pyx":1600 + /* "meshCalcUnix.pyx":1603 * * #using binary search and sorted lists for efficient lookup * cdef np.ndarray[long long, ndim=1] cflatten = combo2.flatten() #all faces in one array # <<<<<<<<<<<<<< * cdef np.ndarray[long long, ndim=1] tempidx = np.argsort(cflatten).astype(int,order='C') * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_combo2), __pyx_n_s_flatten); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_combo2), __pyx_n_s_flatten); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; __pyx_t_13 = 0; @@ -43937,17 +43999,17 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_13, 0+__pyx_t_13); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1600, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1600, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1603, __pyx_L1_error) __pyx_t_21 = ((PyArrayObject *)__pyx_t_4); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_cflatten.rcbuffer->pybuffer, (PyObject*)__pyx_t_21, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_cflatten = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_cflatten.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1600, __pyx_L1_error) + __PYX_ERR(0, 1603, __pyx_L1_error) } else {__pyx_pybuffernd_cflatten.diminfo[0].strides = __pyx_pybuffernd_cflatten.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_cflatten.diminfo[0].shape = __pyx_pybuffernd_cflatten.rcbuffer->pybuffer.shape[0]; } } @@ -43955,16 +44017,16 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_v_cflatten = ((PyArrayObject *)__pyx_t_4); __pyx_t_4 = 0; - /* "meshCalcUnix.pyx":1601 + /* "meshCalcUnix.pyx":1604 * #using binary search and sorted lists for efficient lookup * cdef np.ndarray[long long, ndim=1] cflatten = combo2.flatten() #all faces in one array * cdef np.ndarray[long long, ndim=1] tempidx = np.argsort(cflatten).astype(int,order='C') # <<<<<<<<<<<<<< * * cdef long long[:] csort = cflatten[tempidx] # sorted faces (for second matrix) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_argsort); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_argsort); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -43985,33 +44047,33 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p PyObject *__pyx_callargs[2] = {__pyx_t_3, ((PyObject *)__pyx_v_cflatten)}; __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_13, 1+__pyx_t_13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_astype); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF((PyObject *)(&PyInt_Type)); __Pyx_GIVEREF((PyObject *)(&PyInt_Type)); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 1601, __pyx_L1_error); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1601, __pyx_L1_error) + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)(&PyInt_Type)))) __PYX_ERR(0, 1604, __pyx_L1_error); + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1601, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1601, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1604, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1601, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1604, __pyx_L1_error) __pyx_t_22 = ((PyArrayObject *)__pyx_t_2); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_tempidx.rcbuffer->pybuffer, (PyObject*)__pyx_t_22, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_tempidx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_tempidx.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1601, __pyx_L1_error) + __PYX_ERR(0, 1604, __pyx_L1_error) } else {__pyx_pybuffernd_tempidx.diminfo[0].strides = __pyx_pybuffernd_tempidx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_tempidx.diminfo[0].shape = __pyx_pybuffernd_tempidx.rcbuffer->pybuffer.shape[0]; } } @@ -44019,67 +44081,67 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_v_tempidx = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "meshCalcUnix.pyx":1603 + /* "meshCalcUnix.pyx":1606 * cdef np.ndarray[long long, ndim=1] tempidx = np.argsort(cflatten).astype(int,order='C') * * cdef long long[:] csort = cflatten[tempidx] # sorted faces (for second matrix) # <<<<<<<<<<<<<< * cdef long long o * */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_cflatten), ((PyObject *)__pyx_v_tempidx)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1603, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_cflatten), ((PyObject *)__pyx_v_tempidx)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1603, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1606, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_csort = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1606 + /* "meshCalcUnix.pyx":1609 * cdef long long o * * cdef np.ndarray[long long, ndim=1] repeats = np.zeros((numel1,),dtype=np.int64 ,order='C') # <<<<<<<<<<<<<< * cdef long long[:] repeatv = repeats * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numel1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numel1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1606, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1606, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1606, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1606, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1609, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1606, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1606, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_order, __pyx_n_s_C) < 0) __PYX_ERR(0, 1609, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1609, __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_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1606, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1609, __pyx_L1_error) __pyx_t_23 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_repeats.rcbuffer->pybuffer, (PyObject*)__pyx_t_23, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_repeats = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_repeats.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1606, __pyx_L1_error) + __PYX_ERR(0, 1609, __pyx_L1_error) } else {__pyx_pybuffernd_repeats.diminfo[0].strides = __pyx_pybuffernd_repeats.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_repeats.diminfo[0].shape = __pyx_pybuffernd_repeats.rcbuffer->pybuffer.shape[0]; } } @@ -44087,19 +44149,19 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_v_repeats = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":1607 + /* "meshCalcUnix.pyx":1610 * * cdef np.ndarray[long long, ndim=1] repeats = np.zeros((numel1,),dtype=np.int64 ,order='C') * cdef long long[:] repeatv = repeats # <<<<<<<<<<<<<< * * for i in range(numel1): */ - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_repeats), PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1607, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_repeats), PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1610, __pyx_L1_error) __pyx_v_repeatv = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1609 + /* "meshCalcUnix.pyx":1612 * cdef long long[:] repeatv = repeats * * for i in range(numel1): # <<<<<<<<<<<<<< @@ -44111,7 +44173,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_i = __pyx_t_16; - /* "meshCalcUnix.pyx":1611 + /* "meshCalcUnix.pyx":1614 * for i in range(numel1): * #for i in prange(numel1,nogil=True,num_threads=num_threads,schedule='static'): # parrallel implimentation * o = bisection_search(csort,combov1[i]) # only works on a sorted array # <<<<<<<<<<<<<< @@ -44119,10 +44181,10 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p * if o!=-1: */ __pyx_t_18 = __pyx_v_i; - __pyx_t_24 = __pyx_f_8meshCalc_bisection_search(__pyx_v_csort, (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_combov1.data + __pyx_t_18 * __pyx_v_combov1.strides[0]) )))); if (unlikely(__pyx_t_24 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1611, __pyx_L1_error) + __pyx_t_24 = __pyx_f_8meshCalc_bisection_search(__pyx_v_csort, (*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_combov1.data + __pyx_t_18 * __pyx_v_combov1.strides[0]) )))); if (unlikely(__pyx_t_24 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1614, __pyx_L1_error) __pyx_v_o = __pyx_t_24; - /* "meshCalcUnix.pyx":1613 + /* "meshCalcUnix.pyx":1616 * o = bisection_search(csort,combov1[i]) # only works on a sorted array * #if the item is found then o!=-1 and it must be a repeat * if o!=-1: # <<<<<<<<<<<<<< @@ -44132,7 +44194,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_12 = (__pyx_v_o != -1LL); if (__pyx_t_12) { - /* "meshCalcUnix.pyx":1614 + /* "meshCalcUnix.pyx":1617 * #if the item is found then o!=-1 and it must be a repeat * if o!=-1: * repeatv[i] = 1 # <<<<<<<<<<<<<< @@ -44142,7 +44204,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_t_18 = __pyx_v_i; *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_repeatv.data + __pyx_t_18 * __pyx_v_repeatv.strides[0]) )) = 1; - /* "meshCalcUnix.pyx":1613 + /* "meshCalcUnix.pyx":1616 * o = bisection_search(csort,combov1[i]) # only works on a sorted array * #if the item is found then o!=-1 and it must be a repeat * if o!=-1: # <<<<<<<<<<<<<< @@ -44152,7 +44214,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p } } - /* "meshCalcUnix.pyx":1616 + /* "meshCalcUnix.pyx":1619 * repeatv[i] = 1 * * return repeats # <<<<<<<<<<<<<< @@ -44164,7 +44226,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p __pyx_r = ((PyObject *)__pyx_v_repeats); goto __pyx_L0; - /* "meshCalcUnix.pyx":1540 + /* "meshCalcUnix.pyx":1543 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -44218,7 +44280,7 @@ __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_t_5, 1, (PyObject *(*)(char *)) __p return __pyx_r; } -/* "meshCalcUnix.pyx":1618 +/* "meshCalcUnix.pyx":1621 * return repeats * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -44286,7 +44348,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -44294,9 +44356,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("boundcall", 1, 3, 3, 1); __PYX_ERR(0, 1618, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("boundcall", 1, 3, 3, 1); __PYX_ERR(0, 1621, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -44304,14 +44366,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[2]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1618, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1621, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("boundcall", 1, 3, 3, 2); __PYX_ERR(0, 1618, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("boundcall", 1, 3, 3, 2); __PYX_ERR(0, 1621, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "boundcall") < 0)) __PYX_ERR(0, 1618, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "boundcall") < 0)) __PYX_ERR(0, 1621, __pyx_L3_error) } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; @@ -44320,13 +44382,13 @@ PyObject *__pyx_args, PyObject *__pyx_kwds values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1); values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2); } - __pyx_v_tconnection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_tconnection.memview)) __PYX_ERR(0, 1620, __pyx_L3_error) - __pyx_v_fconnection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection.memview)) __PYX_ERR(0, 1620, __pyx_L3_error) - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1620, __pyx_L3_error) + __pyx_v_tconnection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_tconnection.memview)) __PYX_ERR(0, 1623, __pyx_L3_error) + __pyx_v_fconnection = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_fconnection.memview)) __PYX_ERR(0, 1623, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[2], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1623, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("boundcall", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1618, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("boundcall", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1621, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -44425,7 +44487,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_pybuffernd_face_bd.data = NULL; __pyx_pybuffernd_face_bd.rcbuffer = &__pyx_pybuffer_face_bd; - /* "meshCalcUnix.pyx":1651 + /* "meshCalcUnix.pyx":1654 * * #declare vars * cdef int numel = tconnection.shape[0] # <<<<<<<<<<<<<< @@ -44434,7 +44496,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_numel = (__pyx_v_tconnection.shape[0]); - /* "meshCalcUnix.pyx":1652 + /* "meshCalcUnix.pyx":1655 * #declare vars * cdef int numel = tconnection.shape[0] * cdef int numel_check = fconnection.shape[0] # <<<<<<<<<<<<<< @@ -44443,7 +44505,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_numel_check = (__pyx_v_fconnection.shape[0]); - /* "meshCalcUnix.pyx":1653 + /* "meshCalcUnix.pyx":1656 * cdef int numel = tconnection.shape[0] * cdef int numel_check = fconnection.shape[0] * cdef int numnp = node.shape[0] # <<<<<<<<<<<<<< @@ -44452,7 +44514,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_numnp = (__pyx_v_node.shape[0]); - /* "meshCalcUnix.pyx":1656 + /* "meshCalcUnix.pyx":1659 * * #face cell handling * cdef int npere_face = 3 # <<<<<<<<<<<<<< @@ -44461,106 +44523,106 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_npere_face = 3; - /* "meshCalcUnix.pyx":1657 + /* "meshCalcUnix.pyx":1660 * #face cell handling * cdef int npere_face = 3 * cdef double[:] x = np.zeros(npere_face ,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] y = np.zeros(npere_face ,dtype=float) * cdef double[:] z = np.zeros(npere_face ,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1657, __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, 1657, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1660, __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, 1660, __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_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1660, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_x = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1658 + /* "meshCalcUnix.pyx":1661 * cdef int npere_face = 3 * cdef double[:] x = np.zeros(npere_face ,dtype=float) * cdef double[:] y = np.zeros(npere_face ,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] z = np.zeros(npere_face ,dtype=float) * cdef double dx, dy, dz */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1658, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1658, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1661, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_y = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1659 + /* "meshCalcUnix.pyx":1662 * cdef double[:] x = np.zeros(npere_face ,dtype=float) * cdef double[:] y = np.zeros(npere_face ,dtype=float) * cdef double[:] z = np.zeros(npere_face ,dtype=float) # <<<<<<<<<<<<<< * cdef double dx, dy, dz * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1659, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1659, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1662, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1662, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_z = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1663 + /* "meshCalcUnix.pyx":1666 * * #tetrahedral cell handling * cdef int npere = 4 # <<<<<<<<<<<<<< @@ -44569,211 +44631,211 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_npere = 4; - /* "meshCalcUnix.pyx":1664 + /* "meshCalcUnix.pyx":1667 * #tetrahedral cell handling * cdef int npere = 4 * cdef double[:] cx = np.zeros(npere ,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] cy = np.zeros(npere ,dtype=float) * cdef double[:] cz = np.zeros(npere ,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1664, __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, 1664, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1667, __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, 1667, __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_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1664, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1667, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_cx = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1665 + /* "meshCalcUnix.pyx":1668 * cdef int npere = 4 * cdef double[:] cx = np.zeros(npere ,dtype=float) * cdef double[:] cy = np.zeros(npere ,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] cz = np.zeros(npere ,dtype=float) * */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1665, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1665, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_cy = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1666 + /* "meshCalcUnix.pyx":1669 * cdef double[:] cx = np.zeros(npere ,dtype=float) * cdef double[:] cy = np.zeros(npere ,dtype=float) * cdef double[:] cz = np.zeros(npere ,dtype=float) # <<<<<<<<<<<<<< * * cdef double[:] tcentriod = np.zeros(npere_face,dtype=float) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1666, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1666, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1666, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1666, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_1, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_cz = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1668 + /* "meshCalcUnix.pyx":1671 * cdef double[:] cz = np.zeros(npere ,dtype=float) * * cdef double[:] tcentriod = np.zeros(npere_face,dtype=float) # <<<<<<<<<<<<<< * cdef double[:] fcentriod = np.zeros(npere_face,dtype=float) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1668, __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, 1668, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1671, __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, 1671, __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_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_4, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_tcentriod = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1669 + /* "meshCalcUnix.pyx":1672 * * cdef double[:] tcentriod = np.zeros(npere_face,dtype=float) * cdef double[:] fcentriod = np.zeros(npere_face,dtype=float) # <<<<<<<<<<<<<< * * cdef long bd # boundary flags */ - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_zeros); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_npere_face); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1669, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1669, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_to_MemoryviewSlice_ds_double(__pyx_t_2, PyBUF_WRITABLE); if (unlikely(!__pyx_t_5.memview)) __PYX_ERR(0, 1672, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_fcentriod = __pyx_t_5; __pyx_t_5.memview = NULL; __pyx_t_5.data = NULL; - /* "meshCalcUnix.pyx":1672 + /* "meshCalcUnix.pyx":1675 * * cdef long bd # boundary flags * cdef np.ndarray[long long, ndim=1] node_bd = np.zeros(numnp,dtype=np.int64) # <<<<<<<<<<<<<< * cdef np.ndarray[long long, ndim=1] face_bd = np.zeros(numel,dtype=np.int64) * cdef long long[:] node_bdv = node_bd */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1672, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_int64); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1672, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_6) < 0) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1672, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1675, __pyx_L1_error) __pyx_t_7 = ((PyArrayObject *)__pyx_t_6); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_node_bd.rcbuffer->pybuffer, (PyObject*)__pyx_t_7, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_node_bd = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_node_bd.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1672, __pyx_L1_error) + __PYX_ERR(0, 1675, __pyx_L1_error) } else {__pyx_pybuffernd_node_bd.diminfo[0].strides = __pyx_pybuffernd_node_bd.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_node_bd.diminfo[0].shape = __pyx_pybuffernd_node_bd.rcbuffer->pybuffer.shape[0]; } } @@ -44781,46 +44843,46 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_v_node_bd = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "meshCalcUnix.pyx":1673 + /* "meshCalcUnix.pyx":1676 * cdef long bd # boundary flags * cdef np.ndarray[long long, ndim=1] node_bd = np.zeros(numnp,dtype=np.int64) * cdef np.ndarray[long long, ndim=1] face_bd = np.zeros(numel,dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long[:] node_bdv = node_bd * cdef long long[:] face_bdv = face_bd */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_np); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_6); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1673, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1673, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_t_1) < 0) __PYX_ERR(0, 1676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1676, __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_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1673, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1676, __pyx_L1_error) __pyx_t_8 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_face_bd.rcbuffer->pybuffer, (PyObject*)__pyx_t_8, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_face_bd = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_face_bd.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1673, __pyx_L1_error) + __PYX_ERR(0, 1676, __pyx_L1_error) } else {__pyx_pybuffernd_face_bd.diminfo[0].strides = __pyx_pybuffernd_face_bd.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_face_bd.diminfo[0].shape = __pyx_pybuffernd_face_bd.rcbuffer->pybuffer.shape[0]; } } @@ -44828,31 +44890,31 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_v_face_bd = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "meshCalcUnix.pyx":1674 + /* "meshCalcUnix.pyx":1677 * cdef np.ndarray[long long, ndim=1] node_bd = np.zeros(numnp,dtype=np.int64) * cdef np.ndarray[long long, ndim=1] face_bd = np.zeros(numel,dtype=np.int64) * cdef long long[:] node_bdv = node_bd # <<<<<<<<<<<<<< * cdef long long[:] face_bdv = face_bd * */ - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_node_bd), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_node_bd), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1677, __pyx_L1_error) __pyx_v_node_bdv = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1675 + /* "meshCalcUnix.pyx":1678 * cdef np.ndarray[long long, ndim=1] face_bd = np.zeros(numel,dtype=np.int64) * cdef long long[:] node_bdv = node_bd * cdef long long[:] face_bdv = face_bd # <<<<<<<<<<<<<< * * #do checks? */ - __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_face_bd), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1675, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(((PyObject *)__pyx_v_face_bd), PyBUF_WRITABLE); if (unlikely(!__pyx_t_9.memview)) __PYX_ERR(0, 1678, __pyx_L1_error) __pyx_v_face_bdv = __pyx_t_9; __pyx_t_9.memview = NULL; __pyx_t_9.data = NULL; - /* "meshCalcUnix.pyx":1678 + /* "meshCalcUnix.pyx":1681 * * #do checks? * if numel != numel_check: # <<<<<<<<<<<<<< @@ -44862,20 +44924,20 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_10 = (__pyx_v_numel != __pyx_v_numel_check); if (unlikely(__pyx_t_10)) { - /* "meshCalcUnix.pyx":1679 + /* "meshCalcUnix.pyx":1682 * #do checks? * if numel != numel_check: * raise ValueError('Mismatch in connection matrix lengths') # <<<<<<<<<<<<<< * * #compute cell centres */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1679, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1679, __pyx_L1_error) + __PYX_ERR(0, 1682, __pyx_L1_error) - /* "meshCalcUnix.pyx":1678 + /* "meshCalcUnix.pyx":1681 * * #do checks? * if numel != numel_check: # <<<<<<<<<<<<<< @@ -44884,7 +44946,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "meshCalcUnix.pyx":1682 + /* "meshCalcUnix.pyx":1685 * * #compute cell centres * for i in range(numel): # <<<<<<<<<<<<<< @@ -44896,7 +44958,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; - /* "meshCalcUnix.pyx":1683 + /* "meshCalcUnix.pyx":1686 * #compute cell centres * for i in range(numel): * for j in range(npere_face): # <<<<<<<<<<<<<< @@ -44908,7 +44970,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "meshCalcUnix.pyx":1684 + /* "meshCalcUnix.pyx":1687 * for i in range(numel): * for j in range(npere_face): * x[j] = node[fconnection[i,j],0] # <<<<<<<<<<<<<< @@ -44922,7 +44984,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_21 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_x.data + __pyx_t_21 * __pyx_v_x.strides[0]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node.data + __pyx_t_19 * __pyx_v_node.strides[0]) ) + __pyx_t_20 * __pyx_v_node.strides[1]) ))); - /* "meshCalcUnix.pyx":1685 + /* "meshCalcUnix.pyx":1688 * for j in range(npere_face): * x[j] = node[fconnection[i,j],0] * y[j] = node[fconnection[i,j],1] # <<<<<<<<<<<<<< @@ -44936,7 +44998,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_21 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_y.data + __pyx_t_21 * __pyx_v_y.strides[0]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node.data + __pyx_t_19 * __pyx_v_node.strides[0]) ) + __pyx_t_20 * __pyx_v_node.strides[1]) ))); - /* "meshCalcUnix.pyx":1686 + /* "meshCalcUnix.pyx":1689 * x[j] = node[fconnection[i,j],0] * y[j] = node[fconnection[i,j],1] * z[j] = node[fconnection[i,j],2] # <<<<<<<<<<<<<< @@ -44951,29 +45013,29 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se *((double *) ( /* dim=0 */ (__pyx_v_z.data + __pyx_t_21 * __pyx_v_z.strides[0]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node.data + __pyx_t_19 * __pyx_v_node.strides[0]) ) + __pyx_t_20 * __pyx_v_node.strides[1]) ))); } - /* "meshCalcUnix.pyx":1688 + /* "meshCalcUnix.pyx":1691 * z[j] = node[fconnection[i,j],2] * * dx = fmax(x) - fmin(x) # <<<<<<<<<<<<<< * dy = fmax(y) - fmin(y) * */ - __pyx_t_22 = __pyx_f_8meshCalc_fmax(__pyx_v_x); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1688, __pyx_L1_error) - __pyx_t_23 = __pyx_f_8meshCalc_fmin(__pyx_v_x); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_fmax(__pyx_v_x); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L1_error) + __pyx_t_23 = __pyx_f_8meshCalc_fmin(__pyx_v_x); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1691, __pyx_L1_error) __pyx_v_dx = (__pyx_t_22 - __pyx_t_23); - /* "meshCalcUnix.pyx":1689 + /* "meshCalcUnix.pyx":1692 * * dx = fmax(x) - fmin(x) * dy = fmax(y) - fmin(y) # <<<<<<<<<<<<<< * * if dy < 1e-16 or dx < 1e-16 : #face is on the side of the mesh */ - __pyx_t_23 = __pyx_f_8meshCalc_fmax(__pyx_v_y); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1689, __pyx_L1_error) - __pyx_t_22 = __pyx_f_8meshCalc_fmin(__pyx_v_y); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1689, __pyx_L1_error) + __pyx_t_23 = __pyx_f_8meshCalc_fmax(__pyx_v_y); if (unlikely(__pyx_t_23 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1692, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_fmin(__pyx_v_y); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1692, __pyx_L1_error) __pyx_v_dy = (__pyx_t_23 - __pyx_t_22); - /* "meshCalcUnix.pyx":1691 + /* "meshCalcUnix.pyx":1694 * dy = fmax(y) - fmin(y) * * if dy < 1e-16 or dx < 1e-16 : #face is on the side of the mesh # <<<<<<<<<<<<<< @@ -44991,7 +45053,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_L9_bool_binop_done:; if (__pyx_t_10) { - /* "meshCalcUnix.pyx":1692 + /* "meshCalcUnix.pyx":1695 * * if dy < 1e-16 or dx < 1e-16 : #face is on the side of the mesh * bd = 2 # <<<<<<<<<<<<<< @@ -45000,7 +45062,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_bd = 2; - /* "meshCalcUnix.pyx":1691 + /* "meshCalcUnix.pyx":1694 * dy = fmax(y) - fmin(y) * * if dy < 1e-16 or dx < 1e-16 : #face is on the side of the mesh # <<<<<<<<<<<<<< @@ -45010,7 +45072,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L8; } - /* "meshCalcUnix.pyx":1694 + /* "meshCalcUnix.pyx":1697 * bd = 2 * else: * fcentriod[0] = mean_average(x) # <<<<<<<<<<<<<< @@ -45018,33 +45080,33 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se * fcentriod[2] = mean_average(z) */ /*else*/ { - __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_x); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1694, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_x); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1697, __pyx_L1_error) __pyx_t_18 = 0; *((double *) ( /* dim=0 */ (__pyx_v_fcentriod.data + __pyx_t_18 * __pyx_v_fcentriod.strides[0]) )) = __pyx_t_22; - /* "meshCalcUnix.pyx":1695 + /* "meshCalcUnix.pyx":1698 * else: * fcentriod[0] = mean_average(x) * fcentriod[1] = mean_average(y) # <<<<<<<<<<<<<< * fcentriod[2] = mean_average(z) * for j in range(npere): */ - __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_y); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_y); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1698, __pyx_L1_error) __pyx_t_18 = 1; *((double *) ( /* dim=0 */ (__pyx_v_fcentriod.data + __pyx_t_18 * __pyx_v_fcentriod.strides[0]) )) = __pyx_t_22; - /* "meshCalcUnix.pyx":1696 + /* "meshCalcUnix.pyx":1699 * fcentriod[0] = mean_average(x) * fcentriod[1] = mean_average(y) * fcentriod[2] = mean_average(z) # <<<<<<<<<<<<<< * for j in range(npere): * cx[j] = node[tconnection[i,j],0] */ - __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_z); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1696, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_z); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1699, __pyx_L1_error) __pyx_t_18 = 2; *((double *) ( /* dim=0 */ (__pyx_v_fcentriod.data + __pyx_t_18 * __pyx_v_fcentriod.strides[0]) )) = __pyx_t_22; - /* "meshCalcUnix.pyx":1697 + /* "meshCalcUnix.pyx":1700 * fcentriod[1] = mean_average(y) * fcentriod[2] = mean_average(z) * for j in range(npere): # <<<<<<<<<<<<<< @@ -45056,7 +45118,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "meshCalcUnix.pyx":1698 + /* "meshCalcUnix.pyx":1701 * fcentriod[2] = mean_average(z) * for j in range(npere): * cx[j] = node[tconnection[i,j],0] # <<<<<<<<<<<<<< @@ -45070,7 +45132,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_21 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_cx.data + __pyx_t_21 * __pyx_v_cx.strides[0]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node.data + __pyx_t_19 * __pyx_v_node.strides[0]) ) + __pyx_t_20 * __pyx_v_node.strides[1]) ))); - /* "meshCalcUnix.pyx":1699 + /* "meshCalcUnix.pyx":1702 * for j in range(npere): * cx[j] = node[tconnection[i,j],0] * cy[j] = node[tconnection[i,j],1] # <<<<<<<<<<<<<< @@ -45084,7 +45146,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_21 = __pyx_v_j; *((double *) ( /* dim=0 */ (__pyx_v_cy.data + __pyx_t_21 * __pyx_v_cy.strides[0]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node.data + __pyx_t_19 * __pyx_v_node.strides[0]) ) + __pyx_t_20 * __pyx_v_node.strides[1]) ))); - /* "meshCalcUnix.pyx":1700 + /* "meshCalcUnix.pyx":1703 * cx[j] = node[tconnection[i,j],0] * cy[j] = node[tconnection[i,j],1] * cz[j] = node[tconnection[i,j],2] # <<<<<<<<<<<<<< @@ -45099,40 +45161,40 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se *((double *) ( /* dim=0 */ (__pyx_v_cz.data + __pyx_t_21 * __pyx_v_cz.strides[0]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node.data + __pyx_t_19 * __pyx_v_node.strides[0]) ) + __pyx_t_20 * __pyx_v_node.strides[1]) ))); } - /* "meshCalcUnix.pyx":1701 + /* "meshCalcUnix.pyx":1704 * cy[j] = node[tconnection[i,j],1] * cz[j] = node[tconnection[i,j],2] * tcentriod[0] = mean_average(cx) # <<<<<<<<<<<<<< * tcentriod[1] = mean_average(cy) * tcentriod[2] = mean_average(cz) */ - __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_cx); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1701, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_cx); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L1_error) __pyx_t_17 = 0; *((double *) ( /* dim=0 */ (__pyx_v_tcentriod.data + __pyx_t_17 * __pyx_v_tcentriod.strides[0]) )) = __pyx_t_22; - /* "meshCalcUnix.pyx":1702 + /* "meshCalcUnix.pyx":1705 * cz[j] = node[tconnection[i,j],2] * tcentriod[0] = mean_average(cx) * tcentriod[1] = mean_average(cy) # <<<<<<<<<<<<<< * tcentriod[2] = mean_average(cz) * #if outward vector faces downwards then then the element is on base of mesh */ - __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_cy); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1702, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_cy); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1705, __pyx_L1_error) __pyx_t_17 = 1; *((double *) ( /* dim=0 */ (__pyx_v_tcentriod.data + __pyx_t_17 * __pyx_v_tcentriod.strides[0]) )) = __pyx_t_22; - /* "meshCalcUnix.pyx":1703 + /* "meshCalcUnix.pyx":1706 * tcentriod[0] = mean_average(cx) * tcentriod[1] = mean_average(cy) * tcentriod[2] = mean_average(cz) # <<<<<<<<<<<<<< * #if outward vector faces downwards then then the element is on base of mesh * if fcentriod[2] > tcentriod[2]: */ - __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_cz); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_t_22 = __pyx_f_8meshCalc_mean_average(__pyx_v_cz); if (unlikely(__pyx_t_22 == ((double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1706, __pyx_L1_error) __pyx_t_17 = 2; *((double *) ( /* dim=0 */ (__pyx_v_tcentriod.data + __pyx_t_17 * __pyx_v_tcentriod.strides[0]) )) = __pyx_t_22; - /* "meshCalcUnix.pyx":1705 + /* "meshCalcUnix.pyx":1708 * tcentriod[2] = mean_average(cz) * #if outward vector faces downwards then then the element is on base of mesh * if fcentriod[2] > tcentriod[2]: # <<<<<<<<<<<<<< @@ -45144,7 +45206,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_10 = ((*((double *) ( /* dim=0 */ (__pyx_v_fcentriod.data + __pyx_t_17 * __pyx_v_fcentriod.strides[0]) ))) > (*((double *) ( /* dim=0 */ (__pyx_v_tcentriod.data + __pyx_t_18 * __pyx_v_tcentriod.strides[0]) )))); if (__pyx_t_10) { - /* "meshCalcUnix.pyx":1706 + /* "meshCalcUnix.pyx":1709 * #if outward vector faces downwards then then the element is on base of mesh * if fcentriod[2] > tcentriod[2]: * bd = 1 # <<<<<<<<<<<<<< @@ -45153,7 +45215,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_bd = 1; - /* "meshCalcUnix.pyx":1705 + /* "meshCalcUnix.pyx":1708 * tcentriod[2] = mean_average(cz) * #if outward vector faces downwards then then the element is on base of mesh * if fcentriod[2] > tcentriod[2]: # <<<<<<<<<<<<<< @@ -45163,7 +45225,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L13; } - /* "meshCalcUnix.pyx":1708 + /* "meshCalcUnix.pyx":1711 * bd = 1 * else: * bd = 2 # <<<<<<<<<<<<<< @@ -45177,7 +45239,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se } __pyx_L8:; - /* "meshCalcUnix.pyx":1709 + /* "meshCalcUnix.pyx":1712 * else: * bd = 2 * for j in range(npere_face): # <<<<<<<<<<<<<< @@ -45189,7 +45251,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "meshCalcUnix.pyx":1710 + /* "meshCalcUnix.pyx":1713 * bd = 2 * for j in range(npere_face): * if node_bdv[fconnection[i,j]] != 2: # check its not already assiged to side of mesh # <<<<<<<<<<<<<< @@ -45202,7 +45264,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_10 = ((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_node_bdv.data + __pyx_t_19 * __pyx_v_node_bdv.strides[0]) ))) != 2); if (__pyx_t_10) { - /* "meshCalcUnix.pyx":1711 + /* "meshCalcUnix.pyx":1714 * for j in range(npere_face): * if node_bdv[fconnection[i,j]] != 2: # check its not already assiged to side of mesh * node_bdv[fconnection[i,j]] = bd # <<<<<<<<<<<<<< @@ -45214,7 +45276,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_19 = (*((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_fconnection.data + __pyx_t_17 * __pyx_v_fconnection.strides[0]) ) + __pyx_t_18 * __pyx_v_fconnection.strides[1]) ))); *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_node_bdv.data + __pyx_t_19 * __pyx_v_node_bdv.strides[0]) )) = __pyx_v_bd; - /* "meshCalcUnix.pyx":1710 + /* "meshCalcUnix.pyx":1713 * bd = 2 * for j in range(npere_face): * if node_bdv[fconnection[i,j]] != 2: # check its not already assiged to side of mesh # <<<<<<<<<<<<<< @@ -45224,7 +45286,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se } } - /* "meshCalcUnix.pyx":1713 + /* "meshCalcUnix.pyx":1716 * node_bdv[fconnection[i,j]] = bd * * face_bdv[i] = bd # <<<<<<<<<<<<<< @@ -45235,7 +45297,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_face_bdv.data + __pyx_t_18 * __pyx_v_face_bdv.strides[0]) )) = __pyx_v_bd; } - /* "meshCalcUnix.pyx":1715 + /* "meshCalcUnix.pyx":1718 * face_bdv[i] = bd * * return node_bd, face_bd # <<<<<<<<<<<<<< @@ -45243,19 +45305,19 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se * @cython.boundscheck(False) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF((PyObject *)__pyx_v_node_bd); __Pyx_GIVEREF((PyObject *)__pyx_v_node_bd); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_node_bd))) __PYX_ERR(0, 1715, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_node_bd))) __PYX_ERR(0, 1718, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_face_bd); __Pyx_GIVEREF((PyObject *)__pyx_v_face_bd); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_face_bd))) __PYX_ERR(0, 1715, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_face_bd))) __PYX_ERR(0, 1718, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":1618 + /* "meshCalcUnix.pyx":1621 * return repeats * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -45303,7 +45365,7 @@ static PyObject *__pyx_pf_8meshCalc_34boundcall(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "meshCalcUnix.pyx":1717 +/* "meshCalcUnix.pyx":1720 * return node_bd, face_bd * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -45374,7 +45436,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[0]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error) else goto __pyx_L5_argtuple_error; CYTHON_FALLTHROUGH; case 1: @@ -45382,28 +45444,28 @@ PyObject *__pyx_args, PyObject *__pyx_kwds (void)__Pyx_Arg_NewRef_FASTCALL(values[1]); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error) else { - __Pyx_RaiseArgtupleInvalid("rmRepeatNodes", 0, 2, 4, 1); __PYX_ERR(0, 1717, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("rmRepeatNodes", 0, 2, 4, 1); __PYX_ERR(0, 1720, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_n); if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (kw_args > 0) { PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_num_threads); if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; } - else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error) + else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1720, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rmRepeatNodes") < 0)) __PYX_ERR(0, 1717, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "rmRepeatNodes") < 0)) __PYX_ERR(0, 1720, __pyx_L3_error) } } else { switch (__pyx_nargs) { @@ -45417,22 +45479,22 @@ PyObject *__pyx_args, PyObject *__pyx_kwds default: goto __pyx_L5_argtuple_error; } } - __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1719, __pyx_L3_error) - __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1719, __pyx_L3_error) + __pyx_v_node = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(values[0], PyBUF_WRITABLE); if (unlikely(!__pyx_v_node.memview)) __PYX_ERR(0, 1722, __pyx_L3_error) + __pyx_v_connection = __Pyx_PyObject_to_MemoryviewSlice_dsds_long(values[1], PyBUF_WRITABLE); if (unlikely(!__pyx_v_connection.memview)) __PYX_ERR(0, 1722, __pyx_L3_error) if (values[2]) { - __pyx_v_n = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1719, __pyx_L3_error) + __pyx_v_n = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_n == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1722, __pyx_L3_error) } else { __pyx_v_n = ((int)((int)10)); } if (values[3]) { - __pyx_v_num_threads = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1719, __pyx_L3_error) + __pyx_v_num_threads = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_num_threads == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1722, __pyx_L3_error) } else { __pyx_v_num_threads = ((int)((int)2)); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("rmRepeatNodes", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1717, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("rmRepeatNodes", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 1720, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -45537,7 +45599,7 @@ static PyObject *__pyx_pf_8meshCalc_36rmRepeatNodes(CYTHON_UNUSED PyObject *__py __pyx_pybuffernd_nconnec.data = NULL; __pyx_pybuffernd_nconnec.rcbuffer = &__pyx_pybuffer_nconnec; - /* "meshCalcUnix.pyx":1755 + /* "meshCalcUnix.pyx":1758 * been remapped to ignore repeated points. * """ * cdef int numnp = node.shape[0] # number of nodes # <<<<<<<<<<<<<< @@ -45546,7 +45608,7 @@ static PyObject *__pyx_pf_8meshCalc_36rmRepeatNodes(CYTHON_UNUSED PyObject *__py */ __pyx_v_numnp = (__pyx_v_node.shape[0]); - /* "meshCalcUnix.pyx":1756 + /* "meshCalcUnix.pyx":1759 * """ * cdef int numnp = node.shape[0] # number of nodes * cdef double[:] x = node[:,0] # extract x y z columns # <<<<<<<<<<<<<< @@ -45570,7 +45632,7 @@ __pyx_v_x = __pyx_t_1; __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL; - /* "meshCalcUnix.pyx":1757 + /* "meshCalcUnix.pyx":1760 * cdef int numnp = node.shape[0] # number of nodes * cdef double[:] x = node[:,0] # extract x y z columns * cdef double[:] y = node[:,1] # <<<<<<<<<<<<<< @@ -45594,7 +45656,7 @@ __pyx_v_y = __pyx_t_1; __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL; - /* "meshCalcUnix.pyx":1758 + /* "meshCalcUnix.pyx":1761 * cdef double[:] x = node[:,0] # extract x y z columns * cdef double[:] y = node[:,1] * cdef double[:] z = node[:,2] # <<<<<<<<<<<<<< @@ -45618,48 +45680,48 @@ __pyx_v_z = __pyx_t_1; __pyx_t_1.memview = NULL; __pyx_t_1.data = NULL; - /* "meshCalcUnix.pyx":1759 + /* "meshCalcUnix.pyx":1762 * cdef double[:] y = node[:,1] * cdef double[:] z = node[:,2] * cdef np.ndarray[double,ndim=2] nnodes = np.zeros((numnp,3), dtype=float) # allocate array for new point array # <<<<<<<<<<<<<< * cdef double[:,:] nnodev = nnodes #(memory view) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1759, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error); __Pyx_INCREF(__pyx_int_3); __Pyx_GIVEREF(__pyx_int_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 1759, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_3)) __PYX_ERR(0, 1762, __pyx_L1_error); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1759, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1762, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1759, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1759, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1759, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 1762, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1759, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1762, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nnodes.rcbuffer->pybuffer, (PyObject*)__pyx_t_6, &__Pyx_TypeInfo_double, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_nnodes = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1759, __pyx_L1_error) + __PYX_ERR(0, 1762, __pyx_L1_error) } else {__pyx_pybuffernd_nnodes.diminfo[0].strides = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nnodes.diminfo[0].shape = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nnodes.diminfo[1].strides = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nnodes.diminfo[1].shape = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.shape[1]; } } @@ -45667,19 +45729,19 @@ __pyx_v_z = __pyx_t_1; __pyx_v_nnodes = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1760 + /* "meshCalcUnix.pyx":1763 * cdef double[:] z = node[:,2] * cdef np.ndarray[double,ndim=2] nnodes = np.zeros((numnp,3), dtype=float) # allocate array for new point array * cdef double[:,:] nnodev = nnodes #(memory view) # <<<<<<<<<<<<<< * * cdef int ndim = node.shape[1] # should be 3 (always) */ - __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_nnodes), PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1760, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_to_MemoryviewSlice_dsds_double(((PyObject *)__pyx_v_nnodes), PyBUF_WRITABLE); if (unlikely(!__pyx_t_7.memview)) __PYX_ERR(0, 1763, __pyx_L1_error) __pyx_v_nnodev = __pyx_t_7; __pyx_t_7.memview = NULL; __pyx_t_7.data = NULL; - /* "meshCalcUnix.pyx":1762 + /* "meshCalcUnix.pyx":1765 * cdef double[:,:] nnodev = nnodes #(memory view) * * cdef int ndim = node.shape[1] # should be 3 (always) # <<<<<<<<<<<<<< @@ -45688,7 +45750,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_ndim = (__pyx_v_node.shape[1]); - /* "meshCalcUnix.pyx":1764 + /* "meshCalcUnix.pyx":1767 * cdef int ndim = node.shape[1] # should be 3 (always) * * cdef int c = 0 # rolling count used in for loops # <<<<<<<<<<<<<< @@ -45697,59 +45759,59 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_c = 0; - /* "meshCalcUnix.pyx":1765 + /* "meshCalcUnix.pyx":1768 * * cdef int c = 0 # rolling count used in for loops * cdef np.ndarray[long long,ndim=2] idx = np.zeros((numnp,n), dtype=np.int64)-1 # index grouping # <<<<<<<<<<<<<< * cdef long long[:,:] idxv = idx * cdef int err = 0 # error flag */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(0, 1768, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1765, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1768, __pyx_L1_error); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1765, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1765, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1768, __pyx_L1_error) __pyx_t_9 = ((PyArrayObject *)__pyx_t_3); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_idx.rcbuffer->pybuffer, (PyObject*)__pyx_t_9, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_idx = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_idx.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1765, __pyx_L1_error) + __PYX_ERR(0, 1768, __pyx_L1_error) } else {__pyx_pybuffernd_idx.diminfo[0].strides = __pyx_pybuffernd_idx.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_idx.diminfo[0].shape = __pyx_pybuffernd_idx.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_idx.diminfo[1].strides = __pyx_pybuffernd_idx.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_idx.diminfo[1].shape = __pyx_pybuffernd_idx.rcbuffer->pybuffer.shape[1]; } } @@ -45757,19 +45819,19 @@ __pyx_v_z = __pyx_t_1; __pyx_v_idx = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "meshCalcUnix.pyx":1766 + /* "meshCalcUnix.pyx":1769 * cdef int c = 0 # rolling count used in for loops * cdef np.ndarray[long long,ndim=2] idx = np.zeros((numnp,n), dtype=np.int64)-1 # index grouping * cdef long long[:,:] idxv = idx # <<<<<<<<<<<<<< * cdef int err = 0 # error flag * cdef int i,j # looping variables */ - __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_idx), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1766, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_idx), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1769, __pyx_L1_error) __pyx_v_idxv = __pyx_t_10; __pyx_t_10.memview = NULL; __pyx_t_10.data = NULL; - /* "meshCalcUnix.pyx":1767 + /* "meshCalcUnix.pyx":1770 * cdef np.ndarray[long long,ndim=2] idx = np.zeros((numnp,n), dtype=np.int64)-1 # index grouping * cdef long long[:,:] idxv = idx * cdef int err = 0 # error flag # <<<<<<<<<<<<<< @@ -45778,7 +45840,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_err = 0; - /* "meshCalcUnix.pyx":1770 + /* "meshCalcUnix.pyx":1773 * cdef int i,j # looping variables * * cdef int numel = connection.shape[0] # <<<<<<<<<<<<<< @@ -45787,7 +45849,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_numel = (__pyx_v_connection.shape[0]); - /* "meshCalcUnix.pyx":1771 + /* "meshCalcUnix.pyx":1774 * * cdef int numel = connection.shape[0] * cdef int npere = connection.shape[1] # <<<<<<<<<<<<<< @@ -45796,56 +45858,56 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_npere = (__pyx_v_connection.shape[1]); - /* "meshCalcUnix.pyx":1772 + /* "meshCalcUnix.pyx":1775 * cdef int numel = connection.shape[0] * cdef int npere = connection.shape[1] * cdef np.ndarray[long long,ndim=2] nconnec = np.zeros((numel,npere), dtype=np.int64) # <<<<<<<<<<<<<< * cdef long long[:,:] nconnecv = nconnec * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_zeros); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_numel); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_npere); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1772, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4)) __PYX_ERR(0, 1775, __pyx_L1_error); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1772, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int64); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1772, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1772, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1775, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_nconnec.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES, 2, 0, __pyx_stack) == -1)) { __pyx_v_nconnec = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_nconnec.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 1772, __pyx_L1_error) + __PYX_ERR(0, 1775, __pyx_L1_error) } else {__pyx_pybuffernd_nconnec.diminfo[0].strides = __pyx_pybuffernd_nconnec.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nconnec.diminfo[0].shape = __pyx_pybuffernd_nconnec.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nconnec.diminfo[1].strides = __pyx_pybuffernd_nconnec.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nconnec.diminfo[1].shape = __pyx_pybuffernd_nconnec.rcbuffer->pybuffer.shape[1]; } } @@ -45853,100 +45915,100 @@ __pyx_v_z = __pyx_t_1; __pyx_v_nconnec = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1773 + /* "meshCalcUnix.pyx":1776 * cdef int npere = connection.shape[1] * cdef np.ndarray[long long,ndim=2] nconnec = np.zeros((numel,npere), dtype=np.int64) * cdef long long[:,:] nconnecv = nconnec # <<<<<<<<<<<<<< * * */ - __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_nconnec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1773, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_to_MemoryviewSlice_dsds_PY_LONG_LONG(((PyObject *)__pyx_v_nconnec), PyBUF_WRITABLE); if (unlikely(!__pyx_t_10.memview)) __PYX_ERR(0, 1776, __pyx_L1_error) __pyx_v_nconnecv = __pyx_t_10; __pyx_t_10.memview = NULL; __pyx_t_10.data = NULL; - /* "meshCalcUnix.pyx":1776 + /* "meshCalcUnix.pyx":1779 * * * cdef long long[:] remap = np.zeros(numnp,dtype=np.int64)-1 # array to allocate remapped node values to # <<<<<<<<<<<<<< * cdef long long[:] flag = np.zeros(numnp,dtype=np.int64) # decides if point already added * */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1776, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_int64); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 1776, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1776, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_5, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_remap = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "meshCalcUnix.pyx":1777 + /* "meshCalcUnix.pyx":1780 * * cdef long long[:] remap = np.zeros(numnp,dtype=np.int64)-1 # array to allocate remapped node values to * cdef long long[:] flag = np.zeros(numnp,dtype=np.int64) # decides if point already added # <<<<<<<<<<<<<< * * for i in prange(numnp,nogil=True,num_threads=num_threads,schedule='static'): */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1777, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_np); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_numnp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 1777, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1777, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int64); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1777, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_t_8) < 0) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1777, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_to_MemoryviewSlice_ds_PY_LONG_LONG(__pyx_t_8, PyBUF_WRITABLE); if (unlikely(!__pyx_t_12.memview)) __PYX_ERR(0, 1780, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_flag = __pyx_t_12; __pyx_t_12.memview = NULL; __pyx_t_12.data = NULL; - /* "meshCalcUnix.pyx":1779 + /* "meshCalcUnix.pyx":1782 * cdef long long[:] flag = np.zeros(numnp,dtype=np.int64) # decides if point already added * * for i in prange(numnp,nogil=True,num_threads=num_threads,schedule='static'): # <<<<<<<<<<<<<< @@ -45987,7 +46049,7 @@ __pyx_v_z = __pyx_t_1; __pyx_v_err = ((int)0xbad0bad0); __pyx_v_j = ((int)0xbad0bad0); - /* "meshCalcUnix.pyx":1781 + /* "meshCalcUnix.pyx":1784 * for i in prange(numnp,nogil=True,num_threads=num_threads,schedule='static'): * #this bit can be parallel * idx[i,0] = i # <<<<<<<<<<<<<< @@ -45998,7 +46060,7 @@ __pyx_v_z = __pyx_t_1; __pyx_t_17 = 0; *__Pyx_BufPtrStrided2d(PY_LONG_LONG *, __pyx_pybuffernd_idx.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_idx.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_idx.diminfo[1].strides) = __pyx_v_i; - /* "meshCalcUnix.pyx":1782 + /* "meshCalcUnix.pyx":1785 * #this bit can be parallel * idx[i,0] = i * c=1 # <<<<<<<<<<<<<< @@ -46007,7 +46069,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_c = 1; - /* "meshCalcUnix.pyx":1783 + /* "meshCalcUnix.pyx":1786 * idx[i,0] = i * c=1 * for j in range(numnp): # <<<<<<<<<<<<<< @@ -46019,7 +46081,7 @@ __pyx_v_z = __pyx_t_1; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "meshCalcUnix.pyx":1784 + /* "meshCalcUnix.pyx":1787 * c=1 * for j in range(numnp): * if i!=j and x[i]==x[j] and y[i]==y[j] and z[i]==z[j]: # <<<<<<<<<<<<<< @@ -46055,7 +46117,7 @@ __pyx_v_z = __pyx_t_1; __pyx_L13_bool_binop_done:; if (__pyx_t_21) { - /* "meshCalcUnix.pyx":1785 + /* "meshCalcUnix.pyx":1788 * for j in range(numnp): * if i!=j and x[i]==x[j] and y[i]==y[j] and z[i]==z[j]: * idxv[i,c] = j # <<<<<<<<<<<<<< @@ -46066,7 +46128,7 @@ __pyx_v_z = __pyx_t_1; __pyx_t_17 = __pyx_v_c; *((PY_LONG_LONG *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_idxv.data + __pyx_t_16 * __pyx_v_idxv.strides[0]) ) + __pyx_t_17 * __pyx_v_idxv.strides[1]) )) = __pyx_v_j; - /* "meshCalcUnix.pyx":1786 + /* "meshCalcUnix.pyx":1789 * if i!=j and x[i]==x[j] and y[i]==y[j] and z[i]==z[j]: * idxv[i,c] = j * c=c+1 # <<<<<<<<<<<<<< @@ -46075,7 +46137,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_c = (__pyx_v_c + 1); - /* "meshCalcUnix.pyx":1787 + /* "meshCalcUnix.pyx":1790 * idxv[i,c] = j * c=c+1 * if c>n: # <<<<<<<<<<<<<< @@ -46085,7 +46147,7 @@ __pyx_v_z = __pyx_t_1; __pyx_t_21 = (__pyx_v_c > __pyx_v_n); if (__pyx_t_21) { - /* "meshCalcUnix.pyx":1788 + /* "meshCalcUnix.pyx":1791 * c=c+1 * if c>n: * err = 1 # <<<<<<<<<<<<<< @@ -46094,7 +46156,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_err = 1; - /* "meshCalcUnix.pyx":1787 + /* "meshCalcUnix.pyx":1790 * idxv[i,c] = j * c=c+1 * if c>n: # <<<<<<<<<<<<<< @@ -46103,7 +46165,7 @@ __pyx_v_z = __pyx_t_1; */ } - /* "meshCalcUnix.pyx":1784 + /* "meshCalcUnix.pyx":1787 * c=1 * for j in range(numnp): * if i!=j and x[i]==x[j] and y[i]==y[j] and z[i]==z[j]: # <<<<<<<<<<<<<< @@ -46125,7 +46187,7 @@ __pyx_v_z = __pyx_t_1; #endif } - /* "meshCalcUnix.pyx":1779 + /* "meshCalcUnix.pyx":1782 * cdef long long[:] flag = np.zeros(numnp,dtype=np.int64) # decides if point already added * * for i in prange(numnp,nogil=True,num_threads=num_threads,schedule='static'): # <<<<<<<<<<<<<< @@ -46144,7 +46206,7 @@ __pyx_v_z = __pyx_t_1; } } - /* "meshCalcUnix.pyx":1790 + /* "meshCalcUnix.pyx":1793 * err = 1 * * if err==1: # <<<<<<<<<<<<<< @@ -46154,20 +46216,20 @@ __pyx_v_z = __pyx_t_1; __pyx_t_21 = (__pyx_v_err == 1); if (unlikely(__pyx_t_21)) { - /* "meshCalcUnix.pyx":1791 + /* "meshCalcUnix.pyx":1794 * * if err==1: * raise Exception("Maximum number of colocated points exceeded") # <<<<<<<<<<<<<< * * c = 0 # reset count to zero */ - __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1791, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 1791, __pyx_L1_error) + __PYX_ERR(0, 1794, __pyx_L1_error) - /* "meshCalcUnix.pyx":1790 + /* "meshCalcUnix.pyx":1793 * err = 1 * * if err==1: # <<<<<<<<<<<<<< @@ -46176,7 +46238,7 @@ __pyx_v_z = __pyx_t_1; */ } - /* "meshCalcUnix.pyx":1793 + /* "meshCalcUnix.pyx":1796 * raise Exception("Maximum number of colocated points exceeded") * * c = 0 # reset count to zero # <<<<<<<<<<<<<< @@ -46185,7 +46247,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_c = 0; - /* "meshCalcUnix.pyx":1795 + /* "meshCalcUnix.pyx":1798 * c = 0 # reset count to zero * * for i in range(numnp): # needs to be processed sequentially # <<<<<<<<<<<<<< @@ -46197,7 +46259,7 @@ __pyx_v_z = __pyx_t_1; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; - /* "meshCalcUnix.pyx":1796 + /* "meshCalcUnix.pyx":1799 * * for i in range(numnp): # needs to be processed sequentially * if flag[i]==0:#point not already flagged # <<<<<<<<<<<<<< @@ -46208,7 +46270,7 @@ __pyx_v_z = __pyx_t_1; __pyx_t_21 = ((*((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_flag.data + __pyx_t_17 * __pyx_v_flag.strides[0]) ))) == 0); if (__pyx_t_21) { - /* "meshCalcUnix.pyx":1797 + /* "meshCalcUnix.pyx":1800 * for i in range(numnp): # needs to be processed sequentially * if flag[i]==0:#point not already flagged * for j in range(ndim): # <<<<<<<<<<<<<< @@ -46220,7 +46282,7 @@ __pyx_v_z = __pyx_t_1; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "meshCalcUnix.pyx":1798 + /* "meshCalcUnix.pyx":1801 * if flag[i]==0:#point not already flagged * for j in range(ndim): * nnodev[c,j] = node[i,j]# put new point into array # <<<<<<<<<<<<<< @@ -46234,7 +46296,7 @@ __pyx_v_z = __pyx_t_1; *((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_nnodev.data + __pyx_t_23 * __pyx_v_nnodev.strides[0]) ) + __pyx_t_24 * __pyx_v_nnodev.strides[1]) )) = (*((double *) ( /* dim=1 */ (( /* dim=0 */ (__pyx_v_node.data + __pyx_t_17 * __pyx_v_node.strides[0]) ) + __pyx_t_16 * __pyx_v_node.strides[1]) ))); } - /* "meshCalcUnix.pyx":1799 + /* "meshCalcUnix.pyx":1802 * for j in range(ndim): * nnodev[c,j] = node[i,j]# put new point into array * for j in range(n): # <<<<<<<<<<<<<< @@ -46246,7 +46308,7 @@ __pyx_v_z = __pyx_t_1; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "meshCalcUnix.pyx":1800 + /* "meshCalcUnix.pyx":1803 * nnodev[c,j] = node[i,j]# put new point into array * for j in range(n): * if idx[i,j]==-1: # <<<<<<<<<<<<<< @@ -46258,7 +46320,7 @@ __pyx_v_z = __pyx_t_1; __pyx_t_21 = ((*__Pyx_BufPtrStrided2d(PY_LONG_LONG *, __pyx_pybuffernd_idx.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_idx.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_idx.diminfo[1].strides)) == -1LL); if (__pyx_t_21) { - /* "meshCalcUnix.pyx":1801 + /* "meshCalcUnix.pyx":1804 * for j in range(n): * if idx[i,j]==-1: * break # <<<<<<<<<<<<<< @@ -46267,7 +46329,7 @@ __pyx_v_z = __pyx_t_1; */ goto __pyx_L27_break; - /* "meshCalcUnix.pyx":1800 + /* "meshCalcUnix.pyx":1803 * nnodev[c,j] = node[i,j]# put new point into array * for j in range(n): * if idx[i,j]==-1: # <<<<<<<<<<<<<< @@ -46276,7 +46338,7 @@ __pyx_v_z = __pyx_t_1; */ } - /* "meshCalcUnix.pyx":1803 + /* "meshCalcUnix.pyx":1806 * break * else: * flag[idx[i,j]]=1 # remove colocated points from selection pool # <<<<<<<<<<<<<< @@ -46289,7 +46351,7 @@ __pyx_v_z = __pyx_t_1; __pyx_t_25 = (*__Pyx_BufPtrStrided2d(PY_LONG_LONG *, __pyx_pybuffernd_idx.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_idx.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_idx.diminfo[1].strides)); *((PY_LONG_LONG *) ( /* dim=0 */ (__pyx_v_flag.data + __pyx_t_25 * __pyx_v_flag.strides[0]) )) = 1; - /* "meshCalcUnix.pyx":1804 + /* "meshCalcUnix.pyx":1807 * else: * flag[idx[i,j]]=1 # remove colocated points from selection pool * remap[idx[i,j]]=c # add count to remapple array # <<<<<<<<<<<<<< @@ -46304,7 +46366,7 @@ __pyx_v_z = __pyx_t_1; } __pyx_L27_break:; - /* "meshCalcUnix.pyx":1805 + /* "meshCalcUnix.pyx":1808 * flag[idx[i,j]]=1 # remove colocated points from selection pool * remap[idx[i,j]]=c # add count to remapple array * c+=1 # <<<<<<<<<<<<<< @@ -46313,7 +46375,7 @@ __pyx_v_z = __pyx_t_1; */ __pyx_v_c = (__pyx_v_c + 1); - /* "meshCalcUnix.pyx":1796 + /* "meshCalcUnix.pyx":1799 * * for i in range(numnp): # needs to be processed sequentially * if flag[i]==0:#point not already flagged # <<<<<<<<<<<<<< @@ -46323,30 +46385,30 @@ __pyx_v_z = __pyx_t_1; } } - /* "meshCalcUnix.pyx":1807 + /* "meshCalcUnix.pyx":1810 * c+=1 * * nnodes = nnodes[0:c,:] # truncate matrix down to the unique points # <<<<<<<<<<<<<< * * #sort remapping of connection matrix */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1807, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PySlice_New(__pyx_int_0, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1807, __pyx_L1_error) + __pyx_t_5 = PySlice_New(__pyx_int_0, __pyx_t_8, Py_None); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1807, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 1807, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L1_error); __Pyx_INCREF(__pyx_slice__7); __Pyx_GIVEREF(__pyx_slice__7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__7)) __PYX_ERR(0, 1807, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_slice__7)) __PYX_ERR(0, 1810, __pyx_L1_error); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_nnodes), __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1807, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_nnodes), __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1807, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1810, __pyx_L1_error) __pyx_t_6 = ((PyArrayObject *)__pyx_t_5); { __Pyx_BufFmt_StackElem __pyx_stack[1]; @@ -46363,13 +46425,13 @@ __pyx_v_z = __pyx_t_1; __pyx_t_26 = __pyx_t_27 = __pyx_t_28 = 0; } __pyx_pybuffernd_nnodes.diminfo[0].strides = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_nnodes.diminfo[0].shape = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_nnodes.diminfo[1].strides = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_nnodes.diminfo[1].shape = __pyx_pybuffernd_nnodes.rcbuffer->pybuffer.shape[1]; - if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1807, __pyx_L1_error) + if (unlikely((__pyx_t_15 < 0))) __PYX_ERR(0, 1810, __pyx_L1_error) } __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_nnodes, ((PyArrayObject *)__pyx_t_5)); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1810 + /* "meshCalcUnix.pyx":1813 * * #sort remapping of connection matrix * for i in range(numel): # <<<<<<<<<<<<<< @@ -46381,7 +46443,7 @@ __pyx_v_z = __pyx_t_1; for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_14; __pyx_t_13+=1) { __pyx_v_i = __pyx_t_13; - /* "meshCalcUnix.pyx":1811 + /* "meshCalcUnix.pyx":1814 * #sort remapping of connection matrix * for i in range(numel): * for j in range(npere): # <<<<<<<<<<<<<< @@ -46393,7 +46455,7 @@ __pyx_v_z = __pyx_t_1; for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_19; __pyx_t_20+=1) { __pyx_v_j = __pyx_t_20; - /* "meshCalcUnix.pyx":1812 + /* "meshCalcUnix.pyx":1815 * for i in range(numel): * for j in range(npere): * nconnecv[i,j] = remap[connection[i,j]] # <<<<<<<<<<<<<< @@ -46409,28 +46471,28 @@ __pyx_v_z = __pyx_t_1; } } - /* "meshCalcUnix.pyx":1814 + /* "meshCalcUnix.pyx":1817 * nconnecv[i,j] = remap[connection[i,j]] * * return idx, nnodes, nconnec # index groupings, new points (filtered) and remapped connection matrix # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1814, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF((PyObject *)__pyx_v_idx); __Pyx_GIVEREF((PyObject *)__pyx_v_idx); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_idx))) __PYX_ERR(0, 1814, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_idx))) __PYX_ERR(0, 1817, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_nnodes); __Pyx_GIVEREF((PyObject *)__pyx_v_nnodes); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_nnodes))) __PYX_ERR(0, 1814, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_nnodes))) __PYX_ERR(0, 1817, __pyx_L1_error); __Pyx_INCREF((PyObject *)__pyx_v_nconnec); __Pyx_GIVEREF((PyObject *)__pyx_v_nconnec); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_nconnec))) __PYX_ERR(0, 1814, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)__pyx_v_nconnec))) __PYX_ERR(0, 1817, __pyx_L1_error); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "meshCalcUnix.pyx":1717 + /* "meshCalcUnix.pyx":1720 * return node_bd, face_bd * * @cython.boundscheck(False) # <<<<<<<<<<<<<< @@ -47979,6 +48041,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) { {&__pyx_n_s_zinf, __pyx_k_zinf, sizeof(__pyx_k_zinf), 0, 0, 1, 1}, {&__pyx_n_s_zm, __pyx_k_zm, sizeof(__pyx_k_zm), 0, 0, 1, 1}, {&__pyx_n_s_zmf, __pyx_k_zmf, sizeof(__pyx_k_zmf), 0, 0, 1, 1}, + {&__pyx_n_s_zone, __pyx_k_zone, sizeof(__pyx_k_zone), 0, 0, 1, 1}, {&__pyx_n_s_ztmp, __pyx_k_ztmp, sizeof(__pyx_k_ztmp), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; @@ -47990,9 +48053,9 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_sorted = __Pyx_GetBuiltinName(__pyx_n_s_sorted); if (!__pyx_builtin_sorted) __PYX_ERR(0, 90, __pyx_L1_error) __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 90, __pyx_L1_error) __pyx_builtin_max = __Pyx_GetBuiltinName(__pyx_n_s_max); if (!__pyx_builtin_max) __PYX_ERR(0, 242, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1020, __pyx_L1_error) - __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1021, __pyx_L1_error) - __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_builtin_min = __Pyx_GetBuiltinName(__pyx_n_s_min); if (!__pyx_builtin_min) __PYX_ERR(0, 1189, __pyx_L1_error) __pyx_builtin___import__ = __Pyx_GetBuiltinName(__pyx_n_s_import); if (!__pyx_builtin___import__) __PYX_ERR(1, 100, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 156, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) @@ -48059,7 +48122,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__10); __Pyx_GIVEREF(__pyx_tuple__10); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":984 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":984 * __pyx_import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< @@ -48070,7 +48133,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__11); __Pyx_GIVEREF(__pyx_tuple__11); - /* "../../../../pyenv/lib/python3.10/site-packages/numpy/__init__.cython-30.pxd":990 + /* "../../../../../miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.cython-30.pxd":990 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< @@ -48114,80 +48177,80 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - /* "meshCalcUnix.pyx":704 + /* "meshCalcUnix.pyx":707 * cdef double[:] y = np.zeros(3,dtype=float) * cdef double[:] z = np.zeros(3,dtype=float) * cdef long long[:] n = np.zeros(6,dtype=np.int64) # new node numbers # <<<<<<<<<<<<<< * cdef float mx, my, mz * cdef long long[:] nodes = np.zeros(2,dtype=np.int64) */ - __pyx_tuple__16 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 704, __pyx_L1_error) + __pyx_tuple__16 = PyTuple_Pack(1, __pyx_int_6); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - /* "meshCalcUnix.pyx":831 + /* "meshCalcUnix.pyx":834 * cdef double[:] y = np.zeros(4,dtype=float) * cdef double[:] z = np.zeros(4,dtype=float) * cdef long long[:] n = np.zeros(10,dtype=np.int64) # new node numbers # <<<<<<<<<<<<<< * cdef double mx, my, mz * cdef long long[:] nodes = np.zeros(2,dtype=np.int64) */ - __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_10); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(1, __pyx_int_10); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - /* "meshCalcUnix.pyx":1050 + /* "meshCalcUnix.pyx":1053 * * if npere!=4: * raise ValueError('Got the wrong number of nodes per element when ordering mesh nodes') # <<<<<<<<<<<<<< * * con = np.zeros((numel,npere), dtype=DINT)# new connection matrix */ - __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Got_the_wrong_number_of_nodes_pe); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1050, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_Got_the_wrong_number_of_nodes_pe); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - /* "meshCalcUnix.pyx":1307 + /* "meshCalcUnix.pyx":1310 * nedges = len(a) * else: * raise ValueError('Cell type argument does not match vtk cell types,', # <<<<<<<<<<<<<< * 'used with meshTools must be one of the following:', * '5, 8, 9, 10 or 13') */ - __pyx_tuple__19 = PyTuple_Pack(3, __pyx_kp_s_Cell_type_argument_does_not_matc, __pyx_kp_s_used_with_meshTools_must_be_one, __pyx_kp_s_5_8_9_10_or_13); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(3, __pyx_kp_s_Cell_type_argument_does_not_matc, __pyx_kp_s_used_with_meshTools_must_be_one, __pyx_kp_s_5_8_9_10_or_13); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); - /* "meshCalcUnix.pyx":1404 + /* "meshCalcUnix.pyx":1407 * flag3d = 1 * else: * raise Exception('Unsupported mesh type for computing external nodes') # <<<<<<<<<<<<<< * * cdef long long[:] a, b, c */ - __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_mesh_type_for_comput); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Unsupported_mesh_type_for_comput); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__20); __Pyx_GIVEREF(__pyx_tuple__20); - /* "meshCalcUnix.pyx":1679 + /* "meshCalcUnix.pyx":1682 * #do checks? * if numel != numel_check: * raise ValueError('Mismatch in connection matrix lengths') # <<<<<<<<<<<<<< * * #compute cell centres */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Mismatch_in_connection_matrix_le); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1679, __pyx_L1_error) + __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Mismatch_in_connection_matrix_le); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1682, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__21); __Pyx_GIVEREF(__pyx_tuple__21); - /* "meshCalcUnix.pyx":1791 + /* "meshCalcUnix.pyx":1794 * * if err==1: * raise Exception("Maximum number of colocated points exceeded") # <<<<<<<<<<<<<< * * c = 0 # reset count to zero */ - __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Maximum_number_of_colocated_poin); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1791, __pyx_L1_error) + __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Maximum_number_of_colocated_poin); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1794, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__22); __Pyx_GIVEREF(__pyx_tuple__22); @@ -48393,129 +48456,129 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) - * def sortNeigh(np.ndarray[long long, ndim=2] neigh): + * def sortNeigh(np.ndarray[long long, ndim=2] neigh, long[:] zone): */ - __pyx_tuple__50 = PyTuple_Pack(7, __pyx_n_s_neigh, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_neighv, __pyx_n_s_like_inf, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(8, __pyx_n_s_neigh, __pyx_n_s_zone, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_neighv, __pyx_n_s_like_inf); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_sortNeigh, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_sortNeigh, 645, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 645, __pyx_L1_error) - /* "meshCalcUnix.pyx":677 + /* "meshCalcUnix.pyx":680 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def splitTri(long long[:,:] connection, double[:,:] node): */ - __pyx_tuple__52 = PyTuple_Pack(39, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_node_x, __pyx_n_s_node_y, __pyx_n_s_node_z, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_n, __pyx_n_s_mx, __pyx_n_s_my, __pyx_n_s_mz, __pyx_n_s_nodes, __pyx_n_s_mn, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nno, __pyx_n_s_tmpi, __pyx_n_s_search, __pyx_n_s_num_nodes, __pyx_n_s_numel, __pyx_n_s_new_connection, __pyx_n_s_new_connectionv, __pyx_n_s_new_node, __pyx_n_s_new_node_idx, __pyx_n_s_og_el_id, __pyx_n_s_new_nodev, __pyx_n_s_og_el_idv, __pyx_n_s_pad, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_remap, __pyx_n_s_remapv, __pyx_n_s_idxa, __pyx_n_s_unicl, __pyx_n_s_node_id, __pyx_n_s_added_nodes, __pyx_n_s_node_out, __pyx_n_s_node_outv); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_tuple__52 = PyTuple_Pack(39, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_node_x, __pyx_n_s_node_y, __pyx_n_s_node_z, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_n, __pyx_n_s_mx, __pyx_n_s_my, __pyx_n_s_mz, __pyx_n_s_nodes, __pyx_n_s_mn, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_nno, __pyx_n_s_tmpi, __pyx_n_s_search, __pyx_n_s_num_nodes, __pyx_n_s_numel, __pyx_n_s_new_connection, __pyx_n_s_new_connectionv, __pyx_n_s_new_node, __pyx_n_s_new_node_idx, __pyx_n_s_og_el_id, __pyx_n_s_new_nodev, __pyx_n_s_og_el_idv, __pyx_n_s_pad, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_remap, __pyx_n_s_remapv, __pyx_n_s_idxa, __pyx_n_s_unicl, __pyx_n_s_node_id, __pyx_n_s_added_nodes, __pyx_n_s_node_out, __pyx_n_s_node_outv); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); - __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 39, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_splitTri, 677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 39, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_splitTri, 680, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 680, __pyx_L1_error) - /* "meshCalcUnix.pyx":806 + /* "meshCalcUnix.pyx":809 * return new_connection, node_out, numel*4, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def splitTetra(long long[:,:] connection, double[:,:] node): */ - __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 39, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_splitTetra, 806, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 39, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_splitTetra, 809, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 809, __pyx_L1_error) - /* "meshCalcUnix.pyx":931 + /* "meshCalcUnix.pyx":934 * return new_connection, node_out, numel*8, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def orderTetra(long long[:,:] connection, double[:,:] node, int num_threads=2): */ - __pyx_tuple__55 = PyTuple_Pack(35, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_num_threads, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_con, __pyx_n_s_conv, __pyx_n_s_node_x, __pyx_n_s_node_y, __pyx_n_s_node_z, __pyx_n_s_nodex, __pyx_n_s_nodey, __pyx_n_s_nodez, __pyx_n_s_v00, __pyx_n_s_v01, __pyx_n_s_v02, __pyx_n_s_v10, __pyx_n_s_v11, __pyx_n_s_v12, __pyx_n_s_v20, __pyx_n_s_v21, __pyx_n_s_v22, __pyx_n_s_s0, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_N, __pyx_n_s_ccw, __pyx_n_s_ccwv, __pyx_n_s_i, __pyx_n_s_k, __pyx_n_s_ei, __pyx_n_s_tid, __pyx_n_s_count, __pyx_n_s_countv, __pyx_n_s_count_out); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_tuple__55 = PyTuple_Pack(35, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_num_threads, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_con, __pyx_n_s_conv, __pyx_n_s_node_x, __pyx_n_s_node_y, __pyx_n_s_node_z, __pyx_n_s_nodex, __pyx_n_s_nodey, __pyx_n_s_nodez, __pyx_n_s_v00, __pyx_n_s_v01, __pyx_n_s_v02, __pyx_n_s_v10, __pyx_n_s_v11, __pyx_n_s_v12, __pyx_n_s_v20, __pyx_n_s_v21, __pyx_n_s_v22, __pyx_n_s_s0, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_N, __pyx_n_s_ccw, __pyx_n_s_ccwv, __pyx_n_s_i, __pyx_n_s_k, __pyx_n_s_ei, __pyx_n_s_tid, __pyx_n_s_count, __pyx_n_s_countv, __pyx_n_s_count_out); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__55); __Pyx_GIVEREF(__pyx_tuple__55); - __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 35, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_orderTetra, 931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 35, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_orderTetra, 934, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 934, __pyx_L1_error) - /* "meshCalcUnix.pyx":1025 + /* "meshCalcUnix.pyx":1028 * return con, count_out, ccw * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def orderQuad(long long[:,:] connection, double[:,:] node): */ - __pyx_tuple__57 = PyTuple_Pack(36, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_con, __pyx_n_s_conv, __pyx_n_s_node_x, __pyx_n_s_node_y, __pyx_n_s_node_z, __pyx_n_s_x, __pyx_n_s_z, __pyx_n_s_xtmp, __pyx_n_s_ztmp, __pyx_n_s_count, __pyx_n_s_countv, __pyx_n_s_count_out, __pyx_n_s_theta, __pyx_n_s_order, __pyx_n_s_pi, __pyx_n_s_i, __pyx_n_s_k, __pyx_n_s_c, __pyx_n_s_j, __pyx_n_s_eflag, __pyx_n_s_ei, __pyx_n_s_num_threads, __pyx_n_s_minx, __pyx_n_s_minz, __pyx_n_s_xinf, __pyx_n_s_zinf, __pyx_n_s_tinf, __pyx_n_s_mtheta, __pyx_n_s_dx, __pyx_n_s_dy, __pyx_n_s_a, __pyx_n_s_dz); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1025, __pyx_L1_error) + __pyx_tuple__57 = PyTuple_Pack(36, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_con, __pyx_n_s_conv, __pyx_n_s_node_x, __pyx_n_s_node_y, __pyx_n_s_node_z, __pyx_n_s_x, __pyx_n_s_z, __pyx_n_s_xtmp, __pyx_n_s_ztmp, __pyx_n_s_count, __pyx_n_s_countv, __pyx_n_s_count_out, __pyx_n_s_theta, __pyx_n_s_order, __pyx_n_s_pi, __pyx_n_s_i, __pyx_n_s_k, __pyx_n_s_c, __pyx_n_s_j, __pyx_n_s_eflag, __pyx_n_s_ei, __pyx_n_s_num_threads, __pyx_n_s_minx, __pyx_n_s_minz, __pyx_n_s_xinf, __pyx_n_s_zinf, __pyx_n_s_tinf, __pyx_n_s_mtheta, __pyx_n_s_dx, __pyx_n_s_dy, __pyx_n_s_a, __pyx_n_s_dz); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__57); __Pyx_GIVEREF(__pyx_tuple__57); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 36, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_orderQuad, 1025, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1025, __pyx_L1_error) + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 36, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_orderQuad, 1028, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1028, __pyx_L1_error) - /* "meshCalcUnix.pyx":1152 + /* "meshCalcUnix.pyx":1155 * return con, count_out * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def surfaceCall(long[:,:] fconnection, double[:,:] node, double[:,:] cellcentres, */ - __pyx_tuple__59 = PyTuple_Pack(30, __pyx_n_s_fconnection, __pyx_n_s_node, __pyx_n_s_cellcentres, __pyx_n_s_num_threads, __pyx_n_s_nfaces, __pyx_n_s_node_xv, __pyx_n_s_node_yv, __pyx_n_s_node_zv, __pyx_n_s_nodez, __pyx_n_s_tqz, __pyx_n_s_ocheck, __pyx_n_s_ocheckv, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_tid, __pyx_n_s_bqz, __pyx_n_s_xx, __pyx_n_s_yy, __pyx_n_s_xm, __pyx_n_s_ym, __pyx_n_s_q0, __pyx_n_s_q1, __pyx_n_s_p0, __pyx_n_s_p1, __pyx_n_s_p2, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_s3, __pyx_n_s_s4, __pyx_n_s_s5); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_tuple__59 = PyTuple_Pack(30, __pyx_n_s_fconnection, __pyx_n_s_node, __pyx_n_s_cellcentres, __pyx_n_s_num_threads, __pyx_n_s_nfaces, __pyx_n_s_node_xv, __pyx_n_s_node_yv, __pyx_n_s_node_zv, __pyx_n_s_nodez, __pyx_n_s_tqz, __pyx_n_s_ocheck, __pyx_n_s_ocheckv, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_tid, __pyx_n_s_bqz, __pyx_n_s_xx, __pyx_n_s_yy, __pyx_n_s_xm, __pyx_n_s_ym, __pyx_n_s_q0, __pyx_n_s_q1, __pyx_n_s_p0, __pyx_n_s_p1, __pyx_n_s_p2, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_s3, __pyx_n_s_s4, __pyx_n_s_s5); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_surfaceCall, 1152, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 30, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_surfaceCall, 1155, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 1155, __pyx_L1_error) - /* "meshCalcUnix.pyx":1250 + /* "meshCalcUnix.pyx":1253 * * #nsizeA and finite element conductance calculation * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def conductanceCall(long long[:,:] connection, int numnp, int typ=0, */ - __pyx_tuple__61 = PyTuple_Pack(25, __pyx_n_s_connection, __pyx_n_s_numnp, __pyx_n_s_typ, __pyx_n_s_num_threads, __pyx_n_s_nmax, __pyx_n_s_numel, __pyx_n_s_nedges, __pyx_n_s_pad, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_idx, __pyx_n_s_counts, __pyx_n_s_uni, __pyx_n_s_combof, __pyx_n_s_Nconnec, __pyx_n_s_Nconnecv, __pyx_n_s_combo, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_merged, __pyx_n_s_na, __pyx_n_s_nb, __pyx_n_s_nid, __pyx_n_s_nsizeA); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_tuple__61 = PyTuple_Pack(25, __pyx_n_s_connection, __pyx_n_s_numnp, __pyx_n_s_typ, __pyx_n_s_num_threads, __pyx_n_s_nmax, __pyx_n_s_numel, __pyx_n_s_nedges, __pyx_n_s_pad, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_idx, __pyx_n_s_counts, __pyx_n_s_uni, __pyx_n_s_combof, __pyx_n_s_Nconnec, __pyx_n_s_Nconnecv, __pyx_n_s_combo, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_merged, __pyx_n_s_na, __pyx_n_s_nb, __pyx_n_s_nid, __pyx_n_s_nsizeA); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__61); __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_conductanceCall, 1250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 25, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_conductanceCall, 1253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 1253, __pyx_L1_error) - /* "meshCalcUnix.pyx":1368 + /* "meshCalcUnix.pyx":1371 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def externalN(long long[:,:] connection, double[:,:] node, long[:,:] neigh): */ - __pyx_tuple__63 = PyTuple_Pack(49, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_neigh, __pyx_n_s_flag3d, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_numel, __pyx_n_s_numnp, __pyx_n_s_nn, __pyx_n_s_nvert, __pyx_n_s_xa, __pyx_n_s_ya, __pyx_n_s_za, __pyx_n_s_xm, __pyx_n_s_ym, __pyx_n_s_zm, __pyx_n_s_xmf, __pyx_n_s_ymf, __pyx_n_s_zmf, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_enodesl, __pyx_n_s_surfaceflagl, __pyx_n_s_enode0, __pyx_n_s_enode1, __pyx_n_s_enode2, __pyx_n_s_node_xv, __pyx_n_s_node_yv, __pyx_n_s_node_zv, __pyx_n_s_tqz, __pyx_n_s_q0, __pyx_n_s_q1, __pyx_n_s_p0, __pyx_n_s_p1, __pyx_n_s_p2, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_s3, __pyx_n_s_s4, __pyx_n_s_s5, __pyx_n_s_dx, __pyx_n_s_dz, __pyx_n_s_o, __pyx_n_s_enodeu, __pyx_n_s_enodeidx, __pyx_n_s_enodes, __pyx_n_s_surfaceflag); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_tuple__63 = PyTuple_Pack(49, __pyx_n_s_connection, __pyx_n_s_node, __pyx_n_s_neigh, __pyx_n_s_flag3d, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_k, __pyx_n_s_numel, __pyx_n_s_numnp, __pyx_n_s_nn, __pyx_n_s_nvert, __pyx_n_s_xa, __pyx_n_s_ya, __pyx_n_s_za, __pyx_n_s_xm, __pyx_n_s_ym, __pyx_n_s_zm, __pyx_n_s_xmf, __pyx_n_s_ymf, __pyx_n_s_zmf, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_enodesl, __pyx_n_s_surfaceflagl, __pyx_n_s_enode0, __pyx_n_s_enode1, __pyx_n_s_enode2, __pyx_n_s_node_xv, __pyx_n_s_node_yv, __pyx_n_s_node_zv, __pyx_n_s_tqz, __pyx_n_s_q0, __pyx_n_s_q1, __pyx_n_s_p0, __pyx_n_s_p1, __pyx_n_s_p2, __pyx_n_s_s1, __pyx_n_s_s2, __pyx_n_s_s3, __pyx_n_s_s4, __pyx_n_s_s5, __pyx_n_s_dx, __pyx_n_s_dz, __pyx_n_s_o, __pyx_n_s_enodeu, __pyx_n_s_enodeidx, __pyx_n_s_enodes, __pyx_n_s_surfaceflag); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__63); __Pyx_GIVEREF(__pyx_tuple__63); - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 49, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_externalN, 1368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 49, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_externalN, 1371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 1371, __pyx_L1_error) - /* "meshCalcUnix.pyx":1540 + /* "meshCalcUnix.pyx":1543 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def fcrosscheck(long long[:,:] fconnection1, long long[:,:] fconnection2):#, int num_threads=2): */ - __pyx_tuple__65 = PyTuple_Pack(18, __pyx_n_s_fconnection1, __pyx_n_s_fconnection2, __pyx_n_s_i, __pyx_n_s_numel1, __pyx_n_s_numel2, __pyx_n_s_face, __pyx_n_s_combo1, __pyx_n_s_combov1, __pyx_n_s_combo2, __pyx_n_s_combov2, __pyx_n_s_num_node, __pyx_n_s_pad, __pyx_n_s_cflatten, __pyx_n_s_tempidx, __pyx_n_s_csort, __pyx_n_s_o, __pyx_n_s_repeats, __pyx_n_s_repeatv); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_tuple__65 = PyTuple_Pack(18, __pyx_n_s_fconnection1, __pyx_n_s_fconnection2, __pyx_n_s_i, __pyx_n_s_numel1, __pyx_n_s_numel2, __pyx_n_s_face, __pyx_n_s_combo1, __pyx_n_s_combov1, __pyx_n_s_combo2, __pyx_n_s_combov2, __pyx_n_s_num_node, __pyx_n_s_pad, __pyx_n_s_cflatten, __pyx_n_s_tempidx, __pyx_n_s_csort, __pyx_n_s_o, __pyx_n_s_repeats, __pyx_n_s_repeatv); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__65); __Pyx_GIVEREF(__pyx_tuple__65); - __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_fcrosscheck, 1540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_fcrosscheck, 1543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 1543, __pyx_L1_error) - /* "meshCalcUnix.pyx":1618 + /* "meshCalcUnix.pyx":1621 * return repeats * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def boundcall(long long[:,:] tconnection, long long[:,:] fconnection, double[:,:] node): */ - __pyx_tuple__67 = PyTuple_Pack(26, __pyx_n_s_tconnection, __pyx_n_s_fconnection, __pyx_n_s_node, __pyx_n_s_numel, __pyx_n_s_numel_check, __pyx_n_s_numnp, __pyx_n_s_npere_face, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_dx, __pyx_n_s_dy, __pyx_n_s_dz, __pyx_n_s_npere, __pyx_n_s_cx, __pyx_n_s_cy, __pyx_n_s_cz, __pyx_n_s_tcentriod, __pyx_n_s_fcentriod, __pyx_n_s_bd, __pyx_n_s_node_bd, __pyx_n_s_face_bd, __pyx_n_s_node_bdv, __pyx_n_s_face_bdv, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1618, __pyx_L1_error) + __pyx_tuple__67 = PyTuple_Pack(26, __pyx_n_s_tconnection, __pyx_n_s_fconnection, __pyx_n_s_node, __pyx_n_s_numel, __pyx_n_s_numel_check, __pyx_n_s_numnp, __pyx_n_s_npere_face, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_dx, __pyx_n_s_dy, __pyx_n_s_dz, __pyx_n_s_npere, __pyx_n_s_cx, __pyx_n_s_cy, __pyx_n_s_cz, __pyx_n_s_tcentriod, __pyx_n_s_fcentriod, __pyx_n_s_bd, __pyx_n_s_node_bd, __pyx_n_s_face_bd, __pyx_n_s_node_bdv, __pyx_n_s_face_bdv, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__67); __Pyx_GIVEREF(__pyx_tuple__67); - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_boundcall, 1618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1618, __pyx_L1_error) + __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_boundcall, 1621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(0, 1621, __pyx_L1_error) - /* "meshCalcUnix.pyx":1717 + /* "meshCalcUnix.pyx":1720 * return node_bd, face_bd * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def rmRepeatNodes(double[:,:] node, long [:,:] connection, int n=10, int num_threads=2): */ - __pyx_tuple__69 = PyTuple_Pack(23, __pyx_n_s_node, __pyx_n_s_connection, __pyx_n_s_n, __pyx_n_s_num_threads, __pyx_n_s_numnp, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_nnodes, __pyx_n_s_nnodev, __pyx_n_s_ndim, __pyx_n_s_c, __pyx_n_s_idx, __pyx_n_s_idxv, __pyx_n_s_err, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_nconnec, __pyx_n_s_nconnecv, __pyx_n_s_remap, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_tuple__69 = PyTuple_Pack(23, __pyx_n_s_node, __pyx_n_s_connection, __pyx_n_s_n, __pyx_n_s_num_threads, __pyx_n_s_numnp, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_nnodes, __pyx_n_s_nnodev, __pyx_n_s_ndim, __pyx_n_s_c, __pyx_n_s_idx, __pyx_n_s_idxv, __pyx_n_s_err, __pyx_n_s_i, __pyx_n_s_j, __pyx_n_s_numel, __pyx_n_s_npere, __pyx_n_s_nconnec, __pyx_n_s_nconnecv, __pyx_n_s_remap, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(0, 1720, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__69); __Pyx_GIVEREF(__pyx_tuple__69); - __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_rmRepeatNodes, 1717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_meshCalcUnix_pyx, __pyx_n_s_rmRepeatNodes, 1720, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(0, 1720, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -48804,33 +48867,33 @@ static int __Pyx_modinit_type_import_code(void) { /*--- Type import code ---*/ __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_8(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_6(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyTypeObject), #elif CYTHON_COMPILING_IN_LIMITED_API - sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyTypeObject), + sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyTypeObject), #else - sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyHeapTypeObject), + sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyHeapTypeObject), #endif - __Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 202, __pyx_L1_error) - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 225, __pyx_L1_error) - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 229, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 238, __pyx_L1_error) - __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 809, __pyx_L1_error) - __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 811, __pyx_L1_error) - __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 813, __pyx_L1_error) - __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 815, __pyx_L1_error) - __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 817, __pyx_L1_error) - __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 819, __pyx_L1_error) - __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 821, __pyx_L1_error) - __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 823, __pyx_L1_error) - __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 825, __pyx_L1_error) - __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_8); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 827, __pyx_L1_error) - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_8(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_8(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_8); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 866, __pyx_L1_error) + __pyx_ptype_5numpy_dtype = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArray_Descr),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 202, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArrayIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 225, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArrayMultiIterObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 229, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyArrayObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 238, __pyx_L1_error) + __pyx_ptype_5numpy_generic = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 809, __pyx_L1_error) + __pyx_ptype_5numpy_number = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "number", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 811, __pyx_L1_error) + __pyx_ptype_5numpy_integer = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 813, __pyx_L1_error) + __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 815, __pyx_L1_error) + __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 817, __pyx_L1_error) + __pyx_ptype_5numpy_inexact = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 819, __pyx_L1_error) + __pyx_ptype_5numpy_floating = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 821, __pyx_L1_error) + __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 823, __pyx_L1_error) + __pyx_ptype_5numpy_flexible = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 825, __pyx_L1_error) + __pyx_ptype_5numpy_character = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "character", sizeof(PyObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 827, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType_3_0_6(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(PyUFuncObject),__Pyx_ImportType_CheckSize_Ignore_3_0_6); if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; @@ -49050,7 +49113,7 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_meshCalc(PyObject *__pyx_pyinit_mo __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) { int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef); - __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "meshCalc" pseudovariable */ + __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to meshCalc pseudovariable */ if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error) pystate_addmodule_run = 1; } @@ -49836,217 +49899,217 @@ if (!__Pyx_RefNanny) { * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) - * def sortNeigh(np.ndarray[long long, ndim=2] neigh): + * def sortNeigh(np.ndarray[long long, ndim=2] neigh, long[:] zone): */ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_17sortNeigh, 0, __pyx_n_s_sortNeigh, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__51)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (PyDict_SetItem(__pyx_d, __pyx_n_s_sortNeigh, __pyx_t_7) < 0) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "meshCalcUnix.pyx":677 + /* "meshCalcUnix.pyx":680 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def splitTri(long long[:,:] connection, double[:,:] node): */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_19splitTri, 0, __pyx_n_s_splitTri, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_19splitTri, 0, __pyx_n_s_splitTri, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__53)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_splitTri, __pyx_t_7) < 0) __PYX_ERR(0, 677, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_splitTri, __pyx_t_7) < 0) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "meshCalcUnix.pyx":806 + /* "meshCalcUnix.pyx":809 * return new_connection, node_out, numel*4, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def splitTetra(long long[:,:] connection, double[:,:] node): */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_21splitTetra, 0, __pyx_n_s_splitTetra, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_21splitTetra, 0, __pyx_n_s_splitTetra, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_splitTetra, __pyx_t_7) < 0) __PYX_ERR(0, 806, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_splitTetra, __pyx_t_7) < 0) __PYX_ERR(0, 809, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "meshCalcUnix.pyx":933 + /* "meshCalcUnix.pyx":936 * @cython.boundscheck(False) * @cython.wraparound(False) * def orderTetra(long long[:,:] connection, double[:,:] node, int num_threads=2): # <<<<<<<<<<<<<< * """ Organise tetrahedral element nodes into a clockwise order * */ - __pyx_t_7 = __Pyx_PyInt_From_int(((int)2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 933, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(((int)2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "meshCalcUnix.pyx":931 + /* "meshCalcUnix.pyx":934 * return new_connection, node_out, numel*8, num_nodes + added_nodes * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def orderTetra(long long[:,:] connection, double[:,:] node, int num_threads=2): */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7)) __PYX_ERR(0, 931, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7)) __PYX_ERR(0, 934, __pyx_L1_error); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_23orderTetra, 0, __pyx_n_s_orderTetra, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 931, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_23orderTetra, 0, __pyx_n_s_orderTetra, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_orderTetra, __pyx_t_7) < 0) __PYX_ERR(0, 931, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_orderTetra, __pyx_t_7) < 0) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "meshCalcUnix.pyx":1025 + /* "meshCalcUnix.pyx":1028 * return con, count_out, ccw * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def orderQuad(long long[:,:] connection, double[:,:] node): */ - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_25orderQuad, 0, __pyx_n_s_orderQuad, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1025, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_25orderQuad, 0, __pyx_n_s_orderQuad, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__58)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_orderQuad, __pyx_t_7) < 0) __PYX_ERR(0, 1025, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_orderQuad, __pyx_t_7) < 0) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "meshCalcUnix.pyx":1155 + /* "meshCalcUnix.pyx":1158 * @cython.wraparound(False) * def surfaceCall(long[:,:] fconnection, double[:,:] node, double[:,:] cellcentres, * int num_threads=2): # <<<<<<<<<<<<<< * """Call to determine if outward facing mesh faces are on the top surface * of a tetrahedral mesh. Roughly following solution posted at: */ - __pyx_t_7 = __Pyx_PyInt_From_int(((int)2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(((int)2)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1158, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "meshCalcUnix.pyx":1152 + /* "meshCalcUnix.pyx":1155 * return con, count_out * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def surfaceCall(long[:,:] fconnection, double[:,:] node, double[:,:] cellcentres, */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7)) __PYX_ERR(0, 1152, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7)) __PYX_ERR(0, 1155, __pyx_L1_error); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_27surfaceCall, 0, __pyx_n_s_surfaceCall, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_27surfaceCall, 0, __pyx_n_s_surfaceCall, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__60)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_surfaceCall, __pyx_t_7) < 0) __PYX_ERR(0, 1152, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_surfaceCall, __pyx_t_7) < 0) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "meshCalcUnix.pyx":1252 + /* "meshCalcUnix.pyx":1255 * @cython.boundscheck(False) * @cython.wraparound(False) * def conductanceCall(long long[:,:] connection, int numnp, int typ=0, # <<<<<<<<<<<<<< * int num_threads=1): * """Calculate the array size needed for the finite element conductance matrix */ - __pyx_t_7 = __Pyx_PyInt_From_int(((int)0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(((int)0)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - /* "meshCalcUnix.pyx":1253 + /* "meshCalcUnix.pyx":1256 * @cython.wraparound(False) * def conductanceCall(long long[:,:] connection, int numnp, int typ=0, * int num_threads=1): # <<<<<<<<<<<<<< * """Calculate the array size needed for the finite element conductance matrix * in R2 class codes */ - __pyx_t_5 = __Pyx_PyInt_From_int(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(((int)1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "meshCalcUnix.pyx":1250 + /* "meshCalcUnix.pyx":1253 * * #nsizeA and finite element conductance calculation * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def conductanceCall(long long[:,:] connection, int numnp, int typ=0, */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7)) __PYX_ERR(0, 1250, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7)) __PYX_ERR(0, 1253, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(0, 1250, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error); __pyx_t_7 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_29conductanceCall, 0, __pyx_n_s_conductanceCall, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_29conductanceCall, 0, __pyx_n_s_conductanceCall, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__62)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_conductanceCall, __pyx_t_5) < 0) __PYX_ERR(0, 1250, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_conductanceCall, __pyx_t_5) < 0) __PYX_ERR(0, 1253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1368 + /* "meshCalcUnix.pyx":1371 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def externalN(long long[:,:] connection, double[:,:] node, long[:,:] neigh): */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_31externalN, 0, __pyx_n_s_externalN, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_31externalN, 0, __pyx_n_s_externalN, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_externalN, __pyx_t_5) < 0) __PYX_ERR(0, 1368, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_externalN, __pyx_t_5) < 0) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1540 + /* "meshCalcUnix.pyx":1543 * * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def fcrosscheck(long long[:,:] fconnection1, long long[:,:] fconnection2):#, int num_threads=2): */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_33fcrosscheck, 0, __pyx_n_s_fcrosscheck, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_33fcrosscheck, 0, __pyx_n_s_fcrosscheck, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fcrosscheck, __pyx_t_5) < 0) __PYX_ERR(0, 1540, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fcrosscheck, __pyx_t_5) < 0) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1618 + /* "meshCalcUnix.pyx":1621 * return repeats * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def boundcall(long long[:,:] tconnection, long long[:,:] fconnection, double[:,:] node): */ - __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_35boundcall, 0, __pyx_n_s_boundcall, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1618, __pyx_L1_error) + __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_35boundcall, 0, __pyx_n_s_boundcall, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__68)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_boundcall, __pyx_t_5) < 0) __PYX_ERR(0, 1618, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_boundcall, __pyx_t_5) < 0) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "meshCalcUnix.pyx":1719 + /* "meshCalcUnix.pyx":1722 * @cython.boundscheck(False) * @cython.wraparound(False) * def rmRepeatNodes(double[:,:] node, long [:,:] connection, int n=10, int num_threads=2): # <<<<<<<<<<<<<< * """ * Remove colocated nodes, useful for some mesh formats or remapping the ABMN */ - __pyx_t_5 = __Pyx_PyInt_From_int(((int)10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1719, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(((int)10)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int(((int)2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1719, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(((int)2)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "meshCalcUnix.pyx":1717 + /* "meshCalcUnix.pyx":1720 * return node_bd, face_bd * * @cython.boundscheck(False) # <<<<<<<<<<<<<< * @cython.wraparound(False) * def rmRepeatNodes(double[:,:] node, long [:,:] connection, int n=10, int num_threads=2): */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)) __PYX_ERR(0, 1717, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5)) __PYX_ERR(0, 1720, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_4); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4)) __PYX_ERR(0, 1717, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4)) __PYX_ERR(0, 1720, __pyx_L1_error); __pyx_t_5 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_37rmRepeatNodes, 0, __pyx_n_s_rmRepeatNodes, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_t_4 = __Pyx_CyFunction_New(&__pyx_mdef_8meshCalc_37rmRepeatNodes, 0, __pyx_n_s_rmRepeatNodes, NULL, __pyx_n_s_meshCalc, __pyx_d, ((PyObject *)__pyx_codeobj__70)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_rmRepeatNodes, __pyx_t_4) < 0) __PYX_ERR(0, 1717, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_rmRepeatNodes, __pyx_t_4) < 0) __PYX_ERR(0, 1720, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "meshCalcUnix.pyx":1 @@ -50497,11 +50560,11 @@ static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyO { int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ); if (unlikely(eq != 0)) { - if (unlikely(eq < 0)) return NULL; + if (unlikely(eq < 0)) return NULL; // error return kwvalues[i]; } } - return NULL; + return NULL; // not found (no exception set) } #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) { @@ -50588,7 +50651,7 @@ static int __Pyx_ParseOptionalKeywords( if (*name) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS - Py_INCREF(value); + Py_INCREF(value); // transfer ownership of value to values Py_DECREF(key); #endif key = NULL; @@ -50607,7 +50670,7 @@ static int __Pyx_ParseOptionalKeywords( && _PyString_Eq(**name, key)) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS - value = NULL; + value = NULL; // ownership transferred to values #endif break; } @@ -50639,7 +50702,7 @@ static int __Pyx_ParseOptionalKeywords( if (cmp == 0) { values[name-argnames] = value; #if CYTHON_AVOID_BORROWED_REFS - value = NULL; + value = NULL; // ownership transferred to values #endif break; } @@ -53807,10 +53870,9 @@ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { /* UnpackUnboundCMethod */ static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) { - PyObject *result; PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args)); if (unlikely(!selfless_args)) return NULL; - result = PyObject_Call(method, selfless_args, kwargs); + PyObject *result = PyObject_Call(method, selfless_args, kwargs); Py_DECREF(selfless_args); return result; } @@ -54574,10 +54636,9 @@ fail:; /* IterFinish */ static CYTHON_INLINE int __Pyx_IterFinish(void) { - PyObject* exc_type; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - exc_type = __Pyx_PyErr_CurrentExceptionType(); + PyObject* exc_type = __Pyx_PyErr_CurrentExceptionType(); if (unlikely(exc_type)) { if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) return -1; @@ -55428,10 +55489,10 @@ __PYX_GOOD: #endif /* TypeImport */ - #ifndef __PYX_HAVE_RT_ImportType_3_0_8 -#define __PYX_HAVE_RT_ImportType_3_0_8 -static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module_name, const char *class_name, - size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_8 check_size) + #ifndef __PYX_HAVE_RT_ImportType_3_0_6 +#define __PYX_HAVE_RT_ImportType_3_0_6 +static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject *module, const char *module_name, const char *class_name, + size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size) { PyObject *result = 0; char warning[200]; @@ -55485,7 +55546,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module module_name, class_name, size, basicsize+itemsize); goto bad; } - if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_8 && + if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_6 && ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) { PyErr_Format(PyExc_ValueError, "%.200s.%.200s size changed, may indicate binary incompatibility. " @@ -55493,7 +55554,7 @@ static PyTypeObject *__Pyx_ImportType_3_0_8(PyObject *module, const char *module module_name, class_name, size, basicsize, basicsize+itemsize); goto bad; } - else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_8 && (size_t)basicsize > size) { + else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_6 && (size_t)basicsize > size) { PyOS_snprintf(warning, sizeof(warning), "%s.%s size changed, may indicate binary incompatibility. " "Expected %zd from C header, got %zd from PyObject", @@ -55775,7 +55836,7 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( #else py_code = PyCode_NewEmpty(filename, funcname, py_line); #endif - Py_XDECREF(py_funcname); + Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline return py_code; bad: Py_XDECREF(py_funcname); @@ -56223,6 +56284,29 @@ __pyx_fail: return result; } +/* ObjectToMemviewSlice */ + static CYTHON_INLINE __Pyx_memviewslice __Pyx_PyObject_to_MemoryviewSlice_ds_long(PyObject *obj, int writable_flag) { + __Pyx_memviewslice result = { 0, 0, { 0 }, { 0 }, { 0 } }; + __Pyx_BufFmt_StackElem stack[1]; + int axes_specs[] = { (__Pyx_MEMVIEW_DIRECT | __Pyx_MEMVIEW_STRIDED) }; + int retcode; + if (obj == Py_None) { + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, 0, + PyBUF_RECORDS_RO | writable_flag, 1, + &__Pyx_TypeInfo_long, stack, + &result, obj); + if (unlikely(retcode == -1)) + goto __pyx_fail; + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + /* MemviewDtypeToObject */ static CYTHON_INLINE PyObject *__pyx_memview_get_PY_LONG_LONG(const char *itemp) { return (PyObject *) __Pyx_PyInt_From_PY_LONG_LONG(*(PY_LONG_LONG *) itemp); diff --git a/src/resipy/cext/meshCalcUnix.pyx b/src/resipy/cext/meshCalcUnix.pyx index 33a6d94eebb67a0db303905b4e5401c680031ece..3e7b4c0ddfdb3c01eec78d1b8ee8197e3f5622df 100644 --- a/src/resipy/cext/meshCalcUnix.pyx +++ b/src/resipy/cext/meshCalcUnix.pyx @@ -644,7 +644,7 @@ def facesPrism(long long[:,:] connection, double[:,:] node, long[:,:] neigh): @cython.boundscheck(False) @cython.wraparound(False) -def sortNeigh(np.ndarray[long long, ndim=2] neigh): +def sortNeigh(np.ndarray[long long, ndim=2] neigh, long[:] zone): """Sort neighbour matrix for input into R3t. ----------- neigh: nd array @@ -656,6 +656,7 @@ def sortNeigh(np.ndarray[long long, ndim=2] neigh): neigh: nd array Prepared neighbour matrix """ + cdef int i,j cdef int numel = neigh.shape[0] cdef int npere = neigh.shape[1] cdef long long[:,:] neighv = neigh @@ -666,6 +667,8 @@ def sortNeigh(np.ndarray[long long, ndim=2] neigh): for j in range(npere): if neighv[i,j] == -1: #check if outside element neighv[i,j] = like_inf # if outside assign big number + elif zone[i] != zone[neighv[i,j]]:# check if neighbour in different zone + neighv[i,j] = like_inf sortInt(neigh[i,:],npere) # sort in that part of the row for j in range(npere): diff --git a/src/resipy/gmshWrap.py b/src/resipy/gmshWrap.py index 7148d87cdfe8f507761dd5c2f665200010c42df2..36efc43066e54b990e10dd18ac4c2c1dcccbc9be 100644 --- a/src/resipy/gmshWrap.py +++ b/src/resipy/gmshWrap.py @@ -495,8 +495,6 @@ def mshParse47(fname,debug=True): elm_id = [i+1 for i in range(real_no_elements)] cell_type = [vtk_type]*real_no_elements - cell_type = [vtk_type]*real_no_elements - cell_type = [vtk_type]*real_no_elements mesh_dict = {'num_elms':real_no_elements, 'num_nodes':numnp, @@ -1171,6 +1169,12 @@ def halfspace2d(electrodes, electrode_type = None, geom_input = None, topo_x = [elec_x[min_idx] - 5*np.mean(np.diff(np.unique(elec_x))), elec_x[max_idx] + 5*np.mean(np.diff(np.unique(elec_x)))] topo_z = [elec_z[min_idx],elec_z[max_idx]] + if bh_flag or bu_flag: + distances = find_dist(electrodes[0], np.zeros_like(electrodes[0]), electrodes[1]) + dist_sort = np.unique(distances) + elecspacing = dist_sort[1] + topo_x = [elec_x[min_idx] - 2*elecspacing, + elec_x[max_idx] + 2*elecspacing] else: topo_x = geom_input['surface'][0] topo_z = geom_input['surface'][1] @@ -1186,9 +1190,9 @@ def halfspace2d(electrodes, electrode_type = None, geom_input = None, distances = find_dist(tmp_x[idx], tmp_y[idx], tmp_z[idx]) dist_sort = np.unique(distances) elecspacing = dist_sort[1] - if max(topo_x)-min(topo_x) < elecspacing and len(topo_x) != 1: # they have the same x coordinate - topo_x = [min(electrodes[0]) - 5*elecspacing, - max(electrodes[0]) + 5*elecspacing] + # if max(topo_x)-min(topo_x) < elecspacing and len(topo_x) != 1: # they have the same x coordinate + # topo_x = [min(electrodes[0]) - 2*elecspacing, + # max(electrodes[0]) + 2*elecspacing] if dp_len == -1:#there is no change dipole length, maybe due to 1 x coordinate dp_len = dist_sort[-1] if fmd == -1: diff --git a/src/resipy/interpolation.py b/src/resipy/interpolation.py index b1bac613f8740f92c4d1434a30768b0ef057ca21..d04c3b7facf96c1dc29acfd4881e5351990cd1ac 100644 --- a/src/resipy/interpolation.py +++ b/src/resipy/interpolation.py @@ -769,6 +769,81 @@ def triangulate(xnew, ynew, xknown, yknown, zknown, extrapolate=True): znew[idx_nan] = zknown[idx] return znew + +#%% interpolate using triangulation (can look odd in some situations) +def triangulate3d(xnew, ynew, znew, xknown, yknown, zknown, iknown, extrapolate=True): + """Tri-linear interpolation acheived using a triangulation scheme from Qhull, + uses the scipy.interpolate.LinearNDinterpolator function. See here: + https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.LinearNDInterpolator.html#scipy.interpolate.LinearNDInterpolator + + Parameters + ------------ + xnew: array like + x coordinates for the interpolated values + ynew: array like + y coordinates for the interpolated values + znew: array like + z coordinates for the interpolated values + xknown: array like + x coordinates for the known values + yknown: array like + y coordinates for the known values + zknown: array like + z coordinates for the known values + iknown: array like + known values in 3D space. + extropolate: + use nearest nieghbour lookup to find nan values + + Returns + ------------ + znew: numpy array + z coordinates at xnew and ynew. + """ + + if type(xnew) != 'numpy.ndarray':xnew = np.array(xnew) + if type(ynew) != 'numpy.ndarray':ynew = np.array(ynew) + if type(znew) != 'numpy.ndarray':znew = np.array(znew) + if type(xknown) != 'numpy.ndarray':xknown = np.array(xknown) + if type(yknown) != 'numpy.ndarray':yknown = np.array(yknown) + if type(zknown) != 'numpy.ndarray':zknown = np.array(zknown) + if type(iknown) != 'numpy.ndarray':iknown = np.array(iknown) + + #error checking + if len(xnew) != len(ynew): + raise ValueError('Mismatch in interpolated coordinate array lengths') + if len(xknown) != len(yknown) or len(xknown) != len(zknown): + raise ValueError('Mismatch in known coordinate array lengths') + + pknown = np.array([xknown,yknown,zknown]).T # known points + pnew = np.array([xnew,ynew,znew]).T # new points + + interpolator = LinearNDInterpolator(pknown,iknown) + inew = interpolator(pnew) + + idx_nan = np.isnan(inew).flatten() # boolian indexes of where nans are + idx_num = np.invert(idx_nan).flatten() + + #extrapolate nans using nearest nieghbough interpolation(cKDtree) + if extrapolate: + #combine known and interpolated values + xknown = np.append(xknown,xnew[idx_num]) + yknown = np.append(yknown,ynew[idx_num]) + zknown = np.append(zknown,znew[idx_num]) + iknown = np.append(iknown,inew[idx_num]) + xextrap = xnew[idx_nan] + yextrap = ynew[idx_nan] + zextrap = znew[idx_nan] + + # extrapolate using the gridded and interpolated data + pknown = np.array([xknown,yknown,zknown]).T # known points + pextrap = np.array([xextrap,yextrap,zextrap]).T # extrapolated points + tree = cKDTree(pknown)#tree object + dist,idx = tree.query(pextrap)# map known points to new points + + inew[idx_nan] = iknown[idx] + + return inew #%% pure nearest neighbour interpolation diff --git a/src/resipy/meshTools.py b/src/resipy/meshTools.py index 58f922a8c359b1217de638f872bdca609eceb351..a94a273ca54f1d3b0a1c25ac2665b4a7d79b34a8 100644 --- a/src/resipy/meshTools.py +++ b/src/resipy/meshTools.py @@ -314,6 +314,7 @@ class Mesh: self.originalFilePath = original_file_path # originalFilePath self.eNodes = None # node number that electrodes occupy self.elec = None + self.elec_type = None self.iremote = None # specify which electrode is remote self.idirichlet = None # specify idirichlet node self.cax = None # store mesh.show() output for faster mesh.draw() @@ -358,6 +359,9 @@ class Mesh: #point data attributes ptdf = {'x':node_x,'y':node_y,'z':node_z} self.ptdf = pd.DataFrame(ptdf) + + # number of voxels in the xyz directions, only relevant to the voxel mesh type + self.nvoxel = {'x':None, 'y':None, 'z':None} def copy(self): """Return a copy of mesh object. @@ -450,7 +454,7 @@ class Mesh: return 3 elif int(self.cell_type[0])==8 or int(self.cell_type[0])==9:#elements are quads return 4 - elif int(self.cell_type[0]) == 11: # elements are voxels + elif int(self.cell_type[0]) == 11 or int(self.cell_type[0]) == 12: # elements are voxels return 8 elif int(self.cell_type[0]) == 10:# elements are tetrahedra return 4 @@ -468,7 +472,7 @@ class Mesh: return 1 elif int(self.cell_type[0])==8 or int(self.cell_type[0])==9:#elements are quads return 1 - elif int(self.cell_type[0]) == 11: # elements are voxels + elif int(self.cell_type[0]) == 11 or int(self.cell_type[0]) == 12:# elements are voxels return 8 elif int(self.cell_type[0]) == 10:# elements are tetrahedra return 4 @@ -3147,11 +3151,16 @@ class Mesh: raise TypeError('Advanced mesh format not avialable with 2D meshes currently') # element parameters - param = np.asarray(self.df['param'],dtype=int) - try: - zone = np.asarray(self.df['zones'],dtype=int) - except: - zone = np.ones(self.numel,dtype=int) + if 'param' in self.df.columns: + param = np.asarray(self.df['param'],dtype=int) + else: + param = np.arange(self.numel) + 1 + + if 'zones' in self.df.columns: + zone = np.asarray(self.df['zones'],dtype=self.dint) + else: + zone = np.ones(self.numel,dtype=self.dint) + nzones = len(np.unique(zone)) adv_flag = int(iadvanced) @@ -3159,7 +3168,7 @@ class Mesh: if self.neigh_matrix is None: self.computeNeigh() neigh = self.neigh_matrix.copy() - neigh = mc.sortNeigh(neigh) # organise for (c)R3t input + neigh = mc.sortNeigh(neigh,zone) # organise for (c)R3t input neigh += 1 # add one for FOTRAN indexing if self.NsizeA is None:#then the finite element conductance matrix needs calculating @@ -3337,7 +3346,7 @@ class Mesh: fh.close() - def toCSV(self,file_name='mesh.csv'): + def toCsv(self,file_name='mesh.csv'): """ Write a .csv file of the mesh, the first 3 columns are the element centres at coordinates x,y,z and the rest of the columns are the attributes in the df @@ -3347,10 +3356,6 @@ class Mesh: file_name : String, optional The default is 'mesh.csv'. - Returns - ------- - None. - """ if isinstance(file_name,str)==False: raise NameError("file_name argument must be a string") @@ -3380,6 +3385,178 @@ class Mesh: #close file fh.close() + def xyz(self,file_name='mesh.xyz',coordParam=None): + """ Write a .xyz file of the mesh, the first 3 columns are the element + centres at coordinates x,y,z and the rest of the columns are the + attributes in the df + + Parameters + ---------- + file_name : String, optional + The default is 'mesh.csv'. + + """ + if isinstance(file_name,str)==False: + raise NameError("file_name argument must be a string") + if self.cell_type[0] != 11: + warnings.warn('xyz export intended for voxel meshes only') + if not file_name.lower().endswith('.xyz'): + file_name += '.xyz' + + # setup coordinate parameters if not given + if coordParam is None: + coordParam = {} + coordParam['a'] = 0 + if self.elec is not None: + if self.iremote is not None: + iremote = self.iremote + else: + iremote = [False]*self.elec.shape[0] + coordParam['x0'] = np.min(self.elec[:,0][~iremote]) + coordParam['y0'] = np.min(self.elec[:,1][~iremote]) + else: + coordParam['x0'] = np.min(self.node[:,0]) + coordParam['y0'] = np.min(self.node[:,1]) + + self.cellCentres() + x_coords=self.df.X.values#get element coordinates + y_coords=self.df.Y.values + z_coords=self.df.Z.values + df = self.df.copy().reset_index() + keys0= self.df.keys() + keys=[] + #ignore the x y z columns if already in df + ignore = ['X','Y','Z','param','elm_id','cellType','region'] + for k in keys0: + if k not in ignore: + keys.append(k) + + #open file + fh = open(file_name,'w') + fh.write('X, Y, Z') # write xyz headers + [fh.write(', '+key) for key in keys] # write attribute headers + fh.write('\n') # drop a line + for i in range(self.numel): + line = '{:f},{:f},{:f}'.format(x_coords[i],y_coords[i],z_coords[i]) + for key in keys: + line += ',{:}'.format(df[key][i]) + line += '\n' + fh.write(line) + # close file + fh.close() + + # write out voxel information + if self.nvoxel['x'] is None: + return # exit function if nvoxel not populated + + voxel_info_file = file_name.lower().replace('.xyz','_voxel_info.txt') + fh = open(voxel_info_file,'w') + for key in self.nvoxel.keys(): + fh.write('%s : %i\n'%(key,int(self.nvoxel['x']))) + fh.close() + + + def toVoxelMesh(self,elec=None,elec_type=None, **kwargs): + """ + Returns a special kind of mesh optimised for visualasation inside of + GIS software like Geovisionary. + + Parameters + ---------- + elec : array like, pd.DataFrame, optional + Electrode coordinates. The default is None. + elec_type : list, optional + List of electrode types, i.e. 'surface' or 'buried'. The default is + None (all electrodes are surface electrodes). + + Raises + ------ + Exception + If no electrode coordinates provided. + + Returns + ------- + mesh : class + Mesh object with voxel elements + + """ + if elec is None: + elec = self.elec + + if elec is None: + raise Exception('need to provide some electrodes to produce a voxel mesh') + try: + elec_x = elec[:,0] + elec_y = elec[:,1] + elec_z = elec[:,2] + except: + elec_x = elec.x.values + elec_y = elec.y.values + elec_z = elec.z.values + if elec_type is None: + elec_type = self.elec_type + + mesh = voxelMesh(elec_x, elec_y, elec_z, elec_type, **kwargs, + force_regular=True) + mesh.cellCentres() + self.cellCentres() + for column in self.df.columns: + if column in ['X','Y','Z','param','elm_id','cellType','region']: + continue + inew = interp.triangulate3d(mesh.df.X, mesh.df.Y, mesh.df.Z, + self.df.X, self.df.Y, self.df.Z, + self.df[column]) + mesh.df[column] = inew + + return mesh + + + def toVoxet(self,file_name='mesh.vo',x0=None,y0=None,a=0): + """ + Not yet working! + + Parameters + ---------- + file_name : TYPE, optional + DESCRIPTION. The default is 'mesh.vo'. + x0 : TYPE, optional + DESCRIPTION. The default is None. + y0 : TYPE, optional + DESCRIPTION. The default is None. + a : TYPE, optional + DESCRIPTION. The default is 0. + + Returns + ------- + None. + + """ + if self.cell_type[0] != 11: + raise Exception('this kind of export only available for voxel mesh') + + if x0 is None: + x0 = np.min(self.node[:,0]) + if y0 is None: + y0 = np.min(self.node[:,1]) + z0 = np.min(self.node[:,2]) + + fh = open(file_name,'w') + fh.write('GOCAD Voxet 0.01\n') + fh.write('AXIS_O %f %f %f\n'%(x0,y0,z0)) + + # vectors desribe the orientation of the mesh axis (can be used to add some rotation) + fh.write('AXIS_U 0. 0. %f\n'%np.max(self.node[:,0])) + fh.write('AXIS_V 0. %f 0.\n'%np.max(self.node[:,1])) + fh.write('AXIS_W %f 0. 0.\n'%np.max(self.node[:,2])) + fh.write('AXIS_MIN 0.0 0.0 0.0\n') + fh.write('AXIS_MAX %f %f %f\n'%(np.max(self.node[:,0]),np.max(self.node[:,1]),np.max(self.node[:,2]))) + fh.write('AXIS_N 550 228 150\n') + fh.write('AXIS_D 1. 1. 1.\n') + fh.write('AXIS_NAME "Z" "Y" "X"\n') + fh.write('AXIS_UNIT "m" "m" "m"\n') + fh.write('AXIS_TYPE even even even\n') + + @staticmethod # find paraview location in windows def findParaview(): """ Run on windows to find paraview.exe command. @@ -3612,18 +3789,22 @@ class Mesh: stream('done.') def saveMesh(self, fname, ftype=None): - """Save mesh into a file. Available formats are .dat, .vtk and .node + """Save mesh into a file. Available formats are .dat, .vtk, .csv, .xyz, + and .node. .xyz is a special case where the mesh should be transformed + into a voxel mesh first. Parameters ---------- - fname : TYPE - DESCRIPTION. + fname : str, optional + Path to output save file. + ftype: str, optional + File extension, if none, will be guessed from file name. """ if not isinstance(fname,str): raise TypeError('fname needs to be a string!') #determine file type - atypes = ['dat','node','vtk','csv'] + atypes = ['dat','node','vtk','csv', 'xyz'] if ftype is None:#guess for a in atypes: if fname.endswith('.' + a): @@ -3631,10 +3812,11 @@ class Mesh: break if ftype not in atypes: - raise NameError('Unregocnised mesh file format, avaialable types are %s'%str(atypes)) + raise NameError('Unregocnised mesh file format(%s), avaialable types are %s'%(ftype,str(atypes))) #add extension if not already there - if not fname.endswith('.'+ftype): + if not fname.endswith('.' + ftype): + # print('adding file extension') fname = fname + '.' + ftype #call save file function @@ -3643,10 +3825,79 @@ class Mesh: elif ftype == 'vtk': self.vtk(fname) elif ftype == 'csv': - self.toCSV(fname) + self.toCsv(fname) elif ftype == 'node': self.exportTetgenMesh(fname.replace('.node','')) + elif ftype == 'xyz': + self.xyz(fname) + else: + raise ValueError('mesh export format not recognized. Try either .vtk, .node or .dat.') + + def exportMesh(self, fname, ftype=None, coordLocal=False, coordParam=None, + voxel=False, meshParam=None): + """ + Export mesh into with coordinate rotation data + Parameters + ---------- + fname : str, optional + Path to output save file. + ftype: str, optional + File extension, if none, will be guessed from file name. + coordLocal: bool, optional + If True, convert mesh coordinates to a national grid system or utm. + coordParam: dict, optional + Coordinate conversion parameters, x0, y0 and a. Stored as a dictionary. + """ + if coordLocal and coordParam is None: + coordParam = {} + coordParam['a'] = 0 + if self.elec is not None: + if self.iremote is not None: + iremote = self.iremote + else: + iremote = [False]*self.elec.shape[0] + coordParam['x0'] = np.min(self.elec[:,0][~iremote]) + coordParam['y0'] = np.min(self.elec[:,1][~iremote]) + else: + coordParam['x0'] = np.min(self.node[:,0]) + coordParam['y0'] = np.min(self.node[:,1]) + + xyz = False + if ftype is not None and ftype.endswith('xyz'): + # special case where we want to enforce two things + # 1) export is a voxel mesh + # 2) xyz file is written in local coordinates with a conversion file + xyz = True + + kwargs = {} + kwargs['cl_factor'] = 1 # force mesh to the extent of the electrodes + if meshParam is not None: + if 'cl' in meshParam.keys(): + kwargs['cl'] = meshParam['cl'] + if 'fmd' in meshParam.keys(): + kwargs['fmd'] = meshParam['fmd'] + + if voxel or xyz: + mesh = self.toVoxelMesh(**kwargs) + else: + mesh = self.copy() + + # if xyz: + # mesh.xyz(fname,coordParam) + if coordLocal: + x0 = coordParam['x0'] + y0 = coordParam['y0'] + a = coordParam['a'] + utmx, utmy = interp.invRotGridData( + mesh.node[:,0], + mesh.node[:,1], + x0, y0, a) + mesh.node[:,0] = utmx + mesh.node[:,1] = utmy + mesh.saveMesh(fname,ftype) + else: + mesh.saveMesh(fname,ftype) def writeRindex(self,fname): """Write out the neighbourhood matrix for R3t. @@ -3763,12 +4014,21 @@ def vtk_import(file_path='mesh.vtk', order_nodes=True): except: # print('Failed') pass - + # read in header lines title=fid.readline().strip()#read line 2 + while title == '': + title=fid.readline().strip()#read line 2 + format_type=fid.readline().strip()#read line 3 + while format_type == '': + format_type=fid.readline().strip()#read line 3 + if format_type=='BINARY': raise ImportError("expected ASCII type file format, not binary") + dataset_type=fid.readline().strip().split()#read line 4 + while len(dataset_type) == 0: + dataset_type=fid.readline().strip().split()#read line 4 if dataset_type[1]!='UNSTRUCTURED_GRID': print("Warning: code is built to parse a vtk 'UNSTRUCTURED_GRID' data type not %s"%dataset_type[1]) @@ -3787,18 +4047,54 @@ def vtk_import(file_path='mesh.vtk', order_nodes=True): node_y=[0] * numnp node_z=[0] * numnp node_num=[0] * numnp + rowwise = True # flag that nodes are listed rowwise for i in range(numnp): - try: - coord_data=fid.readline().strip().split() + node_num[i] = i + coord_data_line = fid.readline().strip() + coord_data = coord_data_line.split() + if len(coord_data) == 3: node_x[i] = float(coord_data[0]) node_y[i] = float(coord_data[1]) node_z[i] = float(coord_data[2]) - except:# ValueError: + elif len(coord_data) == 1: coord_data=fid.readline() - node_x[i] = float(coord_data[0:12]) # retrive fixed width columns if cannot parse as split strings - node_y[i] = float(coord_data[12:24]) - node_z[i] = float(coord_data[24:36]) - node_num[i] = i + node_x[i] = float(coord_data_line[0:12]) # retrive fixed width columns if cannot parse as split strings + node_y[i] = float(coord_data_line[12:24]) + node_z[i] = float(coord_data_line[24:36]) + else: + rowwise = False # switch off flag that nodes are row wise + break + + if not rowwise: + #read in node data that is in matrix form + node = np.zeros((numnp,3),dtype=float) + i = 0 + j = 0 + k = 0 + while i < len(coord_data): + node[k,j] = float(coord_data[i]) + j += 1 + i += 1 + if j == 3: + j = 0 + k += 1 + + while k < numnp: + coord_data_line = fid.readline().strip() + coord_data = coord_data_line.split() + i = 0 + j = 0 + while i < len(coord_data): + node[k,j] = float(coord_data[i]) + j += 1 + i += 1 + if j == 3: + j = 0 + k += 1 + + node_x = node[:,0] + node_y = node[:,1] + node_z = node[:,2] #now read in element data elm_info=fid.readline().strip().split()#read line with cell data @@ -4049,7 +4345,7 @@ def dat_import(file_path='mesh.dat', order_nodes=True): for i in range(numel): line = fid.readline().split()#read in line data elm_no[i] = int(line[0]) - zone[i] = int(line[-1]) + zone[i] = int(npere+2) ref=1 # read through each node index if i==0 and not flag_3d and len(line)==7: # we have a special case of a quad mesh .dat file npere=4 @@ -4486,7 +4782,8 @@ def quadMesh(elec_x, elec_z, elec_type = None, elemx=4, xgf=1.5, zf=1.1, zgf=1.5 node_in_mesh[i] = np.argmin(sq_dist) # min distance should be zero, ie. the node index. mesh.setElecNode(node_in_mesh) # add nodes to the mesh class - + mesh.elec_type = elec_type + # OVERWRITE elec_node using node_in_mesh that doesn't assume surface # electrode but snap them to node based on distance elec_node = np.c_[np.arange(len(node_in_mesh))+1, node_in_mesh] @@ -4700,21 +4997,27 @@ def halfspaceControlPoints(elec_x, elec_y, r, min_r=None): addry = [r,0,-r,0] addrx = [0,r,0,-r] - for i in range(nelec): - dx0 = elec_x[idx[i,1]] - elec_x[i] - dx1 = elec_x[idx[i,2]] - elec_x[i] - dy0 = elec_y[idx[i,1]] - elec_y[i] - dy1 = elec_y[idx[i,2]] - elec_y[i] - - q0 = quad(dx0, dy0) # quadrant - q1 = quad(dx1, dy1) # quadrant - qs = [q0,q1] - - # avoid adding points in any known quadrant - for j in range(4): - if j not in qs: + if nelec < 4: + for i in range(nelec): + for j in range(4): xstack.append(elec_x[i] + addrx[j]) ystack.append(elec_y[i] + addry[j]) + else: + for i in range(nelec): + dx0 = elec_x[idx[i,1]] - elec_x[i] + dx1 = elec_x[idx[i,2]] - elec_x[i] + dy0 = elec_y[idx[i,1]] - elec_y[i] + dy1 = elec_y[idx[i,2]] - elec_y[i] + + q0 = quad(dx0, dy0) # quadrant + q1 = quad(dx1, dy1) # quadrant + qs = [q0,q1] + + # avoid adding points in any known quadrant + for j in range(4): + if j not in qs: + xstack.append(elec_x[i] + addrx[j]) + ystack.append(elec_y[i] + addry[j]) xstack = np.array(xstack) ystack = np.array(ystack) @@ -4732,7 +5035,6 @@ def halfspaceControlPoints(elec_x, elec_y, r, min_r=None): continue repeats[j] = True - return xstack[~repeats], ystack[~repeats] #%% build a triangle mesh - using the gmsh wrapper @@ -4917,11 +5219,12 @@ def triMesh(elec_x, elec_z, elec_type=None, geom_input=None, keep_files=True, if elec_type is not None: iremote = np.array([a == 'remote' for a in elec_type]) mesh.iremote = iremote - + mesh.elec_type = elec_type + return mesh #%% 3D tetrahedral mesh -def tetraMesh(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, +def tetraMesh(elec_x, elec_y, elec_z=None, elec_type = None, keep_files=True, interp_method = 'triangulate', surface_refinement=None, mesh_refinement=None, ball_refinement=True, path='exe', dump=print, whole_space=False, model_err=False, @@ -4972,7 +5275,7 @@ def tetraMesh(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, Path to exe folder (leave default unless you know what you are doing). whole_space: boolean, optional flag for if the problem should be treated as a whole space porblem, in - which case electrode type is ingored and all electrodes are buried in + which case electrode type is ignored and all electrodes are buried in the middle of a large mesh. model_err: bool If True, a flat mesh will be returned for the sake of estimating @@ -4983,7 +5286,7 @@ def tetraMesh(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, **kwargs: dict Keyword arguments to be passed to functions in gmshWrap.py - Returns + Returns ---------- mesh3d: class @@ -5155,6 +5458,23 @@ def tetraMesh(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, elec_x = np.delete(elec_x,rem_elec_idx) elec_y = np.delete(elec_y,rem_elec_idx) elec_z = np.delete(elec_z,rem_elec_idx) + + # check for some meshing parameters if there are aany + dist = np.unique(findDist(elec_x, elec_y, elec_z)) + if 'cl' in kwargs.keys(): + cl = kwargs['cl'] + else: + cl = dist[1]/4 + + if 'fmd' in kwargs.keys(): # compute depth of investigation if not given + fmd = kwargs['fmd'] + else: + fmd = dist[-1]/3 # maximum possible dipole length / 3 (assuming a surface array) + + if 'cl_factor' in kwargs.keys(): + cl_factor = kwargs['cl_factor'] + else: + cl_factor = 5 # check if mesh refinement present if mesh_refinement is not None and not whole_space: @@ -5213,8 +5533,43 @@ def tetraMesh(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, 'y':mesh_refinement['y'], 'z':mesh_refinement['z']} kwargs['mesh_refinement'] = internal_mesh_refinement # actual mesh refinement passed to wholespace problem + elif whole_space: + tree = cKDTree(np.c_[elec_x,elec_y,elec_z]) + cpx = [0]*len(bur_elec_x) + cpy = [0]*len(bur_elec_x) + cpz = [0]*len(bur_elec_x) + # setup some code to get control points spiraling round the electrodes + r = cl*1.0 + choicex = [r, 0, -r, 0] + choicey = [0, -r, 0, r] + j = 0 + for i in range(len(elec_x)): + cpx[i] = elec_x[i] + choicex[j] + cpy[i] = elec_y[i] + choicey[j] + cpz[i] = elec_z[i] + j += 1 + if j >= 4: + j = 0 + + cpl = np.full_like(cpx, cl*cl_factor) + + # check that no points are duplicates of electrodes + idist,_ = tree.query(np.c_[cpx,cpy,cpz]) + tokeep = [True]*len(cpx) + for i in range(len(cpx)): + if idist[i] < 1e-16: + tokeep[i] = False + cpx = cpx[tokeep] + cpy = cpy[tokeep] + cpz = cpz[tokeep] + + control = {'x':cpx, + 'y':cpy, + 'z':cpz, + 'cl':cpl} + kwargs['mesh_refinement'] = control elif not whole_space: # make some of our own control points in this case - elec = np.c_[elec_x, elec_y, elec_z] # surface electrodes + elec = np.c_[elec_x, elec_y, elec_z] # all electrodes tree = cKDTree(elec) idist,_ = tree.query(elec,2) @@ -5223,22 +5578,6 @@ def tetraMesh(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, cpz = np.array([]) cpl = np.array([]) - if 'cl' in kwargs.keys(): - cl = kwargs['cl'] - else: - cl = min(idist[:,1])/4 - - if 'fmd' in kwargs.keys(): # compute depth of investigation if not given - fmd = kwargs['fmd'] - else: - dist = np.unique(findDist(surf_elec_x, surf_elec_y, surf_elec_z)) - fmd = dist[-1]/3 # maximum possible dipole length / 3 - - if 'cl_factor' in kwargs.keys(): - cl_factor = kwargs['cl_factor'] - else: - cl_factor = 5 - if len(surf_elec_x)>0: # control points in x y coordinates _cpx, _cpy = halfspaceControlPoints(surf_elec_x, surf_elec_y, @@ -5392,22 +5731,22 @@ def tetraMesh(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, else: #add nodes to mesh mesh.setElecNode(node_pos-1)#in python indexing starts at 0, in gmsh it starts at 1 + mesh.elec_type = elec_type return mesh - -def tetraMeshOld(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, - interp_method = 'triangulate', surface_refinement=None, - mesh_refinement=None, ball_refinement=True, add_voroni_refinement=False, - path='exe', dump=print, whole_space=False, padding=20, - search_radius = 10, handle=None, show_output=True, **kwargs): - """ Generates a tetrahedral mesh for R3t (with topography). returns mesh3d.dat - in the working directory. This function expects the current working directory - has path: exe/gmsh.exe. +#%% voxel mesh +def voxelMesh(elec_x, elec_y, elec_z=None, elec_type = None, keep_files=True, + interp_method = 'triangulate', surface_refinement=None, + mesh_refinement=None, ball_refinement=True, + path='exe', dump=print, whole_space=False, model_err=False, + handle=None, show_output=True, **kwargs): + """ + Generates a voxel mesh, not meant to be used for ERT processing with the R* + codes but rather can be used for the purposes of mesh visualizuation post + processing, and is more readily exportable into formats required by + other geological software (e.g. Geovisionary). - Uses post processing after mesh generation to super impose topography on to - a flat 3D tetrahedral mesh. - Parameters ---------- elec_x: array like @@ -5419,60 +5758,51 @@ def tetraMeshOld(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, elec_type: list of strings, optional Defines if electrodes are buried or not. keep_files : boolean, optional - `True` if the gmsh input and output file is to be stored in the working directory. - interp_method: string, default ='bilinear' optional - Interpolation method to translate mesh nodes in the z direction. In other words the method in which topography - is appended to the mesh. Here the topography is added to the mesh in post processing. - The options documented in the notes. - if == 'idw': then provide search_radius. + Not used. Kept as an argument for compatiblity with TetraMesh. + interp_method: string, default ='triangulate' optional + Interpolation method to translate mesh nodes in the z direction. In + other words the method in which topography is appended to the mesh. + Here the topography is added to the mesh in post processing. + The options are documented below in the notes. surface_refinement : np.array, optional - Numpy array of shape (3,n), should follow the format np.array([x1,x2,x3,...],[y1,y2,y3,...],[z1,z2,z3,...]). - Allows for extra refinement for the top surface of the mesh. The points are not added to the mesh, but - considered in post processing in order to super impose topography on the mesh. + Numpy array of shape (3,n), should follow the format + np.array([x1,x2,x3,...],[y1,y2,y3,...],[z1,z2,z3,...]). + Allows for extra refinement for the top surface of the mesh. + The points are not added to the mesh, but considered in post processing + in order to super impose topography on the mesh. mesh_refinement : dict, pd.DataFrame, optional - Dataframe (or dict) contianing 'x', 'y', 'z', 'type' columns which describe points which can be used to refine the mesh, - unlike surface_refinement, this argument allows the user granular control over the refinement of mesh - elements. See further explanation in tetraMesh notes. - ball_refinement: boolean - If True, tells gmsh to add a 'ball' of refined mesh around electrodes. - add_voroni_refinement: boolean - If True then points are generated via creating voroni cells near to - around the electrodes to encourage extra refinement in the resulting - mesh. Works well for surveys that leverage arrays in a grid format. + Not used. Kept as an argument for compatiblity with TetraMesh. + ball_refinement: boolean, optional + Not used. Kept as an argument for compatiblity with TetraMesh. path : string, optional - Path to exe folder (leave default unless you know what you are doing). + Not used. Kept as an argument for compatiblity with TetraMesh. whole_space: boolean, optional - flag for if the problem should be treated as a whole space porblem, in which case - electrode type is ingored and all electrodes are buried in the middle of a large mesh. + Flag for if the problem should be treated as a whole space porblem, in + which case electrode type is ignored. + model_err: bool + If True, a flat mesh will be returned for the sake of estimating + forward modelling errors. dump : function, optional Function to which pass the output during mesh generation. `print()` is the default. - padding : float, optional - amount of % the fine mesh region will be extended beyond the extent of the electrode positions - search_radius: float, None, optional - Defines search radius used in the inverse distance weighting interpolation. - If None then no search radius will be used and all points will be considered in the interpolation. - handle : variable, optional - Will be assigned the output of 'Popen' in case the process needs to be - killed in the UI for instance. - show_output : boolean, optional - `True` if gmsh output is to be printed to console. - **kwargs : optional - Key word arguments to be passed to box_3d. - + **kwargs: dict + Keyword arguments to be passed to functions in gmshWrap.py. Pass cl=x + to force the voxel mesh characteristic length. + force_regular: bool, optional + If passed as True, then return voxel mesh will be made of elements which + are of the same size. + Returns ---------- mesh3d: class - + + Notes ---------- Possible arguments for interp_method: 'bilinear' : 4 known points are used to compute the equation of a plane in which the interpolated point lies. This method is reccomended if elevation data is organised in a regular grid. - 'idw' : Inverse distance weighting, interpolated points are assigned a - a z value which is a weighted average of all points in the - search raduis. This method works best for gentle topography. 'nearest' : Nearest neighbour interpolation. Z value at the interpolated point takes on the same Z value as the closest known point. This method can work well for dense elevation data, say in @@ -5498,8 +5828,12 @@ def tetraMeshOld(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, surface points, use 'buried' for buried points. 'cl': array like of characteristic lengths for each refinement point in the mesh. + """ #formalities + if elec_z is None: + elec_z = np.zeros_like(elec_x) + if len(elec_x) != len(elec_y): raise ValueError("mismatch in electrode x and y vector length, they should be equal") elif elec_type is not None: @@ -5511,18 +5845,18 @@ def tetraMeshOld(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, if len(elec_type)==check: print("all electrodes are surface electrodes, ignoring the electrode type") elec_type = None - avail_methods = ['bilinear','idw','nearest','spline','triangulate',None] + + avail_methods = ['bilinear','nearest','spline','triangulate',None] if interp_method not in avail_methods: raise NameError("'%s' is an unrecognised interpretation method"%interp_method) - if elec_z is not None and all(np.array(elec_z)==0): + + if all(np.array(elec_z)==0): + interp_method = None + + if whole_space: + warnings.warn('Voxel mesh is not yet fully tested for whole space problems') interp_method = None - if all(np.array(elec_y)==elec_y[0]): - add_voroni_refinement = False - # refinement won't work unless there is some change in the y direction - # check for repeated electrodes? - check4repeatNodes(elec_x,elec_y,elec_z,elec_type) - if surface_refinement is not None: surf_x = surface_refinement[:,0] surf_y = surface_refinement[:,1] @@ -5532,8 +5866,18 @@ def tetraMeshOld(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, surf_y = [] surf_z = [] + # setup electrodes + if elec_z is None: + elec_z = np.zeros_like(elec_x) + + # check for repeated electrodes? + check4repeatNodes(elec_x,elec_y,elec_z,elec_type) + + elec = np.c_[elec_x,elec_y,elec_z] + elec_cache = elec.copy() + rem_elec_idx = [] - if elec_type is not None: + if elec_type is not None and not whole_space: if not isinstance(elec_type,list): raise TypeError("'elec_type' argument should be of type 'list', got type %s"%str(type(elec_type))) elif len(elec_type) != len(elec_x): @@ -5547,8 +5891,6 @@ def tetraMeshOld(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, surf_elec_idx = [] bur_elec_idx = [] - if elec_z is None: - elec_z = np.zeros_like(elec_x) for i, key in enumerate(elec_type): if key == 'buried': bur_elec_x.append(elec_x[i]) @@ -5562,282 +5904,200 @@ def tetraMeshOld(elec_x,elec_y,elec_z=None, elec_type = None, keep_files=True, surf_elec_idx.append(i) if key == 'remote': rem_elec_idx.append(i) - #interpolate in order to normalise buried electrode elevations to 0 - x_interp = np.append(surf_elec_x,surf_x)#parameters to be interpolated with - y_interp = np.append(surf_elec_y,surf_y) - z_interp = np.append(surf_elec_z,surf_z) - elec_z = np.array(elec_z) - - if interp_method == 'triangulate': - # need to check the number of interpolation points is stable for triangulation - if len(surf_elec_x) == 4: - interp_method = 'bilinear' - elif len(surf_elec_x) < 4: - interp_method = 'idw' - - if len(bur_elec_x)>0: #if we have buried electrodes normalise their elevation to as if they are on a flat surface - dump('found buried electrodes') - if interp_method is None: - bur_elec_z_topo= np.zeros_like(bur_elec_idx) - elif interp_method == 'idw': - bur_elec_z_topo = interp.idw(bur_elec_x, bur_elec_y, x_interp, y_interp, z_interp,radius=search_radius)# use inverse distance weighting - elif interp_method == 'bilinear' or interp_method == None: # still need to normalise electrode depths if we want a flat mesh, so use biliner interpolation instead - bur_elec_z_topo = interp.interp2d(bur_elec_x, bur_elec_y, x_interp, y_interp, z_interp) - elif interp_method == 'nearest': - bur_elec_z_topo = interp.nearest(bur_elec_x, bur_elec_y, x_interp, y_interp, z_interp) - elif interp_method == 'spline': - bur_elec_z_topo = interp.interp2d(bur_elec_x, bur_elec_y, x_interp, y_interp, z_interp,method='spline') - elif interp_method == 'triangulate': - bur_elec_z_topo = interp.triangulate(bur_elec_x, bur_elec_y, x_interp, y_interp, z_interp) - - elec_z[bur_elec_idx] = elec_z[bur_elec_idx] - bur_elec_z_topo # normalise to zero surface - bur_elec_z = elec_z[bur_elec_idx] - bur_elec_z_topo - - elec_z[surf_elec_idx] = 0 - - else: + elec_cache[i,:] = -9999 + else: surf_elec_x = elec_x surf_elec_y = elec_y - if elec_z is None: - surf_elec_z = np.zeros_like(elec_x) - elec_z = np.zeros_like(elec_x) - else: - surf_elec_z = elec_z.copy() - elec_z = np.array(elec_z) - np.array(elec_z)#normalise elec_z + surf_elec_z = elec_z bur_elec_x = [] bur_elec_y = [] bur_elec_z = [] - x_interp = np.append(surf_elec_x,surf_x) - y_interp = np.append(surf_elec_y,surf_y) - z_interp = np.append(surf_elec_z,surf_z) - + #check if remeote electrodes present, and remove them if len(rem_elec_idx)>0: elec_x = np.delete(elec_x,rem_elec_idx) elec_y = np.delete(elec_y,rem_elec_idx) elec_z = np.delete(elec_z,rem_elec_idx) + elec = np.c_[elec_x,elec_y,elec_z] + + #interpolate in order to normalise buried electrode elevations to 0 + x_interp = np.append(surf_elec_x,surf_x)#parameters to be interpolated with + y_interp = np.append(surf_elec_y,surf_y) + z_interp = np.append(surf_elec_z,surf_z) + + if interp_method == 'triangulate': + # need to check the number of interpolation points is stable for triangulation + if len(x_interp) == 4: + interp_method = 'bilinear' + elif len(x_interp) < 4: + interp_method = 'nearest' + + if interp_method is None: + elec_z_topo = np.zeros_like(elec_x) # still need to normalise electrode depths if we want a flat mesh, so use biliner interpolation instead + elif interp_method == 'bilinear': + elec_z_topo = interp.interp2d(elec_x, elec_y, x_interp, y_interp, z_interp) + elif interp_method == 'nearest': + elec_z_topo = interp.nearest(elec_x, elec_y, x_interp, y_interp, z_interp) + elif interp_method == 'spline': + elec_z_topo = interp.interp2d(elec_x, elec_y, x_interp, y_interp, z_interp, method='spline') + elif interp_method == 'triangulate': + elec_z_topo = interp.triangulate(elec_x, elec_y, x_interp, y_interp, z_interp) - # check if mesh refinement present - if mesh_refinement is not None: - surf_rx = [] - surf_ry = [] - surf_rz = [] - surf_idx = [] - bur_rx = [] - bur_ry = [] - bur_rz = [] - bur_idx = [] - for i, key in enumerate(mesh_refinement['type']): - if key == 'buried': - bur_rx.append(mesh_refinement['x'][i]) - bur_ry.append(mesh_refinement['y'][i]) - bur_rz.append(mesh_refinement['z'][i]) - bur_idx.append(i) - if key == 'surface' or key=='electrode': - surf_rx.append(mesh_refinement['x'][i]) - surf_ry.append(mesh_refinement['y'][i]) - surf_rz.append(mesh_refinement['z'][i]) - surf_idx.append(i) - #interpolate in order to normalise buried electrode elevations to 0 - x_interp = np.append(x_interp,surf_rx)#parameters to be interpolated with - y_interp = np.append(y_interp,surf_ry) - z_interp = np.append(z_interp,surf_rz) - - #if we have buried points normalise their elevation to as if they are on a flat surface - if len(bur_rz)>0: - dump('found buried mesh refinement points') - if interp_method is None: - bur_rz_topo = np.zeros_like(bur_idx) - elif interp_method == 'idw': - bur_rz_topo = interp.idw(bur_rx, bur_ry, x_interp, y_interp, z_interp,radius=search_radius)# use inverse distance weighting - elif interp_method == 'bilinear' or interp_method == None: # still need to normalise electrode depths if we want a flat mesh, so use biliner interpolation instead - bur_rz_topo = interp.interp2d(bur_rx, bur_ry, x_interp, y_interp, z_interp) - elif interp_method == 'nearest': - bur_rz_topo = interp.nearest(bur_rx, bur_ry, x_interp, y_interp, z_interp) - elif interp_method == 'spline': - bur_rz_topo = interp.interp2d(bur_rx, bur_ry, x_interp, y_interp, z_interp,method='spline') - elif interp_method == 'triangulate': - bur_rz_topo = interp.triangulate(bur_rx, bur_ry, x_interp, y_interp, z_interp) - - rz = np.array(mesh_refinement['z']) - rz[surf_idx] = 0 - if len(bur_rz)>0: - rz[bur_idx] = rz[bur_idx] - bur_rz_topo # normalise to zero surface - - internal_mesh_refinement = {'x':mesh_refinement['x'], - 'y':mesh_refinement['y'], - 'z':rz} - if 'cl' in mesh_refinement.keys(): # pass individual characteristic lengths to box_3d - internal_mesh_refinement['cl'] = mesh_refinement['cl'] - - kwargs['mesh_refinement'] = internal_mesh_refinement # actual mesh refinement passed to box_3d - elif add_voroni_refinement: - if 'cl' in kwargs.keys(): - cl = kwargs['cl'] - else: - dist_sort = np.unique(gw.find_dist(elec_x,elec_y,elec_z)) - cl = dist_sort[1]/2 # characteristic length is 1/2 the minimum electrode distance - if 'cl_corner' in kwargs.keys(): - cl_corner = kwargs['cl_corner'] - else: - cl_corner = 3 - - vx = [] - vy = [] - vz = [] - vi = [] - if len(surf_elec_x) > 3: - vpoints = np.c_[surf_elec_x,surf_elec_y] - vor = Voronoi(vpoints) - tree = cKDTree(vor.vertices[:,0:2]) - nearby = tree.query_ball_tree(tree,cl*cl_corner) # find where points are within one - # cl*cl_corner raduis of each other. - - for i in range(len(nearby)): - near_idx = nearby[i] - # if point is clustered close to other refinement points it is - # is not needed, only first instance is kept. - for j in near_idx: - if mc.bisection_searchL(vi,j) == -1: - vx.append(vor.vertices[j,0]) - vy.append(vor.vertices[j,1]) - vz.append(0) - vi += near_idx - vi = sorted(vi) - break - - if len(bur_elec_x) > 3: - vpoints = np.c_[bur_elec_x, bur_elec_y, bur_elec_z] - # print(vpoints) - vor = Voronoi(vpoints) - tree = cKDTree(vor.vertices) - nearby = tree.query_ball_tree(tree,cl*cl_corner) - for i in range(len(nearby)): - near_idx = nearby[i] - # if point is clustered close to other refinement points it is - # is not needed, only first instance is kept. - for j in near_idx: - if mc.bisection_searchL(vi,j) == -1 and vor.vertices[j,2] < 0: - vx.append(vor.vertices[j,0]) - vy.append(vor.vertices[j,1]) - vz.append(vor.vertices[j,2]) - vi += near_idx - vi = sorted(vi) - break - - if len(vx) == 0: - internal_mesh_refinement = None - else: - internal_mesh_refinement = {'x':np.array(vx), - 'y':np.array(vy), - 'z':np.array(vz), - 'cl':np.full(len(vx),cl*cl_corner)} - kwargs['mesh_refinement'] = internal_mesh_refinement - else: - internal_mesh_refinement = None # then there will be no internal mesh refinement + ## mesh param + dp_len = np.max(findDist(elec_x, elec_y, elec_z)) + tree = cKDTree(elec) + idist,_ = tree.query(elec,2) - if ball_refinement: - kwargs['use_fields'] = True - - # remove these keyword arguments (very messy) - if 'ball_refinement' in kwargs: - del kwargs['ball_refinement'] - if 'add_veroni_refinement' in kwargs: - del kwargs['add_veroni_refinement'] + if 'cl' in kwargs.keys(): + cl = kwargs['cl'] + else: + cl = min(idist[:,1])/4 - # check directories - if path == "exe": - ewd = os.path.join( - os.path.dirname(os.path.realpath(__file__)), - path) + if 'fmd' in kwargs.keys() and kwargs['fmd'] is not None: # compute depth of investigation if not given + fmd = kwargs['fmd'] else: - ewd = path # points to the location of the .exe - # else its assumed a custom directory has been given to the gmsh.exe - - if not os.path.isfile(os.path.join(ewd,'gmsh.exe')) and not os.path.isfile(os.path.join(ewd,'gmsh_linux')): - raise Exception("No gmsh executable exists in the exe directory!") + fmd = dp_len/3 # maximum possible dipole length / 3 + if whole_space: + fmd = abs(max(elec_z) - min(elec_z))*1.1 - #make .geo file - file_name="mesh3d" - if whole_space:#by default create survey with topography - dump("Whole space problem") - raise Exception("Sorry whole space 3D problems are not implemented yet") + if 'cl_factor' in kwargs.keys() and kwargs['cl_factor'] is not None: + cl_factor = kwargs['cl_factor'] else: - node_pos = gw.box_3d([elec_x,elec_y,elec_z], file_path=file_name, **kwargs) - - # handling gmsh - runGmsh(ewd, file_name, show_output=show_output, dump=dump, threed=True, handle=handle) + cl_factor = 5 - #convert into mesh.dat - mesh_info = gw.mshParse(file_name+'.msh', debug=show_output) # read in 3D mesh file - - # merge fine with coarse regions - regions = np.array(mesh_info['parameters']) - for reg in np.unique(regions)[1:]: - ie = regions == reg - regions[ie] = reg - 1 - - mesh = Mesh(mesh_info['node_x'], # convert output of parser into an object - mesh_info['node_y'], - mesh_info['node_z'], - np.array(mesh_info['node_data']).T, - mesh_info['cell_type'], - mesh_info['original_file_path']) - - mesh.addAttribute(regions, 'region') - mesh.addAttribute(np.array(mesh_info['parameters']), 'gmsh_phys_entity') - - #mesh.write_dat(file_path='mesh.dat') # write mesh.dat - disabled as handled higher up in the R2 class - node_x = np.array(mesh.node[:,0]) - node_y = np.array(mesh.node[:,1]) - - if keep_files is False: - os.remove(file_name+".geo");os.remove(file_name+".msh") + if 'force_regular' in kwargs.keys(): + force_regular = kwargs['force_regular'] + else: + force_regular = False + + elec_z = elec_z - elec_z_topo + elec_z = np.round(elec_z,6) # nuke near zero values + + ## node generation algorithm + dump('Running voxel mesh node generation...') + # generate x - y plane first, will add topo later + ex = np.unique(elec_x).tolist() + ey = np.unique(elec_y).tolist() + ez = np.unique(elec_z).tolist() + ex = [ex[0] - cl*cl_factor] + ex + ex = ex + [ex[-1] + cl*cl_factor] + ey = [ey[0] - cl*cl_factor] + ey + ey = ey + [ey[-1] + cl*cl_factor] + ez = [max(ez) - fmd] + ez + + ## insert x values + xx = [] + x = min(ex) + for i in range(1,len(ex)): + while ex[i] > x: + x += cl + xx.append(x) + if not force_regular: + xx.append(ex[i]) + + dump('Generated %i unique nodes in X direction'%len(xx)) + + ## insert y values + yy = [] + y = min(ey) + for i in range(1,len(ey)): + while ey[i] > y: + y += cl + yy.append(y) + if not force_regular: + yy.append(ey[i]) + + dump('Generated %i unique nodes in Y direction'%len(yy)) + + ## insert z values + zz = [] + z = min(ez) + for i in range(1,len(ez)): + while ez[i] > z and (z + cl) <=0: + z += cl + zz.append(z) + if not force_regular: + zz.append(ez[i]) + + dump('Generated %i unique nodes in Z direction'%len(zz)) + + ## force unique sorting + xx = np.unique(xx) + yy = np.unique(yy) + zz = np.unique(zz) + + ## TODO could add nuemonn boundary here ?? + meshx, meshy, meshz = np.meshgrid(xx,yy,zz) + + # compress node arrays into columns + node = np.c_[meshx.flatten(),meshy.flatten(),meshz.flatten()] + numnp = node.shape[0] + + ## add topography back to nodes + if model_err: # dont add any topography to the mesh in the case of modelling errors + interp_method = None - dump('interpolating topography onto mesh using %s interpolation...'%interp_method) - #using home grown functions to interpolate / extrapolate topography on mesh - if interp_method == 'idw': - nodez = interp.idw(node_x, node_y, x_interp, y_interp, z_interp,radius=search_radius)# use inverse distance weighting - elif interp_method == 'bilinear':# interpolate on a irregular grid, extrapolates the unknown coordinates - nodez = interp.interp2d(node_x, node_y, x_interp, y_interp, z_interp) + if interp_method == 'bilinear':# interpolate on a irregular grid, extrapolates the unknown coordinates + mesh_z_topo = interp.interp2d(node[:,0], node[:,1], x_interp, y_interp, z_interp) elif interp_method == 'nearest': - nodez = interp.nearest(node_x, node_y, x_interp, y_interp, z_interp, num_threads=ncores) + mesh_z_topo = interp.nearest(node[:,0], node[:,1], x_interp, y_interp, z_interp) elif interp_method == 'spline': - nodez = interp.interp2d(node_x, node_y, x_interp, y_interp, z_interp,method='spline') + mesh_z_topo = interp.interp2d(node[:,0], node[:,1], x_interp, y_interp, z_interp,method='spline') elif interp_method == 'triangulate': - nodez = interp.triangulate(node_x, node_y, x_interp, y_interp, z_interp) + mesh_z_topo = interp.triangulate(node[:,0], node[:,1], x_interp, y_interp, z_interp) elif interp_method == None: - nodez = np.zeros_like(node_x,dtype=float) + mesh_z_topo = np.zeros_like(node[:,0],dtype=float) + node[:,2] += mesh_z_topo + + ## generate elements + # map the 8 nodes surrounding every element + nid = np.arange(numnp) + numel = (len(xx)-1)*(len(yy)-1)*(len(zz)-1) + nmesh = nid.reshape(meshx.shape) # node mesh + connec = np.zeros((numel,8),dtype=int)-1 + + ii = 0 + for i in range(nmesh.shape[0]-1): + for j in range(nmesh.shape[1]-1): + for k in range(nmesh.shape[2]-1): + connec[ii,0] = nmesh[i,j,k] + connec[ii,1] = nmesh[i+1,j,k] + connec[ii,2] = nmesh[i,j+1,k] + connec[ii,3] = nmesh[i+1,j+1,k] + connec[ii,4] = nmesh[i,j,k+1] + connec[ii,5] = nmesh[i+1,j,k+1] + connec[ii,6] = nmesh[i,j+1,k+1] + connec[ii,7] = nmesh[i+1,j+1,k+1] + ii += 1 + + dump('Mesh consists of %i nodes and %i elements'%(numnp,numel)) - mesh.node[:,2] = mesh.node[:,2] + nodez - #need to recompute cell centres as well as they will have changed. - mesh.cellCentres() - - #check if remeote electrodes present, and insert them into the node position array - if len(rem_elec_idx)>0: - rem_node_bool = min(node_x) == node_x #& (min(node_y) == node_y) & (min(node_z) == node_z) - rem_node = np.argwhere(rem_node_bool == True)[0][0] - #node_pos = np.insert(node_pos,np.array(rem_elec_idx),[rem_node]*len(rem_elec_idx),axis=0) - # insert node position in to electrode node array - node_pos_tmp = [] # temporary node position array - iremote = [False]*len(elec_type) - c = 0 - for i, key in enumerate(elec_type): - if key == 'remote': - node_pos_tmp.append(rem_node+1) - iremote[i] = True - else: - node_pos_tmp.append(node_pos[c]) - c+=1 - node_pos = np.array(node_pos_tmp,dtype=int) # redefine node positioning - mesh.setElecNode(node_pos-1,np.array(iremote,dtype=bool)) - else: - #add nodes to mesh - mesh.setElecNode(node_pos-1)#in python indexing starts at 0, in gmsh it starts at 1 + ## map electrodes to nodes + tree = cKDTree(node) + _, enodes = tree.query(elec_cache) - return mesh - + ## make mesh class + mesh = Mesh(node[:,0], node[:,1], node[:,2], + connec, + cell_type=[11], + original_file_path='N/A', + order_nodes=False) + + # add electrode nodes + iremote = np.array([False]*elec_cache.shape[0],dtype=bool) + for i in rem_elec_idx: + iremote[i] = True + + mesh.setElecNode(enodes, iremote) + mesh.elec_type = elec_type + + #set the number of voxels in the xyz directions + mesh.nvoxel['x'] = len(xx)-1 + mesh.nvoxel['y'] = len(yy)-1 + mesh.nvoxel['z'] = len(zz)-1 + + return mesh #%% column mesh @@ -6080,10 +6340,6 @@ def tankMesh(elec=None, return mesh -#%% voxel mesh -def voxelMesh(elec_x,elec_y,elec_z=None,elec_type=None): - pass - #%% ciruclar mesh (TODO) def circularMesh(): # TODO diff --git a/src/resipy/parsers.py b/src/resipy/parsers.py index 94042fa3d91a7b690e4a3102112be2ff2f6095c5..bf994d3756b383782eeba93b9c795e419786c0a3 100644 --- a/src/resipy/parsers.py +++ b/src/resipy/parsers.py @@ -485,6 +485,13 @@ def primeParserTab(fname, espacing=1): """ Parses data from a PRIME file with the .tab extension - jamyd91 Also works for the ResIMGR system. + + Parameters + ---------- + fname: str + File name (or path) of PRIME / ResIMGR file + espacing: int, float, optional + Electrode spacing (if no geometry given) """ fh = open(fname,'r') diff --git a/src/resipy/r2help.py b/src/resipy/r2help.py index acc16fe90275006acac2df6ca5f04261e56f444b..4cfd5ea4b25589f814fde87b69498ebb98f0de28 100644 --- a/src/resipy/r2help.py +++ b/src/resipy/r2help.py @@ -12,6 +12,7 @@ r2help = { 'singular_type' : "

Warning: Note that singularity removal can only be applied is (a) the boundaries are infinite (far away from the region of interest) and (b) the z=0 plane defines the upper boundary (so a flat mesh). This is because the singularity remove uses the analytical solution to remove infinite potential around the electrode. If these two conditions applied, removing the singularity will make the forward computation more accurate.

", 'inverse_type' : "

inverse_type is 0 for pseudo-Marquardt solution or 1 for regularised solution with linear filter (default) or 2 for regularised type with quadratic filter or 3 for qualitative solution or 4 for blocked linear regularised type.

", 'target_decrease': "

target_decrease is a real number which allows the user to specify the relative reduction of misfit in each iteration. A value of 0.25 will mean that R2 will aim to drop the misfit by 25% (and no more) of the value at the start of the iteration. This allows a slower progression of the inversion, which can often result in a better convergence. If you set target_decrease to 0.0 then R2 will try to achieve the maximum reduction in misfit in the iteration (default).

", +'baseline_target_decrease': "

baseline_target_decrease is a real number which allows the user to specify the relative reduction of misfit in each iteration. A value of 0.25 will mean that R2 will aim to drop the misfit by 25% (and no more) of the value at the start of the iteration. This allows a slower progression of the inversion, which can often result in a better convergence. If you set target_decrease to 0.0 then R2 will try to achieve the maximum reduction in misfit in the iteration (default).This option specifically allows the user to set the baseline target decrease value to be different for the baseline survey during a timelapse inversion (can prevent over damping of the baseline inversion in some cases). By default the same target decrease value is used for all timesteps.

", 'qual_code' : "

qual_ratio is 0 for qualitative comparison with forward solution, i.e. only when one observed data set is available, or qual_ratio is 1 if the observed data in protocol.dat contains a ratio of two datasets.

", 'scale' : "

scale is a scaling factor for the mesh coordinates. This is usually 1.0 but if a standardised mesh is used, say for a unit circle, then this scaling factor is useful to adjust the mesh for a specific problem. Set scale=1 if you do not wish to change the coordinates of the mesh defined in mesh.dat (default)

", 'num_regions' : "

num_regions is number of resistivity regions that will be specified either as starting condition for inverse solution or actual model for forward solution. The term “region” has no significance in the inversion – it is just a means of inputting a non-uniform resistivity as a starting model for inversion or for forward calculation.

", diff --git a/src/ui.py b/src/ui.py index 7ce5d3eafea911832c85934bb6a61d3dd3e2159b..16dae7b33848e943fc00f23330436abee974bd6a 100644 --- a/src/ui.py +++ b/src/ui.py @@ -19,7 +19,7 @@ from PyQt5.QtWidgets import (QMainWindow, QSplashScreen, QApplication, QPushButt QTabWidget, QVBoxLayout, QGridLayout, QLabel, QLineEdit, QMessageBox, QSplitter, QFileDialog, QCheckBox, QComboBox, QTextEdit, QSlider, QHBoxLayout, QFrame, QTableWidget, QFormLayout, QTableWidgetItem, QHeaderView, QProgressBar, QDialog, - QStackedLayout, QRadioButton, QGroupBox, QTextBrowser, QMenu)#, QAction, qApp, QButtonGroup, QListWidget, QShortcut) + QStackedLayout, QRadioButton, QGroupBox, QTextBrowser, QMenu, QSpacerItem)#, QAction, qApp, QButtonGroup, QListWidget, QShortcut) from PyQt5.QtGui import QIcon, QPixmap, QIntValidator, QDoubleValidator, QColor, QPalette#, QKeySequence from PyQt5.QtCore import QThread, pyqtSignal, QTimer, QUrl, QObject#, QProcess#, QSize from PyQt5.QtCore import Qt @@ -590,8 +590,8 @@ class App(QMainWindow): self.writeLog('k.typ = {:s}'.format(self.project.typ)) # importing tab self.elecDx2DTape.show() - self.elecTable.setColumnHidden(2, True) - self.topoTable.setColumnHidden(2, True) + # self.elecTable.setColumnHidden(2, True) + # self.topoTable.setColumnHidden(2, True) self.regular3DCheck.setChecked(False) self.pseudo3DCheck.setVisible(True) if pvfound: @@ -653,6 +653,7 @@ class App(QMainWindow): self.doiSensCheck.setVisible(True) self.sensWidget.setVisible(True) show3DInvOptions(False) + show2DInvOptions(True) # post-processing self.errorGraphs.setTabEnabled(0, True) @@ -667,8 +668,8 @@ class App(QMainWindow): self.elecDx2DTape.hide() self.elecLineEdit.setEnabled(True) self.elecLineSpacingEdit.setEnabled(True) - self.elecTable.setColumnHidden(2, False) - self.topoTable.setColumnHidden(2, False) + # self.elecTable.setColumnHidden(2, False) + # self.topoTable.setColumnHidden(2, False) if self.project is not None: if self.project.elec is not None: self.elecTable.initTable(self.project.elec) @@ -728,6 +729,7 @@ class App(QMainWindow): self.doiSensCheck.setVisible(False) self.sensWidget.setVisible(False) show3DInvOptions(True) + show2DInvOptions(False) # post-processing self.errorGraphs.setTabEnabled(0, False) @@ -782,6 +784,8 @@ class App(QMainWindow): self.batchCheck.setEnabled(False) self.pseudo3DCheck.setEnabled(False) self.pseudo3DCheck.setChecked(False) + self.base_target_decrease.setVisible(True) + self.base_target_decreaseLabel.setVisible(True) else: self.iTimeLapse = False if self.project is not None: @@ -792,6 +796,8 @@ class App(QMainWindow): self.importDataBtn.clicked.connect(importDataBtnFunc) self.batchCheck.setEnabled(True) self.pseudo3DCheck.setEnabled(True) + self.base_target_decrease.setVisible(False) + self.base_target_decreaseLabel.setVisible(False) self.timeLapseCheck = QCheckBox('Time-lapse Survey') self.timeLapseCheck.stateChanged.connect(timeLapseCheckFunc) @@ -857,7 +863,7 @@ class App(QMainWindow): self.pseudoLayout.setCurrentIndex(1) self.elecLineEdit.setEnabled(True) self.elecLineSpacingEdit.setEnabled(True) - self.elecTable.setColumnHidden(2, False) + # self.elecTable.setColumnHidden(2, False) self.topoTable.hide() # we can't add extra topo points in here, we don't know which mesh they belong to self.regionTable.hide() # we can't add regions at this level - future: set/design/create individual 2D meshes then create a pseudo 3D mesh self.topoBtn.hide() @@ -885,7 +891,7 @@ class App(QMainWindow): self.pseudoLayout.setCurrentIndex(0) self.elecLineEdit.setEnabled(False) self.elecLineSpacingEdit.setEnabled(False) - self.elecTable.setColumnHidden(2, True) + # self.elecTable.setColumnHidden(2, True) self.topoTable.show() self.regionTable.show() self.topoBtn.show() @@ -942,7 +948,7 @@ class App(QMainWindow): self.pseudo3DCheck.setEnabled(False) self.pseudo3DCheck.setChecked(False) self.tabImporting.setTabEnabled(2,False) # no custom parser needed - self.localGrid.setEnabled(False) + # self.localGrid.setEnabled(False) if self.loadedProjectFlag is False: # loading a project doesn't need a restart self.restartFunc() # let's first from previous inversion self.nbElecEdit.setEnabled(True) @@ -971,7 +977,7 @@ class App(QMainWindow): self.tabImporting.setTabEnabled(2,True) self.batchCheck.setEnabled(True) self.pseudo3DCheck.setEnabled(True) - self.localGrid.setEnabled(True) + # self.localGrid.setEnabled(True) self.timeLapseCheck.setChecked(False) # not checked by default self.batchCheck.setChecked(False) # not checked by default self.activateTabs(False) @@ -1009,8 +1015,10 @@ class App(QMainWindow): self.ftype = 'ProtocolDC' # by default self.fformat = 'DAT (Tab delimited) (*.dat)' # default + self.iMerged = False # using the merged data format (by default is False) def ftypeComboFunc(index): + self.iMerged = False if index == 0: self.ftype = 'ProtocolDC' self.fformat = 'DAT (Tab delimited) (*.dat *.DAT)' @@ -1046,10 +1054,14 @@ class App(QMainWindow): self.fformat = 'srv (*.srv *.SRV)' elif index == 11: self.ftype = 'DAS-1' - self.fformat = 'Data (*.dat *.data *.DAT *.DATA *.txt)' + self.fformat = 'Data (*.dat *.data *.DAT *.DATA *.txt *.TXT)' elif index == 12: self.ftype = 'Custom' self.tabImporting.setCurrentIndex(2) # switch to the custom parser + elif index == 13: + self.ftype = 'Merged' + self.fformat = 'Files (*.csv *.CSV *.txt *.TXT)' + self.iMerged = True else: self.ftype = '' # let to be guessed self.ftypeComboLabel = QLabel('File format:') @@ -1068,6 +1080,7 @@ class App(QMainWindow): self.ftypeCombo.addItem('E4D') self.ftypeCombo.addItem('DAS-1') self.ftypeCombo.addItem('Custom') + self.ftypeCombo.addItem('Merged') self.ftypeCombo.activated.connect(ftypeComboFunc) self.ftypeCombo.setFixedWidth(150) self.ftypeCombo.setToolTip('Select data format.') @@ -1079,8 +1092,18 @@ class App(QMainWindow): self.spacingEdit.setToolTip('Electrode spacing.') def getdir(): - fnames, _ = QFileDialog.getOpenFileNames(self.tabImportingData, 'Select file(s)', self.datadir, self.fformat) - # fdir = QFileDialog.getExistingDirectory(self.tabImportingData, 'Choose the directory containing the data', directory=self.datadir) + if self.iMerged: # special case where files are listed in a csv file + fnames, _ = QFileDialog.getOpenFileName(self.tabImportingData,'Open File', + self.datadir, self.fformat) + if fnames == '': + return + else: + fnames, _ = QFileDialog.getOpenFileNames(self.tabImportingData, 'Select file(s)', + self.datadir, self.fformat) + if len(fnames) == 0: + return + # fdir = QFileDialog.getExistingDirectory(self.tabImportingData, + # 'Choose the directory containing the data', directory=self.datadir) if fnames != []: fdir = os.path.dirname(fnames[0]) @@ -1088,7 +1111,25 @@ class App(QMainWindow): self.datadir = os.path.dirname(fdir) try: self.loadingWidget('Loading data, please wait...', False) - if self.project.iBatch is False: + if self.iMerged: + self.timeLapseCheck.stateChanged.disconnect() # disconnect timelapse checker + # self.pseudo3DCheck.stateChanged.disconnect() # might need to disconnect pseudo3d checker too + self.project.createMergedSurveys(fnames, ftype=self.ftype, dump=self.infoDump) + self.writeLog('k.createMergedSurveys({:s}, ftype="{:s}")'.format(str(fnames), self.ftype)) + self.iTimeLapse = self.project.iTimeLapse + if self.iTimeLapse: + self.infoDump('Merged time-lapse survey created.') + self.timeLapseCheck.setChecked(True) + else: + self.infoDump('Merged survey created.') + self.timeLapseCheck.setChecked(False) + self.batchCheck.setEnabled(False) + self.pseudo3DCheck.setEnabled(False) + self.pseudo3DCheck.setChecked(False) + # reconnect timelapse/pseudo3d functions + self.timeLapseCheck.stateChanged.connect(timeLapseCheckFunc) + # self.pseudo3DCheck.stateChanged.connect(pseudo3DFunc) + elif self.iTimeLapse: if len(fnames) < 2: self.errorDump('at least two files needed for timelapse.') return @@ -1155,6 +1196,9 @@ class App(QMainWindow): def importDataBtnFunc(): + if self.iMerged: # if special case of getting a merged file use get dir function instead + getdir() + return pdebug('importDataBtnFunc: ftype=', self.ftype) fname, _ = QFileDialog.getOpenFileName(self.tabImportingData,'Open File', self.datadir, self.fformat) if fname != '': @@ -1414,9 +1458,11 @@ class App(QMainWindow): pdebug('ipCheckFunc: mode =', self.project.typ) self.ipCheck = QCheckBox('Induced Polarization') + # self.ipCheckLabel = QLabel('Induced Polarization') self.ipCheck.stateChanged.connect(ipCheckFunc) self.ipCheck.setEnabled(False) self.ipCheck.setToolTip('Check if you have IP data or want IP forward modeling') + # self.ipCheckLabel.setToolTip('Check if you have IP data or want IP forward modeling') self.fnamesComboLabel = QLabel('Choose a dataset to plot:') self.fnamesComboLabel.hide() @@ -1579,6 +1625,10 @@ class App(QMainWindow): self.hbox5 = QHBoxLayout() self.hbox5.setAlignment(Qt.AlignRight) + # self.ipboxcheck = QHBoxLayout() + # self.ipboxcheck.addWidget(self.ipCheckLabel) + # self.ipboxcheck.addWidget(self.ipCheck) + # self.hbox5.addWidget(self.ipCheckLabel, alignment=Qt.AlignLeft) self.hbox5.addWidget(self.ipCheck, Qt.AlignLeft) self.hbox5.addWidget(self.mergElecCheck) self.hbox5.addWidget(self.psContourCheck) @@ -1701,7 +1751,7 @@ class App(QMainWindow): self.setTable(tt, c0, r0) def initTable(self, tt): - pdebug('elecTable.initTable():', tt) + pdebug('elecTable.initTable():\n', tt) self.clear() # this clears out the headers as well self.nrow = tt.shape[0] print(self.nrow) @@ -1717,7 +1767,7 @@ class App(QMainWindow): def setTable(self, tt, c0=0, r0=0): if type(tt) == type(pd.DataFrame()): tt = tt[['label','x','y','z']].values - pdebug('elecTable.setTable():', self.nrow, self.ncol, tt.shape) + pdebug('elecTable.setTable():\n', self.nrow, self.ncol, tt.shape) nanFlag = False # to inform the user that their topography is messed up! for i in range(c0, min([self.ncol, c0+tt.shape[1]])): for j in range(r0, min([self.nrow, r0+tt.shape[0]])): @@ -1847,7 +1897,7 @@ class App(QMainWindow): self.elecTable = ElecTable(parent=self) - self.elecTable.setColumnHidden(2, True) + # self.elecTable.setColumnHidden(2, True) self.elecLabelTextP1 = 'Add electrode position. Use Ctrl+V to paste or import from CSV with headers matching: label,x,y,z,buried.' \ 'The last column (buried) is 1 if checked (= buried electrode) and 0 if not (=surface electrode).' \ 'You can also use the form below to generate ' \ @@ -1857,6 +1907,18 @@ class App(QMainWindow): self.elecLabel.setWordWrap(True) def importElecBtnFunc(): + self.localCoordCheck.setChecked(False) # force the local grid back to default + self.localCoordLabel.setText('Convert to local grid') + self.project.coordLocal = False + self.project.coordParam = {'x0':None, 'y0':None, 'a':None} + if self.pseudo3DCheck.isChecked(): # don't want to do local coordinate conversion for pseudo 3D + self.localCoordCheck.setEnabled(False) + self.localCoordLabel.setText('Convert to local grid') + else: + self.localCoordCheck.setEnabled(True) + self.localCoordLabel.setText('Convert to local grid') + self.project.elec = None # clear project electrodes + fname, _ = QFileDialog.getOpenFileName(self.tabImportingTopo, 'Open File', self.datadir, @@ -1868,32 +1930,98 @@ class App(QMainWindow): nbElec = None self.elecTable.readTable(fname, nbElec=nbElec) self.writeLog('k.importElec("{:s}")'.format(fname)) + self.importElecBtn = QPushButton('Import from CSV files with headers: label (or line, number), x, y, z, buried') self.importElecBtn.setAutoDefault(True) self.importElecBtn.clicked.connect(importElecBtnFunc) - def convertLocalGrid(state): - self.updateElec() + # def convertLocalGrid(state): + # self.updateElec() + # if state == Qt.Checked: + # self.elecBackUp3 = self.project.elec.copy() # backing up electrodes and surveys if checkbox is unchecked + # self.surveysBackUp3 = self.project.surveys.copy() + # self.project.convertLocalGrid() + # self.infoDump('The grid is converted to local') + # else: + # self.project.elec = self.elecBackUp3.copy() # backing up electrodes and surveys if checkbox is unchecked + # self.project.surveys = self.surveysBackUp3.copy() + # self.infoDump('The grid is reverted to the original state') + + # self.elecTable.initTable(self.project.elec) + # self.tempElec = None + # self.nbElecEdit.setText(str(self.project.elec.shape[0])) + # self.elecDxEdit.setText('{:.2f}'.format(np.diff(self.project.elec[~self.project.elec['remote']]['x'].values[:2])[0])) + # self.updateElec() + + # self.localGrid = QCheckBox('Local grid') + # self.localGrid.setToolTip('Converts UTM coordinates to local grid for mesh stability') + # self.localGrid.stateChanged.connect(convertLocalGrid) + # self.localGrid.setEnabled(False) + + ## convert coordinates to a local grid if needed + def applyCoordinateConv(state): + if self.project.elec is None: + # updates the electrodes from the UI table into the project class + self.updateElec() + x0t = self.localRefX.text() + y0t = self.localRefY.text() + at = self.localAngle.text() + if x0t == '': + x0 = None + else: + x0 = float(x0t) + if y0t == '': + y0 = None + else: + y0 = float(y0t) + if at == '': + a = None + else: + a = float(at) if state == Qt.Checked: - self.elecBackUp3 = self.project.elec.copy() # backing up electrodes and surveys if checkbox is unchecked - self.surveysBackUp3 = self.project.surveys.copy() - self.project.convertLocalGrid() + self.project.setCoordConv(True, x0, y0, a) self.infoDump('The grid is converted to local') + self.writeLog('k.setCoordConv(True, {:}, {:}, {:})'.format(x0,y0,a)) else: - self.project.elec = self.elecBackUp3.copy() # backing up electrodes and surveys if checkbox is unchecked - self.project.surveys = self.surveysBackUp3.copy() + self.project.setCoordConv(False, x0, y0, a) self.infoDump('The grid is reverted to the original state') - - self.elecTable.initTable(self.project.elec) - self.tempElec = None - self.nbElecEdit.setText(str(self.project.elec.shape[0])) - self.elecDxEdit.setText('{:.2f}'.format(np.diff(self.project.elec[~self.project.elec['remote']]['x'].values[:2])[0])) - self.updateElec() - - self.localGrid = QCheckBox('Local grid') - self.localGrid.setToolTip('Converts UTM coordinates to local grid for mesh stability') - self.localGrid.stateChanged.connect(convertLocalGrid) - # self.localGrid.setEnabled(False) + self.writeLog('k.setCoordConv(True, {:}, {:}, {:})'.format(x0,y0,a)) + + coordParam = self.project.coordParam + self.localRefX.setText(str(coordParam['x0'])) + self.localRefY.setText(str(coordParam['y0'])) + self.localAngle.setText(str(coordParam['a'])) + + self.elecTable.setTable(self.project.elec) # update the electrode table + # self.nbElecEdit.setText(str(self.project.elec.shape[0])) + # self.elecDxEdit.setText('{:.2f}'.format(np.diff(self.project.elec[~self.project.elec['remote']]['x'].values[:2])[0])) + + + self.localCoordLabel = QLabel('Convert to local grid') + self.localCoordCheck = QCheckBox('\t\t\t\t') + self.localCoordCheck.setToolTip('Converts UTM / National Grid coordinates to local grid for solution stability (not available for Pseudo 3D)') + self.localCoordLabel.setToolTip('Converts UTM / National Grid coordinates to local grid for solution stability (not available for Pseudo 3D)') + self.localCoordCheck.stateChanged.connect(applyCoordinateConv) + self.localCoordCheck.setEnabled(False) + + self.localRefX = QLineEdit() + self.localRefX.setValidator(QDoubleValidator()) + self.localRefX.setEnabled(True) + self.localRefXLabel = QLabel('Reference X coordinate:') + self.localRefX.setToolTip('Sets reference X coordinate (in UTM or National Grid), by default minimum electrode X coordinate is taken') + + self.localRefY = QLineEdit() + self.localRefY.setValidator(QDoubleValidator()) + self.localRefY.setEnabled(True) + self.localRefYLabel = QLabel('Reference Y coordinate:') + self.localRefY.setToolTip('Sets reference Y coordinate (in UTM or National Grid), by default minimum electrode Y coordinate is taken') + + self.localAngle = QLineEdit() + self.localAngle.setValidator(QDoubleValidator()) + self.localAngle.setEnabled(True) + self.localAngleLabel = QLabel('Rotation Angle (Degrees):') + self.localAngle.setToolTip('Rotation angle in degrees, in 2D this is computed automatically') + self.localAngleLabel.setToolTip('Rotation angle in degrees, in 2D this is computed automatically') self.nbElecEdit = QLineEdit() self.nbElecEdit.setValidator(QDoubleValidator()) @@ -1969,12 +2097,13 @@ class App(QMainWindow): self.elecGenButton.clicked.connect(elecGenButtonFunc) self.topoTable = ElecTable(selfInit=True, parent=self) - self.topoTable.setColumnHidden(2, True) # Y + self.topoTable.setColumnHidden(2, False) # Y self.topoTable.setColumnHidden(0, True) # elec label self.topoTable.setColumnHidden(4, True) # buried topoLabel = QLabel('Add additional surface points. \ You can use Ctrl+V to paste directly \ - into a cell.') + into a cell. If using a local grid, then \ + coordinates will be internally translated.') def topoBtnFunc(): fname, _ = QFileDialog.getOpenFileName(self.tabImportingTopo,'Open File', directory=self.datadir) @@ -1996,17 +2125,16 @@ class App(QMainWindow): 'the Z coordinates of the electrodes using ' 'linear interpolation.') - # layout self.topoLayout = QVBoxLayout() - + # row with electrode generation parameters self.elecGenLayout = QHBoxLayout() self.elecGenLayout.addWidget(self.nbElecLabel) self.elecGenLayout.addWidget(self.nbElecEdit) self.elecGenLayout.addWidget(self.elecDxLabel) self.elecGenLayout.addWidget(self.elecDxEdit) self.elecGenLayout.addWidget(self.elecDx2DTape) - self.elecGenLayout.addWidget(self.localGrid) + # self.elecGenLayout.addWidget(self.localGrid) self.elecGenLayout.addWidget(self.elecDzLabel) self.elecGenLayout.addWidget(self.elecDzEdit) self.elecGenLayout.addWidget(self.elecLineLabel) @@ -2014,8 +2142,20 @@ class App(QMainWindow): self.elecGenLayout.addWidget(self.elecLineSpacingLabel) self.elecGenLayout.addWidget(self.elecLineSpacingEdit) self.elecGenLayout.addWidget(self.elecGenButton) + # row with coordinate conversion parameters + self.coordConvLayout = QHBoxLayout() + self.coordConvLayout.addWidget(self.localCoordLabel) + self.coordConvLayout.addWidget(self.localCoordCheck) + self.coordConvLayout.addWidget(self.localRefXLabel) + self.coordConvLayout.addWidget(self.localRefX) + self.coordConvLayout.addWidget(self.localRefYLabel) + self.coordConvLayout.addWidget(self.localRefY) + self.coordConvLayout.addWidget(self.localAngleLabel) + self.coordConvLayout.addWidget(self.localAngle) + self.topoLayout.addWidget(self.elecLabel) self.topoLayout.addLayout(self.elecGenLayout) + self.topoLayout.addLayout(self.coordConvLayout) self.topoLayout.addWidget(self.importElecBtn) self.topoLayout.addWidget(self.elecTable) @@ -5060,7 +5200,23 @@ combination of multiple sequence is accepted as well as importing a custom seque self.target_decrease.setText('0') self.target_decrease.editingFinished.connect(target_decreaseFunc) invForm.addRow(self.target_decreaseLabel, self.target_decrease) - + + def base_target_decreaseFunc(): + if self.target_decrease.text() == '': + a = self.project.param['target_decrease'] + else: + a = float(self.base_target_decrease.text()) + self.project.param['baseline_target_decrease'] = a + self.writeLog('k.param["baseline_target_decrease"] = {:.2f}'.format(a)) + self.base_target_decreaseLabel = QLabel('Baseline target decrease:') + self.base_target_decreaseLabel.linkActivated.connect(showHelp) + self.base_target_decrease = QLineEdit() + self.base_target_decrease.setValidator(QDoubleValidator()) + # self.base_target_decrease.setText() + self.base_target_decrease.editingFinished.connect(base_target_decreaseFunc) + invForm.addRow(self.base_target_decreaseLabel, self.base_target_decrease) + self.base_target_decrease.setVisible(False) + self.base_target_decreaseLabel.setVisible(False) def data_typeFunc(index): self.project.param['data_type'] = index @@ -5077,7 +5233,7 @@ combination of multiple sequence is accepted as well as importing a custom seque def reg_modeFunc(index): self.project.param['reg_mode'] = index self.writeLog('k.param["reg_mode"] = {:d}'.format(index)) - if int(index) == 1: # enable qedit for alpha_s (as only relevant to timelapse) + if int(index) == 1: # enable qedit for alpha_s (as only relevant to baseline constrained timelapse) self.alpha_sLabel.setVisible(True) self.alpha_s.setVisible(True) else: @@ -5821,43 +5977,13 @@ combination of multiple sequence is accepted as well as importing a custom seque self.aspectCheck.stateChanged.connect(aspectCheckFunc) self.aspectCheck.setToolTip('Check for equal aspect of the axis' '\nUncheck for auto aspect.') - - def saveBtnFunc(): - fdir = QFileDialog.getExistingDirectory(self.tabImportingData, 'Choose the directory to export graphs and .vtk', directory=self.datadir) - if fdir != '': - self.loadingWidget('Saving data...') - if self.project.typ[-1] == '2': - edge_color = self.displayParams['edge_color'] - sens = self.displayParams['sens'] - sensPrc = self.displayParams['sensPrc'] - attr = self.displayParams['attr'] - contour = self.displayParams['contour'] - clipCorners = self.displayParams['clipCorners'] - vmin = self.displayParams['vmin'] - vmax = self.displayParams['vmax'] - cmap = self.displayParams['cmap'] - self.project.saveInvPlots(outputdir=fdir, edge_color=edge_color, - contour=contour, sens=sens, attr=attr, - vmin=vmin, vmax=vmax, color_map=cmap, - sensPrc=sensPrc, clipCorners=clipCorners) - self.writeLog('k.saveInvPlots(outputdir="{:s}", edge_color="{:s}",' - ' contour={:s}, sens={:s}, attr="{:s}", vmin={:s},' - ' vmax={:s}, color_map="{:s}", sensPrc={:.2f})'.format( - fdir, edge_color, str(contour), str(sens), attr, - str(vmin), str(vmax), cmap, sensPrc)) - if self.pseudo3DCheck.isChecked(): - fname = os.path.join(fdir, 'Pseudo_3D_result.png') - self.vtkWidget.screenshot(fname, transparent_background=True) - self.project.saveVtks(fdir) - self.writeLog('k.saveVtks("{:s}")'.format(fdir)) - self.project.saveData(fdir) - self.writeLog('k.saveData("{:s}")'.format(fdir)) - self.loadingWidget(exitflag=True) - self.infoDump('All data and graphs saved successfully!') - self.saveBtn = QPushButton('Save Data') - self.saveBtn.clicked.connect(saveBtnFunc) - self.saveBtn.setToolTip('Save current graph to the working directory.') + # short cut to export tab + def change2ExportTab(): + self.tabs.setCurrentIndex(6) + self.errorGraphs.setCurrentIndex(2) + self.exportShortCut = QPushButton('Export') + self.exportShortCut.clicked.connect(change2ExportTab) # 3D specific options for pyvista self.pvthreshLabel = QLabel('Threshold:') @@ -5997,40 +6123,71 @@ combination of multiple sequence is accepted as well as importing a custom seque self.pvapplyBtn.setToolTip('Apply 3D options') def screenshotBtnFunc(): - fname, _ = QFileDialog.getSaveFileName(self, 'Open File', self.datadir, + fname, exttype = QFileDialog.getSaveFileName(self, 'Open File', self.datadir, 'PNG (*.png);;TIFF (*.tif);;JPEG (*.jpg)') - if fname != '': - if fname[-3:] == 'jpg': - transparent_background=False + ext = exttype.split()[0].lower() + + if fname == '': + return + + if not fname.lower().endswith(ext): + fname += '.' + fname += ext + + if fname.lower().endswith('.jpg'): + transparent=False + else: + transparent=True + + idx_cache = self.displayParams['index'] + ext = fname.split('.')[-1] + nmesh = len(self.project.meshResults) + if self.timelapseScreenshotCheck.isChecked() and nmesh > 1 and not self.pseudo3DCheck.isChecked(): + for i in range(nmesh): + self.displayParams['index'] = i + self.replotSection() + if self.m2DRadio.isChecked(): + self.mwInv.figure.savefig(fname, dpi=600, transparent=transparent) + else: + self.vtkWidget.screenshot(fname.replace('.'+ext,'{:0>3d}.{:s}'.format(i,ext)), + transparent_background=transparent) + self.displayParams['index'] = idx_cache + self.replotSection() + else: + if self.m2DRadio.isChecked(): + self.mwInv.figure.savefig(fname, dpi=600, transparent=transparent) else: - transparent_background=True - self.vtkWidget.screenshot(fname, transparent_background=transparent_background) + self.vtkWidget.screenshot(fname, transparent_background=transparent) + self.screenshotBtn = QPushButton('Save screenshot') self.screenshotBtn.setAutoDefault(True) self.screenshotBtn.clicked.connect(screenshotBtnFunc) - - # opt3d = [pvthreshMinLabel, self.pvthreshMin, - # pvthreshMaxLabel, self.pvthreshMax, - # pvxslicesLabel, self.pvxslices, - # pvyslicesLabel, self.pvyslices, - # pvzslicesLabel, self.pvzslices, - # self.pvcontourLabel, self.pvcontour, - # self.pvapplyBtn, - # self.pvdelaunay3dCheck, self.pvgridCheck, - # self.screenshotBtn] + self.timelapseScreenshotCheck = QCheckBox('Time-lapse\nscreenshot') + self.timelapseScreenshotCheck.setToolTip('Save screenshot for each time step if running a batch/time-lapse inversion') + + # having the option to save screen shots in 2D would be useful too... + self.screenshotBtn2d = QPushButton('Save 2D screenshot') + self.screenshotBtn2d.setAutoDefault(True) + self.screenshotBtn2d.clicked.connect(screenshotBtnFunc) + self.timelapseScreenshotCheck2d = QCheckBox('Time-lapse\nscreenshot') + self.timelapseScreenshotCheck2d.setToolTip('Save screenshot for each time step if running a batch/time-lapse inversion') opt3d = [self.pvthreshLabel, self.pvthreshMin, self.pvthreshMax, self.volCheck, self.pvslicesLabel, self.pvxslices, self.pvyslices, self.pvzslices, self.pvcontourLabel, self.pvcontour, self.pvapplyBtn, self.pvsplineCheck, - self.pvdelaunay3dCheck, self.pvgridCheck, self.screenshotBtn] + self.pvdelaunay3dCheck, self.pvgridCheck, + self.timelapseScreenshotCheck, self.screenshotBtn] + + opt2d = [self.timelapseScreenshotCheck2d, self.screenshotBtn2d] def show3DInvOptions(a): [o.setVisible(a) for o in opt3d] + def show2DInvOptions(a): + [o.setVisible(a) for o in opt2d] show3DInvOptions(False) - - + show2DInvOptions(True) # subtab compute attribute self.evalLabel = QLabel("You can use a formula to compute new attribute. " @@ -6106,7 +6263,11 @@ combination of multiple sequence is accepted as well as importing a custom seque optsLayout.addWidget(self.sensWidget) optsLayout.addWidget(self.edgeCheck) optsLayout.addWidget(self.aspectCheck) - optsLayout.addWidget(self.saveBtn) + # optsLayout.addWidget(self.saveBtn) + optsLayout.addWidget(self.exportShortCut) + + for o in opt2d: + optsLayout.addWidget(o) opt3dLayout = QHBoxLayout() for o in opt3d: @@ -6376,8 +6537,307 @@ combination of multiple sequence is accepted as well as importing a custom seque self.tabPostProcessing.setLayout(postProcessingLayout) - #%% Project information (summary) tab + #%% Post processing - export tab + self.tabExportData = QTabWidget() + self.errorGraphs.addTab(self.tabExportData,'Export') + self.exportGrid = QGridLayout() # main grid + + ## old save button function + # def saveBtnFunc(): + # fdir = QFileDialog.getExistingDirectory(self.tabImportingData, 'Choose the directory to export graphs and .vtk', directory=self.datadir) + # if fdir != '': + # self.loadingWidget('Saving data...') + # if self.project.typ[-1] == '2': + # edge_color = self.displayParams['edge_color'] + # sens = self.displayParams['sens'] + # sensPrc = self.displayParams['sensPrc'] + # attr = self.displayParams['attr'] + # contour = self.displayParams['contour'] + # clipCorners = self.displayParams['clipCorners'] + # vmin = self.displayParams['vmin'] + # vmax = self.displayParams['vmax'] + # cmap = self.displayParams['cmap'] + # self.project.saveInvPlots(outputdir=fdir, edge_color=edge_color, + # contour=contour, sens=sens, attr=attr, + # vmin=vmin, vmax=vmax, color_map=cmap, + # sensPrc=sensPrc, clipCorners=clipCorners) + # self.writeLog('k.saveInvPlots(outputdir="{:s}", edge_color="{:s}",' + # ' contour={:s}, sens={:s}, attr="{:s}", vmin={:s},' + # ' vmax={:s}, color_map="{:s}", sensPrc={:.2f})'.format( + # fdir, edge_color, str(contour), str(sens), attr, + # str(vmin), str(vmax), cmap, sensPrc)) + # if self.pseudo3DCheck.isChecked(): + # fname = os.path.join(fdir, 'Pseudo_3D_result.png') + # self.vtkWidget.screenshot(fname, transparent_background=True) + # self.project.saveVtks(fdir) + # self.writeLog('k.saveVtks("{:s}")'.format(fdir)) + # self.project.saveData(fdir) + # self.writeLog('k.saveData("{:s}")'.format(fdir)) + # self.loadingWidget(exitflag=True) + # self.infoDump('All data and graphs saved successfully!') + # self.saveBtn = QPushButton('Save Data') + # self.saveBtn.clicked.connect(saveBtnFunc) + # self.saveBtn.setToolTip('Save current graph to the working directory.') + + def copyWdFunc(): + fdir = QFileDialog.getExistingDirectory(self.tabImportingData, + 'Choose the directory to export graphs and working directory', + directory=self.datadir) + if fdir != '': + self.loadingWidget('Copying working directory...') + if self.project.typ[-1] == '2': + edge_color = self.displayParams['edge_color'] + sens = self.displayParams['sens'] + sensPrc = self.displayParams['sensPrc'] + attr = self.displayParams['attr'] + contour = self.displayParams['contour'] + clipCorners = self.displayParams['clipCorners'] + vmin = self.displayParams['vmin'] + vmax = self.displayParams['vmax'] + cmap = self.displayParams['cmap'] + self.project.saveInvPlots(outputdir=fdir, edge_color=edge_color, + contour=contour, sens=sens, attr=attr, + vmin=vmin, vmax=vmax, color_map=cmap, + sensPrc=sensPrc, clipCorners=clipCorners) + self.writeLog('k.saveInvPlots(outputdir="{:s}", edge_color="{:s}",' + ' contour={:s}, sens={:s}, attr="{:s}", vmin={:s},' + ' vmax={:s}, color_map="{:s}", sensPrc={:.2f})'.format( + fdir, edge_color, str(contour), str(sens), attr, + str(vmin), str(vmax), cmap, sensPrc)) + if self.pseudo3DCheck.isChecked(): + fname = os.path.join(fdir, 'Pseudo_3D_result.png') + self.vtkWidget.screenshot(fname, transparent_background=True) + # self.project.saveVtks(fdir) + # self.writeLog('k.saveVtks("{:s}")'.format(fdir)) + self.project.saveData(fdir) + self.writeLog('k.saveData("{:s}")'.format(fdir)) + self.loadingWidget(exitflag=True) + self.infoDump('Successfully! copied working directory') + + def savePPdataFunc(): + dataout,_ = QFileDialog.getSaveFileName( + self, + 'Open File', + self.datadir, + 'CSV (*.csv);;DAT (*.dat);;SRV (*.srv) ') + + ftype = str(self.exportPpDataFtypeMenu.currentText()) + if dataout != '': + self.loadingWidget('Saving conditioned data...') + includeError = False + includeRecip = False + if self.exportPpDataErrorCheck.isChecked(): + includeError = True + if self.exportPpDataRecipCheck.isChecked(): + includeRecip = True + + self.project.exportData(dataout, ftype, includeError, includeRecip) + self.writeLog('k.exportData("{:s}","{:s}",{:s},{:s})'.format(dataout,ftype, str(includeError),str(includeRecip))) + self.infoDump('Exported pre processed data.') + + + def saveMeshFunc(): + mfpathout, _ = QFileDialog.getSaveFileName( + self, + 'Open File', + self.datadir, + 'VTK (*.vtk);;NODE (*.node);;DAT (*.dat)') + if mfpathout != '': + voxel = False + _forceLocal = False + self.loadingWidget('Saving mesh file...') + if self.exportVoxelMeshCheck.isChecked(): + voxel = True + if self.exportLocalGridMeshCheck.isChecked(): + _forceLocal = True + self.project.exportMesh(mfpathout,voxel,_forceLocal) + self.writeLog('k.exportMesh("{:s}",{:s},{:s})'.format(mfpathout,str(voxel),str(_forceLocal))) + + def exportElecBtnFunc(): + fpathout, _ = QFileDialog.getSaveFileName( + self, + 'Open File', + self.datadir, + 'VTK (*.vtk);;CSV (*.csv);;DAT (*.dat)') + + if fpathout != '': + _forceLocal = False + self.loadingWidget('Exporting electrodes...') + if self.exportLocalGridElecCheck.isChecked(): + _forceLocal = True + self.project.exportElec(fpathout,_forceLocal) + self.writeLog('k.exportElec("{:s}",{:s})'.format(fpathout,str(_forceLocal))) + + def exportMeshResultsBtnFunc(): + fdir = QFileDialog.getExistingDirectory(self.tabImportingData, + 'Choose the directory to save inversion result(s)', + directory=self.datadir) + + ftype = str(self.exportResultsFtypeMenu.currentText()) + if fdir != '': + self.loadingWidget('Exporting mesh results...') + voxel = False + _forceLocal = False + self.loadingWidget('Saving mesh result file(s)...') + if self.exportVoxelResultsCheck.isChecked(): + voxel = True + if self.exportLocalGridResultsCheck.isChecked(): + _forceLocal = True + self.project.exportMeshResults(dirname=fdir, + ftype=ftype, + voxel=voxel, + _forceLocal=_forceLocal) + self.writeLog('k.exportMeshResults("{:s}","{:s}",{:s},{:s})'.format(fdir,ftype,str(voxel),str(_forceLocal))) + self.infoDump('Successfully saved meshed results!') + + + ## left hand side of tab + gcolumn = 0 + nrow = 0 + self.exportPadderLabel = QLabel('\t') + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + gcolumn += 1 + self.exportLabel = QLabel("Export various ResIPy inputs/outputs") + self.exportGrid.addWidget(self.exportLabel,nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(QLabel('Pre-processing<\b>'),nrow,gcolumn) + + # exporting the api log + self.exportPyLogButton = QPushButton('Export Python Log (.py)') + self.exportPyLogLabel = QLabel('Export the Python API calls made by ResIPy graphical user interface') + self.exportPyLogButton.clicked.connect(self.saveLog) + nrow += 1 + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportPyLogLabel, nrow, gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportPyLogButton, nrow, gcolumn) + + # exporting the pre-processed data + self.exportPpDataButton = QPushButton('Export Pre-Processed Data') + self.exportPpDataLabel = QLabel('Export the pre-processed data used by R2, cR2, R3t or cR3t during inversion') + self.exportPpDataButton.clicked.connect(savePPdataFunc) + self.exportPpDataCheckBoxes = QHBoxLayout() + self.exportPpDataErrorCheck = QCheckBox('Include Errors') + self.exportPpDataRecipCheck = QCheckBox('Include Reciprocals') + self.exportPpDataCheckBoxes.addWidget(self.exportPpDataErrorCheck) + self.exportPpDataCheckBoxes.addWidget(self.exportPpDataRecipCheck) + self.exportPpDataFtypeMenu = QComboBox() + self.exportPpDataFtypeMenu.addItem('protocol') + self.exportPpDataFtypeMenu.addItem('srv') + self.exportPpDataFtypeMenu.addItem('csv') + self.exportPpDataFtypeMenu.addItem('ResInv') + self.exportPpDataCheckBoxes.addWidget(self.exportPpDataFtypeMenu) + nrow += 1 + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportPpDataLabel, nrow, gcolumn) + nrow +=1 + self.exportGrid.addLayout(self.exportPpDataCheckBoxes, nrow, gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportPpDataButton, nrow, gcolumn) + + # export mesh (only) + self.exportMeshButton = QPushButton('Export Mesh') + self.exportMeshLabel = QLabel('Export the Mesh used by resipy in various formats') + self.exportMeshBox = QHBoxLayout() + self.exportLocalGridMeshCheck = QCheckBox('Force Local Grid') + self.exportLocalGridMeshCheck.setToolTip('Force outputs to be in a local grid if coordinates were given in terms of UTM') + self.exportMeshBox.addWidget(self.exportLocalGridMeshCheck) + self.exportVoxelMeshCheck = QCheckBox('Force Voxel') + self.exportVoxelMeshCheck.setToolTip('Force outputs to be in a voxel like grid rather than an unstructured mesh') + self.exportMeshBox.addWidget(self.exportVoxelMeshCheck) + self.exportMeshButton.clicked.connect(saveMeshFunc) + nrow += 1 + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportMeshLabel, nrow, gcolumn) + nrow += 1 + self.exportGrid.addLayout(self.exportMeshBox, nrow, gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportMeshButton, nrow, gcolumn) + + ## right hand side of the tab + gcolumn += 1 + nrow = 0 + nrow += 1 + gcolumn += 1 + # add column at the end + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + nrow += 1 + gcolumn -= 1 + # add padding at start of column + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + self.exportGrid.addWidget(QLabel('Post-processing<\b>'),nrow,gcolumn) + + # save working directory + self.exportWdButton = QPushButton('Save working directory') + self.exportWdLabel = QLabel('Save current working directory to a folder of choice on your system') + self.exportWdButton.clicked.connect(copyWdFunc) + nrow += 1 + self.exportGrid.addWidget(self.exportPadderLabel, nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportWdLabel, nrow, gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportWdButton, nrow, gcolumn) + + # export electrode locations + self.exportElecButton = QPushButton('Export Electrodes (xyz, vtk, csv)') + self.exportElecLabel = QLabel('Export the electrodes coordinates') + self.exportElecBox = QHBoxLayout() + self.exportLocalGridElecCheck = QCheckBox('Force Local Grid') + self.exportLocalGridElecCheck.setToolTip('Force outputs to be in a local grid if coordinates were given in terms of UTM') + self.exportElecBox.addWidget(self.exportLocalGridElecCheck) + self.exportElecButton.clicked.connect(exportElecBtnFunc) + nrow += 1 + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportElecLabel, nrow, gcolumn) + nrow += 1 + self.exportGrid.addLayout(self.exportElecBox, nrow, gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportElecButton, nrow, gcolumn) + + # export results + self.exportResultsButton = QPushButton('Export Results (xyz, vtk, csv)') + self.exportResultsLabel = QLabel('Export the resulting resistivity domain in various formats') + self.exportResultsBox = QHBoxLayout() + self.exportLocalGridResultsCheck = QCheckBox('Force Local Grid') + self.exportLocalGridResultsCheck.setToolTip('Force outputs to be in a local grid if coordinates were given in terms of UTM') + self.exportResultsBox.addWidget(self.exportLocalGridResultsCheck) + self.exportVoxelResultsCheck = QCheckBox('Force Voxel') + self.exportVoxelResultsCheck.setToolTip('Force outputs to be in a voxel like grid rather than an unstructured mesh') + self.exportResultsBox.addWidget(self.exportVoxelResultsCheck) + self.exportResultsFtypeMenu = QComboBox() + self.exportResultsFtypeMenu.addItem('.vtk') + self.exportResultsFtypeMenu.addItem('.csv') + self.exportResultsFtypeMenu.addItem('.xyz') + self.exportResultsFtypeMenu.addItem('.dat') + # self.exportResultsFtypeMenu.addItem('.node') # not sure if we need .node here + # self.exportResultsFtypeMenu.setFixedWidth(150) + self.exportResultsButton.clicked.connect(exportMeshResultsBtnFunc) + self.exportResultsBox.addWidget(self.exportResultsFtypeMenu) + + # formatting the buttons etc... + nrow += 1 + self.exportGrid.addWidget(self.exportPadderLabel,nrow,gcolumn) + nrow += 1 + self.exportGrid.addWidget(self.exportResultsLabel, nrow, gcolumn) + nrow += 1 + self.exportGrid.addLayout(self.exportResultsBox, nrow, gcolumn) + + nrow += 1 + self.exportGrid.addWidget(self.exportResultsButton, nrow, gcolumn) + + # add all layouts to tab + self.exportGrid.setRowStretch(self.exportGrid.rowCount()+1, 1) + self.tabExportData.setLayout(self.exportGrid) + + + #%% Project information (summary) tab def getSummary(): if self.project is None: text = 'No data has been imported' @@ -6394,7 +6854,9 @@ combination of multiple sequence is accepted as well as importing a custom seque self.projectInfoLayout.addWidget(self.projectInfoText) self.tabProjectInfo.setLayout(self.projectInfoLayout) self.tabs.currentChanged.connect(getSummary) + + #%% Help tab self.tabHelp = QTabWidget() @@ -6736,10 +7198,22 @@ combination of multiple sequence is accepted as well as importing a custom seque def topoInterpBtnFunc(self): dfelec = self.elecTable.getTable() elec = dfelec[['x','y','z']].values + + # get topography table as a N by 3 numpy array if self.topoTable.useNarray: topo = self.topoTable.xyz else: topo = self.topoTable.getTable()[['x','y','z']].values + + # translate topography to local grid if coordLocal given. + if self.project.coordLocal and topo.shape[0] > 0: + x0 = self.project.coordParam['x0'] + y0 = self.project.coordParam['y0'] + a = self.project.coordParam['a'] + utmx = topo[:,0] + utmy = topo[:,1] + topo[:,0], topo[:,1] = rotGridData(utmx, utmy, x0, y0, a) + inan = ~np.isnan(elec[:,2]) inan2 = ~np.isnan(topo[:,2]) points = np.r_[elec[inan,:2], topo[inan2,:2]] @@ -6799,7 +7273,7 @@ combination of multiple sequence is accepted as well as importing a custom seque self.project.setPseudo3DElec(pd.concat(elecList, axis=0, ignore_index=True)) elecList = self.project._create2DLines() # convert to horizontal 2D lines - self.project.setElec(elec, elecList) + self.project.setElec(elec, elecList, True) pdebug('self.project.setElec()') self.writeLog('#k.setElec(elec)') # TODO don't know how to write to log this @@ -6959,6 +7433,10 @@ combination of multiple sequence is accepted as well as importing a custom seque self.filterAttrCombo.addItem('Reciprocal Error') self.plotError() self.errHist() + + if self.ftype == 'Merged': + self.importDataRecipBtn.hide() # cant show import reciprocal button if using merged surveys + if 'dev' in self.project.surveys[0].df.columns: self.filterAttrCombo.addItem('Stacking Error (Dev.)') if 'cR' in self.project.surveys[0].df.columns: @@ -7024,7 +7502,7 @@ combination of multiple sequence is accepted as well as importing a custom seque self.ipCheck.setEnabled(False) self.elecDx2DTape.setChecked(False) self.elecDx2DTape.setEnabled(False) - self.localGrid.setChecked(False) + # self.localGrid.setChecked(False) # self.localGrid.setEnabled(False) self.importDataRecipBtn.hide() self.fnamesCombo.hide() @@ -7541,6 +8019,7 @@ if __name__ == '__main__': from resipy import Project from resipy.r2help import r2help from resipy.parsers import geomParser + from resipy.interpolation import rotGridData splash.showMessage("ResIPy is ready!", Qt.AlignBottom | Qt.AlignCenter, Qt.black) progressBar.setValue(10) app.processEvents()