Skip to content
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

Added option for geodesic curvature in the GaussCurvature functional #121

Merged
merged 7 commits into from
Apr 9, 2022

Conversation

joshichaitanya3
Copy link
Collaborator

@joshichaitanya3 joshichaitanya3 commented Mar 31, 2022

This PR adds the option of setting a flag geodesic to be true in the GaussCurvature functional object. This is useful to compute the Gaussian curvature integrals for open surfaces using the discrete Gauss-Bonnet theorem. This allows us to do something like

var mesh = Mesh("disk.mesh")
mesh.addgrade(1)
var bnd = Selection(mesh, boundary=true)

// Geodesic curvature
var lgc = GaussCurvature()
lgc.geodesic = true
print lgc.total(mesh, selection=bnd) //expect 2*Pi * Euler characteristic, = 2*Pi

@joshichaitanya3
Copy link
Collaborator Author

Hmm, the geodesiccurvature test is passing on my laptop. Will have to look into it further.

@joshichaitanya3
Copy link
Collaborator Author

Turns out I forgot to add the disk mesh file :/
Passing the tests finally.

@joshichaitanya3
Copy link
Collaborator Author

I will add documentation and more tests later today.

@joshichaitanya3
Copy link
Collaborator Author

I have now added documentation and updated the test. The geodesic curvature calculation is now tested on a flat disk, an open tube and a hemispherical shell.

@softmattertheory softmattertheory merged commit 87dc727 into Morpho-lang:main Apr 9, 2022
@joshichaitanya3 joshichaitanya3 deleted the geodesic branch June 10, 2022 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants