[mesa-users] Mesa with Python
Adam Jermyn
adamjermyn at gmail.com
Mon Sep 28 07:00:03 EDT 2015
Hi Rob,
Thanks for the information. I have used f2py before, but not for
larger codes like MESA. I'll give it a try.
All the best,
-Adam
On Sat, Sep 26, 2015 at 12:26 AM, Robert Farmer <rjfarmer at asu.edu> wrote:
> Hi
>
> All the mesa modules are isolated from each other, and should only call
> routines available from the files in the public/ sub-folder of other
> modules. Most (but not all) of the binding occurs via the routines inside
> the star module. It is be possible to call say the eos/ routines
> independently of the main code. See Kevin's example from the last summer
> school:
> https://mesa2015-external-code.readthedocs.org/en/latest/index.html
>
> So if you wanted to access the eos from python you only need the eos (plus
> its dependencies)
>
> Have you tried looking at f2py if you want a python interface? Its
> relatively easy to use and you don't need to worry about changing the source
> code, though getting the build to link everything properly might take some
> work.
>
> Rob
>
> On Fri, Sep 25, 2015 at 11:23 AM, Adam Jermyn <adamjermyn at gmail.com> wrote:
>>
>> Hi Bill,
>>
>> How is this handled in terms of making sure that different modules
>> within MESA can talk to each other? Does that interface change
>> substantially over time? For EOS in particular, it seems that there's
>> a pretty well-defined set of inputs and outputs, so that one might be
>> more amenable to an API treatment than others...
>>
>> Thanks!
>> -Adam
>>
>>
>> On Fri, Sep 25, 2015 at 3:40 PM, Bill Paxton <paxton at kitp.ucsb.edu> wrote:
>> > Hi Adam,
>> >
>> > Yes, a Python interface would be great. Kent Budge created one:
>> >
>> > http://mesapp.sourceforge.net/
>> >
>> > But I don't know when it was last updated -- it takes a substantial
>> > effort to keep the Python and C++ interfaces up to date with the rapidly
>> > changing MESA versions.
>> >
>> > Cheers,
>> > Bill
>> > On Sep 25, 2015, at 6:20 AM, Adam Jermyn wrote:
>> >
>> >> Dear Dr. Paxton,
>> >>
>> >> I've been working with MESA, and it occurred to me that it would be
>> >> extremely useful to be able to call many of the modules in MESA from
>> >> other codes (particularly in high-level languages like Python). For
>> >> instance, the EOS module in MESA provides the greatest coverage of any
>> >> EOS available, but as far as I can tell there is no MESA equivalent to
>> >> the OPAL EOS tables. Are there any plans for providing standalone EOS
>> >> tables (or providing interfaces to other languages)?
>> >>
>> >> Thanks,
>> >> -Adam
>> >>
>> >>
>> >> ---
>> >> Adam Jermyn
>> >> University of Cambridge, IoA
>> >> Caltech Class of 2015
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> mesa-users mailing list
>> mesa-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mesa-users
>
>
More information about the Mesa-users
mailing list