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

Algorithms for determination of distance to surface #6

Open
fuulish opened this issue Apr 10, 2017 · 0 comments
Open

Algorithms for determination of distance to surface #6

fuulish opened this issue Apr 10, 2017 · 0 comments

Comments

@fuulish
Copy link
Owner

fuulish commented Apr 10, 2017

The true_and_accurate_surface_distance is supposed to handle this issue.

Currently, a brute-force estimate of the distance of a point to the surface is determined by evaluating the minimal distance to all given surface points. This works, but needs high resolution of the surface and coarse-grained density field. This can be quite inefficient and is undesirably expensive for accurate analyses.

Already implemented are the following other options:

  1. Perform a constrained optimization of the distance to the surface under the constraint that the points are on the surface (handled as equality constraint, and optimized using the NLOPT library).

  2. Transform the equality constraint in I) using a Lagrangian with the corresponding constraint added and then perform a multidimensional root-finding (using GSL) to solve for a stationary point.

Both algorithms have significant disadvantages:

  1. can get stuck and the optimization will never finish. It would be nice to catch these cases and handle them in an efficient and transparent manner (time/iteration limit, create new guess...)

  2. can also optimize to a local maximum instead of a local minimum. depends on which algorithm is used in the background, and how good the initial guess is.

1 and 2 give basically the same results for short distances from the surface, but differ for points that are in the bulk, far away from the surface.

It would be nice to have a reference algorithm that is accurate and doesn't get stuck.

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

No branches or pull requests

1 participant