geometry-central icon indicating copy to clipboard operation
geometry-central copied to clipboard

Polygon DEC

Open nzfeng opened this issue 1 year ago • 3 comments
trafficstars

Adds polygon Laplacian and other operators for general polygon meshes.

Summary of contributions:

  • implementation of polygon Laplacian and mass matrices (unlumped & lumped) from Polygon Laplacian Made Simple by Bunge et al. 2020.
  • implementation of polygon Laplacian, mass matrix, gradient, divergence, connection Laplacian, and DEC operators from Discrete Differential Operators on Polygonal Meshes by de Goes et al 2020.
  • A PolygonMeshHeatSolver that implements the Vector Heat Method, Unsigned Heat Method, and Signed Heat Method on polygon meshes, analogous to the PointCloudHeatSolver for point clouds.
  • Documentation & tests.

image

The only thing I'm not quite satisfied with is the naming convention for the operators from "Polygon Laplacian Made Simple": geometry.simplePolygonLaplacian, geometry.simplePolygonVertexLumpedMassMatrix, and geometry.simplePolygonVertexGalerkinMassMatrix. My concerns are

  • the names can be quite long;
  • perhaps the word "simple" will be mistaken as meaning "less sophisticated" and therefore "less accurate";
  • perhaps the operators will be mistaken as only applying to "simple polygons", which are non-self-intersecting polygons without holes, though they can indeed apply even when polygon faces are self-intersecting.

Suggestions & review are welcome!

nzfeng avatar Sep 17 '24 17:09 nzfeng

@MarkGillespie or @nmwsharp, adding this support for polygon meshes required making some changes for EmbeddedGeometryInterface --- mainly removing the asserts that assumed triangular faces in functions like computeCornerAngles() and computeFaceAreas().

I don't foresee that these changes will result in breaking behavior (especially since all tests have passed), but it might also be a good idea to have a geometry-central expert check the details in surface/embedded_geometry_interface.cpp!

nzfeng avatar Sep 17 '24 21:09 nzfeng

perhaps the word "simple" will be mistaken as meaning "less sophisticated" and therefore "less accurate";

What do you think of this argument?

geometry.basePolygonLaplacian, geometry.basePolygonVertexLumpedMassMatrix, and geometry.basePolygonVertexGalerkinMassMatrix.

Rename simple to base.

Like the base polygons are unrestricted, while for example ~~manifold~~ triangle polygon has numerous restrictions.

Edited:

See also general.

fire avatar Sep 25 '24 22:09 fire

Re naming for simple polygon Laplacian (thanks for the ideas @fire!). Personally I think the name 'simple' is perfectly good. It matches the title of the paper it comes from. We also already use the term elsewhere in SimplePolygonMesh. Any confusion about the term will be quickly resolved by reading the docs.

nmwsharp avatar Oct 01 '24 05:10 nmwsharp

FYI this PR also updates the cornerAngles issue mentioned here.

nzfeng avatar May 16 '25 21:05 nzfeng

I've squash-merged for now! 🤞

nzfeng avatar May 19 '25 21:05 nzfeng