diff --git a/.hashdist_default b/.hashdist_default index 467f021b03..183adb4b85 100644 --- a/.hashdist_default +++ b/.hashdist_default @@ -1 +1,2 @@ -aa9456db834541baaa15eda7ff3733d78be9dba9 +5b01e870f578137ab7a4f100c079f7e29f5cd183 + diff --git a/.hashstack_default b/.hashstack_default index 25d0898de0..861db1c53c 100644 --- a/.hashstack_default +++ b/.hashstack_default @@ -1 +1 @@ -9520ae64aa78ed3441859ffa02919e15134b0951 +83cd9b8bfa030ddc0ba0807eca742f63620de42c diff --git a/Makefile b/Makefile index c8a159b9cf..f194b883ab 100644 --- a/Makefile +++ b/Makefile @@ -313,10 +313,9 @@ jupyter: @echo "************************************" @echo "Enabling jupyter notebook/lab/widgets" source ${PROTEUS_PREFIX}/bin/proteus_env.sh - pip install jupyter jupyterlab ipywidgets ipyleaflet jupyter_dashboards pythreejs RISE cesiumpy bqplot mayavi + pip install ipyparallel==6.0.2 ipython==5.3.0 terminado==0.6 jupyter==1.0.0 jupyterlab==0.18.1 ipywidgets==6.0.0 ipyleaflet==0.3.0 jupyter_dashboards==0.6.1 pythreejs==0.3.0 rise==4.0.0b1 cesiumpy==0.3.3 bqplot==0.9.0 jupyter serverextension enable --py jupyterlab --sys-prefix jupyter nbextension enable --py --sys-prefix widgetsnbextension - jupyter nbextension install --py --sys-prefix mayavi jupyter nbextension enable --py --sys-prefix bqplot jupyter nbextension enable --py --sys-prefix pythreejs jupyter nbextension enable --py --sys-prefix ipyleaflet diff --git a/proteus/TriangleTools.py b/proteus/TriangleTools.py index ee3fbb464b..dbe8c67979 100644 --- a/proteus/TriangleTools.py +++ b/proteus/TriangleTools.py @@ -11,7 +11,7 @@ import triangleWrappers import TriangleUtils import TriangleFileUtils - +from Profiling import logEvent class TriangleBaseMesh: """A triangulation interface wrapper. @@ -56,8 +56,8 @@ def __init__(self,baseFlags="zen",nbase=0,verbose=0): if self.baseFlags.find('v') >= 0: self.makeVoronoi = True if verbose > 0: - print """TriangleBaseMesh nbase=%d baseFlags= %s """ % (self.nbase, - self.baseFlags) + logEvent("""TriangleBaseMesh nbase=%d baseFlags= %s """ % (self.nbase, + self.baseFlags)) #end if #keep track of last set of flags used to generate rep self.lastFlags = None diff --git a/proteus/TriangleUtils.py b/proteus/TriangleUtils.py index 5116997a4d..316ae552ce 100644 --- a/proteus/TriangleUtils.py +++ b/proteus/TriangleUtils.py @@ -32,7 +32,7 @@ def writeOutTriangulation(tri,filebase="mesh",nbase=0,verbose=0): """ failed = False - if tri == None: + if tri is None: failed = True return failed if not nbase in [0,1]: @@ -89,7 +89,7 @@ def printNodeFile(nodes,filebase='mesh',attrib=None,markers=None,nbase=0): Remaining lines: [attributes] [boundary marker] """ failed = False - if nodes == None: #ok to do nothing of nodes is empy + if nodes is None: #ok to do nothing of nodes is empy return failed #end empty areas check if not nbase in [0,1]: @@ -109,11 +109,11 @@ def printNodeFile(nodes,filebase='mesh',attrib=None,markers=None,nbase=0): nvert = nodes.shape[0] sdim = 2 nattrib = 0 - if attrib != None: + if attrib is not None: nattrib = attrib.shape[1] #end if nmarkers= 0 - if markers != None: + if markers is not None: nmarkers = 1 #end if line = """%d %d %d %d \n""" % (nvert,sdim,nattrib,nmarkers) @@ -143,7 +143,7 @@ def printElemFile(elems,filebase='mesh',attrib=None,nbase=0): Remaining lines: ... [attributes] """ failed = False - if elems == None: #ok to do nothing of nodes is empy + if elems is None: #ok to do nothing of nodes is empy return failed #end empty areas check if not nbase in [0,1]: @@ -164,7 +164,7 @@ def printElemFile(elems,filebase='mesh',attrib=None,nbase=0): nelem = elems.shape[0] nodesPerTri = elems.shape[1] #should be 3 or 6 nattrib = 0 - if attrib != None: + if attrib is not None: nattrib = attrib.shape[1] #end if line = """%d %d %d \n""" % (nelem,nodesPerTri,nattrib) @@ -203,10 +203,10 @@ def printPolyFile(nodes,segments,filebase='mesh', """ failed = False - if nodes == None: #ok to do nothing of nodes is empy + if nodes is None: #ok to do nothing of nodes is empy return failed - if segments == None: - if nodes == None: + if segments is None: + if nodes is None: return failed else: failed = True @@ -237,11 +237,11 @@ def printPolyFile(nodes,segments,filebase='mesh', nvert = nodes.shape[0] sdim = 2 npattrib= 0 - if pattrib != None: + if pattrib is not None: npattrib = pattrib.shape[1] #end if npmarkers= 0 - if pmarkers != None: + if pmarkers is not None: npmarkers = 1 #end if #write points out @@ -261,7 +261,7 @@ def printPolyFile(nodes,segments,filebase='mesh', #write segments out nsegments = segments.shape[0] nsmarkers = 0 - if smarkers != None: + if smarkers is not None: nsmarkers = 1 line = """%d %d \n""" % (nsegments,nsmarkers) fout.write(line) @@ -275,7 +275,7 @@ def printPolyFile(nodes,segments,filebase='mesh', #end i segment loop nholes = 0 - if holes != None: + if holes is not None: nholes = holes.shape[0] #end if line ="""%d\n""" % nholes @@ -286,7 +286,7 @@ def printPolyFile(nodes,segments,filebase='mesh', fout.write(line) #end i for holes nregions = 0 - if regions != None: + if regions is not None: nregions = regions.shape[0] #end if line = "#no regions specified" @@ -317,7 +317,7 @@ def printAreaFile(elemAreas,filebase='mesh',nbase=0): note, negative area means that the area is unconstrained """ failed = False - if elemAreas == None: #ok to do nothing if elemAreas is empty + if elemAreas is None: #ok to do nothing if elemAreas is empty return failed #end elemAreas empty if not nbase in [0,1]: @@ -357,7 +357,7 @@ def printEdgeFile(edges,filebase='mesh',markers=None,nbase=0): Following lines: [boundary marker] """ failed = False - if edges == None: #ok to do nothing if elemAreas is empty + if edges is None: #ok to do nothing if elemAreas is empty return failed #end empty arrays check @@ -377,7 +377,7 @@ def printEdgeFile(edges,filebase='mesh',markers=None,nbase=0): fout.write(format) nedges = edges.shape[0] nmarkers = 0 - if markers != None: + if markers is not None: nmarkers = 1 #end if line = """%d %d \n""" % (nedges,nmarkers) @@ -404,7 +404,7 @@ def printNeighborFile(neigs,filebase='mesh',nbase=0): Following lines: """ failed = False - if neigs == None: #ok to do nothing if elemAreas is empty + if neigs is None: #ok to do nothing if elemAreas is empty return failed #end if not nbase in [0,1]: @@ -791,12 +791,12 @@ def readPoly(self,filebase,commchar='#',nbase=0,verbose=0): #end outputData['hole'] = {} outputData['hole']['holes'] = None - if not holeData == None: + if not holeData is None: outputData['hole']['holes'] = holeData[0] outputData['region'] = {} outputData['region']['regions'] = None - if not regionData == None: + if not regionData is None: outputData['region']['regions'] = regionData[0] return outputInfo,outputData