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

Suggestion: Adding support for unstructured grids #25

Closed
JohnDN90 opened this issue Apr 2, 2018 · 1 comment
Closed

Suggestion: Adding support for unstructured grids #25

JohnDN90 opened this issue Apr 2, 2018 · 1 comment

Comments

@JohnDN90
Copy link

JohnDN90 commented Apr 2, 2018

How difficult would it be to add support for unstructured grids? I understand the calculation of spatial gradients becomes more difficult and is likely beyond the scope of this code. However, suppose the user is able to provide the spatial gradients at each point and coordinates of each point. If you accepted these as two optional arguments into the various functions, how difficult would it be to implement the support for unstructured grids?

@jkfurtney
Copy link
Member

Hi, Thanks for the message.

Scikit-fmm could be adapted to work on non-uniform grids. The basics of the algorithm would be unchanged but the quadratic equation solved to update each point would be different and a data structure to hold the grid would be needed. Code-wise we would create a new sub-class of the BaseMarcher class that has new updatePointOrderOne and updatePointOrderTwo functions. A few other things, like initializing the initially frozen points and the narrow band, may also need to change.

Having the spatial gradients pre-defined at each point would probably not make it much easier. The gradient has to be calculated in a specific upwind way for the algorithm to work.

The Sethian book has the formulation for the fast marching method on unstructured grids which we could implement.

Several other people have asked about this in the past. Some people have been able to map their data to a regular grid for fast-marching as a work around. I do not have any plans to add unstructured grids any time soon but I will keep it in mind. If you want to start developing the feature I can help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants