SEVN
Loading...
Searching...
No Matches
hobbs.h
Go to the documentation of this file.
1/*
2 Created by iorio on 7/26/22.
3 it includes:
4- Class HobbsPure: Pure Hobbs kick, kick drawn from a Maxwellian with sigma=sn_kick_velocity_stdev.
5- Class Hobbs: Same as HobbePure, but the kick are corrected for the SN fallback (larger fallback, lower velocities)
6*/
7
8#ifndef SEVN_HOBBS_H
9#define SEVN_HOBBS_H
10
11#include <kicks.h>
12
16class HobbsPure : public Kicks{
17 HobbsPure(bool reg = true){
18 if(reg) {
19 Register(this, name());
20 }
21 }
22
24
25 void _apply(Star *s) override;
26
27 //when I use the regist function I use the non trivial constructor of the Hermite6th class
29 return (new HobbsPure(false));
30 }
31
32 inline std::string name() override { return "hobbs_pure"; }
33};
34
38class Hobbs : virtual public Kicks{
39
40public:
41 Hobbs(bool reg = true){
42 if(reg) {
43 Register(this, name());
44 }
45 }
46
47 static Hobbs _hobbs;
48
49 void _apply(Star *s) override;
50
51 //when I use the regist function I use the non trivial constructor of the Hermite6th class
53 return (new Hobbs(false));
54 }
55
56 inline std::string name() override { return "hobbs"; }
57
58protected:
59
77
78};
79
80
81#endif //SEVN_HOBBS_H
Definition: hobbs.h:38
Hobbs * instance()
Definition: hobbs.h:52
std::string name() override
Definition: hobbs.h:56
Hobbs(bool reg=true)
Definition: hobbs.h:41
double estimate_fallback_correction(Star *s)
Definition: hobbs.cpp:46
static Hobbs _hobbs
Definition: hobbs.h:47
void _apply(Star *s) override
Definition: hobbs.cpp:24
Definition: hobbs.h:16
static HobbsPure _hobbspure
Definition: hobbs.h:23
HobbsPure(bool reg=true)
Definition: hobbs.h:17
HobbsPure * instance()
Definition: hobbs.h:28
std::string name() override
Definition: hobbs.h:32
void _apply(Star *s) override
Definition: hobbs.cpp:10
Definition: kicks.h:24
void Register(Kicks *ptr, const std::string &_name)
Definition: kicks.h:56
Definition: star.h:39