SEVN
Loading...
Searching...
No Matches
PairInstability Class Referenceabstract

#include <pairinstability.h>

Inheritance diagram for PairInstability:
PIDisabled PIFarmer19 PIIorio22 PIMapelli20 PIIorio22Limited

Public Member Functions

virtual std::string name () const
 
virtual PairInstabilityinstance ()=0
 
virtual utilities::MassContainer apply_beforeSN (_UNUSED Star *s) const
 
virtual PISNreturn apply_afterSN (_UNUSED Star *s, _UNUSED double mremnant) const
 
 PairInstability (_UNUSED bool reg=true)
 
virtual ~PairInstability ()=default
 
 PairInstability (const PairInstability &)=delete
 
PairInstabilityoperator= (const PairInstability &)=delete
 
 PairInstability (PairInstability &&other)=delete
 
PairInstabilityoperator= (PairInstability &&other)=delete
 

Static Public Member Functions

static PairInstabilityInstance (std::string const &name)
 Base class. More...
 

Static Protected Member Functions

static void Register (PairInstability *ptr)
 

Protected Attributes

SevnLogging svlog
 

Static Private Member Functions

static std::map< std::string, PairInstability * > & GetStaticMap ()
 Option handling. More...
 
static std::vector< int > & GetUsed ()
 TODO we are never using this method, we should remove it. More...
 

Detailed Description

Class to the handle the pulsation pair instability SN

Constructor & Destructor Documentation

◆ PairInstability() [1/3]

PairInstability::PairInstability ( _UNUSED bool  reg = true)
inlineexplicit

◆ ~PairInstability()

virtual PairInstability::~PairInstability ( )
virtualdefault

◆ PairInstability() [2/3]

PairInstability::PairInstability ( const PairInstability )
delete

◆ PairInstability() [3/3]

PairInstability::PairInstability ( PairInstability &&  other)
delete

Member Function Documentation

◆ apply_afterSN()

PISNreturn PairInstability::apply_afterSN ( _UNUSED Star s,
_UNUSED double  mremnant 
) const
virtual

Main function to call to apply the pair instability after the SN explosion This function has to be called after the remnant mass has been defined. It apply a correction to the remnant mass (if needed) and set the SNtype The method of the base class just set Mremnant_after_pi=mremnant and SNType=CoreCollapse NOTICE: the default method does nothing, just initialise the PISNreturn with:

  • Mremnant_after_pi=mremnant
  • SNType=Lookup::SNExplosionType::CoreCollapse
    Parameters
    sPointer to the exploding star to which we want to apply the correction
    mremnantMass of the remnant before the pair instability correction
    Returns
    an Instance of the struct PISNeturn with only two members:
  • Mremnant_after_pi, Mass of the remnant after the application of pi
  • SNType: SN explosion type an object of the enum Lookup::SNExplosionType (ElectronCapture, CoreCollapse, PPISN,PISN)

Reimplemented in PIFarmer19, PIIorio22, and PIMapelli20.

◆ apply_beforeSN()

utilities::MassContainer PairInstability::apply_beforeSN ( _UNUSED Star s) const
virtual

Methods that can be customized in new models: NOTICE these are the two methods that actually estimate the pisn corrections. By default they do nothing (indeed they are not changed in the disabled model) You may want to change one or both of them Main function to call to apply the pulsation pair instability before the SN explosion The function return a structure containing the modified preSN stellar mass(es) (total mass, MHE, MCO) due to the pulsation pair instability. This function should be called before estimating the final mass in the explosion method in the Supernova classes The method of the base class just copy the Mass,MHE and MCO NOTICE: the default method does nothing, just initialise the utilities::MassContainer with the current stellar mass properties

Parameters
sPointer to the exploding star
Returns
an Instance of the struct PPISNMass with only three members:
  • Mass_after_ppi, Mass of the star before the explosion due to the pulsation pair instability
  • MHE_after_ppi: Mass of the HE core of the star before the explosion due to the pulsation pair instability
  • MCO_after_ppi: Mass of the CO core of the star before the explosion due to the pulsation pair instability

Reimplemented in PIIorio22.

◆ GetStaticMap()

static std::map< std::string, PairInstability * > & PairInstability::GetStaticMap ( )
inlinestaticprivate

Option handling.

◆ GetUsed()

static std::vector< int > & PairInstability::GetUsed ( )
inlinestaticprivate

TODO we are never using this method, we should remove it.

◆ instance()

virtual PairInstability * PairInstability::instance ( )
pure virtual

Create an instance of the class allocated on the heap

Returns
a pointer to a real instance of the class that is allocated on the heap

Implemented in PIDisabled, PIFarmer19, PIIorio22, PIIorio22Limited, and PIMapelli20.

◆ Instance()

PairInstability * PairInstability::Instance ( std::string const &  name)
static

Base class.

Generic method to call an instance based on name

Parameters
namename of the option
Returns
a pointer to a real instance of the class that is allocated on the heap

◆ name()

virtual std::string PairInstability::name ( ) const
inlinevirtual

Remember that each new proper PairInstability model has to have a public static class instance to define in static_main.h e.g. static MyModel _mymodel; (in the class) and MyModel MyModel::_mymodel; in static_main.h Methods that must be customized in new models Name of the PairInstability model, this will be use at runtime to select the given model

Reimplemented in PIDisabled, PIFarmer19, PIIorio22, PIIorio22Limited, and PIMapelli20.

◆ operator=() [1/2]

PairInstability & PairInstability::operator= ( const PairInstability )
delete

◆ operator=() [2/2]

PairInstability & PairInstability::operator= ( PairInstability &&  other)
delete

◆ Register()

void PairInstability::Register ( PairInstability ptr)
staticprotected

Register function, to be called inside the option constructor to register the given option

Member Data Documentation

◆ svlog

SevnLogging PairInstability::svlog
protected

The documentation for this class was generated from the following files: