Jon,
Here is a paper you might be interested in:
http://folk.ntnu.no/lervag/files/lervag_mekit2011.pdf
I made a start on the second order initialization but got distracted
before I got it working. I made a branch on github with the
information,
https://github.com/scikit-fmm/scikit-fmm/tree/bicubic-init
here are my notes on what I was trying:
https://github.com/scikit-fmm/scikit-fmm/blob/bicubic-init/notes.org
Have you made any progress on calculating smooth curvature fields?
Thanks,
Jason
On Wed, May 22, 2013 at 3:38 PM, Jon Alm Eriksen
<
jon.alm...@gmail.com> wrote:
> Jason and Daniel,
>
> Thanks for your replies. The convergence issue seems only to affect
> nodes close to the boundary (phi=0). When I choose other nodes exept
> for the 'band' nodes in my code example, max(Q) goes to zero with
> increasing resolution, as expected.
>
> Let me know if you implement second order accuracy in the
> initialization (bi-cubic interpolation). That should do the magic for
> evaluating curvature at the front.
>
> Also Jason, you might be right about using div(grad phi/|grad phi|)
> for the curvature, even in the case of a signed distance function. It
> seems like that is the preffered choice in the literature and it
> might help the accuracy.
>
> best
> jon
>
> On Tue, May 21, 2013 at 1:51 PM, Jason Furtney <
jkfu...@gmail.com> wrote:
>> Jon and Daniel,
>>
>> Thanks for the replies.
>>
>> The function distanceMarcher::initalizeFrozen() in
>> skfmm/distance_marcher.cpp finds values for the front distance of
>> points adjacent to the zero contour by using bi-linear interpolation.
>>
>> I think the problem is this initial part is first order, so when you
>> take the Laplacian of the resulting distance function the error is
>> amplified. I think this initializeFrozen() function can be made second
>> order and this should improve the curvature results. The method should
>> converge as the number of points goes up, if not there is a problem.
>>
>> I will have a look at the paper, at first glance it looks reasonable.
>> They use bi-cubic interpolation in the initialization (section 2.2).
>>
>> The order optional argument is the order of the spatial derivatives
>> used in the point updates.
>>
>> Thanks,
>> Jason
>>
>> On Mon, May 20, 2013 at 6:14 PM, Jon Alm Eriksen
>> <
jon.alm...@gmail.com> wrote:
>>> Thank you so much for the answer Jason, here comes a couple of
>>> followup questions/comments.
>>>
>>>> ... I think the magnitude of the
>>>> gradient is noisy in this example because the initial zero level set of phi
>>>> has sharp angles. If you define the initial contour as
>>>>
>>>> phi = 0.5*X**2 + Y**2 -1
>>>
>>> My understanding of the FMM was that the distance function was
>>> uniquely determined by the algorithm, given the identification of
>>> nodes inside and outside a boundary. At least, that is how I
>>> understood the chapter on FMM in Sethian's book. If this is not the
>>> case, how do you use the initial values to determine phi, are you
>>> using some kind of front reconstruction scheme to find the position of
>>> the front between inside and outside nodes?
>>>
>>>> .... The curvature kappa is
>>>> usually written as div (grad phi/|grad phi|) so maybe normalizing the
>>>> gradient will give better results?
>>>
>>> This is the general expression for the curvature; if you evaluate the
>>> expression at a point, it will correspond to the curvature of the
>>> contour of that point. If phi is a solution of the eikonal equation,
>>> we have by definition that |grad phi| = 1, and the above expression
>>> will simplify to the laplacian of phi. I don't think that using the
>>> general expression would improve the results. The unwanted behaviour
>>> is related to that |grad phi| isn't close enough to 1, and I see no
>>> reason why it would reduce the error by introducing an approximation
>>> of |grad phi| in the expression.
>>>
>>> Another thing I don't understand is that the code doesn't seem to
>>> converge to the analytical solution as I increase the grid
>>> size/decrease the lattice spacing. Rather, the error takes a finite
>>> value (e.g. max(Q) in my code example). This might be a property of
>>> the scheme. To be able to extract the laplacian of phi, I guess the
>>> numerical scheme has to be accurate to a higher order. This article
>>>
http://arxiv.org/abs/1111.6903 suggest an approach, but I don't know
>>> how hard it would be to implement. (btw what exactly is the 'order'
>>> parameter input referring to?)
>>>
>>> Also thanks for the suggestions on alternative implementations. I had
>>> some problems getting lsmlib to work properly. I just installed FiPy,
>>> and will give it a try.
>>>
>>> If I get the skfmm package to work properly, I would be more than
>>> happy about writing a tutorial example on curvature.
>>>
>>>
>>> best
>>> jon
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "scikit-fmm" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to
scikit-fmm+...@googlegroups.com.
>>> To post to this group, send email to
sciki...@googlegroups.com.
>>> To view this discussion on the web visit
https://groups.google.com/d/msgid/scikit-fmm/CAGaaLYOKTZuC6e9mZex%3DjE2yL3s3AOsNsW0BnxA6NM%3D6V-iQmA%40mail.gmail.com?hl=en.
>>> For more options, visit
https://groups.google.com/groups/opt_out.
>>>
>>>
>>
>>
>>
>> --
>> --
>> Jason K. Furtney
>> Itasca Consulting Group
>> 111 3rd Ave. South, Suite 450
>> Minneapolis, MN 55401 USA
>>
(612) 371-4711
>>
>> --
>> You received this message because you are subscribed to a topic in the Google Groups "scikit-fmm" group.
>> To unsubscribe from this topic, visit
https://groups.google.com/d/topic/scikit-fmm/ZqYjm1ii1iI/unsubscribe?hl=en.
>> To unsubscribe from this group and all its topics, send an email to
scikit-fmm+...@googlegroups.com.
>> To post to this group, send email to
sciki...@googlegroups.com.
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/scikit-fmm/CAOU2ZSX2uC04K%3DasN%2BQY3BAT3HqMBuHUVgghWEL6GsydSA3RRw%40mail.gmail.com?hl=en.
>> For more options, visit
https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups "scikit-fmm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
scikit-fmm+...@googlegroups.com.
> To post to this group, send email to
sciki...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/scikit-fmm/CAGaaLYMe9rJFCxvxHFL9yBNf0V56VDB8mAfMmg2dcYpOe1Hxkg%40mail.gmail.com?hl=en.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
--
Jason K. Furtney
Itasca Consulting Group
111 3rd Ave. South, Suite 450
Minneapolis, MN 55401 USA
(612) 371-4711