On Tue, Jul 22, 2014 at 12:52 AM, Robert R. Howell <[email protected]> wrote:

> I've been using FiPy 3.0 level set methods for an application which
> requires non-uniform grids.  I recently tried upgrading to version 3.1
> but now get a variety of error messages when I call
> calcDistanceFunction().  To avoid the complications of my own code, I've
> also tried "examples.levelSet.distanceFunction.mesh1D", both with skfmm
> and lsmmlib.  It works fine as written but when modified slightly to
> introduce a non-uniform grid, FiPy 3.1 produces the same errors I see in
> my application.  However FiPy 3.0 appears to work fine.
>

Scikit-fmm seems to support non-uniform grids so FiPy should handle that as
well. See,

    http://pythonhosted.org/scikit-fmm/#skfmm.travel_time


> As best I can tell from examining the source code for skfmm and lsmlib,
> both assume uniform grids and just don't contain any provisions for
> non-uniform ones.  I'm writing partly to confirm that is the case, and
> partly to see if you have any suggestions for getting around this
> problem, other than by sticking with FiPy 3.0.
>

    http://pythonhosted.org/scikit-fmm/#skfmm.travel_time

The Scikit-fmm docs allow an array for dx so I assume that can be
non-uniform. Why else have an array?



> I know the 3.1 documentation points out the new level set libraries
> should be much faster than the 3.0 native python code, but I also wanted
> to suggest for future versions (assuming I'm right about the skfmm and
> lsmlib limitations) that it would be very useful to have the option to
> fall back to the old 3.0 native python code for non-uniform grid cases.
>

I looked through "distanceVariable.py" and it appears that "dx" can only be
a float and not an array. Assuming LSMLIB and Scikit-fmm handle non-uniform
grids, which I believe they do, it shouldn't be a big deal to fix FiPy to
pass an array for dx.


>   But I certainly understand the desire to simplify the code base.  And
> I suspect from the lack of other bug reports that there may not be too
> many of us trying to use level set methods on non-uniform grids.


I actually do use non-uniform girds, but the value of the level set only
matters in the uniform region. Hence, why I haven't fixed FiPy. I should
have just implemented this when I originally integrated with LSMLIB and
Scikit-fmm.

If you do have a suggested work-around, please let me know.  In any
>
case, thanks for making FiPy available for use like this.
>

Let me fix this and get back to you. If you have a simple test case then
that would be helpful.


> Bob Howell
>
> ----------------------------
> What follows is just a short description of my application, in case that
> helps in suggesting a work-around.
>
> I've been using FiPy 3.0 to study sublimation of icy planetary surfaces,
> in particular those near the hot fissures at the south pole of
> Enceladus.  I use a level set variable to track the sublimation erosion
> of the surface.  That surface is cooled both by sublimation and by
> radiation, and heated from the side, where a hot fissure is assumed to
> be located.  I'm interested in the temperature (and erosion) of the
> surface both near to and far from the fissure.  The very non-linear
> nature of the heat loss terms lead to very steep temperature gradients
> near the surface and near the fissure.  For those reasons I'm using a
> non-uniform grid, with fine spacing near the surface and the fissure,
> but much coarser spacing far away.  FiPy 3.0 seems to produce reasonable
> solutions, although numerical instability problems force me to use small
> time steps, which then lead to long run times.  I switched to FiPy 3.1
> partly because the new level set libraries would be faster, and partly
> just to stay with the most recent code base.
>

Fascinating application and I am glad that FiPy is helping.

Give me a little bit of time to get this working and I'll get back to you.

Cheers,

Daniel

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to