Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue488 gmsh meshing changed #573

Merged
merged 2 commits into from
Jun 2, 2018

Conversation

guyer
Copy link
Member

@guyer guyer commented May 28, 2018

Only apply mesh epsilon for older versions of gmsh

Fixes #488

Apparently when written, Gmsh didn't produce the expected grid,
but now it does (although still not precisely at the spacing requested)
@guyer guyer requested review from wd15 and tkphd May 29, 2018 16:01
@tkphd
Copy link
Contributor

tkphd commented May 31, 2018

Method

Since this contribution changes FiPy's behavior depending on the Gmsh version,
I've run the test suite for a few archived binaries and
stored the output.

$ git checkout develop
$ for d in ~/repositories/gmsh/gmsh-*
> do
>     cp $d/bin/gmsh /users/tnk10/.conda/envs/fipy/bin/gmsh
>     python setup.py test &> test_develop_$(basename $d).log
> done
$ git checkout issue488_gmsh-meshing-changed
$ for d in ~/repositories/gmsh/gmsh-*
> do
>     cp $d/bin/gmsh /users/tnk10/.conda/envs/fipy/bin/gmsh
>     python setup.py test &> test_issue488_$(basename $d).log
> done

Results

At a minimum, this contribution should not adversely affect the test results.
Preferably, the result would improve (greater number of tests passed).

$ for f in test_develop_gmsh-*.log
> do
>     diff -y --suppress-common-lines $f ${f/develop/issue488} > diff_${f/develop_/}
> done

Gmsh v2.7.0 (2013-03-08)

Passed: fewer failures

Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... ok
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... ok
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  |	Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh 
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid2D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test		      <
Traceback (most recent call last):			      |	Ran 545 tests in 128.303s
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
------------------------------------------------------------- |	OK
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    mesh.numberOfCells == 4 # doctest: +GMSH		      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.faceCenters[0]) == 12 # doctest: +GMSH	      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid3D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test		      <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.cellCenters.value[0]) == 8 # doctest: +GMSH      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._faceAreas, faceAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._cellAreas, cellAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: TrenchMesh (examples.levelSet.electroChem.trenchMesh)   <
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for examples.levelSet.ele <
  File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroCh <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroChem <
