-
Notifications
You must be signed in to change notification settings - Fork 173
Polygon DEC #195
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
Polygon DEC #195
Conversation
|
@MarkGillespie or @nmwsharp, adding this support for polygon meshes required making some changes for 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 |
What do you think of this argument? geometry.basePolygonLaplacian, geometry.basePolygonVertexLumpedMassMatrix, and geometry.basePolygonVertexGalerkinMassMatrix. Rename Like the base polygons are unrestricted, while for example Edited: See also |
nmwsharp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!! I left a few comments, but nothing major. Looks great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we define == with a hidden internal eps!?? If I did that it was a silly mistake... This is breaking change but a good one I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that might have actually been me at some point in the past... sorry! (I might have done this while debugging something else and accidentally included it in a PR.)
| } | ||
| case SurfacePointType::Edge: { | ||
| return edge == other.edge && abs(tEdge - other.tEdge) < eps; | ||
| return edge == other.edge && tEdge == other.tEdge; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you delete the unused eps variable above in this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
| DependentQuantityD<std::array<Eigen::SparseMatrix<double>*, 7>> polygonDECOperatorsQ; | ||
| virtual void computePolygonDECOperators(); | ||
|
|
||
| // helper functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are a lot of helper functions. I'm worried this class/file is getting too busy.
Could we maybe move these helpers to a separate file, and invoke them as-needed? And maybe once moved to their own file they no-longer need to be virtual?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... a lot of these functions depend on EmbeddedGeometryInterface and quantities within, which made it hard to truly separate these functions into separate files without writing tangled code with a bunch of arguments accounting for data being passed around (commit c94b23c).
For now I separated what I could cleanly separate, into a new file called polygon_mesh_helpers.cpp, which doesn't help a ton but is at least a tiny bit better. Other options I can see are to (1) move some function definitions into separate cpp files, even if all the function declarations remain in the one file embedded_geometry_interface.h; (2) think long and hard about how the number of functions could be reduced... though I'm not sure how to do that, currently, without sacrificing code cleanliness :(
| he = he.next(); | ||
| Vector3 pB = vertexPositions[he.vertex()]; | ||
| he = he.next(); | ||
| do { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function has quadratic complexity in the face degree, when it doesn't need to. It could be implemented with linear complexity by working one face at a time and maintaining a leading a trailing reference while orbiting the face.
[doesn't need to be fixed, just couldn't help but mention it :)]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed in a most recent commit!
|
Re naming for |
…ing else except for DEC operators
…how much sense it makes to expose d operators since they map between the refinement
…act on the virtual triangle refinement, which will (should?) never get exposed to users
…so much uglier. I think I made a mistake to try and separate from the class as well...
|
FYI this PR also updates the |
|
I've squash-merged for now! 🤞 |
Adds polygon Laplacian and other operators for general polygon meshes.
Summary of contributions:
PolygonMeshHeatSolverthat implements the Vector Heat Method, Unsigned Heat Method, and Signed Heat Method on polygon meshes, analogous to thePointCloudHeatSolverfor point clouds.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, andgeometry.simplePolygonVertexGalerkinMassMatrix. My concerns areSuggestions & review are welcome!