SSE class hierarchy¶
Figure 1 shows the SSE class diagram, where the arrows indicate inheritance. The COMPAS C++ code is implemented
using multiple inheritance, and all stellar classes also inherit directly from the BaseStar class (arrows not shown in
Figure 1 for clarity). Each of the stellar classes encapsulates data structures and algorithms specific to the evolutionary
phase corresponding to the class.
The main class for SSE is the Star class. The Star class is a wrapper that abstracts away the details of the star and the
evolution. Internally the Star class maintains a pointer to an object representing the star being evolved, with that object being
an instance of one of the following classes:
MS_lte_07Main Sequence \(\small \leq 0.07 M_\odot\)
MS_gt_07Main Sequence \(\small \gt 0.07 M_\odot\)
CHChemically Homogeneous
HGHertzsprung Gap
FGBFirst Giant Branch
CHeBCore Helium Burning
EAGBEarly Asymptotic Giant Branch
TPAGBThermally Pulsing Asymptotic Giant Branch
HeMSHelium Main Sequence
HeHGHelium Hertzsprung Gap
HeGBHelium Giant Branch
HeWDHelium White Dwarf
COWDCarbon-Oxygen White Dwarf
ONeWDOxygen-Neon White Dwarf
NSNeutron Star
BHBlack Hole
MRMassless Remnant
which track the phases from [Hurley et al., 2000], with the exception of the CH class for Chemically Homogeneous stars,
which are not described in [Hurley et al., 2000].
Several other SSE classes are defined:
BaseStar
MainSequence
GiantBranch
Remnants
WhiteDwarfs
These extra classes are included to allow inheritance of common functionality.
The BaseStar class is the main class for the underlying star object held by the Star class. The BaseStar class defines all member
variables, and many member functions that provide common functionality. Similarly, the MainSequence and GiantBranch classes provide
repositories for common functionality for main sequence and giant branch stars respectively, and the the Remnants and WhiteDwarfs classes
provide repositories for common functionality for remnant and white dwarf stars respectively.
Figure 1 SSE class & container diagram.¶
CH (Chemically Homogeneous) class stars inherit from the MS_gt_07 class because (in this implementation) they are just (large) main
sequence stars that have a static radius.
HG (Hertzsprung Gap) class stars inherit from the GiantBranch class because they share the giant branch parameters described in
[Hurley et al., 2000], section 5.2.
Each class has its own set of member functions that calculate various attributes of the star according to the phase the class represents (using the equations and parameters from [Hurley et al., 2000] where applicable).