Skip to content

Accelerate interpolation for regular and straight-edge elements

Issue/feature addressed

The interpolation operation can be accelerated in the following ways

  • If an element is regular, the local to global mapping matrix and its inverse can be pre-computed and stored as a member function. This can be used to accelerate local coordinates computation.
  • For an element with all straight edges, the local to global mapping matrix is also stored and an improved Newton iteration based on the stored coefficients is implemented.
  • If a 2D element is deformed but it contains some straight edges, an all-left check can be performed to take a quick and robust test if a point lies outside of this element. This can also be done for 3D elements with plane surfaces, but due to the complexity, this has not been implemented yet.


Suggested reviewers

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


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


  • [ ] 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