Failed example:						      <
    print mesh.globalNumberOfCells - len(numerix.nonzero(mesh <
Expected:						      <
    150							      <
Got:							      <
    160							      <
							      <
							      <
------------------------------------------------------------- <
Ran 545 tests in 146.805s				      <
							      <
FAILED (failures=3)					      <
fipy version 3.1.3.dev307+g952b5dba			      |	fipy version 3.1.3.dev310+g884eaeff

Gmsh v2.7.1 (2013-05-12)

Passed: fewer failures

Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... ok
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... ok
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  |	Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh 
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid2D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test		      <
Traceback (most recent call last):			      |	Ran 545 tests in 133.415s
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
------------------------------------------------------------- |	OK
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    mesh.numberOfCells == 4 # doctest: +GMSH		      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.faceCenters[0]) == 12 # doctest: +GMSH	      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid3D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test		      <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.cellCenters.value[0]) == 8 # doctest: +GMSH      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._faceAreas, faceAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._cellAreas, cellAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: TrenchMesh (examples.levelSet.electroChem.trenchMesh)   <
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for examples.levelSet.ele <
  File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroCh <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroChem <
Failed example:						      <
    print mesh.globalNumberOfCells - len(numerix.nonzero(mesh <
Expected:						      <
    150							      <
Got:							      <
    160							      <
							      <
							      <
------------------------------------------------------------- <
Ran 545 tests in 135.554s				      <
							      <
FAILED (failures=3)					      <
fipy version 3.1.3.dev307+g952b5dba			      |	fipy version 3.1.3.dev310+g884eaeff

Gmsh v2.8.0 (2013-07-09)

Passed: fewer failures

Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... ok
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... ok
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  |	Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh 
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid2D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test		      <
Traceback (most recent call last):			      |	Ran 545 tests in 134.528s
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
------------------------------------------------------------- |	OK
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    mesh.numberOfCells == 4 # doctest: +GMSH		      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.faceCenters[0]) == 12 # doctest: +GMSH	      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid3D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test		      <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.cellCenters.value[0]) == 8 # doctest: +GMSH      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._faceAreas, faceAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._cellAreas, cellAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: TrenchMesh (examples.levelSet.electroChem.trenchMesh)   <
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for examples.levelSet.ele <
  File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroCh <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroChem <
Failed example:						      <
    print mesh.globalNumberOfCells - len(numerix.nonzero(mesh <
Expected:						      <
    150							      <
Got:							      <
    160							      <
							      <
							      <
------------------------------------------------------------- <
Ran 545 tests in 137.184s				      <
							      <
FAILED (failures=3)					      <
fipy version 3.1.3.dev307+g952b5dba			      |	fipy version 3.1.3.dev310+g884eaeff

Gmsh v2.11.0 (2015-11-07)

Passed: fewer failures

Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... ok
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... ok
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  |	Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh 
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid2D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test		      <
Traceback (most recent call last):			      |	Ran 545 tests in 138.142s
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
------------------------------------------------------------- |	OK
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    mesh.numberOfCells == 4 # doctest: +GMSH		      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.faceCenters[0]) == 12 # doctest: +GMSH	      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid3D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test		      <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.cellCenters.value[0]) == 8 # doctest: +GMSH      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._faceAreas, faceAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._cellAreas, cellAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: TrenchMesh (examples.levelSet.electroChem.trenchMesh)   <
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for examples.levelSet.ele <
  File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroCh <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroChem <
Failed example:						      <
    print mesh.globalNumberOfCells - len(numerix.nonzero(mesh <
Expected:						      <
    150							      <
Got:							      <
    160							      <
							      <
							      <
------------------------------------------------------------- <
Ran 545 tests in 142.831s				      <
							      <
FAILED (failures=3)					      <

Gmsh v3.0.6 (2017-11-05)

Passed: fewer failures

Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test ... ok
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... FAIL	      |	Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test ... ok
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  |	Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh 
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid2D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid2D._test		      <
Traceback (most recent call last):			      |	Ran 545 tests in 124.712s
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
------------------------------------------------------------- |	OK
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    mesh.numberOfCells == 4 # doctest: +GMSH		      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.faceCenters[0]) == 12 # doctest: +GMSH	      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: _test (fipy.meshes.gmshMesh.GmshGrid3D)		      <
Doctest: fipy.meshes.gmshMesh.GmshGrid3D._test		      <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for fipy.meshes.gmshMesh. <
  File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", l <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    yogmsh.cellCenters.value.size == yogrid.cellCenters.value <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    numerix.allclose(yogmsh._faceAreas, yogrid._faceAreas) #  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    len(mesh.cellCenters.value[0]) == 8 # doctest: +GMSH      <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._faceAreas, faceAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/fipy/meshes/gmshMesh.py", lin <
Failed example:						      <
    nx.allclose(mesh._cellAreas, cellAreas) # doctest: +GMSH  <
Expected:						      <
    True						      <
Got:							      <
    False						      <
							      <
							      <
============================================================= <
FAIL: TrenchMesh (examples.levelSet.electroChem.trenchMesh)   <
Doctest: examples.levelSet.electroChem.trenchMesh.TrenchMesh  <
------------------------------------------------------------- <
Traceback (most recent call last):			      <
  File "/users/tnk10/.conda/envs/fipy/lib/python2.7/doctest.p <
    raise self.failureException(self.format_failure(new.getva <
AssertionError: Failed doctest test for examples.levelSet.ele <
  File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroCh <
							      <
------------------------------------------------------------- <
File "/usr/local/tnk10/opt/fipy/examples/levelSet/electroChem <
Failed example:						      <
    print mesh.globalNumberOfCells - len(numerix.nonzero(mesh <
Expected:						      <
    150							      <
Got:							      <
    160							      <
							      <
							      <
------------------------------------------------------------- <
Ran 545 tests in 131.507s				      <
							      <
FAILED (failures=3)					      <
fipy version 3.1.3.dev307+g952b5dba			      |	fipy version 3.1.3.dev310+g884eaeff

Copy link
Contributor

@tkphd tkphd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binary distributions of Gmsh prior to 2.7.0 were not available in 64-bit variants, so I am unable to test whether those versions properly work. However, since the five recent versions I have tested produced fewer errors, these changes look good to me.

@guyer guyer merged commit 6e4420a into usnistgov:develop Jun 2, 2018
@guyer guyer deleted the issue488-gmsh_meshing_changed branch June 2, 2018 02:41
@guyer
Copy link
Member Author

guyer commented Jun 2, 2018

Fixes #488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants