Welcome
... to the homepage of MESA++,
the
C++
interface
to
MESA.
Why A C++ Interface for MESA?
What Can It Do?
What is the interface design philosophy?
Manifesto
Download, install, and run
How do you say that?
Why A C++ Interface for MESA?
FORTRAN remains a favorite language for scientific programming, but
it is no longer the only
language for scientific programming. Furthermore, it is distressingly
uncommon to find a university computer science department that will
even teach a course on Fortran programming.
By providing a C++ interface for MESA, we hope to extend its
usefulness to a wider community. We also hope to break down the
language barrier, giving C++ programmers a taste of Fortran and Fortran
programmers a taste of C++!
The availability of a C++ interface opens other possibilities as
well. For example, we provide a simple
Python driver for the C++ interface that allows a more interactive
approach to a stellar modeling session.
What Can It Do?
MESA++ is still at an early stage of development. We have begun
writing
the interfaces at the lowest levels of MESA and are working our way up.
At present, we have completed Level 0 MESA++
for all packages except
sample and pulse. We have made substantial progress on the Level 1
and Level 2
interfaces as well.
The MESA++ Star class is
a heritable star modeling class that can easily be extended to use
custom physics, such as experimental mass loss or equation of state
formulations.
In the long run, we plan to provide some very sophisticated high-level interfaces. This is where we believed that C++ will really shine. For example, the Python driver under development will nicely complement the impressive PGPLOT output graphics already present in MESA.
What is the interface design philosophy?
At Level 0, the interface has been kept
as flat as possible. Fortran arrays are represented by a C++ template
struct, Shape.
that reproduces the data layout of a Fortran array descriptor and adds
a minimum of functionality. Most C++ function declarations map directly
to Fortran functions, but with header files taking the place of modules
and with a few argument types modified to be more C++-friendly. In
particular, variable-length character string arguments to Fortran
functions have been replaced with character pointer plus length
arguments, which is mandated by portability considerations.
Level 0 MESA++ has been supplemented in many places with Level 1
MESA++, which retains a procedural interface, but uses more
C++-friendly argument types (including C++ library types such as string and vector) and replaces most ierr
arguments with exceptions. We have also begun work on Level 2 MESA++,
which provides
full-fledged C++ classes to bring important families of functions
and data into one place. For example, the functions implementing
1-D
interpolation have been brought together into a Table class that handles all
the management issues involved in generating and using an
interpolation. The most important such class is Star, which
represents a stellar model and the functions needed to evolve it. As
MESA++ matures, we expect to develop many more such
higher-level interfaces to MESA.
MESA Manifesto
MESA++ is a part of the MESA project and subscribes to the MESA
manifesto. It has its own website and code repository because we
recognize that not all MESA users will be interested in the C++
interface, and keeping the code repositories separate helps keep things
a bit cleaner. The use of separate repositories also allows us to make
new
releases of MESA without
waiting for MESA++ to catch up with any changes. Each release of MESA++
is then tied to a particular previous release of MESA.
The MESA Manifesto discusses the
motivation for the
MESA project, outlines a MESA
code of conduct, and describes
the establishment of a MESA Council. For
more information, go here.
Download, install, and run
In the menu on the left, click “getting started” for information
about downloading and installing MESA++.
Note that you will first need to download and install MESA.
How do you say that?
Say MAY-sa Plus-Plus.
website
design
by
Andreas Viklund