Skip to content

Add `IsValid` method to NekPy interface

Issue/feature addressed

I wanted to be able to check whether a Geometry object is valid (i.e., has a non-negative Jacobian) from Python.

Proposed solution

A method has been added to the Geometry class exported by NekPy which can perform this check.

Implementation

The GeomFactors class which actually performs this test is not currently exposed to Python. Rather than implement an entire binding for this, I have just added a small IsValid function to the Geometry class, which performs the necessary call to Geometry::GetGeomFactors().

Tests

Calls to this method have been added to the CreateMesh.py demo script.

Suggested reviewers

@dmoxey

Checklist

  • Functions and classes, or changes to them, are documented.
  • User guide/documentation is updated.
  • Changelog is updated.
  • Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Chris MacMackin

Merge request reports