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

Define _localNonOverlappingFaceIDs for Gmsh #857

Merged
merged 34 commits into from Jun 14, 2022

Conversation

guyer
Copy link
Member

@guyer guyer commented Apr 30, 2022

Gmsh ghost faces were not properly accounted for.

Fixes usnistgov#856
@guyer guyer requested review from tkphd and wd15 June 3, 2022 23:01
@guyer guyer marked this pull request as draft June 6, 2022 16:39
@guyer
Copy link
Member Author

guyer commented Jun 6, 2022

Needs a test

@guyer guyer marked this pull request as ready for review June 6, 2022 23:15
@guyer
Copy link
Member Author

guyer commented Jun 9, 2022

@wd15 & @tkphd, can one of you take a look at this, please?

Copy link
Contributor

@wd15 wd15 left a comment

Choose a reason for hiding this comment

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

Looks good with a nice test case.

@wd15
Copy link
Contributor

wd15 commented Jun 9, 2022

I guess you could also test the dumb parallel grid 2D if you want to, but probably not necessary. Don't need all the Gmsh setup for that.

@guyer
Copy link
Member Author

guyer commented Jun 9, 2022

I guess you could also test the dumb parallel grid 2D if you want to, but probably not necessary.

Grid2D or GmshGrid2D?

@guyer
Copy link
Member Author

guyer commented Jun 9, 2022

Why would we need to test Grid2D, anyway? It's not like there's any chance that it's broken:

======================================================================
FAIL: _test (fipy.meshes.uniformGrid2D.UniformGrid2D)
Doctest: fipy.meshes.uniformGrid2D.UniformGrid2D._test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/guyer/mambaforge/envs/fipy3k_again/lib/python3.10/doctest.py", line 2217, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for fipy.meshes.uniformGrid2D.UniformGrid2D._test
  File "/Users/guyer/Documents/research/FiPy/fipy/fipy/meshes/uniformGrid2D.py", line 600, in _test

----------------------------------------------------------------------
File "/Users/guyer/Documents/research/FiPy/fipy/fipy/meshes/uniformGrid2D.py", line 820, in fipy.meshes.uniformGrid2D.UniformGrid2D._test
Failed example:
    print(numerix.allclose(area, 10))
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File "/Users/guyer/Documents/research/FiPy/fipy/fipy/meshes/uniformGrid2D.py", line 822, in fipy.meshes.uniformGrid2D.UniformGrid2D._test
Failed example:
    print(area)
Expected nothing
Got:
    14.0
----------------------------------------------------------------------
File "/Users/guyer/Documents/research/FiPy/fipy/fipy/meshes/uniformGrid2D.py", line 825, in fipy.meshes.uniformGrid2D.UniformGrid2D._test
Failed example:
    print(numerix.allclose(area, 10))
Expected:
    True
Got:
    False
----------------------------------------------------------------------
File "/Users/guyer/Documents/research/FiPy/fipy/fipy/meshes/uniformGrid2D.py", line 827, in fipy.meshes.uniformGrid2D.UniformGrid2D._test
Failed example:
    print(area)
Expected nothing
Got:
    14.0

@guyer
Copy link
Member Author

guyer commented Jun 10, 2022

Ugh. in1d is broken for masked arrays (numpy/numpy#20011).

@guyer guyer requested a review from wd15 June 13, 2022 01:27
@guyer
Copy link
Member Author

guyer commented Jun 13, 2022

@wd15 & @tkphd: lots of changes since the last time I asked you to review, but now with tests(tm)!

fipy/meshes/topologies/abstractTopology.py Outdated Show resolved Hide resolved
fipy/matrices/trilinosMatrix.py Outdated Show resolved Hide resolved
fipy/tools/numerix.py Show resolved Hide resolved
fipy/variables/cellVariable.py Outdated Show resolved Hide resolved
@guyer guyer merged commit 85120fd into usnistgov:master Jun 14, 2022
@guyer guyer deleted the gmsh_nonoverlapping_faces branch June 14, 2022 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FaceVariable does not accumulate properly in parallel Fix FaceVariable.globalValue method
2 participants