SEVN
Loading...
Searching...
No Matches
neutrinomassloss.h File Reference
#include <sevnlog.h>
#include <map>
#include <vector>

Go to the source code of this file.

Classes

class  NeutrinoMassLoss
 
class  NMLDisabled
 

Macros

#define _UNUSED   __attribute__ ((unused))
 

Macro Definition Documentation

◆ _UNUSED

#define _UNUSED   __attribute__ ((unused))

This header contains the class NeutrinoMassLoss. They are used to handle the neutrino mass loss during a SN explosion This class is auxiliary to the Supernova class, each supernova instance has a NeutrinoMassLoss instance The class has only one method that is called in the Supernova class :

1- Define the new class, public inherited from PairInstability e.g. class NMLLattimer89 : public NeutrinoMassLoss

2- Build the specific constructor NMLLattimer89(bool reg = true) : PairInstability(false){ if (reg) Register(true); } IMPORTANT: the Base constructor has to be called with reg=false

3- Override the name method inline std::string name() override { return "lattimer89"; } NOTICE: the returned name will be the one used to register the option and the one that will be used to select the given option at runtime, e.g. -sn_neutrinomloss lattimer89

4- Define the static instance static NMLLattimer89 _nmllattimer89;

4b- Add the static instance in static_main.h NMLLattimer89 NMLLattimer89::_nmllattimer89; Notice: In this way as soon the static_main.h is loaded the class is added to the available pair instability models

5- Override the method instance NMLLattimer89* instance() override { return (new NMLLattimer89(false)); } Notice if very important to use reg=false when calling the constructor

6- Override the method apply double apply(_UNUSED const double mremnant, _UNUSED Star *s) const; it get the (pre-correction) remnant mass mremnant and the pointer to the exploding star as input and return the mass of the remnant after the neutrino mass loss

8: Add documentation Try to document as much as possible.