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

test fail with 2D topo using a dimension other than nfaces #16

Open
SBFRF opened this issue May 12, 2020 · 0 comments
Open

test fail with 2D topo using a dimension other than nfaces #16

SBFRF opened this issue May 12, 2020 · 0 comments

Comments

@SBFRF
Copy link

SBFRF commented May 12, 2020

Hello, trying to utilze the checker to make a compliant file and thereby utilize some of the visualization packages. I ran my file and one of the tests checks the dimension name compared to number of dimensions. checker.py

         if cty == 'edge_node_connectivity':
            _dim1 = 'nedges'
            _dim2size = 2
        elif cty == 'face_node_connectivity':
            _dim1 = 'nfaces'
            _dim2size = 3
        else:
            raise NotImplementedError # haven't dealt with real 3D grids yet

In my case (2D), the logic ends up with _dim1 = 'nfaces' and _dim2size=3. if the dimension is anythin aside from nfaces for example nFaces or faces, when the comparison is made

        if (dim1.name == _dim1) and (dim2.size == _dim2size):
            # set the attr in the meshes dict
            self.meshes[mesh][_dim1] = self.ds.dimensions[_dim1]
            return True, 'regular'
        elif (dim1.size == _dim2size) and (dim2.name == _dim1):
            self.meshes[mesh][_dim1] = self.ds.dimensions[_dim1]
            return True, 'nonstd'
        else:
            return False, None

then the test fails. I don't see where in the UGRID document that the dimension name should be nfaces (exactly), infact the example uses nFaces or nMesh2_face for 2Dtopo Does the test need to be modified to not use such an explicit comparison or am I misinterpreting the conventions?

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

No branches or pull requests

1 participant