Skip to content

Commit

Permalink
Remove background= argument from GmshGrid2D. Addresses ticket:448.
Browse files Browse the repository at this point in the history
git-svn-id: svn+ssh://code.matforge.org/fipy/branches/ticket448@5251 d80e17d7-ff13-0410-a124-85740d801063
  • Loading branch information
guyer committed Jun 29, 2012
1 parent 1acb86c commit 9b616ba
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions fipy/meshes/gmshImport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,15 +1270,15 @@ def _test(self):
... p = Popen(["gmsh", os.path.join(dir, "g.msh")]) # doctest: +GMSH
... doctest_raw_input("Grid2D... Press enter.")
>>> g_ref = GmshGrid2D(dx=1., dy=1., nx=10, ny=10, background=gvar)
>>> gg = GmshGrid2D(dx=1., dy=1., nx=10, ny=10)
>>> f = openMSHFile(name=os.path.join(dir, "g_ref.msh"), mode='w') # doctest: +GMSH
>>> f.write(g_ref) # doctest: +GMSH
>>> f = openMSHFile(name=os.path.join(dir, "gg.msh"), mode='w') # doctest: +GMSH
>>> f.write(gg) # doctest: +GMSH
>>> f.close() # doctest: +GMSH
>>> if __name__ == "__main__":
... p = Popen(["gmsh", os.path.join(dir, "g_ref.msh")]) # doctest: +GMSH
... doctest_raw_input("Refined Grid2D... Press enter.")
... p = Popen(["gmsh", os.path.join(dir, "gg.msh")]) # doctest: +GMSH
... doctest_raw_input("GmshGrid2D... Press enter.")
>>> ug = UniformGrid2D(nx = 10, ny = 10)
>>> f = openMSHFile(name=os.path.join(dir, "ug.msh"), mode='w') # doctest: +GMSH
Expand Down Expand Up @@ -2143,16 +2143,15 @@ def _test(self):
class GmshGrid2D(Gmsh2D):
"""Should serve as a drop-in replacement for Grid2D."""
def __init__(self, dx=1., dy=1., nx=1, ny=None,
coordDimensions=2, communicator=parallel, order=1,
background=None):
coordDimensions=2, communicator=parallel, order=1):
self.dx = dx
self.dy = dy or dx
self.nx = nx
self.ny = ny or nx

arg = self._makeGridGeo(self.dx, self.dy, self.nx, self.ny)

Gmsh2D.__init__(self, arg, coordDimensions, communicator, order, background)
Gmsh2D.__init__(self, arg, coordDimensions, communicator, order, background=None)

@getsetDeprecated
def _getMeshSpacing(self):
Expand Down

0 comments on commit 9b616ba

Please sign in to comment.