[mesa-users] The choice of interpolant in interp_1d_lib

Ehsan Moravveji e.moravveji at gmail.com
Sun Nov 30 15:29:16 EST 2014


Dear Bill, and mesa users.
Thanks to your instructions on using the examples subroutines in mesa/interp_1d/test/src/interp_1d_support.f. So far, I have tried three approaches, and all of them fail to give me the desired result. I have to mention that my run_star_extras runs without any error. To summarize, I have taken the following three approaches:

1. using interpolate_vector()
2. using interp_m3q() to get the interpolant coefficients, and subsequently calling interp_values() to carry out the interpolation
3. walking through the mesh grid and calling interp_3_to_1().

The outcome of all three is identical, and produces the undesired result as shown in the attached plot. For brevity, I also attached the short subroutine that I call in my run_star_extras to present my three approaches.

I would be grateful if any one of black belts with some experience using public interpolation tools in MESA cast some light on the issue.

Best regards,

Ehsan Moravveji



On Nov 30, 2014, at 12:23 AM, Bill Paxton <paxton at kitp.ucsb.edu> wrote:

> Hi Ehsan,
> 
>> 
>> On Nov 28, 2014, at 6:10 PM, Ehsan Moravveji <e.moravveji at gmail.com> wrote:
>>> 
>>> Do I instead have to walk through the mesh grid, and interpolate locally? interp_4_to_1() perhaps?
> 
> No reason to expect that to work differently, but by trying to use it you might uncover the problem.
> 
> Look at mesa/interp_1d/test/src/interp_1d_support, subroutines test1 and test3, for example.
> They test the interpolation routines that you might want to use.  Use them as a guide.
> 
> Good luck debugging.
> 
> -B
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141130/56a11783/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: comp-interp-before-after.png
Type: image/png
Size: 49253 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141130/56a11783/attachment.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141130/56a11783/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interpolate_opacity.f
Type: application/octet-stream
Size: 3929 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141130/56a11783/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141130/56a11783/attachment-0002.html>


More information about the Mesa-users mailing list