Skip to content

Fix interpolation on 2D manifold in a 3D space

Ankang Gao requested to merge gaoak/nektar:fix/interpManifold into master

Issue/feature addressed

For the 2-D manifold in 3-D space, only two coordinates are used to find the host element. This may cause misjudgement when the projected bounding boxes of different elements overlap. In this merge request to ensure the nearest element is found, the third coordinate is used to calculate the distance in 3D space.

In addition, a hard-coded tolerance 1E-5 is used as the maximum distance in FieldConvert interpolation. This may cause failure in find element because a CAD model usually has a geometry error about 1E-5.

Proposed solution

After obtaining the local coordinates from two global coordinates, the third global coordinate on one element is computed and compared with the provided global coordinate as the distance to the manifold.

A distance tolerance option is passed to the interpolation modules.

Implementation

A PhysEvaluate is added in the Geometry2D::v_GetLocCoords and the 3-D distance to the manifold is calculated.

Tests

Suggested reviewers

Please suggest any people who would be appropriate to review your code.

Notes

Please add any other information that could be useful for reviewers.

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 Ankang Gao

Merge request reports

Loading